aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_fcoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_fcoe.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_fcoe.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c
index 6493049b663d..45182ab41d6b 100644
--- a/drivers/net/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ixgbe/ixgbe_fcoe.c
@@ -32,6 +32,7 @@
32#endif /* CONFIG_IXGBE_DCB */ 32#endif /* CONFIG_IXGBE_DCB */
33#include <linux/if_ether.h> 33#include <linux/if_ether.h>
34#include <linux/gfp.h> 34#include <linux/gfp.h>
35#include <linux/if_vlan.h>
35#include <scsi/scsi_cmnd.h> 36#include <scsi/scsi_cmnd.h>
36#include <scsi/scsi_device.h> 37#include <scsi/scsi_device.h>
37#include <scsi/fc/fc_fs.h> 38#include <scsi/fc/fc_fs.h>
@@ -312,10 +313,12 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
312 if (fcerr == IXGBE_FCERR_BADCRC) 313 if (fcerr == IXGBE_FCERR_BADCRC)
313 skb->ip_summed = CHECKSUM_NONE; 314 skb->ip_summed = CHECKSUM_NONE;
314 315
315 skb_reset_network_header(skb); 316 if (eth_hdr(skb)->h_proto == htons(ETH_P_8021Q))
316 skb_set_transport_header(skb, skb_network_offset(skb) + 317 fh = (struct fc_frame_header *)(skb->data +
317 sizeof(struct fcoe_hdr)); 318 sizeof(struct vlan_hdr) + sizeof(struct fcoe_hdr));
318 fh = (struct fc_frame_header *)skb_transport_header(skb); 319 else
320 fh = (struct fc_frame_header *)(skb->data +
321 sizeof(struct fcoe_hdr));
319 fctl = ntoh24(fh->fh_f_ctl); 322 fctl = ntoh24(fh->fh_f_ctl);
320 if (fctl & FC_FC_EX_CTX) 323 if (fctl & FC_FC_EX_CTX)
321 xid = be16_to_cpu(fh->fh_ox_id); 324 xid = be16_to_cpu(fh->fh_ox_id);
@@ -536,12 +539,6 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
536 } 539 }
537 IXGBE_WRITE_REG(hw, IXGBE_FCRECTL, IXGBE_FCRECTL_ENA); 540 IXGBE_WRITE_REG(hw, IXGBE_FCRECTL, IXGBE_FCRECTL_ENA);
538 IXGBE_WRITE_REG(hw, IXGBE_ETQS(IXGBE_ETQF_FILTER_FCOE), 0); 541 IXGBE_WRITE_REG(hw, IXGBE_ETQS(IXGBE_ETQF_FILTER_FCOE), 0);
539 fcoe_i = f->mask;
540 fcoe_i &= IXGBE_FCRETA_ENTRY_MASK;
541 fcoe_q = adapter->rx_ring[fcoe_i]->reg_idx;
542 IXGBE_WRITE_REG(hw, IXGBE_ETQS(IXGBE_ETQF_FILTER_FIP),
543 IXGBE_ETQS_QUEUE_EN |
544 (fcoe_q << IXGBE_ETQS_RX_QUEUE_SHIFT));
545 } else { 542 } else {
546 /* Use single rx queue for FCoE */ 543 /* Use single rx queue for FCoE */
547 fcoe_i = f->mask; 544 fcoe_i = f->mask;