mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-08 04:15:36 +00:00
fdc: fix false FD_SR0_SEEK
Do not always set FD_SR0_SEEK, as callers already set it if needed. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
d6ed4e2106
commit
075f5532f1
10
hw/fdc.c
10
hw/fdc.c
@ -1149,10 +1149,14 @@ static void fdctrl_stop_transfer(FDCtrl *fdctrl, uint8_t status0,
|
|||||||
uint8_t status1, uint8_t status2)
|
uint8_t status1, uint8_t status2)
|
||||||
{
|
{
|
||||||
FDrive *cur_drv;
|
FDrive *cur_drv;
|
||||||
|
|
||||||
cur_drv = get_cur_drv(fdctrl);
|
cur_drv = get_cur_drv(fdctrl);
|
||||||
fdctrl->status0 = status0 | FD_SR0_SEEK | (cur_drv->head << 2) |
|
|
||||||
GET_CUR_DRV(fdctrl);
|
fdctrl->status0 &= ~(FD_SR0_DS0 | FD_SR0_DS1 | FD_SR0_HEAD);
|
||||||
|
fdctrl->status0 |= GET_CUR_DRV(fdctrl);
|
||||||
|
if (cur_drv->head) {
|
||||||
|
fdctrl->status0 |= FD_SR0_HEAD;
|
||||||
|
}
|
||||||
|
fdctrl->status0 |= status0;
|
||||||
|
|
||||||
FLOPPY_DPRINTF("transfer status: %02x %02x %02x (%02x)\n",
|
FLOPPY_DPRINTF("transfer status: %02x %02x %02x (%02x)\n",
|
||||||
status0, status1, status2, fdctrl->status0);
|
status0, status1, status2, fdctrl->status0);
|
||||||
|
@ -154,7 +154,7 @@ static uint8_t send_read_command(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
st0 = floppy_recv();
|
st0 = floppy_recv();
|
||||||
if (st0 != 0x60) {
|
if (st0 != 0x40) {
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -398,7 +398,7 @@ static void test_read_no_dma_1(void)
|
|||||||
|
|
||||||
outb(FLOPPY_BASE + reg_dor, inb(FLOPPY_BASE + reg_dor) & ~0x08);
|
outb(FLOPPY_BASE + reg_dor, inb(FLOPPY_BASE + reg_dor) & ~0x08);
|
||||||
send_seek(0);
|
send_seek(0);
|
||||||
ret = send_read_no_dma_command(1, 0x24); /* FIXME: should be 0x04 */
|
ret = send_read_no_dma_command(1, 0x04);
|
||||||
g_assert(ret == 0);
|
g_assert(ret == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,7 +408,7 @@ static void test_read_no_dma_18(void)
|
|||||||
|
|
||||||
outb(FLOPPY_BASE + reg_dor, inb(FLOPPY_BASE + reg_dor) & ~0x08);
|
outb(FLOPPY_BASE + reg_dor, inb(FLOPPY_BASE + reg_dor) & ~0x08);
|
||||||
send_seek(0);
|
send_seek(0);
|
||||||
ret = send_read_no_dma_command(18, 0x24); /* FIXME: should be 0x04 */
|
ret = send_read_no_dma_command(18, 0x04);
|
||||||
g_assert(ret == 0);
|
g_assert(ret == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user