public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ib_mad: Ignore iWARP devices on device removal.
@ 2010-03-04 18:18 Steve Wise
       [not found] ` <20100304181818.18953.44421.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Wise @ 2010-03-04 18:18 UTC (permalink / raw)
  To: rdreier-FYB4Gu1CFyUAvxtiuMwx3w
  Cc: hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

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.

Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---

 drivers/infiniband/core/mad.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 7522008..6216187 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] ib_mad: Ignore iWARP devices on device removal.
       [not found] ` <20100304181818.18953.44421.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
@ 2010-03-04 21:53   ` Sean Hefty
  0 siblings, 0 replies; 2+ messages in thread
From: Sean Hefty @ 2010-03-04 21:53 UTC (permalink / raw)
  To: 'Steve Wise', rdreier-FYB4Gu1CFyUAvxtiuMwx3w
  Cc: hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

>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.
>
>Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Acked-by: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

>---
Looks okay to me.  Thanks, Steve.

>
> drivers/infiniband/core/mad.c |    3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
>diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
>index 7522008..6216187 100644
>--- a/drivers/infiniband/core/mad.c
>+++ b/drivers/infiniband/core/mad.c
>@@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-04 21:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-04 18:18 [PATCH] ib_mad: Ignore iWARP devices on device removal Steve Wise
     [not found] ` <20100304181818.18953.44421.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
2010-03-04 21:53   ` Sean Hefty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox