1. 02 Mar, 2011 10 commits
    • Sergei Shtylyov's avatar
      sata_dwc_460ex: fix return value of dma_dwc_xfer_setup() · d285e8bf
      Sergei Shtylyov authored
      The caller expects this function to return the DMA channel number on success,
      while it returns 0...
      Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      d285e8bf
    • Sergei Shtylyov's avatar
      sata_dwc_460ex: fix compilation errors/warnings · c211962d
      Sergei Shtylyov authored
      Fix the following compilation errors/warnings:
      
      drivers/ata/sata_dwc_460ex.c:43:1: warning: "DRV_NAME" redefined
      In file included from drivers/ata/sata_dwc_460ex.c:38:
      drivers/ata/libata.h:31:1: warning: this is the location of the previous
      definition
      drivers/ata/sata_dwc_460ex.c:44:1: warning: "DRV_VERSION" redefined
      drivers/ata/libata.h:32:1: warning: this is the location of the previous
      definition
      drivers/ata/sata_dwc_460ex.c: In function `sata_dwc_exec_command_by_tag':
      drivers/ata/sata_dwc_460ex.c:1356: warning: passing argument 1 of
      `ata_get_cmd_descript' makes integer from pointer without a cast
      drivers/ata/sata_dwc_460ex.c: In function `sata_dwc_qc_issue':
      drivers/ata/sata_dwc_460ex.c:1476: warning: `err' is used uninitialized in this
      function
      drivers/ata/sata_dwc_460ex.c:1465: note: `err' was declared here
      drivers/ata/sata_dwc_460ex.c: In function `sata_dwc_qc_issue':
      drivers/ata/sata_dwc_460ex.c:1493: warning: passing argument 1 of
      `ata_get_cmd_descript' makes integer from pointer without a cast
      drivers/ata/sata_dwc_460ex.c: In function `sata_dwc_qc_prep':
      drivers/ata/sata_dwc_460ex.c:1537: error: `tag' undeclared (first use in this
      function)
      drivers/ata/sata_dwc_460ex.c:1537: error: (Each undeclared identifier is
      reported only once
      drivers/ata/sata_dwc_460ex.c:1537: error: for each function it appears in.)
      
      NB: error only happens if DEBUG_NCQ macro is defined...
      Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      c211962d
    • Sergei Shtylyov's avatar
      sata_dwc_460ex: use ATA_PIO4 · b83a4c39
      Sergei Shtylyov authored
      Somehow the driver was committed with a bare number for the PIO mask, instead
      of ATA_PIO4...
      Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      b83a4c39
    • Jeff Garzik's avatar
    • 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 10 commits