summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchris <chris@openbsd.org>2002-06-08 23:04:07 +0000
committerchris <chris@openbsd.org>2002-06-08 23:04:07 +0000
commit2e67432d2a7deafe1be890ca103ad52ec64e5655 (patch)
treeacb44cf6cddb710a9f88ce509013fc497bab236b
parentAdd missing; Fransoa Holop (diff)
downloadwireguard-openbsd-2e67432d2a7deafe1be890ca103ad52ec64e5655.tar.xz
wireguard-openbsd-2e67432d2a7deafe1be890ca103ad52ec64e5655.zip
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;