Module Name: src
Committed By: jakllsch
Date: Sun Apr 8 13:08:02 UTC 2012
Modified Files:
src/sys/dev/pci: slide.c
Log Message:
As suggested in the previous commit, the overwrite of the pci_attach_args
is a bug. Although I have not tested on real hardware, Linux's
pata_sl82c105.c only looks at the revision of the PCI bridge.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/slide.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/slide.c
diff -u src/sys/dev/pci/slide.c:1.22 src/sys/dev/pci/slide.c:1.23
--- src/sys/dev/pci/slide.c:1.22 Mon Apr 4 20:37:56 2011
+++ src/sys/dev/pci/slide.c Sun Apr 8 13:08:02 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: slide.c,v 1.22 2011/04/04 20:37:56 dyoung Exp $ */
+/* $NetBSD: slide.c,v 1.23 2012/04/08 13:08:02 jakllsch Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: slide.c,v 1.22 2011/04/04 20:37:56 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: slide.c,v 1.23 2012/04/08 13:08:02 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -128,7 +128,6 @@ sl82c105_bugchk(const struct pci_attach_
static void
sl82c105_chip_map(struct pciide_softc *sc, const struct pci_attach_args *pa)
{
- struct pci_attach_args pa0;
struct pciide_channel *cp;
pcireg_t interface, idecr;
int channel;
@@ -141,10 +140,9 @@ sl82c105_chip_map(struct pciide_softc *s
/*
* Check to see if we're part of the Winbond 83c553 Southbridge.
- * If so, we need to disable DMA on rev. <= 5 of that chip.
+ * If so, we need to disable DMA on rev. <= 5 of the southbridge.
*/
- if (pci_find_device(&pa0, sl82c105_bugchk)) {
- pa = &pa0;
+ if (pci_find_device(NULL, sl82c105_bugchk)) {
aprint_verbose(" but disabled due to 83c553 rev. <= 0x05");
sc->sc_dma_ok = 0;
} else