1. 02 12月, 2006 4 次提交
  2. 28 11月, 2006 2 次提交
  3. 14 11月, 2006 1 次提交
    • D
      libata: fix double-completion on error · 253b92ec
      Darrick J. Wong 提交于
      A curious thing happens, however, when ata_qc_new_init fails to get
      an ata_queued_cmd:
      
      First, ata_qc_new_init handles the failure like this:
          cmd->result = (DID_OK << 16) | (QUEUE_FULL << 1);
          done(cmd);
      
      Then, we return to ata_scsi_translate and do this:
          err_mem:
              cmd->result = (DID_ERROR << 16);
              done(cmd);
      
      It appears to me that first we set a status code indicating that we're
      ok but the device queue is full and finish the command,  but then
      we blow away that status code and replace it with an error flag and
      finish the command a second time!  That does not seem to be desirable
      behavior since we merely want the I/O to wait until a command slot
      frees up, not send errors up the block layer.
      
      In the err_mem case, we should simply exit out of ata_scsi_translate
      instead.
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      253b92ec
  4. 11 10月, 2006 1 次提交
  5. 30 9月, 2006 1 次提交
  6. 29 9月, 2006 1 次提交
  7. 24 8月, 2006 1 次提交
    • J
      libata: Grand renaming. · cca3974e
      Jeff Garzik 提交于
      The biggest change is that ata_host_set is renamed to ata_host.
      
      * ata_host_set			=> ata_host
      * ata_probe_ent->host_flags	=> ata_probe_ent->port_flags
      * ata_probe_ent->host_set_flags	=> ata_probe_ent->_host_flags
      * ata_host_stats		=> ata_port_stats
      * ata_port->host		=> ata_port->scsi_host
      * ata_port->host_set		=> ata_port->host
      * ata_port_info->host_flags	=> ata_port_info->flags
      * ata_(.*)host_set(.*)\(\)	=> ata_\1host\2()
      
      The leading underscore in ata_probe_ent->_host_flags is to avoid
      reusing ->host_flags for different purpose.  Currently, the only user
      of the field is libata-bmdma.c and probe_ent itself is scheduled to be
      removed.
      
      ata_port->host is reused for different purpose but this field is used
      inside libata core proper and of different type.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      cca3974e
  8. 10 8月, 2006 1 次提交
  9. 09 8月, 2006 2 次提交
    • T
      [PATCH] libata: clear sdev->locked on door lock failure · 22aac089
      Tejun Heo 提交于
      SCSI EH locks door if sdev->locked is set.  Sometimes door lock
      command fails continuously (e.g. when medium is not present) and as
      libata uses EH to acquire sense data, this easily creates a loop where
      a failed lock door invokes EH and EH issues lock door on completion.
      
      This patch clears sdev->locked on door lock failure to break this
      loop.  This problem has been spotted and diagnosed by Unicorn Chang
      <uchang@tw.ibm.com>.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      22aac089
    • B
      [PATCH] libata: Add support for SATA attachment to SAS adapters · 80289167
      Brian King 提交于
      The following patch enhances libata to allow SAS device drivers
      to utilize libata to talk to SATA devices. It introduces some
      new APIs which allow libata to be used without allocating a
      virtual scsi host.
      
      New APIs:
      
      ata_sas_port_alloc - Allocate an ata_port
      ata_sas_port_init - Initialize an ata_port (probe device, etc)
      ata_sas_port_destroy - Free an ata_port allocated by ata_sas_port_alloc
      ata_sas_slave_configure - configure scsi device
      ata_sas_queuecmd - queue a scsi command, similar to ata_scsi_queuecomand
      
      These new APIs can be used either directly by a SAS LLDD or could be used
      by the SAS transport class.
      
      Possible usage for a SAS LLDD would be:
      
      scsi_scan_host
      	target_alloc
      		ata_sas_port_alloc
      	slave_alloc
      		ata_sas_port_init
      	slave_configure
      		ata_sas_slave_configure
      
      Commands received by the LLDD for SATA devices would call ata_sas_queuecmd.
      
      Device teardown would occur with:
      
      slave_destroy
      	port_disable
      target_destroy
      	ata_sas_port_destroy
      Signed-off-by: NBrian King <brking@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      80289167
  10. 29 7月, 2006 1 次提交
  11. 06 7月, 2006 3 次提交
    • T
      [PATCH] libata: reimplement per-dev PM · d6f26d1f
      Tejun Heo 提交于
      Reimplement per-dev PM.  The original implementation directly put the
      device into suspended mode and didn't synchronize w/ EH operations
      including hotplug.  This patch reimplements ata_scsi_device_suspend()
      and ata_scsi_device_resume() such that they request EH to perform the
      respective operations.  Both functions synchronize with hotplug such
      that it doesn't operate on detached devices.
      
      Suspend waits for completion but resume just issues request and
      returns.  This allows parallel wake up of devices and thus speeds up
      system resume.
      
      Due to sdev detach synchronization, it's not feasible to separate out
      EH requesting from sdev handling; thus, ata_device_suspend/resume()
      are removed and everything is implemented in the respective
      libata-scsi functions.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d6f26d1f
    • T
      [PATCH] libata: implement ATA_EHI_RESUME_LINK · 28324304
      Tejun Heo 提交于
      Implement ATA_EHI_RESUME_LINK, which indicates that the link needs to
      be resumed.  This used to be implied by ATA_EHI_HOTPLUGGED.  However,
      hotplug isn't the only event which requires link resume and separating
      this out allows other places to request link resume.  This
      differentiation also allows better debounce timing selection.
      
      This patch converts user scan to use ATA_EHI_RESUME_LINK.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      28324304
    • T
      [PATCH] libata: add ap->pflags and move core dynamic flags to it · b51e9e5d
      Tejun Heo 提交于
      ap->flags is way too clamped.  Separate out core dynamic flags to
      ap->pflags.  ATA_FLAG_DISABLED is a dynamic flag but left alone as
      it's referenced by a lot of LLDs and it's gonna be removed once all
      LLDs are converted to new EH.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b51e9e5d
  12. 28 6月, 2006 1 次提交
  13. 23 6月, 2006 2 次提交
  14. 12 6月, 2006 2 次提交
  15. 11 6月, 2006 1 次提交
  16. 06 6月, 2006 1 次提交
  17. 31 5月, 2006 7 次提交
  18. 24 5月, 2006 2 次提交
  19. 20 5月, 2006 1 次提交
  20. 15 5月, 2006 5 次提交
    • T
      [PATCH] libata-ncq: implement NCQ device configuration · a6e6ce8e
      Tejun Heo 提交于
      Now that all NCQ related stuff are in place, implement NCQ device
      configuration and bump ATA_MAX_QUEUE to 32 thus activating NCQ
      support.
      
      Original implementation is from Jens Axboe.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      a6e6ce8e
    • T
      [PATCH] libata-ncq: implement NCQ command translation and exclusion · 3dc1d881
      Tejun Heo 提交于
      This patch implements NCQ command translation and exclusion.  Note
      that NCQ commands don't use ata_rwcmd_protocol() to choose ATA
      command.  This is because, unlike non-NCQ RW commands, NCQ commands
      can only be used for NCQ protocol and FUA handling is done with a flag
      rather than separate command.
      
      NCQ enabled device will have queue depth larger than one but no two
      non-NCQ commands can be issued simultaneously, neither can a non-NCQ
      command and NCQ commands.  This patch makes ata_scsi_translate()
      return SCSI_MLQUEUE_DEVICE_BUSY if such exclusion is necessary.  SCSI
      midlayer will retry the command later.
      
      As SCSI midlayer always retries once a command completes, this doesn't
      incur unnecessary delays and as most commands will be NCQ ones for NCQ
      device, so the overhead should be negligible.
      
      Initial implementation is from Jens Axboe and using
      SCSI_MLQUEUE_DEVICE_BUSY for exclusion is suggested by Jeff Garzik.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      3dc1d881
    • T
      [PATCH] libata-ncq: pass ata_scsi_translate() return value to SCSI midlayer · 2115ea94
      Tejun Heo 提交于
      ata_scsi_translate() will need to return SCSI_ML_QUEUE_DEVICE_BUSY to
      achieve exlusion between NCQ and non-NCQ commands or among non-NCQ
      commands.  Pass its return value upward to SCSI midlayer.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      2115ea94
    • T
      [PATCH] libata-eh-fw: update SCSI command completion path for new EH · 246619da
      Tejun Heo 提交于
      SCSI command completion path used to do some part of EH including
      printing messages and obtaining sense data.  With new EH, all these
      are responsibilities of the EH, update SCSI command completion path to
      reflect this.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      246619da
    • T
      [PATCH] libata-eh-fw: implement ata_port_schedule_eh() and ata_port_abort() · 7b70fc03
      Tejun Heo 提交于
      ata_port_schedule_eh() directly schedules EH for @ap without
      associated qc.  Once EH scheduled, no further qc is allowed and EH
      kicks in as soon as all currently active qc's are drained.
      
      ata_port_abort() schedules all currently active commands for EH by
      qc_completing them with ATA_QCFLAG_FAILED set.  If ata_port_abort()
      doesn't find any qc to abort, it directly schedule EH using
      ata_port_schedule_eh().
      
      These two functions provide ways to invoke EH for conditions which
      aren't directly related to any specfic qc.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      7b70fc03