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
4931 */4931 */
4932 for_each_port(adapter, i) {4932 for_each_port(adapter, i) {
4933 pi = adap2pinfo(adapter, i);4933 pi = adap2pinfo(adapter, i);
4934 adapter->port[i]->dev_port = pi->lport;
4934 netif_set_real_num_tx_queues(adapter->port[i], pi->nqsets);4935 netif_set_real_num_tx_queues(adapter->port[i], pi->nqsets);
4935 netif_set_real_num_rx_queues(adapter->port[i], pi->nqsets);4936 netif_set_real_num_rx_queues(adapter->port[i], pi->nqsets);
4936 4937
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
7851 return ret;7851 return ret;
7852 7852
7853 memcpy(adap->port[i]->dev_addr, addr, ETH_ALEN);7853 memcpy(adap->port[i]->dev_addr, addr, ETH_ALEN);
7854 adap->port[i]->dev_port = j;
7855 j++;7854 j++;
7856 }7855 }
7857 return 0;7856 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
2969 2969
2970 netdev->netdev_ops = &cxgb4vf_netdev_ops;2970 netdev->netdev_ops = &cxgb4vf_netdev_ops;
2971 netdev->ethtool_ops = &cxgb4vf_ethtool_ops;2971 netdev->ethtool_ops = &cxgb4vf_ethtool_ops;
2972 netdev->dev_port = pi->port_id;
2972 2973
2973 /*2974 /*
2974 * Initialize the hardware/software state for the port.2975 * 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