Skip to content

Commit 773cc91

Browse files
julianwiedmannSasha Levin
authored andcommitted
s390/qeth: fix error handling for isolation mode cmds
[ Upstream commit e2dfcfb ] Current(?) OSA devices also store their cmd-specific return codes for SET_ACCESS_CONTROL cmds into the top-level cmd->hdr.return_code. So once we added stricter checking for the top-level field a while ago, none of the error logic that rolls back the user's configuration to its old state is applied any longer. For this specific cmd, go back to the old model where we peek into the cmd structure even though the top-level field indicated an error. Fixes: 686c97e ("s390/qeth: fix error handling in adapter command callbacks") Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 799b135 commit 773cc91

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎drivers/s390/net/qeth_core_main.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4265,9 +4265,6 @@ static int qeth_setadpparms_set_access_ctrl_cb(struct qeth_card *card,
42654265
int fallback = *(int *)reply->param;
42664266

42674267
QETH_CARD_TEXT(card, 4, "setaccb");
4268-
if (cmd->hdr.return_code)
4269-
return -EIO;
4270-
qeth_setadpparms_inspect_rc(cmd);
42714268

42724269
access_ctrl_req = &cmd->data.setadapterparms.data.set_access_ctrl;
42734270
QETH_CARD_TEXT_(card, 2, "rc=%d",
@@ -4277,7 +4274,7 @@ static int qeth_setadpparms_set_access_ctrl_cb(struct qeth_card *card,
42774274
QETH_DBF_MESSAGE(3, "ERR:SET_ACCESS_CTRL(%#x) on device %x: %#x\n",
42784275
access_ctrl_req->subcmd_code, CARD_DEVID(card),
42794276
cmd->data.setadapterparms.hdr.return_code);
4280-
switch (cmd->data.setadapterparms.hdr.return_code) {
4277+
switch (qeth_setadpparms_inspect_rc(cmd)) {
42814278
case SET_ACCESS_CTRL_RC_SUCCESS:
42824279
if (card->options.isolation == ISOLATION_MODE_NONE) {
42834280
dev_info(&card->gdev->dev,

0 commit comments

Comments
 (0)