1. 25 3月, 2009 10 次提交
  2. 14 3月, 2009 1 次提交
  3. 26 2月, 2009 1 次提交
    • M
      sata_mv: fix SoC interrupt breakage · 6be96ac1
      Mark Lord 提交于
      For some reason, sata_mv doesn't clear interrupt status during init
      when it's running on an SoC host adapter.  If the bootloader has
      touched the SATA controller before starting Linux, Linux can end up
      enabling the SATA interrupt with events pending, which will cause the
      interrupt to be marked as spurious and then be disabled, which then
      breaks all further accesses to the controller.
      
      This patch makes the SoC path clear interrupt status on init like in
      the non-SoC case.
      Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6be96ac1
  4. 03 2月, 2009 1 次提交
  5. 26 1月, 2009 5 次提交
    • M
      sata_mv: msi masking fix (v2) · 6d3c30ef
      Mark Lord 提交于
      Enable reliable use of Message-Signaled Interrupts (MSI) in sata_mv
      by masking further chip interrupts within the main interrupt handler.
      
      Based upon a suggestion by Grant Grundler.
      MSI is working reliably in all of my test systems here now.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Reviewed-by: NGrant Grundler <grundler@google.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6d3c30ef
    • T
      sata_mv: Properly initialize main irq mask · 5d0fb2e7
      Thomas Reitmayr 提交于
      I noticed that during initialization sata_mv.c assumes that the main
      interrupt mask has its default value of 0. The function
      mv_platform_probe(..) initializes a shadow irq mask with 0 assuming
      that's the value of the controller's register. Now
      mv_set_main_irq_mask(..) only writes the controller's register if the
      new value differs from the "shadowed" value. This is fatal when trying
      to disable all interrupts in mv_init_host(..), i.e. the following
      function call does not write anything to the main irq mask register:
      
        mv_set_main_irq_mask(host, ~0, 0);
      
      The effect I see on my machine (QNAP TS-109 II) with booting via kexec
      (with Linux as a 2nd-stage boot loader) is that if the sata_mv module
      was still loaded when performing kexec, then the new kernel's sata_mv
      module starts up with interrupts enabled. This results in an unhandled
      IRQ and breaks the boot process.
      
      The unhandled interrupt itself might also be fixed by Lennert's patch
      proposed at http://markmail.org/message/kwvzxstnlsa3s26w which I did not
      try yet.
      
      However I still propose to additionally initialize the shadow variable
      with the current contents of the main irq mask register to get both in
      sync and allow proper disabling the main irq mask. This fixes the
      unhandled irq on my machine.
      Signed-off-by: NThomas Reitmayr <treitmayr@devbase.at>
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      5d0fb2e7
    • M
      sata_mv: remove bogus nsect restriction · cd12e1f7
      Mark Lord 提交于
      Remove unneeded nsect restriction from GenII NCQ path,
      and improve comments to explain why this is not a problem.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      cd12e1f7
    • M
      sata_mv: don't read hc_irq_cause · cae6edc3
      Mark Lord 提交于
      Remove silly read-modify-write sequences when clearing interrupts
      in hc_irq_cause.  This gets rid of unneeded MMIO reads, resulting in
      a slight performance boost when switching between EDMA and non-EDMA
      modes (eg. for cache flushes).
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      cae6edc3
    • M
      sata_mv: fix 8-port timeouts on 508x/6081 chips · b0bccb18
      Mark Lord 提交于
      Fix a longstanding bug for the 8-port Marvell Sata controllers (508x/6081),
      where accesses to the upper 4 ports would cause lost-interrupts / timeouts
      for the lower 4-ports.  With this patch, the 6081 boards should finally be
      reliable enough for mainstream use with Linux.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      b0bccb18
  6. 29 12月, 2008 1 次提交
  7. 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
  8. 09 9月, 2008 1 次提交
  9. 22 8月, 2008 2 次提交
  10. 04 7月, 2008 1 次提交
  11. 19 6月, 2008 2 次提交
    • M
      sata_mv: warn on PIO with multiple DRQs · c6112bd8
      Mark Lord 提交于
      Chip errata sometimes prevents reliable use of PIO commands which involve
      more than a single DRQ (data request).  In normal operation, libata should
      not generate such PIO commands (uses DMA instead), but they could be sent
      in via SG_IO from userspace.
      
      A full workaround might be to break up such commands into sequences
      of single DRQ ones, but that's just way too complex for something
      that doesn't normally happen in real life.
      
      So, allow the attempt (it often works, despite the errata),
      but log the event for reference when somebody screams.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      c6112bd8
    • M
      sata_mv: enable async_notify for 60x1 Rev.C0 and higher · 3bd0a70e
      Mark Lord 提交于
      The early chipsets cannot safely handle Async Notification (AN),
      but 6041/6081 chip revision "C0" (and newer) can handle it.
      
      So allow AN for "C0" and higher.
      
      This enables use of hotplug on PMP ports for the 6041/6081 PCI Rev.9 chips.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      3bd0a70e
  12. 04 6月, 2008 1 次提交
  13. 31 5月, 2008 5 次提交
  14. 20 5月, 2008 8 次提交
    • M
      sata_mv: ensure empty request queue for FBS-NCQ EH · 06aaca3f
      Mark Lord 提交于
      Check for an empty request queue before stopping EDMA after a FBS-NCQ error,
      as per recommendation from the Marvell datasheet.
      
      This ensures that the EDMA won't suddenly become active again
      just after our subsequent check of the empty/idle bits.
      
      Also bump DRV_VERSION.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      06aaca3f
    • M
      sata_mv: cache main_irq_mask register in hpriv · 96e2c487
      Mark Lord 提交于
      Part five of simplifying/fixing handling of the main_irq_mask register
      to resolve unexpected interrupt issues observed in 2.6.26-rc*.
      
      Keep a cached copy of the main_irq_mask so that we don't have
      to stall the CPU to read it on every pass through mv_interrupt.
      
      This significantly speeds up interrupt handling, both for sata_mv,
      and for any other driver/device sharing the same PCI IRQ line.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      96e2c487
    • M
      sata_mv: disregard masked irqs · a44253d2
      Mark Lord 提交于
      Part four of simplifying/fixing handling of the main_irq_mask register
      to resolve unexpected interrupt issues observed in 2.6.26-rc*.
      
      Ignore masked IRQs in mv_interrupt().
      This prevents "unexpected device interrupt while idle" messages.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      a44253d2
    • M
      sata_mv: fix pmp drives not found · 88e675e1
      Mark Lord 提交于
      Part three of simplifying/fixing handling of the main_irq_mask register
      to resolve unexpected interrupt issues observed in 2.6.26-rc*.
      
      Partially fix a reported bug whereby we sometimes miss seeing drives on
      a port-multiplier, as reported by Gwendal Grignou <gwendal@google.com>.
      
      The problem was that we were receiving unexpected interrupts
      during EH from POLLed commands while accessing port-multiplier registers.
      These unexpected interrupts can be prevented by masking the DONE_IRQ bit
      for the port whenever not operating in EDMA mode.
      
      Also fix port_stop() to mask all port interrupts.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      88e675e1
    • M
      sata_mv: consolidate main_irq_mask updates · c4de573b
      Mark Lord 提交于
      Part two of simplifying/fixing handling of the main_irq_mask register
      to resolve unexpected interrupt issues observed in 2.6.26-rc*.
      
      Consolidate all updates of the host main_irq_mask register
      into a single function.  This simplifies maintenance,
      and also prepares the way for caching it (later).
      
      No functionality changes in this update.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      c4de573b
    • M
      sata_mv: don't blindly enable IRQs · 51de32d2
      Mark Lord 提交于
      Part one of simplifying/fixing handling of the main_irq_mask register
      to resolve unexpected interrupt issues observed in 2.6.26-rc*.
      
      Don't blindly enable port IRQs at host init time.
      Instead, enable only the bits that we want,
      which in this case is simply the PCI_ERR bit.
      
      The per-port bits can wait until the ports are reset/probed for devices.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      51de32d2
    • M
      sata_mv: async notify for genIIe only · c443c500
      Mark Lord 提交于
      Now that we handle the FIS_IRQ_CAUSE register correctly,
      we can also now handle SATA asynchronous notification events.
      
      So enable them, but only for the more modern GenIIe chips.
      (older chips have unaddressed errata issues related to this).
      
      This fixes hot plug/unplug for port-muliplier ports.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      c443c500
    • M
      sata_mv: group genIIe flags · ad3aef51
      Mark Lord 提交于
      Group all of the flags for GenIIe devices into a common definition,
      to ensure that any updates to them are shared by all GenIIe devices.
      
      This will help make future maintenance somewhat simpler.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ad3aef51