All of lore.kernel.org
 help / color / mirror / Atom feed
* PCI modules problem
@ 2005-05-19  6:24 Mark D. Studebaker 
  2005-05-19  6:24 ` Greg KH
  2005-05-19  6:24 ` Mark D. Studebaker 
  0 siblings, 2 replies; 3+ messages in thread
From: Mark D. Studebaker  @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

I figured out why i2c-voodoo3 and i2c-viapro weren't loading for me on some machines.

The kernel PCI module init code
(pci_module_init() in pci.h, then pci_register_driver() and pci_dev_driver() in pci.c)
allows only one driver registration per PCI device. If another driver gets in there
first we won't load.

This is a big problem for drivers on multi-purpose PCI devices. Especially on our
i2c bit-bangers for video chips, where we only use a couple of registers,
and we have to coexist with video drivers.

Do we have any choice but to back out some of the pci_module_init cleanup?
Perhaps we need to go through each PCI driver and assess whether the PCI
device it attaches to is "single-function"?

Is there any easy way around this???
arghhhhhhhhhh...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* PCI modules problem
  2005-05-19  6:24 PCI modules problem Mark D. Studebaker 
@ 2005-05-19  6:24 ` Greg KH
  2005-05-19  6:24 ` Mark D. Studebaker 
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

On Mon, Jun 30, 2003 at 09:23:35PM -0400, Mark D. Studebaker  wrote:
> I figured out why i2c-voodoo3 and i2c-viapro weren't loading for me on some 
> machines.
> 
> The kernel PCI module init code
> (pci_module_init() in pci.h, then pci_register_driver() and 
> pci_dev_driver() in pci.c)
> allows only one driver registration per PCI device. If another driver gets 
> in there first we won't load.
> 
> This is a big problem for drivers on multi-purpose PCI devices. Especially 
> on our i2c bit-bangers for video chips, where we only use a couple of
> registers, and we have to coexist with video drivers.
> 
> Do we have any choice but to back out some of the pci_module_init cleanup?
> Perhaps we need to go through each PCI driver and assess whether the PCI
> device it attaches to is "single-function"?
> 
> Is there any easy way around this???
> arghhhhhhhhhh...

Nope, only one driver per pci device, sorry.  Any reason the video stuff
doesn't go into the pci driver for the video driver itself?  Isn't this
the way the video code in 2.5 works?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* PCI modules problem
  2005-05-19  6:24 PCI modules problem Mark D. Studebaker 
  2005-05-19  6:24 ` Greg KH
@ 2005-05-19  6:24 ` Mark D. Studebaker 
  1 sibling, 0 replies; 3+ messages in thread
From: Mark D. Studebaker  @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

I skimmed through kernel 2.5.73.

Of all the video drivers in the kernel, only matrox uses our i2c stack
and registers an i2c device.

sis rolls its own (sigh - one of about a dozen separate i2c implementations
in the kernel, they're listed in i2c TODO).

The others don't appear to do anything to support i2c.

It would be nice if each video driver included standard i2c functionality.

In X, for example, they have to roll their own, and when
X accesses the DDC monitor eeprom at startup it could of course
conflict with accesses from other drivers.
If i2c support were standard in each video driver maybe they
wouldn't need to do their own.

I fixed 5 of our bit-banger video drivers to not register.
There may be a couple of more drivers where we're likely to conflict
with something else, I'll scan some more datasheets...

Greg KH wrote:
> On Mon, Jun 30, 2003 at 09:23:35PM -0400, Mark D. Studebaker  wrote:
> 
>>I figured out why i2c-voodoo3 and i2c-viapro weren't loading for me on some 
>>machines.
>>
>>The kernel PCI module init code
>>(pci_module_init() in pci.h, then pci_register_driver() and 
>>pci_dev_driver() in pci.c)
>>allows only one driver registration per PCI device. If another driver gets 
>>in there first we won't load.
>>
>>This is a big problem for drivers on multi-purpose PCI devices. Especially 
>>on our i2c bit-bangers for video chips, where we only use a couple of
>>registers, and we have to coexist with video drivers.
>>
>>Do we have any choice but to back out some of the pci_module_init cleanup?
>>Perhaps we need to go through each PCI driver and assess whether the PCI
>>device it attaches to is "single-function"?
>>
>>Is there any easy way around this???
>>arghhhhhhhhhh...
> 
> 
> Nope, only one driver per pci device, sorry.  Any reason the video stuff
> doesn't go into the pci driver for the video driver itself?  Isn't this
> the way the video code in 2.5 works?
> 
> thanks,
> 
> greg k-h
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-19  6:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19  6:24 PCI modules problem Mark D. Studebaker 
2005-05-19  6:24 ` Greg KH
2005-05-19  6:24 ` Mark D. Studebaker 

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.