1. 11 2月, 2007 33 次提交
  2. 10 2月, 2007 7 次提交
    • J
      libata: kill ATA_ENABLE_PATA · 66efc5a7
      Jeff Garzik 提交于
      The ATA_ENABLE_PATA define was never meant to be permanent, and in
      recent kernels, it's already been unconditionally enabled.  Remove.
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      66efc5a7
    • J
      libata: build fix after dmesg probe output changes · 591a6e8e
      Jeff Garzik 提交于
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      591a6e8e
    • A
      libata: Early CFA adapters are not required to support mode setting · 11750a40
      Alan 提交于
      If we are doing a PIO setup for a CFA card and it blows up with a device
      error then assume it is an older CFA card which doesn't support this
      rather than failing the device out of existance.
      
      Stands seperate to the quieting patch but that is obviously useful with
      this change.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      11750a40
    • R
      sata_nv: propagate ata_pci_device_do_resume return value · ce053fa8
      Robert Hancock 提交于
      ata_pci_device_do_resume can fail if the PCI device couldn't be re-enabled.
       Update sata_nv to propagate the return value from this call and to not try
      to do any other resume activities if it fails.  Fixes a compile warning.
      Signed-off-by: NRobert Hancock <hancockr@shaw.ca>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      ce053fa8
    • R
      sata_nv: wait for response on entering/leaving ADMA mode · a2cfe81a
      Robert Hancock 提交于
      Update sata_nv to wait for the controller to indicate via the status
      register that it has entered the requested state when switching between
      ADMA mode and register mode.  This issue came up recently when debugging
      some problems with cache flush command timeouts and while it didn't appear
      to fix that problem, this is something we should likely be doing in any
      case.
      Signed-off-by: NRobert Hancock <hancockr@shaw.ca>
      Cc: Tejun Heo <htejun@gmail.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      a2cfe81a
    • R
      sata_nv: use ADMA for NODATA commands · 382a6652
      Robert Hancock 提交于
      Some problems showed up recently with cache flush commands timing out on
      sata_nv.  Previously these commands were always handled by transitioning to
      legacy mode from ADMA mode first.  The timeout problem was worked around
      already by a change to the interrupt handling code for legacy mode, but for
      non-data commands like these it appears we can handle them in ADMA mode, so
      the switch to legacy mode is not needed.
      
      This patch changes the behavior so that we use ADMA mode to submit
      interrupt-driven commands with ATA_PROT_NODATA protocol.  In addition to
      avoiding the problem mentioned above entirely, this avoids the overhead of
      switching to legacy mode and back to ADMA mode for handling cache flushes.
      When handling non-DMA-mapped commands, we leave the APRD blank and clear
      the NV_CPB_CTL_APRD_VALID field in the CPB so the controller does not
      attempt to read it.
      Signed-off-by: NRobert Hancock <hancockr@shaw.ca>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      382a6652
    • R
      sata_nv: cleanup ADMA error handling · 5bd28a4b
      Robert Hancock 提交于
      This cleans up a few issues with the error handling in sata_nv in ADMA mode
      to make it more consistent with other NCQ-capable drivers like ahci and
      sata_sil24:
      
      - When a command failed, we would effectively set AC_ERR_DEV on the
        queued command always.  In the case of NCQ commands this prevents libata
        from doing a log page query to determine the details of the failed
        command, since it thinks we've already analyzed.  Just set flags in the
        port ehi->err_mask, then freeze or abort and let libata figure out what
        went wrong.
      
      - The code handled NV_ADMA_STAT_CPBERR as a "really bad error" which
        caused it to set error flags on every queued command.  I don't know
        exactly what this flag means (no docs, grr!) but from what I can guess
        from the standard ADMA spec, it just means that one or more of the CPBs
        had an error, so we just need to go through and do our normal checks in
        this case.
      
      - In the error_handler function the code would always dump the state of
        all the CPBs.  This output seems redundant at this point since libata
        already dumps the state of all active commands on errors (and it also
        triggers at times when it shouldn't, like when suspending).  Take this
        out.
      
      [akpm@osdl.org: many coding-style fixes]
      Signed-off-by: NRobert Hancock <hancockr@shaw.ca>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Tejun Heo <htejun@gmail.com>
      Cc: Allen Martin <AMartin@nvidia.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5bd28a4b