aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/fcoe/fcoe.h
diff options
context:
space:
mode:
authorChris Leech <christopher.leech@intel.com>2009-08-25 13:59:30 -0700
committerJames Bottomley <James.Bottomley@suse.de>2009-09-10 12:07:31 -0500
commit014f5c3f560a336cb8ad5b9f828c85de0398e7bb (patch)
tree0b51f21ec8690a0a416e3f8c12eec8e3391b2778 /drivers/scsi/fcoe/fcoe.h
parentaf7f85d95a34b04f5cf8c3b8c2d4cdd179dc1e19 (diff)
[SCSI] fcoe: Introduce and allocate fcoe_interface structure, 1:1 with net_device
In preparation for NPIV support, I'm splitting the fcoe instance structure into two to remove the assumptions about it being 1:1 with the net_device. There will now be two structures, one which is 1:1 with the underlying net_device and one which is allocated per virtual SCSI/FC host. fcoe_softc is renamed to fcoe_port for the per Scsi_Host FCoE private data. Later patches with start moving shared stuff from fcoe_port to fcoe_interface 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>
Diffstat (limited to 'drivers/scsi/fcoe/fcoe.h')
-rw-r--r--drivers/scsi/fcoe/fcoe.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/scsi/fcoe/fcoe.h b/drivers/scsi/fcoe/fcoe.h
index 550d1e49d1a..060a6dce658 100644
--- a/drivers/scsi/fcoe/fcoe.h
+++ b/drivers/scsi/fcoe/fcoe.h
@@ -75,10 +75,21 @@ struct fcoe_percpu_s {
};
/*
- * the fcoe sw transport private data
+ * an FCoE interface, 1:1 with netdev
*/
-struct fcoe_softc {
+struct fcoe_interface {
struct list_head list;
+ /* This will be removed once all the shared values are
+ * moved out of fcoe_port */
+ struct fcoe_port *priv;
+};
+
+/*
+ * the FCoE private structure that's allocated along with the
+ * Scsi_Host and libfc fc_lport structures
+ */
+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;
@@ -89,12 +100,12 @@ struct fcoe_softc {
struct fcoe_ctlr ctlr;
};
-#define fcoe_from_ctlr(fc) container_of(fc, struct fcoe_softc, ctlr)
+#define fcoe_from_ctlr(port) container_of(port, struct fcoe_port, ctlr)
static inline struct net_device *fcoe_netdev(
const struct fc_lport *lp)
{
- return ((struct fcoe_softc *)lport_priv(lp))->netdev;
+ return ((struct fcoe_port *)lport_priv(lp))->netdev;
}
#endif /* _FCOE_H_ */