1. 29 Oct, 2007 13 commits
    • Kristen Carlson Accardi's avatar
      [libata] AHCI: add hw link power management support · 31556594
      Kristen Carlson Accardi authored
      This patch will set the correct bits to turn on Aggressive
      Link Power Management (ALPM) for the ahci driver.  This
      will cause the controller and disk to negotiate a lower
      power state for the link when there is no activity (see
      the AHCI 1.x spec for details).  This feature is mutually
      exclusive with Hot Plug, so when ALPM is enabled, Hot Plug
      is disabled.  ALPM will be enabled by default, but it is
      settable via the scsi host syfs interface.  Possible
      settings for this feature are:
      
      Setting         Effect
      ----------------------------------------------------------
      min_power       ALPM is enabled, and link set to enter
                      lowest power state (SLUMBER) when idle
                      Hot plug not allowed.
      
      max_performance ALPM is disabled, Hot Plug is allowed
      
      medium_power    ALPM is enabled, and link set to enter
                      second lowest power state (PARTIAL) when
                      idle.  Hot plug not allowed.
      Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      31556594
    • Kristen Carlson Accardi's avatar
      [libata] Link power management infrastructure · ca77329f
      Kristen Carlson Accardi authored
      Device Initiated Power Management, which is defined
      in SATA 2.5 can be enabled for disks which support it.
      This patch enables DIPM when the user sets the link
      power management policy to "min_power".
      
      Additionally, libata drivers can define a function
      (enable_pm) that will perform hardware specific actions to
      enable whatever power management policy the user set up
      for Host Initiated Power management (HIPM).
      This power management policy will be activated after all
      disks have been enumerated and intialized.  Drivers should
      also define disable_pm, which will turn off link power
      management, but not change link power management policy.
      
      Documentation/scsi/link_power_management_policy.txt has additional
      information.
      Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      ca77329f
    • Jeff Garzik's avatar
      [libata] AHCI: fix newly introduced host-reset bug · ab6fc95f
      Jeff Garzik authored
      The recent fix to host reset introduced a problem, whereby AHCI-enable
      bit would be cleared upon reset, if it was not asserted prior to reset.
      
      Unconditionally enable AHCI-enable bit.
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      ab6fc95f
    • Jeff Garzik's avatar
      [libata] sata_nv: fix SWNCQ enabling · 360737a9
      Jeff Garzik authored
      Adapted from patches by Kuan Lou @ NVIDIA and Bartlomiej Zolnierkiewicz.
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      360737a9
    • Tejun Heo's avatar
      libata: add MAXTOR 7V300F0/VA111900 to NCQ blacklist · 12850ffe
      Tejun Heo authored
      MAXTOR 7V300F0/VA111900 does spurious NCQ completions.  Add it to
      blacklist.  This problem is reported by Carsten Otto.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Cc: Carsten Otto <c-otto@gmx.de>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      12850ffe
    • Tejun Heo's avatar
      libata: no need to speed down if already at PIO0 · 4fb4615b
      Tejun Heo authored
      After reset, transfer mode is always PIO0 regardless of
      dev->xfer_mask.  Check dev->pio_mode before trying to slow down after
      configuration failure.  This prevents bogus speed down before device
      is actually configured.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Acked-by: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      4fb4615b
    • Tejun Heo's avatar
      libata: relocate forcing PIO0 on reset · cdeab114
      Tejun Heo authored
      Forcing PIO0 on reset was done inside ata_bus_softreset(), which is a
      bit out of place as it should be applied to all resets - hard, soft
      and implementation which don't use ata_bus_softreset().  Relocate it
      such that...
      
      * For new EH, it's done in ata_eh_reset() before calling prereset.
      
      * For old EH, it's done before calling ap->ops->phy_reset() in
        ata_bus_probe().
      
      This makes PIO0 forced after all resets.  Another difference is that
      reset itself is done after PIO0 is forced.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Acked-by: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      cdeab114
    • Frank Lichtenheld's avatar
      pata_ns87415: define SUPERIO_IDE_MAX_RETRIES · a9efacba
      Frank Lichtenheld authored
      Code copied from drivers/ide/pci/ns87415.c uses this, so copy the
      definition from there as well.
      
      Fixes the following build error:
        CC [M]  drivers/ata/pata_ns87415.o
      drivers/ata/pata_ns87415.c: In function ‘ns87560_read_buggy’:
      drivers/ata/pata_ns87415.c:228: error: ‘SUPERIO_IDE_MAX_RETRIES’ undeclared (first use in this function)
      drivers/ata/pata_ns87415.c:228: error: (Each undeclared identifier is reported only once
      drivers/ata/pata_ns87415.c:228: error: for each function it appears in.)
      Signed-off-by: default avatarFrank Lichtenheld <frank@lichtenheld.de>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      a9efacba
    • Jeff Garzik's avatar
      5796d1c4
    • Jeff Garzik's avatar
      b447916e
    • Tejun Heo's avatar
      libata: implement ata_wait_after_reset() · 88ff6eaf
      Tejun Heo authored
      On certain device/controller combination, 0xff status is asserted
      after reset and doesn't get cleared during 150ms post-reset wait.  As
      0xff status is interpreted as no device (for good reasons), this can
      lead to misdetection on such cases.
      
      This patch implements ata_wait_after_reset() which replaces the 150ms
      sleep and waits upto ATA_TMOUT_FF_WAIT if status is 0xff.
      ATA_TMOUT_FF_WAIT is currently 800ms which is enough for
      HHD424020F7SV00 to get detected but not enough for Quantum GoVault
      drive which is known to take upto 2s.
      
      Without parallel probing, spending 2s on 0xff port would incur too
      much delay on ata_piix's which use 0xff to indicate empty port and
      doesn't have SCR register, so GoVault needs to wait till parallel
      probing.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      88ff6eaf
    • Tejun Heo's avatar
      libata: track SLEEP state and issue SRST to wake it up · 054a5fba
      Tejun Heo authored
      ATA devices in SLEEP mode don't respond to any commands.  SRST is
      necessary to wake it up.  Till now, when a command is issued to a
      device in SLEEP mode, the command times out, which makes EH reset the
      device and retry the command after that, causing a long delay.
      
      This patch makes libata track SLEEP state and issue SRST automatically
      if a command is about to be issued to a device in SLEEP.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Cc: Bruce Allen <ballen@gravity.phys.uwm.edu>
      Cc: Andrew Paprocki <andrew@ishiboo.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      054a5fba
    • Tejun Heo's avatar
      libata: relocate and fix post-command processing · 4dbfa39b
      Tejun Heo authored
      Some commands need post-processing after successful completion.  This
      was done in ata_scsi_qc_complete() till now but this has the following
      problems.
      
      * Post-command processing gets executed when qc is completed from EH.
        Some qc's are retried from EH with zero err_mask and thus triggers
        unnecessary/incorrect post-command processing.
      
      * Command post processing doesn't belong to SAT layer.
      
      * Link-wide revalidation was scheduled where device revalidation
        suffices.
      
      This patch moves post-command processing to success completion path of
      ata_qc_complete() which is travelled iff the command is going to be
      completed without passing through EH and updates post-command
      processing such that device-specific action is used.  While at it,
      restructure code a bit for readability.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      4dbfa39b
  2. 28 Oct, 2007 8 commits
  3. 27 Oct, 2007 19 commits