]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
RDMA/core: Fix comment for hw stats init for port == 0
authorParav Pandit <parav@mellanox.com>
Wed, 17 Oct 2018 10:21:08 +0000 (13:21 +0300)
committerDoug Ledford <dledford@redhat.com>
Wed, 17 Oct 2018 15:43:07 +0000 (11:43 -0400)
When add_port() is done for port == 0, it indicates that ports hardware
counters initialization should be skipped. Reflect so in the comment.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/sysfs.c

index f54f107ef6683224791ad0503cc87caa0ce3b825..6fcce2c206c62144cbbe8fe998cd72b68051b85e 100644 (file)
@@ -1120,9 +1120,9 @@ static int add_port(struct ib_device *device, int port_num,
        }
 
        /*
-        * If port == 0, it means we have only one port and the parent
-        * device, not this port device, should be the holder of the
-        * hw_counters
+        * If port == 0, it means hw_counters are per device and not per
+        * port, so holder should be device. Therefore skip per port conunter
+        * initialization.
         */
        if (device->alloc_hw_stats && port_num)
                setup_hw_stats(device, p, port_num);