Revision 776e7f0f
b/pc-bios/s390-ccw/virtio.c | ||
---|---|---|
38 | 38 |
* Virtio functions * |
39 | 39 |
***********************************************/ |
40 | 40 |
|
41 |
static void drain_irqs(struct subchannel_id schid)
|
|
41 |
static int drain_irqs(struct subchannel_id schid)
|
|
42 | 42 |
{ |
43 | 43 |
struct irb irb = {}; |
44 |
int r = 0; |
|
45 |
|
|
44 | 46 |
while (1) { |
47 |
/* FIXME: make use of TPI, for that enable subchannel and isc */ |
|
45 | 48 |
if (tsch(schid, &irb)) { |
46 |
return; |
|
49 |
/* Might want to differentiate error codes later on. */ |
|
50 |
if (irb.scsw.cstat) { |
|
51 |
r = -EIO; |
|
52 |
} else if (irb.scsw.dstat != 0xc) { |
|
53 |
r = -EIO; |
|
54 |
} |
|
55 |
return r; |
|
47 | 56 |
} |
48 | 57 |
} |
49 | 58 |
} |
Also available in: Unified diff