diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_verbs.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 059701d6a19..ab4d5331e81 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -981,6 +981,7 @@ static int ipath_verbs_register_sysfs(struct ib_device *dev); | |||
981 | */ | 981 | */ |
982 | static void *ipath_register_ib_device(int unit, struct ipath_devdata *dd) | 982 | static void *ipath_register_ib_device(int unit, struct ipath_devdata *dd) |
983 | { | 983 | { |
984 | struct ipath_layer_counters cntrs; | ||
984 | struct ipath_ibdev *idev; | 985 | struct ipath_ibdev *idev; |
985 | struct ib_device *dev; | 986 | struct ib_device *dev; |
986 | int ret; | 987 | int ret; |
@@ -1031,6 +1032,25 @@ static void *ipath_register_ib_device(int unit, struct ipath_devdata *dd) | |||
1031 | idev->pma_counter_select[5] = IB_PMA_PORT_XMIT_WAIT; | 1032 | idev->pma_counter_select[5] = IB_PMA_PORT_XMIT_WAIT; |
1032 | idev->link_width_enabled = 3; /* 1x or 4x */ | 1033 | idev->link_width_enabled = 3; /* 1x or 4x */ |
1033 | 1034 | ||
1035 | /* Snapshot current HW counters to "clear" them. */ | ||
1036 | ipath_layer_get_counters(dd, &cntrs); | ||
1037 | idev->z_symbol_error_counter = cntrs.symbol_error_counter; | ||
1038 | idev->z_link_error_recovery_counter = | ||
1039 | cntrs.link_error_recovery_counter; | ||
1040 | idev->z_link_downed_counter = cntrs.link_downed_counter; | ||
1041 | idev->z_port_rcv_errors = cntrs.port_rcv_errors; | ||
1042 | idev->z_port_rcv_remphys_errors = | ||
1043 | cntrs.port_rcv_remphys_errors; | ||
1044 | idev->z_port_xmit_discards = cntrs.port_xmit_discards; | ||
1045 | idev->z_port_xmit_data = cntrs.port_xmit_data; | ||
1046 | idev->z_port_rcv_data = cntrs.port_rcv_data; | ||
1047 | idev->z_port_xmit_packets = cntrs.port_xmit_packets; | ||
1048 | idev->z_port_rcv_packets = cntrs.port_rcv_packets; | ||
1049 | idev->z_local_link_integrity_errors = | ||
1050 | cntrs.local_link_integrity_errors; | ||
1051 | idev->z_excessive_buffer_overrun_errors = | ||
1052 | cntrs.excessive_buffer_overrun_errors; | ||
1053 | |||
1034 | /* | 1054 | /* |
1035 | * The system image GUID is supposed to be the same for all | 1055 | * The system image GUID is supposed to be the same for all |
1036 | * IB HCAs in a single system but since there can be other | 1056 | * IB HCAs in a single system but since there can be other |