diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 15:05:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 15:05:17 -0400 |
commit | 8e9815a0f8882aaa68645b001bb7538db8886802 (patch) | |
tree | 5654a4f982ea681158185b21321acd470cb9b87c /drivers/infiniband/hw/nes | |
parent | 702c0b04978ce316ec05f4d0a9c148fac124335b (diff) | |
parent | acdc30b56abc0db7d409a13e9b6c72ea23b6f90d (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
RDMA/nes: Fix incorrect unlock in nes_process_mac_intr()
RDMA/nes: Async event for closed QP causes crash
RDMA/nes: Have ethtool read hardware registers for rx/tx stats
RDMA/cxgb4: Only insert sq qid in lookup table
RDMA/cxgb4: Support IB_WR_READ_WITH_INV opcode
RDMA/cxgb4: Set fence flag for inv-local-stag work requests
RDMA/cxgb4: Update some HW limits
RDMA/cxgb4: Don't limit fastreg page list depth
RDMA/cxgb4: Return proper errors in fastreg mr/pbl allocation
RDMA/cxgb4: Fix overflow bug in CQ arm
RDMA/cxgb4: Optimize CQ overflow detection
RDMA/cxgb4: CQ size must be IQ size - 2
RDMA/cxgb4: Register RDMA provider based on LLD state_change events
RDMA/cxgb4: Detach from the LLD after unregistering RDMA device
IB/ipath: Remove support for QLogic PCIe QLE devices
IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters
IB/mad: Make needlessly global mad_sendq_size/mad_recvq_size static
IB/core: Allow device-specific per-port sysfs files
mlx4_core: Clean up mlx4_alloc_icm() a bit
mlx4_core: Fix possible chunk sg list overflow in mlx4_alloc_icm()
Diffstat (limited to 'drivers/infiniband/hw/nes')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_hw.c | 12 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_nic.c | 72 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 2 |
3 files changed, 67 insertions, 19 deletions
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index 86acb7d5706..57874a16508 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c | |||
@@ -2584,7 +2584,6 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) | |||
2584 | break; | 2584 | break; |
2585 | } | 2585 | } |
2586 | } | 2586 | } |
2587 | spin_unlock_irqrestore(&nesadapter->phy_lock, flags); | ||
2588 | 2587 | ||
2589 | if (phy_data & 0x0004) { | 2588 | if (phy_data & 0x0004) { |
2590 | if (wide_ppm_offset && | 2589 | if (wide_ppm_offset && |
@@ -2639,6 +2638,8 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) | |||
2639 | } | 2638 | } |
2640 | } | 2639 | } |
2641 | 2640 | ||
2641 | spin_unlock_irqrestore(&nesadapter->phy_lock, flags); | ||
2642 | |||
2642 | nesadapter->mac_sw_state[mac_number] = NES_MAC_SW_IDLE; | 2643 | nesadapter->mac_sw_state[mac_number] = NES_MAC_SW_IDLE; |
2643 | } | 2644 | } |
2644 | 2645 | ||
@@ -3422,6 +3423,7 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, | |||
3422 | struct nes_adapter *nesadapter = nesdev->nesadapter; | 3423 | struct nes_adapter *nesadapter = nesdev->nesadapter; |
3423 | u32 aeq_info; | 3424 | u32 aeq_info; |
3424 | u32 next_iwarp_state = 0; | 3425 | u32 next_iwarp_state = 0; |
3426 | u32 aeqe_cq_id; | ||
3425 | u16 async_event_id; | 3427 | u16 async_event_id; |
3426 | u8 tcp_state; | 3428 | u8 tcp_state; |
3427 | u8 iwarp_state; | 3429 | u8 iwarp_state; |
@@ -3449,6 +3451,14 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, | |||
3449 | le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX]), aeqe, | 3451 | le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX]), aeqe, |
3450 | nes_tcp_state_str[tcp_state], nes_iwarp_state_str[iwarp_state]); | 3452 | nes_tcp_state_str[tcp_state], nes_iwarp_state_str[iwarp_state]); |
3451 | 3453 | ||
3454 | aeqe_cq_id = le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX]); | ||
3455 | if (aeq_info & NES_AEQE_QP) { | ||
3456 | if ((!nes_is_resource_allocated(nesadapter, nesadapter->allocated_qps, | ||
3457 | aeqe_cq_id)) || | ||
3458 | (atomic_read(&nesqp->close_timer_started))) | ||
3459 | return; | ||
3460 | } | ||
3461 | |||
3452 | switch (async_event_id) { | 3462 | switch (async_event_id) { |
3453 | case NES_AEQE_AEID_LLP_FIN_RECEIVED: | 3463 | case NES_AEQE_AEID_LLP_FIN_RECEIVED: |
3454 | if (nesqp->term_flags) | 3464 | if (nesqp->term_flags) |
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index e95e8d09ff3..5cc0a9ae5bb 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c | |||
@@ -1001,6 +1001,7 @@ static int nes_netdev_change_mtu(struct net_device *netdev, int new_mtu) | |||
1001 | return ret; | 1001 | return ret; |
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | |||
1004 | static const char nes_ethtool_stringset[][ETH_GSTRING_LEN] = { | 1005 | static const char nes_ethtool_stringset[][ETH_GSTRING_LEN] = { |
1005 | "Link Change Interrupts", | 1006 | "Link Change Interrupts", |
1006 | "Linearized SKBs", | 1007 | "Linearized SKBs", |
@@ -1015,11 +1016,15 @@ static const char nes_ethtool_stringset[][ETH_GSTRING_LEN] = { | |||
1015 | "Rx Jabber Errors", | 1016 | "Rx Jabber Errors", |
1016 | "Rx Oversized Frames", | 1017 | "Rx Oversized Frames", |
1017 | "Rx Short Frames", | 1018 | "Rx Short Frames", |
1019 | "Rx Length Errors", | ||
1020 | "Rx CRC Errors", | ||
1021 | "Rx Port Discard", | ||
1018 | "Endnode Rx Discards", | 1022 | "Endnode Rx Discards", |
1019 | "Endnode Rx Octets", | 1023 | "Endnode Rx Octets", |
1020 | "Endnode Rx Frames", | 1024 | "Endnode Rx Frames", |
1021 | "Endnode Tx Octets", | 1025 | "Endnode Tx Octets", |
1022 | "Endnode Tx Frames", | 1026 | "Endnode Tx Frames", |
1027 | "Tx Errors", | ||
1023 | "mh detected", | 1028 | "mh detected", |
1024 | "mh pauses", | 1029 | "mh pauses", |
1025 | "Retransmission Count", | 1030 | "Retransmission Count", |
@@ -1048,19 +1053,13 @@ static const char nes_ethtool_stringset[][ETH_GSTRING_LEN] = { | |||
1048 | "CM Nodes Destroyed", | 1053 | "CM Nodes Destroyed", |
1049 | "CM Accel Drops", | 1054 | "CM Accel Drops", |
1050 | "CM Resets Received", | 1055 | "CM Resets Received", |
1056 | "Free 4Kpbls", | ||
1057 | "Free 256pbls", | ||
1051 | "Timer Inits", | 1058 | "Timer Inits", |
1052 | "CQ Depth 1", | ||
1053 | "CQ Depth 4", | ||
1054 | "CQ Depth 16", | ||
1055 | "CQ Depth 24", | ||
1056 | "CQ Depth 32", | ||
1057 | "CQ Depth 128", | ||
1058 | "CQ Depth 256", | ||
1059 | "LRO aggregated", | 1059 | "LRO aggregated", |
1060 | "LRO flushed", | 1060 | "LRO flushed", |
1061 | "LRO no_desc", | 1061 | "LRO no_desc", |
1062 | }; | 1062 | }; |
1063 | |||
1064 | #define NES_ETHTOOL_STAT_COUNT ARRAY_SIZE(nes_ethtool_stringset) | 1063 | #define NES_ETHTOOL_STAT_COUNT ARRAY_SIZE(nes_ethtool_stringset) |
1065 | 1064 | ||
1066 | /** | 1065 | /** |
@@ -1120,12 +1119,14 @@ static void nes_netdev_get_strings(struct net_device *netdev, u32 stringset, | |||
1120 | /** | 1119 | /** |
1121 | * nes_netdev_get_ethtool_stats | 1120 | * nes_netdev_get_ethtool_stats |
1122 | */ | 1121 | */ |
1122 | |||
1123 | static void nes_netdev_get_ethtool_stats(struct net_device *netdev, | 1123 | static void nes_netdev_get_ethtool_stats(struct net_device *netdev, |
1124 | struct ethtool_stats *target_ethtool_stats, u64 *target_stat_values) | 1124 | struct ethtool_stats *target_ethtool_stats, u64 *target_stat_values) |
1125 | { | 1125 | { |
1126 | u64 u64temp; | 1126 | u64 u64temp; |
1127 | struct nes_vnic *nesvnic = netdev_priv(netdev); | 1127 | struct nes_vnic *nesvnic = netdev_priv(netdev); |
1128 | struct nes_device *nesdev = nesvnic->nesdev; | 1128 | struct nes_device *nesdev = nesvnic->nesdev; |
1129 | struct nes_adapter *nesadapter = nesdev->nesadapter; | ||
1129 | u32 nic_count; | 1130 | u32 nic_count; |
1130 | u32 u32temp; | 1131 | u32 u32temp; |
1131 | u32 index = 0; | 1132 | u32 index = 0; |
@@ -1154,6 +1155,46 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev, | |||
1154 | nesvnic->nesdev->port_tx_discards += u32temp; | 1155 | nesvnic->nesdev->port_tx_discards += u32temp; |
1155 | nesvnic->netstats.tx_dropped += u32temp; | 1156 | nesvnic->netstats.tx_dropped += u32temp; |
1156 | 1157 | ||
1158 | u32temp = nes_read_indexed(nesdev, | ||
1159 | NES_IDX_MAC_RX_SHORT_FRAMES + (nesvnic->nesdev->mac_index*0x200)); | ||
1160 | nesvnic->netstats.rx_dropped += u32temp; | ||
1161 | nesvnic->nesdev->mac_rx_errors += u32temp; | ||
1162 | nesvnic->nesdev->mac_rx_short_frames += u32temp; | ||
1163 | |||
1164 | u32temp = nes_read_indexed(nesdev, | ||
1165 | NES_IDX_MAC_RX_OVERSIZED_FRAMES + (nesvnic->nesdev->mac_index*0x200)); | ||
1166 | nesvnic->netstats.rx_dropped += u32temp; | ||
1167 | nesvnic->nesdev->mac_rx_errors += u32temp; | ||
1168 | nesvnic->nesdev->mac_rx_oversized_frames += u32temp; | ||
1169 | |||
1170 | u32temp = nes_read_indexed(nesdev, | ||
1171 | NES_IDX_MAC_RX_JABBER_FRAMES + (nesvnic->nesdev->mac_index*0x200)); | ||
1172 | nesvnic->netstats.rx_dropped += u32temp; | ||
1173 | nesvnic->nesdev->mac_rx_errors += u32temp; | ||
1174 | nesvnic->nesdev->mac_rx_jabber_frames += u32temp; | ||
1175 | |||
1176 | u32temp = nes_read_indexed(nesdev, | ||
1177 | NES_IDX_MAC_RX_SYMBOL_ERR_FRAMES + (nesvnic->nesdev->mac_index*0x200)); | ||
1178 | nesvnic->netstats.rx_dropped += u32temp; | ||
1179 | nesvnic->nesdev->mac_rx_errors += u32temp; | ||
1180 | nesvnic->nesdev->mac_rx_symbol_err_frames += u32temp; | ||
1181 | |||
1182 | u32temp = nes_read_indexed(nesdev, | ||
1183 | NES_IDX_MAC_RX_LENGTH_ERR_FRAMES + (nesvnic->nesdev->mac_index*0x200)); | ||
1184 | nesvnic->netstats.rx_length_errors += u32temp; | ||
1185 | nesvnic->nesdev->mac_rx_errors += u32temp; | ||
1186 | |||
1187 | u32temp = nes_read_indexed(nesdev, | ||
1188 | NES_IDX_MAC_RX_CRC_ERR_FRAMES + (nesvnic->nesdev->mac_index*0x200)); | ||
1189 | nesvnic->nesdev->mac_rx_errors += u32temp; | ||
1190 | nesvnic->nesdev->mac_rx_crc_errors += u32temp; | ||
1191 | nesvnic->netstats.rx_crc_errors += u32temp; | ||
1192 | |||
1193 | u32temp = nes_read_indexed(nesdev, | ||
1194 | NES_IDX_MAC_TX_ERRORS + (nesvnic->nesdev->mac_index*0x200)); | ||
1195 | nesvnic->nesdev->mac_tx_errors += u32temp; | ||
1196 | nesvnic->netstats.tx_errors += u32temp; | ||
1197 | |||
1157 | for (nic_count = 0; nic_count < NES_MAX_PORT_COUNT; nic_count++) { | 1198 | for (nic_count = 0; nic_count < NES_MAX_PORT_COUNT; nic_count++) { |
1158 | if (nesvnic->qp_nic_index[nic_count] == 0xf) | 1199 | if (nesvnic->qp_nic_index[nic_count] == 0xf) |
1159 | break; | 1200 | break; |
@@ -1218,11 +1259,15 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev, | |||
1218 | target_stat_values[++index] = nesvnic->nesdev->mac_rx_jabber_frames; | 1259 | target_stat_values[++index] = nesvnic->nesdev->mac_rx_jabber_frames; |
1219 | target_stat_values[++index] = nesvnic->nesdev->mac_rx_oversized_frames; | 1260 | target_stat_values[++index] = nesvnic->nesdev->mac_rx_oversized_frames; |
1220 | target_stat_values[++index] = nesvnic->nesdev->mac_rx_short_frames; | 1261 | target_stat_values[++index] = nesvnic->nesdev->mac_rx_short_frames; |
1262 | target_stat_values[++index] = nesvnic->netstats.rx_length_errors; | ||
1263 | target_stat_values[++index] = nesvnic->nesdev->mac_rx_crc_errors; | ||
1264 | target_stat_values[++index] = nesvnic->nesdev->port_rx_discards; | ||
1221 | target_stat_values[++index] = nesvnic->endnode_nstat_rx_discard; | 1265 | target_stat_values[++index] = nesvnic->endnode_nstat_rx_discard; |
1222 | target_stat_values[++index] = nesvnic->endnode_nstat_rx_octets; | 1266 | target_stat_values[++index] = nesvnic->endnode_nstat_rx_octets; |
1223 | target_stat_values[++index] = nesvnic->endnode_nstat_rx_frames; | 1267 | target_stat_values[++index] = nesvnic->endnode_nstat_rx_frames; |
1224 | target_stat_values[++index] = nesvnic->endnode_nstat_tx_octets; | 1268 | target_stat_values[++index] = nesvnic->endnode_nstat_tx_octets; |
1225 | target_stat_values[++index] = nesvnic->endnode_nstat_tx_frames; | 1269 | target_stat_values[++index] = nesvnic->endnode_nstat_tx_frames; |
1270 | target_stat_values[++index] = nesvnic->nesdev->mac_tx_errors; | ||
1226 | target_stat_values[++index] = mh_detected; | 1271 | target_stat_values[++index] = mh_detected; |
1227 | target_stat_values[++index] = mh_pauses_sent; | 1272 | target_stat_values[++index] = mh_pauses_sent; |
1228 | target_stat_values[++index] = nesvnic->endnode_ipv4_tcp_retransmits; | 1273 | target_stat_values[++index] = nesvnic->endnode_ipv4_tcp_retransmits; |
@@ -1251,21 +1296,14 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev, | |||
1251 | target_stat_values[++index] = atomic_read(&cm_nodes_destroyed); | 1296 | target_stat_values[++index] = atomic_read(&cm_nodes_destroyed); |
1252 | target_stat_values[++index] = atomic_read(&cm_accel_dropped_pkts); | 1297 | target_stat_values[++index] = atomic_read(&cm_accel_dropped_pkts); |
1253 | target_stat_values[++index] = atomic_read(&cm_resets_recvd); | 1298 | target_stat_values[++index] = atomic_read(&cm_resets_recvd); |
1299 | target_stat_values[++index] = nesadapter->free_4kpbl; | ||
1300 | target_stat_values[++index] = nesadapter->free_256pbl; | ||
1254 | target_stat_values[++index] = int_mod_timer_init; | 1301 | target_stat_values[++index] = int_mod_timer_init; |
1255 | target_stat_values[++index] = int_mod_cq_depth_1; | ||
1256 | target_stat_values[++index] = int_mod_cq_depth_4; | ||
1257 | target_stat_values[++index] = int_mod_cq_depth_16; | ||
1258 | target_stat_values[++index] = int_mod_cq_depth_24; | ||
1259 | target_stat_values[++index] = int_mod_cq_depth_32; | ||
1260 | target_stat_values[++index] = int_mod_cq_depth_128; | ||
1261 | target_stat_values[++index] = int_mod_cq_depth_256; | ||
1262 | target_stat_values[++index] = nesvnic->lro_mgr.stats.aggregated; | 1302 | target_stat_values[++index] = nesvnic->lro_mgr.stats.aggregated; |
1263 | target_stat_values[++index] = nesvnic->lro_mgr.stats.flushed; | 1303 | target_stat_values[++index] = nesvnic->lro_mgr.stats.flushed; |
1264 | target_stat_values[++index] = nesvnic->lro_mgr.stats.no_desc; | 1304 | target_stat_values[++index] = nesvnic->lro_mgr.stats.no_desc; |
1265 | |||
1266 | } | 1305 | } |
1267 | 1306 | ||
1268 | |||
1269 | /** | 1307 | /** |
1270 | * nes_netdev_get_drvinfo | 1308 | * nes_netdev_get_drvinfo |
1271 | */ | 1309 | */ |
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 925e1f2d1d5..9bc2d744b2e 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c | |||
@@ -3962,7 +3962,7 @@ int nes_register_ofa_device(struct nes_ib_device *nesibdev) | |||
3962 | struct nes_adapter *nesadapter = nesdev->nesadapter; | 3962 | struct nes_adapter *nesadapter = nesdev->nesadapter; |
3963 | int i, ret; | 3963 | int i, ret; |
3964 | 3964 | ||
3965 | ret = ib_register_device(&nesvnic->nesibdev->ibdev); | 3965 | ret = ib_register_device(&nesvnic->nesibdev->ibdev, NULL); |
3966 | if (ret) { | 3966 | if (ret) { |
3967 | return ret; | 3967 | return ret; |
3968 | } | 3968 | } |