From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754507Ab1I2S1K (ORCPT ); Thu, 29 Sep 2011 14:27:10 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:51097 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752553Ab1I2S1I (ORCPT ); Thu, 29 Sep 2011 14:27:08 -0400 Subject: 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: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig In-Reply-To: References: <1317245383.22022.23.camel@dabdike.hansenpartnership.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 29 Sep 2011 13:27:05 -0500 Message-ID: <1317320825.3190.70.camel@dabdike.hansenpartnership.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2011-09-29 at 14:49 +0530, Amit Sahrawat wrote: > The patch did not work, although it did get pass the earlier condition > which I mentioned- but still Write Cache is not taken into account – > seems mode sensing in sd_read_cache_type() does not send proper > request to the device – or does not read in proper bytes for this(as > per hdparm command analysis): > > Logs After Connecting: > scsi 0:0:0:0: Direct-Access Seagate Portable 0130 PQ: 0 ANSI: 4 > sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB) > sd 0:0:0:0: [sda] Write Protect is off > sd 0:0:0:0: [sda] No Caching mode page present This line means that a request for page 0x0 didn't turn up the caching mode page in the list of supported pages. What does sg_inq --page=0x0 /dev/sda show? James