From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Subject: Re: [Patch] SCSI: Retrieve Cache Mode Using SG_ATA_16 if normal routine fails Date: Tue, 11 Oct 2011 12:41:34 +0200 Message-ID: <4E941D5E.6060101@suse.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Amit Sahrawat Cc: James Bottomley , Alan Stern , Douglas Gilbert , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Christoph Hellwig , NamJae Jeon List-Id: linux-scsi@vger.kernel.org On 10/11/2011 10:26 AM, Amit Sahrawat wrote: > SCSI: Retrieve Cache Mode Using SG_ATA_16 if normal routine fails > > It has been observed that a number of USB HDD's do not respond correc= tly > to SCSI mode sense command(retrieve caching pages) which results in t= heir > Write Cache being discarded by queue requests i.e., WCE if left set t= o > '0'(disabled). So, in order to identify the devices correctly - give = it > a last try using SG_ATA_16 after failure from normal routine. > I'd be _VERY_ cautious when trying something like this. ATA_16 is a rather recent command, and most older drives simply=20 can't cope with this. Instead they just kick the error handler and=20 go offline eventually. Shouldn't we rather use a sensible default, ie assume WCE is enabled? Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare-l3A5Bk7waGM@public.gmane.org +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 16746 (AG N=FCrnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754490Ab1JKKlj (ORCPT ); Tue, 11 Oct 2011 06:41:39 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58433 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752117Ab1JKKlh (ORCPT ); Tue, 11 Oct 2011 06:41:37 -0400 Message-ID: <4E941D5E.6060101@suse.de> Date: Tue, 11 Oct 2011 12:41:34 +0200 From: Hannes Reinecke User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Thunderbird/3.1.8 MIME-Version: 1.0 To: Amit Sahrawat Cc: James Bottomley , Alan Stern , Douglas Gilbert , linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , NamJae Jeon Subject: Re: [Patch] SCSI: Retrieve Cache Mode Using SG_ATA_16 if normal routine fails References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/11/2011 10:26 AM, Amit Sahrawat wrote: > SCSI: Retrieve Cache Mode Using SG_ATA_16 if normal routine fails > > It has been observed that a number of USB HDD's do not respond correctly > to SCSI mode sense command(retrieve caching pages) which results in their > Write Cache being discarded by queue requests i.e., WCE if left set to > '0'(disabled). So, in order to identify the devices correctly - give it > a last try using SG_ATA_16 after failure from normal routine. > I'd be _VERY_ cautious when trying something like this. ATA_16 is a rather recent command, and most older drives simply can't cope with this. Instead they just kick the error handler and go offline eventually. Shouldn't we rather use a sensible default, ie assume WCE is enabled? Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)