libata: ata_timing_compute() fixup
XFER_SW_DMA_0 mode should be excluded from the extended cycle timing computations. Acked-by: Alan Cox <alan@linux.intel.com> Noticed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
9f8abf8248
commit
bff00256f1
|
@ -2938,7 +2938,7 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed,
|
||||||
if (id[ATA_ID_FIELD_VALID] & 2) { /* EIDE drive */
|
if (id[ATA_ID_FIELD_VALID] & 2) { /* EIDE drive */
|
||||||
memset(&p, 0, sizeof(p));
|
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)
|
if (speed <= XFER_PIO_2)
|
||||||
p.cycle = p.cyc8b = id[ATA_ID_EIDE_PIO];
|
p.cycle = p.cyc8b = id[ATA_ID_EIDE_PIO];
|
||||||
else if ((speed <= XFER_PIO_4) ||
|
else if ((speed <= XFER_PIO_4) ||
|
||||||
|
|
Loading…
Reference in a new issue