Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2]: src/sys/dev/pci Pull up following revision(s) (requested by b...
details: https://anonhg.NetBSD.org/src/rev/ffb9e64c2967
branches: netbsd-2
changeset: 564402:ffb9e64c2967
user: riz <riz%NetBSD.org@localhost>
date: Thu Jan 05 22:39:22 2006 +0000
description:
Pull up following revision(s) (requested by bouyer in ticket #10212):
sys/dev/pci/pciide_common.c: revision 1.29 via patch
Fix forcing use of DMA mode for the generic pciide driver: default_chip_map()
is called from pciide_attach() and at this point we don't know which drives
are here. Just assume all drives are there and allocate DMA ressources for
all of them.
diffstat:
sys/dev/pci/pciide_common.c | 23 ++++++++++-------------
1 files changed, 10 insertions(+), 13 deletions(-)
diffs (59 lines):
diff -r 0872e35bffc1 -r ffb9e64c2967 sys/dev/pci/pciide_common.c
--- a/sys/dev/pci/pciide_common.c Thu Dec 29 01:41:13 2005 +0000
+++ b/sys/dev/pci/pciide_common.c Thu Jan 05 22:39:22 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pciide_common.c,v 1.8.2.3.2.1 2005/03/16 13:04:31 tron Exp $ */
+/* $NetBSD: pciide_common.c,v 1.8.2.3.2.2 2006/01/05 22:39:22 riz Exp $ */
/*
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.8.2.3.2.1 2005/03/16 13:04:31 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.8.2.3.2.2 2006/01/05 22:39:22 riz Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -841,7 +841,6 @@
pcireg_t interface = PCI_INTERFACE(pa->pa_class);
pcireg_t csr;
int channel, drive;
- struct ata_drive_datas *drvp;
u_int8_t idedma_ctl;
bus_size_t cmdsize, ctlsize;
char *failreason;
@@ -949,12 +948,10 @@
idedma_ctl = 0;
cp = &sc->pciide_channels[channel];
for (drive = 0; drive < 2; drive++) {
- drvp = &cp->wdc_channel.ch_drive[drive];
- /* If no drive, skip */
- if ((drvp->drive_flags & DRIVE) == 0)
- continue;
- if ((drvp->drive_flags & DRIVE_DMA) == 0)
- continue;
+ /*
+ * we have not probed the drives yet, allocate
+ * ressources for all of them.
+ */
if (pciide_dma_table_setup(sc, channel, drive) != 0) {
/* Abort DMA setup */
aprint_error(
@@ -962,11 +959,11 @@
"using PIO transfers\n",
sc->sc_wdcdev.sc_dev.dv_xname,
channel, drive);
- drvp->drive_flags &= ~DRIVE_DMA;
+ sc->sc_dma_ok = 0;
+ sc->sc_wdcdev.cap &= ~(WDC_CAPABILITY_DMA |
+ WDC_CAPABILITY_IRQACK);
+ break;
}
- aprint_normal("%s:%d:%d: using DMA data transfers\n",
- sc->sc_wdcdev.sc_dev.dv_xname,
- channel, drive);
idedma_ctl |= IDEDMA_CTL_DRV_DMA(drive);
}
if (idedma_ctl != 0) {
Home |
Main Index |
Thread Index |
Old Index