diff options
author | Chris Leech <christopher.leech@intel.com> | 2009-08-25 16:59:30 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-10 13:07:31 -0400 |
commit | 014f5c3f560a336cb8ad5b9f828c85de0398e7bb (patch) | |
tree | 0b51f21ec8690a0a416e3f8c12eec8e3391b2778 /drivers/scsi/fcoe/fcoe.h | |
parent | af7f85d95a34b04f5cf8c3b8c2d4cdd179dc1e19 (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.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/scsi/fcoe/fcoe.h b/drivers/scsi/fcoe/fcoe.h index 550d1e49d1a3..060a6dce6580 100644 --- a/drivers/scsi/fcoe/fcoe.h +++ b/drivers/scsi/fcoe/fcoe.h | |||
@@ -75,10 +75,21 @@ struct fcoe_percpu_s { | |||
75 | }; | 75 | }; |
76 | 76 | ||
77 | /* | 77 | /* |
78 | * the fcoe sw transport private data | 78 | * an FCoE interface, 1:1 with netdev |
79 | */ | 79 | */ |
80 | struct fcoe_softc { | 80 | struct fcoe_interface { |
81 | struct list_head list; | 81 | struct list_head list; |
82 | /* This will be removed once all the shared values are | ||
83 | * moved out of fcoe_port */ | ||
84 | struct fcoe_port *priv; | ||
85 | }; | ||
86 | |||
87 | /* | ||
88 | * the FCoE private structure that's allocated along with the | ||
89 | * Scsi_Host and libfc fc_lport structures | ||
90 | */ | ||
91 | struct fcoe_port { | ||
92 | struct fcoe_interface *fcoe; | ||
82 | struct net_device *netdev; | 93 | struct net_device *netdev; |
83 | struct fc_exch_mgr *oem; /* offload exchange manger */ | 94 | struct fc_exch_mgr *oem; /* offload exchange manger */ |
84 | struct packet_type fcoe_packet_type; | 95 | struct packet_type fcoe_packet_type; |
@@ -89,12 +100,12 @@ struct fcoe_softc { | |||
89 | struct fcoe_ctlr ctlr; | 100 | struct fcoe_ctlr ctlr; |
90 | }; | 101 | }; |
91 | 102 | ||
92 | #define fcoe_from_ctlr(fc) container_of(fc, struct fcoe_softc, ctlr) | 103 | #define fcoe_from_ctlr(port) container_of(port, struct fcoe_port, ctlr) |
93 | 104 | ||
94 | static inline struct net_device *fcoe_netdev( | 105 | static inline struct net_device *fcoe_netdev( |
95 | const struct fc_lport *lp) | 106 | const struct fc_lport *lp) |
96 | { | 107 | { |
97 | return ((struct fcoe_softc *)lport_priv(lp))->netdev; | 108 | return ((struct fcoe_port *)lport_priv(lp))->netdev; |
98 | } | 109 | } |
99 | 110 | ||
100 | #endif /* _FCOE_H_ */ | 111 | #endif /* _FCOE_H_ */ |