1. 10 12月, 2013 1 次提交
  2. 18 10月, 2013 1 次提交
  3. 17 9月, 2013 1 次提交
    • R
      DMA-API: net: brocade/bna/bnad.c: fix 32-bit DMA mask handling · 3e548079
      Russell King 提交于
      The fallback to 32-bit DMA mask is rather odd:
      	if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) &&
      	    !dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) {
      		*using_dac = true;
      	} else {
      		err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
      		if (err) {
      			err = dma_set_coherent_mask(&pdev->dev,
      						    DMA_BIT_MASK(32));
      			if (err)
      				goto release_regions;
      		}
      
      This means we only try and set the coherent DMA mask if we failed to
      set a 32-bit DMA mask, and only if both fail do we fail the driver.
      Adjust this so that if either setting fails, we fail the driver - and
      thereby end up properly setting both the DMA mask and the coherent
      DMA mask in the fallback case.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      3e548079
  4. 21 5月, 2013 1 次提交
  5. 14 5月, 2013 1 次提交
  6. 20 4月, 2013 3 次提交
  7. 18 3月, 2013 1 次提交
  8. 12 12月, 2012 3 次提交
  9. 04 12月, 2012 1 次提交
  10. 28 9月, 2012 1 次提交
    • D
      bna: Fix warning false positive. · e905ed57
      David S. Miller 提交于
      GCC can't see that in all non-error-return paths we do in fact
      set *using_dac to something.
      
      Add an explicit initialization to remove this warning:
      
      drivers/net/ethernet/brocade/bna/bnad.c: In function ‘bnad_pci_probe’:
      drivers/net/ethernet/brocade/bna/bnad.c:3079:5: warning: ‘using_dac’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      drivers/net/ethernet/brocade/bna/bnad.c:3233:7: note: ‘using_dac’ was declared here
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e905ed57
  11. 11 7月, 2012 1 次提交
  12. 30 4月, 2012 1 次提交
  13. 05 4月, 2012 3 次提交
    • J
      bna: Function name changes and cleanups · b3cc6e88
      Jing Huang 提交于
      Renamed following functions:
      bnad_cleanup_tx to bnad_destroy_tx
      bnad_free_all_txbufs to bnad_txq_cleanup
      bnad_free_txbufs to bnad_txcmpl_process
      bnad_tx to bnad_tx_complete
      bnad_cleanup_rx to bnad_destroy_rx
      bnad_reset_rcb to bnad_rcb_cleanup
      bnad_free_all_rxbufs to bnad_rxq_cleanup
      bnad_cq_cmpl_init to bnad_cq_cleanup
      bnad_alloc_n_post_rxbufs to bnad_rxq_post
      bnad_poll_cq to bnad_cq_process
      Signed-off-by: NJing Huang <huangj@brocade.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b3cc6e88
    • J
      bna: Remove tx tasklet · d95d1081
      Jing Huang 提交于
      The scheduling of tasklet and keeping the interrupts enabled makes interrupt
      reduntant. 20% of the Tx interrupts have nothing left to process or could not
      process as Tx tasklet was running.
      Signed-off-by: NJing Huang <huangj@brocade.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d95d1081
    • J
      bna: tx rx cleanup fix · 01b54b14
      Jing Huang 提交于
      This patch removes busy wait in tx/rx cleanup. bnad_cb_tx_cleanup() and
      bnad_cb_rx_cleanup() functions are called from irq context, and currently
      they do busy wait for the in-flight transmit or the currently executing napi
      polling routine to complete. To fix the issue, we create a workqueue to defer
      tx & rx cleanup processing, an in the tx rx cleanup handler, we will
      wait respective in flight processing to complete, before freeing the buffers.
      Signed-off-by: NJing Huang <huangj@brocade.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      01b54b14
  14. 01 2月, 2012 1 次提交
  15. 06 1月, 2012 1 次提交
  16. 24 12月, 2011 2 次提交
  17. 20 12月, 2011 1 次提交
  18. 09 12月, 2011 1 次提交
  19. 01 11月, 2011 1 次提交
  20. 19 10月, 2011 1 次提交
  21. 30 9月, 2011 3 次提交
  22. 22 9月, 2011 1 次提交
  23. 17 9月, 2011 2 次提交
  24. 16 9月, 2011 7 次提交
    • R
      bna: SKB PCI UNMAP Fix · 938fa488
      Rasesh Mody 提交于
      Change details:
       - Found a leak in sk_buff unmapping of PCI dma addresses where boundary
         conditions are not properly handled in freeing all Tx buffers. Freeing
         of all Tx buffers is done considering sk_buffs data and fragments can
         be mapped at the boundary.
      Signed-off-by: NGurunatha Karaje <gkaraje@brocade.com>
      Signed-off-by: NRasesh Mody <rmody@brocade.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      938fa488
    • R
      bna: MBOX IRQ Flag Check after Locking · dfee325a
      Rasesh Mody 提交于
      Change details:
       - Check the BNAD_RF_MBOX_IRQ_DISABLED flag after acquiring the bna_lock,
         since checking the flag and executing bna_mbox_handler needs to be atomic.
         If not, it opens up window where flag is reset when it was checked, but got
         set while spinning on the lock by the other thread which is actually
         holding the lock
      Signed-off-by: NGurunatha Karaje <gkaraje@brocade.com>
      Signed-off-by: NRasesh Mody <rmody@brocade.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dfee325a
    • R
      bna: Ethtool Enhancements and Fix · a2122d95
      Rasesh Mody 提交于
      Change details:
       - Add tx_skb counters and NAPI debug counters to ethtool stats.
       - Add rlb stats strings to bnad_net_stats_strings{} array. rlb_stats field
         was added to struct bfi_enet_stats {} but the corresponding name structure
         array for ethtool was not initialized with right strings, even though the
         actual name structure array got expanded. This caused a NULL pointer
         violation and a crash when doing ehtool -S <if_name>.
       - Modify dim timer stop logic to make it dependent on cfg and run flags
       - While setting the ring parameter restore the rx, vlan configuration and
         set rx mode
       - Indentation fix
      Signed-off-by: NGurunatha Karaje <gkaraje@brocade.com>
      Signed-off-by: NRasesh Mody <rmody@brocade.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a2122d95
    • R
      bna: Initialization and Locking Fix · 3caa1e95
      Rasesh Mody 提交于
      Change details:
       - Initialize rx_id to 0 for bnad_cleanup_rx
       - Return -ENOMEM in case if bna_rx_create fails
       - Count the Rx buffer allocation failures in bnad_alloc_n_post_rxbufs()
       - Remove unnecessary initialization of using_dac to false in bnad_pci_probe
       - Release lock if error while doing bna_num_txq_set in bnad_pci_probe
      Signed-off-by: NGurunatha Karaje <gkaraje@brocade.com>
      Signed-off-by: NRasesh Mody <rmody@brocade.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3caa1e95
    • R
      bna: Formatting and Code Cleanup · 19dbff9f
      Rasesh Mody 提交于
      Change details:
       - Print log messages when running with reduced number of MSI-X vectors
         and when defaulting to INTx mode.
       - Remove BUG_ONs and header file inclusion that are not needed
       - Comments addition/cleanup
       - Unused code cleanup
       - Add New Line to Print msg in bfa_sm_fault
       - Formatting fix
      Signed-off-by: NGurunatha Karaje <gkaraje@brocade.com>
      Signed-off-by: NRasesh Mody <rmody@brocade.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      19dbff9f
    • R
      bna: TX Path and RX Path Changes · 271e8b79
      Rasesh Mody 提交于
      Change details:
       - Add bnad_pci_unmap_skb() API to unmap skb from transmit path and update the
         unmap index. Add more checks for illegal skbs in transmit path. Add tx_skb
         counters for dropped skbs.
       - The unmap_cons index used in bnad_free_txbufs() is incorrectly declared as
         u16. It quickly wraps around and accesses null sk_buff ptr. So using u32 to
         handle unmap_array.
       - Disable and enable interrupts from the same polling context to prevent
         reordering in Rx path.
       - Add Rx NAPI debug counters.
       - Make NAPI budget check more generic.
       - Modify dim timer stop logic to make it dependent on cfg and run flags
       - Handle reduced MSI-X vectors case in bnad_enable_msix.
       - Check for single frame TSO skbs and send them out as non-TSO.
       - Put memory barrier after bna_txq_prod_indx_doorbell().
      Signed-off-by: NGurunatha Karaje <gkaraje@brocade.com>
      Signed-off-by: NRasesh Mody <rmody@brocade.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      271e8b79
    • R
      bna: Interrupt Polling and NAPI Init Changes · 2be67144
      Rasesh Mody 提交于
      Change details:
       - Remove unnecessary ccb check from bnad_poll_cq
       - Add bnad pointer to rx_ctrl structure, so that bnad can be accessed directly
         from rx_ctrl in the NAPI poll routines, even if ccb is NULL
       - Validate ccb before referencing to it in bnad_msix_rx and bnad_napi_poll_rx
       - Fix the order of NAPI init / uninit in Tx / Rx setup / teardown path:
         a. Kill bnad tx free tasklet ahead of call to bna_tx_destroy()
         b. Call NAPI disable only after call to Rx free_irq(). This makes sure Rx
            interrupt does not schedule a poll when NAPI is already disabled
       - NAPI poll runs before the h/w has completed configuration. This causes a
         crash. Delay enabling NAPI till after bna_rx_enable(). Split NAPI
         initialization into 2 steps, bnad_napi_init() & bnad_napi_enable().
      Signed-off-by: NGurunatha Karaje <gkaraje@brocade.com>
      Signed-off-by: NRasesh Mody <rmody@brocade.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2be67144