Skip to content

Commit aca06ea

Browse files
Ganesh Goudardavem330
authored andcommitted
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: baf5086 ("cxgb4: restructure VF mgmt code") Signed-off-by: Casey Leedom <[email protected]> Signed-off-by: Ganesh Goudar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2b92874 commit aca06ea

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5474,6 +5474,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
54745474
}
54755475
spin_lock_init(&adapter->mbox_lock);
54765476
INIT_LIST_HEAD(&adapter->mlist.list);
5477+
adapter->mbox_log->size = T4_OS_LOG_MBOX_CMDS;
54775478
pci_set_drvdata(pdev, adapter);
54785479

54795480
if (func != ent->driver_data) {
@@ -5508,8 +5509,6 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
55085509
goto out_free_adapter;
55095510
}
55105511

5511-
adapter->mbox_log->size = T4_OS_LOG_MBOX_CMDS;
5512-
55135512
/* PCI device has been enabled */
55145513
adapter->flags |= DEV_ENABLED;
55155514
memset(adapter->chan_map, 0xff, sizeof(adapter->chan_map));

0 commit comments

Comments
 (0)