diff options
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 1 | ||||
-rw-r--r-- | include/scsi/libfcoe.h | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 21927f7952d8..4cec9ddc03ba 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -1118,6 +1118,7 @@ static struct fc_lport *fcoe_if_create(struct fcoe_interface *fcoe, | |||
1118 | port = lport_priv(lport); | 1118 | port = lport_priv(lport); |
1119 | port->lport = lport; | 1119 | port->lport = lport; |
1120 | port->priv = fcoe; | 1120 | port->priv = fcoe; |
1121 | port->get_netdev = fcoe_netdev; | ||
1121 | port->max_queue_depth = FCOE_MAX_QUEUE_DEPTH; | 1122 | port->max_queue_depth = FCOE_MAX_QUEUE_DEPTH; |
1122 | port->min_queue_depth = FCOE_MIN_QUEUE_DEPTH; | 1123 | port->min_queue_depth = FCOE_MIN_QUEUE_DEPTH; |
1123 | INIT_WORK(&port->destroy_work, fcoe_destroy_work); | 1124 | INIT_WORK(&port->destroy_work, fcoe_destroy_work); |
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index 52bba7138069..746bc587ae34 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h | |||
@@ -353,6 +353,18 @@ struct fcoe_port { | |||
353 | u8 data_src_addr[ETH_ALEN]; | 353 | u8 data_src_addr[ETH_ALEN]; |
354 | struct net_device * (*get_netdev)(const struct fc_lport *lport); | 354 | struct net_device * (*get_netdev)(const struct fc_lport *lport); |
355 | }; | 355 | }; |
356 | |||
357 | /** | ||
358 | * fcoe_get_netdev() - Return the net device associated with a local port | ||
359 | * @lport: The local port to get the net device from | ||
360 | */ | ||
361 | static inline struct net_device *fcoe_get_netdev(const struct fc_lport *lport) | ||
362 | { | ||
363 | struct fcoe_port *port = ((struct fcoe_port *)lport_priv(lport)); | ||
364 | |||
365 | return (port->get_netdev) ? port->get_netdev(lport) : NULL; | ||
366 | } | ||
367 | |||
356 | void fcoe_clean_pending_queue(struct fc_lport *); | 368 | void fcoe_clean_pending_queue(struct fc_lport *); |
357 | void fcoe_check_wait_queue(struct fc_lport *lport, struct sk_buff *skb); | 369 | void fcoe_check_wait_queue(struct fc_lport *lport, struct sk_buff *skb); |
358 | void fcoe_queue_timer(ulong lport); | 370 | void fcoe_queue_timer(ulong lport); |