Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Add support for the CMD PCI646U. Linux claims th...
details: https://anonhg.NetBSD.org/src/rev/5d08481c0ab3
branches: trunk
changeset: 495665:5d08481c0ab3
user: bouyer <bouyer%NetBSD.org@localhost>
date: Wed Aug 02 20:23:45 2000 +0000
description:
Add support for the CMD PCI646U. Linux claims that this driver is brocken
with UDMA, so enable Ultra-DMA only if "options PCIIDE_CMD0646U_UDMA" is set.
diffstat:
sys/dev/pci/pciide.c | 17 ++++++++++++++++-
sys/dev/pci/pciide_cmd_reg.h | 5 +++--
2 files changed, 19 insertions(+), 3 deletions(-)
diffs (51 lines):
diff -r 32bd3e4a790f -r 5d08481c0ab3 sys/dev/pci/pciide.c
--- a/sys/dev/pci/pciide.c Wed Aug 02 20:23:23 2000 +0000
+++ b/sys/dev/pci/pciide.c Wed Aug 02 20:23:45 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pciide.c,v 1.82 2000/08/01 21:02:55 bouyer Exp $ */
+/* $NetBSD: pciide.c,v 1.83 2000/08/02 20:23:45 bouyer Exp $ */
/*
@@ -2201,6 +2201,21 @@
if (rev >= CMD0646U2_REV) {
sc->sc_wdcdev.cap |= WDC_CAPABILITY_UDMA;
sc->sc_wdcdev.UDMA_cap = 2;
+ } else if (rev >= CMD0646U_REV) {
+ /*
+ * Linux's driver claims that the 646U is broken
+ * with UDMA. Only enable it if we know what we're
+ * doing
+ */
+#ifdef PCIIDE_CMD0646U_UDMA
+ sc->sc_wdcdev.cap |= WDC_CAPABILITY_UDMA;
+ sc->sc_wdcdev.UDMA_cap = 2;
+#endif
+ /* explicitely disable UDMA */
+ pciide_pci_write(sc->sc_pc, sc->sc_tag,
+ CMD_UDMATIM(0), 0);
+ pciide_pci_write(sc->sc_pc, sc->sc_tag,
+ CMD_UDMATIM(1), 0);
}
sc->sc_wdcdev.irqack = cmd646_9_irqack;
break;
diff -r 32bd3e4a790f -r 5d08481c0ab3 sys/dev/pci/pciide_cmd_reg.h
--- a/sys/dev/pci/pciide_cmd_reg.h Wed Aug 02 20:23:23 2000 +0000
+++ b/sys/dev/pci/pciide_cmd_reg.h Wed Aug 02 20:23:45 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pciide_cmd_reg.h,v 1.8 2000/08/01 21:02:56 bouyer Exp $ */
+/* $NetBSD: pciide_cmd_reg.h,v 1.9 2000/08/02 20:23:46 bouyer Exp $ */
/*
* Copyright (c) 1998 Manuel Bouyer.
@@ -37,8 +37,9 @@
* Available from http://www.cmd.com/
*/
-/* revision of the 0646U2 */
+/* Interesting revision of the 0646 */
#define CMD0646U2_REV 0x05
+#define CMD0646U_REV 0x03
/* Configuration (RO) */
#define CMD_CONF 0x50
Home |
Main Index |
Thread Index |
Old Index