1. 24 2月, 2008 1 次提交
    • M
      libata-pmp: clear hob for pmp register accesses · 39f25e70
      Mark Lord 提交于
      >> Mark Lord wrote:
      >>> Tejun, I've added PMP to sata_mv, and am now trying to get it
      >>> to work with a Marvell PM attached.
      
      > >>> And the behaviour I see is very bizarre.
      
      >>> After hard+soft resets, the PM signature is found,
      >>> and libata interrogates the PM registers.
      >>>
      >>> It successfully reads register 0, and then register 1.
      >>> But all subsequent registers read out (incorrectly) as zeros.
      ...
      
      This behavior has been confirmed by Marvell with a SATA analyzer.
      The Marvell port-multiplier apparently likes to see clean HOB
      information when accessing PMP registers.
      
      Since sata_mv uses PIO shadow register access, this doesn't happen
      automatically, as it might in a more purely FIS-based driver (eg. ahci).
      
      One way to fix this is to flag these commands with ATA_TFLAG_LBA48,
      forcing libata to write out the HOB fields with known (zero) values.
      Signed-off-by: NSaeed Bishara <saeed@marvell.com>
      Acked-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      39f25e70
  2. 11 1月, 2008 1 次提交
  3. 13 10月, 2007 4 次提交
    • T
      libata: use ata_exec_internal() for PMP register access · b06ce3e5
      Tejun Heo 提交于
      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: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b06ce3e5
    • T
      libata-pmp: implement qc_defer for command switching PMP support · 31f88384
      Tejun Heo 提交于
      Implement sata_pmp_qc_defer_cmd_switch() - standard qc_defer for
      command switching PMP support.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      31f88384
    • T
      libata-pmp: extend ACPI support to cover PMP · d0df8b5d
      Tejun Heo 提交于
      Extend ata_acpi_associate_sata_port() such that it can handle PMP and
      call it when PMP is attached and detached.
      
      Build breakage when !CONFIG_ATA_ACPI was spotted and fixed by Petr
      Vandrovec.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Petr Vandrovec <petr@vandrovec.name>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d0df8b5d
    • T
      libata-pmp: implement Port Multiplier support · 3af9a77a
      Tejun Heo 提交于
      Implement Port Multiplier support.  To support PMP, a LLDD has to
      supply ops->pmp_read() and pmp_write().  If non-null, ->pmp_attach and
      ->pmp_detach are called on PMP attach and detach, respectively.
      
      ->pmp_read/write() can be called while the port is frozen, so they
      must be implemented by polling.  This patch supplies several helpers
      to ease ->pmp_read/write() implementation.
      
      Also, irq_handler and error_handler must be PMP aware.  Most of PMP
      aware EH can be done by calling ata_pmp_do_eh() with appropriate
      methods.  PMP EH uses separate set of reset methods and this patch
      implements standard prereset, hardreset and postreset methods.
      
      This patch only implements PMP support.  The next patch will integrate
      PMP into the reset of libata and thus enable PMP support.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      3af9a77a