History

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.

Arjun V committed 9 years ago

Commit d2a007a1 parent 1a31cc83 files · +2 −1Browse files

Unified · Split

3 files
  1. drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1 −0
  2. drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +0 −1
  3. drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +1 −0
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c+1−0
@@ -4931,6 +4931,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) · 4930 unmodified lines
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+0−1
@@ -7851,7 +7851,6 @@ int t4_port_init(struct adapter *adap, int mbox, int pf, int vf) · 7850 unmodified lines
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+1−0
@@ -2969,6 +2969,7 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev, · 2968 unmodified lines
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.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t