From fa55951ed537b4c4f68482e66fc7123eab0cf3fc Mon Sep 17 00:00:00 2001 From: nate Date: Sun, 26 Oct 1997 21:08:42 +0000 Subject: - Instead of relying on a functional call to register PCARD-capable drivers, use a Linker Set. Note, if a driver is loaded as an LKM if will have to use the function call, but since none of the existing drivers are loadable, this made things cleaner and boot messages nicer. Obtained from: PAO-970616 --- sys/i386/isa/aic6360.c | 11 +++-------- sys/i386/isa/if_ed.c | 12 +++--------- sys/i386/isa/if_ep.c | 9 ++++----- sys/i386/isa/if_fe.c | 18 +++--------------- sys/i386/isa/sio.c | 11 +++-------- 5 files changed, 16 insertions(+), 45 deletions(-) (limited to 'sys/i386/isa') diff --git a/sys/i386/isa/aic6360.c b/sys/i386/isa/aic6360.c index 93da5a6..fb2dd6c 100644 --- a/sys/i386/isa/aic6360.c +++ b/sys/i386/isa/aic6360.c @@ -31,7 +31,7 @@ */ /* - * $Id: aic6360.c,v 1.32 1997/10/21 17:57:31 nate Exp $ + * $Id: aic6360.c,v 1.34 1997/10/26 04:53:49 nate Exp $ * * Acknowledgements: Many of the algorithms used in this driver are * inspired by the work of Julian Elischer (julian@tfs.com) and @@ -718,6 +718,8 @@ static struct pccard_device aic_info = { &bio_imask /* Interrupt mask for device */ }; +DATA_SET(pccarddrv_set, aic_info); + /* * Initialize the device - called from Slot manager. */ @@ -796,7 +798,6 @@ aicprobe(dev) #if NCARD > 0 int unit = dev->id_unit; int aic_reg_drv[NAIC]; - static int aic_already_init; #else int unit = aicunit; #endif @@ -810,12 +811,6 @@ aicprobe(dev) #if NCARD > 0 if (!aic_reg_drv[unit]) aic_reg_drv[unit] = 1; - - /* If PC-Card probe required, then register with slot manager. */ - if (!aic_already_init) { - pccard_add_driver(&aic_info); - aic_already_init = 1; - } #endif /* diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c index 83e16bc..72871d8 100644 --- a/sys/i386/isa/if_ed.c +++ b/sys/i386/isa/if_ed.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ed.c,v 1.122 1997/10/03 16:26:15 davidg Exp $ + * $Id: if_ed.c,v 1.124 1997/10/26 04:53:51 nate Exp $ */ /* @@ -205,6 +205,8 @@ static struct pccard_device ed_info = { /* XXX - Should this also include net_imask? */ }; +DATA_SET(pccarddrv_set, ed_info); + /* * Initialize the device - called from Slot manager. */ @@ -340,14 +342,6 @@ ed_probe(isa_dev) { int nports; -#if NCARD > 0 - /* - * If PC-Card probe required, then register driver with - * slot manager. - */ - pccard_add_driver(&ed_info); -#endif - nports = ed_probe_WD80x3(isa_dev); if (nports) return (nports); diff --git a/sys/i386/isa/if_ep.c b/sys/i386/isa/if_ep.c index d840c53..e5db617 100644 --- a/sys/i386/isa/if_ep.c +++ b/sys/i386/isa/if_ep.c @@ -38,7 +38,7 @@ */ /* - * $Id: if_ep.c,v 1.61 1997/10/14 06:56:08 itojun Exp $ + * $Id: if_ep.c,v 1.63 1997/10/26 04:53:53 nate Exp $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select @@ -63,6 +63,7 @@ #include #if defined(__FreeBSD__) +#include #include #include #endif @@ -167,6 +168,8 @@ static struct pccard_device ep_info = { &net_imask }; +DATA_SET(pccarddrv_set, ep_info); + /* * Initialize the device - called from Slot manager. */ @@ -473,10 +476,6 @@ ep_isa_probe(is) struct ep_board *epb; u_short k; -#if NCARD > 0 - pccard_add_driver(&ep_info); -#endif - if ((epb = ep_look_for_board_at(is)) == 0) return (0); diff --git a/sys/i386/isa/if_fe.c b/sys/i386/isa/if_fe.c index 41d10ed..a41e4bc 100644 --- a/sys/i386/isa/if_fe.c +++ b/sys/i386/isa/if_fe.c @@ -21,7 +21,7 @@ */ /* - * $Id: if_fe.c,v 1.29 1997/07/20 14:09:59 bde Exp $ + * $Id: if_fe.c,v 1.31 1997/10/26 04:53:54 nate Exp $ * * Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards. * To be used with FreeBSD 2.x @@ -336,6 +336,8 @@ static struct pccard_device fe_info = { /* XXX - Should this also include net_imask? */ }; +DATA_SET(pccarddrv_set, fe_info); + /* * Initialize the device - called from Slot manager. */ @@ -451,9 +453,6 @@ static struct fe_probe_list const fe_probe_list [] = static int fe_probe ( DEVICE * dev ) { -#if NCARD > 0 - static int fe_already_init; -#endif struct fe_softc * sc; int u; int nports; @@ -465,17 +464,6 @@ fe_probe ( DEVICE * dev ) sc = &fe_softc[ dev->id_unit ]; sc->sc_unit = dev->id_unit; -#if NCARD > 0 - /* - * If PC-Card probe required, then register driver with - * slot manager. - */ - if (fe_already_init != 1) { - pccard_add_driver(&fe_info); - fe_already_init = 1; - } -#endif - /* Probe each possibility, one at a time. */ for ( list = fe_probe_list; list->probe != NULL; list++ ) { diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c index 93d147d..db9afb2 100644 --- a/sys/i386/isa/sio.c +++ b/sys/i386/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.184 1997/10/12 20:23:30 phk Exp $ + * $Id: sio.c,v 1.186 1997/10/26 04:53:56 nate Exp $ */ #include "opt_comconsole.h" @@ -488,6 +488,8 @@ static struct pccard_device sio_info = { /* XXX - Should this also include net_imask? */ }; +DATA_SET(pccarddrv_set, sio_info); + /* * Initialize the device - called from Slot manager. */ @@ -587,13 +589,6 @@ sioprobe(dev) for (xdev = isa_devtab_tty; xdev->id_driver != NULL; xdev++) if (xdev->id_driver == &siodriver && xdev->id_enabled) outb(xdev->id_iobase + com_mcr, 0); -#if NCARD > 0 - /* - * If PC-Card probe required, then register driver with - * slot manager. - */ - pccard_add_driver(&sio_info); -#endif already_init = TRUE; } -- cgit v1.1