1. 25 Mar, 2008 5 commits
    • Mikael Pettersson's avatar
      sata_promise: fix hardreset hotplug events, take 2 · c07a9c49
      Mikael Pettersson authored
      A Promise SATA controller will signal hotplug events when a hard
      reset (COMRESET) is done on a port. These events aren't masked by
      the driver, and the unexpected interrupts will cause a sequence
      of failed reset attempts util libata's EH finally gives up.
      
      This has not been a common problem so far, but the pending libata
      hardreset-by-default changes makes it a critical issue.
      
      The solution is to disable hotplug events before a reset, and to
      reenable them afterwards. (Promise's driver does this too.)
      
      This patch adds SATA-specific versions of ->freeze() and ->thaw()
      that also disable and enable hotplug events. PATA ports continue
      to use the old versions of ->freeze() and ->thaw().
      
      Accesses to the hotplug register must be serialised via host->lock.
      We rely on ap->lock == &ap->host->lock and that libata takes this
      lock before ->freeze() and ->thaw(). Document this requirement.
      The interrupt handler is adjusted so its hotplug register accesses
      are inside the region protected by host->lock.
      
      Tested on various chips (SATA300TX4, SATA300TX2plus, SATAII150TX4,
      FastTrack TX4000) with various combinations of SATA and PATA disks,
      with and without the pending hardreset-by-default changes.
      Signed-off-by: default avatarMikael Pettersson <mikpe@it.uu.se>
      Acked-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      c07a9c49
    • Tejun Heo's avatar
      libata: improve HPA error handling · dda7aba1
      Tejun Heo authored
      There's no point in retrying and eventually failing device detection
      when the device rejects READ_NATIVE_MAX[_EXT].  Disable HPA unlocking
      if READ_NATIVE_MAX[_EXT] is rejected as done when SET_MAX[_EXT] is
      rejected.
      
      This allows some old drives to work even if they aren't blacklisted.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      dda7aba1
    • Tejun Heo's avatar
      libata: assume no device is attached if both IDENTIFYs are aborted · 1ffc151f
      Tejun Heo authored
      This is to fix bugzilla #10254.  QSI cdrom attached to pata_sis as
      secondary master appears as phantom device for the slave.
      Interestingly, instead of not setting DRQ after IDENTIFY which
      triggers NODEV_HINT, it aborts both IDENTIFY and IDENTIFY PACKET which
      makes EH retry.
      
      Modify EH such that it assumes no device is attached if both flavors
      of IDENTIFY are aborted by the device.  There really isn't much point
      in retrying when the device actively aborts the commands.
      
      While at it, convert NODEV detection message to ata_dev_printk() to
      help debugging obscure detection problems.
      
      This problem was reported by Jan Bücken.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Cc: Jan Bücken <jb.faq@gmx.de>
      Acked-by: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      1ffc151f
    • Tejun Heo's avatar
      pata_it821x: use raw nbytes in check_atapi_dma · b63b1331
      Tejun Heo authored
      pata_it821x needs to look at raw request size in check_atapi_dma().
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      b63b1331
    • Tejun Heo's avatar
      libata: implement ata_qc_raw_nbytes() · aacda375
      Tejun Heo authored
      Implement ata_qc_raw_nbytes() which determines the raw user-requested
      size of a PC command.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      aacda375
  2. 24 Mar, 2008 16 commits
  3. 23 Mar, 2008 13 commits
  4. 22 Mar, 2008 6 commits