public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [USB] Allow retrieval of the Caching mode page
@ 2010-10-21 22:52 Luben Tuikov
  2010-10-22  0:04 ` Matthew Dharm
  0 siblings, 1 reply; 3+ messages in thread
From: Luben Tuikov @ 2010-10-21 22:52 UTC (permalink / raw)
  To: Greg KH, linux-usb, linux-scsi, linux-kernel

The statement of the comment removed by this
patch, "A number of devices have problems with
MODE SENSE for page x08, so we will skip it" is
certainly too general to apply for *all*
devices. This patch removes the unconditional
retrieval constraint of the Caching mode page.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
 drivers/usb/storage/scsiglue.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index d8d98cf..c3cb60d 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -193,10 +193,6 @@ static int slave_configure(struct scsi_device *sdev)
 		if (us->fflags & US_FL_NO_WP_DETECT)
 			sdev->skip_ms_page_3f = 1;
 
-		/* A number of devices have problems with MODE SENSE for
-		 * page x08, so we will skip it. */
-		sdev->skip_ms_page_8 = 1;
-
 		/* Some disks return the total number of blocks in response
 		 * to READ CAPACITY rather than the highest block number.
 		 * If this device makes that mistake, tell the sd driver. */
-- 
1.7.0.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] [USB] Allow retrieval of the Caching mode page
  2010-10-21 22:52 [PATCH] [USB] Allow retrieval of the Caching mode page Luben Tuikov
@ 2010-10-22  0:04 ` Matthew Dharm
  2010-10-22  4:06   ` Luben Tuikov
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Dharm @ 2010-10-22  0:04 UTC (permalink / raw)
  To: Luben Tuikov; +Cc: Greg KH, linux-usb, linux-scsi, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

On Thu, Oct 21, 2010 at 03:52:12PM -0700, Luben Tuikov wrote:
> The statement of the comment removed by this
> patch, "A number of devices have problems with
> MODE SENSE for page x08, so we will skip it" is
> certainly too general to apply for *all*
> devices. This patch removes the unconditional
> retrieval constraint of the Caching mode page.

If you remove this, there are several devices which will stop working.
They will simply go out-to-lunch when the sd_mod driver sends a request for
Mode Page 8.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

I want my GPFs!!!
					-- Stef
User Friendly, 11/9/1998

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [USB] Allow retrieval of the Caching mode page
  2010-10-22  0:04 ` Matthew Dharm
@ 2010-10-22  4:06   ` Luben Tuikov
  0 siblings, 0 replies; 3+ messages in thread
From: Luben Tuikov @ 2010-10-22  4:06 UTC (permalink / raw)
  To: Matthew Dharm; +Cc: Greg KH, linux-usb, linux-scsi, linux-kernel

--- On Thu, 10/21/10, Matthew Dharm <mdharm-kernel@one-eyed-alien.net> wrote:
> If you remove this, there are several devices which will
> stop working.
> They will simply go out-to-lunch when the sd_mod driver
> sends a request for
> Mode Page 8.

That's true. But it seems unfair to punish good devices which do support
the Caching mode page.

sd_revalidate_disk() calls in succession sd_read_write_protect_flag(),
sd_read_cache_type() and sd_read_app_tag_own().  The first, asks for all
pages by setting the page code to 0x3F. Surely if the device server
supports the Caching mode page, it will be returned. The second call, asks
only for the Caching mode page, and here is where some (few?) broken
devices fail.

If the skip_ms_page_8 is set, why not request all pages, and see if the
Caching mode page is part of the parameter data.

Anyone willing to code that up in sd_read_cache_type()?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-22  4:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-21 22:52 [PATCH] [USB] Allow retrieval of the Caching mode page Luben Tuikov
2010-10-22  0:04 ` Matthew Dharm
2010-10-22  4:06   ` Luben Tuikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox