diff options
Diffstat (limited to 'include/scsi/libfcoe.h')
-rw-r--r-- | include/scsi/libfcoe.h | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index 89fdbb9a6a1b..c41f7d0c6efc 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h | |||
@@ -46,6 +46,7 @@ struct fcoe_softc { | |||
46 | struct net_device *phys_dev; /* device with ethtool_ops */ | 46 | struct net_device *phys_dev; /* device with ethtool_ops */ |
47 | struct packet_type fcoe_packet_type; | 47 | struct packet_type fcoe_packet_type; |
48 | struct sk_buff_head fcoe_pending_queue; | 48 | struct sk_buff_head fcoe_pending_queue; |
49 | u8 fcoe_pending_queue_active; | ||
49 | 50 | ||
50 | u8 dest_addr[ETH_ALEN]; | 51 | u8 dest_addr[ETH_ALEN]; |
51 | u8 ctl_src_addr[ETH_ALEN]; | 52 | u8 ctl_src_addr[ETH_ALEN]; |
@@ -58,16 +59,10 @@ struct fcoe_softc { | |||
58 | u8 address_mode; | 59 | u8 address_mode; |
59 | }; | 60 | }; |
60 | 61 | ||
61 | static inline struct fcoe_softc *fcoe_softc( | ||
62 | const struct fc_lport *lp) | ||
63 | { | ||
64 | return (struct fcoe_softc *)lport_priv(lp); | ||
65 | } | ||
66 | |||
67 | static inline struct net_device *fcoe_netdev( | 62 | static inline struct net_device *fcoe_netdev( |
68 | const struct fc_lport *lp) | 63 | const struct fc_lport *lp) |
69 | { | 64 | { |
70 | return fcoe_softc(lp)->real_dev; | 65 | return ((struct fcoe_softc *)lport_priv(lp))->real_dev; |
71 | } | 66 | } |
72 | 67 | ||
73 | static inline struct fcoe_hdr *skb_fcoe_header(const struct sk_buff *skb) | 68 | static inline struct fcoe_hdr *skb_fcoe_header(const struct sk_buff *skb) |
@@ -129,24 +124,6 @@ static inline u16 skb_fc_rxid(const struct sk_buff *skb) | |||
129 | return be16_to_cpu(skb_fc_header(skb)->fh_rx_id); | 124 | return be16_to_cpu(skb_fc_header(skb)->fh_rx_id); |
130 | } | 125 | } |
131 | 126 | ||
132 | /* FIXME - DMA_BIDIRECTIONAL ? */ | ||
133 | #define skb_cb(skb) ((struct fcoe_rcv_info *)&((skb)->cb[0])) | ||
134 | #define skb_cmd(skb) (skb_cb(skb)->fr_cmd) | ||
135 | #define skb_dir(skb) (skb_cmd(skb)->sc_data_direction) | ||
136 | static inline bool skb_fc_is_read(const struct sk_buff *skb) | ||
137 | { | ||
138 | if (skb_fc_is_cmd(skb) && skb_cmd(skb)) | ||
139 | return skb_dir(skb) == DMA_FROM_DEVICE; | ||
140 | return false; | ||
141 | } | ||
142 | |||
143 | static inline bool skb_fc_is_write(const struct sk_buff *skb) | ||
144 | { | ||
145 | if (skb_fc_is_cmd(skb) && skb_cmd(skb)) | ||
146 | return skb_dir(skb) == DMA_TO_DEVICE; | ||
147 | return false; | ||
148 | } | ||
149 | |||
150 | /* libfcoe funcs */ | 127 | /* libfcoe funcs */ |
151 | int fcoe_reset(struct Scsi_Host *shost); | 128 | int fcoe_reset(struct Scsi_Host *shost); |
152 | u64 fcoe_wwn_from_mac(unsigned char mac[MAX_ADDR_LEN], | 129 | u64 fcoe_wwn_from_mac(unsigned char mac[MAX_ADDR_LEN], |