public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sd_read_cache_type
@ 2003-01-10 13:08 Andries.Brouwer
  2003-01-10 15:14 ` sd_read_cache_type James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: Andries.Brouwer @ 2003-01-10 13:08 UTC (permalink / raw)
  To: linux-kernel, linux-scsi, linux-usb-devel

Last year I wrote half a dozen drivers for various USB card readers.
Some don't work anymore with 2.5.recent.
I just investigated one. The reason it stopped working is the
  sd_read_cache_type()
call added in 2.5.41. (With that call removed it works again.)

Will look a bit more at the details later.
For now a question: this call does a MODE_SENSE with the DBD
(disable block descriptors) bit set. Is there a reason for that?
Wouldn't the same code work in the same way without that bit?

And the reason I ask is that we already have sd_do_mode_sense6(),
so part of sd_read_cache_type() can be simply replaced by a call
of sd_do_mode_sense6(), but the latter needs an extra parameter
if DBD is really needed.

And a second question: sd_read_cache_type() is called also
when no medium is present. Objections against only calling
when media are present?

Andries

^ permalink raw reply	[flat|nested] 3+ messages in thread
* RE: sd_read_cache_type
@ 2003-01-10 17:35 Cress, Andrew R
  0 siblings, 0 replies; 3+ messages in thread
From: Cress, Andrew R @ 2003-01-10 17:35 UTC (permalink / raw)
  To: 'James Bottomley', Andries.Brouwer
  Cc: linux-kernel, linux-scsi, linux-usb-devel


RE: cache
Yes, at least a synchronize, but can we always know (in time) if the medium
has been removed?  We may not always get an eject request, right?
I think write-back cache is inherently unsafe in general, but I guess we
have to allow unsafe things like that for non-production use.

Andy

-----Original Message-----
From: James Bottomley 
Sent: Friday, January 10, 2003 10:14 AM
[...]

Well, the cache is pretty often part of the permanent assembly, not part of 
the removable medium, so I think it should still be called for removable 
media. That begs the question, of course, what should the cache type be---it

strikes me as rather unsafe to have a removable RW medium with a write back 
cache?  I suppose at the very least we should to a SYNCHRONIZE on ejection
if 
it's write back?

James
[...]

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

end of thread, other threads:[~2003-01-10 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-10 13:08 sd_read_cache_type Andries.Brouwer
2003-01-10 15:14 ` sd_read_cache_type James Bottomley
  -- strict thread matches above, loose matches on Subject: below --
2003-01-10 17:35 sd_read_cache_type Cress, Andrew R

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