From owner-p4-projects@FreeBSD.ORG Tue Apr 7 07:59:05 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2B37A1065776; Tue, 7 Apr 2009 07:59:05 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1AB91065769 for ; Tue, 7 Apr 2009 07:59:04 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BF99D8FC1A for ; Tue, 7 Apr 2009 07:59:04 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n377x4jG058329 for ; Tue, 7 Apr 2009 07:59:04 GMT (envelope-from zec@fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n377x4Ow058327 for perforce@freebsd.org; Tue, 7 Apr 2009 07:59:04 GMT (envelope-from zec@fer.hr) Date: Tue, 7 Apr 2009 07:59:04 GMT Message-Id: <200904070759.n377x4Ow058327@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@fer.hr using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 160312 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2009 07:59:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=160312 Change 160312 by zec@zec_amdx2 on 2009/04/07 07:58:12 IFC @ 160308 Affected files ... .. //depot/projects/vimage-commit/src/sys/boot/forth/loader.conf#9 integrate .. //depot/projects/vimage-commit/src/sys/dev/ed/if_ed.c#5 integrate .. //depot/projects/vimage-commit/src/sys/dev/ed/if_ed_cbus.c#3 integrate .. //depot/projects/vimage-commit/src/sys/dev/ed/if_ed_isa.c#3 integrate .. //depot/projects/vimage-commit/src/sys/dev/ed/if_ed_pci.c#3 integrate .. //depot/projects/vimage-commit/src/sys/dev/ed/if_edvar.h#5 integrate .. //depot/projects/vimage-commit/src/sys/dev/firewire/firewire.c#11 integrate .. //depot/projects/vimage-commit/src/sys/dev/firewire/sbp.h#3 integrate .. //depot/projects/vimage-commit/src/sys/dev/pccard/pccarddevs#8 integrate Differences ... ==== //depot/projects/vimage-commit/src/sys/boot/forth/loader.conf#9 (text+ko) ==== @@ -6,7 +6,7 @@ # # All arguments must be in double quotes. # -# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.138 2009/03/19 20:33:26 thompsa Exp $ +# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.139 2009/04/07 01:37:50 weongyo Exp $ ############################################################## ### Basic configuration options ############################ @@ -275,6 +275,7 @@ if_tx_load="NO" # SMC 83c17x Fast Ethernet if_txp_load="NO" # 3Com 3XP Typhoon/Sidewinder (3CR990) if_vge_load="NO" # VIA VT6122 PCI Gigabit Ethernet +if_uath_load="NO" # Atheros USB wireless for AR5005UG & AR5005UX if_udav_load="NO" # Davicom DM9601 USB Ethernet if_upgt_load="NO" # Conexant/Intersil PrismGT USB wireless if_ural_load="NO" # Ralink Technology USB wireless ==== //depot/projects/vimage-commit/src/sys/dev/ed/if_ed.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed.c,v 1.277 2009/03/30 17:25:56 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed.c,v 1.278 2009/04/07 05:41:38 imp Exp $"); /* * Device driver for National Semiconductor DS8390/WD83C690 based ethernet @@ -1739,3 +1739,38 @@ } return (len); } + +/* + * Generic ifmedia support. By default, the DP8390-based cards don't know + * what their network attachment really is, or even if it is valid (except + * upon successful transmission of a packet). To play nicer with dhclient, as + * well as to fit in with a framework where some cards can provde more + * detailed information, make sure that we use this as a fallback. + */ +static int +ed_gen_ifmedia_ioctl(struct ed_softc *sc, struct ifreq *ifr, u_long command) +{ + return (ifmedia_ioctl(sc->ifp, ifr, &sc->ifmedia, command)); +} + +static int +ed_gen_ifmedia_upd(struct ifnet *ifp) +{ + return 0; +} + +static void +ed_gen_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) +{ + ifmr->ifm_active = IFM_ETHER | IFM_AUTO; + ifmr->ifm_status = IFM_AVALID | IFM_ACTIVE; +} + +void +ed_gen_ifmedia_init(struct ed_softc *sc) +{ + sc->sc_media_ioctl = &ed_gen_ifmedia_ioctl; + ifmedia_init(&sc->ifmedia, 0, ed_gen_ifmedia_upd, ed_gen_ifmedia_sts); + ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_AUTO, 0, 0); + ifmedia_set(&sc->ifmedia, IFM_ETHER | IFM_AUTO); +} ==== //depot/projects/vimage-commit/src/sys/dev/ed/if_ed_cbus.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ed/if_ed_cbus.c,v 1.28 2007/02/23 12:18:38 piso Exp $ + * $FreeBSD: src/sys/dev/ed/if_ed_cbus.c,v 1.29 2009/04/07 05:41:38 imp Exp $ */ #include @@ -248,7 +248,8 @@ ed_release_resources(dev); return (error); } - + if (sc->sc_media_ioctl == NULL) + ed_gen_ifmedia_init(sc); return ed_attach(dev); } ==== //depot/projects/vimage-commit/src/sys/dev/ed/if_ed_isa.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed_isa.c,v 1.31 2007/02/23 12:18:38 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed_isa.c,v 1.32 2009/04/07 05:41:38 imp Exp $"); #include "opt_ed.h" @@ -175,7 +175,8 @@ ed_release_resources(dev); return (error); } - + if (sc->sc_media_ioctl == NULL) + ed_gen_ifmedia_init(sc); return ed_attach(dev); } ==== //depot/projects/vimage-commit/src/sys/dev/ed/if_ed_pci.c#3 (text+ko) ==== @@ -18,7 +18,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed_pci.c,v 1.50 2007/12/31 03:29:02 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed_pci.c,v 1.51 2009/04/07 05:41:38 imp Exp $"); #include #include @@ -91,11 +91,9 @@ int error = ENXIO; /* - * If this card claims to be a RTL8029, probe it as such. - * However, allow that probe to fail. Some versions of qemu - * claim to be a 8029 in the PCI register, but it doesn't - * implement the 8029 specific registers. In that case, fall - * back to a normal NE2000. + * Probe RTL8029 cards, but allow failure and try as a generic + * ne-2000. QEMU 0.9 and earlier use the RTL8029 PCI ID, but + * are areally just generic ne-2000 cards. */ if (pci_get_devid(dev) == ED_RTL8029_PCI_ID) error = ed_probe_RTL80x9(dev, PCIR_BAR(0), flags); @@ -118,7 +116,8 @@ ed_release_resources(dev); return (error); } - + if (sc->sc_media_ioctl == NULL) + ed_gen_ifmedia_init(sc); error = ed_attach(dev); if (error) ed_release_resources(dev); ==== //depot/projects/vimage-commit/src/sys/dev/ed/if_edvar.h#5 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ed/if_edvar.h,v 1.44 2009/04/02 19:27:56 imp Exp $ + * $FreeBSD: src/sys/dev/ed/if_edvar.h,v 1.45 2009/04/07 05:41:38 imp Exp $ */ #ifndef SYS_DEV_ED_IF_EDVAR_H @@ -226,6 +226,8 @@ void ed_disable_16bit_access(struct ed_softc *); void ed_enable_16bit_access(struct ed_softc *); +void ed_gen_ifmedia_init(struct ed_softc *); + driver_intr_t edintr; extern devclass_t ed_devclass; ==== //depot/projects/vimage-commit/src/sys/dev/firewire/firewire.c#11 (text+ko) ==== @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.109 2009/03/17 13:07:11 sbruno Exp $ + * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.110 2009/04/07 02:33:46 sbruno Exp $ * */ @@ -1641,7 +1641,11 @@ break; } - /* inesrt into sorted fwdev list */ + + /* + * If the fwdev is not found in the + * fc->devices TAILQ, then we will add it. + */ pfwdev = NULL; STAILQ_FOREACH(tfwdev, &fc->devices, link) { if (tfwdev->eui.hi > fwdev->eui.hi || ==== //depot/projects/vimage-commit/src/sys/dev/firewire/sbp.h#3 (text+ko) ==== @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/firewire/sbp.h,v 1.5 2005/01/06 01:42:41 imp Exp $ + * $FreeBSD: src/sys/dev/firewire/sbp.h,v 1.6 2009/04/07 02:33:46 sbruno Exp $ * */ @@ -121,7 +121,7 @@ /* 3: Page size not supported */ /* 4: Access denied */ #define STATUS_ACCESS_DENY 4 -/* 5: Logical unit not supported */ +#define STATUS_LUR 5 /* 6: Maximum payload too small */ /* 7: Reserved for future standardization */ /* 8: Resource unavailabe */ ==== //depot/projects/vimage-commit/src/sys/dev/pccard/pccarddevs#8 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/pccard/pccarddevs,v 1.142 2009/03/27 20:40:17 imp Exp $ +$FreeBSD: src/sys/dev/pccard/pccarddevs,v 1.143 2009/04/07 05:57:56 imp Exp $ /* $NetBSD: pcmciadevs,v 1.226 2008/06/19 18:20:33 imp Exp $ */ /* $OpenBSD: pcmciadevs,v 1.93 2002/06/21 08:31:10 henning Exp $ */ @@ -344,6 +344,7 @@ product GEMPLUS GPR400 0x3004 GPR400 Smartcard Reader /* GlobalVillage */ +product GLOBALVILLAGE POWERPORT 0x0103 GlobalVillage PowerPort PlatinumPro product GLOBALVILLAGE LANMODEM 0x0105 GlobalVillage Ethernet + Modem /* Grey Cell Systems, Ltd */