Revision e2bcadad hw/ide/core.c
b/hw/ide/core.c | ||
---|---|---|
65 | 65 |
static void ide_dma_restart(IDEState *s, int is_read); |
66 | 66 |
static void ide_atapi_cmd_read_dma_cb(void *opaque, int ret); |
67 | 67 |
static int ide_handle_rw_error(IDEState *s, int error, int op); |
68 |
static void ide_flush_cache(IDEState *s); |
|
68 | 69 |
|
69 | 70 |
static void padstr(char *str, const char *src, int len) |
70 | 71 |
{ |
... | ... | |
688 | 689 |
} else { |
689 | 690 |
ide_sector_write(bmdma_active_if(bm)); |
690 | 691 |
} |
692 |
} else if (bm->status & BM_STATUS_RETRY_FLUSH) { |
|
693 |
ide_flush_cache(bmdma_active_if(bm)); |
|
691 | 694 |
} |
692 | 695 |
} |
693 | 696 |
|
... | ... | |
795 | 798 |
{ |
796 | 799 |
IDEState *s = opaque; |
797 | 800 |
|
798 |
/* XXX: how do we signal I/O errors here? */ |
|
801 |
if (ret < 0) { |
|
802 |
/* XXX: What sector number to set here? */ |
|
803 |
if (ide_handle_rw_error(s, -ret, BM_STATUS_RETRY_FLUSH)) { |
|
804 |
return; |
|
805 |
} |
|
806 |
} |
|
799 | 807 |
|
800 | 808 |
s->status = READY_STAT | SEEK_STAT; |
801 | 809 |
ide_set_irq(s->bus); |
Also available in: Unified diff