Re: How does correct device driver get called?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I could be wrong here, and anyone can feel free to correct me- but IIRC
the driver is determined by the major/minor number of the device in
question. The major is the actual driver, and while my terminology is
wrong the minor is like the 'sub driver', this is possible because of
pci's ability to share IRQ's, and when it is shared, the interrupt hits
all of the drivers, when no driver claims the interrupt as its own- this
is where the notorius 'spurious interrupt' message in syslog comes from.

Or at least thats the way I understand it- anyone feel free to correct me.

--

There are only two choices in life. You either conform the truth to your desire,
or you conform your desire to the truth. Which choice are you making?
On Tue, 16 Nov 2004, Alan Chandler wrote:

> Date: Tue, 16 Nov 2004 07:44:24 +0000
> From: Alan Chandler <alan@xxxxxxxxxxxxxxxxxxxxx>
> To: kernelnewbies@xxxxxxxxxxxx
> Subject: How does correct device driver get called?
>
> Although not new to kernels in general, this is the first time I have started
> to look in depth at linux.
>
> I have a problem (reported to bugzilla.kernel.org as #3741) with cd burning,
> so I am reading to code of both cdrecord and the kernel.  I can see that
> cdrecord is doing an SG_IO ioctl function into the kernel - what I haven't
> been able to do is figure out how that makes its way from the original call
> interface into the appropriate driver, via cdrom modules.
>
> I can pick up snapshots of its progress - for instance the sg_io function in
> drivers/block/scsi_ioctl.c - and then in to blk_execute_rq in ll_rw_blk.c,
> but I am not sure how it gets to this point, or how it progresses from there.
>
> Is there any text out there on the web that gives an overview of how linux
> processes these io requests?
> --
> Alan Chandler
> alan@xxxxxxxxxxxxxxxxxxxxx
> First they ignore you, then they laugh at you,
>  then they fight you, then you win. --Gandhi
>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
>
>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux