From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 2/4] libata: Clear tf before doing request sense Date: Sat, 31 Mar 2007 16:27:11 +0900 Message-ID: <460E0D4F.1070005@gmail.com> References: <460E08AF.8070900@tw.ibm.com> <460E0AF9.1090007@tw.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from nz-out-0506.google.com ([64.233.162.232]:58085 "EHLO nz-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751443AbXCaH1T (ORCPT ); Sat, 31 Mar 2007 03:27:19 -0400 Received: by nz-out-0506.google.com with SMTP id s1so618800nze for ; Sat, 31 Mar 2007 00:27:19 -0700 (PDT) In-Reply-To: <460E0AF9.1090007@tw.ibm.com> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: albertl@mail.com Cc: Jeff Garzik , Alan Cox , Bartlomiej Zolnierkiewicz , Sergei Shtylyov , YUP , Vlad Codrea , IDE Linux Albert Lee wrote: > diff -Nrup 01_hsm_st/drivers/ata/libata-eh.c 02_aopen_rs/drivers/ata/libata-eh.c > --- 01_hsm_st/drivers/ata/libata-eh.c 2007-03-23 16:56:13.000000000 +0800 > +++ 02_aopen_rs/drivers/ata/libata-eh.c 2007-03-31 01:11:01.000000000 +0800 > @@ -991,18 +991,19 @@ static unsigned int atapi_eh_request_sen > > DPRINTK("ATAPI request sense\n"); > > - ata_tf_init(dev, &tf); > - > /* FIXME: is this needed? */ > memset(sense_buf, 0, SCSI_SENSE_BUFFERSIZE); > > - /* XXX: why tf_read here? */ > + /* read error register to initialize sense_buf */ > ap->ops->tf_read(ap, &tf); > > /* fill these in, for the case where they are -not- overwritten */ > sense_buf[0] = 0x70; > sense_buf[2] = tf.feature >> 4; Oh, now I see why it's there. Thanks for spotting this. We don't need tf_read here, you can simply use the value in qc->result_tf.feature for this purpose. -- tejun