1. 09 12月, 2016 20 次提交
  2. 08 12月, 2016 17 次提交
  3. 07 12月, 2016 3 次提交
    • M
      bnxt_en: Add interface to support RDMA driver. · a588e458
      Michael Chan 提交于
      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: NSomnath Kotur <somnath.kotur@broadcom.com>
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a588e458
    • M
      bnxt_en: Refactor the driver registration function with firmware. · a1653b13
      Michael Chan 提交于
      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: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a1653b13
    • M
      bnxt_en: Reserve RDMA resources by default. · e4060d30
      Michael Chan 提交于
      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: NSomnath Kotur <somnath.kotur@broadcom.com>
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e4060d30