Re: PCI driver

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

 



Manu Abraham napsal(a):

Jiri Slaby wrote:

Manu Abraham napsal(a):

Now that i have been trying to implement the driver using the new PCI API, i feel a bit lost at the different changes gone into the PCI API. So if someone could give me a brief idea how a minimal PCI probe routine should consist of, that would be quite helpful.



Maybe, you want to read http://lwn.net/Kernel/LDD3/, chapter 12, pages 311+.


I have been updating myself from LDD2 to LDD3. What i was wondering was in what order should i be calling the functions.

You won't call anything, kernel does. You only register driver.
struct pcitbl {venids, devids}

struct driver ... = {probe=a, remove=b, tbl=pcitbl};
a() { if device from pcitbl is in the system (or has been added before some little time) this function is called} b() {if the device was removed from system: modules and hotplug: never called; modules: so if modules unload; if both: if the device was removed on the fly, or module unload}

module_init() { register_driver(driver)}
module_exit() { unregister_driver(driver); }

--
Jiri Slaby         www.fi.muni.cz/~xslaby
~\-/~      [email protected]      ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux