lkml.org 
[lkml]   [2003]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.5.59 kernel bugs
Hello!

On Thu, Feb 06, 2003 at 02:43:17PM -0600, niteowl@intrinsity.com wrote:

Also similar stuff in IDE code in 2.4.21-pre4 from bk tree:

> ===== misplaced/extra semicolon =====
drivers/ide/ide-taskfile.c:247 if (drive->using_dma && !(hwif->ide_dma_write(drive)));
drivers/ide/ide-taskfile.c:253 if (drive->using_dma && !(hwif->ide_dma_read(drive)));

At least looking at another similar code that is ifdefed out, it seems below patch is correct.
(and even if it's not, still that code should be changed not to confuse people ;) )

Also I took a look at drivers/ide/ide-taskfile.c in 2.5 hoping I can see what should
be in fact done and got even more confused ;)
Sounds like in 2.5 there should be "return ide_started" at the end, not stopped,
because otherwise when drive->using_dma is set, we always return ide_stopped for
WIN_WRITEDMA.*, WIN_IDENTIFY_DMA and WIN_READDMA, WIN_READDMA_ONCE, WIN_READDMA_EXT
taskfile->command and default case is the same (we check stuff, and then regardless
or the result of the check we always return ide_stopped).
Which looks somehow strange (and different from similar code in 2.4).
Can please somebody take a look at it?

Bye,
Oleg

===== drivers/ide/ide-taskfile.c 1.2 vs edited =====
--- 1.2/drivers/ide/ide-taskfile.c Thu Nov 14 20:38:17 2002
+++ edited/drivers/ide/ide-taskfile.c Fri Feb 7 11:56:59 2003
@@ -244,13 +244,13 @@
case WIN_WRITEDMA_ONCE:
case WIN_WRITEDMA:
case WIN_WRITEDMA_EXT:
- if (drive->using_dma && !(hwif->ide_dma_write(drive)));
+ if (drive->using_dma && !(hwif->ide_dma_write(drive)))
return ide_started;
case WIN_READDMA_ONCE:
case WIN_READDMA:
case WIN_READDMA_EXT:
case WIN_IDENTIFY_DMA:
- if (drive->using_dma && !(hwif->ide_dma_read(drive)));
+ if (drive->using_dma && !(hwif->ide_dma_read(drive)))
return ide_started;
default:
break;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.104 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site