From: Ben Hutchings Date: Wed, 28 Oct 2009 09:50:44 +0000 (-0700) Subject: sfc: Really allow RX checksum offload to be disabled X-Git-Tag: v2.6.33-rc1~388^2~670 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=9c1bbbaf3eef357b15c0e94085d96f18c6f1bde6;p=~emulex%2Finfiniband.git sfc: Really allow RX checksum offload to be disabled We have never checked the efx_nic::rx_checksum_enabled flag everywhere we should, and since the switch to GRO we don't check it anywhere. It's simplest to check it in the one place where we initialise the per-packet checksummed flag. Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller --- diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 8776432f683..865638b035b 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c @@ -869,8 +869,9 @@ static void falcon_handle_rx_event(struct efx_channel *channel, * UDP/IPv4, then we can rely on the hardware checksum. */ checksummed = - rx_ev_hdr_type == FSE_AB_RX_EV_HDR_TYPE_IPV4_TCP || - rx_ev_hdr_type == FSE_AB_RX_EV_HDR_TYPE_IPV4_UDP; + efx->rx_checksum_enabled && + (rx_ev_hdr_type == FSE_AB_RX_EV_HDR_TYPE_IPV4_TCP || + rx_ev_hdr_type == FSE_AB_RX_EV_HDR_TYPE_IPV4_UDP); } else { falcon_handle_rx_not_ok(rx_queue, event, &rx_ev_pkt_ok, &discard);