Bläddra i källkod

[fcoe] Add support for identifying the underlying hardware device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 år sedan
förälder
incheckning
bddc3835ac
1 ändrade filer med 13 tillägg och 0 borttagningar
  1. 13
    0
      src/net/fcoe.c

+ 13
- 0
src/net/fcoe.c Visa fil

@@ -30,6 +30,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
30 30
 #include <ipxe/netdevice.h>
31 31
 #include <ipxe/features.h>
32 32
 #include <ipxe/errortab.h>
33
+#include <ipxe/device.h>
33 34
 #include <ipxe/crc32.h>
34 35
 #include <ipxe/fc.h>
35 36
 #include <ipxe/fcoe.h>
@@ -268,12 +269,24 @@ static void fcoe_close ( struct fcoe_port *fcoe, int rc ) {
268 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 282
 /** FCoE transport interface operations */
272 283
 static struct interface_operation fcoe_transport_op[] = {
273 284
 	INTF_OP ( xfer_deliver, struct fcoe_port *, fcoe_deliver ),
274 285
 	INTF_OP ( xfer_alloc_iob, struct fcoe_port *, fcoe_alloc_iob ),
275 286
 	INTF_OP ( xfer_window, struct fcoe_port *, fcoe_window ),
276 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 292
 /** FCoE transport interface descriptor */

Laddar…
Avbryt
Spara