1. 13 10月, 2007 18 次提交
  2. 31 8月, 2007 1 次提交
  3. 25 7月, 2007 1 次提交
  4. 20 7月, 2007 7 次提交
    • T
      libata: implement EH fast drain · 5ddf24c5
      Tejun Heo 提交于
      In most cases, when EH is scheduled, all in-flight commands are
      aborted causing EH to kick in immediately.  However, in some cases
      (especially with PMP), it's unclear which commands are affected by the
      error condition and although aborting all in-flight commands work, it
      isn't optimal and may cause unnecessary disruption.  On the other
      hand, waiting for in-flight commands to drain themselves can take up
      to 30seconds.
      
      This patch implements EH fast drain to handle such situations.  It
      gives in-flight commands some time to finish up but doesn't wait for
      too long.  After EH is scheduled, fast drain timer is started and if
      no other completion occurs in ATA_EH_FASTDRAIN_INTERVAL all in-flight
      commands are aborted.  If any completion occurred in the interval, the
      port is given another interval to finish up itself.
      
      Currently ATA_EH_FASTDRAIN_INTERVAL is 3 secs which should be enough
      for finishing up most commands.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5ddf24c5
    • T
      libata: reorganize ata_ehi_hotplugged() · f8f1e1cc
      Tejun Heo 提交于
      __ata_ehi_hotplugged() now has no users.  Regorganize
      ata_ehi_hotplugged() such that a new function ata_ehi_schedule_probe()
      deals with scheduling probing.  ata_ehi_hotplugged() calls it and
      additionally marks hotplug specific flags.  ata_ehi_schedule_probe()
      will be used laster.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      f8f1e1cc
    • T
      libata: improve SATA PHY speed down logic · 008a7896
      Tejun Heo 提交于
      sata_down_spd_limit() first reads the current SPD from SStatus and
      limit the speed to the lower one of one below the current limit or one
      below the current SPD in SStatus.  SPD may not be accessible or valid
      when SPD down is requested making sata_down_spd_limit() fail when it's
      most needed.
      
      This patch makes the current SPD cached after each successful reset
      and forces GEN I speed (1.5Gbps) if neither of SStatus or the cached
      value is valid, so sata_down_spd_limit() is now guaranteed to lower
      the speed limit if lower speed is available.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      008a7896
    • T
      libata: make ->scr_read/write callbacks return error code · da3dbb17
      Tejun Heo 提交于
      Convert ->scr_read/write callbacks to return error code to better
      indicate failure.  This will help handling of SCR_NOTIFICATION.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      da3dbb17
    • T
      libata: implement AC_ERR_NCQ · 5335b729
      Tejun Heo 提交于
      When an NCQ command fails, all commands in flight are aborted and the
      offending one is reported using log page 10h.  Depending on controller
      characteristics and LLD implementation, all commands may appear as
      having a device error due to shared TF status making it hard to
      determine what's actually going on.
      
      This patch adds AC_ERR_NCQ, marks the command reported by log page 10h
      with it and print extra "<F>" after the error report for the command
      to help distinguishing the offending command.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5335b729
    • T
      libata: improve EH report formatting · b64bbc39
      Tejun Heo 提交于
      Requiring LLDs to format multiple error description messages properly
      doesn't work too well.  Help LLDs a bit by making ata_ehi_push_desc()
      insert ", " on each invocation.  __ata_ehi_push_desc() is the raw
      version without the automatic separator.
      
      While at it, make ehi_desc interface proper functions instead of
      macros.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b64bbc39
    • T
      libata: add @is_cmd to ata_tf_to_fis() · 9977126c
      Tejun Heo 提交于
      Add @is_cmd to ata_tf_to_fis().  This controls bit 7 of the second
      byte which tells the device whether this H2D FIS is for a command or
      not.  This cleans up ahci a bit and will be used by PMP.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      9977126c
  5. 19 7月, 2007 1 次提交
    • D
      [SCSI] sas_ata: ata_post_internal should abort the sas_task · 1c50dc83
      Darrick J. Wong 提交于
      This patch adds a new field, lldd_task, to ata_queued_cmd so that libata
      users such as libsas can associate some data with a qc.  The particular
      ambition with this patch is to associate a sas_task with a qc; that way,
      if libata decides to timeout a command, we can come back (in
      sas_ata_post_internal) and abort the sas task.
      
      One question remains: Is it necessary to reset the phy on error, or will
      the libata error handler take care of it?  (Assuming that one is written,
      of course.)  This patch, as it is today, works well enough to clean
      things up when an ATA device probe attempt fails halfway through the probe,
      though I'm not sure this is always the right thing to do.
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      1c50dc83
  6. 11 7月, 2007 3 次提交
  7. 10 7月, 2007 4 次提交
    • A
      libata: Support chips with 64K PRD quirk · d26fc955
      Alan Cox 提交于
      Add ata_dumb_qc_prep and supporting logic so that a driver can just
      specify it needs to be helped in this area. 64K entries are split
      as with drivers/ide.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d26fc955
    • T
      libata-acpi: implement _GTM/_STM support · 64578a3d
      Tejun Heo 提交于
      Implement _GTM/_STM support.  acpi_gtm is added to ata_port which
      stores _GTM parameters over suspend/resume cycle.  A new hook
      ata_acpi_on_suspend() is responsible for storing _GTM parameters
      during suspend.  _STM is executed in ata_acpi_on_resume().  With this
      change, invoking _GTF is safe on IDE hierarchy and acpi_sata check
      before _GTF is removed.
      
      ata_acpi_gtm() and ata_acpi_stm() implementation is taken from Alan
      Cox's pata_acpi implementation.  ata_acpi_gtm() is fixed such that the
      result parameter is not shifted by sizeof(union acpi_object).
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      64578a3d
    • T
      libata: reimplement ACPI invocation · 6746544c
      Tejun Heo 提交于
      This patch reimplements ACPI invocation such that, instead of
      exporting ACPI details to the rest of libata, ACPI event handlers -
      ata_acpi_on_resume() and ata_acpi_on_devcfg() - are used.  These two
      functions are responsible for determining whether specific ACPI method
      is used and when.
      
      On resume, _GTF is scheduled by setting ATA_DFLAG_ACPI_PENDING device
      flag.  This is done this way to avoid performing the action on wrong
      device device (device swapping while suspended).
      
      On every ata_dev_configure(), ata_acpi_on_devcfg() is called, which
      performs _SDD and _GTF.  _GTF is performed only after resuming and, if
      SATA, hardreset as the ACPI spec specifies.  As _GTF may contain
      arbitrary commands, IDENTIFY page is re-read after _GTF taskfiles are
      executed.
      
      If one of ACPI methods fails, ata_acpi_on_devcfg() retries on the
      first failure.  If it fails again on the second try, ACPI is disabled
      on the device.  Note that successful configuration clears ACPI failed
      status.
      
      With all feature checks moved to the above two functions,
      do_drive_set_taskfiles() is trivial and thus collapsed into
      ata_acpi_exec_tfs(), which is now static and converted to return the
      number of executed taskfiles to be used by ata_acpi_on_resume().  As
      failures are handled properly, ata_acpi_push_id() now returns -errno
      on errors instead of unconditional zero.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      6746544c
    • T
      libata-acpi: implement ata_acpi_associate() · fafbae87
      Tejun Heo 提交于
      * Add acpi_handle to ata_host and ata_port.  Rename
        ata_device->obj_handle to ->acpi_handle and move it above such that
        it doesn't get cleared on reconfiguration.
      
      * Replace ACPI node association which ata_acpi_associate() which is
        called once during host initialization.  Unlike the previous
        implementation, ata_acpi_associate() uses ATA_FLAG_ACPI_SATA to
        choose between IDE or SATA ACPI hierarchy and uses simple child look
        up instead of recursive walk to match the nodes.  This is way safer
        and simpler.  Please read the following message for more info.
      
        http://article.gmane.org/gmane.linux.ide/17554Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      fafbae87
  8. 27 6月, 2007 2 次提交
    • T
      libata: kill ATA_HORKAGE_DMA_RW_ONLY · 40a1d531
      Tejun Heo 提交于
      ATA_HORKAGE_DMA_RW_ONLY for TORiSAN is verified to be subset of using
      DMA for ATAPI commands which aren't aligned to 16 bytes.  As libata
      now doesn't use DMA for unaligned ATAPI commands, the horkage is
      redundant.  Kill it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      40a1d531
    • T
      libata: kill the infamous abnormal status message · 55f3952d
      Tejun Heo 提交于
      The infamous abnormal status message triggers on not so abnormal cases
      including empty port and even when it's being triggered on actual
      errors the info it provides is redundant and out of context - higher
      level functions will print the info in better safe later anyway.
      
      Also, by being triggered all the time, it leads people to think that
      the abnormality is somehow related to all ATA and system problems
      they're experiencing and gives owners of healthy systems unfounded
      doubts about the integrity of the universe.  Make it a DPRINTK and
      save the universe.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      55f3952d
  9. 10 6月, 2007 1 次提交
    • A
      libata-core/sff: Fix multiple assumptions about DMA · d92e74d3
      Alan Cox 提交于
      The ata IRQ ack functions are only used when debugging. Unfortunately
      almost every controller that calls them can cause crashes in some
      configurations as there are missing checks for bmdma presence.
      
      In addition ata_port_start insists of installing DMA buffers and pad
      buffers for controllers regardless. The SFF controllers actually need to
      make that decision dynamically at controller setup time and all need the
      same helper - so we add ata_sff_port_start. Future patches will switch
      the SFF drivers to use this.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d92e74d3
  10. 05 6月, 2007 1 次提交
    • T
      libata: always use polling SETXFER · 464cf177
      Tejun Heo 提交于
      Several people have reported LITE-ON LTR-48246S detection failed
      because SETXFER fails.  It seems the device raises IRQ too early after
      SETXFER.  This is controller independent.  The same problem has been
      reported for different controllers.
      
      So, now we have pata_via where the controller raises IRQ before it's
      ready after SETXFER and a device which does similar thing.  This patch
      makes libata always execute SETXFER via polling.  As this only happens
      during EH, performance impact is nil.  Setting ATA_TFLAG_POLLING is
      also moved from issue hot path to ata_dev_set_xfermode() - the only
      place where SETXFER can be issued.
      
      Note that ATA_TFLAG_POLLING applies only to drivers which implement
      SFF TF interface and use libata HSM.  More advanced controllers ignore
      the flag.  This doesn't matter for this fix as SFF TF controllers are
      the problematic ones.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      464cf177
  11. 22 5月, 2007 1 次提交