Skip to content

Commit

Permalink
libata: ata_timing_compute() fixup
Browse files Browse the repository at this point in the history
XFER_SW_DMA_0 mode should be excluded from the extended cycle timing
computations.

Acked-by: Alan Cox <[email protected]>
Noticed-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
  • Loading branch information
bzolnier authored and Jeff Garzik committed Oct 14, 2011
1 parent 9f8abf8 commit bff0025
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2938,7 +2938,7 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed,
if (id[ATA_ID_FIELD_VALID] & 2) { /* EIDE drive */
memset(&p, 0, sizeof(p));

if (speed >= XFER_PIO_0 && speed <= XFER_SW_DMA_0) {
if (speed >= XFER_PIO_0 && speed < XFER_SW_DMA_0) {
if (speed <= XFER_PIO_2)
p.cycle = p.cyc8b = id[ATA_ID_EIDE_PIO];
else if ((speed <= XFER_PIO_4) ||
Expand Down

0 comments on commit bff0025

Please sign in to comment.