aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/mlx4/cq.c2
-rw-r--r--drivers/net/mlx4/eq.c13
-rw-r--r--drivers/net/mlx4/main.c38
-rw-r--r--drivers/net/mlx4/mcg.c2
-rw-r--r--drivers/net/mlx4/mr.c2
-rw-r--r--drivers/net/mlx4/pd.c2
-rw-r--r--drivers/net/mlx4/qp.c2
-rw-r--r--drivers/net/mlx4/srq.c2
8 files changed, 33 insertions, 30 deletions
diff --git a/drivers/net/mlx4/cq.c b/drivers/net/mlx4/cq.c
index 39253d0c1590..d4441fee3d80 100644
--- a/drivers/net/mlx4/cq.c
+++ b/drivers/net/mlx4/cq.c
@@ -231,7 +231,7 @@ void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq)
231} 231}
232EXPORT_SYMBOL_GPL(mlx4_cq_free); 232EXPORT_SYMBOL_GPL(mlx4_cq_free);
233 233
234int __devinit mlx4_init_cq_table(struct mlx4_dev *dev) 234int mlx4_init_cq_table(struct mlx4_dev *dev)
235{ 235{
236 struct mlx4_cq_table *cq_table = &mlx4_priv(dev)->cq_table; 236 struct mlx4_cq_table *cq_table = &mlx4_priv(dev)->cq_table;
237 int err; 237 int err;
diff --git a/drivers/net/mlx4/eq.c b/drivers/net/mlx4/eq.c
index 2095c843fa15..9c36c2034030 100644
--- a/drivers/net/mlx4/eq.c
+++ b/drivers/net/mlx4/eq.c
@@ -300,8 +300,7 @@ static int mlx4_HW2SW_EQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
300 MLX4_CMD_TIME_CLASS_A); 300 MLX4_CMD_TIME_CLASS_A);
301} 301}
302 302
303static void __devinit __iomem *mlx4_get_eq_uar(struct mlx4_dev *dev, 303static void __iomem *mlx4_get_eq_uar(struct mlx4_dev *dev, struct mlx4_eq *eq)
304 struct mlx4_eq *eq)
305{ 304{
306 struct mlx4_priv *priv = mlx4_priv(dev); 305 struct mlx4_priv *priv = mlx4_priv(dev);
307 int index; 306 int index;
@@ -323,8 +322,8 @@ static void __devinit __iomem *mlx4_get_eq_uar(struct mlx4_dev *dev,
323 return priv->eq_table.uar_map[index] + 0x800 + 8 * (eq->eqn % 4); 322 return priv->eq_table.uar_map[index] + 0x800 + 8 * (eq->eqn % 4);
324} 323}
325 324
326static int __devinit mlx4_create_eq(struct mlx4_dev *dev, int nent, 325static int mlx4_create_eq(struct mlx4_dev *dev, int nent,
327 u8 intr, struct mlx4_eq *eq) 326 u8 intr, struct mlx4_eq *eq)
328{ 327{
329 struct mlx4_priv *priv = mlx4_priv(dev); 328 struct mlx4_priv *priv = mlx4_priv(dev);
330 struct mlx4_cmd_mailbox *mailbox; 329 struct mlx4_cmd_mailbox *mailbox;
@@ -485,7 +484,7 @@ static void mlx4_free_irqs(struct mlx4_dev *dev)
485 free_irq(eq_table->eq[i].irq, eq_table->eq + i); 484 free_irq(eq_table->eq[i].irq, eq_table->eq + i);
486} 485}
487 486
488static int __devinit mlx4_map_clr_int(struct mlx4_dev *dev) 487static int mlx4_map_clr_int(struct mlx4_dev *dev)
489{ 488{
490 struct mlx4_priv *priv = mlx4_priv(dev); 489 struct mlx4_priv *priv = mlx4_priv(dev);
491 490
@@ -506,7 +505,7 @@ static void mlx4_unmap_clr_int(struct mlx4_dev *dev)
506 iounmap(priv->clr_base); 505 iounmap(priv->clr_base);
507} 506}
508 507
509int __devinit mlx4_map_eq_icm(struct mlx4_dev *dev, u64 icm_virt) 508int mlx4_map_eq_icm(struct mlx4_dev *dev, u64 icm_virt)
510{ 509{
511 struct mlx4_priv *priv = mlx4_priv(dev); 510 struct mlx4_priv *priv = mlx4_priv(dev);
512 int ret; 511 int ret;
@@ -548,7 +547,7 @@ void mlx4_unmap_eq_icm(struct mlx4_dev *dev)
548 __free_page(priv->eq_table.icm_page); 547 __free_page(priv->eq_table.icm_page);
549} 548}
550 549
551int __devinit mlx4_init_eq_table(struct mlx4_dev *dev) 550int mlx4_init_eq_table(struct mlx4_dev *dev)
552{ 551{
553 struct mlx4_priv *priv = mlx4_priv(dev); 552 struct mlx4_priv *priv = mlx4_priv(dev);
554 int err; 553 int err;
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[] = {
diff --git a/drivers/net/mlx4/mcg.c b/drivers/net/mlx4/mcg.c
index 672024a0ee71..a99e7729d333 100644
--- a/drivers/net/mlx4/mcg.c
+++ b/drivers/net/mlx4/mcg.c
@@ -359,7 +359,7 @@ out:
359} 359}
360EXPORT_SYMBOL_GPL(mlx4_multicast_detach); 360EXPORT_SYMBOL_GPL(mlx4_multicast_detach);
361 361
362int __devinit mlx4_init_mcg_table(struct mlx4_dev *dev) 362int mlx4_init_mcg_table(struct mlx4_dev *dev)
363{ 363{
364 struct mlx4_priv *priv = mlx4_priv(dev); 364 struct mlx4_priv *priv = mlx4_priv(dev);
365 int err; 365 int err;
diff --git a/drivers/net/mlx4/mr.c b/drivers/net/mlx4/mr.c
index 4bc39e65015a..0c05a10bae3b 100644
--- a/drivers/net/mlx4/mr.c
+++ b/drivers/net/mlx4/mr.c
@@ -430,7 +430,7 @@ int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
430} 430}
431EXPORT_SYMBOL_GPL(mlx4_buf_write_mtt); 431EXPORT_SYMBOL_GPL(mlx4_buf_write_mtt);
432 432
433int __devinit mlx4_init_mr_table(struct mlx4_dev *dev) 433int mlx4_init_mr_table(struct mlx4_dev *dev)
434{ 434{
435 struct mlx4_mr_table *mr_table = &mlx4_priv(dev)->mr_table; 435 struct mlx4_mr_table *mr_table = &mlx4_priv(dev)->mr_table;
436 int err; 436 int err;
diff --git a/drivers/net/mlx4/pd.c b/drivers/net/mlx4/pd.c
index 23dea1ee7750..3a93c5f0f7ab 100644
--- a/drivers/net/mlx4/pd.c
+++ b/drivers/net/mlx4/pd.c
@@ -57,7 +57,7 @@ void mlx4_pd_free(struct mlx4_dev *dev, u32 pdn)
57} 57}
58EXPORT_SYMBOL_GPL(mlx4_pd_free); 58EXPORT_SYMBOL_GPL(mlx4_pd_free);
59 59
60int __devinit mlx4_init_pd_table(struct mlx4_dev *dev) 60int mlx4_init_pd_table(struct mlx4_dev *dev)
61{ 61{
62 struct mlx4_priv *priv = mlx4_priv(dev); 62 struct mlx4_priv *priv = mlx4_priv(dev);
63 63
diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c
index 278414b2d01c..cc4b1be18219 100644
--- a/drivers/net/mlx4/qp.c
+++ b/drivers/net/mlx4/qp.c
@@ -251,7 +251,7 @@ static int mlx4_CONF_SPECIAL_QP(struct mlx4_dev *dev, u32 base_qpn)
251 MLX4_CMD_TIME_CLASS_B); 251 MLX4_CMD_TIME_CLASS_B);
252} 252}
253 253
254int __devinit mlx4_init_qp_table(struct mlx4_dev *dev) 254int mlx4_init_qp_table(struct mlx4_dev *dev)
255{ 255{
256 struct mlx4_qp_table *qp_table = &mlx4_priv(dev)->qp_table; 256 struct mlx4_qp_table *qp_table = &mlx4_priv(dev)->qp_table;
257 int err; 257 int err;
diff --git a/drivers/net/mlx4/srq.c b/drivers/net/mlx4/srq.c
index 31b255a32915..d23f46d692ef 100644
--- a/drivers/net/mlx4/srq.c
+++ b/drivers/net/mlx4/srq.c
@@ -235,7 +235,7 @@ err_out:
235} 235}
236EXPORT_SYMBOL_GPL(mlx4_srq_query); 236EXPORT_SYMBOL_GPL(mlx4_srq_query);
237 237
238int __devinit mlx4_init_srq_table(struct mlx4_dev *dev) 238int mlx4_init_srq_table(struct mlx4_dev *dev)
239{ 239{
240 struct mlx4_srq_table *srq_table = &mlx4_priv(dev)->srq_table; 240 struct mlx4_srq_table *srq_table = &mlx4_priv(dev)->srq_table;
241 int err; 241 int err;