aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2009-09-03 10:56:31 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-03 23:01:55 -0400
commitd4ab88194e982a0d213000a75475d3e76b2626f0 (patch)
tree2162d445cdef36604106c92de5c3e8dc93cf739d /drivers
parent09ad1cc099f4ba4735d11ce1c5f024ffc521be3b (diff)
ixgbe: Add support for using FCoE DDP in 82599 as FCoE targets
The FCoE DDP in 82599 can be used for both FCoE initiator as well as FCoE target, depending on the indication of the exchange being the responder or originator in the F_CTL (frame control) field in the encapsulated Fiber Channel frame header (T10 Spec., FC-FS). For the initiator, OX_ID is used for FCoE DDP, where for the target RX_ID is used for FCoE DDP. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ixgbe/ixgbe_fcoe.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c
index 0607cffbb213..a3c9f99515e2 100644
--- a/drivers/net/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ixgbe/ixgbe_fcoe.c
@@ -292,6 +292,7 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
292 struct sk_buff *skb) 292 struct sk_buff *skb)
293{ 293{
294 u16 xid; 294 u16 xid;
295 u32 fctl;
295 u32 sterr, fceofe, fcerr, fcstat; 296 u32 sterr, fceofe, fcerr, fcstat;
296 int rc = -EINVAL; 297 int rc = -EINVAL;
297 struct ixgbe_fcoe *fcoe; 298 struct ixgbe_fcoe *fcoe;
@@ -312,7 +313,12 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
312 skb_set_transport_header(skb, skb_network_offset(skb) + 313 skb_set_transport_header(skb, skb_network_offset(skb) +
313 sizeof(struct fcoe_hdr)); 314 sizeof(struct fcoe_hdr));
314 fh = (struct fc_frame_header *)skb_transport_header(skb); 315 fh = (struct fc_frame_header *)skb_transport_header(skb);
315 xid = be16_to_cpu(fh->fh_ox_id); 316 fctl = ntoh24(fh->fh_f_ctl);
317 if (fctl & FC_FC_EX_CTX)
318 xid = be16_to_cpu(fh->fh_ox_id);
319 else
320 xid = be16_to_cpu(fh->fh_rx_id);
321
316 if (xid >= IXGBE_FCOE_DDP_MAX) 322 if (xid >= IXGBE_FCOE_DDP_MAX)
317 goto ddp_out; 323 goto ddp_out;
318 324