[PATCH] remove PCI bus initialization from the network drivers
Joel Sherrill <joel@OARcorp.com>
joel.sherrill at OARcorp.com
Mon Aug 22 13:31:29 UTC 2005
Karel Gardas wrote:
>
> Hello,
>
> as pointed out but Joel and others, lets remove all the PCI bus
> initialization from all network drivers at once and then see what
> happen. :-)
>
> Attached patch tested only by compilation on pc386 BSP, also if_fxp
> tested and found working quite well.
That should be enough to make sure it compiles everywhere for this
sort of change.
It is now applied.
Thanks.
--joel
> Cheers,
> Karel
> --
> Karel Gardas kgardas at objectsecurity.com
> ObjectSecurity Ltd. http://www.objectsecurity.com
>
>
> ------------------------------------------------------------------------
>
> Index: c/src/ChangeLog
> ===================================================================
> RCS file: /usr1/CVS/rtems/c/src/ChangeLog,v
> retrieving revision 1.259
> diff -u -r1.259 ChangeLog
> --- c/src/ChangeLog 15 Aug 2005 13:54:15 -0000 1.259
> +++ c/src/ChangeLog 19 Aug 2005 19:35:08 -0000
> @@ -1,3 +1,8 @@
> +2005-08-18 Karel Gardas <kgardas at objectsecurity.com>
> +
> + * libchip/network/if_fxp.c, libchip/network/if_dc.c,
> + libchip/network/dec21140.c: Remove initialization of PCI bus.
> +
> 2005-08-15 Ralf Corsepius <ralf.corsepius at rtems.org>
>
> * optman/Makefile.am: Add preinstall.am.
> Index: c/src/libchip/network/dec21140.c
> ===================================================================
> RCS file: /usr1/CVS/rtems/c/src/libchip/network/dec21140.c,v
> retrieving revision 1.30
> diff -u -r1.30 dec21140.c
> --- c/src/libchip/network/dec21140.c 6 May 2005 20:06:17 -0000 1.30
> +++ c/src/libchip/network/dec21140.c 19 Aug 2005 19:35:27 -0000
> @@ -1027,9 +1027,6 @@
> return 0;
> }
>
> - if (pci_initialize() != PCIB_ERR_SUCCESS)
> - rtems_panic("dec2114x: Unable to initialize PCI");
> -
> /*
> * Find the board
> */
> Index: c/src/libchip/network/if_dc.c
> ===================================================================
> RCS file: /usr1/CVS/rtems/c/src/libchip/network/if_dc.c,v
> retrieving revision 1.2
> diff -u -r1.2 if_dc.c
> --- c/src/libchip/network/if_dc.c 17 Jun 2005 14:32:23 -0000 1.2
> +++ c/src/libchip/network/if_dc.c 19 Aug 2005 19:35:35 -0000
> @@ -1918,10 +1918,6 @@
> /*
> * First, find a DEC board
> */
> - if (pci_initialize() == PCIB_ERR_NOTPRESENT) {
> - rtems_panic("PCI BIOS not found !!");
> - }
> -
> sc = &dc_softc_devs[unitNumber - 1];
> ifp = &sc->arpcom.ac_if;
>
> Index: c/src/libchip/network/if_fxp.c
> ===================================================================
> RCS file: /usr1/CVS/rtems/c/src/libchip/network/if_fxp.c,v
> retrieving revision 1.16
> diff -u -r1.16 if_fxp.c
> --- c/src/libchip/network/if_fxp.c 18 Jul 2005 15:42:24 -0000 1.16
> +++ c/src/libchip/network/if_fxp.c 19 Aug 2005 19:35:40 -0000
> @@ -447,16 +447,6 @@
> s = splimp();
>
> /*
> - * init PCI Bios interface...
> - */
> - i = pci_initialize();
> - DBGLVL_PRINTK(2,"fxp_attach: pcib_init returned %d\n",i);
> - if (i != PCIB_ERR_SUCCESS) {
> - device_printf(dev, "could not initialize pci bios interface\n");
> - return 0;
> - }
> -
> - /*
> * find device on pci bus
> */
> { int j; int pbus, pdev, pfun;
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list