aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mlx4/main.c')
-rw-r--r--drivers/net/mlx4/main.c38
1 files changed, 21 insertions, 17 deletions
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index 478b3ba74edc..e029b8afbd37 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -85,7 +85,7 @@ static struct mlx4_profile default_profile = {
85 .num_mtt = 1 << 20, 85 .num_mtt = 1 << 20,
86}; 86};
87 87
88static int __devinit mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) 88static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
89{ 89{
90 int err; 90 int err;
91 int i; 91 int i;
@@ -256,10 +256,8 @@ err:
256 return err; 256 return err;
257} 257}
258 258
259static int __devinit mlx4_init_icm(struct mlx4_dev *dev, 259static int mlx4_init_icm(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap,
260 struct mlx4_dev_cap *dev_cap, 260 struct mlx4_init_hca_param *init_hca, u64 icm_size)
261 struct mlx4_init_hca_param *init_hca,
262 u64 icm_size)
263{ 261{
264 struct mlx4_priv *priv = mlx4_priv(dev); 262 struct mlx4_priv *priv = mlx4_priv(dev);
265 u64 aux_pages; 263 u64 aux_pages;
@@ -481,7 +479,7 @@ static void mlx4_close_hca(struct mlx4_dev *dev)
481 mlx4_free_icm(dev, mlx4_priv(dev)->fw.fw_icm, 0); 479 mlx4_free_icm(dev, mlx4_priv(dev)->fw.fw_icm, 0);
482} 480}
483 481
484static int __devinit mlx4_init_hca(struct mlx4_dev *dev) 482static int mlx4_init_hca(struct mlx4_dev *dev)
485{ 483{
486 struct mlx4_priv *priv = mlx4_priv(dev); 484 struct mlx4_priv *priv = mlx4_priv(dev);
487 struct mlx4_adapter adapter; 485 struct mlx4_adapter adapter;
@@ -554,7 +552,7 @@ err_stop_fw:
554 return err; 552 return err;
555} 553}
556 554
557static int __devinit mlx4_setup_hca(struct mlx4_dev *dev) 555static int mlx4_setup_hca(struct mlx4_dev *dev)
558{ 556{
559 struct mlx4_priv *priv = mlx4_priv(dev); 557 struct mlx4_priv *priv = mlx4_priv(dev);
560 int err; 558 int err;
@@ -721,19 +719,12 @@ no_msi:
721 priv->eq_table.eq[i].irq = dev->pdev->irq; 719 priv->eq_table.eq[i].irq = dev->pdev->irq;
722} 720}
723 721
724static int __devinit mlx4_init_one(struct pci_dev *pdev, 722static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
725 const struct pci_device_id *id)
726{ 723{
727 static int mlx4_version_printed;
728 struct mlx4_priv *priv; 724 struct mlx4_priv *priv;
729 struct mlx4_dev *dev; 725 struct mlx4_dev *dev;
730 int err; 726 int err;
731 727
732 if (!mlx4_version_printed) {
733 printk(KERN_INFO "%s", mlx4_version);
734 ++mlx4_version_printed;
735 }
736
737 printk(KERN_INFO PFX "Initializing %s\n", 728 printk(KERN_INFO PFX "Initializing %s\n",
738 pci_name(pdev)); 729 pci_name(pdev));
739 730
@@ -883,7 +874,20 @@ err_disable_pdev:
883 return err; 874 return err;
884} 875}
885 876
886static void __devexit mlx4_remove_one(struct pci_dev *pdev) 877static int __devinit mlx4_init_one(struct pci_dev *pdev,
878 const struct pci_device_id *id)
879{
880 static int mlx4_version_printed;
881
882 if (!mlx4_version_printed) {
883 printk(KERN_INFO "%s", mlx4_version);
884 ++mlx4_version_printed;
885 }
886
887 return mlx4_init_one(pdev, id);
888}
889
890static void mlx4_remove_one(struct pci_dev *pdev)
887{ 891{
888 struct mlx4_dev *dev = pci_get_drvdata(pdev); 892 struct mlx4_dev *dev = pci_get_drvdata(pdev);
889 struct mlx4_priv *priv = mlx4_priv(dev); 893 struct mlx4_priv *priv = mlx4_priv(dev);
@@ -924,7 +928,7 @@ static void __devexit mlx4_remove_one(struct pci_dev *pdev)
924int mlx4_restart_one(struct pci_dev *pdev) 928int mlx4_restart_one(struct pci_dev *pdev)
925{ 929{
926 mlx4_remove_one(pdev); 930 mlx4_remove_one(pdev);
927 return mlx4_init_one(pdev, NULL); 931 return __mlx4_init_one(pdev, NULL);
928} 932}
929 933
930static struct pci_device_id mlx4_pci_table[] = { 934static struct pci_device_id mlx4_pci_table[] = {