Jeff Garzik wrote:
> Does the attached look OK to everybody?
> 

Jeff,
Yes.

And after an exchange with Jens, it would probably be
safer to map transfer_length=0 for READ_10 and READ_16
(as well as WRITE_10 and WRITE_16) to a nop on the ATA
side. Otherwise an ATA disk may attempt to transfer 2**16
sectors. [Only READ_6 and WRITE_6 have the quirky "0 means
256" definition, in the larger commands "0 means 0".]

Doug Gilbert

> 
> ------------------------------------------------------------------------
> 
> diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
> --- a/drivers/scsi/libata-scsi.c
> +++ b/drivers/scsi/libata-scsi.c
> @@ -581,6 +581,12 @@ static unsigned int ata_scsi_rw_xlat(str
>  
>       if (scsicmd[0] == READ_6 || scsicmd[0] == WRITE_6) {
>               qc->nsect = tf->nsect = scsicmd[4];
> +             if (!qc->nsect) {
> +                     qc->nsect = 256;
> +                     if (lba48)
> +                             tf->hob_nsect = 1;
> +             }
> +
>               tf->lbal = scsicmd[3];
>               tf->lbam = scsicmd[2];
>               tf->lbah = scsicmd[1] & 0x1f; /* mask out reserved bits */

-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to