1. 19 2月, 2011 12 次提交
  2. 14 2月, 2011 5 次提交
    • J
      [SCSI] libsas: convert to libata new error handler · c299190b
      James Bottomley 提交于
      The conversion is quite complex given that the libata new error
      handler has to be hooked into the current libsas timeout and error
      handling.  The way this is done is to process all the failed commands
      via libsas first, but if they have no underlying sas task (and they're
      on a sata device) assume they are destined for the libata error
      handler and send them accordingly.
      
      Finally, activate the port recovery of the libata error handler for
      each port known to the host.  This is somewhat suboptimal, since that
      port may not need recovering, but given the current architecture of
      the libata error handler, it's the only way; and the spurious
      activation is harmless.
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      c299190b
    • J
      [SCSI] libata: separate error handler into usable components · 64878c0e
      James Bottomley 提交于
      Right at the moment, the libata error handler is incredibly
      monolithic.  This makes it impossible to use from composite drivers
      like libsas and ipr which have to handle error themselves in the first
      instance.
      
      The essence of the change is to split the monolithic error handler
      into two components: one which handles a queue of ata commands for
      processing and the other which handles the back end of readying a
      port.  This allows the upper error handler fine grained control in
      calling libsas functions (and making sure they only get called for ATA
      commands whose lower errors have been fixed up).
      
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      64878c0e
    • J
      [SCSI] libata: fix eh locking · 4451ef63
      James Bottomley 提交于
      The SCSI host eh_cmd_q should be protected by the host lock (not the
      port lock).  This probably doesn't matter that much at the moment,
      since we try to serialise the add and eh pieces, but it might matter
      in future for more convenient error handling.  Plus this switches
      libata to the standard eh pattern where you lock, remove from the cmd
      queue to a local list and unlock and then operate on the local list.
      
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      4451ef63
    • J
      [SCSI] libata: fix locking for sas paths · b8784f77
      James Bottomley 提交于
      For historical reasons, libsas uses the scsi host lock as the ata port
      lock, and libata always uses the ata host.  For the old eh, this was
      largely irrelevant since the two locks were never mixed inside the
      code.  However, the new eh has a case where it nests acquisition of
      the host lock inside the port lock (this does look rather deadlock
      prone).  Obviously this would be an instant deadlock if the port lock
      were the host lock, so switch the libsas paths to use the ata host
      lock as well.
      
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      b8784f77
    • J
      [SCSI] libata: plumb sas port scan into standard libata paths · 1f723867
      James Bottomley 提交于
      The function ata_sas_port_init() has always really done its own thing.
      However, as a precursor to moving to the libata new eh, it has to be
      properly using the standard libata scan paths.  This means separating
      the current libata scan paths into pieces which can be shared with
      libsas and pieces which cant (really just the async call and the host
      scan).
      
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      1f723867
  3. 13 2月, 2011 23 次提交