Skip to contentSkip to conversation

sd driver

DISCUSSION Aldo Gavioli 3 participants 5 messages May 23, 2005 – May 24, 2005 SCSI

lore
Share & tools
lore
#0 lore raw

Hello All,

Hello All,
I'm trying to attach one proprietary SCSI driver for optical disk on kernel 2.6.
I noted that if sd attach the same device before, my driver will never be called in the probe function. How can I by-pass this situation ? If anyone can help me I appreciate very much.

Aldo

Signature · 4 lines
Aldo Gavioli
Product Manager
NetStorage Software s.r.l
Viale Europa,74 - 20090 Cusago (Milan) Italy - Web: www.netstorage.it 
#1 lore raw
Quoted 6 lines · Aldo Gavioli

Hello All,

Hello All,
I'm trying to attach one proprietary SCSI driver for optical disk on kernel 2.6.
I noted that if sd attach the same device before, my driver will never be called in the probe function. How can I by-pass this situation ? If anyone can help me I appreciate very much.

Aldo,
Upper Level Drivers (ULDs of which sd is one) discriminate on the basis of the peripheral device type returned by an INQUIRY. Currently sd_probe() takes control of TYPE_DISK (pdt=0x0) and TYPE_MOD (pdt=0x7 "Optical memory device") and will soon take control of TYPE_RBC.

If the class of devices you are interested in is TYPE_MOD then (at least for testing) just comment out that bit of code in sd_probe().

The st and osst (tape ULDs) co-operate to do a finer grain division of labour (see their respective *_probe() functions). These ULDs show you one way of solving the problem. Another way would be a kernel/module option to sd (and possibly other ULDs) telling it to leave device <h,c,t,l> (or better some world wide unique identifier) alone.

As for Arjan's comment about extending sd to cope with your class of devices, recent experience with RBC devices indicates that such a move may not add to the coherency of the sd driver.

Doug Gilbert

#2 lore raw

Gilbert,
thanks for your answer.
I'm thinking regarding your ideas which could be the best. In any case I think that this behaviour is a malfunction of kernel 2.6. We cannot denied to load different drivers than sd for type MOD. This behaviour will generate other troubles in developper community. Aldo

Quoted 42 lines
Quoted 6 lines · Aldo Gavioli

Hello All,

Hello All,
I'm trying to attach one proprietary SCSI driver for optical disk on kernel 2.6.
I noted that if sd attach the same device before, my driver will never be called in the probe function. How can I by-pass this situation ? If anyone can help me I appreciate very much.

Aldo,
Upper Level Drivers (ULDs of which sd is one) discriminate on the basis of the peripheral device type returned by an INQUIRY. Currently sd_probe() takes control of TYPE_DISK (pdt=0x0) and TYPE_MOD (pdt=0x7 "Optical memory device") and will soon take control of TYPE_RBC.

If the class of devices you are interested in is TYPE_MOD then (at least for testing) just comment out that bit of code in sd_probe().

The st and osst (tape ULDs) co-operate to do a finer grain division of labour (see their respective *_probe() functions). These ULDs show you one way of solving the problem. Another way would be a kernel/module option to sd (and possibly other ULDs) telling it to leave device <h,c,t,l> (or better some world wide unique identifier) alone.

As for Arjan's comment about extending sd to cope with your class of devices, recent experience with RBC devices indicates that such a move may not add to the coherency of the sd driver.

Doug Gilbert

Signature · 4 lines
Aldo Gavioli
Product Manager
NetStorage Software s.r.l
Viale Europa,74 - 20090 Cusago (Milan) Italy - Web: www.netstorage.it 
#3 lore raw
Quoted 2 lines

We cannot denied to load different drivers than sd for type MOD.

why not?

Quoted 1 line

This behaviour will generate other troubles in developper community.

which community?

again I asked you a question which you didn't bother to answer yet:
Did you write your closed module with linux in mind or even specifically for linux? Because if so it *really* is better for everyone if you could show code on how to deal with your device instead, so that generic linux will work with it. (and it also avoids a big mess wrt GPL issues)

#4 lore raw

Arjan,

Quoted 7 lines
Quoted 3 lines

We cannot denied to load different drivers than sd for type MOD.

why not?

because it seems that if sd driver attach the device as first one, other Upper Level Drivers will not be called anymore from mid layer scsi. And they will result not attached. Is this my fault or this is the real behaviour of kernel 2.6 ?

Quoted 7 lines
Quoted 3 lines

This behaviour will generate other troubles in developper community.

which community?

Anyone is developping SCSI driver to pilot type MOD.

Quoted 7 lines

again I asked you a question which you didn't bother to answer yet:
Did you write your closed module with linux in mind or even specifically for linux? Because if so it *really* is better for everyone if you could show code on how to deal with your device instead, so that generic linux will work with it. (and it also avoids a big mess wrt GPL issues)

Sorry for this. Here is my answer.
We are developping driver to be inserted in a software suite that will pilot optical drive with Write Once disk. We have no problem to publish our driver source code.
In any case we think that could be not interesting inserting in sd driver our private code and in case it will take very long time. We are thinking about the best solution for this issue.

Thanks
Aldo

Quoted 4 lines
Signature · 4 lines
Aldo Gavioli
Product Manager
NetStorage Software s.r.l
Viale Europa,74 - 20090 Cusago (Milan) Italy - Web: www.netstorage.it