[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 4/7] sd.c: use callbacks as a flag to use async IO
From: |
Igor Mitsyanko |
Subject: |
[Qemu-devel] [RFC 4/7] sd.c: use callbacks as a flag to use async IO |
Date: |
Fri, 10 May 2013 20:10:22 +0400 |
This is temporary to distinguish between sync and async users.
Signed-off-by: Igor Mitsyanko <address@hidden>
---
hw/sd/sd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 2e75201..a0bbbaa 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -530,6 +530,10 @@ void sd_set_cb(SDState *sd, qemu_irq readonly, qemu_irq
insert,
sd->datbusy_cb = endbusy;
qemu_set_irq(readonly, sd->bdrv ? bdrv_is_read_only(sd->bdrv) : 0);
qemu_set_irq(insert, sd->bdrv ? bdrv_is_inserted(sd->bdrv) : 0);
+
+ if (sd->start_bit_cb && sd->datbusy_cb) {
+ sd->iov.iov_base = sd->buf;
+ }
}
static void sd_erase(SDState *sd)
--
1.8.1.4
- [Qemu-devel] [RFC 0/7] Convert SD card model to AIO, Igor Mitsyanko, 2013/05/10
- [Qemu-devel] [RFC 1/7] sd.c: introduce AIO related members in SD state, Igor Mitsyanko, 2013/05/10
- [Qemu-devel] [RFC 2/7] sd.c: introduce variable for trekking valid data, Igor Mitsyanko, 2013/05/10
- [Qemu-devel] [RFC 3/7] sd.c: introduce "start bit" and "busy deasserted" callbacks, Igor Mitsyanko, 2013/05/10
- [Qemu-devel] [RFC 4/7] sd.c: use callbacks as a flag to use async IO,
Igor Mitsyanko <=
- [Qemu-devel] [RFC 5/7] sd.c: introduce async read operation, Igor Mitsyanko, 2013/05/10
- [Qemu-devel] [RFC 6/7] sd.c: introduce async write interface, Igor Mitsyanko, 2013/05/10
- [Qemu-devel] [RFC 7/7] pl181.c: convert to async IO SD card interface, Igor Mitsyanko, 2013/05/10
- Re: [Qemu-devel] [RFC 0/7] Convert SD card model to AIO, Stefan Hajnoczi, 2013/05/13