1. 03 12月, 2006 2 次提交
    • T
      [PATCH] libata: make sure sdev doesn't go away while rescanning · f84e7e41
      Tejun Heo 提交于
      ata_scsi_dev_rescan() doesn't synchronize against SCSI device detach
      and the target sdev might go away in the middle.  Fix it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      f84e7e41
    • T
      [PATCH] libata: fix READ CAPACITY simulation · 6a36261e
      Tejun Heo 提交于
      * READ CAPACITY (16) implementation fixed.  Result was shifted by two
        bytes.  Carlos Pardo spotted this problem and submitted preliminary
        patch.  Capacity => 2TB is handled correctly now.  (verifid w/ fake
        capacity)
      
      * Use dev->n_sectors instead of re-reading directly from ID data.
      
      * Define and use ATA_SCSI_RBUF_SET() which considers rbuf length.
        This should be done for all simulation functions.  Userland can
        issue any simulated command with arbitrary buffer length.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Carlos Pardo <Carlos.Pardo@siliconimage.com>
      6a36261e
  2. 02 12月, 2006 6 次提交
  3. 28 11月, 2006 2 次提交
  4. 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
  5. 11 10月, 2006 1 次提交
  6. 30 9月, 2006 1 次提交
  7. 29 9月, 2006 1 次提交
  8. 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
  9. 10 8月, 2006 1 次提交
  10. 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
  11. 29 7月, 2006 1 次提交
  12. 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
  13. 28 6月, 2006 1 次提交
  14. 23 6月, 2006 2 次提交
  15. 12 6月, 2006 2 次提交
  16. 11 6月, 2006 1 次提交
  17. 06 6月, 2006 1 次提交
  18. 31 5月, 2006 7 次提交
  19. 24 5月, 2006 2 次提交
  20. 20 5月, 2006 1 次提交
  21. 15 5月, 2006 1 次提交