aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/infiniband.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2009-01-02 21:04:31 +0000
committerMichael Brown <mcb30@etherboot.org>2009-01-02 21:04:31 +0000
commit53a7dd26cd0aff8409e16c6cc1c7423d4a551f4b (patch)
tree84a376781898482a5b6dba32d4134d7769f020b4 /src/include/gpxe/infiniband.h
parent8674bc05a054fe8c0ef5ed4e6696d0f1168af74c (diff)
downloadipxe-53a7dd26cd0aff8409e16c6cc1c7423d4a551f4b.tar.gz
[infiniband] Call ib_open() only when opening the IPoIB net device
Defer the call to ib_open() until we want to actually open the device, rather than when the device is registered.
Diffstat (limited to 'src/include/gpxe/infiniband.h')
-rw-r--r--src/include/gpxe/infiniband.h25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/include/gpxe/infiniband.h b/src/include/gpxe/infiniband.h
index 1bb824019..196b59506 100644
--- a/src/include/gpxe/infiniband.h
+++ b/src/include/gpxe/infiniband.h
@@ -306,6 +306,8 @@ struct ib_device {
struct ib_device_operations *op;
/** Port number */
unsigned int port;
+ /** Port open request counter */
+ unsigned int open_count;
/** Port state */
uint8_t port_state;
@@ -364,6 +366,8 @@ extern void ib_complete_recv ( struct ib_device *ibdev,
struct ib_queue_pair *qp,
struct ib_address_vector *av,
struct io_buffer *iobuf, int rc );
+extern int ib_open ( struct ib_device *ibdev );
+extern void ib_close ( struct ib_device *ibdev );
extern int ib_mcast_attach ( struct ib_device *ibdev, struct ib_queue_pair *qp,
struct ib_gid *gid );
extern void ib_mcast_detach ( struct ib_device *ibdev,
@@ -390,27 +394,6 @@ ib_poll_cq ( struct ib_device *ibdev, struct ib_completion_queue *cq ) {
}
/**
- * Open port
- *
- * @v ibdev Infiniband device
- * @ret rc Return status code
- */
-static inline __always_inline int
-ib_open ( struct ib_device *ibdev ) {
- return ibdev->op->open ( ibdev );
-}
-
-/**
- * Close port
- *
- * @v ibdev Infiniband device
- */
-static inline __always_inline void
-ib_close ( struct ib_device *ibdev ) {
- ibdev->op->close ( ibdev );
-}
-
-/**
* Check link state
*
* @v ibdev Infiniband device