[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 16/26] fdc: fix FD_SR0_SEEK for initial seek on DMA
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 16/26] fdc: fix FD_SR0_SEEK for initial seek on DMA transfers |
Date: |
Wed, 14 Nov 2012 19:47:17 +0100 |
From: Hervé Poussineau <address@hidden>
fdctrl_start_transfer() used to set FD_SR0_SEEK no matter if
there actually was a seek or not. This is obviously wrong.
fdctrl_start_transfer() has this information because it performs
the initial seek itself.
Signed-off-by: Hervé Poussineau <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
hw/fdc.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/hw/fdc.c b/hw/fdc.c
index e47050f..a9a2a2a 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -1179,7 +1179,6 @@ static void fdctrl_start_transfer(FDCtrl *fdctrl, int
direction)
{
FDrive *cur_drv;
uint8_t kh, kt, ks;
- int did_seek = 0;
SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK);
cur_drv = get_cur_drv(fdctrl);
@@ -1213,7 +1212,7 @@ static void fdctrl_start_transfer(FDCtrl *fdctrl, int
direction)
fdctrl->fifo[5] = ks;
return;
case 1:
- did_seek = 1;
+ fdctrl->status0 |= FD_SR0_SEEK;
break;
default:
break;
@@ -1240,10 +1239,6 @@ static void fdctrl_start_transfer(FDCtrl *fdctrl, int
direction)
fdctrl->data_state |= FD_STATE_MULTI;
else
fdctrl->data_state &= ~FD_STATE_MULTI;
- if (did_seek)
- fdctrl->data_state |= FD_STATE_SEEK;
- else
- fdctrl->data_state &= ~FD_STATE_SEEK;
if (fdctrl->fifo[5] == 00) {
fdctrl->data_len = fdctrl->fifo[8];
} else {
@@ -1286,7 +1281,6 @@ static void fdctrl_start_transfer(FDCtrl *fdctrl, int
direction)
if (direction != FD_DIR_WRITE)
fdctrl->msr |= FD_MSR_DIO;
/* IO based transfer: calculate len */
- fdctrl->status0 |= FD_SR0_SEEK;
fdctrl_raise_irq(fdctrl);
}
--
1.7.6.5
- [Qemu-devel] [PATCH 04/26] MAINTAINERS: add Stefan Hajnoczi as block and virtio-blk co-maintainer, (continued)
- [Qemu-devel] [PATCH 04/26] MAINTAINERS: add Stefan Hajnoczi as block and virtio-blk co-maintainer, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 05/26] block: Workaround for older versions of MinGW gcc, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 06/26] tests: allow qemu-iotests to be run against nbd backend, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 07/26] aio: switch aiocb_size type int -> size_t, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 09/26] aio: rename AIOPool to AIOCBInfo, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 12/26] fdc-test: insert media before fuzzing registers, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 13/26] fdc-test: add tests for non-DMA READ command, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 14/26] fdc: use status0 field instead of a local variable, Kevin Wolf, 2012/11/14
- [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 <=
- [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, 2012/11/14
- [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