Date: Mon, 18 Sep 2000 21:39:20 -0700 (PDT) From: Warner Losh <imp@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/dev/pccard card_if.m pccard.c pccardvar.h src/sys/dev/ep if_ep_pccard.c src/sys/dev/sn if_sn.c if_sn_isa.c if_sn_pccard.c src/sys/pccard pccard_nbk.c Message-ID: <200009190439.VAA18340@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
imp 2000/09/18 21:39:20 PDT Modified files: sys/dev/pccard card_if.m pccard.c pccardvar.h sys/dev/ep if_ep_pccard.c sys/dev/sn if_sn.c if_sn_isa.c if_sn_pccard.c sys/pccard pccard_nbk.c Log: Implement indirection in the pccard probe/attach. This should make it possible to have different probe/attach semantics between the two systems and yet still use the same driver for both. Compatibility methods for OLDCARD drivers. We use these routines to make it possible to call the OLDCARD driver's probe routine in the context that it expects. For OLDCARD these are implemented as pass throughs to the device_{probe,attach} routines. For NEWCARD they are implemented such such that probe becomes strictly a matching routine and attach does both the old probe and old attach. compat devices should use the following: /* Device interface */ DEVMETHOD(device_probe), pccard_compat_probe), DEVMETHOD(device_attach), pccard_compat_attach), /* Card interface */ DEVMETHOD(card_compat_match, foo_match), /* newly written */ DEVMETHOD(card_compat_probe, foo_probe), /* old probe */ DEVMETHOD(card_compat_attach, foo_attach), /* old attach */ This will allow a single driver binary image to be used for both OLDCARD and NEWCARD. Drivers wishing to not retain OLDCARD compatibility needn't do this. ep driver minorly updated. sn driver updated more than minorly. Add module dependencies to allow module to load. Also change name to if_sn. Add some debugging code. attempt to fix the cannot allocate memory problem I'd been seeing. Minor formatting nits. Revision Changes Path 1.8 +41 -1 src/sys/dev/pccard/card_if.m 1.17 +32 -1 src/sys/dev/pccard/pccard.c 1.16 +5 -1 src/sys/dev/pccard/pccardvar.h 1.16 +17 -3 src/sys/dev/ep/if_ep_pccard.c 1.12 +15 -17 src/sys/dev/sn/if_sn.c 1.6 +2 -2 src/sys/dev/sn/if_sn_isa.c 1.5 +27 -6 src/sys/dev/sn/if_sn_pccard.c 1.21 +17 -1 src/sys/pccard/pccard_nbk.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009190439.VAA18340>