1. 11 3月, 2008 1 次提交
  2. 23 1月, 2008 1 次提交
  3. 29 10月, 2007 1 次提交
  4. 13 10月, 2007 10 次提交
    • A
      pdc2027x: Switch properly to ioread/iowrite · d2a84f47
      Alan Cox 提交于
      Some iomap functions were still using readl/writel and friends which
      happens to work on most platforms but is not correct.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d2a84f47
    • 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
    • A
      libata: pata_pdc2027x PLL detection minor cleanup · e923090d
      Albert Lee 提交于
      Minor cleanup to remove the unneeded rmb()s per Jeff's advice. Also removed the
      pll_clock < 0 check since pll_clock now guaranteed to be >= 0 after Mikael's patch.
      Signed-off-by: NAlbert Lee <albertcc@tw.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      e923090d
    • A
      libata: Switch most of the remaining SFF drivers to ata_sff_port_start · 81ad1837
      Alan Cox 提交于
      This avoids allocating DMA buffers if not needed but at the moment is
      mostly just a neatness item.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      81ad1837
    • 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 config/EH related functions · 0260731f
      Tejun Heo 提交于
      Make the following functions deal with ata_link instead of ata_port.
      
      * ata_set_mode()
      * ata_eh_autopsy() and related functions
      * ata_eh_report() and related functions
      * suspend/resume related functions
      * ata_eh_recover() and related functions
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      0260731f
    • 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: implement and use link/device iterators · f58229f8
      Tejun Heo 提交于
      Multiple links and different number of devices per link should be
      considered to iterate over links and devices.  This patch implements
      and uses link and device iterators - ata_port_for_each_link() and
      ata_link_for_each_dev() - and ata_link_max_devices().
      
      This change makes a lot of functions iterate over only possible
      devices instead of from dev 0 to dev ATA_MAX_DEVICES.  All such
      changes have been examined and nothing should be broken.
      
      While at it, add a separating comment before device helpers to
      distinguish them better from link helpers and others.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      f58229f8
    • 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
  5. 31 8月, 2007 1 次提交
  6. 23 8月, 2007 1 次提交
    • M
      pata_pdc2027x: PLL detection fixes · 78c4af0b
      Mikael Pettersson 提交于
      Previously I reported that the pata_pdc2027x PLL detection changes
      in kernel 2.6.22 broke the driver on my PowerMac:
      
      >pata_pdc2027x: Invalid PLL input clock 1691742kHz, give up!
      
      This is followed by a number of errors and speed reduction
      steps on the affected ports.
      
      There are two bugs in pata_pdc2027x's PLL detection code:
      
      1. The PLL counter's start value is read before the chip is
         put in "test mode". Outside of test mode the counter is
         halted, and on the PowerMac the counter is zero because
         the chip hasn't been initialised by its BIOS.
      
         The fix is to move the read of the start value to after
         test mode is started, but before the mdelay() in test mode.
         This also improves the precision of the PLL detection.
      
      2. The code to compute the number of PLL decrements during the
         mdelay() in test mode fails to consider that the PLL counter
         only is 30 bits wide. If there is a wraparound, it will compute
         an incorrect and much too large value. On the PowerMac, the
         start count is zero, the end count is a large 30-bit value, so
         wraparound occurs and an out of bounds PLL clock is detected.
      
         The fix is to mask the (start - end) computation to 30 bits.
      
      While debugging this I also noticed that pdc_read_counter()
      reads the two halves of the 30-bit PLL counter as 16-bit values,
      and then combines them as if the halves only are 15 bits wide.
      To avoid confusion, the halves should be read as 15-bit values.
      
      This patch implements all three changes. It fixes the PLL detection
      failure on my PowerMac, and doesn't cause any regressions on an x86
      with an identical card.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      78c4af0b
  7. 02 7月, 2007 1 次提交
    • A
      libata: pata_pdc2027x PLL input clock fix · 8c781bf7
      Albert Lee 提交于
      Recently the PLL input clock of pata_pdc2027x is sometimes detected
      higer than expected (e.g. 20.027 MHz compared to 16.714 MHz).
      It seems sometimes the mdelay() function is not as precise as it
      used to be. Per Alan's advice, HT or power management might affect
      the precision of mdelay().
      
      This patch calls gettimeofday() to mesure the time elapsed and
      calculate the PLL input clock accordingly.
      Signed-off-by: NAlbert Lee <albertcc@tw.ibm.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      8c781bf7
  8. 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
  9. 29 4月, 2007 2 次提交
    • 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
    • A
      pata_pdc2027x: Updates · 9bedb799
      Alan Cox 提交于
      Signed-off-by: NAlan Cox <alan@redhat.com>
      
      Correct missing modefilter (crash if BAR4 unassigned)
      Use Cable Detect method
      Wrap ->set_mode instead ready for ->post_set_mode removal
      Maxtor errata as per Jeff Garzik report
      Remove duplicated private udma_mask hacking
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      9bedb799
  10. 26 2月, 2007 1 次提交
  11. 15 2月, 2007 1 次提交
  12. 10 2月, 2007 3 次提交
    • A
      libata: add another IRQ calls (libata drivers) · 246ce3b6
      Akira Iguchi 提交于
      This patch is against each libata driver.
      
      Two IRQ calls are added in ata_port_operations.
      - irq_on() is used to enable interrupts.
      - irq_ack() is used to acknowledge a device interrupt.
      
      In most drivers, ata_irq_on() and ata_irq_ack() are used for
      irq_on and irq_ack respectively.
      
      In some drivers (ex: ahci, sata_sil24) which cannot use them
      as is, ata_dummy_irq_on() and ata_dummy_irq_ack() are used.
      Signed-off-by: NKou Ishizaki <kou.ishizaki@toshiba.co.jp>
      Signed-off-by: NAkira Iguchi <akira2.iguchi@toshiba.co.jp>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      246ce3b6
    • T
      libata: convert to iomap · 0d5ff566
      Tejun Heo 提交于
      Convert libata core layer and LLDs to use iomap.
      
      * managed iomap is used.  Pointer to pcim_iomap_table() is cached at
        host->iomap and used through out LLDs.  This basically replaces
        host->mmio_base.
      
      * if possible, pcim_iomap_regions() is used
      
      Most iomap operation conversions are taken from Jeff Garzik
      <jgarzik@pobox.com>'s iomap branch.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      0d5ff566
    • T
      libata: update libata LLDs to use devres · 24dc5f33
      Tejun Heo 提交于
      Update libata LLDs to use devres.  Core layer is already converted to
      support managed LLDs.  This patch simplifies initialization and fixes
      many resource related bugs in init failure and detach path.  For
      example, all converted drivers now handle ata_device_add() failure
      gracefully without excessive resource rollback code.
      
      As most resources are released automatically on driver detach, many
      drivers don't need or can do with much simpler ->{port|host}_stop().
      In general, stop callbacks are need iff port or host needs to be given
      commands to shut it down.  Note that freezing is enough in many cases
      and ports are automatically frozen before being detached.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      24dc5f33
  13. 03 12月, 2006 1 次提交
  14. 02 12月, 2006 1 次提交
  15. 29 11月, 2006 1 次提交
  16. 29 9月, 2006 1 次提交
  17. 27 9月, 2006 1 次提交
  18. 25 9月, 2006 1 次提交
  19. 30 8月, 2006 1 次提交