[SCSI] fcoe: move netdev to fcoe_interface
The network interface needs to be shared between all NPIV VN_Ports, therefor
it should be tracked in the fcoe_interface and not for each SCSI host in
fcoe_port.
Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
diff --git a/drivers/scsi/fcoe/fcoe.h b/drivers/scsi/fcoe/fcoe.h
index 060a6dc..3b3886e 100644
--- a/drivers/scsi/fcoe/fcoe.h
+++ b/drivers/scsi/fcoe/fcoe.h
@@ -82,6 +82,7 @@
/* This will be removed once all the shared values are
* moved out of fcoe_port */
struct fcoe_port *priv;
+ struct net_device *netdev;
};
/*
@@ -90,7 +91,6 @@
*/
struct fcoe_port {
struct fcoe_interface *fcoe;
- struct net_device *netdev;
struct fc_exch_mgr *oem; /* offload exchange manger */
struct packet_type fcoe_packet_type;
struct packet_type fip_packet_type;
@@ -100,12 +100,11 @@
struct fcoe_ctlr ctlr;
};
-#define fcoe_from_ctlr(port) container_of(port, struct fcoe_port, ctlr)
+#define fcoe_from_ctlr(fip) container_of(fip, struct fcoe_port, ctlr)
-static inline struct net_device *fcoe_netdev(
- const struct fc_lport *lp)
+static inline struct net_device *fcoe_netdev(const struct fc_lport *lp)
{
- return ((struct fcoe_port *)lport_priv(lp))->netdev;
+ return ((struct fcoe_port *)lport_priv(lp))->fcoe->netdev;
}
#endif /* _FCOE_H_ */