1. 18 9月, 2009 2 次提交
    • M
      sata_promise: update reset code · ff7cddf5
      Mikael Pettersson 提交于
      sata_promise's reset code has deviated quite a bit from
      the Promise reference driver's, and it has been observed
      to fail to recover from errors in some cases.
      
      This patch thus updates the reset code to more closely
      match the reference driver:
      
      - soft reset (pdc_reset_port):
        * wait for ATA engine to not be in packet command mode
          (2nd gen only)
        * write reset bit in PDC_CTLSTAT before the first read
          in the loop
        * for 2nd gen SATA follow up with FPDMA reset and clearing
          error status registers
      - hard reset (pdc_sata_hardreset):
        * wait for ATA engine to not be in packet command mode
          (2nd gen only)
        * reset ATA engine via the PCI control register
        * Tejun's change to use non-waiting hardreset + follow-up SRST
      
      I'm not changing the hotplug mask bits since they are taken care
      of by sata_promise's ->freeze() and ->thaw() operations. And I'm
      not writing the PMP port # because that's always zero (for now).
      
      Tested here on various controllers. In particular, one disk
      which used to timeout and fail to recover from certain hdparm
      and smartmonctl commands now works nicely.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ff7cddf5
    • M
      sata_promise: disable hotplug on 1st gen chips · 0ae6654d
      Mikael Pettersson 提交于
      1st generation Promise SATA chips are prone to generating spurious
      hotplug events which can disrupt normal operation. This has been
      observed on 20376 and 20378 chips. This patch thus disables hotplug
      support on 1st gen chips while leaving it enabled for 2nd gen chips.
      
      The pdc_sata_hotplug_offset() function becomes redundant so it is
      removed.
      
      Tested on 1st gen 20376 and 20378 mainboard chips and on a 2nd gen
      SATA300 PCI card.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Tested-by: NKurt Roeckx <kurt@roeckx.be>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      0ae6654d
  2. 25 3月, 2009 2 次提交
  3. 04 11月, 2008 1 次提交
    • M
      sata_promise: add ATA engine reset to reset ops · cadef677
      Mikael Pettersson 提交于
      Promise ATA engines need to be reset when errors occur.
      That's currently done for errors detected by sata_promise itself,
      but it's not done for errors like timeouts detected outside of
      the low-level driver.
      
      The effect of this omission is that a timeout tends to result
      in a sequence of failed COMRESETs after which libata EH gives
      up and disables the port. At that point the port's ATA engine
      hangs and even reloading the driver will not resume it.
      
      To fix this, make sata_promise override ->hardreset on SATA
      ports with code which calls pdc_reset_port() on the port in
      question before calling libata's hardreset. PATA ports don't
      use ->hardreset, so for those we override ->softreset instead.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      cadef677
  4. 29 9月, 2008 1 次提交
    • T
      libata: make SCR access ops per-link · 82ef04fb
      Tejun Heo 提交于
      Logically, SCR access ops should take @link; however, there was no
      compelling reason to convert all SCR access ops when adding @link
      abstraction as there's one-to-one mapping between a port and a non-PMP
      link.  However, that assumption won't hold anymore with the scheduled
      addition of slave link.
      
      Make SCR access ops per-link.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      82ef04fb
  5. 20 5月, 2008 3 次提交
    • M
      sata_promise: other cleanups · 7715a6f9
      Mikael Pettersson 提交于
      Minor coding-style fixes for sata_promise:
      - remove stray blank lines
      - fix checkpatch.pl errors; warnings about long lines
        remain, but I don't intend to address those at this time
      - remove two inline directives: neither is essential and
        both functions are trivially inlinable anyway by virtue
        of being static and having a single unique call site
      - fix comment in pdc_interrupt(): the bits in PDC_INT_SEQMASK
        denote SEQIDs not tags, the distinction becomes important
        when NCQ gets implemented
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      7715a6f9
    • M
      sata_promise: mmio access cleanups · 821d22cd
      Mikael Pettersson 提交于
      This patch cleans up sata_promise's mmio accesses.
      
      In sata_promise there are three distinct mmio address spaces:
      1. global registers, offsets from host->iomap[PDC_MMIO_BAR]
      2. per-port ATA registers, offsets from ap->ioaddr.cmd_addr
      3. per-port SATA registers, offsets from ap->ioaddr.scr_addr
      
      The driver currently often fails to indicate which address space
      a given mmio base pointer refers to, which is a source of bugs
      and confusion (see recent pdc_thaw() irq clearing bug; it's also
      been an obstacle for the pending NCQ extensions).
      
      To reduce these problems, adopt a coding style where the name of
      a base pointer always indicates which address space it refers to:
      1. global registers: host_mmio
      2. per-port ATA registers: ata_mmio
      3. per-port SATA registers: sata_mmio
      
      Also rearrange register offset definitions to clearly indicate
      which address space they belong to, and add a symbolic definition
      for the previously hard-coded PHYMODE4 register.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      821d22cd
    • M
      sata_promise: fix irq clearing buglets · a13db78e
      Mikael Pettersson 提交于
      This patch fixes two bugs in sata_promise's irq status clearing paths:
      1. When clearing the irq status for a specific port, the driver
         read the global SEQMASK register. This is wrong because that
         clears the irq status for _all_ ports.
      2. pdc_thaw() incorrectly added the PDC_INT_SEQMASK host register
         offset to a per-port ata engine base address. This resulted in
         it reading the unrelated PDC_PKT_SUBMIT register, which did not
         have the desired irq status clearing effect.
      
      In both cases the fix is to read from the port's Command/Status
      register. This also matches what Promise's own driver does.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      a13db78e
  6. 18 4月, 2008 6 次提交
    • T
      libata: rename SFF port ops · 5682ed33
      Tejun Heo 提交于
      Add sff_ prefix to SFF specific port ops.
      
      This rename is in preparation of separating SFF support out of libata
      core layer.  This patch strictly renames ops and doesn't introduce any
      behavior difference.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      5682ed33
    • T
      libata: rename SFF functions · 9363c382
      Tejun Heo 提交于
      SFF functions have confusing names.  Some have sff prefix, some have
      bmdma, some std, some pci and some none.  Unify the naming by...
      
      * SFF functions which are common to both BMDMA and non-BMDMA are
        prefixed with ata_sff_.
      
      * SFF functions which are specific to BMDMA are prefixed with
        ata_bmdma_.
      
      * SFF functions which are specific to PCI but apply to both BMDMA and
        non-BMDMA are prefixed with ata_pci_sff_.
      
      * SFF functions which are specific to PCI and BMDMA are prefixed with
        ata_pci_bmdma_.
      
      * Drop generic prefixes from LLD specific routines.  For example,
        bfin_std_dev_select -> bfin_dev_select.
      
      The following renames are noteworthy.
      
        ata_qc_issue_prot() -> ata_sff_qc_issue()
        ata_pci_default_filter() -> ata_bmdma_mode_filter()
        ata_dev_try_classify() -> ata_sff_dev_classify()
      
      This rename is in preparation of separating SFF support out of libata
      core layer.  This patch strictly renames functions and doesn't
      introduce any behavior difference.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      9363c382
    • A
      libata annotations · 826cd156
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      826cd156
    • T
      libata: make reset related methods proper port operations · a1efdaba
      Tejun Heo 提交于
      Currently reset methods are not specified directly in the
      ata_port_operations table.  If a LLD wants to use custom reset
      methods, it should construct and use a error_handler which uses those
      reset methods.  It's done this way for two reasons.
      
      First, the ops table already contained too many methods and adding
      four more of them would noticeably increase the amount of necessary
      boilerplate code all over low level drivers.
      
      Second, as ->error_handler uses those reset methods, it can get
      confusing.  ie. By overriding ->error_handler, those reset ops can be
      made useless making layering a bit hazy.
      
      Now that ops table uses inheritance, the first problem doesn't exist
      anymore.  The second isn't completely solved but is relieved by
      providing default values - most drivers can just override what it has
      implemented and don't have to concern itself about higher level
      callbacks.  In fact, there currently is no driver which actually
      modifies error handling behavior.  Drivers which override
      ->error_handler just wraps the standard error handler only to prepare
      the controller for EH.  I don't think making ops layering strict has
      any noticeable benefit.
      
      This patch makes ->prereset, ->softreset, ->hardreset, ->postreset and
      their PMP counterparts propoer ops.  Default ops are provided in the
      base ops tables and drivers are converted to override individual reset
      methods instead of creating custom error_handler.
      
      * ata_std_error_handler() doesn't use sata_std_hardreset() if SCRs
        aren't accessible.  sata_promise doesn't need to use separate
        error_handlers for PATA and SATA anymore.
      
      * softreset is broken for sata_inic162x and sata_sx4.  As libata now
        always prefers hardreset, this doesn't really matter but the ops are
        forced to NULL using ATA_OP_NULL for documentation purpose.
      
      * pata_hpt374 needs to use different prereset for the first and second
        PCI functions.  This used to be done by branching from
        hpt374_error_handler().  The proper way to do this is to use
        separate ops and port_info tables for each function.  Converted.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      a1efdaba
    • T
      libata: implement and use ops inheritance · 029cfd6b
      Tejun Heo 提交于
      libata lets low level drivers build ata_port_operations table and
      register it with libata core layer.  This allows low level drivers
      high level of flexibility but also burdens them with lots of
      boilerplate entries.
      
      This becomes worse for drivers which support related similar
      controllers which differ slightly.  They share most of the operations
      except for a few.  However, the driver still needs to list all
      operations for each variant.  This results in large number of
      duplicate entries, which is not only inefficient but also error-prone
      as it becomes very difficult to tell what the actual differences are.
      
      This duplicate boilerplates all over the low level drivers also make
      updating the core layer exteremely difficult and error-prone.  When
      compounded with multi-branched development model, it ends up
      accumulating inconsistencies over time.  Some of those inconsistencies
      cause immediate problems and fixed.  Others just remain there dormant
      making maintenance increasingly difficult.
      
      To rectify the problem, this patch implements ata_port_operations
      inheritance.  To allow LLDs to easily re-use their own ops tables
      overriding only specific methods, this patch implements poor man's
      class inheritance.  An ops table has ->inherits field which can be set
      to any ops table as long as it doesn't create a loop.  When the host
      is started, the inheritance chain is followed and any operation which
      isn't specified is taken from the nearest ancestor which has it
      specified.  This operation is called finalization and done only once
      per an ops table and the LLD doesn't have to do anything special about
      it other than making the ops table non-const such that libata can
      update it.
      
      libata provides four base ops tables lower drivers can inherit from -
      base, sata, pmp, sff and bmdma.  To avoid overriding these ops
      accidentaly, these ops are declared const and LLDs should always
      inherit these instead of using them directly.
      
      After finalization, all the ops table are identical before and after
      the patch except for setting .irq_handler to ata_interrupt in drivers
      which didn't use to.  The .irq_handler doesn't have any actual effect
      and the field will soon be removed by later patch.
      
      * sata_sx4 is still using old style EH and currently doesn't take
        advantage of ops inheritance.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      029cfd6b
    • T
      libata: implement and use SHT initializers · 68d1d07b
      Tejun Heo 提交于
      libata lets low level drivers build scsi_host_template and register it
      to the SCSI layer.  This allows low level drivers high level of
      flexibility but also burdens them with lots of boilerplate entries.
      
      This patch implements SHT initializers which can be used to initialize
      all the boilerplate entries in a sht.  Three variants of them are
      implemented - BASE, BMDMA and NCQ - for different types of drivers.
      Note that entries can be overriden by putting individual initializers
      after the helper macro.
      
      All sht tables are identical before and after this patch.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      68d1d07b
  7. 25 3月, 2008 1 次提交
    • M
      sata_promise: fix hardreset hotplug events, take 2 · c07a9c49
      Mikael Pettersson 提交于
      A Promise SATA controller will signal hotplug events when a hard
      reset (COMRESET) is done on a port. These events aren't masked by
      the driver, and the unexpected interrupts will cause a sequence
      of failed reset attempts util libata's EH finally gives up.
      
      This has not been a common problem so far, but the pending libata
      hardreset-by-default changes makes it a critical issue.
      
      The solution is to disable hotplug events before a reset, and to
      reenable them afterwards. (Promise's driver does this too.)
      
      This patch adds SATA-specific versions of ->freeze() and ->thaw()
      that also disable and enable hotplug events. PATA ports continue
      to use the old versions of ->freeze() and ->thaw().
      
      Accesses to the hotplug register must be serialised via host->lock.
      We rely on ap->lock == &ap->host->lock and that libata takes this
      lock before ->freeze() and ->thaw(). Document this requirement.
      The interrupt handler is adjusted so its hotplug register accesses
      are inside the region protected by host->lock.
      
      Tested on various chips (SATA300TX4, SATA300TX2plus, SATAII150TX4,
      FastTrack TX4000) with various combinations of SATA and PATA disks,
      with and without the pending hardreset-by-default changes.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Acked-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      c07a9c49
  8. 16 2月, 2008 1 次提交
  9. 23 1月, 2008 3 次提交
    • T
      libata: convert to chained sg · ff2aeb1e
      Tejun Heo 提交于
      libata used private sg iterator to handle padding sg.  Now that sg can
      be chained, padding can be handled using standard sg ops.  Convert to
      chained sg.
      
      * s/qc->__sg/qc->sg/
      
      * s/qc->pad_sgent/qc->extra_sg[]/.  Because chaining consumes one sg
        entry.  There need to be two extra sg entries.  The renaming is also
        for future addition of other extra sg entries.
      
      * Padding setup is moved into ata_sg_setup_extra() which is organized
        in a way that future addition of other extra sg entries is easy.
      
      * qc->orig_n_elem is unused and removed.
      
      * qc->n_elem now contains the number of sg entries that LLDs should
        map.  qc->mapped_n_elem is added to carry the original number of
        mapped sgs for unmapping.
      
      * The last sg of the original sg list is used to chain to extra sg
        list.  The original last sg is pointed to by qc->last_sg and the
        content is stored in qc->saved_last_sg.  It's restored during
        ata_sg_clean().
      
      * All sg walking code has been updated.  Unnecessary assertions and
        checks for conditions the core layer already guarantees are removed.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      ff2aeb1e
    • T
      libata: rename ATA_PROT_ATAPI_* to ATAPI_PROT_* · 0dc36888
      Tejun Heo 提交于
      ATA_PROT_ATAPI_* are ugly and naming schemes between ATA_PROT_* and
      ATA_PROT_ATAPI_* are inconsistent causing confusion.  Rename them to
      ATAPI_PROT_* and make them consistent with ATA counterpart.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      0dc36888
    • T
      sata_promise: make pdc_atapi_pkt() use values from qc->tf · 46a67143
      Tejun Heo 提交于
      Make pdc_atapi_pkt() use values from qc->tf instead of creating its
      own.  This is to ease future ATAPI handling changes.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Mikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      46a67143
  10. 03 11月, 2007 1 次提交
    • M
      sata_promise: fix endianess bug in ASIC PRD bug workaround · 03116d67
      Mikael Pettersson 提交于
      The original workaround for the Promise ASIC PRD bug
      contained an endianess bug which I failed to detect:
      the adjustment of the last PRD entry's length field
      applied host arithmetic to little-endian data, which
      is incorrect on big-endian machines.
      
      We have the length available in host-endian format, so
      do the adjustment on host-endian data and then convert
      and store it in the PRD entry's little-endian data field.
      
      Thanks to an anonymous reviewer for detecting this bug.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      03116d67
  11. 30 10月, 2007 2 次提交
    • M
      sata_promise: cleanups · 5595ddf9
      Mikael Pettersson 提交于
      Minor sata_promise cleanups:
      - use C99 array initialisers in pdc_port_info[]
      - add myself in the file head's Maintained by note,
        since users don't always read the MAINTAINERS file
      - SG/PRD bug workaround warrants driver version bump
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      --
       drivers/ata/sata_promise.c |   17 +++++++++--------
       1 files changed, 9 insertions(+), 8 deletions(-)
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5595ddf9
    • 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
  12. 29 10月, 2007 1 次提交
  13. 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
  14. 31 8月, 2007 1 次提交
  15. 20 7月, 2007 1 次提交
  16. 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
  17. 10 7月, 2007 3 次提交
  18. 09 6月, 2007 1 次提交
  19. 25 5月, 2007 1 次提交
  20. 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
  21. 29 4月, 2007 1 次提交
    • 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