summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Cappuccio <chris@cvs.openbsd.org>2002-06-08 23:04:08 +0000
committerChris Cappuccio <chris@cvs.openbsd.org>2002-06-08 23:04:08 +0000
commitc3fd4de1d91b24267be29487566d0913a6a00ff7 (patch)
treebe8abbe09a2837bb114741126e6256fdc45c4169
parentad1b21cbfe33df3c4d5dd9b73810c1bdd4bd5606 (diff)
pullup two fixes from netbsd
-no longer set southbridge enable bit on ALi rev >=c2 as it is unnecessary and causes rev c4 to hang -in hpt_pci_intr accept interrupt only once IDEDMA_CTL_ACT is turned off, fixes dma errors, lost interrupts, and other problems in hpt370 native mode
-rw-r--r--sys/dev/pci/pciide.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c
index 665e5a0b465..21ccb4b14cd 100644
--- a/sys/dev/pci/pciide.c
+++ b/sys/dev/pci/pciide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciide.c,v 1.83 2002/05/03 13:25:30 espie Exp $ */
+/* $OpenBSD: pciide.c,v 1.84 2002/06/08 23:04:07 chris Exp $ */
/* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */
/*
@@ -3271,22 +3271,10 @@ acer_chip_map(sc, pa)
pciide_print_channels(sc->sc_wdcdev.nchannels, interface);
/* From linux: enable "Cable Detection" */
- if (rev >= 0xC2) {
+ if (rev >= 0xC2)
pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_0x4B,
pciide_pci_read(sc->sc_pc, sc->sc_tag, ACER_0x4B)
| ACER_0x4B_CDETECT);
- /* set south-bridge's enable bit, m1533, 0x79 */
- if (rev == 0xC2)
- /* 1543C-B0 (m1533, 0x79, bit 2) */
- pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_0x79,
- pciide_pci_read(sc->sc_pc, sc->sc_tag, ACER_0x79)
- | ACER_0x79_REVC2_EN);
- else
- /* 1553/1535 (m1533, 0x79, bit 1) */
- pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_0x79,
- pciide_pci_read(sc->sc_pc, sc->sc_tag, ACER_0x79)
- | ACER_0x79_EN);
- }
for (channel = 0; channel < sc->sc_wdcdev.nchannels; channel++) {
cp = &sc->pciide_channels[channel];
@@ -3639,8 +3627,7 @@ hpt_pci_intr(arg)
for (i = 0; i < sc->sc_wdcdev.nchannels; i++) {
dmastat = bus_space_read_1(sc->sc_dma_iot, sc->sc_dma_ioh,
IDEDMA_CTL + IDEDMA_SCH_OFFSET * i);
- if((dmastat & ( IDEDMA_CTL_ACT | IDEDMA_CTL_INTR)) !=
- IDEDMA_CTL_INTR)
+ if((dmastat & IDEDMA_CTL_INTR) == 0)
continue;
cp = &sc->pciide_channels[i];
wdc_cp = &cp->wdc_channel;