diff options
author | Parav Pandit <parav@mellanox.com> | 2018-10-17 06:21:08 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-10-17 11:43:07 -0400 |
commit | 76d865b87c327b34c0e24f23e75828878022f899 (patch) | |
tree | e079ddd96ff62694c23d754058bcc482ab3ed50f | |
parent | 548cb4fbe80d68b9d1b8b30aca179636e74bec36 (diff) |
RDMA/core: Fix comment for hw stats init for port == 0
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>
-rw-r--r-- | drivers/infiniband/core/sysfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index f54f107ef668..6fcce2c206c6 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c | |||
@@ -1120,9 +1120,9 @@ static int add_port(struct ib_device *device, int port_num, | |||
1120 | } | 1120 | } |
1121 | 1121 | ||
1122 | /* | 1122 | /* |
1123 | * If port == 0, it means we have only one port and the parent | 1123 | * If port == 0, it means hw_counters are per device and not per |
1124 | * device, not this port device, should be the holder of the | 1124 | * port, so holder should be device. Therefore skip per port conunter |
1125 | * hw_counters | 1125 | * initialization. |
1126 | */ | 1126 | */ |
1127 | if (device->alloc_hw_stats && port_num) | 1127 | if (device->alloc_hw_stats && port_num) |
1128 | setup_hw_stats(device, p, port_num); | 1128 | setup_hw_stats(device, p, port_num); |