From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [RFC] libata new EH document Date: Wed, 31 Aug 2005 22:22:17 -0400 Message-ID: <431665D9.7010500@pobox.com> References: <20050829061124.GA2725@htj.dyndns.org> <43142279.3070004@tw.ibm.com> <43143461.7040606@gmail.com> <43146DE7.1070501@adaptec.com> <4316569B.6080406@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4316569B.6080406@gmail.com> Sender: linux-scsi-owner@vger.kernel.org To: Tejun Heo Cc: Luben Tuikov , Albert Lee , linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, Doug Maxey List-Id: linux-ide@vger.kernel.org Tejun Heo wrote: > IMHO, it's a good idea to maintain one qc to one ATA/ATAPI command > mapping as long as possible. And, in the suggested framework, it's > guaranteed that no other command can come inbetween CHECK_SENSE and > REQUEST_SENSE. > > Requesting sense from EH, calling scsi_decide_disposition() on the > sense and following the verdict should achieve the same effect as > emulating autosense. Is there any compelling reason to break one qc to > one command mapping? Yes, you should have one qc <-> one ATA/ATAPI command. That's why, in the NCQ scenario, I wanted to make sure that one qc was always reserved for error handling: REQUEST SENSE or READ LOG EXT, most importantly. For SAT layer MODE SELECT translations, that implies multiple calls to qc_new/qc_issue/qc_complete before completing the overall SCSI command. The same for handling sata_sil mod15write: I am beginning to feel like the mod15write workaround might be best implemented in a manner that caused libata-scsi (not sata_sil) to create/issue/complete multiple ATA commands. The only problem you run into is that a qc may be active during EH, when you need another qc. So avoiding recursive details becomes an issue. Jeff