OSDN Git Service

cxgb4: copy adap index to PF0-3 adapter instances
authorGanesh Goudar <ganeshgr@chelsio.com>
Wed, 7 Mar 2018 07:38:45 +0000 (13:08 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Mar 2018 20:32:11 +0000 (15:32 -0500)
instantiation of VF's on different adapters fails, copy
adapter index and chip type to PF0-3 adapter instances
to fix the issue.

Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

index 7b452e8..33bc841 100644 (file)
@@ -5181,6 +5181,8 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        adapter->name = pci_name(pdev);
        adapter->mbox = func;
        adapter->pf = func;
+       adapter->params.chip = chip;
+       adapter->adap_idx = adap_idx;
        adapter->msg_enable = DFLT_MSG_ENABLE;
        adapter->mbox_log = kzalloc(sizeof(*adapter->mbox_log) +
                                    (sizeof(struct mbox_cmd) *