diff options
author | Bryan O'Sullivan <bos@pathscale.com> | 2006-07-01 07:35:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-01 12:55:58 -0400 |
commit | 443a64abbcb130caa315eb1110d7146365846235 (patch) | |
tree | 4d026a545c69fffe3f387f53155aede10615cb68 /drivers/infiniband | |
parent | 345a6e6aea43cd544c682601926bbd11c09c999b (diff) |
[PATCH] IB/ipath: name zero counter offsets so it's clear they aren't counters
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Cc: "Michael S. Tsirkin" <mst@mellanox.co.il>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_mad.c | 80 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.h | 22 |
3 files changed, 52 insertions, 52 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c b/drivers/infiniband/hw/ipath/ipath_mad.c index 1a9d0a2c33c3..7c38416ee91c 100644 --- a/drivers/infiniband/hw/ipath/ipath_mad.c +++ b/drivers/infiniband/hw/ipath/ipath_mad.c | |||
@@ -215,7 +215,7 @@ static int recv_subn_get_portinfo(struct ib_smp *smp, | |||
215 | /* P_KeyViolations are counted by hardware. */ | 215 | /* P_KeyViolations are counted by hardware. */ |
216 | pip->pkey_violations = | 216 | pip->pkey_violations = |
217 | cpu_to_be16((ipath_layer_get_cr_errpkey(dev->dd) - | 217 | cpu_to_be16((ipath_layer_get_cr_errpkey(dev->dd) - |
218 | dev->n_pkey_violations) & 0xFFFF); | 218 | dev->z_pkey_violations) & 0xFFFF); |
219 | pip->qkey_violations = cpu_to_be16(dev->qkey_violations); | 219 | pip->qkey_violations = cpu_to_be16(dev->qkey_violations); |
220 | /* Only the hardware GUID is supported for now */ | 220 | /* Only the hardware GUID is supported for now */ |
221 | pip->guid_cap = 1; | 221 | pip->guid_cap = 1; |
@@ -389,7 +389,7 @@ static int recv_subn_set_portinfo(struct ib_smp *smp, | |||
389 | * later. | 389 | * later. |
390 | */ | 390 | */ |
391 | if (pip->pkey_violations == 0) | 391 | if (pip->pkey_violations == 0) |
392 | dev->n_pkey_violations = | 392 | dev->z_pkey_violations = |
393 | ipath_layer_get_cr_errpkey(dev->dd); | 393 | ipath_layer_get_cr_errpkey(dev->dd); |
394 | 394 | ||
395 | if (pip->qkey_violations == 0) | 395 | if (pip->qkey_violations == 0) |
@@ -844,18 +844,18 @@ static int recv_pma_get_portcounters(struct ib_perf *pmp, | |||
844 | ipath_layer_get_counters(dev->dd, &cntrs); | 844 | ipath_layer_get_counters(dev->dd, &cntrs); |
845 | 845 | ||
846 | /* Adjust counters for any resets done. */ | 846 | /* Adjust counters for any resets done. */ |
847 | cntrs.symbol_error_counter -= dev->n_symbol_error_counter; | 847 | cntrs.symbol_error_counter -= dev->z_symbol_error_counter; |
848 | cntrs.link_error_recovery_counter -= | 848 | cntrs.link_error_recovery_counter -= |
849 | dev->n_link_error_recovery_counter; | 849 | dev->z_link_error_recovery_counter; |
850 | cntrs.link_downed_counter -= dev->n_link_downed_counter; | 850 | cntrs.link_downed_counter -= dev->z_link_downed_counter; |
851 | cntrs.port_rcv_errors += dev->rcv_errors; | 851 | cntrs.port_rcv_errors += dev->rcv_errors; |
852 | cntrs.port_rcv_errors -= dev->n_port_rcv_errors; | 852 | cntrs.port_rcv_errors -= dev->z_port_rcv_errors; |
853 | cntrs.port_rcv_remphys_errors -= dev->n_port_rcv_remphys_errors; | 853 | cntrs.port_rcv_remphys_errors -= dev->z_port_rcv_remphys_errors; |
854 | cntrs.port_xmit_discards -= dev->n_port_xmit_discards; | 854 | cntrs.port_xmit_discards -= dev->z_port_xmit_discards; |
855 | cntrs.port_xmit_data -= dev->n_port_xmit_data; | 855 | cntrs.port_xmit_data -= dev->z_port_xmit_data; |
856 | cntrs.port_rcv_data -= dev->n_port_rcv_data; | 856 | cntrs.port_rcv_data -= dev->z_port_rcv_data; |
857 | cntrs.port_xmit_packets -= dev->n_port_xmit_packets; | 857 | cntrs.port_xmit_packets -= dev->z_port_xmit_packets; |
858 | cntrs.port_rcv_packets -= dev->n_port_rcv_packets; | 858 | cntrs.port_rcv_packets -= dev->z_port_rcv_packets; |
859 | 859 | ||
860 | memset(pmp->data, 0, sizeof(pmp->data)); | 860 | memset(pmp->data, 0, sizeof(pmp->data)); |
861 | 861 | ||
@@ -928,10 +928,10 @@ static int recv_pma_get_portcounters_ext(struct ib_perf *pmp, | |||
928 | &rpkts, &xwait); | 928 | &rpkts, &xwait); |
929 | 929 | ||
930 | /* Adjust counters for any resets done. */ | 930 | /* Adjust counters for any resets done. */ |
931 | swords -= dev->n_port_xmit_data; | 931 | swords -= dev->z_port_xmit_data; |
932 | rwords -= dev->n_port_rcv_data; | 932 | rwords -= dev->z_port_rcv_data; |
933 | spkts -= dev->n_port_xmit_packets; | 933 | spkts -= dev->z_port_xmit_packets; |
934 | rpkts -= dev->n_port_rcv_packets; | 934 | rpkts -= dev->z_port_rcv_packets; |
935 | 935 | ||
936 | memset(pmp->data, 0, sizeof(pmp->data)); | 936 | memset(pmp->data, 0, sizeof(pmp->data)); |
937 | 937 | ||
@@ -967,37 +967,37 @@ static int recv_pma_set_portcounters(struct ib_perf *pmp, | |||
967 | ipath_layer_get_counters(dev->dd, &cntrs); | 967 | ipath_layer_get_counters(dev->dd, &cntrs); |
968 | 968 | ||
969 | if (p->counter_select & IB_PMA_SEL_SYMBOL_ERROR) | 969 | if (p->counter_select & IB_PMA_SEL_SYMBOL_ERROR) |
970 | dev->n_symbol_error_counter = cntrs.symbol_error_counter; | 970 | dev->z_symbol_error_counter = cntrs.symbol_error_counter; |
971 | 971 | ||
972 | if (p->counter_select & IB_PMA_SEL_LINK_ERROR_RECOVERY) | 972 | if (p->counter_select & IB_PMA_SEL_LINK_ERROR_RECOVERY) |
973 | dev->n_link_error_recovery_counter = | 973 | dev->z_link_error_recovery_counter = |
974 | cntrs.link_error_recovery_counter; | 974 | cntrs.link_error_recovery_counter; |
975 | 975 | ||
976 | if (p->counter_select & IB_PMA_SEL_LINK_DOWNED) | 976 | if (p->counter_select & IB_PMA_SEL_LINK_DOWNED) |
977 | dev->n_link_downed_counter = cntrs.link_downed_counter; | 977 | dev->z_link_downed_counter = cntrs.link_downed_counter; |
978 | 978 | ||
979 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_ERRORS) | 979 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_ERRORS) |
980 | dev->n_port_rcv_errors = | 980 | dev->z_port_rcv_errors = |
981 | cntrs.port_rcv_errors + dev->rcv_errors; | 981 | cntrs.port_rcv_errors + dev->rcv_errors; |
982 | 982 | ||
983 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_REMPHYS_ERRORS) | 983 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_REMPHYS_ERRORS) |
984 | dev->n_port_rcv_remphys_errors = | 984 | dev->z_port_rcv_remphys_errors = |
985 | cntrs.port_rcv_remphys_errors; | 985 | cntrs.port_rcv_remphys_errors; |
986 | 986 | ||
987 | if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DISCARDS) | 987 | if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DISCARDS) |
988 | dev->n_port_xmit_discards = cntrs.port_xmit_discards; | 988 | dev->z_port_xmit_discards = cntrs.port_xmit_discards; |
989 | 989 | ||
990 | if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DATA) | 990 | if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DATA) |
991 | dev->n_port_xmit_data = cntrs.port_xmit_data; | 991 | dev->z_port_xmit_data = cntrs.port_xmit_data; |
992 | 992 | ||
993 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_DATA) | 993 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_DATA) |
994 | dev->n_port_rcv_data = cntrs.port_rcv_data; | 994 | dev->z_port_rcv_data = cntrs.port_rcv_data; |
995 | 995 | ||
996 | if (p->counter_select & IB_PMA_SEL_PORT_XMIT_PACKETS) | 996 | if (p->counter_select & IB_PMA_SEL_PORT_XMIT_PACKETS) |
997 | dev->n_port_xmit_packets = cntrs.port_xmit_packets; | 997 | dev->z_port_xmit_packets = cntrs.port_xmit_packets; |
998 | 998 | ||
999 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_PACKETS) | 999 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_PACKETS) |
1000 | dev->n_port_rcv_packets = cntrs.port_rcv_packets; | 1000 | dev->z_port_rcv_packets = cntrs.port_rcv_packets; |
1001 | 1001 | ||
1002 | return recv_pma_get_portcounters(pmp, ibdev, port); | 1002 | return recv_pma_get_portcounters(pmp, ibdev, port); |
1003 | } | 1003 | } |
@@ -1014,16 +1014,16 @@ static int recv_pma_set_portcounters_ext(struct ib_perf *pmp, | |||
1014 | &rpkts, &xwait); | 1014 | &rpkts, &xwait); |
1015 | 1015 | ||
1016 | if (p->counter_select & IB_PMA_SELX_PORT_XMIT_DATA) | 1016 | if (p->counter_select & IB_PMA_SELX_PORT_XMIT_DATA) |
1017 | dev->n_port_xmit_data = swords; | 1017 | dev->z_port_xmit_data = swords; |
1018 | 1018 | ||
1019 | if (p->counter_select & IB_PMA_SELX_PORT_RCV_DATA) | 1019 | if (p->counter_select & IB_PMA_SELX_PORT_RCV_DATA) |
1020 | dev->n_port_rcv_data = rwords; | 1020 | dev->z_port_rcv_data = rwords; |
1021 | 1021 | ||
1022 | if (p->counter_select & IB_PMA_SELX_PORT_XMIT_PACKETS) | 1022 | if (p->counter_select & IB_PMA_SELX_PORT_XMIT_PACKETS) |
1023 | dev->n_port_xmit_packets = spkts; | 1023 | dev->z_port_xmit_packets = spkts; |
1024 | 1024 | ||
1025 | if (p->counter_select & IB_PMA_SELX_PORT_RCV_PACKETS) | 1025 | if (p->counter_select & IB_PMA_SELX_PORT_RCV_PACKETS) |
1026 | dev->n_port_rcv_packets = rpkts; | 1026 | dev->z_port_rcv_packets = rpkts; |
1027 | 1027 | ||
1028 | if (p->counter_select & IB_PMA_SELX_PORT_UNI_XMIT_PACKETS) | 1028 | if (p->counter_select & IB_PMA_SELX_PORT_UNI_XMIT_PACKETS) |
1029 | dev->n_unicast_xmit = 0; | 1029 | dev->n_unicast_xmit = 0; |
@@ -1285,18 +1285,18 @@ int ipath_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, | |||
1285 | 1285 | ||
1286 | ipath_layer_get_counters(to_idev(ibdev)->dd, &cntrs); | 1286 | ipath_layer_get_counters(to_idev(ibdev)->dd, &cntrs); |
1287 | dev->rcv_errors++; | 1287 | dev->rcv_errors++; |
1288 | dev->n_symbol_error_counter = cntrs.symbol_error_counter; | 1288 | dev->z_symbol_error_counter = cntrs.symbol_error_counter; |
1289 | dev->n_link_error_recovery_counter = | 1289 | dev->z_link_error_recovery_counter = |
1290 | cntrs.link_error_recovery_counter; | 1290 | cntrs.link_error_recovery_counter; |
1291 | dev->n_link_downed_counter = cntrs.link_downed_counter; | 1291 | dev->z_link_downed_counter = cntrs.link_downed_counter; |
1292 | dev->n_port_rcv_errors = cntrs.port_rcv_errors + 1; | 1292 | dev->z_port_rcv_errors = cntrs.port_rcv_errors + 1; |
1293 | dev->n_port_rcv_remphys_errors = | 1293 | dev->z_port_rcv_remphys_errors = |
1294 | cntrs.port_rcv_remphys_errors; | 1294 | cntrs.port_rcv_remphys_errors; |
1295 | dev->n_port_xmit_discards = cntrs.port_xmit_discards; | 1295 | dev->z_port_xmit_discards = cntrs.port_xmit_discards; |
1296 | dev->n_port_xmit_data = cntrs.port_xmit_data; | 1296 | dev->z_port_xmit_data = cntrs.port_xmit_data; |
1297 | dev->n_port_rcv_data = cntrs.port_rcv_data; | 1297 | dev->z_port_rcv_data = cntrs.port_rcv_data; |
1298 | dev->n_port_xmit_packets = cntrs.port_xmit_packets; | 1298 | dev->z_port_xmit_packets = cntrs.port_xmit_packets; |
1299 | dev->n_port_rcv_packets = cntrs.port_rcv_packets; | 1299 | dev->z_port_rcv_packets = cntrs.port_rcv_packets; |
1300 | } | 1300 | } |
1301 | switch (in_mad->mad_hdr.mgmt_class) { | 1301 | switch (in_mad->mad_hdr.mgmt_class) { |
1302 | case IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE: | 1302 | case IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE: |
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 28fdbdaa789d..507a99b0caff 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -646,7 +646,7 @@ static int ipath_query_port(struct ib_device *ibdev, | |||
646 | props->max_msg_sz = 4096; | 646 | props->max_msg_sz = 4096; |
647 | props->pkey_tbl_len = ipath_layer_get_npkeys(dev->dd); | 647 | props->pkey_tbl_len = ipath_layer_get_npkeys(dev->dd); |
648 | props->bad_pkey_cntr = ipath_layer_get_cr_errpkey(dev->dd) - | 648 | props->bad_pkey_cntr = ipath_layer_get_cr_errpkey(dev->dd) - |
649 | dev->n_pkey_violations; | 649 | dev->z_pkey_violations; |
650 | props->qkey_viol_cntr = dev->qkey_violations; | 650 | props->qkey_viol_cntr = dev->qkey_violations; |
651 | props->active_width = IB_WIDTH_4X; | 651 | props->active_width = IB_WIDTH_4X; |
652 | /* See rate_show() */ | 652 | /* See rate_show() */ |
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.h b/drivers/infiniband/hw/ipath/ipath_verbs.h index 4f8d59300e9b..759031213a22 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.h +++ b/drivers/infiniband/hw/ipath/ipath_verbs.h | |||
@@ -442,17 +442,17 @@ struct ipath_ibdev { | |||
442 | u64 n_unicast_rcv; /* total unicast packets received */ | 442 | u64 n_unicast_rcv; /* total unicast packets received */ |
443 | u64 n_multicast_xmit; /* total multicast packets sent */ | 443 | u64 n_multicast_xmit; /* total multicast packets sent */ |
444 | u64 n_multicast_rcv; /* total multicast packets received */ | 444 | u64 n_multicast_rcv; /* total multicast packets received */ |
445 | u64 n_symbol_error_counter; /* starting count for PMA */ | 445 | u64 z_symbol_error_counter; /* starting count for PMA */ |
446 | u64 n_link_error_recovery_counter; /* starting count for PMA */ | 446 | u64 z_link_error_recovery_counter; /* starting count for PMA */ |
447 | u64 n_link_downed_counter; /* starting count for PMA */ | 447 | u64 z_link_downed_counter; /* starting count for PMA */ |
448 | u64 n_port_rcv_errors; /* starting count for PMA */ | 448 | u64 z_port_rcv_errors; /* starting count for PMA */ |
449 | u64 n_port_rcv_remphys_errors; /* starting count for PMA */ | 449 | u64 z_port_rcv_remphys_errors; /* starting count for PMA */ |
450 | u64 n_port_xmit_discards; /* starting count for PMA */ | 450 | u64 z_port_xmit_discards; /* starting count for PMA */ |
451 | u64 n_port_xmit_data; /* starting count for PMA */ | 451 | u64 z_port_xmit_data; /* starting count for PMA */ |
452 | u64 n_port_rcv_data; /* starting count for PMA */ | 452 | u64 z_port_rcv_data; /* starting count for PMA */ |
453 | u64 n_port_xmit_packets; /* starting count for PMA */ | 453 | u64 z_port_xmit_packets; /* starting count for PMA */ |
454 | u64 n_port_rcv_packets; /* starting count for PMA */ | 454 | u64 z_port_rcv_packets; /* starting count for PMA */ |
455 | u32 n_pkey_violations; /* starting count for PMA */ | 455 | u32 z_pkey_violations; /* starting count for PMA */ |
456 | u32 n_rc_resends; | 456 | u32 n_rc_resends; |
457 | u32 n_rc_acks; | 457 | u32 n_rc_acks; |
458 | u32 n_rc_qacks; | 458 | u32 n_rc_qacks; |