mirror of https://gitee.com/openkylin/linux.git
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: baf5086840
("cxgb4: restructure VF mgmt code")
Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2b928749f9
commit
aca06eafd0
|
@ -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)
|
||||||
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));
|
||||||
|
|
Loading…
Reference in New Issue