Skip to content

Commit e2dfcfb

Browse files
julianwiedmanndavem330
authored andcommitted
s390/qeth: fix error handling for isolation mode cmds
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f3c7a6e commit e2dfcfb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/s390/net/qeth_core_main.c

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

45464546
QETH_CARD_TEXT(card, 4, "setaccb");
4547-
if (cmd->hdr.return_code)
4548-
return -EIO;
4549-
qeth_setadpparms_inspect_rc(cmd);
45504547

45514548
access_ctrl_req = &cmd->data.setadapterparms.data.set_access_ctrl;
45524549
QETH_CARD_TEXT_(card, 2, "rc=%d",
@@ -4556,7 +4553,7 @@ static int qeth_setadpparms_set_access_ctrl_cb(struct qeth_card *card,
45564553
QETH_DBF_MESSAGE(3, "ERR:SET_ACCESS_CTRL(%#x) on device %x: %#x\n",
45574554
access_ctrl_req->subcmd_code, CARD_DEVID(card),
45584555
cmd->data.setadapterparms.hdr.return_code);
4559-
switch (cmd->data.setadapterparms.hdr.return_code) {
4556+
switch (qeth_setadpparms_inspect_rc(cmd)) {
45604557
case SET_ACCESS_CTRL_RC_SUCCESS:
45614558
if (card->options.isolation == ISOLATION_MODE_NONE) {
45624559
dev_info(&card->gdev->dev,

0 commit comments

Comments
 (0)