Re: IDEDMA problems.

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Wed, 3 Dec 1997 14:32:13 +0100 (MET)


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;
}

(Untested code, use at your own risk.)

Roger.

-- 
** R.E.Wolff@BitWizard.nl ** +31-15-2137555 ** http://www.BitWizard.nl/ **
Florida -- A 39 year old construction worker woke up this morning when a
109-car freight train drove over him. According to the police the man was 
drunk. The man himself claims he slipped while walking the dog. 080897