summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorJeffrey Huang <huangjw@broadcom.com>2015-12-27 18:19:18 -0500
committerDavid S. Miller <davem@davemloft.net>2015-12-28 00:57:27 -0500
commitbe58a0da1672391b246880450e990fe36d7ba24d (patch)
tree789b50a5ab22057ee35f5da579a72d39f93b1ba6 /drivers/net/ethernet/broadcom
parentf45688280e19b61b5c15a17ebd8c3d9b60fa1252 (diff)
downloadlinux-be58a0da1672391b246880450e990fe36d7ba24d.tar.gz
linux-be58a0da1672391b246880450e990fe36d7ba24d.tar.bz2
linux-be58a0da1672391b246880450e990fe36d7ba24d.zip
bnxt_en: support hwrm_func_drv_unrgtr command
During remove_one, the driver should issue hwrm_func_drv_unrgtr command to inform firmware that this function has been unloaded. This is to let firmware keep track of driver present/absent state when driver is gracefully unloaded. A keep alive timer is needed later to keep track of driver state during abnormal shutdown. Signed-off-by: Jeffrey Huang <huangjw@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 443ef92f9803..8d401e836057 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -2710,6 +2710,14 @@ static int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp)
return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
}
+static int bnxt_hwrm_func_drv_unrgtr(struct bnxt *bp)
+{
+ struct hwrm_func_drv_unrgtr_input req = {0};
+
+ bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_DRV_UNRGTR, -1, -1);
+ return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
+}
+
static int bnxt_hwrm_tunnel_dst_port_free(struct bnxt *bp, u8 tunnel_type)
{
u32 rc = 0;
@@ -5549,6 +5557,7 @@ static void bnxt_remove_one(struct pci_dev *pdev)
cancel_work_sync(&bp->sp_task);
bp->sp_event = 0;
+ bnxt_hwrm_func_drv_unrgtr(bp);
bnxt_free_hwrm_resources(bp);
pci_iounmap(pdev, bp->bar2);
pci_iounmap(pdev, bp->bar1);