Blame 0029-fdc-Fix-floppy-port-I-O.patch
|
Justin M. Forbes |
6f9d9c |
From 8175ec8e0fee5f110d91209096e77159ad6404f7 Mon Sep 17 00:00:00 2001
|
|
Justin M. Forbes |
6f9d9c |
From: Kevin Wolf <kwolf@redhat.com>
|
|
Justin M. Forbes |
6f9d9c |
Date: Tue, 18 Oct 2011 16:41:45 +0200
|
|
Justin M. Forbes |
6f9d9c |
Subject: [PATCH 1/2] fdc: Fix floppy port I/O
|
|
Justin M. Forbes |
6f9d9c |
|
|
Justin M. Forbes |
6f9d9c |
The floppy device was broken by commit 212ec7ba (fdc: Convert to
|
|
Justin M. Forbes |
6f9d9c |
isa_register_portio_list). While the old interface provided the port number
|
|
Justin M. Forbes |
6f9d9c |
relative to the floppy drive's io_base, the new one provides the real port
|
|
Justin M. Forbes |
6f9d9c |
number, so we need to apply a bitmask now to get the register number.
|
|
Justin M. Forbes |
6f9d9c |
|
|
Justin M. Forbes |
6f9d9c |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
Justin M. Forbes |
6f9d9c |
---
|
|
Justin M. Forbes |
6f9d9c |
hw/fdc.c | 2 ++
|
|
Justin M. Forbes |
6f9d9c |
1 files changed, 2 insertions(+), 0 deletions(-)
|
|
Justin M. Forbes |
6f9d9c |
|
|
Justin M. Forbes |
6f9d9c |
diff --git a/hw/fdc.c b/hw/fdc.c
|
|
Justin M. Forbes |
6f9d9c |
index 9fdbc75..ec99c78 100644
|
|
Justin M. Forbes |
6f9d9c |
--- a/hw/fdc.c
|
|
Justin M. Forbes |
6f9d9c |
+++ b/hw/fdc.c
|
|
Justin M. Forbes |
6f9d9c |
@@ -433,6 +433,7 @@ static uint32_t fdctrl_read (void *opaque, uint32_t reg)
|
|
Justin M. Forbes |
6f9d9c |
FDCtrl *fdctrl = opaque;
|
|
Justin M. Forbes |
6f9d9c |
uint32_t retval;
|
|
Justin M. Forbes |
6f9d9c |
|
|
Justin M. Forbes |
6f9d9c |
+ reg &= 7;
|
|
Justin M. Forbes |
6f9d9c |
switch (reg) {
|
|
Justin M. Forbes |
6f9d9c |
case FD_REG_SRA:
|
|
Justin M. Forbes |
6f9d9c |
retval = fdctrl_read_statusA(fdctrl);
|
|
Justin M. Forbes |
6f9d9c |
@@ -470,6 +471,7 @@ static void fdctrl_write (void *opaque, uint32_t reg, uint32_t value)
|
|
Justin M. Forbes |
6f9d9c |
|
|
Justin M. Forbes |
6f9d9c |
FLOPPY_DPRINTF("write reg%d: 0x%02x\n", reg & 7, value);
|
|
Justin M. Forbes |
6f9d9c |
|
|
Justin M. Forbes |
6f9d9c |
+ reg &= 7;
|
|
Justin M. Forbes |
6f9d9c |
switch (reg) {
|
|
Justin M. Forbes |
6f9d9c |
case FD_REG_DOR:
|
|
Justin M. Forbes |
6f9d9c |
fdctrl_write_dor(fdctrl, value);
|
|
Justin M. Forbes |
6f9d9c |
--
|
|
Justin M. Forbes |
6f9d9c |
1.7.7.5
|
|
Justin M. Forbes |
6f9d9c |
|