aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/cmd646.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-10-07 16:56:28 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-12 09:42:31 -0500
commit0cde1b4ca04b34bd74a52c7a66c8b8cf5b154fa0 (patch)
treeb4c018beb84b9e4c11d6a54f7632861b24a688dc /hw/ide/cmd646.c
parent61f58e593452b3b3395e0c24ad4f7e79429e6c2f (diff)
downloadqemu-0cde1b4ca04b34bd74a52c7a66c8b8cf5b154fa0.zip
qemu-0cde1b4ca04b34bd74a52c7a66c8b8cf5b154fa0.tar.gz
qemu-0cde1b4ca04b34bd74a52c7a66c8b8cf5b154fa0.tar.bz2
ide: cmd646 ->unit has just the value that we want
Patchworks-ID: 35307 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ide/cmd646.c')
-rw-r--r--hw/ide/cmd646.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index eb5a2e9..3b5362d 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -94,7 +94,7 @@ static uint32_t bmdma_readb(void *opaque, uint32_t addr)
val = bm->status;
break;
case 3:
- if (bm == &pci_dev->bmdma[0]) {
+ if (bm->unit == 0) {
val = pci_dev->dev.config[UDIDETCR0];
} else {
val = pci_dev->dev.config[UDIDETCR1];
@@ -127,7 +127,7 @@ static void bmdma_writeb(void *opaque, uint32_t addr, uint32_t val)
bm->status = (val & 0x60) | (bm->status & 1) | (bm->status & ~val & 0x06);
break;
case 3:
- if (bm == &pci_dev->bmdma[0])
+ if (bm->unit == 0)
pci_dev->dev.config[UDIDETCR0] = val;
else
pci_dev->dev.config[UDIDETCR1] = val;