aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/fcoe.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/fcoe/fcoe.h')
-rw-r--r--drivers/scsi/fcoe/fcoe.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/fcoe/fcoe.h b/drivers/scsi/fcoe/fcoe.h
index 96ac938d39cc..a624add4f8ec 100644
--- a/drivers/scsi/fcoe/fcoe.h
+++ b/drivers/scsi/fcoe/fcoe.h
@@ -68,7 +68,6 @@ do { \
68 * @netdev: The associated net device 68 * @netdev: The associated net device
69 * @fcoe_packet_type: FCoE packet type 69 * @fcoe_packet_type: FCoE packet type
70 * @fip_packet_type: FIP packet type 70 * @fip_packet_type: FIP packet type
71 * @ctlr: The FCoE controller (for FIP)
72 * @oem: The offload exchange manager for all local port 71 * @oem: The offload exchange manager for all local port
73 * instances associated with this port 72 * instances associated with this port
74 * @removed: Indicates fcoe interface removed from net device 73 * @removed: Indicates fcoe interface removed from net device
@@ -80,12 +79,15 @@ struct fcoe_interface {
80 struct net_device *realdev; 79 struct net_device *realdev;
81 struct packet_type fcoe_packet_type; 80 struct packet_type fcoe_packet_type;
82 struct packet_type fip_packet_type; 81 struct packet_type fip_packet_type;
83 struct fcoe_ctlr ctlr;
84 struct fc_exch_mgr *oem; 82 struct fc_exch_mgr *oem;
85 u8 removed; 83 u8 removed;
86}; 84};
87 85
88#define fcoe_from_ctlr(fip) container_of(fip, struct fcoe_interface, ctlr) 86#define fcoe_to_ctlr(x) \
87 (struct fcoe_ctlr *)(((struct fcoe_ctlr *)(x)) - 1)
88
89#define fcoe_from_ctlr(x) \
90 ((struct fcoe_interface *)((x) + 1))
89 91
90/** 92/**
91 * fcoe_netdev() - Return the net device associated with a local port 93 * fcoe_netdev() - Return the net device associated with a local port