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.h36
1 files changed, 23 insertions, 13 deletions
diff --git a/drivers/scsi/fcoe/fcoe.h b/drivers/scsi/fcoe/fcoe.h
index 0d724fa0898f..ce7f60fb1bc0 100644
--- a/drivers/scsi/fcoe/fcoe.h
+++ b/drivers/scsi/fcoe/fcoe.h
@@ -37,8 +37,8 @@
37 37
38#define FCOE_MAX_OUTSTANDING_COMMANDS 1024 38#define FCOE_MAX_OUTSTANDING_COMMANDS 1024
39 39
40#define FCOE_MIN_XID 0x0001 /* the min xid supported by fcoe_sw */ 40#define FCOE_MIN_XID 0x0000 /* the min xid supported by fcoe_sw */
41#define FCOE_MAX_XID 0x07ef /* the max xid supported by fcoe_sw */ 41#define FCOE_MAX_XID 0x0FFF /* the max xid supported by fcoe_sw */
42 42
43unsigned int fcoe_debug_logging; 43unsigned int fcoe_debug_logging;
44module_param_named(debug_logging, fcoe_debug_logging, int, S_IRUGO|S_IWUSR); 44module_param_named(debug_logging, fcoe_debug_logging, int, S_IRUGO|S_IWUSR);
@@ -53,7 +53,7 @@ do { \
53 do { \ 53 do { \
54 CMD; \ 54 CMD; \
55 } while (0); \ 55 } while (0); \
56} while (0); 56} while (0)
57 57
58#define FCOE_DBG(fmt, args...) \ 58#define FCOE_DBG(fmt, args...) \
59 FCOE_CHECK_LOGGING(FCOE_LOGGING, \ 59 FCOE_CHECK_LOGGING(FCOE_LOGGING, \
@@ -61,7 +61,7 @@ do { \
61 61
62#define FCOE_NETDEV_DBG(netdev, fmt, args...) \ 62#define FCOE_NETDEV_DBG(netdev, fmt, args...) \
63 FCOE_CHECK_LOGGING(FCOE_NETDEV_LOGGING, \ 63 FCOE_CHECK_LOGGING(FCOE_NETDEV_LOGGING, \
64 printk(KERN_INFO "fcoe: %s" fmt, \ 64 printk(KERN_INFO "fcoe: %s: " fmt, \
65 netdev->name, ##args);) 65 netdev->name, ##args);)
66 66
67/* 67/*
@@ -75,26 +75,36 @@ 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 */
80struct fcoe_softc { 80struct fcoe_interface {
81 struct list_head list; 81 struct list_head list;
82 struct net_device *real_dev; 82 struct net_device *netdev;
83 struct net_device *phys_dev; /* device with ethtool_ops */
84 struct packet_type fcoe_packet_type; 83 struct packet_type fcoe_packet_type;
85 struct packet_type fip_packet_type; 84 struct packet_type fip_packet_type;
85 struct fcoe_ctlr ctlr;
86 struct fc_exch_mgr *oem; /* offload exchange manager */
87 struct kref kref;
88};
89
90/*
91 * the FCoE private structure that's allocated along with the
92 * Scsi_Host and libfc fc_lport structures
93 */
94struct fcoe_port {
95 struct fcoe_interface *fcoe;
96 struct fc_lport *lport;
86 struct sk_buff_head fcoe_pending_queue; 97 struct sk_buff_head fcoe_pending_queue;
87 u8 fcoe_pending_queue_active; 98 u8 fcoe_pending_queue_active;
88 struct timer_list timer; /* queue timer */ 99 struct timer_list timer; /* queue timer */
89 struct fcoe_ctlr ctlr; 100 struct work_struct destroy_work; /* to prevent rtnl deadlocks */
90}; 101};
91 102
92#define fcoe_from_ctlr(fc) container_of(fc, struct fcoe_softc, ctlr) 103#define fcoe_from_ctlr(fip) container_of(fip, struct fcoe_interface, ctlr)
93 104
94static inline struct net_device *fcoe_netdev( 105static inline struct net_device *fcoe_netdev(const struct fc_lport *lp)
95 const struct fc_lport *lp)
96{ 106{
97 return ((struct fcoe_softc *)lport_priv(lp))->real_dev; 107 return ((struct fcoe_port *)lport_priv(lp))->fcoe->netdev;
98} 108}
99 109
100#endif /* _FCOE_H_ */ 110#endif /* _FCOE_H_ */