1. 03 11月, 2007 3 次提交
  2. 30 10月, 2007 5 次提交
    • T
      libata: implement and use ATA_QCFLAG_QUIET · e027bd36
      Tejun Heo 提交于
      Implement ATA_QCFLAG_QUIET which indicates that there's no need to
      report if the command fails with AC_ERR_DEV and set it for passthrough
      commands.
      
      Combined with previous changes, this now makes device errors for all
      direct commands reported directly to the issuer without going through
      EH actions and reporting.
      
      Note that EH is still invoked after non-IO device errors to determine
      the nature of the error and resume command execution (some controller
      requires special care after error to continue).  It just performs
      default maintenance after error, examines what's going on, realizes
      that it's none of its business and reports the command failure without
      logging any error messages.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      e027bd36
    • T
      libata: stop being overjealous about non-IO commands · f90f0828
      Tejun Heo 提交于
      libata EH always revalidated device and retried failed command after
      error except for ATAPI CCs.  This is unnecessary and hinders with
      users issuing direct commands.  This patch makes the following
      changes.
      
      * Make sata_sil24 not request ATA_EH_REVALIDATE on device errors.
        sil24 is the only driver which does this.  All others let libata EH
        core code decide.
      
      * Don't request revalidation after device error of non-IO command.
        Revalidation doesn't really help anybody.  As ATA_EH_REVALIDATE
        isn't set by default, there's no reason to clear it after sense data
        is read.  Kill ATA_EH_REVALIDATE clearing code while at it.
      
      * Don't retry non-IO command after device error.  Device has rejected
        the command.  There's no point in retrying.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      f90f0828
    • T
      libata: flush is an IO command · b666da35
      Tejun Heo 提交于
      ATA_QCFLAG_IO is used to mark commands which are used to perform
      regluar IO transfers via block layer.  These commands are assumed to
      be valid and taken more seriously during error handling.  Cache flush
      is used by regular IO path and necessary for data integrity.  Mark it
      with ATA_QCFLAG_IO.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b666da35
    • M
      sata_promise: cleanups · 5595ddf9
      Mikael Pettersson 提交于
      Minor sata_promise cleanups:
      - use C99 array initialisers in pdc_port_info[]
      - add myself in the file head's Maintained by note,
        since users don't always read the MAINTAINERS file
      - SG/PRD bug workaround warrants driver version bump
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      --
       drivers/ata/sata_promise.c |   17 +++++++++--------
       1 files changed, 9 insertions(+), 8 deletions(-)
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5595ddf9
    • M
      sata_promise: ASIC PRD table bug workaround, take 2 · b9ccd4a9
      Mikael Pettersson 提交于
      Second-generation Promise SATA controllers have an ASIC bug
      which can trigger if the last PRD entry is larger than 164 bytes,
      resulting in intermittent errors and possible data corruption.
      
      Work around this by replacing calls to ata_qc_prep() with a
      private version that fills the PRD, checks the size of the
      last entry, and if necessary splits it to avoid the bug.
      Also reduce sg_tablesize by 1 to accommodate the new entry.
      
      Tested on the second-generation SATA300 TX4 and SATA300 TX2plus,
      and the first-generation PDC20378.
      
      Thanks to Alexander Sabourenkov for verifying the bug by
      studying the vendor driver, and for writing the initial patch
      upon which this one is based.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      --
      Changes since previous version:
      * use new PDC_MAX_PRD constant to initialise sg_tablesize
      
       drivers/ata/sata_promise.c |   87 ++++++++++++++++++++++++++++++++++++++++++---
       1 files changed, 83 insertions(+), 4 deletions(-)
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b9ccd4a9
  3. 29 10月, 2007 14 次提交
    • K
      [libata] AHCI: add hw link power management support · 31556594
      Kristen Carlson Accardi 提交于
      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: NKristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      31556594
    • K
      [libata] Link power management infrastructure · ca77329f
      Kristen Carlson Accardi 提交于
      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: NKristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ca77329f
    • J
      [libata] AHCI: fix newly introduced host-reset bug · ab6fc95f
      Jeff Garzik 提交于
      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: NJeff Garzik <jgarzik@redhat.com>
      ab6fc95f
    • J
      [libata] sata_nv: fix SWNCQ enabling · 360737a9
      Jeff Garzik 提交于
      Adapted from patches by Kuan Lou @ NVIDIA and Bartlomiej Zolnierkiewicz.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      360737a9
    • T
      libata: add MAXTOR 7V300F0/VA111900 to NCQ blacklist · 12850ffe
      Tejun Heo 提交于
      MAXTOR 7V300F0/VA111900 does spurious NCQ completions.  Add it to
      blacklist.  This problem is reported by Carsten Otto.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Carsten Otto <c-otto@gmx.de>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      12850ffe
    • T
      libata: no need to speed down if already at PIO0 · 4fb4615b
      Tejun Heo 提交于
      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: NTejun Heo <htejun@gmail.com>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4fb4615b
    • T
      libata: relocate forcing PIO0 on reset · cdeab114
      Tejun Heo 提交于
      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: NTejun Heo <htejun@gmail.com>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      cdeab114
    • F
      pata_ns87415: define SUPERIO_IDE_MAX_RETRIES · a9efacba
      Frank Lichtenheld 提交于
      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: NFrank Lichtenheld <frank@lichtenheld.de>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      a9efacba
    • J
      [libata] Address some checkpatch-spotted issues · 5796d1c4
      Jeff Garzik 提交于
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      5796d1c4
    • J
      b447916e
    • T
      libata: implement ata_wait_after_reset() · 88ff6eaf
      Tejun Heo 提交于
      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: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      88ff6eaf
    • T
      libata: track SLEEP state and issue SRST to wake it up · 054a5fba
      Tejun Heo 提交于
      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: NTejun Heo <htejun@gmail.com>
      Cc: Bruce Allen <ballen@gravity.phys.uwm.edu>
      Cc: Andrew Paprocki <andrew@ishiboo.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      054a5fba
    • T
      libata: relocate and fix post-command processing · 4dbfa39b
      Tejun Heo 提交于
      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: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4dbfa39b
    • A
      Initialise scatter/gather list in ata_sg_setup · acd054a5
      Anton Blanchard 提交于
      After turning on DEBUG_SG I hit a fail:
      
      kernel BUG at include/linux/scatterlist.h:50!
      
      	ata_qc_issue
      	ata_scsi_translate
      	ipr_queuecommand
      	scsi_dispatch_cmd
      	scsi_request_fn
      	elv_insert
      	blk_execute_rq_nowait
      	blk_execute_rq
      	sg_io
      	scsi_cmd_ioctl
      	cdrom_ioctl
      	sr_block_ioctl
      	blkdev_driver_ioctl
      	blkdev_ioctl
      	block_ioctl
      	do_ioctl
      	vfs_ioctl
      	sys_ioctl
      	sg_ioctl_trans
      
      It looks like ata_sg_setup is working on an uninitialised sg table. Call
      sg_init_table to initialise it before use.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      
      Note: this patch will fix it, but you could also get away with just
      doing the sg_init_table() once at qc creation time.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      acd054a5
  4. 25 10月, 2007 7 次提交
  5. 24 10月, 2007 4 次提交
  6. 23 10月, 2007 1 次提交
  7. 20 10月, 2007 6 次提交