1. 11 Feb, 2007 32 commits
  2. 09 Feb, 2007 8 commits
    • Jeff Garzik's avatar
      libata: kill ATA_ENABLE_PATA · 66efc5a7
      Jeff Garzik authored
      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: default avatarJeff Garzik <jeff@garzik.org>
      66efc5a7
    • Jeff Garzik's avatar
      591a6e8e
    • Alan's avatar
      libata: Early CFA adapters are not required to support mode setting · 11750a40
      Alan authored
      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: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      11750a40
    • Robert Hancock's avatar
      sata_nv: propagate ata_pci_device_do_resume return value · ce053fa8
      Robert Hancock authored
      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: default avatarRobert Hancock <hancockr@shaw.ca>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      ce053fa8
    • Robert Hancock's avatar
      sata_nv: wait for response on entering/leaving ADMA mode · a2cfe81a
      Robert Hancock authored
      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: default avatarRobert Hancock <hancockr@shaw.ca>
      Cc: Tejun Heo <htejun@gmail.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      a2cfe81a
    • Robert Hancock's avatar
      sata_nv: use ADMA for NODATA commands · 382a6652
      Robert Hancock authored
      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: default avatarRobert Hancock <hancockr@shaw.ca>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      382a6652
    • Robert Hancock's avatar
      sata_nv: cleanup ADMA error handling · 5bd28a4b
      Robert Hancock authored
      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: default avatarRobert 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      5bd28a4b
    • Sergei Shtylyov's avatar
      (2.6.20) pata_mpiix: probing cleanup (resend) · 92ae7849
      Sergei Shtylyov authored
      MPIIX has only single channel IDE which can be configured for either primary or
      secondary legacy I/O ports and IRQ.  So, get rid of the unneeded second probe
      entry in mpiix_init_one() and of the invalid (but unused anyway) enable bits in
      mpiix_pre_reset().
      
      Warning: this cleanup has only been compile-tested...
      Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      92ae7849