Re: IDEDMA problems.

C. Scott Ananian (cananian@lcs.mit.edu)
Wed, 3 Dec 1997 09:16:44 -0500 (EST)


On Wed, 3 Dec 1997, Rogier Wolff wrote:

> Gabriel Paubert wrote:
> > On Wed, 3 Dec 1997, C. Scott Ananian wrote:
> >
> > > > The 'unable to get irq 255' message is very suspicious -- I suspect that
> > > > something is putting -1 into a byte somewhere...
> > >
> > > I've narrowed this down to the function ide_setup_pci_device in the file
> > > ide-dma.c (kernel 2.1.70):
> > > --------
> > > __initfunc(static void ide_setup_pci_device (byte bus, byte fn, unsigned
> > > int bmiba, ide_pci_device_t *d))
> > > {
> > > unsigned int port, at_least_one_hwif_enabled = 0;
> > > unsigned short base = 0, ctl = 0;
> > > byte tmp = 0, pciirq = 0;
> > > ide_hwif_t *hwif;
> > >
> > > if (pcibios_read_config_byte(bus, fn, 0x3c, &pciirq))
> > > pciirq = 0; /* probe later if not set */
> Add:
> /* This is for x86. Do other architectures use this device? */
> #define MAX_IRQ 15
> if (pciirq > MAX_IRQ) {
> printk ("Warning: Your bios gave your IDE chip IRQ%d which is invalid.\n", pciirq);
> pciirq = 0;
> }

This is exactly what I had done (I had coded it as an || in the
pcibios_read_config_byte test) and this eliminated the problems -- I am
writing this email on my 2.1.70 system.

The test is still reporting "Bus-Master DMA disabled (BIOS)" even after
my previously posted fix to the test -- I suspect
that the current (but not the 2.1.65 and previous) code is incorrectly
handling the situation where DMA is unsupported or not enabled.
--Scott
@ @
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-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