1. 02 Mar, 2011 6 commits
    • James Bottomley's avatar
      libsas: convert to libata new error handler · 00dd4998
      James Bottomley authored
      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: default avatarJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      00dd4998
    • James Bottomley's avatar
      libata: separate error handler into usable components · 0e0b494c
      James Bottomley authored
      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).
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      0e0b494c
    • James Bottomley's avatar
      libata: fix eh locking · c34aeebc
      James Bottomley authored
      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.
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      c34aeebc
    • James Bottomley's avatar
      libata: fix locking for sas paths · a29b5dad
      James Bottomley authored
      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.
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      a29b5dad
    • James Bottomley's avatar
      libata: plumb sas port scan into standard libata paths · 238c9cf9
      James Bottomley authored
      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).
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      238c9cf9
    • Tejun Heo's avatar
      libata: fix hotplug for drivers which don't implement LPM · eb0e85e3
      Tejun Heo authored
      ata_eh_analyze_serror() suppresses hotplug notifications if LPM is
      being used because LPM generates spurious hotplug events.  It compared
      whether link->lpm_policy was different from ATA_LPM_MAX_POWER to
      determine whether LPM is enabled; however, this is incorrect as for
      drivers which don't implement LPM, lpm_policy is always
      ATA_LPM_UNKNOWN.  This disabled hotplug detection for all drivers
      which don't implement LPM.
      
      Fix it by comparing whether lpm_policy is greater than
      ATA_LPM_MAX_POWER.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      eb0e85e3
  2. 01 Mar, 2011 10 commits
  3. 28 Feb, 2011 6 commits
  4. 26 Feb, 2011 4 commits
  5. 25 Feb, 2011 14 commits