mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Amit Sahrawat <amit.sahrawat83@gmail.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: BUG in kernel: Wrong Handling of USB HDD’s in scsiglue(slave_configure) and scsi/sd(sd_read_cache_type)
Date: Thu, 29 Sep 2011 13:31:17 -0500	[thread overview]
Message-ID: <1317321077.3190.71.camel@dabdike.hansenpartnership.com> (raw)
In-Reply-To: <1317320825.3190.70.camel@dabdike.hansenpartnership.com>

On Thu, 2011-09-29 at 13:27 -0500, James Bottomley wrote:
> 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

Um, lets try that again, this time with the correct information.  What
we're looking for is the list of mode pages, so 

sg_modes --page=0x3f /dev/sda

Should return it.

Thanks,

James



  reply	other threads:[~2011-09-29 18:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-28 15:42 Amit Sahrawat
2011-09-28 15:54 ` BUG in kernel: Wrong Handling of USB HDD?s " Christoph Hellwig
2011-09-28 15:57 ` BUG in kernel: Wrong Handling of USB HDD’s " Amit Sahrawat
2011-09-28 21:29   ` James Bottomley
2011-09-29  9:19     ` Amit Sahrawat
2011-09-29 18:27       ` James Bottomley
2011-09-29 18:31         ` James Bottomley [this message]
2011-09-30  6:56           ` Amit Sahrawat
2011-09-30  7:06             ` NamJae Jeon
2011-09-30 12:18             ` James Bottomley
2011-09-30 17:53               ` Amit Sahrawat
2011-09-30 17:56                 ` Amit Sahrawat
2011-09-30 18:11                   ` James Bottomley
2011-09-30 18:30                     ` Amit Sahrawat
2011-09-30 18:17                   ` Alan Stern
2011-09-30 18:36                     ` Amit Sahrawat
2011-10-03 14:25 Alan Stern
2011-10-03 16:06 ` Douglas Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317321077.3190.71.camel@dabdike.hansenpartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=amit.sahrawat83@gmail.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®