summaryrefslogtreecommitdiffstats
path: root/src/drivers/net
diff options
context:
space:
mode:
authorMichael Brown2008-02-27 14:59:56 +0100
committerMichael Brown2008-02-27 14:59:56 +0100
commitbc3f0a25c6e3ce8344fa3c255a8e3a981f59309b (patch)
treedfd6a969a801e98f8ec12f2378fa14ba2b4ed72f /src/drivers/net
parent[Infiniband] Centralise MAD operations (diff)
downloadipxe-bc3f0a25c6e3ce8344fa3c255a8e3a981f59309b.tar.gz
ipxe-bc3f0a25c6e3ce8344fa3c255a8e3a981f59309b.tar.xz
ipxe-bc3f0a25c6e3ce8344fa3c255a8e3a981f59309b.zip
[Infiniband] Add preliminary support for multi-port devices.
Arbel and Hermon cards both have multiple ports. Add the infrastructure required to register each port as a separate IB device. Don't yet register more than one port, since registration will currently fail unless a valid link is detected. Use ib_*_{set,get}_{drv,owner}data wrappers to access driver- and owner-private data on Infiniband structures.
Diffstat (limited to 'src/drivers/net')
-rw-r--r--src/drivers/net/ipoib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c
index 784c07209..905051bfa 100644
--- a/src/drivers/net/ipoib.c
+++ b/src/drivers/net/ipoib.c
@@ -294,7 +294,7 @@ static int ipoib_create_qset ( struct ipoib_device *ipoib,
rc = -ENOMEM;
goto err;
}
- qset->qp->owner_priv = ipoib->netdev;
+ ib_qp_set_ownerdata ( qset->qp, ipoib->netdev );
return 0;
@@ -506,7 +506,7 @@ static void ipoib_data_complete_send ( struct ib_device *ibdev __unused,
struct ib_queue_pair *qp,
struct ib_completion *completion,
struct io_buffer *iobuf ) {
- struct net_device *netdev = qp->owner_priv;
+ struct net_device *netdev = ib_qp_get_ownerdata ( qp );
netdev_tx_complete_err ( netdev, iobuf,
( completion->syndrome ? -EIO : 0 ) );
@@ -524,7 +524,7 @@ static void ipoib_data_complete_recv ( struct ib_device *ibdev __unused,
struct ib_queue_pair *qp,
struct ib_completion *completion,
struct io_buffer *iobuf ) {
- struct net_device *netdev = qp->owner_priv;
+ struct net_device *netdev = ib_qp_get_ownerdata ( qp );
struct ipoib_device *ipoib = netdev->priv;
struct ipoib_pseudo_hdr *ipoib_pshdr;
@@ -572,7 +572,7 @@ static void ipoib_meta_complete_send ( struct ib_device *ibdev __unused,
struct ib_queue_pair *qp,
struct ib_completion *completion,
struct io_buffer *iobuf ) {
- struct net_device *netdev = qp->owner_priv;
+ struct net_device *netdev = ib_qp_get_ownerdata ( qp );
struct ipoib_device *ipoib = netdev->priv;
if ( completion->syndrome ) {
@@ -640,7 +640,7 @@ static void ipoib_meta_complete_recv ( struct ib_device *ibdev __unused,
struct ib_queue_pair *qp,
struct ib_completion *completion,
struct io_buffer *iobuf ) {
- struct net_device *netdev = qp->owner_priv;
+ struct net_device *netdev = ib_qp_get_ownerdata ( qp );
struct ipoib_device *ipoib = netdev->priv;
union ib_mad *mad;