[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 16/24] s390-ccw.img: Enhance drain_irqs().
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 16/24] s390-ccw.img: Enhance drain_irqs(). |
Date: |
Fri, 26 Apr 2013 20:19:25 +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>
Signed-off-by: Alexander Graf <address@hidden>
---
pc-bios/s390-ccw/virtio.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
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.6.0.2
- [Qemu-ppc] [PATCH 09/24] S390: ccw firmware: Add bootmap interpreter, (continued)
- [Qemu-ppc] [PATCH 09/24] S390: ccw firmware: Add bootmap interpreter, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 18/24] s390-ccw.img: Get queue config from host., Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 23/24] Utilize selective runtime reg sync for hot code paths, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 20/24] S390: CCW: Use new, working firmware by default, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 06/24] S390: ccw firmware: Add sclp output, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 15/24] s390-ccw.img: Detect devices with stsch., Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 03/24] S390: IPL: Use different firmware for different machines, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 17/24] s390-ccw.img: Rudimentary error checking., Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 24/24] virtio-rng-s390: add properties., Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 21/24] Common: Add quick access to first boot device, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 16/24] s390-ccw.img: Enhance drain_irqs().,
Alexander Graf <=
- [Qemu-ppc] [PATCH 22/24] Allow selective runtime register synchronization, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 19/24] S390: ccw firmware: Add compiled blob, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 07/24] S390: ccw firmware: Add virtio device drivers, Alexander Graf, 2013/04/26
- Re: [Qemu-ppc] [PULL 00/24] s390 patch queue 2013-04-26, Alexander Graf, 2013/04/26
- Re: [Qemu-ppc] [PULL 00/24] s390 patch queue 2013-04-26, Blue Swirl, 2013/04/26