Commit aca06eaf authored by Ganesh Goudar's avatar Ganesh Goudar Committed by David S. Miller

cxgb4: copy mbox log size to PF0-3 adap instances

copy mbox size to adapter instances of PF0-3 to avoid
mbox log overflow. This fixes the possible protection
fault.

Fixes: baf50868 ("cxgb4: restructure VF mgmt code")
Signed-off-by: default avatarCasey Leedom <leedom@chelsio.com>
Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2b928749
...@@ -5474,6 +5474,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -5474,6 +5474,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
} }
spin_lock_init(&adapter->mbox_lock); spin_lock_init(&adapter->mbox_lock);
INIT_LIST_HEAD(&adapter->mlist.list); INIT_LIST_HEAD(&adapter->mlist.list);
adapter->mbox_log->size = T4_OS_LOG_MBOX_CMDS;
pci_set_drvdata(pdev, adapter); pci_set_drvdata(pdev, adapter);
if (func != ent->driver_data) { if (func != ent->driver_data) {
...@@ -5508,8 +5509,6 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -5508,8 +5509,6 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
goto out_free_adapter; goto out_free_adapter;
} }
adapter->mbox_log->size = T4_OS_LOG_MBOX_CMDS;
/* PCI device has been enabled */ /* PCI device has been enabled */
adapter->flags |= DEV_ENABLED; adapter->flags |= DEV_ENABLED;
memset(adapter->chan_map, 0xff, sizeof(adapter->chan_map)); memset(adapter->chan_map, 0xff, sizeof(adapter->chan_map));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment