Skip to content

Commit

Permalink
s390/chsc: fix SEI usage on old FW levels
Browse files Browse the repository at this point in the history
Using a notification type mask for the store event information chsc
is unsupported on some firmware levels. Retry SEI with that mask set
to zero (which is the old way of requesting only channel subsystem
related events).

Cc: <stable@vger.kernel.org>
Reported-and-tested-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Apr 17, 2014
1 parent 6ca2a88 commit 06cd7a8
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions drivers/s390/cio/chsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,18 +541,27 @@ static void chsc_process_sei_nt0(struct chsc_sei_nt0_area *sei_area)

static void chsc_process_event_information(struct chsc_sei *sei, u64 ntsm)
{
do {
static int ntsm_unsupported;

while (true) {
memset(sei, 0, sizeof(*sei));
sei->request.length = 0x0010;
sei->request.code = 0x000e;
sei->ntsm = ntsm;
if (!ntsm_unsupported)
sei->ntsm = ntsm;

if (chsc(sei))
break;

if (sei->response.code != 0x0001) {
CIO_CRW_EVENT(2, "chsc: sei failed (rc=%04x)\n",
sei->response.code);
CIO_CRW_EVENT(2, "chsc: sei failed (rc=%04x, ntsm=%llx)\n",
sei->response.code, sei->ntsm);

if (sei->response.code == 3 && sei->ntsm) {
/* Fallback for old firmware. */
ntsm_unsupported = 1;
continue;
}
break;
}

Expand All @@ -568,7 +577,10 @@ static void chsc_process_event_information(struct chsc_sei *sei, u64 ntsm)
CIO_CRW_EVENT(2, "chsc: unhandled nt: %d\n", sei->nt);
break;
}
} while (sei->u.nt0_area.flags & 0x80);

if (!(sei->u.nt0_area.flags & 0x80))
break;
}
}

/*
Expand Down

0 comments on commit 06cd7a8

Please sign in to comment.