[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/10] s390-ccw.img: Enhance drain_irqs().
From: |
Dominik Dingel |
Subject: |
[Qemu-devel] [PATCH 06/10] s390-ccw.img: Enhance drain_irqs(). |
Date: |
Fri, 26 Apr 2013 14:12:53 +0200 |
From: Cornelia Huck <address@hidden>
- Use tpi + tsch to get interrupts.
- Return an error if the irb indicates problems.
Signed-off-by: Cornelia Huck <address@hidden>
diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
index 1968fc6..1bd17d4 100644
--- a/pc-bios/s390-ccw/virtio.c
+++ b/pc-bios/s390-ccw/virtio.c
@@ -38,12 +38,21 @@ static void virtio_notify(struct subchannel_id schid)
* Virtio functions *
***********************************************/
-static void drain_irqs(struct subchannel_id schid)
+static int drain_irqs(struct subchannel_id schid)
{
struct irb irb = {};
+ int r = 0;
+
while (1) {
+ /* FIXME: make use of TPI, for that enable subchannel and isc */
if (tsch(schid, &irb)) {
- return;
+ /* Might want to differentiate error codes later on. */
+ if (irb.scsw.cstat) {
+ r = -EIO;
+ } else if (irb.scsw.dstat != 0xc) {
+ r = -EIO;
+ }
+ return r;
}
}
}
--
1.7.9.5
- [Qemu-devel] [PATCH 00/10] S390: Enhance s390 BIOS to enable bootdevice selection, Dominik Dingel, 2013/04/26
- [Qemu-devel] [PATCH 06/10] s390-ccw.img: Enhance drain_irqs().,
Dominik Dingel <=
- [Qemu-devel] [PATCH 03/10] S390: Check Bootdevice Type, Dominik Dingel, 2013/04/26
- Re: [Qemu-devel] [PATCH 03/10] S390: Check Bootdevice Type, Alexander Graf, 2013/04/26
- Re: [Qemu-devel] [PATCH 03/10] S390: Check Bootdevice Type, Christian Borntraeger, 2013/04/26
- Re: [Qemu-devel] [PATCH 03/10] S390: Check Bootdevice Type, Alexander Graf, 2013/04/26
- Re: [Qemu-devel] [PATCH 03/10] S390: Check Bootdevice Type, Christian Borntraeger, 2013/04/26
- Re: [Qemu-devel] [PATCH 03/10] S390: Check Bootdevice Type, Alexander Graf, 2013/04/26
- Re: [Qemu-devel] [PATCH 03/10] S390: Check Bootdevice Type, Dominik Dingel, 2013/04/26
- Re: [Qemu-devel] [PATCH 03/10] S390: Check Bootdevice Type, Alexander Graf, 2013/04/26
- Re: [Qemu-devel] [PATCH 03/10] S390: Check Bootdevice Type, Christian Borntraeger, 2013/04/26
- Re: [Qemu-devel] [PATCH 03/10] S390: Check Bootdevice Type, Alexander Graf, 2013/04/26