1. 05 3月, 2014 1 次提交
    • S
      be2net: dma_sync each RX frag before passing it to the stack · e50287be
      Sathya Perla 提交于
      The driver currently maps a page for DMA, divides the page into multiple
      frags and posts them to the HW. It un-maps the page after data is received
      on all the frags of the page. This scheme doesn't work when bounce buffers
      are used for DMA (swiotlb=force kernel param).
      
      This patch fixes this problem by calling dma_sync_single_for_cpu() for each
      frag (excepting the last one) so that the data is copied from the bounce
      buffers. The page is un-mapped only when DMA finishes on the last frag of
      the page.
      (Thanks Ben H. for suggesting the dma_sync API!)
      
      This patch also renames the "last_page_user" field of be_rx_page_info{}
      struct to "last_frag" to improve readability of the fixed code.
      Reported-by: NLi Fengmao <li.fengmao@zte.com.cn>
      Signed-off-by: NSathya Perla <sathya.perla@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e50287be
  2. 14 2月, 2014 2 次提交
  3. 16 1月, 2014 4 次提交
  4. 07 1月, 2014 2 次提交
  5. 24 11月, 2013 1 次提交
  6. 30 10月, 2013 1 次提交
  7. 28 10月, 2013 2 次提交
  8. 10 10月, 2013 2 次提交
  9. 02 10月, 2013 3 次提交
  10. 28 9月, 2013 2 次提交
  11. 24 9月, 2013 1 次提交
  12. 28 8月, 2013 3 次提交
  13. 08 8月, 2013 1 次提交
  14. 01 6月, 2013 1 次提交
  15. 31 5月, 2013 1 次提交
  16. 28 5月, 2013 1 次提交
  17. 03 5月, 2013 1 次提交
  18. 27 4月, 2013 2 次提交
  19. 25 4月, 2013 1 次提交
  20. 23 4月, 2013 2 次提交
  21. 08 3月, 2013 1 次提交
  22. 07 3月, 2013 1 次提交
  23. 05 2月, 2013 1 次提交
  24. 30 1月, 2013 1 次提交
  25. 13 1月, 2013 1 次提交
    • S
      be2net: fix unconditionally returning IRQ_HANDLED in INTx · d0b9cec3
      Sathya Perla 提交于
      commit e49cc34f introduced an unconditional IRQ_HANDLED return in be_intx()
      to workaround Lancer and BE2 HW issues. This is bad as it prevents the kernel
      from detecting interrupt storms due to broken HW.
      
      The BE2/Lancer HW issues are:
      1) In Lancer, there is no means for the driver to detect if the interrupt
      belonged to device, other than counting and notifying events.
      2) In Lancer de-asserting INTx takes a while, causing the INTx irq handler
      to be called multiple times till the de-assert happens.
      3) In BE2, we see an occasional interrupt even when EQs are unarmed.
      
      Issue (1) can cause the notified events to be orphaned, if NAPI was already
      running.
      This patch fixes this issue by scheduling NAPI only if it is not scheduled
      already. Doing this also takes care of possible events_get() race that may be
      caused due to issue (2) and (3). Also, IRQ_HANDLED is returned only the first
      time zero events are detected.
      (Thanks Ben H. for the feedback and suggestions.)
      Signed-off-by: NSathya Perla <sathya.perla@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d0b9cec3
  26. 19 12月, 2012 1 次提交
    • S
      be2net: fix wrong frag_idx reported by RX CQ · d23e946c
      Sathya Perla 提交于
      The RX CQ can report completions with invalid frag_idx when the RXQ that
      was *previously* using it, was not cleaned up properly. This hits
      a BUG_ON() in be2net.
      
      When completion coalescing is enabled on a CQ, an explicit CQ-notify
      (with rearm) is needed for each compl, to flush partially coalesced CQ
      entries that are pending DMA.
      
      In be_close(), this fix now notifies CQ for each compl, waits explicitly
      for the flush compl to arrive and complains if it doesn't arrive.
      
      Also renaming be_crit_error() to be_hw_error() as it's the more
      appropriate name and to convey that we don't wait for the flush compl
      only when a HW error has occurred.
      Signed-off-by: NSathya Perla <sathya.perla@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d23e946c