diff options
Diffstat (limited to 'drivers/net/mlx4/main.c')
-rw-r--r-- | drivers/net/mlx4/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 28f36b88de38..0a5c8bfb3f1f 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c | |||
@@ -780,11 +780,22 @@ no_msi: | |||
780 | priv->eq_table.eq[i].irq = dev->pdev->irq; | 780 | priv->eq_table.eq[i].irq = dev->pdev->irq; |
781 | } | 781 | } |
782 | 782 | ||
783 | static void mlx4_init_port_info(struct mlx4_dev *dev, int port) | ||
784 | { | ||
785 | struct mlx4_port_info *info = &mlx4_priv(dev)->port[port]; | ||
786 | |||
787 | info->dev = dev; | ||
788 | info->port = port; | ||
789 | mlx4_init_mac_table(dev, &info->mac_table); | ||
790 | mlx4_init_vlan_table(dev, &info->vlan_table); | ||
791 | } | ||
792 | |||
783 | static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | 793 | static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |
784 | { | 794 | { |
785 | struct mlx4_priv *priv; | 795 | struct mlx4_priv *priv; |
786 | struct mlx4_dev *dev; | 796 | struct mlx4_dev *dev; |
787 | int err; | 797 | int err; |
798 | int port; | ||
788 | 799 | ||
789 | printk(KERN_INFO PFX "Initializing %s\n", | 800 | printk(KERN_INFO PFX "Initializing %s\n", |
790 | pci_name(pdev)); | 801 | pci_name(pdev)); |
@@ -894,6 +905,9 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
894 | if (err) | 905 | if (err) |
895 | goto err_close; | 906 | goto err_close; |
896 | 907 | ||
908 | for (port = 1; port <= dev->caps.num_ports; port++) | ||
909 | mlx4_init_port_info(dev, port); | ||
910 | |||
897 | err = mlx4_register_device(dev); | 911 | err = mlx4_register_device(dev); |
898 | if (err) | 912 | if (err) |
899 | goto err_cleanup; | 913 | goto err_cleanup; |