[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/26] fdc: fix FD_SR0_SEEK for non-DMA transfers an
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 15/26] fdc: fix FD_SR0_SEEK for non-DMA transfers and multi sectors transfers |
Date: |
Wed, 14 Nov 2012 19:47:16 +0100 |
From: Hervé Poussineau <address@hidden>
On non-DMA transfers, fdctrl_stop_transfer() used to set FD_SR0_SEEK
no matter if there actually was a seek or not. This is obviously wrong.
fdctrl_seek_to_next_sect() has this information because it performs
the seek itself.
Signed-off-by: Hervé Poussineau <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
hw/fdc.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/fdc.c b/hw/fdc.c
index 7e4b0ce..e47050f 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -1123,11 +1123,13 @@ static int fdctrl_seek_to_next_sect(FDCtrl *fdctrl,
FDrive *cur_drv)
} else {
new_head = 0;
new_track++;
+ fdctrl->status0 |= FD_SR0_SEEK;
if ((cur_drv->flags & FDISK_DBL_SIDES) == 0) {
ret = 0;
}
}
} else {
+ fdctrl->status0 |= FD_SR0_SEEK;
new_track++;
ret = 0;
}
@@ -1458,7 +1460,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl)
* then from status mode to command mode
*/
if (fdctrl->msr & FD_MSR_NONDMA) {
- fdctrl_stop_transfer(fdctrl, FD_SR0_SEEK, 0x00, 0x00);
+ fdctrl_stop_transfer(fdctrl, 0x00, 0x00, 0x00);
} else {
fdctrl_reset_fifo(fdctrl);
fdctrl_reset_irq(fdctrl);
@@ -1922,7 +1924,7 @@ static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t
value)
* then from status mode to command mode
*/
if (fdctrl->data_pos == fdctrl->data_len)
- fdctrl_stop_transfer(fdctrl, FD_SR0_SEEK, 0x00, 0x00);
+ fdctrl_stop_transfer(fdctrl, 0x00, 0x00, 0x00);
return;
}
if (fdctrl->data_pos == 0) {
--
1.7.6.5
- [Qemu-devel] [PATCH 18/26] fdc-test: Check READ ID, (continued)
- [Qemu-devel] [PATCH 18/26] fdc-test: Check READ ID, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 17/26] fdc: fix false FD_SR0_SEEK, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 16/26] fdc: fix FD_SR0_SEEK for initial seek on DMA transfers, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 24/26] vmdk: Fix data corruption bug in WRITE and READ handling, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 21/26] fdc: remove double affectation of FD_MSR_CMDBUSY flag, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 20/26] fdc-tests: add tests for VERIFY command, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 22/26] fdc: fix typo in zero constant, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 19/26] fdc: implement VERIFY command, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 23/26] fdc: remove last usage of FD_STATE_SEEK, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 11/26] fdc-test: split test_media_change() test, so insert part can be reused, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 15/26] fdc: fix FD_SR0_SEEK for non-DMA transfers and multi sectors transfers,
Kevin Wolf <=
- [Qemu-devel] [PATCH 25/26] megasas: Use bdrv_drain_all instead of qemu_aio_flush, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 26/26] qemu-io: Use bdrv_drain_all instead of qemu_aio_flush, Kevin Wolf, 2012/11/14
- Re: [Qemu-devel] [PULL 00/26] Block patches, Kevin Wolf, 2012/11/19