Added missing dev_port assignment in cxgb4vf driver. Also made dev_port assignment of cxgb4 in sync with cxgb4vf driver.
Unified · Split
| @@ -4931,6 +4931,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) · 4930 unmodified lines | ||
| 4931 | 4931 | */ |
| 4932 | 4932 | for_each_port(adapter, i) { |
| 4933 | 4933 | pi = adap2pinfo(adapter, i); |
| 4934 | + adapter->port[i]->dev_port = pi->lport; | |
| 4934 | 4935 | netif_set_real_num_tx_queues(adapter->port[i], pi->nqsets); |
| 4935 | 4936 | netif_set_real_num_rx_queues(adapter->port[i], pi->nqsets); |
| 4936 | 4937 | |
| @@ -7851,7 +7851,6 @@ int t4_port_init(struct adapter *adap, int mbox, int pf, int vf) · 7850 unmodified lines | ||
| 7851 | 7851 | return ret; |
| 7852 | 7852 | |
| 7853 | 7853 | memcpy(adap->port[i]->dev_addr, addr, ETH_ALEN); |
| 7854 | − adap->port[i]->dev_port = j; | |
| 7855 | 7854 | j++; |
| 7856 | 7855 | } |
| 7857 | 7856 | return 0; |
| @@ -2969,6 +2969,7 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev, · 2968 unmodified lines | ||
| 2969 | 2969 | |
| 2970 | 2970 | netdev->netdev_ops = &cxgb4vf_netdev_ops; |
| 2971 | 2971 | netdev->ethtool_ops = &cxgb4vf_ethtool_ops; |
| 2972 | + netdev->dev_port = pi->port_id; | |
| 2972 | 2973 | |
| 2973 | 2974 | /* |
| 2974 | 2975 | * Initialize the hardware/software state for the port. |