skeleton driver

skeleton driver

Post by Massimiliano Caovill » Fri, 17 Nov 2000 04:00:00



 Hi to all,
I'm trying to write a driver to support a particular kind of MO disk drive;
they behave halfway between hard drives and cdrom, and are connected
throught a scsi interface, so my first idea was to write the code starting
from the sr driver wich is included in the kernel: the problem is that sr
has a static major number already assigned to it, while I need to get my
numbers dinamically allocated, thus I changed the code as little as I could
to get register_blk_device called with major 0 and be assigned a major as
return value.
 Now, I'm experimenting with a real scsi cdrom wich gets attached by the
original sr0 and by my version, but can get mounted only by the original
version!
(the mount command on my sr0 hangs in loop and can't be stopped without a
kill, after the open is performed on my module)
 I can't figure out where the problem sits, as the only thing I modified is
the policy of major number assignment... the only thing I can think is that
"my" sr is still dependent on it's original major number or that there's
something wrong with the nodes (that are generated by a script when I insmod
the module, so they can have the right major)
 Couldn't you suggest a kind of "skeleton driver" or some other driver that
would be easier to modify, or some other source of info about scsi cdrom
block devices?
 I have a book by Alessandro Rubini on device drivers, but it's useless in
this case.
 Could you please suggest a strategy to trace the mount operation, so I can
figure out when and where it gets stuck?
 Maybe a kernel de*?

        Any help will be REALLY appreciated!

Ciao, Massi

p.s. excuse my wordiness!

 
 
 

skeleton driver

Post by Joachim Rosskop » Sat, 18 Nov 2000 04:00:00




>  Hi to all,
> I'm trying to write a driver to support a particular kind of MO disk
> drive; they behave halfway between hard drives and cdrom, and are
> connected throught a scsi interface, so my first idea was to write the
> code starting from the sr driver wich is included in the kernel: the
> problem is that sr has a static major number already assigned to it,
> while I need to get my numbers dinamically allocated, thus I changed the
> code as little as I could to get register_blk_device called with major 0
> and be assigned a major as return value.
>  Now, I'm experimenting with a real scsi cdrom wich gets attached by the
> original sr0 and by my version, but can get mounted only by the original
> version!
> (the mount command on my sr0 hangs in loop and can't be stopped without
> a
> kill, after the open is performed on my module)
>  I can't figure out where the problem sits, as the only thing I modified
>  is
> the policy of major number assignment... the only thing I can think is
> that
> "my" sr is still dependent on it's original major number or that there's
> something wrong with the nodes (that are generated by a script when I
> insmod the module, so they can have the right major)
>  Couldn't you suggest a kind of "skeleton driver" or some other driver
>  that
> would be easier to modify, or some other source of info about scsi cdrom
> block devices?
>  I have a book by Alessandro Rubini on device drivers, but it's useless
>  in
> this case.
>  Could you please suggest a strategy to trace the mount operation, so I
>  can
> figure out when and where it gets stuck?
>  Maybe a kernel de*?

>         Any help will be REALLY appreciated!

> Ciao, Massi

> p.s. excuse my wordiness!

Hello,

check out the resource of devfs, it will slove your problem in very
sofistiacted way. And you are on the right way for the future.

Here is a little tutorial (Also by Mr. Rubini *g*)

http://www.veryComputer.com/

CU

Joachim

 
 
 

1. pci skeleton driver

Hi,

can someone tell me where I can get a PCI skeleton network driver ?

Thanks in advance !

Kim

--

==============================================================================

                        ************************************
                        *       Hofmans Kim                *    
                        *                                  *


                        *                                  *
                        *       Brouwerijstraat 62         *
                        *       1630 Linkebeek             *
                        *       Belgium                    *
                        *                                  *
                        *       32-2-3771012               *
                        *                                  *
                        ************************************

2. how to split an unsigned buffer char

3. IBM Token Ring skeleton driver available

4. changing roots default shell

5. drivers/net/isa-skeleton.c queue management bug?

6. INN 1.4 on Linux

7. SCSI Host Adapter Driver Skeleton

8. See Summary! M-2 discussion only in comp.lang.modula2 THANKS.

9. LLI Driver Skeleton source code

10. Skeleton for network device drivers

11. Canonical daemon code skeleton?

12. State of usb-skeleton.c ?

13. Who's animating the skeletons among my keys?