Skip to content

Commit

Permalink
s390/ipl: Implement diag308 loop for zfcpdump
Browse files Browse the repository at this point in the history
When a zfcpdump is triggered and a second dump on the same CEC is
already in progress for another LPAR, diagnose 308 returns with
an error code until the first dump is finished. Currently the
second Linux stops with a disabled wait PSW in that case.

This is improved now by by triggering diag 308 in a loop until
it works.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Michael Holzheu authored and Martin Schwidefsky committed Feb 14, 2013
1 parent 9a17e97 commit 0894b3a
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions arch/s390/kernel/ipl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,16 @@ static struct kobj_attribute dump_type_attr =

static struct kset *dump_kset;

static void diag308_dump(void *dump_block)
{
diag308(DIAG308_SET, dump_block);
while (1) {
if (diag308(DIAG308_DUMP, NULL) != 0x302)
break;
udelay_simple(USEC_PER_SEC);
}
}

static void __dump_run(void *unused)
{
struct ccw_dev_id devid;
Expand All @@ -1432,12 +1442,10 @@ static void __dump_run(void *unused)
__cpcmd(buf, NULL, 0, NULL);
break;
case DUMP_METHOD_CCW_DIAG:
diag308(DIAG308_SET, dump_block_ccw);
diag308(DIAG308_DUMP, NULL);
diag308_dump(dump_block_ccw);
break;
case DUMP_METHOD_FCP_DIAG:
diag308(DIAG308_SET, dump_block_fcp);
diag308(DIAG308_DUMP, NULL);
diag308_dump(dump_block_fcp);
break;
default:
break;
Expand Down

0 comments on commit 0894b3a

Please sign in to comment.