]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] libata: honor the transfer cycle time speficied by the EIDE device
authorAlbert Lee <albertcc@tw.ibm.com>
Wed, 16 Nov 2005 09:06:18 +0000 (17:06 +0800)
committerJeff Garzik <jgarzik@pobox.com>
Wed, 16 Nov 2005 12:59:22 +0000 (07:59 -0500)
commit90c48bc1dd7365e138c1d33a1e29f41d02154b6e
tree9e95f56cc033943f26c21c61377cb7e8ed0d8b4b
parenta48915b7eeb872df2077290a4d9bc433829bf926
[PATCH] libata: honor the transfer cycle time speficied by the EIDE device

  The following code segment is not functional because the transfer cycle time speficied by
  the EIDE device is later overwritten by ata_timing_quantize():

/*
 * If the drive is an EIDE drive, it can tell us it needs extended
 * PIO/MW_DMA cycle timing.
 */
if (adev->id[ATA_ID_FIELD_VALID] & 2) { /* EIDE drive */
memset(&p, 0, sizeof(p));
(snip)
ata_timing_merge(&p, t, t, ATA_TIMING_CYCLE | ATA_TIMING_CYC8B);
               <== uninitialized "t" is used here
}

/*
 * Convert the timing to bus clock counts.
 */
ata_timing_quantize(s, t, T, UT);  <== t is overwritten by quantized s

  The patch has been submitted for ide-timing.h before:
  http://marc.theaimsgroup.com/?l=linux-ide&m=110820013425454&w=2
  Resubmitted for libata.

Changes:
  - Minor fix to honor the following transfer cycle time speficied by the device
    - id[65]: Minimum Multiword DMA transfer cycle time per word
    - id[67]: Minimum PIO transfer cycle time without flow control
    - id[68]: Minimum PIO transfer cycle time with IORDY

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
=======
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/scsi/libata-core.c