Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ide: ide_timing_compute() fixup

XFER_SW_DMA_0 mode should be excluded from the extended cycle
timing computations.

[ This is just a documentation fix -- code inside the affected
'if' block already makes sure to accept only PIO modes. ]

Noticed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Bartlomiej Zolnierkiewicz and committed by
David S. Miller
3dabcfef 220c58bc

+1 -1
+1 -1
drivers/ide/ide-timings.c
··· 166 166 if (id[ATA_ID_FIELD_VALID] & 2) { /* EIDE drive */ 167 167 memset(&p, 0, sizeof(p)); 168 168 169 - if (speed >= XFER_PIO_0 && speed <= XFER_SW_DMA_0) { 169 + if (speed >= XFER_PIO_0 && speed < XFER_SW_DMA_0) { 170 170 if (speed <= XFER_PIO_2) 171 171 p.cycle = p.cyc8b = id[ATA_ID_EIDE_PIO]; 172 172 else if ((speed <= XFER_PIO_4) ||