[PATCH] CMD646 oops on boot with Rev 1 chipsets. [2.3.3]

C. Scott Ananian (cananian@lesser-magoo.lcs.mit.edu)
Sat, 22 May 1999 03:22:37 -0400 (EDT)


The attached patch fixes an oops on boot due to a bug in cmd646.c that
enables DMA, even if dmabase has been set to 0 indicating that DMA should
not be used. If dmabase is zero, the DMA buffer is never allocated, and
so the first call to cmd646_dmaproc causes an Oops. More details are
available if needed.
--s
@ @
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-oOO-(_)-OOo-=-=-=-=-=
C. Scott Ananian: cananian@lcs.mit.edu / Declare the Truth boldly and
Laboratory for Computer Science/Crypto / without hindrance.
Massachusetts Institute of Technology /META-PARRESIAS AKOLUTOS:Acts 28:31
-.-. .-.. .. ..-. ..-. --- .-. -.. ... -.-. --- - - .- -. .- -. .. .- -.
PGP key available via finger and from http://www.pdos.lcs.mit.edu/~cananian

--- drivers/block/cmd646.c~ Thu May 20 15:48:04 1999
+++ drivers/block/cmd646.c Sat May 22 02:47:43 1999
@@ -275,9 +275,11 @@
(void) pci_write_config_byte(dev, 0x58, 0x3f);
(void) pci_write_config_byte(dev, 0x5b, 0x3f);

- if (class_rev == 0x01) {
- hwif->dmaproc = &cmd646_1_dmaproc;
- } else {
- hwif->dmaproc = &cmd646_dmaproc;
+ if (hwif->dma_base) {
+ if (class_rev == 0x01) {
+ hwif->dmaproc = &cmd646_1_dmaproc;
+ } else {
+ hwif->dmaproc = &cmd646_dmaproc;
+ }
}
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/