aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/libfcoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/fcoe/libfcoe.c')
-rw-r--r--drivers/scsi/fcoe/libfcoe.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index 5548bf3bb58b..0d6f5beb7f9e 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -423,7 +423,7 @@ int fcoe_xmit(struct fc_lport *lp, struct fc_frame *fp)
423 423
424 /* crc offload */ 424 /* crc offload */
425 if (likely(lp->crc_offload)) { 425 if (likely(lp->crc_offload)) {
426 skb->ip_summed = CHECKSUM_COMPLETE; 426 skb->ip_summed = CHECKSUM_PARTIAL;
427 skb->csum_start = skb_headroom(skb); 427 skb->csum_start = skb_headroom(skb);
428 skb->csum_offset = skb->len; 428 skb->csum_offset = skb->len;
429 crc = 0; 429 crc = 0;
@@ -460,7 +460,7 @@ int fcoe_xmit(struct fc_lport *lp, struct fc_frame *fp)
460 skb_reset_mac_header(skb); 460 skb_reset_mac_header(skb);
461 skb_reset_network_header(skb); 461 skb_reset_network_header(skb);
462 skb->mac_len = elen; 462 skb->mac_len = elen;
463 skb->protocol = htons(ETH_P_802_3); 463 skb->protocol = htons(ETH_P_FCOE);
464 skb->dev = fc->real_dev; 464 skb->dev = fc->real_dev;
465 465
466 /* fill up mac and fcoe headers */ 466 /* fill up mac and fcoe headers */
@@ -483,6 +483,16 @@ int fcoe_xmit(struct fc_lport *lp, struct fc_frame *fp)
483 FC_FCOE_ENCAPS_VER(hp, FC_FCOE_VER); 483 FC_FCOE_ENCAPS_VER(hp, FC_FCOE_VER);
484 hp->fcoe_sof = sof; 484 hp->fcoe_sof = sof;
485 485
486#ifdef NETIF_F_FSO
487 /* fcoe lso, mss is in max_payload which is non-zero for FCP data */
488 if (lp->seq_offload && fr_max_payload(fp)) {
489 skb_shinfo(skb)->gso_type = SKB_GSO_FCOE;
490 skb_shinfo(skb)->gso_size = fr_max_payload(fp);
491 } else {
492 skb_shinfo(skb)->gso_type = 0;
493 skb_shinfo(skb)->gso_size = 0;
494 }
495#endif
486 /* update tx stats: regardless if LLD fails */ 496 /* update tx stats: regardless if LLD fails */
487 stats = lp->dev_stats[smp_processor_id()]; 497 stats = lp->dev_stats[smp_processor_id()];
488 if (stats) { 498 if (stats) {
@@ -623,7 +633,7 @@ int fcoe_percpu_receive_thread(void *arg)
623 * it's solicited data, in which case, the FCP layer would 633 * it's solicited data, in which case, the FCP layer would
624 * check it during the copy. 634 * check it during the copy.
625 */ 635 */
626 if (lp->crc_offload) 636 if (lp->crc_offload && skb->ip_summed == CHECKSUM_UNNECESSARY)
627 fr_flags(fp) &= ~FCPHF_CRC_UNCHECKED; 637 fr_flags(fp) &= ~FCPHF_CRC_UNCHECKED;
628 else 638 else
629 fr_flags(fp) |= FCPHF_CRC_UNCHECKED; 639 fr_flags(fp) |= FCPHF_CRC_UNCHECKED;