* need help with pci_module_init
@ 2002-08-17 1:52 harish.vasudeva
2002-08-17 3:17 ` Jeff Garzik
2002-08-17 3:24 ` Kai Germaschewski
0 siblings, 2 replies; 3+ messages in thread
From: harish.vasudeva @ 2002-08-17 1:52 UTC (permalink / raw)
To: linux-kernel
hi folks
pci_module_init() works fine only the first time i load my driver. subsequent loads will fail with this call returning -19!! any clues?
thanx
HARISH V
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: need help with pci_module_init
2002-08-17 1:52 need help with pci_module_init harish.vasudeva
@ 2002-08-17 3:17 ` Jeff Garzik
2002-08-17 3:24 ` Kai Germaschewski
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2002-08-17 3:17 UTC (permalink / raw)
To: harish.vasudeva; +Cc: linux-kernel
harish.vasudeva@amd.com wrote:> hi folks
>
> pci_module_init() works fine only the first time i load my driver.
> subsequent loads will fail with this call returning -19!! any clues?
It works in the various PCI drivers in drivers/net/* ... I debug
modules all the time by repeatedly loading and unloading them.
Make sure to check that you are using SET_MODULE_OWNER immediately
following your alloc_etherdev() call. It sounds like you might have
messed-up module counts. Also "cat /proc/modules" to check the module
reference count correctness.
Jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: need help with pci_module_init
2002-08-17 1:52 need help with pci_module_init harish.vasudeva
2002-08-17 3:17 ` Jeff Garzik
@ 2002-08-17 3:24 ` Kai Germaschewski
1 sibling, 0 replies; 3+ messages in thread
From: Kai Germaschewski @ 2002-08-17 3:24 UTC (permalink / raw)
To: harish.vasudeva; +Cc: linux-kernel
On Fri, 16 Aug 2002 harish.vasudeva@amd.com wrote:
> pci_module_init() works fine only the first time i load my driver.
> subsequent loads will fail with this call returning -19!! any clues?
-19 is -ENODEV, i.e. pci_module_init() doesn't find any devices that match
your driver. That's most likely since they're still considered owned by
the previously loaded driver (your module as well), which forgot to
pci_unregister_driver() at unload time.
--Kai
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-08-17 3:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-17 1:52 need help with pci_module_init harish.vasudeva
2002-08-17 3:17 ` Jeff Garzik
2002-08-17 3:24 ` Kai Germaschewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®