Hello.
Bartlomiej Zolnierkiewicz wrote:
The other advantage of doing cleanups is that code becomes cleaner/simpler
which matters a lot for this codebase, i.e. ide-dma-off-void.patch exposed
(yet to be fixed) bug in set_using_dma() (->ide_dma_off_quietly always returns
0 which is passed by ->ide_dma_check to set_using_dma() which incorrectly
then calls ->ide_dma_on).
Well, this seems a newly intruduced bug.
The old code is so convulted that it is hard to see it w/o cleanup. :)
->ide_dma_check implementations often do
return hwif->ide_dma_off_quietly(drive);
so the return value of ide_dma_off_quietly() (which is always 0) is passed to
if (HWIF(drive)->ide_dma_check(drive)) return -EIO;
in ide.c:set_using_dma() -> as a result the next line is executed
if (HWIF(drive)->ide_dma_on(drive)) return -EIO;
So, the error seems to call hwif->ide_dma_on() after hwif->ide_dma_check()
since hwif->ide_dma_check() must've already called that.
MBR, Sergei
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]