Revision 6bcb1a79 hw/ide/core.c
b/hw/ide/core.c | ||
---|---|---|
801 | 801 |
ide_set_irq(s->bus); |
802 | 802 |
} |
803 | 803 |
|
804 |
static void ide_flush_cache(IDEState *s) |
|
805 |
{ |
|
806 |
if (s->bs) { |
|
807 |
bdrv_aio_flush(s->bs, ide_flush_cb, s); |
|
808 |
} else { |
|
809 |
ide_flush_cb(s, 0); |
|
810 |
} |
|
811 |
} |
|
812 |
|
|
804 | 813 |
static inline void cpu_to_ube16(uint8_t *buf, int val) |
805 | 814 |
{ |
806 | 815 |
buf[0] = val >> 8; |
... | ... | |
2031 | 2040 |
break; |
2032 | 2041 |
case WIN_FLUSH_CACHE: |
2033 | 2042 |
case WIN_FLUSH_CACHE_EXT: |
2034 |
if (s->bs) |
|
2035 |
bdrv_aio_flush(s->bs, ide_flush_cb, s); |
|
2036 |
else |
|
2037 |
ide_flush_cb(s, 0); |
|
2043 |
ide_flush_cache(s); |
|
2038 | 2044 |
break; |
2039 | 2045 |
case WIN_STANDBY: |
2040 | 2046 |
case WIN_STANDBY2: |
Also available in: Unified diff