]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
s390/qeth: test RX/TX checksum offload reply
authorThomas Richter <tmricht@linux.vnet.ibm.com>
Thu, 12 Jan 2017 14:48:33 +0000 (15:48 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jan 2017 15:02:43 +0000 (10:02 -0500)
commitf9d8e6dc0fdee06e3eaf779a52530f4b8be6966f
tree51b6df53b62afa27e19842f434ff0fd3f58d80b8
parentc9475369bd2bce788796aa313036faecb9725194
s390/qeth: test RX/TX checksum offload reply

Turning on receive and/or transmit checksum offload support
on the OSA card requires 2 commands:
1. start command which replies with available features
2. enable command to turn on selected features.

The current version does not check the reply of the start
command and simply uses the returned value to enable
offload features. When the start command returns zero, this
leads to a situation where no checksum offload
is turned on by the hardware. Even worse no error
indication is returned. The Linux kernel assumes
the OSA card performs RX/TX checksum offload, but the hardware
does not perform any checksum verification at all.

This patch checks the return of the start and enable
command responses from the hardware and turns off
checksum offloading if the commands fails or does not
respond with the correct bit setting.

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Reviewed-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Reviewed-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_core_mpc.h