summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorTatyana Nikolova <Tatyana.E.Nikolova@intel.com>2012-09-20 20:55:33 +0000
committerRoland Dreier <roland@purestorage.com>2012-09-30 20:34:54 -0700
commitfc4ba7291b3dc7ace34794f51c47f041949c7a92 (patch)
tree72693baeb618f818c39b815e287639f751934d1c /drivers/infiniband
parent48a9956362c27e717a76435d450d906d5f49344a (diff)
downloadlinux-fc4ba7291b3dc7ace34794f51c47f041949c7a92.tar.gz
linux-fc4ba7291b3dc7ace34794f51c47f041949c7a92.tar.bz2
linux-fc4ba7291b3dc7ace34794f51c47f041949c7a92.zip
RDMA/nes: Fix for crash when TX checksum offload is off
When TX checksum offload is disabled for an iWarp connection, skb->ip_summed needs to be set to CHECKSUM_NONE. Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/nes/nes_cm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 49a9383137db..cfaacaf6bf5f 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -430,6 +430,8 @@ static void form_cm_frame(struct sk_buff *skb,
buf += sizeof(*tcph);
skb->ip_summed = CHECKSUM_PARTIAL;
+ if (!(cm_node->netdev->features & NETIF_F_IP_CSUM))
+ skb->ip_summed = CHECKSUM_NONE;
skb->protocol = htons(0x800);
skb->data_len = 0;
skb->mac_len = ETH_HLEN;