public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Forcing use of sd driver on Suse 10.3 (2.6.22)
@ 2008-01-14 11:01 Bill Adair
  2008-01-14 18:31 ` Stefan Richter
  0 siblings, 1 reply; 4+ messages in thread
From: Bill Adair @ 2008-01-14 11:01 UTC (permalink / raw)
  To: linux-scsi

I have a device reported as below. It is a PCMCIA card reader with
SCSI-2 connections. I know the device can work as a direct access device
when flash memory is present as I have connected it to an Akai sampler
which can read the card. I am assuming here the sampler's SCSI stack is
not very complex and is just ignoring the device type.

[2:0:6:0]    process MPL      MC-DISK-E[0]     3.9a  -         /dev/sg2
[2:0:6:1]    process MPL      MC-DISK-E[0]     3.9a  -         /dev/sg3
[2:0:6:2]    process MPL      MC-DISK-E[0]     3.9a  -         /dev/sg4
[2:0:6:3]    process MPL      MC-DISK-E[1]     3.9a  -         /dev/sg5
[2:0:6:4]    process MPL      MC-DISK-E[1]     3.9a  -         /dev/sg6
[2:0:6:5]    process MPL      MC-DISK-E[1]     3.9a  -         /dev/sg7
[2:0:6:6]    process MPL      MC-DISK-E[0]     3.9a  -         /dev/sg8
[2:0:6:7]    process MPL      MC-DISK-E[0]     3.9a  -         /dev/sg9

Is there any way under Linux of forcing use of the sd driver for a
device on the bus instead of sg?

TIA 
Bill


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

* Re: Forcing use of sd driver on Suse 10.3 (2.6.22)
  2008-01-14 11:01 Forcing use of sd driver on Suse 10.3 (2.6.22) Bill Adair
@ 2008-01-14 18:31 ` Stefan Richter
  2008-01-17 10:53   ` Bill Adair
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Richter @ 2008-01-14 18:31 UTC (permalink / raw)
  To: Bill Adair; +Cc: linux-scsi

Bill Adair wrote:
> Is there any way under Linux of forcing use of the sd driver for a
> device on the bus instead of sg?

The INQUIRY data which the SCSI core gets from the device have to
indicate that the device implements SBC or RBC (is of peripheral device
type 00h or 0Eh).
-- 
Stefan Richter
-=====-==--- ---= -===-
http://arcgraph.de/sr/

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

* Re: Forcing use of sd driver on Suse 10.3 (2.6.22)
  2008-01-14 18:31 ` Stefan Richter
@ 2008-01-17 10:53   ` Bill Adair
  2008-01-17 15:40     ` James Bottomley
  0 siblings, 1 reply; 4+ messages in thread
From: Bill Adair @ 2008-01-17 10:53 UTC (permalink / raw)
  To: linux-scsi


On Mon, 2008-01-14 at 19:31 +0100, Stefan Richter wrote:
> Bill Adair wrote:
> > Is there any way under Linux of forcing use of the sd driver for a
> > device on the bus instead of sg?
> 
> The INQUIRY data which the SCSI core gets from the device have to
> indicate that the device implements SBC or RBC (is of peripheral device
> type 00h or 0Eh).
I have altered the sd.c file by patching sd_probe to check for the
particular unit I have and accepting pdt 03h (Processor) as a valid
return and the unit works fine. 

I suspect the sd file is considered very important though (and I don't
know how many of these card readers exist) so I assume a patch is not
required ;-). Would there be another approach to creating a "driver" for
my Spyrus RD300 in it's guise as a card reader?

Bill


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

* Re: Forcing use of sd driver on Suse 10.3 (2.6.22)
  2008-01-17 10:53   ` Bill Adair
@ 2008-01-17 15:40     ` James Bottomley
  0 siblings, 0 replies; 4+ messages in thread
From: James Bottomley @ 2008-01-17 15:40 UTC (permalink / raw)
  To: Bill Adair; +Cc: linux-scsi


On Thu, 2008-01-17 at 10:53 +0000, Bill Adair wrote:
> On Mon, 2008-01-14 at 19:31 +0100, Stefan Richter wrote:
> > Bill Adair wrote:
> > > Is there any way under Linux of forcing use of the sd driver for a
> > > device on the bus instead of sg?
> > 
> > The INQUIRY data which the SCSI core gets from the device have to
> > indicate that the device implements SBC or RBC (is of peripheral device
> > type 00h or 0Eh).
> I have altered the sd.c file by patching sd_probe to check for the
> particular unit I have and accepting pdt 03h (Processor) as a valid
> return and the unit works fine. 

That's a bit of a nasty.  We can't blindly attach sd to a processor
otherwise it will pick up all sorts of stuff its not supposed to bind to
(like scanners, enclosure devices and other initiators).

I suppose a firmware upgrade for the device to make it actually comply
vaguely with the spec is out of the question?

If not, there's a trick we do in scsi_scan.c for Toshiba CDROMS that
fail to set their type correctly (it's the code under BLIST_ISROM), we
could do the same for this device.  What are its inquiry strings?  And
does anyone have any clue whether it should be RBC or DISK type?

> I suspect the sd file is considered very important though (and I don't
> know how many of these card readers exist) so I assume a patch is not
> required ;-). Would there be another approach to creating a "driver" for
> my Spyrus RD300 in it's guise as a card reader?

James



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

end of thread, other threads:[~2008-01-17 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-14 11:01 Forcing use of sd driver on Suse 10.3 (2.6.22) Bill Adair
2008-01-14 18:31 ` Stefan Richter
2008-01-17 10:53   ` Bill Adair
2008-01-17 15:40     ` James Bottomley

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