aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/mlx4/main.c')
-rw-r--r--drivers/infiniband/hw/mlx4/main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index d8287d9db41e..96a39b5c9254 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -52,7 +52,7 @@ MODULE_DESCRIPTION("Mellanox ConnectX HCA InfiniBand driver");
52MODULE_LICENSE("Dual BSD/GPL"); 52MODULE_LICENSE("Dual BSD/GPL");
53MODULE_VERSION(DRV_VERSION); 53MODULE_VERSION(DRV_VERSION);
54 54
55static const char mlx4_ib_version[] __devinitdata = 55static const char mlx4_ib_version[] =
56 DRV_NAME ": Mellanox ConnectX InfiniBand driver v" 56 DRV_NAME ": Mellanox ConnectX InfiniBand driver v"
57 DRV_VERSION " (" DRV_RELDATE ")\n"; 57 DRV_VERSION " (" DRV_RELDATE ")\n";
58 58
@@ -468,6 +468,7 @@ static int init_node_data(struct mlx4_ib_dev *dev)
468 if (err) 468 if (err)
469 goto out; 469 goto out;
470 470
471 dev->dev->rev_id = be32_to_cpup((__be32 *) (out_mad->data + 32));
471 memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8); 472 memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8);
472 473
473out: 474out:
@@ -516,9 +517,16 @@ static struct class_device_attribute *mlx4_class_attributes[] = {
516 517
517static void *mlx4_ib_add(struct mlx4_dev *dev) 518static void *mlx4_ib_add(struct mlx4_dev *dev)
518{ 519{
520 static int mlx4_ib_version_printed;
519 struct mlx4_ib_dev *ibdev; 521 struct mlx4_ib_dev *ibdev;
520 int i; 522 int i;
521 523
524
525 if (!mlx4_ib_version_printed) {
526 printk(KERN_INFO "%s", mlx4_ib_version);
527 ++mlx4_ib_version_printed;
528 }
529
522 ibdev = (struct mlx4_ib_dev *) ib_alloc_device(sizeof *ibdev); 530 ibdev = (struct mlx4_ib_dev *) ib_alloc_device(sizeof *ibdev);
523 if (!ibdev) { 531 if (!ibdev) {
524 dev_err(&dev->pdev->dev, "Device struct alloc failed\n"); 532 dev_err(&dev->pdev->dev, "Device struct alloc failed\n");