PERFORCE change 32631 for review
Marcel Moolenaar
marcel at FreeBSD.org
Thu Jun 5 12:44:46 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=32631
Change 32631 by marcel at marcel_nfs on 2003/06/05 12:44:35
IFC @32630
Affected files ...
.. //depot/projects/ia64/MAINTAINERS#27 integrate
.. //depot/projects/ia64/gnu/usr.bin/groff/tmac/mdoc.local#14 integrate
.. //depot/projects/ia64/lib/libmd/md2c.c#2 integrate
.. //depot/projects/ia64/lib/libmd/md4c.c#2 integrate
.. //depot/projects/ia64/lib/libmd/md5c.c#4 integrate
.. //depot/projects/ia64/release/Makefile#55 integrate
.. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#55 integrate
.. //depot/projects/ia64/share/man/man9/Makefile#25 integrate
.. //depot/projects/ia64/share/man/man9/VOP_GETEXTATTR.9#9 integrate
.. //depot/projects/ia64/share/man/man9/VOP_LISTEXTATTR.9#1 branch
.. //depot/projects/ia64/share/man/man9/VOP_SETEXTATTR.9#6 integrate
.. //depot/projects/ia64/share/man/man9/extattr.9#5 integrate
.. //depot/projects/ia64/sys/amd64/amd64/vm_machdep.c#4 integrate
.. //depot/projects/ia64/sys/dev/em/README#7 integrate
.. //depot/projects/ia64/sys/dev/em/if_em.c#23 integrate
.. //depot/projects/ia64/sys/dev/em/if_em.h#14 integrate
.. //depot/projects/ia64/sys/dev/em/if_em_hw.c#9 integrate
.. //depot/projects/ia64/sys/dev/em/if_em_hw.h#10 integrate
.. //depot/projects/ia64/sys/dev/hifn/hifn7751.c#10 integrate
.. //depot/projects/ia64/sys/kern/vfs_syscalls.c#44 integrate
.. //depot/projects/ia64/sys/kern/vnode_if.src#12 integrate
.. //depot/projects/ia64/sys/nfsserver/nfs_syscalls.c#14 integrate
.. //depot/projects/ia64/sys/ufs/ffs/ffs_vnops.c#27 integrate
.. //depot/projects/ia64/sys/ufs/ufs/ufs_extattr.c#17 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/tbmaster.pl#12 integrate
.. //depot/projects/ia64/usr.bin/sed/process.c#14 integrate
.. //depot/projects/ia64/usr.sbin/extattr/rmextattr.c#3 integrate
.. //depot/projects/ia64/usr.sbin/ntp/Makefile#4 integrate
.. //depot/projects/ia64/usr.sbin/ntp/Makefile.inc#3 integrate
Differences ...
==== //depot/projects/ia64/MAINTAINERS#27 (text+ko) ====
@@ -1,4 +1,4 @@
-$FreeBSD: src/MAINTAINERS,v 1.64 2003/06/04 16:05:38 markm Exp $
+$FreeBSD: src/MAINTAINERS,v 1.65 2003/06/05 05:03:01 roberto Exp $
subsystem login notes
-----------------------------
@@ -79,6 +79,7 @@
libc nectar Opportuntity for pre-commit review appreciated for
nsdispatch(3) and its consumers.
unifdef(1) fanf Pre-commit review requested.
+ntp roberto Pre-commit review requested.
Following are the entries from the Makefiles, and a few other sources.
Please remove stale entries from both their origin, and this file.
@@ -169,8 +170,6 @@
usr.sbin/lpr/Makefile:MAINTAINER+= gad at FreeBSD.org
usr.sbin/mailstats/Makefile:MAINTAINER= gshapiro at FreeBSD.org
usr.sbin/makemap/Makefile:MAINTAINER= gshapiro at FreeBSD.org
-usr.sbin/ntp/Makefile:MAINTAINER= roberto at FreeBSD.org
-usr.sbin/ntp/Makefile.inc:MAINTAINER= roberto at FreeBSD.org
usr.sbin/ntp/doc/Makefile:MAINTAINER= sheldonh at FreeBSD.org
usr.sbin/pppd/Makefile:MAINTAINER= peter at freebsd.org
usr.sbin/pppstats/Makefile:MAINTAINER= peter at freebsd.org
==== //depot/projects/ia64/gnu/usr.bin/groff/tmac/mdoc.local#14 (text+ko) ====
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.25 2003/06/02 18:43:15 ru Exp $
+.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.26 2003/06/05 13:18:43 ru Exp $
.\"
.\" %beginstrip%
.
@@ -52,7 +52,7 @@
.ds doc-str-Lb-libvgl Video Graphics Library (libvgl, \-lvgl)
.
.\" Default .Os value
-.ds doc-operating-system FreeBSD\~5.0
+.ds doc-operating-system FreeBSD\~5.1
.
.\" FreeBSD releases not found in doc-common
.ds doc-operating-system-FreeBSD-4.9 4.9
==== //depot/projects/ia64/lib/libmd/md2c.c#2 (text+ko) ====
@@ -2,7 +2,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libmd/md2c.c,v 1.9 2001/09/30 21:56:22 dillon Exp $");
+__FBSDID("$FreeBSD: src/lib/libmd/md2c.c,v 1.10 2003/06/05 13:17:32 markm Exp $");
/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
rights reserved.
@@ -104,32 +104,32 @@
const unsigned char *input; /* input block */
unsigned int inputLen; /* length of input block */
{
- unsigned int i, index, partLen;
+ unsigned int i, idx, partLen;
/* Update number of bytes mod 16 */
- index = context->count;
- context->count = (index + inputLen) & 0xf;
+ idx = context->count;
+ context->count = (idx + inputLen) & 0xf;
- partLen = 16 - index;
+ partLen = 16 - idx;
/* Transform as many times as possible.
*/
if (inputLen >= partLen) {
memcpy
- ((POINTER)&context->buffer[index], (POINTER)input, partLen);
+ ((POINTER)&context->buffer[idx], (POINTER)input, partLen);
MD2Transform (context->state, context->checksum, context->buffer);
for (i = partLen; i + 15 < inputLen; i += 16)
MD2Transform (context->state, context->checksum, &input[i]);
- index = 0;
+ idx = 0;
}
else
i = 0;
/* Buffer remaining input */
memcpy
- ((POINTER)&context->buffer[index], (POINTER)&input[i],
+ ((POINTER)&context->buffer[idx], (POINTER)&input[i],
inputLen-i);
}
@@ -138,12 +138,12 @@
void MD2Pad (context)
MD2_CTX *context; /* context */
{
- unsigned int index, padLen;
+ unsigned int idx, padLen;
/* Pad out to multiple of 16.
*/
- index = context->count;
- padLen = 16 - index;
+ idx = context->count;
+ padLen = 16 - idx;
MD2Update (context, PADDING[padLen], padLen);
/* Extend with checksum */
==== //depot/projects/ia64/lib/libmd/md4c.c#2 (text+ko) ====
@@ -2,7 +2,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libmd/md4c.c,v 1.8 2001/09/30 21:56:22 dillon Exp $");
+__FBSDID("$FreeBSD: src/lib/libmd/md4c.c,v 1.9 2003/06/05 13:17:32 markm Exp $");
/* Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved.
@@ -30,6 +30,7 @@
#include "md4.h"
typedef unsigned char *POINTER;
+typedef const unsigned char *CONST_POINTER;
typedef u_int16_t UINT2;
typedef u_int32_t UINT4;
@@ -111,35 +112,35 @@
const unsigned char *input; /* input block */
unsigned int inputLen; /* length of input block */
{
- unsigned int i, index, partLen;
+ unsigned int i, idx, partLen;
/* Compute number of bytes mod 64 */
- index = (unsigned int)((context->count[0] >> 3) & 0x3F);
+ idx = (unsigned int)((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
if ((context->count[0] += ((UINT4)inputLen << 3))
< ((UINT4)inputLen << 3))
context->count[1]++;
context->count[1] += ((UINT4)inputLen >> 29);
- partLen = 64 - index;
+ partLen = 64 - idx;
/* Transform as many times as possible.
*/
if (inputLen >= partLen) {
memcpy
- ((POINTER)&context->buffer[index], (POINTER)input, partLen);
+ ((POINTER)&context->buffer[idx], (CONST_POINTER)input, partLen);
MD4Transform (context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
MD4Transform (context->state, &input[i]);
- index = 0;
+ idx = 0;
}
else
i = 0;
/* Buffer remaining input */
memcpy
- ((POINTER)&context->buffer[index], (POINTER)&input[i],
+ ((POINTER)&context->buffer[idx], (CONST_POINTER)&input[i],
inputLen-i);
}
@@ -148,15 +149,15 @@
MD4_CTX *context; /* context */
{
unsigned char bits[8];
- unsigned int index, padLen;
+ unsigned int idx, padLen;
/* Save number of bits */
Encode (bits, context->count, 8);
/* Pad out to 56 mod 64.
*/
- index = (unsigned int)((context->count[0] >> 3) & 0x3f);
- padLen = (index < 56) ? (56 - index) : (120 - index);
+ idx = (unsigned int)((context->count[0] >> 3) & 0x3f);
+ padLen = (idx < 56) ? (56 - idx) : (120 - idx);
MD4Update (context, PADDING, padLen);
/* Append length (before padding) */
==== //depot/projects/ia64/lib/libmd/md5c.c#4 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libmd/md5c.c,v 1.15 2002/06/24 13:52:26 mux Exp $");
+__FBSDID("$FreeBSD: src/lib/libmd/md5c.c,v 1.16 2003/06/05 13:17:32 markm Exp $");
#include <sys/types.h>
@@ -152,10 +152,10 @@
const unsigned char *input;
unsigned int inputLen;
{
- unsigned int i, index, partLen;
+ unsigned int i, idx, partLen;
/* Compute number of bytes mod 64 */
- index = (unsigned int)((context->count[0] >> 3) & 0x3F);
+ idx = (unsigned int)((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
if ((context->count[0] += ((u_int32_t)inputLen << 3))
@@ -163,24 +163,24 @@
context->count[1]++;
context->count[1] += ((u_int32_t)inputLen >> 29);
- partLen = 64 - index;
+ partLen = 64 - idx;
/* Transform as many times as possible. */
if (inputLen >= partLen) {
- memcpy((void *)&context->buffer[index], (const void *)input,
+ memcpy((void *)&context->buffer[idx], (const void *)input,
partLen);
MD5Transform (context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
MD5Transform (context->state, &input[i]);
- index = 0;
+ idx = 0;
}
else
i = 0;
/* Buffer remaining input */
- memcpy ((void *)&context->buffer[index], (const void *)&input[i],
+ memcpy ((void *)&context->buffer[idx], (const void *)&input[i],
inputLen-i);
}
@@ -193,14 +193,14 @@
MD5_CTX *context;
{
unsigned char bits[8];
- unsigned int index, padLen;
+ unsigned int idx, padLen;
/* Save number of bits */
Encode (bits, context->count, 8);
/* Pad out to 56 mod 64. */
- index = (unsigned int)((context->count[0] >> 3) & 0x3f);
- padLen = (index < 56) ? (56 - index) : (120 - index);
+ idx = (unsigned int)((context->count[0] >> 3) & 0x3f);
+ padLen = (idx < 56) ? (56 - idx) : (120 - idx);
MD5Update (context, PADDING, padLen);
/* Append length (before padding) */
==== //depot/projects/ia64/release/Makefile#55 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/release/Makefile,v 1.781 2003/06/04 05:17:18 marcel Exp $
+# $FreeBSD: src/release/Makefile,v 1.782 2003/06/04 22:24:43 peter Exp $
#
# make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \
# [RELEASETAG=tag]
@@ -694,7 +694,7 @@
.if ${TARGET_ARCH} != "ia64"
@cp ${RD}/trees/base/boot/boot* ${RD}/mfsfd/boot
.endif
-.if ${TARGET} == "i386"
+.if ${TARGET} == "i386" || ${TARGET_ARCH} == "amd64"
@cp ${RD}/trees/base/boot/mbr ${RD}/mfsfd/boot
.endif
@echo "Making the regular boot floppy."
==== //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#55 (text+ko) ====
@@ -31,7 +31,7 @@
<sect1 id="support">
<sect1info>
- <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.157 2003/05/30 11:24:00 nyan Exp $</pubdate>
+ <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.158 2003/06/05 15:13:46 bmah Exp $</pubdate>
</sect1info>
<title>Supported Devices</title>
@@ -155,7 +155,7 @@
driver)</para>
</listitem>
<listitem arch="i386,alpha,sparc64">
- <para>Adaptec 19160/291x/2920/2930/2940/2950/29160/3940/3950/3960/39160/398x/494x
+ <para>Adaptec 19160/291x/2920C/2930/2940/2950/29160/3940/3950/3960/39160/398x/494x
series PCI SCSI controllers, including
Narrow/Wide/Twin/Ultra/Ultra2 variants (&man.ahc.4;
driver)</para>
@@ -727,12 +727,18 @@
</itemizedlist>
</para>
- <para arch="i386,pc98">TMC 18C30, 18C50 based ISA/PC-Card SCSI host
+ <para arch="i386,pc98">TMC 18C30, 18C50 and 36C70 (AIC-6820) based ISA/PC-Card SCSI host
adapters (stg driver)
<itemizedlist>
<listitem>
+ <para>Adaptec 2920/A</para>
+ </listitem>
+ <listitem>
<para>Future Domain SCSI2GO</para>
</listitem>
+ <listitem>
+ <para>Future Domain TMC-18XX/3260</para>
+ </listitem>
<listitem>
<para>IBM SCSI PCMCIA Card</para>
</listitem>
==== //depot/projects/ia64/share/man/man9/Makefile#25 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/share/man/man9/Makefile,v 1.192 2003/05/30 22:57:54 hmp Exp $
+# $FreeBSD: src/share/man/man9/Makefile,v 1.193 2003/06/05 14:20:48 rwatson Exp $
MAN= BUF_LOCK.9 BUF_LOCKFREE.9 BUF_LOCKINIT.9 BUF_REFCNT.9 \
BUF_TIMELOCK.9 BUF_UNLOCK.9 BUS_PRINT_CHILD.9 BUS_READ_IVAR.9 \
@@ -15,8 +15,8 @@
VOP_ACLCHECK.9 VOP_ADVLOCK.9 VOP_ATTRIB.9 VOP_BWRITE.9 \
VOP_CREATE.9 VOP_FSYNC.9 VOP_GETACL.9 VOP_GETEXTATTR.9 \
VOP_GETPAGES.9 VOP_GETVOBJECT.9 VOP_INACTIVE.9 VOP_IOCTL.9 \
- VOP_LEASE.9 VOP_LINK.9 VOP_LOCK.9 VOP_LOOKUP.9 VOP_OPENCLOSE.9 \
- VOP_PATHCONF.9 VOP_PRINT.9 VOP_RDWR.9 VOP_READDIR.9 \
+ VOP_LEASE.9 VOP_LINK.9 VOP_LISTEXTATTR.9 VOP_LOCK.9 VOP_LOOKUP.9 \
+ VOP_OPENCLOSE.9 VOP_PATHCONF.9 VOP_PRINT.9 VOP_RDWR.9 VOP_READDIR.9 \
VOP_READLINK.9 VOP_REALLOCBLKS.9 VOP_REMOVE.9 VOP_RENAME.9 \
VOP_REVOKE.9 VOP_SETACL.9 VOP_SETEXTATTR.9 VOP_STRATEGY.9 \
accept_filter.9 accf_data.9 accf_http.9 acl.9 atomic.9 \
==== //depot/projects/ia64/share/man/man9/VOP_GETEXTATTR.9#9 (text+ko) ====
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man9/VOP_GETEXTATTR.9,v 1.17 2003/06/04 04:03:58 rwatson Exp $
+.\" $FreeBSD: src/share/man/man9/VOP_GETEXTATTR.9,v 1.19 2003/06/05 14:20:48 rwatson Exp $
.\"
.Dd December 23, 1999
.Os
@@ -98,8 +98,8 @@
reflect data read. Otherwise, an appropriate error code is returned.
.Sh ERRORS
.Bl -tag -width Er
-.It Bq Er ENOENT
-The attribute name is not defined for this vnode.
+.It Bq Er ENOATTR
+The requested attribute was not defined for this vnode.
.It Bq Er EACCES
The the caller does not have the appropriate privilege.
.It Bq Er ENXIO
@@ -111,7 +111,8 @@
The uio structure refers to an invalid userspace address.
.It Bq Er EINVAL
The
-.Fa name
+.Fa name ,
+.Fa namespace,
or
.Fa uio
argument is invalid.
@@ -122,6 +123,7 @@
.Sh SEE ALSO
.Xr extattr 9 ,
.Xr vnode 9 ,
+.Xr VOP_LISTEXTATTR 9
.Xr VOP_SETEXTATTR 9
.Sh BUGS
By passing in the empty string as the attribute name, some file systems
==== //depot/projects/ia64/share/man/man9/VOP_SETEXTATTR.9#6 (text+ko) ====
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man9/VOP_SETEXTATTR.9,v 1.14 2002/12/12 17:25:58 ru Exp $
+.\" $FreeBSD: src/share/man/man9/VOP_SETEXTATTR.9,v 1.16 2003/06/05 14:20:48 rwatson Exp $
.\"
.Dd December 23, 1999
.Os
@@ -100,7 +100,7 @@
.It Bq Er EFAULT
The uio structure refers to an invalid userspace address.
.It Bq Er EINVAL
-The name or uio argument is invalid.
+The name, namespace, or uio argument is invalid.
.It Bq Er EOPNOTSUPP
The file system does not support
.Fn VOP_SETEXTATTR .
@@ -113,6 +113,7 @@
.Xr extattr 9 ,
.Xr vnode 9 ,
.Xr VOP_GETEXTATTR 9
+.Xr VOP_LISTEXTATTR 9
.Sh AUTHORS
This man page was written by
.An Robert Watson .
==== //depot/projects/ia64/share/man/man9/extattr.9#5 (text+ko) ====
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man9/extattr.9,v 1.12 2003/06/04 04:01:44 rwatson Exp $
+.\" $FreeBSD: src/share/man/man9/extattr.9,v 1.13 2003/06/05 14:20:48 rwatson Exp $
.\"
.Dd December 23, 1999
.Os
@@ -73,13 +73,15 @@
Extended attributes are named using a null-terminated character string.
Depending on underlying file system semantics, this name may or may not be
case-sensitive. Appropriate vnode extended attribute calls are:
-.Xr VOP_GETEXTATTR 9
+.Xr VOP_GETEXTATTR 9 ,
+.Xr VOP_LISTEXTATTR 9 ,
and
.Xr VOP_SETEXTATTR 9 .
.Sh SEE ALSO
.Xr VFS 9 ,
.Xr VFS_EXTATTRCTL 9 ,
.Xr VOP_GETEXTATTR 9 ,
+.Xr VOP_LISTEXTATTR 9 ,
.Xr VOP_SETEXTATTR 9
.Sh AUTHORS
This man page was written by
==== //depot/projects/ia64/sys/amd64/amd64/vm_machdep.c#4 (text+ko) ====
@@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.209 2003/05/23 05:04:54 peter Exp $
+ * $FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.210 2003/06/04 22:46:27 marcel Exp $
*/
#include "opt_isa.h"
@@ -219,7 +219,7 @@
* such as those generated in thread_userret() itself.
*/
void
-cpu_set_upcall(struct thread *td, void *pcb)
+cpu_set_upcall(struct thread *td, struct thread *td0)
{
}
==== //depot/projects/ia64/sys/dev/em/README#7 (text+ko) ====
@@ -1,8 +1,8 @@
-$FreeBSD: src/sys/dev/em/README,v 1.6 2003/03/21 21:47:30 pdeuskar Exp $
+$FreeBSD: src/sys/dev/em/README,v 1.7 2003/06/05 17:51:37 pdeuskar Exp $
FreeBSD* Driver for the Intel(R) PRO/1000 Family of Adapters
============================================================
-February 5, 2003
+April 13, 2003
Contents
@@ -65,6 +65,8 @@
82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx
+ 82546EB PRO/1000 MT Quad Port Server Adapter C11227-xxx
+
To verify your Intel adapter is supported, find the board ID number on the
@@ -126,7 +128,7 @@
cp if_em* /usr/src/sys/dev/em
- cp Makefile /usr/src/sys/modules/em
+ cp Makefile.kernel /usr/src/sys/modules/em/Makefile
Edit the /usr/src/sys/conf/files.i386 file, and add the following lines:
==== //depot/projects/ia64/sys/dev/em/if_em.c#23 (text+ko) ====
@@ -31,7 +31,7 @@
***************************************************************************/
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.25 2003/05/06 03:55:12 des Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.26 2003/06/05 17:51:37 pdeuskar Exp $*/
#include <dev/em/if_em.h>
@@ -51,7 +51,7 @@
* Driver version
*********************************************************************/
-char em_driver_version[] = "1.5.31";
+char em_driver_version[] = "1.6.6";
/*********************************************************************
@@ -87,6 +87,7 @@
{ 0x8086, 0x1018, PCI_ANY_ID, PCI_ANY_ID, 0},
{ 0x8086, 0x1019, PCI_ANY_ID, PCI_ANY_ID, 0},
{ 0x8086, 0x101A, PCI_ANY_ID, PCI_ANY_ID, 0},
+ { 0x8086, 0x101D, PCI_ANY_ID, PCI_ANY_ID, 0},
{ 0x8086, 0x101E, PCI_ANY_ID, PCI_ANY_ID, 0},
/* required last entry */
{ 0, 0, 0, 0, 0}
@@ -158,6 +159,10 @@
static int em_dma_malloc(struct adapter *, bus_size_t,
struct em_dma_alloc *, int);
static void em_dma_free(struct adapter *, struct em_dma_alloc *);
+static void em_print_debug_info(struct adapter *);
+static int em_is_valid_ether_addr(u_int8_t *);
+static int em_sysctl_stats(SYSCTL_HANDLER_ARGS);
+static int em_sysctl_debug_info(SYSCTL_HANDLER_ARGS);
/*********************************************************************
* FreeBSD Device Interface Entry Points
@@ -249,6 +254,7 @@
struct adapter * adapter;
int s;
int tsize, rsize;
+ int error = 0;
INIT_DEBUGOUT("em_attach: begin");
s = splimp();
@@ -269,6 +275,31 @@
adapter->next = em_adapter_list;
em_adapter_list = adapter;
+ /* SYSCTL stuff */
+ sysctl_ctx_init(&adapter->sysctl_ctx);
+ adapter->sysctl_tree = SYSCTL_ADD_NODE(&adapter->sysctl_ctx,
+ SYSCTL_STATIC_CHILDREN(_hw),
+ OID_AUTO,
+ device_get_nameunit(dev),
+ CTLFLAG_RD,
+ 0, "");
+ if (adapter->sysctl_tree == NULL) {
+ error = EIO;
+ goto err_sysctl;
+ }
+
+ SYSCTL_ADD_PROC(&adapter->sysctl_ctx,
+ SYSCTL_CHILDREN(adapter->sysctl_tree),
+ OID_AUTO, "debug_info", CTLTYPE_INT|CTLFLAG_RW,
+ (void *)adapter, 0,
+ em_sysctl_debug_info, "I", "Debug Information");
+
+ SYSCTL_ADD_PROC(&adapter->sysctl_ctx,
+ SYSCTL_CHILDREN(adapter->sysctl_tree),
+ OID_AUTO, "stats", CTLTYPE_INT|CTLFLAG_RW,
+ (void *)adapter, 0,
+ em_sysctl_stats, "I", "Statistics");
+
callout_handle_init(&adapter->timer_handle);
callout_handle_init(&adapter->tx_fifo_timer_handle);
@@ -288,9 +319,10 @@
adapter->hw.tbi_compatibility_en = TRUE;
adapter->rx_buffer_len = EM_RXBUFFER_2048;
- /* These parameters control the automatic generation(Tx) and
- * response(Rx) to Ethernet PAUSE frames.
- */
+ /*
+ * These parameters control the automatic generation(Tx) and
+ * response(Rx) to Ethernet PAUSE frames.
+ */
adapter->hw.fc_high_water = FC_DEFAULT_HI_THRESH;
adapter->hw.fc_low_water = FC_DEFAULT_LO_THRESH;
adapter->hw.fc_pause_time = FC_DEFAULT_TX_TIMER;
@@ -319,9 +351,8 @@
if (em_allocate_pci_resources(adapter)) {
printf("em%d: Allocation of PCI resources failed\n",
adapter->unit);
- em_free_pci_resources(adapter);
- splx(s);
- return(ENXIO);
+ error = ENXIO;
+ goto err_pci;
}
@@ -335,9 +366,8 @@
if (em_dma_malloc(adapter, tsize, &adapter->txdma, BUS_DMA_NOWAIT)) {
printf("em%d: Unable to allocate tx_desc memory\n",
adapter->unit);
- em_free_pci_resources(adapter);
- splx(s);
- return(ENOMEM);
+ error = ENOMEM;
+ goto err_tx_desc;
}
adapter->tx_desc_base = (struct em_tx_desc *) adapter->txdma.dma_vaddr;
@@ -348,10 +378,8 @@
if (em_dma_malloc(adapter, rsize, &adapter->rxdma, BUS_DMA_NOWAIT)) {
printf("em%d: Unable to allocate rx_desc memory\n",
adapter->unit);
- em_free_pci_resources(adapter);
- em_dma_free(adapter, &adapter->txdma);
- splx(s);
- return(ENOMEM);
+ error = ENOMEM;
+ goto err_rx_desc;
}
adapter->rx_desc_base = (struct em_rx_desc *) adapter->rxdma.dma_vaddr;
@@ -359,24 +387,24 @@
if (em_hardware_init(adapter)) {
printf("em%d: Unable to initialize the hardware\n",
adapter->unit);
- em_free_pci_resources(adapter);
- em_dma_free(adapter, &adapter->txdma);
- em_dma_free(adapter, &adapter->rxdma);
- splx(s);
- return(EIO);
+ error = EIO;
+ goto err_hw_init;
}
/* Copy the permanent MAC address out of the EEPROM */
if (em_read_mac_addr(&adapter->hw) < 0) {
printf("em%d: EEPROM read error while reading mac address\n",
adapter->unit);
- em_free_pci_resources(adapter);
- em_dma_free(adapter, &adapter->txdma);
- em_dma_free(adapter, &adapter->rxdma);
- splx(s);
- return(EIO);
+ error = EIO;
+ goto err_mac_addr;
}
+ if (!em_is_valid_ether_addr(adapter->hw.mac_addr)) {
+ printf("em%d: Invalid mac address\n", adapter->unit);
+ error = EIO;
+ goto err_mac_addr;
+ }
+
bcopy(adapter->hw.mac_addr, adapter->interface_data.ac_enaddr,
ETHER_ADDR_LEN);
@@ -403,6 +431,20 @@
INIT_DEBUGOUT("em_attach: end");
splx(s);
return(0);
+
+err_mac_addr:
+err_hw_init:
+ em_dma_free(adapter, &adapter->rxdma);
+err_rx_desc:
+ em_dma_free(adapter, &adapter->txdma);
+err_tx_desc:
+err_pci:
+ em_free_pci_resources(adapter);
+ sysctl_ctx_free(&adapter->sysctl_ctx);
+err_sysctl:
+ splx(s);
+ return(error);
+
}
/*********************************************************************
@@ -579,9 +621,13 @@
if (ifp->if_flags & IFF_RUNNING) {
em_disable_intr(adapter);
em_set_multi(adapter);
- if (adapter->hw.mac_type == em_82542_rev2_0)
+ if (adapter->hw.mac_type == em_82542_rev2_0) {
em_initialize_receive_unit(adapter);
- em_enable_intr(adapter);
+ }
+#ifdef DEVICE_POLLING
+ if (!(ifp->if_ipending & IFF_POLLING))
+#endif
+ em_enable_intr(adapter);
}
break;
case SIOCSIFMEDIA:
@@ -787,31 +833,30 @@
}
#endif /* DEVICE_POLLING */
+ reg_icr = E1000_READ_REG(&adapter->hw, ICR);
+ if (!reg_icr) {
+ return;
+ }
- em_disable_intr(adapter);
- while (loop_cnt > 0 &&
- (reg_icr = E1000_READ_REG(&adapter->hw, ICR)) != 0) {
+ /* Link status change */
+ if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) {
+ untimeout(em_local_timer, adapter,
+ adapter->timer_handle);
+ adapter->hw.get_link_status = 1;
+ em_check_for_link(&adapter->hw);
+ em_print_link_status(adapter);
+ adapter->timer_handle =
+ timeout(em_local_timer, adapter, 2*hz);
+ }
- /* Link status change */
- if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) {
- untimeout(em_local_timer, adapter,
- adapter->timer_handle);
- adapter->hw.get_link_status = 1;
- em_check_for_link(&adapter->hw);
- em_print_link_status(adapter);
- adapter->timer_handle =
- timeout(em_local_timer, adapter, 2*hz);
- }
-
+ while (loop_cnt > 0) {
if (ifp->if_flags & IFF_RUNNING) {
em_process_receive_interrupts(adapter, -1);
em_clean_transmit_interrupts(adapter);
}
loop_cnt--;
}
-
- em_enable_intr(adapter);
-
+
if (ifp->if_flags & IFF_RUNNING && ifp->if_snd.ifq_head != NULL)
em_start(ifp);
@@ -1915,32 +1960,23 @@
E1000_READ_REG(&adapter->hw, TDBAL),
E1000_READ_REG(&adapter->hw, TDLEN));
-
/* Set the default values for the Tx Inter Packet Gap timer */
switch (adapter->hw.mac_type) {
- case em_82543:
- case em_82544:
- case em_82540:
- case em_82545:
- case em_82546:
- case em_82541:
- case em_82547:
- if (adapter->hw.media_type == em_media_type_fiber)
- reg_tipg = DEFAULT_82543_TIPG_IPGT_FIBER;
- else
- reg_tipg = DEFAULT_82543_TIPG_IPGT_COPPER;
- reg_tipg |= DEFAULT_82543_TIPG_IPGR1 << E1000_TIPG_IPGR1_SHIFT;
- reg_tipg |= DEFAULT_82543_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT;
- break;
case em_82542_rev2_0:
- case em_82542_rev2_1:
- reg_tipg = DEFAULT_82542_TIPG_IPGT;
- reg_tipg |= DEFAULT_82542_TIPG_IPGR1 << E1000_TIPG_IPGR1_SHIFT;
- reg_tipg |= DEFAULT_82542_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT;
- break;
- default:
- printf("em%d: Invalid mac type detected\n", adapter->unit);
- }
+ case em_82542_rev2_1:
+ reg_tipg = DEFAULT_82542_TIPG_IPGT;
+ reg_tipg |= DEFAULT_82542_TIPG_IPGR1 << E1000_TIPG_IPGR1_SHIFT;
+ reg_tipg |= DEFAULT_82542_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT;
+ break;
+ default:
+ if (adapter->hw.media_type == em_media_type_fiber)
+ reg_tipg = DEFAULT_82543_TIPG_IPGT_FIBER;
+ else
+ reg_tipg = DEFAULT_82543_TIPG_IPGT_COPPER;
+ reg_tipg |= DEFAULT_82543_TIPG_IPGR1 << E1000_TIPG_IPGR1_SHIFT;
+ reg_tipg |= DEFAULT_82543_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT;
+ }
+
E1000_WRITE_REG(&adapter->hw, TIPG, reg_tipg);
E1000_WRITE_REG(&adapter->hw, TIDV, adapter->tx_int_delay);
if(adapter->hw.mac_type >= em_82540)
@@ -2100,6 +2136,7 @@
int i, num_avail;
struct em_buffer *tx_buffer;
struct em_tx_desc *tx_desc;
+ struct ifnet *ifp = &adapter->interface_data.ac_if;
if (adapter->num_tx_desc_avail == adapter->num_tx_desc)
return;
@@ -2120,7 +2157,7 @@
num_avail++;
if (tx_buffer->m_head) {
-
+ ifp->if_opackets++;
bus_dmamap_sync(adapter->txtag, tx_buffer->map,
BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(adapter->txtag, tx_buffer->map);
@@ -2128,7 +2165,6 @@
m_freem(tx_buffer->m_head);
tx_buffer->m_head = NULL;
-
}
if (++i == adapter->num_tx_desc)
@@ -2146,9 +2182,7 @@
* If there are no pending descriptors, clear the timeout. Otherwise,
* if some descriptors have been freed, restart the timeout.
*/
- if (num_avail > EM_TX_CLEANUP_THRESHOLD) {
- struct ifnet *ifp = &adapter->interface_data.ac_if;
-
+ if (num_avail > EM_TX_CLEANUP_THRESHOLD) {
ifp->if_flags &= ~IFF_OACTIVE;
if (num_avail == adapter->num_tx_desc)
ifp->if_timer = 0;
@@ -2535,6 +2569,7 @@
if (eop) {
adapter->fmp->m_pkthdr.rcvif = ifp;
+ ifp->if_ipackets++;
#if __FreeBSD_version < 500000
eh = mtod(adapter->fmp, struct ether_header *);
@@ -2664,6 +2699,18 @@
return;
}
+static int
+em_is_valid_ether_addr(u_int8_t *addr)
+{
+ char zero_addr[6] = { 0, 0, 0, 0, 0, 0 };
+
+ if ((addr[0] & 1) || (!bcmp(addr, zero_addr, ETHER_ADDR_LEN))) {
+ return (FALSE);
+ }
+
+ return(TRUE);
+}
+
void
em_write_pci_cfg(struct em_hw *hw,
uint32_t reg,
@@ -2798,8 +2845,6 @@
ifp = &adapter->interface_data.ac_if;
/* Fill out the OS statistics structure */
- ifp->if_ipackets = adapter->stats.gprc;
- ifp->if_opackets = adapter->stats.gptc;
ifp->if_ibytes = adapter->stats.gorcl;
ifp->if_obytes = adapter->stats.gotcl;
ifp->if_imcasts = adapter->stats.mprc;
@@ -2828,68 +2873,123 @@
*
**********************************************************************/
static void
-em_print_hw_stats(struct adapter *adapter)
+em_print_debug_info(struct adapter *adapter)
{
- int unit = adapter->unit;
+ int unit = adapter->unit;
#ifdef DBG_STATS
- printf("em%d: Packets not Avail = %ld\n", unit,
- adapter->no_pkts_avail);
- printf("em%d: CleanTxInterrupts = %ld\n", unit,
- adapter->clean_tx_interrupts);
+ printf("em%d: Packets not Avail = %ld\n", unit,
+ adapter->no_pkts_avail);
+ printf("em%d: CleanTxInterrupts = %ld\n", unit,
+ adapter->clean_tx_interrupts);
#endif
+ printf("em%d: fifo workaround = %lld, fifo_reset = %lld\n", unit,
+ (long long)adapter->tx_fifo_wrk,
+ (long long)adapter->tx_fifo_reset);
+ printf("em%d: hw tdh = %d, hw tdt = %d\n", unit,
+ E1000_READ_REG(&adapter->hw, TDH),
+ E1000_READ_REG(&adapter->hw, TDT));
+ printf("em%d: Num Tx descriptors avail = %d\n", unit,
+ adapter->num_tx_desc_avail);
+ printf("em%d: Tx Descriptors not avail1 = %ld\n", unit,
+ adapter->no_tx_desc_avail1);
+ printf("em%d: Tx Descriptors not avail2 = %ld\n", unit,
+ adapter->no_tx_desc_avail2);
+ printf("em%d: Std mbuf failed = %ld\n", unit,
+ adapter->mbuf_alloc_failed);
+ printf("em%d: Std mbuf cluster failed = %ld\n", unit,
+ adapter->mbuf_cluster_failed);
+ printf("em%d: Driver dropped packets = %ld\n", unit,
+ adapter->dropped_pkts);
+
+ return;
+}
+
+static void
+em_print_hw_stats(struct adapter *adapter)
+{
+ int unit = adapter->unit;
+
+ printf("em%d: Excessive collisions = %lld\n", unit,
+ (long long)adapter->stats.ecol);
+ printf("em%d: Symbol errors = %lld\n", unit,
+ (long long)adapter->stats.symerrs);
+ printf("em%d: Sequence errors = %lld\n", unit,
+ (long long)adapter->stats.sec);
+ printf("em%d: Defer count = %lld\n", unit,
+ (long long)adapter->stats.dc);
+
+ printf("em%d: Missed Packets = %lld\n", unit,
+ (long long)adapter->stats.mpc);
+ printf("em%d: Receive No Buffers = %lld\n", unit,
+ (long long)adapter->stats.rnbc);
+ printf("em%d: Receive length errors = %lld\n", unit,
+ (long long)adapter->stats.rlec);
+ printf("em%d: Receive errors = %lld\n", unit,
+ (long long)adapter->stats.rxerrc);
+ printf("em%d: Crc errors = %lld\n", unit,
+ (long long)adapter->stats.crcerrs);
+ printf("em%d: Alignment errors = %lld\n", unit,
+ (long long)adapter->stats.algnerrc);
+ printf("em%d: Carrier extension errors = %lld\n", unit,
+ (long long)adapter->stats.cexterr);
- printf("em%d: fifo workaround = %lld, fifo_reset = %lld\n", unit,
- (long long)adapter->tx_fifo_wrk,
- (long long)adapter->tx_fifo_reset);
- printf("em%d: hw tdh = %d, hw tdt = %d\n", unit,
- E1000_READ_REG(&adapter->hw, TDH),
- E1000_READ_REG(&adapter->hw, TDT));
- printf("em%d: Excessive collisions = %lld\n", unit,
- (long long)adapter->stats.ecol);
- printf("em%d: Tx Descriptors not avail1 = %ld\n", unit,
- adapter->no_tx_desc_avail1);
- printf("em%d: Tx Descriptors not avail2 = %ld\n", unit,
- adapter->no_tx_desc_avail2);
+ printf("em%d: XON Rcvd = %lld\n", unit,
+ (long long)adapter->stats.xonrxc);
+ printf("em%d: XON Xmtd = %lld\n", unit,
+ (long long)adapter->stats.xontxc);
+ printf("em%d: XOFF Rcvd = %lld\n", unit,
+ (long long)adapter->stats.xoffrxc);
+ printf("em%d: XOFF Xmtd = %lld\n", unit,
+ (long long)adapter->stats.xofftxc);
+
+ printf("em%d: Good Packets Rcvd = %lld\n", unit,
+ (long long)adapter->stats.gprc);
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list