Re: quick bug-fix for ide-dma.c

C. Scott Ananian (cananian@lcs.mit.edu)
Wed, 3 Dec 1997 19:40:01 -0500 (EST)


On Wed, 3 Dec 1997, mlord wrote:

> C. Scott Ananian wrote:
> >
> > Someone swapped & and && in ide-dma.c:
>
> Thanks again, but found-it already -- Linus has a patch for 2.1.71
>
> (harmless but annoying bug).

More significant question: is this the correct behavior? It seems like we
should be jumping out of the ide-dma setup somehow if we find that
bus-mastering is not enabled. In my particular case, Bus-Mastering DMA
seems to be disabled in the BIOS, *but* this function decides to set my
hard drive interrupt to 255 anyway...
--Scott

> > --- linux/drivers/block/ide-dma.c~ Mon Dec 1 21:08:44 1997
> > +++ linux/drivers/block/ide-dma.c Wed Dec 3 00:04:00 1997
> > @@ -599,7 +599,7 @@
> > * Check for Bus-Master DMA capability
> > */
> > if (!(pcicmd & 4) || !(bmiba = ide_get_or_set_bmiba(bus, fn, d->name))) {
> > - if ((ccode >> 16) == PCI_CLASS_STORAGE_RAID || (ccode && 0x8000))
> > + if ((ccode >> 16) == PCI_CLASS_STORAGE_RAID || (ccode & 0x8000))
> > printk("%s: Bus-Master DMA is disabled (BIOS)\n", d->name);
> > }
> > ide_setup_pci_device(bus, fn, bmiba, d);