Browse Source

[fcoe] Add support for identifying the underlying hardware device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 years ago
parent
commit
bddc3835ac
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      src/net/fcoe.c

+ 13
- 0
src/net/fcoe.c View File

30
 #include <ipxe/netdevice.h>
30
 #include <ipxe/netdevice.h>
31
 #include <ipxe/features.h>
31
 #include <ipxe/features.h>
32
 #include <ipxe/errortab.h>
32
 #include <ipxe/errortab.h>
33
+#include <ipxe/device.h>
33
 #include <ipxe/crc32.h>
34
 #include <ipxe/crc32.h>
34
 #include <ipxe/fc.h>
35
 #include <ipxe/fc.h>
35
 #include <ipxe/fcoe.h>
36
 #include <ipxe/fcoe.h>
268
 	ref_put ( &fcoe->refcnt );
269
 	ref_put ( &fcoe->refcnt );
269
 }
270
 }
270
 
271
 
272
+/**
273
+ * Identify device underlying FCoE port
274
+ *
275
+ * @v fcoe		FCoE port
276
+ * @ret device		Underlying device
277
+ */
278
+static struct device * fcoe_identify_device ( struct fcoe_port *fcoe ) {
279
+	return fcoe->netdev->dev;
280
+}
281
+
271
 /** FCoE transport interface operations */
282
 /** FCoE transport interface operations */
272
 static struct interface_operation fcoe_transport_op[] = {
283
 static struct interface_operation fcoe_transport_op[] = {
273
 	INTF_OP ( xfer_deliver, struct fcoe_port *, fcoe_deliver ),
284
 	INTF_OP ( xfer_deliver, struct fcoe_port *, fcoe_deliver ),
274
 	INTF_OP ( xfer_alloc_iob, struct fcoe_port *, fcoe_alloc_iob ),
285
 	INTF_OP ( xfer_alloc_iob, struct fcoe_port *, fcoe_alloc_iob ),
275
 	INTF_OP ( xfer_window, struct fcoe_port *, fcoe_window ),
286
 	INTF_OP ( xfer_window, struct fcoe_port *, fcoe_window ),
276
 	INTF_OP ( intf_close, struct fcoe_port *, fcoe_close ),
287
 	INTF_OP ( intf_close, struct fcoe_port *, fcoe_close ),
288
+	INTF_OP ( identify_device, struct fcoe_port *,
289
+		  fcoe_identify_device ),
277
 };
290
 };
278
 
291
 
279
 /** FCoE transport interface descriptor */
292
 /** FCoE transport interface descriptor */

Loading…
Cancel
Save