Skip to content
  1. Feb 07, 2017
    • Michael Chan's avatar
      bnxt_en: Don't use DEFINE_DMA_UNMAP_ADDR to store DMA address in RX path. · 11cd119d
      Michael Chan authored
      
      
      To support XDP_TX, we need the RX buffer's DMA address to transmit the
      packet.  Convert the DMA address field to a permanent field in
      bnxt_sw_rx_bd.
      
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      11cd119d
    • Michael Chan's avatar
      bnxt_en: Refactor rx SKB function. · 6bb19474
      Michael Chan authored
      
      
      Minor refactoring of bnxt_rx_skb() so that it can easily be replaced by
      a new function that handles packets in a single page.  Also, use a
      function pointer bp->rx_skb_func() to switch to a new function when
      we add the new mode in the next patch.
      
      Add a new field data_ptr that points to the packet data in the
      bnxt_sw_rx_bd structure.  The original data field is changed to void
      pointer so that it can either hold the kmalloc'ed data or a page
      pointer.
      
      The last parameter of bnxt_rx_skb() which was the length parameter is
      changed to include the payload offset of the packet in the upper 16 bit.
      The offset is needed to support the rx page mode and is not used in
      this existing function.
      
      v3: Added a new data_ptr parameter to bp->rx_skb_func().  The caller
      has the option to modify the starting address of the packet.  This
      will be needed when XDP with headroom support is added.
      
      v2: Changed the name of the last parameter to offset_and_len to make the
      code more clear.
      
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6bb19474
  2. Feb 06, 2017
  3. Jan 31, 2017
  4. Jan 30, 2017
  5. Jan 25, 2017
    • Michael Chan's avatar
      bnxt_en: Fix RTNL lock usage on bnxt_get_port_module_status(). · 90c694bb
      Michael Chan authored
      
      
      bnxt_get_port_module_status() calls bnxt_update_link() which expects
      RTNL to be held.  In bnxt_sp_task() that does not hold RTNL, we need to
      call it with a prior call to bnxt_rtnl_lock_sp() and the call needs to
      be moved to the end of bnxt_sp_task().
      
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90c694bb
    • Michael Chan's avatar
      bnxt_en: Fix RTNL lock usage on bnxt_update_link(). · 0eaa24b9
      Michael Chan authored
      
      
      bnxt_update_link() is called from multiple code paths.  Most callers,
      such as open, ethtool, already hold RTNL.  Only the caller bnxt_sp_task()
      does not.  So it is a bug to take RTNL inside bnxt_update_link().
      
      Fix it by removing the RTNL inside bnxt_update_link().  The function
      now expects the caller to always hold RTNL.
      
      In bnxt_sp_task(), call bnxt_rtnl_lock_sp() before calling
      bnxt_update_link().  We also need to move the call to the end of
      bnxt_sp_task() since it will be clearing the BNXT_STATE_IN_SP_TASK bit.
      
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0eaa24b9
    • Michael Chan's avatar
      bnxt_en: Fix bnxt_reset() in the slow path task. · a551ee94
      Michael Chan authored
      
      
      In bnxt_sp_task(), we set a bit BNXT_STATE_IN_SP_TASK so that bnxt_close()
      will synchronize and wait for bnxt_sp_task() to finish.  Some functions
      in bnxt_sp_task() require us to clear BNXT_STATE_IN_SP_TASK and then
      acquire rtnl_lock() to prevent race conditions.
      
      There are some bugs related to this logic. This patch refactors the code
      to have common bnxt_rtnl_lock_sp() and bnxt_rtnl_unlock_sp() to handle
      the RTNL and the clearing/setting of the bit.  Multiple functions will
      need the same logic.  We also need to move bnxt_reset() to the end of
      bnxt_sp_task().  Functions that clear BNXT_STATE_IN_SP_TASK must be the
      last functions to be called in bnxt_sp_task().  The common scheme will
      handle the condition properly.
      
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a551ee94
  6. Jan 24, 2017
  7. Jan 23, 2017
  8. Jan 22, 2017
    • Florian Fainelli's avatar
      net: systemport: Add support for SYSTEMPORT Lite · 44a4524c
      Florian Fainelli authored
      
      
      Add supporf for the SYSTEMPORT Lite Ethernet controller, this piece of hardware
      is largely based on the full-blown SYSTEMPORT and differs in the following:
      
      - no full-blown UniMAC, instead we have the MagicPacket matching from UniMAC at
        same offset, and a GMII Interface Block (GIB) for the MAC-level stuff, since
        we are always interfaced to an Ethernet switch which is fully Ethernet compliant
        shortcuts could be made
      
      - 16 transmit queues, whose interrupts are moved into the first Level-2 interrupt
        controller bank
      
      - slight TDMA offset change (a register was inserted after TDMA_STATUS, *sigh*)
      
      - 256 RX descriptors (512 words) and 256 TX descriptors (not visible)
      
      As a consequence of these two things, update the code paths accordingly to
      differentiate the full-blown from the light version.
      
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      44a4524c
    • Florian Fainelli's avatar
      net: systemport: Dynamically allocate number of TX rings · 7b78be48
      Florian Fainelli authored
      
      
      In preparation for adding SYSTEMPORT Lite, which has twice as less transmit
      queues than SYSTEMPORT make sure we do allocate TX rings based on the
      systemport,txq property to get an appropriate memory footprint.
      
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b78be48
  9. Jan 20, 2017
    • Arnd Bergmann's avatar
      bcm63xx_enet: avoid uninitialized variable warning · df384d43
      Arnd Bergmann authored
      
      
      gcc-7 and probably earlier versions get confused by this function
      and print a harmless warning:
      
      drivers/net/ethernet/broadcom/bcm63xx_enet.c: In function 'bcm_enet_open':
      drivers/net/ethernet/broadcom/bcm63xx_enet.c:1130:3: error: 'phydev' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      This adds an initialization for the 'phydev' variable when it is unused
      and changes the check to test for that NULL pointer to make it clear
      that we always pass a valid pointer here.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      df384d43
  10. Jan 18, 2017
  11. Jan 14, 2017
  12. Jan 13, 2017
  13. Jan 08, 2017
  14. Jan 04, 2017
  15. Dec 29, 2016
Loading