Re: how does kernel detects presence of a particular device

2010-11-02 Thread Tapas Mishra
2010/11/3 अनुज : > > Simply, whenever either a device or driver is registered with the bus, > then probe function of matching driver is called by the bus subsystem. > > Refer : http://lxr.linux.no/#linux+v2.6.36/Documentation/PCI/pci.txt > >       probe               This probing function gets call

Re: is this link valid

2010-11-02 Thread Tapas Mishra
On Wed, Nov 3, 2010 at 8:19 AM, Mulyadi Santosa wrote: > On Tue, Nov 2, 2010 at 18:09, Tapas Mishra wrote: >> Hi, >> wanted to know if the information given on this link is still valid. >> http://linuxgazette.net/93/bhaskaran.html > > Have you give it try first and see how it comes up? How can I

Re: how does kernel detects presence of a particular device

2010-11-02 Thread Tapas Mishra
On Wed, Nov 3, 2010 at 10:28 AM, Mulyadi Santosa wrote: > > IIRC, it is the bus (or should we say, the motherboard...or chipset) > that send somekind of signal (of announcement). Ok this is what I am looking for. What signal is send by whom and where >Driver picks it up How? > since the probe func

Re: how does kernel detects presence of a particular device

2010-11-02 Thread Gavin Guo
> As far as I understand once the probe function(Not too sure) detects > or kernel detects then the driver would be looked up > and control would be handed over to driver. > If this is correct then how does probe works? Or how a particular > device's presence on PCI bus is detected. That How does

Re: how does kernel detects presence of a particular device

2010-11-02 Thread अनुज
On Wed, Nov 3, 2010 at 8:16 AM, Tapas Mishra wrote: > As far as I understand once the probe function(Not too sure) detects > or kernel detects then the driver would be looked up > and control would be handed over to driver. > If this is correct then how does probe works? Simply, whenever either a

Re: looking for corrections/enhancements/omissions for LKD3

2010-11-02 Thread Himanshu Aggarwal
On Mon, Nov 1, 2010 at 4:32 PM, Greg KH wrote: > On Mon, Nov 01, 2010 at 11:52:25AM +0700, Mulyadi Santosa wrote: >> Hi Greg... >> >> On Mon, Nov 1, 2010 at 10:21, Greg KH wrote: >> > On Sun, Oct 31, 2010 at 08:18:52AM -0400, Robert P. J. Day wrote: >> >> > Also, I saw XIP in ext2 filesystem. Qui

Re: how does kernel detects presence of a particular device

2010-11-02 Thread Mulyadi Santosa
On Wed, Nov 3, 2010 at 09:46, Tapas Mishra wrote: > As far as I understand once the probe function(Not too sure) detects > or kernel detects then the driver would be looked up > and control would be handed over to driver. IIRC, it is the bus (or should we say, the motherboard...or chipset) that

how does kernel detects presence of a particular device

2010-11-02 Thread Tapas Mishra
As far as I understand once the probe function(Not too sure) detects or kernel detects then the driver would be looked up and control would be handed over to driver. If this is correct then how does probe works? Or how a particular device's presence on PCI bus is detected. -- -- To unsubscribe f

Re: is this link valid

2010-11-02 Thread Mulyadi Santosa
On Tue, Nov 2, 2010 at 18:09, Tapas Mishra wrote: > Hi, > wanted to know if the information given on this link is still valid. > http://linuxgazette.net/93/bhaskaran.html Have you give it try first and see how it comes up? From there, we could see the difference and then somebody here could give

Re: how to define id table

2010-11-02 Thread John Mahoney
On Tue, Nov 2, 2010 at 3:53 AM, Bond wrote: > > Hi, > can any one tell me how is following type of structure defined? > > static DEFINE_PCI_DEVICE_TABLE(rtl8139_pci_tbl) = { >        {0x10ec, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, >        {0x10ec, 0x8138, PCI_ANY_ID, PCI_ANY_ID, 0, 0, R

Re: Why to not mark struct pci_driver

2010-11-02 Thread Greg KH
On Tue, Nov 02, 2010 at 05:50:33PM +0530, Bond wrote: > http://lxr.linux.no/#linux+v2.6.36/Documentation/PCI/pci.txt#L197 > What is meant by marking strcut pci_driver as the above link says not > to mark it. Don't mark it as __init or __exit or with any other attribute. See the text above the bul

Why to not mark struct pci_driver

2010-11-02 Thread Bond
http://lxr.linux.no/#linux+v2.6.36/Documentation/PCI/pci.txt#L197 What is meant by marking strcut pci_driver as the above link says not to mark it. -- http://vger.kernel.org/vger-lists.html -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecar...@nl.linux.org P

is this link valid

2010-11-02 Thread Tapas Mishra
Hi, wanted to know if the information given on this link is still valid. http://linuxgazette.net/93/bhaskaran.html Since I am new to programming network devices on Linux so not clear with it, I have looked at Chapter 17 of LLD 3rd edition. -- -- To unsubscribe from this list: send an email with "u

Re: Char Driver

2010-11-02 Thread Dave Hylands
Hi Victor, ...snip... > but the new way is with alloc_chrdev_region and > > struct cdev *my_cdev = cdev_alloc( ); > my_cdev->ops = &my_fops; > > but i can not see any good and easy example on the internet I have a character driver which reflects the gpiolib API into kernel space over here: http:/

Re: Char Driver

2010-11-02 Thread Daniel Baluta
On Tue, Nov 2, 2010 at 3:10 AM, Victor Rodriguez wrote: > Hi all > > I have a doubt I have checked the Char Driver from Linux Device > Drivers 3rd edition and I can not understand how does the char driver > is register in the newst way, I just have done by the Linux Kernel > Module programing guid

Re: how to define id table

2010-11-02 Thread Daniel Baluta
On Tue, Nov 2, 2010 at 9:53 AM, Bond wrote: > Hi, > can any one tell me how is following type of structure defined? > > static DEFINE_PCI_DEVICE_TABLE(rtl8139_pci_tbl) = { >        {0x10ec, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, >        {0x10ec, 0x8138, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL

how to define id table

2010-11-02 Thread Bond
Hi, can any one tell me how is following type of structure defined? static DEFINE_PCI_DEVICE_TABLE(rtl8139_pci_tbl) = { {0x10ec, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, {0x10ec, 0x8138, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, {0x1113, 0x1211, PCI_ANY_ID, PCI_ANY_I

Re: Char Driver

2010-11-02 Thread Bond
http://kerneltrap.org/mailarchive/linux-kernel-newbies/2010/9/25/6838336 on the above link there was some fight but that link is an excellent resource for you. Venkataram Tummula has debugged that driver and it will help you a lot. Read the technical thing and check this page also http://www.freeso