From 250249898a92a1228050f40fbe3c05deb1392da8 Mon Sep 17 00:00:00 2001 From: Chris Leech Date: Tue, 25 Aug 2009 13:59:35 -0700 Subject: [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 Signed-off-by: Robert Love Signed-off-by: James Bottomley --- drivers/scsi/fcoe/fcoe.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'drivers/scsi/fcoe/fcoe.h') diff --git a/drivers/scsi/fcoe/fcoe.h b/drivers/scsi/fcoe/fcoe.h index 060a6dce6580..3b3886e99b48 100644 --- a/drivers/scsi/fcoe/fcoe.h +++ b/drivers/scsi/fcoe/fcoe.h @@ -82,6 +82,7 @@ struct fcoe_interface { /* 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_interface { */ 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_port { 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_ */ -- cgit v1.2.3-59-g8ed1b