Date: Fri, 21 Jan 2005 05:27:15 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 69420 for review Message-ID: <200501210527.j0L5RFcL024317@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=69420 Change 69420 by peter@peter_daintree on 2005/01/21 05:26:14 IFC @69419 (including re-fixing some merge problems) Affected files ... .. //depot/projects/hammer/lib/libc/amd64/stdlib/gdtoa.mk#5 delete .. //depot/projects/hammer/libexec/rtld-aout/support.c#3 integrate .. //depot/projects/hammer/libexec/rtld-aout/support.h#3 integrate .. //depot/projects/hammer/share/examples/etc/make.conf#32 integrate .. //depot/projects/hammer/share/man/man5/make.conf.5#31 integrate .. //depot/projects/hammer/sys/dev/fe/if_fe_pccard.c#9 integrate .. //depot/projects/hammer/sys/dev/pccard/pccard_cis.c#9 integrate .. //depot/projects/hammer/sys/dev/pccard/pccard_cis.h#3 integrate Differences ... ==== //depot/projects/hammer/libexec/rtld-aout/support.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *- - * $FreeBSD: src/libexec/rtld-aout/support.c,v 1.5 1999/08/28 00:10:06 peter Exp $ + * $FreeBSD: src/libexec/rtld-aout/support.c,v 1.7 2005/01/11 16:40:29 trhodes Exp $ */ #include <sys/types.h> #include <string.h> ==== //depot/projects/hammer/libexec/rtld-aout/support.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *- - * $FreeBSD: src/libexec/rtld-aout/support.h,v 1.4 1999/08/28 00:10:06 peter Exp $ + * $FreeBSD: src/libexec/rtld-aout/support.h,v 1.6 2005/01/11 16:40:29 trhodes Exp $ */ /* ==== //depot/projects/hammer/share/examples/etc/make.conf#32 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/examples/etc/make.conf,v 1.253 2004/12/21 12:44:20 ru Exp $ +# $FreeBSD: src/share/examples/etc/make.conf,v 1.254 2005/01/21 03:51:07 wes Exp $ # # NOTE: Please would any committer updating this file also update the # make.conf(5) manual page, if necessary, which is located in @@ -169,6 +169,9 @@ # The list of modules to build instead of all of them. #MODULES_OVERRIDE= linux ipfw # +# The list of modules to never build, applied *after* MODULES_OVERRIDE. +#WITHOUT_MODULES= bktr plip +# # The following controls building optional IDEA code in libcrypto and # certain ports. Patents are involved - you must not use this unless # you either have a license or fall within patent 'fair use' ==== //depot/projects/hammer/share/man/man5/make.conf.5#31 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man5/make.conf.5,v 1.113 2004/12/21 12:21:26 ru Exp $ +.\" $FreeBSD: src/share/man/man5/make.conf.5,v 1.114 2005/01/21 03:51:07 wes Exp $ .\" .Dd December 21, 2004 .Dt MAKE.CONF 5 @@ -352,6 +352,15 @@ .It Va MODULES_OVERRIDE .Pq Vt str Set to a list of modules to build instead of all of them. +.It Va WITHOUT_MODULES +.Pq Vt str +Set to a list of modules to exclude from the build. This provides a +somewhat easier way to exclude modules you are certain you will never +need than specifying +.Va MODULES_OVERRIDE . +This is applied +.Em after +.Va MODULES_OVERRIDE . .It Va PORTS_MODULES Set this to the list of ports you wish to rebuild every time the kernel is built. ==== //depot/projects/hammer/sys/dev/fe/if_fe_pccard.c#9 (text+ko) ==== @@ -22,7 +22,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/fe/if_fe_pccard.c,v 1.19 2005/01/20 20:08:18 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fe/if_fe_pccard.c,v 1.20 2005/01/21 02:14:40 imp Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -33,6 +33,7 @@ #include <sys/bus.h> #include <machine/bus.h> #include <machine/resource.h> +#include <sys/rman.h> #include <net/ethernet.h> #include <net/if.h> @@ -59,16 +60,18 @@ static int fe_pccard_attach(device_t); static int fe_pccard_detach(device_t); static int fe_pccard_match(device_t); +static int fe_pccard_mem_ether(device_t dev, bus_addr_t cardoff, + u_char *enaddr); static const struct fe_pccard_product { struct pccard_product mpp_product; uint32_t mpp_ioalign; /* required alignment */ int mpp_enet_maddr; int mpp_flags; -#define MBH10302 0x1 /* Fujitsu MBH10302 */ +#define MPP_MBH10302 1 } fe_pccard_products[] = { /* These need to be first */ - { PCMCIA_CARD(FUJITSU2, FMV_J181, 0), 0, -1, MBH10302}, + { PCMCIA_CARD(FUJITSU2, FMV_J181, 0), 0, -1, MPP_MBH10302}, { PCMCIA_CARD(FUJITSU2, FMV_J182, 0), 0, 0xf2c}, { PCMCIA_CARD(FUJITSU2, FMV_J182A, 0), 0, 0x1cc}, { PCMCIA_CARD(FUJITSU2, ITCFJ182A, 0), 0, 0x1cc}, @@ -81,7 +84,7 @@ { PCMCIA_CARD(CONTEC, CNETPC, 0), 0, -1 }, { PCMCIA_CARD(FUJITSU, LA501, 0), 0x20, -1 }, { PCMCIA_CARD(FUJITSU, LA10S, 0), 0, -1 }, - { PCMCIA_CARD(FUJITSU, NE200T, 0), 0, -1, MBH10302},/* Sold by Eagle */ + { PCMCIA_CARD(FUJITSU, NE200T, 0), 0, -1, MPP_MBH10302},/* Sold by Eagle */ { PCMCIA_CARD(RATOC, REX_R280, 0), 0, 0x1fc }, { { NULL } } }; @@ -132,9 +135,8 @@ DRIVER_MODULE(fe, pccard, fe_pccard_driver, fe_devclass, 0, 0); -static int fe_probe_mbh(device_t); -static int fe_probe_tdk(device_t); - +static int fe_probe_mbh(device_t, const struct fe_pccard_product *); +static int fe_probe_tdk(device_t, const struct fe_pccard_product *); /* * Initialize the device - called from Slot manager. */ @@ -142,24 +144,23 @@ fe_pccard_probe(device_t dev) { struct fe_softc *sc; + const struct fe_pccard_product *pp; int error; /* Prepare for the device probe process. */ sc = device_get_softc(dev); sc->sc_unit = device_get_unit(dev); - pccard_get_ether(dev, sc->sc_enaddr); + pp = (const struct fe_pccard_product *) pccard_product_lookup(dev, + (const struct pccard_product *)fe_pccard_products, + sizeof(fe_pccard_products[0]), NULL); + if (pp == NULL) + return (ENXIO); - /* Probe for supported cards. */ - if ((error = fe_probe_mbh(dev)) == 0) - goto end; - fe_release_resource(dev); - - if ((error = fe_probe_tdk(dev)) == 0) - goto end; - fe_release_resource(dev); - -end: + if (pp->mpp_flags & MPP_MBH10302) + error = fe_probe_mbh(dev, pp); + else + error = fe_probe_tdk(dev, pp); if (error == 0) error = fe_alloc_irq(dev, 0); @@ -218,7 +219,7 @@ } static int -fe_probe_mbh(device_t dev) +fe_probe_mbh(device_t dev, const struct fe_pccard_product *pp) { struct fe_softc *sc = device_get_softc(dev); @@ -233,13 +234,6 @@ if (fe_alloc_port(dev, 32)) return ENXIO; - /* Ethernet MAC address should *NOT* have been given by pccardd, - if this is a true MBH10302; i.e., Ethernet address must be - "all-zero" upon entry. */ - if (sc->sc_enaddr[0] || sc->sc_enaddr[1] || sc->sc_enaddr[2] || - sc->sc_enaddr[3] || sc->sc_enaddr[4] || sc->sc_enaddr[5]) - return ENXIO; - /* Fill the softc struct with default values. */ fe_softc_defaults(sc); @@ -281,7 +275,7 @@ * name _tdk is just for a historical reason. :-) */ static int -fe_probe_tdk (device_t dev) +fe_probe_tdk (device_t dev, const struct fe_pccard_product *pp) { struct fe_softc *sc = device_get_softc(dev); @@ -309,6 +303,8 @@ sc->type = FE_TYPE_TDK; sc->typestr = "Generic MB8696x/78Q837x Ethernet (PCMCIA)"; + pccard_get_ether(dev, sc->sc_enaddr); + /* Make sure we got a valid station address. */ if (!fe_valid_Ether_p(sc->sc_enaddr, 0)) return ENXIO; ==== //depot/projects/hammer/sys/dev/pccard/pccard_cis.c#9 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: pcmcia_cis.c,v 1.17 2000/02/10 09:01:52 chopps Exp $ */ -/* $FreeBSD: src/sys/dev/pccard/pccard_cis.c,v 1.29 2005/01/06 01:43:02 imp Exp $ */ +/* $FreeBSD: src/sys/dev/pccard/pccard_cis.c,v 1.30 2005/01/21 02:11:48 imp Exp $ */ /*- * Copyright (c) 1997 Marc Horowitz. All rights reserved. @@ -1269,6 +1269,8 @@ static int decode_funce(struct pccard_tuple *tuple, struct pccard_function *pf) { + int i; + int len; int type = pccard_tuple_read_1(tuple, 0); switch (pf->function) { @@ -1280,8 +1282,7 @@ break; case PCCARD_FUNCTION_NETWORK: if (type == PCCARD_TPLFE_TYPE_LAN_NID) { - int i; - int len = pccard_tuple_read_1(tuple, 1); + len = pccard_tuple_read_1(tuple, 1); if (tuple->length < 2 + len || len > 8) { /* tuple length not enough or nid too long */ break; @@ -1291,6 +1292,17 @@ = pccard_tuple_read_1(tuple, i + 2); } pf->pf_funce_lan_nidlen = len; + } else if (type == PCCARD_TPLFE_TYPE_LAN_OLD_NID) { + /* Some older cards have this format, no idea if it is standard */ + if (tuple->length != 13) + break; + len = pccard_tuple_read_1(tuple, 4); + if (len != 6) + break; + for (i = 0; i < len; i++) { + pf->pf_funce_lan_nid[i] + = pccard_tuple_read_1(tuple, i + 5); + } } break; default: ==== //depot/projects/hammer/sys/dev/pccard/pccard_cis.h#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/pccard/pccard_cis.h,v 1.2 2005/01/06 01:43:02 imp Exp $ */ +/* $FreeBSD: src/sys/dev/pccard/pccard_cis.h,v 1.3 2005/01/21 02:11:48 imp Exp $ */ /*- * Copyright (c) 1997 Marc Horowitz. All rights reserved. @@ -168,6 +168,7 @@ #define PCCARD_FUNCTION_SECURITY 9 #define PCCARD_FUNCTION_INSTRUMENT 10 #define CISTPL_FUNCE 0x22 +#define PCCARD_TPLFE_TYPE_LAN_OLD_NID 0x00 /* Old way? */ #define PCCARD_TPLFE_TYPE_LAN_TECH 0x01 #define PCCARD_TPLFE_TYPE_LAN_SPEED 0x02 #define PCCARD_TPLFE_TYPE_LAN_MEDIA 0x03
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501210527.j0L5RFcL024317>