An error occurred fetching the project authors.
  1. 07 Dec, 2007 2 commits
  2. 04 Dec, 2007 1 commit
  3. 29 Oct, 2007 3 commits
    • Kristen Carlson Accardi's avatar
      [libata] AHCI: add hw link power management support · 31556594
      Kristen Carlson Accardi authored
      This patch will set the correct bits to turn on Aggressive
      Link Power Management (ALPM) for the ahci driver.  This
      will cause the controller and disk to negotiate a lower
      power state for the link when there is no activity (see
      the AHCI 1.x spec for details).  This feature is mutually
      exclusive with Hot Plug, so when ALPM is enabled, Hot Plug
      is disabled.  ALPM will be enabled by default, but it is
      settable via the scsi host syfs interface.  Possible
      settings for this feature are:
      
      Setting         Effect
      ----------------------------------------------------------
      min_power       ALPM is enabled, and link set to enter
                      lowest power state (SLUMBER) when idle
                      Hot plug not allowed.
      
      max_performance ALPM is disabled, Hot Plug is allowed
      
      medium_power    ALPM is enabled, and link set to enter
                      second lowest power state (PARTIAL) when
                      idle.  Hot plug not allowed.
      Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      31556594
    • Jeff Garzik's avatar
      [libata] AHCI: fix newly introduced host-reset bug · ab6fc95f
      Jeff Garzik authored
      The recent fix to host reset introduced a problem, whereby AHCI-enable
      bit would be cleared upon reset, if it was not asserted prior to reset.
      
      Unconditionally enable AHCI-enable bit.
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      ab6fc95f
    • Tejun Heo's avatar
      libata: implement ata_wait_after_reset() · 88ff6eaf
      Tejun Heo authored
      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: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      88ff6eaf
  4. 25 Oct, 2007 1 commit
    • Tejun Heo's avatar
      ahci: ahci: implement workaround for ASUS P5W-DH Deluxe ahci_broken_hardreset(), take #2 · edc93052
      Tejun Heo authored
      P5W-DH Deluxe has ICH9 which doesn't have PMP support but SIMG 4726
      hardwired to the second port of AHCI controller at PCI device 1f.2.
      The 4726 doesn't work as PMP but as a storage processor which can do
      hardware RAID on downstream ports.
      
      When no device is attached to the downstream port of the 4726, pseudo
      ATA device for configuration appears.  Unfortunately, ATA emulation on
      the device is very lousy and causes long hang during boot.
      
      This patch implements workaround for the board.  If the mainboard is
      P5W-DH Deluxe (matched using DMI), only hardreset is used on the
      second port of AHCI controller @ 1f.2 and the hardreset doesn't depend
      on receiving the first FIS and just proceed to IDENTIFY.
      
      This workaround fixes bugzilla #8923.
      
        http://bugzilla.kernel.org/show_bug.cgi?id=8923Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      edc93052
  5. 24 Oct, 2007 1 commit
  6. 19 Oct, 2007 1 commit
  7. 12 Oct, 2007 23 commits
    • Tejun Heo's avatar
      libata: use ata_exec_internal() for PMP register access · b06ce3e5
      Tejun Heo authored
      PMP registers used to be accessed with dedicated accessors ->pmp_read
      and ->pmp_write.  During reset, those callbacks are called with the
      port frozen so they should be able to run without depending on
      interrupt delivery.  To achieve this, they were implemented polling.
      
      However, as resetting the host port makes the PMP to isolate fan-out
      ports until SError.X is cleared, resetting fan-out ports while port is
      frozen doesn't buy much additional safety.
      
      This patch updates libata PMP support such that PMP registers are
      accessed using regular ata_exec_internal() mechanism and kills
      ->pmp_read/write() callbacks.  The following changes are made.
      
      * PMP access helpers - sata_pmp_read_init_tf(), sata_pmp_read_val(),
        sata_pmp_write_init_tf() are folded into sata_pmp_read/write() which
        are now standalone PMP register access functions.
      
      * sata_pmp_read/write() returns err_mask instead of rc.  This is
        consistent with other functions which issue internal commands and
        allows more detailed error reporting.
      
      * ahci interrupt handler is modified to ignore BAD_PMP and
        spurious/illegal completion IRQs while reset is in progress.  These
        conditions are expected during reset.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      b06ce3e5
    • Tejun Heo's avatar
      ahci: fix notification handling · 5f226c6b
      Tejun Heo authored
      Asynchronous notification on ICH9 didn't work because it didn't write
      AN FIS into the RX area - it only updates SNotification.  Also,
      snooping SDB_FIS RX area is racy against further SDB FIS receptions.
      Let sata_async_notification() determine using SNTF if it's available
      and snoop RX area iff SNTF isn't available
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      5f226c6b
    • Tejun Heo's avatar
      ahci: clean up PORT_IRQ_BAD_PMP enabling · 1c954a4d
      Tejun Heo authored
      Now that we have pp->intr_mask, move PORT_IRQ_BAD_PMP enabling to
      ahci_pmp_attach/detach() where it belongs.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      1c954a4d
    • Tejun Heo's avatar
      ahci: kill leftover from enabling NCQ over PMP · 75da6d2b
      Tejun Heo authored
      ahci had problems with NCQ over PMP and NCQ used to be disabled while
      PMP was attached.  After fixing the problem, the temporary NCQ
      disabling code wasn't removed completely.  Kill the remaining piece.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      75da6d2b
    • Peer Chen's avatar
      ahci: Add MCP79 support to AHCI driver · 7100819f
      Peer Chen authored
      Signed-off-by: default avatarPeer Chen <peerchen@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      7100819f
    • Tejun Heo's avatar
      ahci: implement AHCI_HFLAG_NO_PMP · 6949b914
      Tejun Heo authored
      Of course some controllers lie about PMP support.  Black list them.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      6949b914
    • Tejun Heo's avatar
      ahci: move host flags over to pi.private_data · 417a1a6d
      Tejun Heo authored
      Private pi.flags area is full and we need more private flags.  Move
      host private flags over to pi.private_data.  During initialization,
      these flags are copied to hpriv->flags.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      417a1a6d
    • Tejun Heo's avatar
      ahci: implement PMP support · 7d50b60b
      Tejun Heo authored
      Implement AHCI PMP support.  ahci only supports command based
      switching.  Also, for some reason, NCQ over PMP doesn't work now.
      Other than that, everything works.
      
      Tested on ICH9R, JMB360/363 + SIMG3726, 4726 and 5744.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Cc: Forrest Zhao <forrest.zhao@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      7d50b60b
    • Jeff Garzik's avatar
      [libata] AHCI: enable AHCI mode, before using AHCI reset · 3cc3eb11
      Jeff Garzik authored
      AHCI spec says host-reset bit may only be set when the ahci-enable bit
      is also set.
      
      Noticed by Peer Chen <peerchen@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      3cc3eb11
    • Tejun Heo's avatar
      libata-pmp-prep: implement sata_async_notification() · 7d77b247
      Tejun Heo authored
      AN serves multiple purposes.  For ATAPI, it's used for media change
      notification.  For PMP, for downstream PHY status change notification.
      Implement sata_async_notification() which demultiplexes AN.
      
      To avoid unnecessary port events, ATAPI AN is not enabled if PMP is
      attached but SNTF is not available.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Cc: Kriten Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      7d77b247
    • Tejun Heo's avatar
      libata-pmp-prep: implement ops->qc_defer() · 31cc23b3
      Tejun Heo authored
      Controllers which support PMP have various restrictions on which
      combinations of commands are allowed to what number of devices
      concurrently.  This patch implements ops->qc_defer() which determines
      whether a qc can be issued at the moment or should be deferred.
      
      If the function returns ATA_DEFER_LINK, the qc will be deferred until
      a qc completes on the link.  If ATA_DEFER_PORT, until a qc completes
      on any link.  The defer conditions are advisory and in general
      ATA_DEFER_LINK can be considered as lower priority deferring than
      ATA_DEFER_PORT.
      
      ops->qc_defer() replaces fixed ata_scmd_need_defer().  For standard
      NCQ/non-NCQ exclusion, ata_std_qc_defer() is implemented.  ahci and
      sata_sil24 are converted to use ata_std_qc_defer().
      
      ops->qc_defer() is heavier than the original mechanism because full qc
      is prepped before determining to defer it, but various information is
      needed to determine defer conditinos and fully translating a qc is the
      only way to supply such information in generic manner.
      
      IMHO, this shouldn't cause any noticeable performance issues as
      
      * for most cases deferring occurs rarely (except for NCQ-aware
        cmd-switching PMP)
      * translation itself isn't that expensive
      * once deferred the command won't be repeated until another command
        completes which usually is a very long time cpu-wise.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      31cc23b3
    • Tejun Heo's avatar
      libata: misc updates for AN · 854c73a2
      Tejun Heo authored
      Update AN support in preparation of PMP support.
      
      * s/ata_id_has_AN/ata_id_has_atapi_AN/
      * add AN enabled reporting during configuration
      * add err_mask to AN configuration failure reporting
      * update LOCKING comment for ata_scsi_media_change_notify()
      * check whether ATA dev is attached to SCSI dev ata_scsi_media_change_notify()
      * set ATA_FLAG_AN in ahci and sata_sil24
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Cc: Kriten Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      854c73a2
    • Jason Gaston's avatar
      d4155e6f
    • Tejun Heo's avatar
      ahci: reimplement port_map handling · 7a234aff
      Tejun Heo authored
      Reimplement port_map handling such that
      
      1. Non-zero PORTS_IMPL value is always examined and used if consistent
         with cap.n_ports.
      
      2. When PI and cat.n_ports are inconsistent, honor cap.n_ports and
         force port_map to be ((1 << cap.n_ports) - 1).
      
      3. There were two separate places dealing with port_map.  Unify them
         to one.
      
      As all newer ahci chips seem to get PI correct and older ones usually
      have zero PI.  Controllers with holes in PI are very unlikely to screw
      up PI, so #2 makes more sense than following inconsistent PI.
      
      Without this change, not setting ATA_FLAG_HONOR_PI when it's needed
      results in weird detection failure.  This changed logic should be able
      to handle all known cases correctly automatically.
      
      Verified on ICH6 (reports 0 PI), ICH8 (with holes in port_map), ICH9,
      JMB360 and JMB363.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      7a234aff
    • Tejun Heo's avatar
      libata: implement and use ata_port_desc() to report port configuration · cbcdd875
      Tejun Heo authored
      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: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      cbcdd875
    • Jeff Garzik's avatar
      [libata] Remove ->port_disable() hook · ac8869d5
      Jeff Garzik authored
      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: default avatarJeff Garzik <jeff@garzik.org>
      ac8869d5
    • Jeff Garzik's avatar
      [libata] Remove ->irq_ack() hook, and ata_dummy_irq_on() · 6d32d30f
      Jeff Garzik authored
      * ->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: default avatarJeff Garzik <jeff@garzik.org>
      6d32d30f
    • Kristen Carlson Accardi's avatar
      ahci: Store interrupt value · a7384925
      Kristen Carlson Accardi authored
      Use a stored value for which interrupts to enable.  Changing this allows
      us to selectively turn off certain interrupts later and have them
      stay off.
      Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      a7384925
    • Kristen Carlson Accardi's avatar
      [libata] ahci: send event when AN received · 2f294968
      Kristen Carlson Accardi authored
      When we get an SDB FIS with the 'N' bit set, we should send
      an event to user space to indicate that there has been a
      media change.  This will be done via the scsi device.
      Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      2f294968
    • Tejun Heo's avatar
      libata-link: make two port flags HRST_TO_RESUME and SKIP_D2H_BSY link flags · 0c88758b
      Tejun Heo authored
      HRST_TO_RESUME and SKIP_D2H_BSY are link attributes.  Move them to
      ata_link->flags.  This will allow host and PMP links to have different
      attributes.  ata_port_info->link_flags is added and used by LLDs to
      specify these flags during initialization.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      0c88758b
    • Tejun Heo's avatar
      libata-link: linkify reset · cc0680a5
      Tejun Heo authored
      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: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      cc0680a5
    • Tejun Heo's avatar
      libata-link: linkify PHY-related functions · 936fd732
      Tejun Heo authored
      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: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      936fd732
    • Tejun Heo's avatar
      libata-link: introduce ata_link · 9af5c9c9
      Tejun Heo authored
      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: default avatarTejun Heo <htejun@gmail.com>
      Cc: James Bottomley <James.Bottomley@SteelEye.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      9af5c9c9
  8. 20 Sep, 2007 1 commit
  9. 20 Jul, 2007 7 commits