(linux-ide CC added) On Thu, Jan 6, 2011 at 3:20 PM, <maksim.rayskiy@xxxxxxxxx> wrote: > index 66aa4be..ae8d9ca 100644 > --- a/drivers/ata/libata-scsi.c > +++ b/drivers/ata/libata-scsi.c > @@ -1276,6 +1276,7 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth, > Â*/ > Âstatic unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc) > Â{ > +    struct ata_device *dev = qc->dev; >    Âstruct scsi_cmnd *scmd = qc->scsicmd; >    Âstruct ata_taskfile *tf = &qc->tf; >    Âconst u8 *cdb = scmd->cmnd; > @@ -1294,23 +1295,9 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc) >        Âgoto invalid_fld;    /* power conditions not supported */ > >    Âif (cdb[4] & 0x1) { > -        tf->nsect = 1; Â/* 1 sector, lba=0 */ > - > -        if (qc->dev->flags & ATA_DFLAG_LBA) { > -            tf->flags |= ATA_TFLAG_LBA; > - > -            tf->lbah = 0x0; > -            tf->lbam = 0x0; > -            tf->lbal = 0x0; > -            tf->device |= ATA_LBA; > -        } else { > -            /* CHS */ > -            tf->lbal = 0x1; /* sect */ > -            tf->lbam = 0x0; /* cyl low */ > -            tf->lbah = 0x0; /* cyl high */ > -        } > - > -        tf->command = ATA_CMD_VERIFY;  /* READ VERIFY */ > +        dev->link->eh_info.dev_action[dev->devno] |= ATA_EH_VERIFY; > +        ata_port_schedule_eh(dev->link->ap); > +        goto skip; >    Â} else { >        Â/* Some odd clown BIOSen issue spindown on power off (ACPI S4 >         * or S5) causing some drives to spin up and down again. This really breaks the model where we are simply performing a translation -- where queueing and execution of the translated qc is kept separate from the SCSI->ATA translation itself. The above code should be left as-is, except perhaps it could set a 'verify' flag in the qc, which would then trigger the EH behavior you seek. Jeff ÿô.nÇ·®+%˱é¥wÿº{.nÇ·¥{±þÇø¡Ü}©²ÆzÚj:+v¨þø®w¥þàÞ¨è&¢)ß«a¶Úÿûz¹ÞúÝjÿwèf