From: Michael Brown Date: Tue, 21 Sep 2010 23:43:55 +0000 (+0100) Subject: [fcoe] Add support for identifying the underlying hardware device X-Git-Tag: v1.20.1~2488 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bddc3835ac8d15361750b357ce3543be7f8595ed;p=thirdparty%2Fipxe.git [fcoe] Add support for identifying the underlying hardware device Signed-off-by: Michael Brown --- diff --git a/src/net/fcoe.c b/src/net/fcoe.c index 64dd26399..87726044e 100644 --- a/src/net/fcoe.c +++ b/src/net/fcoe.c @@ -30,6 +30,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include #include #include +#include #include #include #include @@ -268,12 +269,24 @@ static void fcoe_close ( struct fcoe_port *fcoe, int rc ) { ref_put ( &fcoe->refcnt ); } +/** + * Identify device underlying FCoE port + * + * @v fcoe FCoE port + * @ret device Underlying device + */ +static struct device * fcoe_identify_device ( struct fcoe_port *fcoe ) { + return fcoe->netdev->dev; +} + /** FCoE transport interface operations */ static struct interface_operation fcoe_transport_op[] = { INTF_OP ( xfer_deliver, struct fcoe_port *, fcoe_deliver ), INTF_OP ( xfer_alloc_iob, struct fcoe_port *, fcoe_alloc_iob ), INTF_OP ( xfer_window, struct fcoe_port *, fcoe_window ), INTF_OP ( intf_close, struct fcoe_port *, fcoe_close ), + INTF_OP ( identify_device, struct fcoe_port *, + fcoe_identify_device ), }; /** FCoE transport interface descriptor */