Skip to content

Commit d2a007a

Browse files
arjunvynipadathdavem330
authored andcommitted
cxgb4/cxgb4vf: Assign netdev->dev_port with port ID
Added missing dev_port assignment in cxgb4vf driver. Also made dev_port assignment of cxgb4 in sync with cxgb4vf driver. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: Arjun V <arjun@chelsio.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1a31cc8 commit d2a007a

3 files changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4931,6 +4931,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
49314931
*/
49324932
for_each_port(adapter, i) {
49334933
pi = adap2pinfo(adapter, i);
4934+
adapter->port[i]->dev_port = pi->lport;
49344935
netif_set_real_num_tx_queues(adapter->port[i], pi->nqsets);
49354936
netif_set_real_num_rx_queues(adapter->port[i], pi->nqsets);
49364937

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7851,7 +7851,6 @@ int t4_port_init(struct adapter *adap, int mbox, int pf, int vf)
78517851
return ret;
78527852

78537853
memcpy(adap->port[i]->dev_addr, addr, ETH_ALEN);
7854-
adap->port[i]->dev_port = j;
78557854
j++;
78567855
}
78577856
return 0;

drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2969,6 +2969,7 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev,
29692969

29702970
netdev->netdev_ops = &cxgb4vf_netdev_ops;
29712971
netdev->ethtool_ops = &cxgb4vf_ethtool_ops;
2972+
netdev->dev_port = pi->port_id;
29722973

29732974
/*
29742975
* Initialize the hardware/software state for the port.

0 commit comments

Comments
 (0)