summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorfoxfair <foxfair@FreeBSD.org>1998-12-24 06:30:21 +0000
committerfoxfair <foxfair@FreeBSD.org>1998-12-24 06:30:21 +0000
commite20489fd39f80eb7d4a3fd6aed9c9440a16e18b9 (patch)
tree15ed9b0cf727d295598739c17feb9e55b1339178 /sys
parent7075e49e773467e7632e901d9fae38ac40418af2 (diff)
downloadFreeBSD-src-e20489fd39f80eb7d4a3fd6aed9c9440a16e18b9.zip
FreeBSD-src-e20489fd39f80eb7d4a3fd6aed9c9440a16e18b9.tar.gz
Correct the wrong PCI-IDE probing on AcerLabs Aladdin-V chipset. It won't
change the original code but add an extra option "ALI_V" to check the precise IDE port.(especially, secondary) Use the same option "ALI_V" on the kernel config file to prevent generic DMA check causes wrong result. (It seems buggy even on PIIX4 chipset, and I don't know when this bug start) Should I add the option "ALI_V" into /sys/i386/conf/LINT ?
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/isa/wd.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/i386/isa/wd.c b/sys/i386/isa/wd.c
index 0e01112..dc459fb 100644
--- a/sys/i386/isa/wd.c
+++ b/sys/i386/isa/wd.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
- * $Id: wd.c,v 1.180 1998/11/15 20:08:50 eivind Exp $
+ * $Id: wd.c,v 1.181 1998/12/15 09:16:57 bde Exp $
*/
/* TODO:
@@ -313,19 +313,29 @@ wdprobe(struct isa_device *dvp)
interface = du->dk_ctrlr / 2;
du->dk_interface = interface;
#if !defined(DISABLE_PCI_IDE) && (NPCI > 0)
- if (wddma[interface].wdd_candma) {
- du->dk_dmacookie = wddma[interface].wdd_candma(dvp->id_iobase, du->dk_ctrlr);
+#ifdef ALI_V
+ if ((wddma[interface].wdd_candma) &&
+ ((du->dk_dmacookie = wddma[interface].wdd_candma(dvp->id_iobase,du->dk_ctrlr)) != NULL))
+ {
du->dk_port = dvp->id_iobase;
du->dk_altport = wddma[interface].wdd_altiobase(du->dk_dmacookie);
} else {
du->dk_port = dvp->id_iobase;
du->dk_altport = du->dk_port + wd_ctlr;
}
+#endif
+ if (wddma[interface].wdd_candma) {
+ du->dk_dmacookie = wddma[interface].wdd_candma(dvp->id_iobase,du->dk_ctrlr);
+ du->dk_port = dvp->id_iobase;
+ du->dk_altport = wddma[interface].wdd_altiobase(du->dk_dmacookie);
+ } else {
+ du->dk_port = dvp->id_iobase;
+ du->dk_altport = du->dk_port + wd_ctlr;
+ }
#else
du->dk_port = dvp->id_iobase;
du->dk_altport = du->dk_port + wd_ctlr;
#endif
-
/* check if we have registers that work */
outb(du->dk_port + wd_sdh, WDSD_IBM); /* set unit 0 */
outb(du->dk_port + wd_cyl_lo, 0xa5); /* wd_cyl_lo is read/write */
OpenPOWER on IntegriCloud