From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935370Ab1JEUIT (ORCPT ); Wed, 5 Oct 2011 16:08:19 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:37777 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935116Ab1JEUIR (ORCPT ); Wed, 5 Oct 2011 16:08:17 -0400 Subject: Re: Re: Re: BUG in kernel: Wrong Handling of USB =?UTF-8?Q?HDD=E2=80=99s?= in scsiglue(slave_configure) and scsi/sd(sd_read_cache_type) From: James Bottomley To: Amit Sahrawat Cc: 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 In-Reply-To: References: <1317835442.7238.8.camel@dabdike> Content-Type: text/plain; charset="UTF-8" Date: Wed, 05 Oct 2011 13:08:15 -0700 Message-ID: <1317845295.7238.15.camel@dabdike> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2011-10-06 at 01:21 +0530, Amit Sahrawat wrote: > > The best we could probably offer is an interface to turn on the WCE bit > > in software (technically, you can do this today > > in /scsi/class/scsi_disk//cache_type, it's just that it will try > > to commit the change as a MODE_SELECT which will presumably fail). > Thanks James, is this related with SCSI command MODE_SELECT? and this > is to be passed when there is some failure? > or simply doing an "echo " to > /scsi/class/scsi_disk//cache_type? can you please elaborate a > little You tell me since you have the device. What that echo does is that it does try to make the change permanent with a mode select ... that likely won't work and the cache change only takes if the revalidated disk says the write back has been enabled (which I really think it won't). So I think you need an additional software bit to flip for the case where the device lies. James