]> git.baikalelectronics.ru Git - kernel.git/commit
qeth: improve set_features error handling
authorHans Wippel <hwippel@linux.vnet.ibm.com>
Thu, 16 Jun 2016 14:19:01 +0000 (16:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Jun 2016 05:16:13 +0000 (22:16 -0700)
commit322ebe0b6133613acaa5802572816baf00ba08cb
tree188c731ef8b450eb157f12c90a0b982f3b7d8095
parent87f3ec8f73b7c0d67d31b6741650980a9e2a3316
qeth: improve set_features error handling

The function set_features is called to configure network device features
on the hardware. If errors occur, the network device features should
reflect the changed hardware state and the function should return an
error in order to notify the user.

In case of an error, the current implementation does not necessarily
save the changed hardware state in the network device features before an
error is returned.

This patch improves error handling by saving features, that could be
changed, to the network device features before returning an error. If
the device is not running, an additional check in fix_features removes
features, that require hardware changes, before they are passed to
set_features. Thus, the corresponding check was removed in set_features.

Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c