Skip to content
  1. Jan 30, 2017
  2. 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
  3. Jan 24, 2017
  4. Jan 23, 2017
  5. 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
  6. 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
  7. Jan 18, 2017
  8. Jan 14, 2017
  9. Jan 13, 2017
  10. Jan 08, 2017
  11. Jan 04, 2017
  12. Dec 29, 2016
  13. Dec 25, 2016
  14. Dec 24, 2016
  15. Dec 14, 2016
  16. Dec 07, 2016
    • Michael Chan's avatar
      bnxt_en: Add interface to support RDMA driver. · a588e458
      Michael Chan authored
      
      
      Since the network driver and RDMA driver operate on the same PCI function,
      we need to create an interface to allow the RDMA driver to share resources
      with the network driver.
      
      1. Create a new bnxt_en_dev struct which will be returned by
      bnxt_ulp_probe() upon success.  After that, all calls from the RDMA driver
      to bnxt_en will pass a pointer to this struct.
      
      2. This struct contains additional function pointers to register, request
      msix, send fw messages, register for async events.
      
      3. If the RDMA driver wants to enable RDMA on the function, it needs to
      call the function pointer bnxt_register_device().  A ulp_ops structure
      is passed for RCU protected upcalls from bnxt_en to the RDMA driver.
      
      4. The RDMA driver can call firmware APIs using the bnxt_send_fw_msg()
      function pointer.
      
      5. 1 stats context is reserved when the RDMA driver registers.  MSIX
      and completion rings are reserved when the RDMA driver calls
      bnxt_request_msix() function pointer.
      
      6. When the RDMA driver calls bnxt_unregister_device(), all RDMA resources
      will be cleaned up.
      
      v2: Fixed 2 uninitialized variable warnings.
      
      Signed-off-by: default avatarSomnath Kotur <somnath.kotur@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a588e458
    • Michael Chan's avatar
      bnxt_en: Refactor the driver registration function with firmware. · a1653b13
      Michael Chan authored
      
      
      The driver register function with firmware consists of passing version
      information and registering for async events.  To support the RDMA driver,
      the async events that we need to register may change.  Separate the
      driver register function into 2 parts so that we can just update the
      async events for the RDMA driver.
      
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a1653b13
    • Michael Chan's avatar
      bnxt_en: Reserve RDMA resources by default. · e4060d30
      Michael Chan authored
      
      
      If the device supports RDMA, we'll setup network default rings so that
      there are enough minimum resources for RDMA, if possible.  However, the
      user can still increase network rings to the max if he wants.  The actual
      RDMA resources won't be reserved until the RDMA driver registers.
      
      v2: Fix compile warning when BNXT_CONFIG_SRIOV is not set.
      
      Signed-off-by: default avatarSomnath Kotur <somnath.kotur@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e4060d30
Loading