Skip to contentSkip to conversation

ib_mad: Ignore iWARP devices on device removal.

PATCH In review Steve Wise 2 participants 2 messages Mar 4, 2010 1 message not in the archive InfiniBand

lore
Share & tools
lore

Steve Wise

author
#0 lore raw

PATCH 1/1 ib_mad: Ignore iWARP devices on device removal.

When you unload an iWARP device, the ib_mad module logs errors. It should be ignoring iWARP devices on device removal just like it does on device add.

---

 drivers/infiniband/core/mad.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/infiniband/core/mad.c +3 -0
index 7522008..6216187 100644
@@ -2964,6 +2964,9 @@ static void ib_mad_remove_device(struct ib_device *device)
 {
 	int i, num_ports, cur_port;
 
+	if (rdma_node_get_transport(device->node_type) != RDMA_TRANSPORT_IB)
+		return;
+
 	if (device->node_type == RDMA_NODE_IB_SWITCH) {
 		num_ports = 1;
 		cur_port = 0;

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20100304181818.18953.44421.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org

Acked-by
#2 lore raw
Quoted 5 lines

When you unload an iWARP device, the ib_mad module logs errors. It should be ignoring iWARP devices on device removal just like it does on device add.

Quoted 1 line

---

Looks okay to me. Thanks, Steve.

Quoted 18 lines

drivers/infiniband/core/mad.c | 3 +++

1 files changed, 3 insertions(+), 0 deletions(-)
drivers/infiniband/core/mad.c +3 -0
index 7522008..6216187 100644
@@ -2964,6 +2964,9 @@ static void ib_mad_remove_device(struct ib_device
 *device)
 {
 	int i, num_ports, cur_port;
 
+	if (rdma_node_get_transport(device->node_type) != RDMA_TRANSPORT_IB)
+		return;
+
 	if (device->node_type == RDMA_NODE_IB_SWITCH) {
 		num_ports = 1;
Quoted 1 line
		cur_port = 0;

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html