* [PATCH] IPoIB: set dev_id field of IPoIB net_device
@ 2010-09-20 7:05 Eli Cohen
2010-10-23 20:37 ` Roland Dreier
0 siblings, 1 reply; 2+ messages in thread
From: Eli Cohen @ 2010-09-20 7:05 UTC (permalink / raw)
To: Roland Dreier; +Cc: RDMA list
Use the net device's dev_id field to encode the port number of the pci device.
This can be used to to associate a net device with the pci device's port. The
encoding is: dev_id = port - 1.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
---
drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index b4b2257..30d2333 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1240,6 +1240,7 @@ static struct net_device *ipoib_add_port(const char *format,
goto alloc_mem_failed;
SET_NETDEV_DEV(priv->dev, hca->dma_device);
+ priv->dev->dev_id = port - 1;
if (!ib_query_port(hca, port, &attr))
priv->max_ib_mtu = ib_mtu_enum_to_int(attr.max_mtu);
--
1.7.2.2
--
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] IPoIB: set dev_id field of IPoIB net_device
2010-09-20 7:05 [PATCH] IPoIB: set dev_id field of IPoIB net_device Eli Cohen
@ 2010-10-23 20:37 ` Roland Dreier
0 siblings, 0 replies; 2+ messages in thread
From: Roland Dreier @ 2010-10-23 20:37 UTC (permalink / raw)
To: Eli Cohen; +Cc: RDMA list
thanks, applied.
--
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-10-23 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-20 7:05 [PATCH] IPoIB: set dev_id field of IPoIB net_device Eli Cohen
2010-10-23 20:37 ` Roland Dreier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).