1. 29 10月, 2007 1 次提交
  2. 15 10月, 2007 1 次提交
  3. 13 10月, 2007 6 次提交
    • T
      sata_via: kill SATA_PATA_SHARING register handling · b6d6c746
      Tejun Heo 提交于
      The SATA_PATA_SHARING register doesn't have anything to do with the
      SATA part of the controller.  It indicates whether an extern SATA PHY
      is attached to the PATA part of the controller and if so how it is
      wired.  As the PATA part is driven by pata_via, sata_via has no reason
      to care about that.  Also, pata_via should work fine under all
      configurations.
      
      This patch removes unnecessary attach failures.  It seems recent via
      chipsets are defaulting to different values or are actually connected
      to SATA PHY triggering this more often.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b6d6c746
    • 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 reset · cc0680a5
      Tejun Heo 提交于
      Make reset methods and related functions deal with ata_link instead of
      ata_port.
      
      * ata_do_reset()
      * ata_eh_reset()
      * all prereset/reset/postreset methods and related functions
      
      This patch introduces no behavior change.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      cc0680a5
    • 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
  4. 01 9月, 2007 1 次提交
  5. 31 8月, 2007 1 次提交
  6. 20 7月, 2007 1 次提交
  7. 11 7月, 2007 1 次提交
    • T
      libata: simplify PCI legacy SFF host handling · d583bc18
      Tejun Heo 提交于
      With PCI resource fix up for legacy hosts.  We can use the same code
      path to allocate IO resources and initialize host for both legacy and
      native SFF hosts.  Only IRQ requesting needs to be different.
      
      Rename ata_pci_*_native_host() to ata_pci_*_sff_host(), kill all
      legacy specific functions and use the renamed functions instead.  This
      simplifies code a lot.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d583bc18
  8. 10 7月, 2007 2 次提交
  9. 25 5月, 2007 1 次提交
    • J
      [libata] sata_via, pata_via: Add PCI IDs. · 52df0ee0
      Jeff Garzik 提交于
      Supplied by VIA.
      
      Also, convert named constants to hex values in the pata_via
      PCI ID table.  (standard libata policy for PCI device IDs, which are
      considered simply arbitrary hex numbers, without a need to create a
      single-use constant in linux/pci_ids.h)
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      52df0ee0
  10. 22 5月, 2007 1 次提交
  11. 18 5月, 2007 1 次提交
  12. 12 5月, 2007 2 次提交
    • A
      git-libata-all: sata_via build fix · 1d30c33d
      Andrew Morton 提交于
      Cc: Tejun Heo <htejun@gmail.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      1d30c33d
    • T
      libata: clean up SFF init mess · 1626aeb8
      Tejun Heo 提交于
      The intention of using port_mask in SFF init helpers was to eventually
      support exoctic configurations such as combination of legacy and
      native port on the same controller.  This never became actually
      necessary and the related code always has been subtly broken one way
      or the other.  Now that new init model is in place, there is no reason
      to make common helpers capable of handling all corner cases.  Exotic
      cases can simply dealt within LLDs as necessary.
      
      This patch removes port_mask handling in SFF init helpers.  SFF init
      helpers don't take n_ports argument and interpret it into port_mask
      anymore.  All information is carried via port_info.  n_ports argument
      is dropped and always two ports are allocated.  LLD can tell SFF to
      skip certain port by marking it dummy.  Note that SFF code has been
      treating unuvailable ports this way for a long time until recent
      breakage fix from Linus and is consistent with how other drivers
      handle with unavailable ports.
      
      This fixes 1-port legacy host handling still broken after the recent
      native mode fix and simplifies SFF init logic.  The following changes
      are made...
      
      * ata_pci_init_native_host() and ata_init_legacy_host() both now try
        to initialized whatever they can and mark failed ports dummy.  They
        return 0 if any port is successfully initialized.
      
      * ata_pci_prepare_native_host() and ata_pci_init_one() now doesn't
        take n_ports argument.  All info should be specified via port_info
        array.  Always two ports are allocated.
      
      * ata_pci_init_bmdma() exported to be used by LLDs in exotic cases.
      
      * port_info handling in all LLDs are standardized - all port_info
        arrays are const stack variable named ppi.  Unless the second port
        is different from the first, its port_info is specified as NULL
        (tells libata that it's identical to the last non-NULL port_info).
      
      * pata_hpt37x/hpt3x2n: don't modify static variable directly.  Make an
        on-stack copy instead as ata_piix does.
      
      * pata_uli: It has 4 ports instead of 2.  Don't use
        ata_pci_prepare_native_host().  Allocate the host explicitly and use
        init helpers.  It's simple enough.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      1626aeb8
  13. 10 5月, 2007 1 次提交
  14. 01 5月, 2007 1 次提交
    • T
      libata: add deadline support to prereset and reset methods · d4b2bab4
      Tejun Heo 提交于
      Add @deadline to prereset and reset methods and make them honor it.
      ata_wait_ready() which directly takes @deadline is implemented to be
      used as the wait function.  This patch is in preparation for EH timing
      improvements.
      
      * ata_wait_ready() never does busy sleep.  It's only used from EH and
        no wait in EH is that urgent.  This function also prints 'be
        patient' message automatically after 5 secs of waiting if more than
        3 secs is remaining till deadline.
      
      * ata_bus_post_reset() now fails with error code if any of its wait
        fails.  This is important because earlier reset tries will have
        shorter timeout than the spec requires.  If a device fails to
        respond before the short timeout, reset should be retried with
        longer timeout rather than silently ignoring the device.
      
        There are three behavior differences.
      
        1. Timeout is applied to both devices at once, not separately.  This
           is more consistent with what the spec says.
      
        2. When a device passes devchk but fails to become ready before
           deadline.  Previouly, post_reset would just succeed and let
           device classification remove the device.  New code fails the
           reset thus causing reset retry.  After a few times, EH will give
           up disabling the port.
      
        3. When slave device passes devchk but fails to become accessible
           (TF-wise) after reset.  Original code disables dev1 after 30s
           timeout and continues as if the device doesn't exist, while the
           patched code fails reset.  When this happens, new code fails
           reset on whole port rather than proceeding with only the primary
           device.
      
        If the failing device is suffering transient problems, new code
        retries reset which is a better behavior.  If the failing device is
        actually broken, the net effect is identical to it, but not to the
        other device sharing the channel.  In the previous code, reset would
        have succeeded after 30s thus detecting the working one.  In the new
        code, reset fails and whole port gets disabled.  IMO, it's a
        pathological case anyway (broken device sharing bus with working
        one) and doesn't really matter.
      
      * ata_bus_softreset() is changed to return error code from
        ata_bus_post_reset().  It used to return 0 unconditionally.
      
      * Spin up waiting is to be removed and not converted to honor
        deadline.
      
      * To be on the safe side, deadline is set to 40s for the time being.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d4b2bab4
  15. 29 4月, 2007 2 次提交
    • T
      libata: convert drivers with combined SATA/PATA ports to new init model · eca25dca
      Tejun Heo 提交于
      Convert sata_via and sata_promise to new init model.  Both controllers
      can have combined configuration (SATA + PATA) and used twisted
      initialization method (modifying port in ->port_start) to overcome
      probe_ent limitations.
      
      This patch converts both drivers to new init model in which such
      configuration is natively supported.
      
      * promise: Combined pata port now uses separate port_info entry right
        after the sata counterpart entry.
      
      * promise: Controller configuration is discerned using ap->flags.
        This simplifies init path and makes it look more like other LLDs.
      
      * via: Both SATA and PATA ports in vt6421 are represented in their
        own port_info structure.
      
      Tested on PDC20375 (SATA150 TX2plus) [105a:3375] and PDC40775 (SATA
      300 TX2plus) [105a:3d73].  Couldn't test via cuz my c3 won't boot the
      current kernel.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      eca25dca
    • J
      [libata] Update several PATA drivers for new ->cable_detect hook · a0fcdc02
      Jeff Garzik 提交于
      All patches authored and signed-off-by Alan Cox, sent on Mar 7, 2007.
      I merely combined them all into a single patch.
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      a0fcdc02
  16. 26 2月, 2007 2 次提交
  17. 21 2月, 2007 1 次提交
  18. 10 2月, 2007 5 次提交
  19. 27 1月, 2007 1 次提交
  20. 26 1月, 2007 1 次提交
    • T
      sata_via: don't diddle with ATA_NIEN in ->freeze · 17234246
      Tejun Heo 提交于
      vt6420 completely loses its ability to raise IRQ for ATAPI devices if
      ATA_NIEN is diddled with in ->freeze.  Further investigation is
      necessary to determine whether this problem is shared on other
      controllers but it doesn't seem to be at this point.
      
      Make vt6420's ->freeze only clear IRQ to fix this problem.  This makes
      vt6420 relatively more prone to IRQ storms but the controller is way
      too braindamaged to worry about that anyway.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      17234246
  21. 20 1月, 2007 1 次提交
  22. 08 11月, 2006 1 次提交
  23. 29 9月, 2006 1 次提交
  24. 26 9月, 2006 1 次提交
  25. 24 8月, 2006 2 次提交
    • J
      libata: Grand renaming. · cca3974e
      Jeff Garzik 提交于
      The biggest change is that ata_host_set is renamed to ata_host.
      
      * ata_host_set			=> ata_host
      * ata_probe_ent->host_flags	=> ata_probe_ent->port_flags
      * ata_probe_ent->host_set_flags	=> ata_probe_ent->_host_flags
      * ata_host_stats		=> ata_port_stats
      * ata_port->host		=> ata_port->scsi_host
      * ata_port->host_set		=> ata_port->host
      * ata_port_info->host_flags	=> ata_port_info->flags
      * ata_(.*)host_set(.*)\(\)	=> ata_\1host\2()
      
      The leading underscore in ata_probe_ent->_host_flags is to avoid
      reusing ->host_flags for different purpose.  Currently, the only user
      of the field is libata-bmdma.c and probe_ent itself is scheduled to be
      removed.
      
      ata_port->host is reused for different purpose but this field is used
      inside libata core proper and of different type.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      cca3974e
    • J
      [PATCH] sata_via: Add SATA support for vt8237a · 08be09b7
      Jay Cliburn 提交于
      This patch adds support for the VIA Technologies VT8237A SATA controller,
      used, for example, on the ASUS M2V socket AM2 motherboard.
      Signed-off-by: NJay Cliburn <jacliburn@bellsouth.net>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      08be09b7
  26. 10 8月, 2006 1 次提交