From owner-svn-src-projects@FreeBSD.ORG Fri Feb 18 20:25:31 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8900C106564A; Fri, 18 Feb 2011 20:25:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72B558FC0C; Fri, 18 Feb 2011 20:25:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1IKPVrd070825; Fri, 18 Feb 2011 20:25:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1IKPUZt070795; Fri, 18 Feb 2011 20:25:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201102182025.p1IKPUZt070795@svn.freebsd.org> From: Dimitry Andric Date: Fri, 18 Feb 2011 20:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218817 - in projects/binutils-2.17: . contrib/top etc/mtree etc/namedb include share/man/man4 share/mk sys/amd64/include sys/arm/arm sys/arm/include sys/boot/forth sys/conf sys/dev/ath... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2011 20:25:31 -0000 Author: dim Date: Fri Feb 18 20:25:30 2011 New Revision: 218817 URL: http://svn.freebsd.org/changeset/base/218817 Log: Sync: merge r218746 through r218816 from ^/head. Added: projects/binutils-2.17/share/man/man4/cxgbe.4 - copied unchanged from r218808, head/share/man/man4/cxgbe.4 projects/binutils-2.17/sys/dev/cxgbe/ - copied from r218808, head/sys/dev/cxgbe/ projects/binutils-2.17/sys/modules/cxgbe/ - copied from r218808, head/sys/modules/cxgbe/ projects/binutils-2.17/tools/tools/nanobsd/Files/root/update - copied unchanged from r218816, head/tools/tools/nanobsd/Files/root/update projects/binutils-2.17/usr.sbin/bsdinstall/ - copied from r218808, head/usr.sbin/bsdinstall/ Modified: projects/binutils-2.17/UPDATING projects/binutils-2.17/etc/mtree/BSD.include.dist projects/binutils-2.17/etc/mtree/BSD.usr.dist projects/binutils-2.17/etc/namedb/named.conf projects/binutils-2.17/include/Makefile projects/binutils-2.17/share/man/man4/Makefile projects/binutils-2.17/share/man/man4/altq.4 projects/binutils-2.17/share/man/man4/mos.4 projects/binutils-2.17/share/man/man4/vlan.4 projects/binutils-2.17/sys/amd64/include/pmap.h projects/binutils-2.17/sys/arm/arm/elf_machdep.c projects/binutils-2.17/sys/arm/include/pmap.h projects/binutils-2.17/sys/boot/forth/loader.conf projects/binutils-2.17/sys/conf/NOTES projects/binutils-2.17/sys/conf/files projects/binutils-2.17/sys/conf/kern.pre.mk projects/binutils-2.17/sys/dev/ath/ath_hal/ah_internal.h projects/binutils-2.17/sys/dev/ath/ath_hal/ar5416/ar5416.h projects/binutils-2.17/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c projects/binutils-2.17/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c projects/binutils-2.17/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c projects/binutils-2.17/sys/dev/ath/ath_rate/sample/sample.c projects/binutils-2.17/sys/dev/ath/ath_rate/sample/sample.h projects/binutils-2.17/sys/dev/ath/if_ath.c projects/binutils-2.17/sys/dev/ath/if_ath_tx_ht.c projects/binutils-2.17/sys/dev/dc/if_dc.c projects/binutils-2.17/sys/dev/dc/if_dcreg.h projects/binutils-2.17/sys/dev/flash/mx25l.c projects/binutils-2.17/sys/dev/mps/mps.c projects/binutils-2.17/sys/dev/mps/mps_sas.c projects/binutils-2.17/sys/dev/mps/mpsvar.h projects/binutils-2.17/sys/dev/re/if_re.c projects/binutils-2.17/sys/dev/sound/usb/uaudio.c projects/binutils-2.17/sys/dev/usb/net/if_mos.c projects/binutils-2.17/sys/fs/nfsclient/nfs_clvfsops.c projects/binutils-2.17/sys/fs/portalfs/portal_vnops.c projects/binutils-2.17/sys/i386/include/pmap.h projects/binutils-2.17/sys/ia64/include/pmap.h projects/binutils-2.17/sys/kern/kern_descrip.c projects/binutils-2.17/sys/kern/sys_socket.c projects/binutils-2.17/sys/kern/uipc_socket.c projects/binutils-2.17/sys/kern/uipc_syscalls.c projects/binutils-2.17/sys/kern/uipc_usrreq.c projects/binutils-2.17/sys/mips/include/pmap.h projects/binutils-2.17/sys/modules/Makefile projects/binutils-2.17/sys/net/if.c projects/binutils-2.17/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c projects/binutils-2.17/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c projects/binutils-2.17/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c projects/binutils-2.17/sys/netinet/sctp_input.c projects/binutils-2.17/sys/netinet/sctp_peeloff.c projects/binutils-2.17/sys/netipsec/key.c projects/binutils-2.17/sys/netipsec/xform.h projects/binutils-2.17/sys/netipsec/xform_ah.c projects/binutils-2.17/sys/netipsec/xform_esp.c projects/binutils-2.17/sys/nfsclient/bootp_subr.c projects/binutils-2.17/sys/nfsclient/krpc_subr.c projects/binutils-2.17/sys/nfsclient/nfs_diskless.c projects/binutils-2.17/sys/nfsclient/nfs_vfsops.c projects/binutils-2.17/sys/pci/if_rlreg.h projects/binutils-2.17/sys/powerpc/include/pmap.h projects/binutils-2.17/sys/rpc/clnt_dg.c projects/binutils-2.17/sys/rpc/clnt_vc.c projects/binutils-2.17/sys/rpc/rpc_generic.c projects/binutils-2.17/sys/rpc/svc_dg.c projects/binutils-2.17/sys/rpc/svc_generic.c projects/binutils-2.17/sys/rpc/svc_vc.c projects/binutils-2.17/sys/sparc64/include/pmap.h projects/binutils-2.17/sys/sun4v/include/pmap.h projects/binutils-2.17/sys/vm/vm_page.c projects/binutils-2.17/tools/tools/sysbuild/sysbuild.sh projects/binutils-2.17/usr.bin/calendar/calendar.h projects/binutils-2.17/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox (contents, props changed) projects/binutils-2.17/usr.bin/calendar/paskha.c projects/binutils-2.17/usr.sbin/Makefile projects/binutils-2.17/usr.sbin/nfsd/nfsd.c projects/binutils-2.17/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh projects/binutils-2.17/usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh projects/binutils-2.17/usr.sbin/pc-sysinstall/backend/functions-localize.sh projects/binutils-2.17/usr.sbin/pc-sysinstall/backend/functions.sh projects/binutils-2.17/usr.sbin/pc-sysinstall/backend/parseconfig.sh projects/binutils-2.17/usr.sbin/pc-sysinstall/conf/pc-sysinstall.conf projects/binutils-2.17/usr.sbin/pc-sysinstall/examples/README projects/binutils-2.17/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh projects/binutils-2.17/usr.sbin/sysinstall/devices.c projects/binutils-2.17/usr.sbin/uathload/Makefile Directory Properties: projects/binutils-2.17/ (props changed) projects/binutils-2.17/cddl/contrib/opensolaris/ (props changed) projects/binutils-2.17/contrib/bind9/ (props changed) projects/binutils-2.17/contrib/binutils/ (props changed) projects/binutils-2.17/contrib/bzip2/ (props changed) projects/binutils-2.17/contrib/dialog/ (props changed) projects/binutils-2.17/contrib/ee/ (props changed) projects/binutils-2.17/contrib/expat/ (props changed) projects/binutils-2.17/contrib/file/ (props changed) projects/binutils-2.17/contrib/gdb/ (props changed) projects/binutils-2.17/contrib/gdtoa/ (props changed) projects/binutils-2.17/contrib/gnu-sort/ (props changed) projects/binutils-2.17/contrib/groff/ (props changed) projects/binutils-2.17/contrib/less/ (props changed) projects/binutils-2.17/contrib/libpcap/ (props changed) projects/binutils-2.17/contrib/llvm/ (props changed) projects/binutils-2.17/contrib/llvm/tools/clang/ (props changed) projects/binutils-2.17/contrib/ncurses/ (props changed) projects/binutils-2.17/contrib/netcat/ (props changed) projects/binutils-2.17/contrib/ntp/ (props changed) projects/binutils-2.17/contrib/one-true-awk/ (props changed) projects/binutils-2.17/contrib/openbsm/ (props changed) projects/binutils-2.17/contrib/openpam/ (props changed) projects/binutils-2.17/contrib/pf/ (props changed) projects/binutils-2.17/contrib/sendmail/ (props changed) projects/binutils-2.17/contrib/tcpdump/ (props changed) projects/binutils-2.17/contrib/tcsh/ (props changed) projects/binutils-2.17/contrib/top/ (props changed) projects/binutils-2.17/contrib/top/install-sh (props changed) projects/binutils-2.17/contrib/tzcode/stdtime/ (props changed) projects/binutils-2.17/contrib/tzcode/zic/ (props changed) projects/binutils-2.17/contrib/tzdata/ (props changed) projects/binutils-2.17/contrib/wpa/ (props changed) projects/binutils-2.17/contrib/xz/ (props changed) projects/binutils-2.17/crypto/openssh/ (props changed) projects/binutils-2.17/crypto/openssl/ (props changed) projects/binutils-2.17/lib/libc/ (props changed) projects/binutils-2.17/lib/libc/stdtime/ (props changed) projects/binutils-2.17/lib/libutil/ (props changed) projects/binutils-2.17/lib/libz/ (props changed) projects/binutils-2.17/sbin/ (props changed) projects/binutils-2.17/sbin/ipfw/ (props changed) projects/binutils-2.17/share/mk/bsd.arch.inc.mk (props changed) projects/binutils-2.17/share/zoneinfo/ (props changed) projects/binutils-2.17/sys/ (props changed) projects/binutils-2.17/sys/amd64/include/xen/ (props changed) projects/binutils-2.17/sys/cddl/contrib/opensolaris/ (props changed) projects/binutils-2.17/sys/contrib/dev/acpica/ (props changed) projects/binutils-2.17/sys/contrib/octeon-sdk/ (props changed) projects/binutils-2.17/sys/contrib/pf/ (props changed) projects/binutils-2.17/sys/contrib/x86emu/ (props changed) projects/binutils-2.17/usr.bin/calendar/ (props changed) projects/binutils-2.17/usr.bin/csup/ (props changed) projects/binutils-2.17/usr.bin/procstat/ (props changed) projects/binutils-2.17/usr.sbin/zic/ (props changed) Modified: projects/binutils-2.17/UPDATING ============================================================================== --- projects/binutils-2.17/UPDATING Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/UPDATING Fri Feb 18 20:25:30 2011 (r218817) @@ -22,6 +22,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20110218: + IPsec's HMAC_SHA256-512 support has been fixed to be RFC4868 + compliant, and will now use half of hash for authentication. + This will break interoperability with all stacks (including all + actual FreeBSD versions) who implement + draft-ietf-ipsec-ciph-sha-256-00 (they use 96 bits of hash for + authentication). + The only workaround with such peers is to use another HMAC + algorithm for IPsec ("phase 2") authentication. + 20110207: Remove the uio_yield prototype and symbol. This function has been misnamed since it was introduced and should not be Modified: projects/binutils-2.17/etc/mtree/BSD.include.dist ============================================================================== --- projects/binutils-2.17/etc/mtree/BSD.include.dist Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/etc/mtree/BSD.include.dist Fri Feb 18 20:25:30 2011 (r218817) @@ -106,6 +106,8 @@ .. iicbus .. + io + .. lmc .. mfi Modified: projects/binutils-2.17/etc/mtree/BSD.usr.dist ============================================================================== --- projects/binutils-2.17/etc/mtree/BSD.usr.dist Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/etc/mtree/BSD.usr.dist Fri Feb 18 20:25:30 2011 (r218817) @@ -32,6 +32,8 @@ .. .. libexec + bsdinstall + .. lpr ru .. Modified: projects/binutils-2.17/etc/namedb/named.conf ============================================================================== --- projects/binutils-2.17/etc/namedb/named.conf Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/etc/namedb/named.conf Fri Feb 18 20:25:30 2011 (r218817) @@ -109,14 +109,6 @@ zone "arpa" { }; notify no; }; -zone "in-addr.arpa" { - type slave; - file "/etc/namedb/slave/in-addr.arpa.slave"; - masters { - 192.5.5.241; // F.ROOT-SERVERS.NET. - }; - notify no; -}; */ /* Serving the following zones locally will prevent any queries Modified: projects/binutils-2.17/include/Makefile ============================================================================== --- projects/binutils-2.17/include/Makefile Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/include/Makefile Fri Feb 18 20:25:30 2011 (r218817) @@ -40,7 +40,7 @@ LDIRS= bsm cam geom net net80211 netatal LSUBDIRS= cam/ata cam/scsi \ dev/acpica dev/an dev/bktr dev/firewire dev/hwpmc \ - dev/ic dev/iicbus ${_dev_ieee488} dev/lmc dev/mfi dev/ofw \ + dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/ofw \ dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ fs/devfs fs/fdescfs fs/fifofs fs/msdosfs fs/nfs fs/ntfs fs/nullfs \ Modified: projects/binutils-2.17/share/man/man4/Makefile ============================================================================== --- projects/binutils-2.17/share/man/man4/Makefile Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/share/man/man4/Makefile Fri Feb 18 20:25:30 2011 (r218817) @@ -83,6 +83,7 @@ MAN= aac.4 \ crypto.4 \ cue.4 \ cxgb.4 \ + cxgbe.4 \ cy.4 \ da.4 \ dc.4 \ @@ -221,6 +222,7 @@ MAN= aac.4 \ mmc.4 \ mmcsd.4 \ mn.4 \ + mos.4 \ mouse.4 \ mps.4 \ mpt.4 \ Modified: projects/binutils-2.17/share/man/man4/altq.4 ============================================================================== --- projects/binutils-2.17/share/man/man4/altq.4 Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/share/man/man4/altq.4 Fri Feb 18 20:25:30 2011 (r218817) @@ -127,6 +127,7 @@ They have been applied to the following .Xr bfe 4 , .Xr bge 4 , .Xr cas 4 , +.Xr cxgbe 4 , .Xr dc 4 , .Xr de 4 , .Xr ed 4 , Copied: projects/binutils-2.17/share/man/man4/cxgbe.4 (from r218808, head/share/man/man4/cxgbe.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/binutils-2.17/share/man/man4/cxgbe.4 Fri Feb 18 20:25:30 2011 (r218817, copy of r218808, head/share/man/man4/cxgbe.4) @@ -0,0 +1,167 @@ +.\" Copyright (c) 2011, Chelsio Inc +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright notice, +.\" this list of conditions and the following disclaimer. +.\" +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" 3. Neither the name of the Chelsio Inc nor the names of its +.\" contributors may be used to endorse or promote products derived from +.\" this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.\" $FreeBSD$ +.\" +.Dd February 14, 2011 +.Dt CXGBE 4 +.Os +.Sh NAME +.Nm cxgbe +.Nd "Chelsio T4 10Gb and 1Gb Ethernet adapter driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device cxgbe" +.Ed +.Pp +To load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_cxgbe_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for PCI Express Ethernet adapters based on +the Chelsio Terminator 4 (T4) ASIC. +The driver supprts Jumbo Frames, Transmit/Receive checksum offload, +TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN +tag insertion/extraction, VLAN checksum offload, VLAN TSO, and +Receive Side Steering (RSS). + +For further hardware information and questions related to hardware +requirements, see +.Pa http://www.chelsio.com/ . +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters based on the T4 ASIC: +.Pp +.Bl -bullet -compact +.It +Chelsio T420-CR +.It +Chelsio T422-CR +.It +Chelsio T440-CR +.It +Chelsio T420-BCH +.It +Chelsio T440-BCH +.It +Chelsio T440-CH +.It +Chelsio T420-SO +.It +Chelsio T420-CX +.It +Chelsio T420-BT +.It +Chelsio T404-BT +.El +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.cxgbe.max_ntxq_10G_port +The maximum number of tx queues to use for a 10Gb port. +The default value is 8. +.It Va hw.cxgbe.max_nrxq_10G_port +The maximum number of rx queues to use for a 10Gb port. +The default value is 8. +.It Va hw.cxgbe.max_ntxq_1G_port +The maximum number of tx queues to use for a 1Gb port. +The default value is 2. +.It Va hw.cxgbe.max_nrxq_1G_port +The maximum number of rx queues to use for a 1Gb port. +The default value is 2. +.It Va hw.cxgbe.holdoff_timer_idx_10G +.It Va hw.cxgbe.holdoff_timer_idx_1G +The timer index value to use to delay interrupts. +The holdoff timer list has the values 1, 5, 10, 50, 100, and 200 +by default (all values are in microseconds) and the index selects a +value from this list. +The default value is 1 for both 10Gb and 1Gb ports, which means the +timer value is 5us. +.It Va hw.cxgbe.holdoff_pktc_idx_10G +.It Va hw.cxgbe.holdoff_pktc_idx_1G +The packet-count index value to use to delay interrupts. +The packet-count list has the values 1, 8, 16, and 32 by default +and the index selects a value from this list. +The default value is 2 for both 10Gb and 1Gb ports, which means 16 +packets (or the holdoff timer going off) before an interrupt is +generated. +.It Va hw.cxgbe.qsize_txq +The size, in number of entries, of the descriptor ring used for a tx +queue. +A buf_ring of the same size is also allocated for additional +software queuing. See +.Xr ifnet 9 . +The default value is 1024. +.It Va hw.cxgbe.qsize_rxq +The size, in number of entries, of the descriptor ring used for an +rx queue. +The default value is 1024. +.Sh SUPPORT +For general information and support, +go to the Chelsio support website at: +.Pa http://www.chelsio.com/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq support@chelsio.com . +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr cxgb 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 9.0 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Navdeep Parhar Aq np@FreeBSD.org . Modified: projects/binutils-2.17/share/man/man4/mos.4 ============================================================================== --- projects/binutils-2.17/share/man/man4/mos.4 Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/share/man/man4/mos.4 Fri Feb 18 20:25:30 2011 (r218817) @@ -28,6 +28,7 @@ kernel configuration file: .Bd -ragged -offset indent .Cd "device uhci" .Cd "device ohci" +.Cd "device ehci" .Cd "device usb" .Cd "device miibus" .Cd "device mos" @@ -72,6 +73,7 @@ driver include: .Bl -bullet -compact .It Sitecom LN030 +.El .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , Modified: projects/binutils-2.17/share/man/man4/vlan.4 ============================================================================== --- projects/binutils-2.17/share/man/man4/vlan.4 Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/share/man/man4/vlan.4 Fri Feb 18 20:25:30 2011 (r218817) @@ -128,6 +128,7 @@ in the hardware is limited to the follow .Xr bce 4 , .Xr bge 4 , .Xr cxgb 4 , +.Xr cxgbe 4 , .Xr em 4 , .Xr igb 4 , .Xr ixgb 4 , Modified: projects/binutils-2.17/sys/amd64/include/pmap.h ============================================================================== --- projects/binutils-2.17/sys/amd64/include/pmap.h Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/amd64/include/pmap.h Fri Feb 18 20:25:30 2011 (r218817) @@ -251,8 +251,6 @@ struct pmap { pml4_entry_t *pm_pml4; /* KVA of level 4 page table */ TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */ cpumask_t pm_active; /* active on cpus */ - uint32_t pm_gen_count; /* generation count (pmap lock dropped) */ - u_int pm_retries; /* spare u_int here due to padding */ struct pmap_statistics pm_stats; /* pmap statistics */ vm_page_t pm_root; /* spare page table pages */ Modified: projects/binutils-2.17/sys/arm/arm/elf_machdep.c ============================================================================== --- projects/binutils-2.17/sys/arm/arm/elf_machdep.c Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/arm/arm/elf_machdep.c Fri Feb 18 20:25:30 2011 (r218817) @@ -169,9 +169,7 @@ elf_reloc_internal(linker_file_t lf, Elf addr = lookup(lf, symidx, 1); if (addr == 0) return -1; - if (*where != addr) - *where = addr; - + *where += addr; break; case R_ARM_COPY: /* none */ Modified: projects/binutils-2.17/sys/arm/include/pmap.h ============================================================================== --- projects/binutils-2.17/sys/arm/include/pmap.h Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/arm/include/pmap.h Fri Feb 18 20:25:30 2011 (r218817) @@ -134,8 +134,6 @@ struct pmap { struct l1_ttable *pm_l1; struct l2_dtable *pm_l2[L2_SIZE]; pd_entry_t *pm_pdir; /* KVA of page directory */ - uint32_t pm_gen_count; /* generation count (pmap lock dropped) */ - u_int pm_retries; cpumask_t pm_active; /* active on cpus */ struct pmap_statistics pm_stats; /* pmap statictics */ TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */ Modified: projects/binutils-2.17/sys/boot/forth/loader.conf ============================================================================== --- projects/binutils-2.17/sys/boot/forth/loader.conf Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/boot/forth/loader.conf Fri Feb 18 20:25:30 2011 (r218817) @@ -252,6 +252,7 @@ pf_load="NO" # packet filter ### Networking drivers ##################################### ############################################################## +bridgestp_load="NO" # if_bridge(4) support miibus_load="NO" # miibus support, needed for some drivers if_ae_load="NO" # Attansic/Atheros L2 FastEthernet if_age_load="NO" # Attansic/Atheros L1 Gigabit Ethernet @@ -264,8 +265,10 @@ if_axe_load="NO" # ASIX Electronics AX8 if_bce_load="NO" # Broadcom NetXtreme II Gigabit Ethernet if_bfe_load="NO" # Broadcom BCM4401 if_bge_load="NO" # Broadcom BCM570x PCI Gigabit Ethernet +if_bridge_load="NO" # if_bridge(4) devices if_bwi_load="NO" # Broadcom BCM53xx IEEE 802.11b/g wireness NICs if_bwn_load="NO" # Broadcom BCM43xx IEEE 802.11 wireless NICs +if_carp_load="NO" # carp(4) devices if_cas_load="NO" # Sun Cassini/Cassini+ and NS DP83065 Saturn if_cm_load="NO" # SMC (90c26, 90c56, 90c66) if_cs_load="NO" # Crystal Semiconductor CS8920 @@ -296,6 +299,7 @@ if_iwn_load="NO" # Intel Wireless WiFi if_ixgb_load="NO" # Intel PRO/10Gb Ethernet if_ixgbe_load="NO" # Intel PRO/10Gb Ethernet PCI Express if_jme_load="NO" # JMicron JMC250 Gigabit/JMC260 Fast Ethernet +if_lagg_load="NO" # lagg(4) devices if_le_load="NO" # AMD Am7900 LANCE and Am79C9xx PCnet if_lge_load="NO" # Level 1 LXT1001 NetCellerator PCI Gigabit # Ethernet Modified: projects/binutils-2.17/sys/conf/NOTES ============================================================================== --- projects/binutils-2.17/sys/conf/NOTES Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/conf/NOTES Fri Feb 18 20:25:30 2011 (r218817) @@ -1902,6 +1902,8 @@ device xmphy # XaQti XMAC II # cas: Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn # cm: Arcnet SMC COM90c26 / SMC COM90c56 # (and SMC COM90c66 in '56 compatibility mode) adapters. +# cxgbe: Support for PCI express 10Gb/1Gb adapters based on the Chelsio T4 +# (Terminator 4) ASIC. # dc: Support for PCI fast ethernet adapters based on the DEC/Intel 21143 # and various workalikes including: # the ADMtek AL981 Comet and AN985 Centaur, the ASIX Electronics @@ -2073,6 +2075,7 @@ device wb # Winbond W89C840F device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # PCI Ethernet NICs. +device cxgbe # Chelsio T4 10GbE PCIe adapter device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel Pro/1000 Gigabit Ethernet device igb # Intel Pro/1000 PCIE Gigabit Ethernet Modified: projects/binutils-2.17/sys/conf/files ============================================================================== --- projects/binutils-2.17/sys/conf/files Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/conf/files Fri Feb 18 20:25:30 2011 (r218817) @@ -853,6 +853,12 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgbe/t4_main.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/t4_sge.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/common/t4_hw.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cy/cy.c optional cy dev/cy/cy_isa.c optional cy isa dev/cy/cy_pci.c optional cy pci @@ -1815,10 +1821,11 @@ dev/usb/net/if_cdce.c optional cdce dev/usb/net/if_cue.c optional cue dev/usb/net/if_ipheth.c optional ipheth dev/usb/net/if_kue.c optional kue +dev/usb/net/if_mos.c optional mos dev/usb/net/if_rue.c optional rue dev/usb/net/if_udav.c optional udav -dev/usb/net/usb_ethernet.c optional aue | axe | cdce | cue | kue | rue | \ - udav +dev/usb/net/usb_ethernet.c optional aue | axe | cdce | cue | kue | mos | \ + rue | udav dev/usb/net/uhso.c optional uhso # # USB WLAN drivers Modified: projects/binutils-2.17/sys/conf/kern.pre.mk ============================================================================== --- projects/binutils-2.17/sys/conf/kern.pre.mk Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/conf/kern.pre.mk Fri Feb 18 20:25:30 2011 (r218817) @@ -82,8 +82,8 @@ INCLUDES+= -I$S/dev/twa # ... and XFS INCLUDES+= -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs -# ... and the same for cxgb -INCLUDES+= -I$S/dev/cxgb +# ... and the same for cxgb and cxgbe +INCLUDES+= -I$S/dev/cxgb -I$S/dev/cxgbe .endif Modified: projects/binutils-2.17/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- projects/binutils-2.17/sys/dev/ath/ath_hal/ah_internal.h Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/dev/ath/ath_hal/ah_internal.h Fri Feb 18 20:25:30 2011 (r218817) @@ -408,14 +408,15 @@ extern HAL_BOOL ath_hal_getTxQProps(stru HAL_TXQ_INFO *qInfo, const HAL_TX_QUEUE_INFO *qi); typedef enum { - HAL_ANI_PRESENT, /* is ANI support present */ - HAL_ANI_NOISE_IMMUNITY_LEVEL, /* set level */ - HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION, /* enable/disable */ - HAL_ANI_CCK_WEAK_SIGNAL_THR, /* enable/disable */ - HAL_ANI_FIRSTEP_LEVEL, /* set level */ - HAL_ANI_SPUR_IMMUNITY_LEVEL, /* set level */ - HAL_ANI_MODE = 6, /* 0 => manual, 1 => auto (XXX do not change) */ - HAL_ANI_PHYERR_RESET, /* reset phy error stats */ + HAL_ANI_PRESENT = 0x1, /* is ANI support present */ + HAL_ANI_NOISE_IMMUNITY_LEVEL = 0x2, /* set level */ + HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION = 0x4, /* enable/disable */ + HAL_ANI_CCK_WEAK_SIGNAL_THR = 0x8, /* enable/disable */ + HAL_ANI_FIRSTEP_LEVEL = 0x10, /* set level */ + HAL_ANI_SPUR_IMMUNITY_LEVEL = 0x20, /* set level */ + HAL_ANI_MODE = 0x40, /* 0 => manual, 1 => auto (XXX do not change) */ + HAL_ANI_PHYERR_RESET =0x80, /* reset phy error stats */ + HAL_ANI_ALL = 0xff } HAL_ANI_CMD; #define HAL_SPUR_VAL_MASK 0x3FFF Modified: projects/binutils-2.17/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- projects/binutils-2.17/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri Feb 18 20:25:30 2011 (r218817) @@ -87,6 +87,8 @@ struct ath_hal_5416 { uint32_t ah_rx_chainmask; uint32_t ah_tx_chainmask; + HAL_ANI_CMD ah_ani_function; + struct ar5416PerCal ah_cal; /* periodic calibration state */ struct ar5416NfLimits nf_2g; Modified: projects/binutils-2.17/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- projects/binutils-2.17/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Fri Feb 18 20:25:30 2011 (r218817) @@ -177,7 +177,7 @@ ar5416AniControl(struct ath_hal *ah, HAL OS_MARK(ah, AH_MARK_ANI_CONTROL, cmd); - switch (cmd) { + switch (cmd & AH5416(ah)->ah_ani_function) { case HAL_ANI_NOISE_IMMUNITY_LEVEL: { u_int level = param; @@ -354,13 +354,15 @@ ar5416AniOfdmErrTrigger(struct ath_hal * aniState = ahp->ah_curani; params = aniState->params; /* First, raise noise immunity level, up to max */ - if (aniState->noiseImmunityLevel+1 < params->maxNoiseImmunityLevel) { + if ((AH5416(ah)->ah_ani_function & HAL_ANI_NOISE_IMMUNITY_LEVEL) && + (aniState->noiseImmunityLevel+1 < params->maxNoiseImmunityLevel)) { ar5416AniControl(ah, HAL_ANI_NOISE_IMMUNITY_LEVEL, aniState->noiseImmunityLevel + 1); return; } /* then, raise spur immunity level, up to max */ - if (aniState->spurImmunityLevel+1 < params->maxSpurImmunityLevel) { + if ((AH5416(ah)->ah_ani_function & HAL_ANI_SPUR_IMMUNITY_LEVEL) && + (aniState->spurImmunityLevel+1 < params->maxSpurImmunityLevel)) { ar5416AniControl(ah, HAL_ANI_SPUR_IMMUNITY_LEVEL, aniState->spurImmunityLevel + 1); return; Modified: projects/binutils-2.17/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- projects/binutils-2.17/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Fri Feb 18 20:25:30 2011 (r218817) @@ -58,7 +58,7 @@ ar5416AniSetup(struct ath_hal *ah) .period = 100, }; /* NB: ANI is not enabled yet */ - ar5212AniAttach(ah, &aniparams, &aniparams, AH_FALSE); + ar5416AniAttach(ah, &aniparams, &aniparams, AH_FALSE); } /* @@ -168,6 +168,9 @@ ar5416InitState(struct ath_hal_5416 *ahp */ AH5416(ah)->ah_rx_chainmask = AR5416_DEFAULT_RXCHAINMASK; AH5416(ah)->ah_tx_chainmask = AR5416_DEFAULT_TXCHAINMASK; + + /* Enable all ANI functions to begin with */ + AH5416(ah)->ah_ani_function = HAL_ANI_ALL; } uint32_t Modified: projects/binutils-2.17/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c ============================================================================== --- projects/binutils-2.17/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Fri Feb 18 20:25:30 2011 (r218817) @@ -68,8 +68,34 @@ static void ar9280WriteIni(struct ath_ha static void ar9280AniSetup(struct ath_hal *ah) { - /* NB: disable ANI for reliable RIFS rx */ - ar5416AniAttach(ah, AH_NULL, AH_NULL, AH_FALSE); + /* + * These are the parameters from the AR5416 ANI code; + * they likely need quite a bit of adjustment for the + * AR9280. + */ + static const struct ar5212AniParams aniparams = { + .maxNoiseImmunityLevel = 4, /* levels 0..4 */ + .totalSizeDesired = { -55, -55, -55, -55, -62 }, + .coarseHigh = { -14, -14, -14, -14, -12 }, + .coarseLow = { -64, -64, -64, -64, -70 }, + .firpwr = { -78, -78, -78, -78, -80 }, + .maxSpurImmunityLevel = 2, + .cycPwrThr1 = { 2, 4, 6 }, + .maxFirstepLevel = 2, /* levels 0..2 */ + .firstep = { 0, 4, 8 }, + .ofdmTrigHigh = 500, + .ofdmTrigLow = 200, + .cckTrigHigh = 200, + .cckTrigLow = 100, + .rssiThrHigh = 40, + .rssiThrLow = 7, + .period = 100, + }; + /* NB: disable ANI noise immmunity for reliable RIFS rx */ + AH5416(ah)->ah_ani_function &= ~ HAL_ANI_NOISE_IMMUNITY_LEVEL; + + /* NB: ANI is not enabled yet */ + ar5416AniAttach(ah, &aniparams, &aniparams, AH_FALSE); } /* Modified: projects/binutils-2.17/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- projects/binutils-2.17/sys/dev/ath/ath_rate/sample/sample.c Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/dev/ath/ath_rate/sample/sample.c Fri Feb 18 20:25:30 2011 (r218817) @@ -426,18 +426,19 @@ update_stats(struct ath_softc *sc, struc const int size_bin = size_to_bin(frame_size); const int size = bin_to_size(size_bin); int tt, tries_so_far; + int is_ht40 = (an->an_node.ni_htcap & IEEE80211_HTCAP_CHWIDTH40); if (!IS_RATE_DEFINED(sn, rix0)) return; tt = calc_usecs_unicast_packet(sc, size, rix0, short_tries, - MIN(tries0, tries) - 1); + MIN(tries0, tries) - 1, is_ht40); tries_so_far = tries0; if (tries1 && tries_so_far < tries) { if (!IS_RATE_DEFINED(sn, rix1)) return; tt += calc_usecs_unicast_packet(sc, size, rix1, short_tries, - MIN(tries1 + tries_so_far, tries) - tries_so_far - 1); + MIN(tries1 + tries_so_far, tries) - tries_so_far - 1, is_ht40); tries_so_far += tries1; } @@ -445,7 +446,7 @@ update_stats(struct ath_softc *sc, struc if (!IS_RATE_DEFINED(sn, rix2)) return; tt += calc_usecs_unicast_packet(sc, size, rix2, short_tries, - MIN(tries2 + tries_so_far, tries) - tries_so_far - 1); + MIN(tries2 + tries_so_far, tries) - tries_so_far - 1, is_ht40); tries_so_far += tries2; } @@ -453,7 +454,7 @@ update_stats(struct ath_softc *sc, struc if (!IS_RATE_DEFINED(sn, rix3)) return; tt += calc_usecs_unicast_packet(sc, size, rix3, short_tries, - MIN(tries3 + tries_so_far, tries) - tries_so_far - 1); + MIN(tries3 + tries_so_far, tries) - tries_so_far - 1, is_ht40); } if (sn->stats[size_bin][rix0].total_packets < ssc->smoothing_minpackets) { @@ -765,7 +766,8 @@ ath_rate_ctl_reset(struct ath_softc *sc, if ((mask & 1) == 0) continue; printf(" %d/%d", dot11rate(rt, rix), - calc_usecs_unicast_packet(sc, 1600, rix, 0,0)); + calc_usecs_unicast_packet(sc, 1600, rix, 0,0, + (ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40))); } printf("\n"); } @@ -794,7 +796,8 @@ ath_rate_ctl_reset(struct ath_softc *sc, sn->stats[y][rix].last_tx = 0; sn->stats[y][rix].perfect_tx_time = - calc_usecs_unicast_packet(sc, size, rix, 0, 0); + calc_usecs_unicast_packet(sc, size, rix, 0, 0, + (ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40)); sn->stats[y][rix].average_tx_time = sn->stats[y][rix].perfect_tx_time; } Modified: projects/binutils-2.17/sys/dev/ath/ath_rate/sample/sample.h ============================================================================== --- projects/binutils-2.17/sys/dev/ath/ath_rate/sample/sample.h Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/dev/ath/ath_rate/sample/sample.h Fri Feb 18 20:25:30 2011 (r218817) @@ -115,7 +115,9 @@ struct sample_node { */ static unsigned calc_usecs_unicast_packet(struct ath_softc *sc, int length, - int rix, int short_retries, int long_retries) { + int rix, int short_retries, + int long_retries, int is_ht40) +{ const HAL_RATE_TABLE *rt = sc->sc_currates; struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; @@ -198,7 +200,7 @@ static unsigned calc_usecs_unicast_packe /* XXX assumes short preamble */ /* XXX assumes HT/20; the node info isn't yet available here */ - ctsduration += ath_hal_pkt_txtime(sc->sc_ah, rt, length, rix, 0, AH_TRUE); + ctsduration += ath_hal_pkt_txtime(sc->sc_ah, rt, length, rix, 0, is_ht40); if (cts) /* SIFS + ACK */ ctsduration += rt->info[cix].spAckDuration; @@ -209,7 +211,7 @@ static unsigned calc_usecs_unicast_packe /* XXX assumes short preamble */ /* XXX assumes HT/20; the node info isn't yet available here */ - tt += (long_retries+1)*ath_hal_pkt_txtime(sc->sc_ah, rt, length, rix, 0, AH_TRUE); + tt += (long_retries+1)*ath_hal_pkt_txtime(sc->sc_ah, rt, length, rix, 0, is_ht40); tt += (long_retries+1)*(t_sifs + rt->info[rix].spAckDuration); for (x = 0; x <= short_retries + long_retries; x++) { Modified: projects/binutils-2.17/sys/dev/ath/if_ath.c ============================================================================== --- projects/binutils-2.17/sys/dev/ath/if_ath.c Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/dev/ath/if_ath.c Fri Feb 18 20:25:30 2011 (r218817) @@ -635,7 +635,10 @@ ath_attach(u_int16_t devid, struct ath_s | IEEE80211_HTC_AMPDU /* A-MPDU tx/rx */ | IEEE80211_HTC_AMSDU /* A-MSDU tx/rx */ | IEEE80211_HTCAP_MAXAMSDU_3839 /* max A-MSDU length */ + /* At the present time, the hardware doesn't support short-GI in 20mhz mode */ +#if 0 | IEEE80211_HTCAP_SHORTGI20 /* short GI in 20MHz */ +#endif | IEEE80211_HTCAP_SMPS_OFF; /* SM power save off */ ; Modified: projects/binutils-2.17/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- projects/binutils-2.17/sys/dev/ath/if_ath_tx_ht.c Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/dev/ath/if_ath_tx_ht.c Fri Feb 18 20:25:30 2011 (r218817) @@ -119,8 +119,13 @@ ath_rateseries_setup(struct ath_softc *s series[i].RateFlags |= HAL_RATESERIES_RTS_CTS; if (ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40) series[i].RateFlags |= HAL_RATESERIES_2040; - if (ni->ni_htcap & IEEE80211_HTCAP_SHORTGI20 || - ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40) + + /* + * The hardware only supports short-gi in 40mhz mode - + * if later hardware supports it in 20mhz mode, be sure + * to add the relevant check here. + */ + if (ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40) series[i].RateFlags |= HAL_RATESERIES_HALFGI; /* XXX should this check the short preamble value should be set for legacy rates? -adrian */ Modified: projects/binutils-2.17/sys/dev/dc/if_dc.c ============================================================================== --- projects/binutils-2.17/sys/dev/dc/if_dc.c Fri Feb 18 19:07:16 2011 (r218816) +++ projects/binutils-2.17/sys/dev/dc/if_dc.c Fri Feb 18 20:25:30 2011 (r218817) @@ -287,11 +287,11 @@ static void dc_reset(struct dc_softc *); static int dc_list_rx_init(struct dc_softc *); static int dc_list_tx_init(struct dc_softc *); -static void dc_read_srom(struct dc_softc *, int); -static void dc_parse_21143_srom(struct dc_softc *); -static void dc_decode_leaf_sia(struct dc_softc *, struct dc_eblock_sia *); -static void dc_decode_leaf_mii(struct dc_softc *, struct dc_eblock_mii *); -static void dc_decode_leaf_sym(struct dc_softc *, struct dc_eblock_sym *); +static int dc_read_srom(struct dc_softc *, int); +static int dc_parse_21143_srom(struct dc_softc *); +static int dc_decode_leaf_sia(struct dc_softc *, struct dc_eblock_sia *); +static int dc_decode_leaf_mii(struct dc_softc *, struct dc_eblock_mii *); +static int dc_decode_leaf_sym(struct dc_softc *, struct dc_eblock_sym *); static void dc_apply_fixup(struct dc_softc *, int); static int dc_check_multiport(struct dc_softc *); @@ -944,23 +944,45 @@ static void dc_miibus_statchg(device_t dev) { struct dc_softc *sc; + struct ifnet *ifp; struct mii_data *mii; struct ifmedia *ifm; sc = device_get_softc(dev); - if (DC_IS_ADMTEK(sc)) - return; mii = device_get_softc(sc->dc_miibus); + ifp = sc->dc_ifp; + if (mii == NULL || ifp == NULL || + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; + ifm = &mii->mii_media; if (DC_IS_DAVICOM(sc) && IFM_SUBTYPE(ifm->ifm_media) == IFM_HPNA_1) { dc_setcfg(sc, ifm->ifm_media); sc->dc_if_media = ifm->ifm_media; - } else { - dc_setcfg(sc, mii->mii_media_active); - sc->dc_if_media = mii->mii_media_active; + return; + } + + sc->dc_link = 0; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: + sc->dc_link = 1; + break; + default: + break; + } } + if (sc->dc_link == 0) + return; + + sc->dc_if_media = mii->mii_media_active; + if (DC_IS_ADMTEK(sc)) + return; + dc_setcfg(sc, mii->mii_media_active); } /* @@ -1404,8 +1426,6 @@ dc_setcfg(struct dc_softc *sc, int media if (!DC_IS_DAVICOM(sc)) DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_PORTSEL); DC_CLRBIT(sc, DC_10BTCTRL, 0xFFFF); - if (DC_IS_INTEL(sc)) - dc_apply_fixup(sc, IFM_AUTO); } else { if (DC_IS_PNIC(sc)) { DC_PN_GPIO_SETBIT(sc, DC_PN_GPIO_SPEEDSEL); @@ -1415,10 +1435,6 @@ dc_setcfg(struct dc_softc *sc, int media DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_PORTSEL); DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_PCS); DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_SCRAMBLER); - if (DC_IS_INTEL(sc)) - dc_apply_fixup(sc, - (media & IFM_GMASK) == IFM_FDX ? - IFM_100_TX | IFM_FDX : IFM_100_TX); } } @@ -1442,8 +1458,6 @@ dc_setcfg(struct dc_softc *sc, int media if (!DC_IS_DAVICOM(sc)) DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_PORTSEL); DC_CLRBIT(sc, DC_10BTCTRL, 0xFFFF); - if (DC_IS_INTEL(sc)) - dc_apply_fixup(sc, IFM_AUTO); } else { if (DC_IS_PNIC(sc)) { DC_PN_GPIO_CLRBIT(sc, DC_PN_GPIO_SPEEDSEL); @@ -1463,9 +1477,6 @@ dc_setcfg(struct dc_softc *sc, int media DC_SETBIT(sc, DC_SIARESET, DC_SIA_RESET); DC_CLRBIT(sc, DC_10BTCTRL, DC_TCTL_AUTONEGENBL); - dc_apply_fixup(sc, - (media & IFM_GMASK) == IFM_FDX ? - IFM_10_T | IFM_FDX : IFM_10_T); DELAY(20000); } } @@ -1537,7 +1548,7 @@ dc_reset(struct dc_softc *sc) */ if (DC_IS_INTEL(sc)) { DC_SETBIT(sc, DC_SIARESET, DC_SIA_RESET); - CSR_WRITE_4(sc, DC_10BTCTRL, 0); + CSR_WRITE_4(sc, DC_10BTCTRL, 0xFFFFFFFF); CSR_WRITE_4(sc, DC_WATCHDOG, 0); } } @@ -1616,12 +1627,16 @@ dc_apply_fixup(struct dc_softc *sc, int } } -static void +static int dc_decode_leaf_sia(struct dc_softc *sc, struct dc_eblock_sia *l) { struct dc_mediainfo *m; m = malloc(sizeof(struct dc_mediainfo), M_DEVBUF, M_NOWAIT | M_ZERO); + if (m == NULL) { + device_printf(sc->dc_dev, "Could not allocate mediainfo\n"); + return (ENOMEM); + } switch (l->dc_sia_code & ~DC_SIA_CODE_EXT) { case DC_SIA_CODE_10BT: m->dc_media = IFM_10_T; @@ -1658,14 +1673,19 @@ dc_decode_leaf_sia(struct dc_softc *sc, sc->dc_mi = m; sc->dc_pmode = DC_PMODE_SIA; + return (0); } -static void +static int dc_decode_leaf_sym(struct dc_softc *sc, struct dc_eblock_sym *l) { struct dc_mediainfo *m; m = malloc(sizeof(struct dc_mediainfo), M_DEVBUF, M_NOWAIT | M_ZERO); + if (m == NULL) { + device_printf(sc->dc_dev, "Could not allocate mediainfo\n"); + return (ENOMEM); + } if (l->dc_sym_code == DC_SYM_CODE_100BT) m->dc_media = IFM_100_TX; @@ -1679,15 +1699,20 @@ dc_decode_leaf_sym(struct dc_softc *sc, sc->dc_mi = m; sc->dc_pmode = DC_PMODE_SYM; + return (0); } -static void +static int dc_decode_leaf_mii(struct dc_softc *sc, struct dc_eblock_mii *l) { struct dc_mediainfo *m; u_int8_t *p; m = malloc(sizeof(struct dc_mediainfo), M_DEVBUF, M_NOWAIT | M_ZERO); + if (m == NULL) { + device_printf(sc->dc_dev, "Could not allocate mediainfo\n"); + return (ENOMEM); + } /* We abuse IFM_AUTO to represent MII. */ m->dc_media = IFM_AUTO; m->dc_gp_len = l->dc_gpr_len; @@ -1702,24 +1727,30 @@ dc_decode_leaf_mii(struct dc_softc *sc, m->dc_next = sc->dc_mi; sc->dc_mi = m; + return (0); } -static void +static int dc_read_srom(struct dc_softc *sc, int bits) { int size; - size = 2 << bits; + size = DC_ROM_SIZE(bits); sc->dc_srom = malloc(size, M_DEVBUF, M_NOWAIT); + if (sc->dc_srom == NULL) { + device_printf(sc->dc_dev, "Could not allocate SROM buffer\n"); + return (ENOMEM); + } dc_read_eeprom(sc, (caddr_t)sc->dc_srom, 0, (size / 2), 0); + return (0); } -static void +static int dc_parse_21143_srom(struct dc_softc *sc) { struct dc_leaf_hdr *lhdr; struct dc_eblock_hdr *hdr; - int have_mii, i, loff; + int error, have_mii, i, loff; char *ptr; have_mii = 0; @@ -1746,20 +1777,21 @@ dc_parse_21143_srom(struct dc_softc *sc) */ ptr = (char *)lhdr; ptr += sizeof(struct dc_leaf_hdr) - 1; + error = 0; for (i = 0; i < lhdr->dc_mcnt; i++) { hdr = (struct dc_eblock_hdr *)ptr; switch (hdr->dc_type) { case DC_EBLOCK_MII: - dc_decode_leaf_mii(sc, (struct dc_eblock_mii *)hdr); + error = dc_decode_leaf_mii(sc, (struct dc_eblock_mii *)hdr); break; case DC_EBLOCK_SIA: if (! have_mii) - dc_decode_leaf_sia(sc, + error = dc_decode_leaf_sia(sc, (struct dc_eblock_sia *)hdr); break; case DC_EBLOCK_SYM: if (! have_mii) - dc_decode_leaf_sym(sc, + error = dc_decode_leaf_sym(sc, (struct dc_eblock_sym *)hdr); break; default: @@ -1769,6 +1801,7 @@ dc_parse_21143_srom(struct dc_softc *sc) ptr += (hdr->dc_len & 0x7F); ptr++; } + return (error); } static void @@ -1793,6 +1826,7 @@ dc_attach(device_t dev) u_int32_t command; struct dc_softc *sc; struct ifnet *ifp; + struct dc_mediainfo *m; u_int32_t reg, revision; int error, i, mac_offset, phy, rid, tmp; u_int8_t *mac; @@ -1835,6 +1869,7 @@ dc_attach(device_t dev) sc->dc_info = dc_devtype(dev); revision = pci_get_revid(dev); + error = 0; /* Get the eeprom width, but PNIC and XIRCOM have diff eeprom */ if (sc->dc_info->dc_devid != DC_DEVID(DC_VENDORID_LO, DC_DEVICEID_82C168) && @@ -1848,7 +1883,9 @@ dc_attach(device_t dev) sc->dc_flags |= DC_TX_POLL | DC_TX_USE_TX_INTR; sc->dc_flags |= DC_REDUCED_MII_POLL; /* Save EEPROM contents so we can parse them later. */ - dc_read_srom(sc, sc->dc_romwidth); + error = dc_read_srom(sc, sc->dc_romwidth); + if (error != 0) + goto fail; break; case DC_DEVID(DC_VENDORID_DAVICOM, DC_DEVICEID_DM9009): case DC_DEVID(DC_VENDORID_DAVICOM, DC_DEVICEID_DM9100): @@ -1867,7 +1904,9 @@ dc_attach(device_t dev) sc->dc_flags |= DC_TX_USE_TX_INTR; sc->dc_flags |= DC_TX_ADMTEK_WAR; sc->dc_pmode = DC_PMODE_MII; - dc_read_srom(sc, sc->dc_romwidth); + error = dc_read_srom(sc, sc->dc_romwidth); + if (error != 0) + goto fail; break; case DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_AN983): case DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_AN985): @@ -1934,6 +1973,12 @@ dc_attach(device_t dev) sc->dc_flags |= DC_TX_STORENFWD | DC_TX_INTR_ALWAYS; sc->dc_flags |= DC_PNIC_RX_BUG_WAR; sc->dc_pnic_rx_buf = malloc(DC_RXLEN * 5, M_DEVBUF, M_NOWAIT); + if (sc->dc_pnic_rx_buf == NULL) { + device_printf(sc->dc_dev, + "Could not allocate PNIC RX buffer\n"); + error = ENOMEM; + goto fail; + } if (revision < DC_REVISION_82C169) sc->dc_pmode = DC_PMODE_SYM; break; @@ -1959,7 +2004,9 @@ dc_attach(device_t dev) sc->dc_flags |= DC_TX_INTR_ALWAYS; sc->dc_flags |= DC_REDUCED_MII_POLL; sc->dc_pmode = DC_PMODE_MII; - dc_read_srom(sc, sc->dc_romwidth); + error = dc_read_srom(sc, sc->dc_romwidth); + if (error != 0) + goto fail; break; default: device_printf(dev, "unknown device: %x\n", @@ -1990,9 +2037,11 @@ dc_attach(device_t dev) * The tricky ones are the Macronix/PNIC II and the * Intel 21143. */ - if (DC_IS_INTEL(sc)) - dc_parse_21143_srom(sc); - else if (DC_IS_MACRONIX(sc) || DC_IS_PNICII(sc)) { + if (DC_IS_INTEL(sc)) { + error = dc_parse_21143_srom(sc); + if (error != 0) + goto fail; + } else if (DC_IS_MACRONIX(sc) || DC_IS_PNICII(sc)) { if (sc->dc_type == DC_TYPE_98713) sc->dc_pmode = DC_PMODE_MII; else @@ -2071,8 +2120,24 @@ dc_attach(device_t dev) if ((sc->dc_eaddr[0] == 0 && (sc->dc_eaddr[1] & ~0xffff) == 0) || (sc->dc_eaddr[0] == 0xffffffff && (sc->dc_eaddr[1] & 0xffff) == 0xffff)) { - if (dc_check_multiport(sc) == 0) + error = dc_check_multiport(sc); *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***