1. 30 10月, 2007 1 次提交
    • 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
  2. 29 10月, 2007 1 次提交
  3. 13 10月, 2007 5 次提交
    • 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
  4. 31 8月, 2007 1 次提交
  5. 20 7月, 2007 1 次提交
  6. 11 7月, 2007 1 次提交
    • M
      sata_promise: SATA hotplug support, take 2 · a77720ad
      Mikael Pettersson 提交于
      This patch enables hotplugging of SATA devices in the
      sata_promise driver. It's been tested successfully on
      both first- and second-generation Promise SATA chips:
      SATA150 TX2plus, SATAII150 TX2plus, SATAII150 TX4,
      SATA300 TX2plus, and SATA300 TX4.
      
      The only quirk I've seen is that hotplugging (insertion)
      on the first-generation SATA150 TX2plus requires a lengthier
      EH sequence than on the second-generation chips.
      On the second-generation chips a simple soft reset seems
      to suffice, but on the first-generation chip there's a
      "port is slow to respond" after the initial soft reset,
      after which libata issues a hard reset, and then the
      device is recognised.
      
      The hotplug checks are high up in the interrupt handling
      path, not deep down in error_intr as in ahci/sata_sil24.
      That's because the chip doesn't signal hotplug status changes
      in the per-port status register: instead a global register
      contains hotplug control and status flags for all ports.
      I considered following the ahci/sata_sil24 structure, but
      that would have required non-trivial changes to the interrupt
      handling path, so I chose to keep the hotplug changes simple
      and unobtrusive.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      --
      This patch depends on the "sata_promise: cleanups" patch.
      
      Changes since the previous version (posted June 19):
      - Correct pdc_interrupt() to increment 'handled' also in
        the hotplug case. This prevents IRQ_NONE from being
        returned when an interrupt only has hotplug events to
        handle, which could confuse the kernel's IRQ machinery.
      - Added testing on the SATAII150 TX4.
      
       drivers/ata/sata_promise.c |   41 ++++++++++++++++++++++++++++++++++++-----
       1 files changed, 36 insertions(+), 5 deletions(-)
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      a77720ad
  7. 10 7月, 2007 3 次提交
  8. 09 6月, 2007 1 次提交
  9. 25 5月, 2007 1 次提交
  10. 10 5月, 2007 2 次提交
    • M
      sata_promise: SATAII-150/300 TX4 port numbering fix · 5ac2fe57
      Mikael Pettersson 提交于
      There is a known problem with sata_promise on SATAII-150/300 TX4
      controller cards: it enumerates drives in an order that differs
      from the port numbers printed on the controller cards. However,
      Promise's BIOS and Linux driver both get the order right.
      
      I investigated Promise's Linux driver (v1.01.0.23), and found
      that it explicitly changes the mapping from logical port number
      to ATA engine MMIO address on the SATAII TX4 cards. It does this
      on all SATAII TX4 cards, without inspecting revision etc. The
      SATAII TX2plus cards continue to use the same mapping that was
      used for the first-generation chips.
      
      This patch updates sata_promise to use the new port number to
      ATA engine mapping on SATAII TX4 cards, which fixes the drive
      enumeration order problem on those cards. Tested on several
      1st and 2nd generation TX2plus and TX4 chips.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5ac2fe57
    • M
      sata_promise: fix another error decode regression · 8ffcfd9d
      Mikael Pettersson 提交于
      The sata_promise error decode update changed pdc_host_intr()
      to return and not complete the qc after detecting an error.
      Unfortunately not completing the qc:s causes them to always
      time out on error, which is wrong and has nasty side-effects.
      
      This patch updates pdc_error_intr() to call ata_port_abort(),
      similar to ahci and sata_sil24. Doing this is important as it
      makes EH see the original error and not a bogus timeout.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      8ffcfd9d
  11. 29 4月, 2007 7 次提交
    • 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
    • T
      libata: improve AC_ERR_DEV handling for ->post_internal_cmd · a51d644a
      Tejun Heo 提交于
      ->post_internal_cmd is simplified EH for internal commands.  Its
      primary mission is to stop the controller such that no rogue memory
      access or other activities occur after the internal command is
      released.  It may provide error diagnostics by setting qc->err_mask
      but this hasn't been a requirement.
      
      To ignore SETXFER failure for CFA devices, libata needs to know
      whether a command was failed by the device or for any other reason.
      ie. internal command needs to get AC_ERR_DEV right.
      
      This patch makes the following changes to AC_ERR_DEV handling and
      ->post_internal_cmd semantics to accomodate this need and simplify
      callback implementation.
      
      1. As long as the correct bits in the result TF registers are set,
         there is no need to set AC_ERR_DEV explicitly.  libata EH core
         takes care of that for both normal and internal commands.
      
      2. The only requirement for ->post_internal_cmd() is to put the
         controller into quiescent state.  It needs not to set any err_mask.
      
      3. ata_exec_internal_sg() performs minimal error analysis such that
         AC_ERR_DEV is automatically set as long as result_tf is filled
         correctly.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      a51d644a
    • M
      sata_promise: fix error decode regression · ce2d3abc
      Mikael Pettersson 提交于
      Promise ATA ports should always be reset by pdc_reset_port()
      when errors are detected, but the recent error reason decoding
      update to sata_promise replaced that reset with a freeze.
      
      This patch changes the error detection to do a reset again.
      This makes the error decoding update safer, as it now only
      adds error decoding without changing any other behaviour.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      ce2d3abc
    • M
      sata_promise: decode and report error reasons · 176efb05
      Mikael Pettersson 提交于
      This patch adds much needed error reason decoding and
      reporting to sata_promise. It's simplistic but should
      log all relevant error info the controller provides.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      176efb05
    • M
      sata_promise: separate SATA and PATA ops · 724114a5
      Mikael Pettersson 提交于
      This patch changes sata_promise so that the PATA ports
      on TX2plus chips are bound to the pdc_pata_ops structure.
      This means that operations called from the SATA ops
      structures don't need any SATA-vs-PATA tests any more.
      Instead, operations that depend on a port being SATA or
      PATA are separated into different procedures.
      
      * pdc_cable_type() is split into a PATA version and a
        SATA version
      * pdc_error_handler() is split into a PATA version and a
        SATA version, that both call a common version after
        setting up the `hardreset' function pointer
      * pdc_old_check_atapi_dma() is now only used for SATAI
        ports, so is renamed to pdc_old_sata_check_atapi_dma()
        and simplified
      * pdc_sata_scr_{read,write}() are now only used for SATA
        ports, so their is-not-SATA tests are removed
      * pdc_port_start() is split into three procedures: a wrapper
        which performs the ->ops adjustment on TX2plus PATA ports,
        a procedure with the common code, and a procedure with
        the SATA-specific code (this bit might be cleaned up by
        Tejun's new init model)
      
      Tested on 20619, 20575, and 20775 chips.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      724114a5
    • M
      sata_promise: add missing cable_detect hooks · 799331fd
      Mikael Pettersson 提交于
      The recent change which moved cable detection from
      pdc_pre_reset() to the new ->cable_detect hook only
      added the hook for SATAII chips, leaving SATAI chips
      and the 20619 without the hook. Fixed by this patch.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      799331fd
    • A
  12. 26 2月, 2007 3 次提交
  13. 16 2月, 2007 2 次提交
  14. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  15. 10 2月, 2007 9 次提交
    • 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
    • T
      sata_promise: kill qc->nsect · 0feb573f
      Tejun Heo 提交于
      Merge order left qc->nsect usage in sata_promise dangling.  Kill it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      0feb573f
    • M
      sata_promise: handle ATAPI_NODATA ourselves · fba6edbd
      Mikael Pettersson 提交于
      This patch extends sata_promise to handle ATAPI_NODATA
      commands internally. However, commands destined to
      ATA_DFLAG_CDB_INTR devices are excluded from this and
      continue to be returned to libata.
      
      Concrete changes:
      - pdc_atapi_dma_pkt() is renamed to pdc_atapi_pkt(), and is
        extended to set up correct headers for NODATA packets
      - pdc_qc_prep() calls pdc_atapi_pkt() for ATAPI_NODATA
      - pdc_host_intr() handles ATAPI_NODATA
      - pdc_qc_issue_prot() sends ATAPI_NODATA packets via the
        chip's packet mechanism, except for CDB_INTR devices
      
      Tested on first- and second-generation chips, SATAPI and PATAPI,
      with no observable regressions.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      fba6edbd
    • M
      sata_promise: issue ATAPI commands as normal packets · 4113bb6b
      Mikael Pettersson 提交于
      This patch (against libata #upstream + the ATAPI cleanup patch)
      reimplements sata_promise's ATAPI support to format ATAPI DMA
      commands as normal packets, and to issue them via the hardware's
      normal packet machinery.
      
      It turns out that the only reason for issuing ATAPI DMA
      commands via the pdc_issue_atapi_pkt_cmd() procedure was to
      perform two interrupt-fiddling steps for ATA_DFLAG_CDB_INTR
      devices. But these steps aren't needed because sata_promise
      sets ATA_FLAG_PIO_POLLING, which disables DMA for those devices.
      The remaining steps can easily be done in ATA taskfile packets.
      
      Concrete changes:
      - pdc_atapi_dma_pkt() is extended to program all packet setup
        steps, and not just contain the CDB; the sequence of steps
        exactly mirrors what pdc_issue_atapi_pkt_cmd() did
      - pdc_atapi_dma_pkt() needed more parameters: simplify it by
        just passing 'qc' and having it extract the data it needs
      - pdc_issue_atai_pkt_cmd() and its two helper procedures
        pdc_wait_for_drq() and pdc_wait_on_busy() are removed
      
      Tested on first- and second-generation chips, SATAPI and PATAPI,
      with no observable regressions.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4113bb6b
    • M
      sata_promise: ATAPI cleanup · 73fd456b
      Mikael Pettersson 提交于
      Here's a cleanup for yesterday's sata_promise ATAPI patch:
      - add and use a symbolic constant for the altstatus register
      - check return status from ata_busy_wait()
      - add missing newline in a warning printk()
      - update comment in pdc_issue_atapi_pkt_cmd() to clarify
        that the maybe-wait-for-INT issue cannot occur in the
        current driver, but may occur if the driver starts issuing
        ATAPI non-DMA commands as PDC packets
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      73fd456b
    • M
      sata_promise: ATAPI support · 95006188
      Mikael Pettersson 提交于
      This patch adds ATAPI support to the sata_promise driver.
      This has been tested on both first- and second-generation
      chips (20378 and 20575), and with both SATAPI and PATAPI
      devices. CD-writing works.
      
      SATAPI DMA works on second-generation chips, but on
      first-generation chips SATAPI is limited to PIO due
      to what appears to be HW limitations.
      PATAPI DMA works on both first- and second-generation
      chips, but requires the separate PATA support patch
      before it can be used on TX2plus chips.
      
      The functional changes to the driver are:
      - remove ATA_FLAG_NO_ATAPI from PDC_COMMON_FLAGS
      - add ->check_atapi_dma() operation to enable DMA for bulk data
        transfers but force PIO for other ATAPI commands; this filter
        is from Promise's driver and largely matches pata_pdc207x.c
      - use a more restrictive ->check_atapi_dma() on first-generation
        chips to force SATAPI to always use PIO
      - add handling of ATAPI protocols to pdc_qc_prep(), pdc_host_intr(),
        and pdc_qc_issue_prot(): ATAPI_DMA is handled by the driver
        while non-DMA protocols are handed over to libata generic code
      - add pdc_issue_atapi_pkt_cmd() to handle the initial steps in
        issuing ATAPI DMA commands before sending the actual CDB;
        this procedure was ported from Promise's driver
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      95006188
    • M
      sata_promise: TX2plus PATA support · 870ae337
      Mikael Pettersson 提交于
      This patch implements a simple way of setting up per-port
      flags on the SATA+PATA Promise TX2plus chips, which is a
      prerequisite for supporting the PATA port on those chips.
      
      It is based on the observation that ap->flags isn't really
      used until after ->port_start() has been invoked. So it
      places the "exceptional" per-port flags array in the driver's
      private host structure, and uses it in ->port_start() to
      finalise the port's flags.
      
      This patch obsoletes the #promise-sata-pata branch included
      in the #all branch.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      870ae337
  16. 07 12月, 2006 1 次提交
    • M
      [PATCH] sata_promise: new EH conversion, take 2 · 25b93d81
      Mikael Pettersson 提交于
      This patch converts sata_promise to use new-style libata error
      handling on Promise SATA chips, for both SATA and PATA ports.
      
      * ATA_FLAG_SRST is no longer set
      * ->phy_reset is no longer set as it is unused when ->error_handler
         is present, and pdc_sata_phy_reset() has been removed
      * pdc_freeze() masks interrupts and halts DMA via PDC_CTLSTAT
      * pdc_thaw() clears interrupt status in PDC_INT_SEQMASK and then
        unmasks interrupts in PDC_CTLSTAT
      * pdc_error_handler() reinitialises the port if it isn't frozen,
        and then invokes ata_do_eh() with standard {s,}ata reset methods
      * pdc_post_internal_cmd() resets the port in case of errors
      * the PATA-only 20619 chip continues to use old-style EH:
        not by necessity but simply because I don't have documentation
        for it or any way to test it
      
      Since the previous version pdc_error_handler() has been rewritten
      and it now mostly matches ahci and sata_sil24. In case anyone
      wonders: the call to pdc_reset_port() isn't a heavy-duty reset,
      it's a light-weight reset to quickly put a port into a sane state.
      
      The discussion about the PCI flushes in pdc_freeze() and pdc_thaw()
      seemed to end with a consensus that the flushes are OK and not
      obviously redundant, so I decided to keep them for now.
      
      This patch was prepared against 2.6.19-git7, but it also applies
      to 2.6.19 + libata #upstream, with or without the revised sata_promise
      cleanup patch I recently submitted.
      
      This patch does conflict with the #promise-sata-pata patch:
      this patch removes pdc_sata_phy_reset() while #promise-sata-pata
      modifies it. The correct patch resolution is to remove the function.
      
      Tested on 2037x and 2057x chips, with PATA patches on top and disks
      on both SATA and PATA ports.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      25b93d81