1. 29 10月, 2007 1 次提交
    • 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
  2. 13 10月, 2007 7 次提交
    • S
      libata: Fix build failure on ppc64 drivers/ata/pata_scc.c · b90fe23b
      Satyam Sharma 提交于
      Little fixlets, that the build started erroring / warning about:
      
      drivers/ata/pata_scc.c: In function 'scc_bmdma_status':
      drivers/ata/pata_scc.c:734: error: structure has no member named 'active_tag'
      drivers/ata/pata_scc.c: In function 'scc_pata_prereset':
      drivers/ata/pata_scc.c:866: warning: passing arg 1 of 'ata_std_prereset' from incompatible pointer type
      drivers/ata/pata_scc.c: In function 'scc_error_handler':
      drivers/ata/pata_scc.c:908: warning: passing arg 2 of 'ata_bmdma_drive_eh' from incompatible pointer type
      drivers/ata/pata_scc.c:908: warning: passing arg 3 of 'ata_bmdma_drive_eh' from incompatible pointer type
      drivers/ata/pata_scc.c:908: warning: passing arg 5 of 'ata_bmdma_drive_eh' from incompatible pointer type
      make[2]: *** [drivers/ata/pata_scc.o] Error 1
      Signed-off-by: NSatyam Sharma <satyam@infradead.org>
      Cc: Alan Cox <alan@redhat.com>
      Cc: Mel Gorman <mel@skynet.ie>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b90fe23b
    • T
      libata: update ata_dev_try_classify() arguments · 3f19859e
      Tejun Heo 提交于
      Make ata_dev_try_classify() take a pointer to ata_device instead of
      ata_port/port_number combination for consistency and add @present
      argument.  @present indicates whether the device seems present during
      reset.  It's the result of TF access during softreset and link
      onlineness during hardreset.  @present will be used to improve
      diagnostic failure handling.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      3f19859e
    • T
      libata: implement and use ata_port_desc() to report port configuration · cbcdd875
      Tejun Heo 提交于
      Currently, port configuration reporting has the following problems.
      
      * iomapped address is reported instead of raw address
      * report contains irrelevant fields or lacks necessary fields for
        non-SFF controllers.
      * host->irq/irq2 are there just for reporting and hacky.
      
      This patch implements and uses ata_port_desc() and
      ata_port_pbar_desc().  ata_port_desc() is almost identical to
      ata_ehi_push_desc() except that it takes @ap instead of @ehi, has no
      locking requirement, can only be used during host initialization and "
      " is used as separator instead of ", ".  ata_port_pbar_desc() is a
      helper to ease reporting of a PCI BAR or an offsetted address into it.
      
      LLD pushes whatever description it wants using the above two
      functions.  The accumulated description is printed on host
      registration after "[S/P]ATA max MAX_XFERMODE ".
      
      SFF init helpers and ata_host_activate() automatically add
      descriptions for addresses and irq respectively, so only LLDs which
      isn't standard SFF need to add custom descriptions.  In many cases,
      such controllers need to report different things anyway.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      cbcdd875
    • J
      [libata] Remove ->port_disable() hook · ac8869d5
      Jeff Garzik 提交于
      It was always set to ata_port_disable().  Removed the hook, and replaced
      the very few ap->ops->port_disable() callsites with direct calls to
      ata_port_disable().
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      ac8869d5
    • J
      [libata] Remove ->irq_ack() hook, and ata_dummy_irq_on() · 6d32d30f
      Jeff Garzik 提交于
      * ->irq_ack() is redundant to what the irq handler already
        performs... chk-status + irq-clear.  Furthermore, it is only
        called in one place, when screaming-irq-debugging is enabled,
        so we don't want to bother with a hook just for that.
      
      * ata_dummy_irq_on() is only ever used in drivers that have
        no callpath reaching ->irq_on().  Remove .irq_on hook from
        those drivers, and the now-unused ata_dummy_irq_on()
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      6d32d30f
    • T
      libata-link: linkify PHY-related functions · 936fd732
      Tejun Heo 提交于
      Make the following PHY-related functions to deal with ata_link instead
      of ata_port.
      
      * sata_print_link_status()
      * sata_down_spd_limit()
      * ata_set_sata_spd_limit() and friends
      * sata_link_debounce/resume()
      * sata_scr_valid/read/write/write_flush()
      * ata_link_on/offline()
      
      This patch introduces no behavior change.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      936fd732
    • T
      libata-link: introduce ata_link · 9af5c9c9
      Tejun Heo 提交于
      Introduce ata_link.  It abstracts PHY and sits between ata_port and
      ata_device.  This new level of abstraction is necessary to support
      SATA Port Multiplier, which basically adds a bunch of links (PHYs) to
      a ATA host port.  Fields related to command execution, spd_limit and
      EH are per-link and thus moved to ata_link.
      
      This patch only defines the host link.  Multiple link handling will be
      added later.  Also, a lot of ap->link derefences are added but many of
      them will be removed as each part is converted to deal directly with
      ata_link instead of ata_port.
      
      This patch introduces no behavior change.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: James Bottomley <James.Bottomley@SteelEye.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      9af5c9c9
  3. 31 8月, 2007 1 次提交
  4. 20 7月, 2007 2 次提交
  5. 13 7月, 2007 1 次提交
  6. 11 7月, 2007 1 次提交
  7. 25 5月, 2007 1 次提交
    • T
      Fix build failure for drivers/ata/pata_scc.c · 7e068376
      Tony Breeds 提交于
      The commit d4b2bab4 added deadline support
      to prereset and reset methods to libbata the pata_scc driver wasn't
      converted.  This patch is a naive attempt to bring this driver up to
      scratch.
      
      Build failures are:
      drivers/ata/pata_scc.c: In function 'scc_pata_prereset':
      drivers/ata/pata_scc.c:870: error: too few arguments to function 'ata_std_prereset'
      drivers/ata/pata_scc.c: In function 'scc_error_handler':
      drivers/ata/pata_scc.c:916: warning: passing argument 2 of 'ata_bmdma_drive_eh' from incompatible pointer type
      drivers/ata/pata_scc.c:916: warning: passing argument 3 of 'ata_bmdma_drive_eh' from incompatible pointer type
      drivers/ata/pata_scc.c: In function 'scc_pata_prereset':
      drivers/ata/pata_scc.c:871: warning: control reaches end of non-void function
      
      On a releated note scc_bus_post_reset() is (AFACT) identical to
      ata_bus_post_reset(), would a patch to make ata_bus_post_reset() assesable
      to drivers be accepted?
      Signed-off-by: NTony Breeds <tony@bakeyournoodle.com>
      Acked-by: NTejun Heo <htejun@gmail.com>
      Cc: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      7e068376
  8. 22 5月, 2007 1 次提交
  9. 16 5月, 2007 1 次提交
  10. 12 5月, 2007 1 次提交
    • T
      libata: reimplement suspend/resume support using sdev->manage_start_stop · 9666f400
      Tejun Heo 提交于
      Reimplement suspend/resume support using sdev->manage_start_stop.
      
      * Device suspend/resume is now SCSI layer's responsibility and the
        code is simplified a lot.
      
      * DPM is dropped.  This also simplifies code a lot.  Suspend/resume
        status is port-wide now.
      
      * ata_scsi_device_suspend/resume() and ata_dev_ready() removed.
      
      * Resume now has to wait for disk to spin up before proceeding.  I
        couldn't find easy way out as libata is in EH waiting for the
        disk to be ready and sd is waiting for EH to complete to issue
        START_STOP.
      
      * sdev->manage_start_stop is set to 1 in ata_scsi_slave_config().
        This fixes spindown on shutdown and suspend-to-disk.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      9666f400
  11. 10 5月, 2007 1 次提交
  12. 29 4月, 2007 1 次提交
    • T
      libata: convert the remaining PATA drivers to new init model · 5d728824
      Tejun Heo 提交于
      Convert pdc_adma, pata_cs5520, pata_isapnp, pata_ixp4xx_cf,
      pata_legacy, pata_mpc52xx, pata_mpiix, pata_pcmcia, pata_pdc2027x,
      pata_platform, pata_qdi, pata_scc and pata_winbond to new init model.
      
      * init_one()'s now follow more consistent init order
      
      * cs5520 now registers one host with two ports, not two hosts.  If any
        of the two ports are disabled, it's made dummy as other drivers do.
      
      Tested pdc_adma and pata_legacy.  Both are as broken as before.  The
      rest are compile tested only.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5d728824
  13. 03 3月, 2007 1 次提交
  14. 26 2月, 2007 1 次提交
  15. 23 2月, 2007 1 次提交
  16. 21 2月, 2007 1 次提交