[PATCH] if_fxp: do not initialize PCI bus itself

Karel Gardas kgardas at objectsecurity.com
Fri Aug 19 13:45:50 UTC 2005


> Karel Gardas wrote:
> >
> > Hello,
> >
> > if_fxp NIC driver worked well on pc386 BSP, since it initializes
> PCI bus
> > itself. Experts here pointed out that this is wrong way early
> this year
> > and I've finally removed this initialization from the driver and
> tested
> > that it still works with the pc386 BSP with previous PCI bus init
> patch
> > applied. Hopefuly this is also right for other supported platforms.
>
> This steps into more of a grey area to me.  It looks like
> pci_initialize() is called from bspstart.c for every BSP that calls
> it.  So that assumption is safe.
>
> However, it also looks like other drivers in libchip/network
> call pci_initialize().  So if it is correct to remove
> the call to pci_initialize() from the if_fxp driver, it must
> also be correct to do from the other drivers.
>
> I need to either not apply the patch or remove the call
> to pci_initialize from the other drivers.  If we do the latter,
> we are assuming that the BSP will take care of that for
> device drivers.
>
> Comments?

IMHO removing the pci_initialize from the drivers should be OK. Consider 
those drivers were mostly tested on pc386 BSP (or I have this impression 
from teading some comments in their code) which did not initialize PCI bus 
currectly these days.

I can happily provide you with appropriate patch for  the other drivers, 
the only issue is that I don't have the hardware myself, so it will be not 
tested at all (except compilation).

Cheers,
Karel
--
Karel Gardas                  kgardas at objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com



More information about the users mailing list