1. 19 7月, 2007 4 次提交
    • D
      [SCSI] sas_ata: ata_post_internal should abort the sas_task · 1c50dc83
      Darrick J. Wong 提交于
      This patch adds a new field, lldd_task, to ata_queued_cmd so that libata
      users such as libsas can associate some data with a qc.  The particular
      ambition with this patch is to associate a sas_task with a qc; that way,
      if libata decides to timeout a command, we can come back (in
      sas_ata_post_internal) and abort the sas task.
      
      One question remains: Is it necessary to reset the phy on error, or will
      the libata error handler take care of it?  (Assuming that one is written,
      of course.)  This patch, as it is today, works well enough to clean
      things up when an ATA device probe attempt fails halfway through the probe,
      though I'm not sure this is always the right thing to do.
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      1c50dc83
    • D
      [SCSI] sas_ata: sas_ata_qc_issue should return AC_ERR_* · 35a7f2f6
      Darrick J. Wong 提交于
      The sas_ata_qc_issue function was incorrectly written to return error
      codes such as -ENOMEM.  Since libata OR's qc->err_mask with the
      return value, It is necessary to make my code return one of the
      AC_ERR_ codes instead.  For now, use AC_ERR_SYSTEM because an error
      here means that the OS couldn't send the command to the controller.
      
      If anybody has a suggestion for a better AC_ERR_ code to use, please
      suggest it.
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      35a7f2f6
    • D
      [SCSI] sas_ata: Satisfy libata qc function locking requirements · 3eb7a51a
      Darrick J. Wong 提交于
      ata_qc_complete and ata_sas_queuecmd require that the port lock be held
      when they are called.  sas_ata doesn't do this, leading to BUG messages
      about qc tags newly allocated qc tags already being in use.  This patch
      fixes the locking, which should clean up the rest of those messages.
      
      So far I've tested this against an IBM x206m with two SATA disks with no
      BUG messages and no other signs of things going wrong, and the machine
      finally passed the pounder stress test.
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      3eb7a51a
    • D
      [SCSI] Migrate libsas ATA code into a separate file · 338ec570
      Darrick J. Wong 提交于
      This is a respin of my earlier patch that migrates the ATA support code
      into a separate file.  For now, the controversial linking bits have
      been removed per James Bottomley's request for a patch that contains
      only the migration diffs, which means that libsas continues to require
      libata.  I intend to address that problem in a separate patch.
      
      This patch is against the aic94xx-sas-2.6 git tree, and it has been
      sanity tested on my x206m with Seagate SATA and SAS disks without
      uncovering any new problems.
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      338ec570