PERFORCE change 126065 for review
Kip Macy
kmacy at FreeBSD.org
Tue Sep 4 12:12:48 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=126065
Change 126065 by kmacy at kmacy_home:opentoe on 2007/09/04 19:12:40
IFC #126063
Affected files ...
.. //depot/projects/opentoe/ObsoleteFiles.inc#14 integrate
.. //depot/projects/opentoe/contrib/less/main.c#6 integrate
.. //depot/projects/opentoe/etc/rc.d/lockd#3 integrate
.. //depot/projects/opentoe/lib/libutil/Makefile#3 integrate
.. //depot/projects/opentoe/lib/libutil/expand_number.3#1 branch
.. //depot/projects/opentoe/lib/libutil/expand_number.c#1 branch
.. //depot/projects/opentoe/lib/libutil/libutil.h#3 integrate
.. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/hardware/article.sgml#6 integrate
.. //depot/projects/opentoe/release/doc/share/misc/dev.archlist.txt#5 integrate
.. //depot/projects/opentoe/sbin/geom/class/eli/geli.8#2 integrate
.. //depot/projects/opentoe/share/man/man4/Makefile#11 integrate
.. //depot/projects/opentoe/share/man/man4/zyd.4#1 branch
.. //depot/projects/opentoe/share/man/man9/suser.9#3 integrate
.. //depot/projects/opentoe/sys/arm/xscale/i80321/i80321.c#2 integrate
.. //depot/projects/opentoe/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c#3 integrate
.. //depot/projects/opentoe/sys/dev/acpica/acpi_cpu.c#4 integrate
.. //depot/projects/opentoe/sys/dev/iwi/if_iwi.c#5 integrate
.. //depot/projects/opentoe/sys/dev/ixgbe/ixgbe.c#2 integrate
.. //depot/projects/opentoe/sys/dev/ixgbe/ixgbe.h#2 integrate
.. //depot/projects/opentoe/sys/dev/ixgbe/ixgbe_82598.c#2 integrate
.. //depot/projects/opentoe/sys/dev/ixgbe/ixgbe_api.c#2 integrate
.. //depot/projects/opentoe/sys/dev/ixgbe/ixgbe_api.h#2 integrate
.. //depot/projects/opentoe/sys/dev/ixgbe/ixgbe_common.c#2 integrate
.. //depot/projects/opentoe/sys/dev/ixgbe/ixgbe_common.h#2 integrate
.. //depot/projects/opentoe/sys/dev/ixgbe/ixgbe_osdep.h#2 integrate
.. //depot/projects/opentoe/sys/dev/ixgbe/ixgbe_phy.c#2 integrate
.. //depot/projects/opentoe/sys/dev/ixgbe/ixgbe_phy.h#2 integrate
.. //depot/projects/opentoe/sys/dev/ixgbe/ixgbe_type.h#2 integrate
.. //depot/projects/opentoe/sys/dev/usb/if_zyd.c#1 branch
.. //depot/projects/opentoe/sys/dev/usb/if_zydfw.h#1 branch
.. //depot/projects/opentoe/sys/dev/usb/if_zydreg.h#1 branch
.. //depot/projects/opentoe/sys/dev/usb/usbdevs#13 integrate
.. //depot/projects/opentoe/sys/fs/msdosfs/direntry.h#2 integrate
.. //depot/projects/opentoe/sys/fs/msdosfs/msdosfs_conv.c#3 integrate
.. //depot/projects/opentoe/sys/fs/msdosfs/msdosfs_lookup.c#3 integrate
.. //depot/projects/opentoe/sys/fs/msdosfs/msdosfs_vnops.c#4 integrate
.. //depot/projects/opentoe/sys/geom/eli/g_eli.h#2 integrate
.. //depot/projects/opentoe/sys/geom/eli/g_eli_crypto.c#3 integrate
.. //depot/projects/opentoe/sys/i386/isa/isa.c#2 integrate
.. //depot/projects/opentoe/sys/kern/kern_acct.c#5 integrate
.. //depot/projects/opentoe/sys/kern/kern_ktrace.c#4 integrate
.. //depot/projects/opentoe/sys/kern/kern_sysctl.c#3 integrate
.. //depot/projects/opentoe/sys/kern/kern_timeout.c#4 integrate
.. //depot/projects/opentoe/sys/modules/ixgbe/Makefile#1 branch
.. //depot/projects/opentoe/sys/modules/zyd/Makefile#1 branch
.. //depot/projects/opentoe/sys/net/if_lagg.c#6 integrate
.. //depot/projects/opentoe/tools/regression/geom_eli/init-a.t#2 integrate
.. //depot/projects/opentoe/tools/regression/geom_eli/init.t#2 integrate
.. //depot/projects/opentoe/tools/regression/geom_eli/integrity-copy.t#2 integrate
.. //depot/projects/opentoe/tools/regression/geom_eli/integrity-data.t#2 integrate
.. //depot/projects/opentoe/tools/regression/geom_eli/integrity-hmac.t#2 integrate
.. //depot/projects/opentoe/tools/regression/geom_eli/onetime-a.t#2 integrate
.. //depot/projects/opentoe/tools/regression/geom_eli/onetime.t#2 integrate
.. //depot/projects/opentoe/usr.bin/top/top.local.1#2 integrate
Differences ...
==== //depot/projects/opentoe/ObsoleteFiles.inc#14 (text+ko) ====
@@ -1,5 +1,5 @@
#
-# $FreeBSD: src/ObsoleteFiles.inc,v 1.109 2007/08/07 23:48:30 marcel Exp $
+# $FreeBSD: src/ObsoleteFiles.inc,v 1.110 2007/08/31 19:41:27 yar Exp $
#
# This file lists old files (OLD_FILES), libraries (OLD_LIBS) and
# directories (OLD_DIRS) which should get removed at an update. Recently
@@ -797,6 +797,10 @@
OLD_FILES+=usr/share/man/man1/omshell.1.gz
OLD_FILES+=usr/share/man/man5/dhcp-eval.5.gz
# 200504XX: ipf tools moved from /usr to /
+OLD_FILES+=rescue/ipfs
+OLD_FILES+=rescue/ipfstat
+OLD_FILES+=rescue/ipmon
+OLD_FILES+=rescue/ipnat
OLD_FILES+=usr/sbin/ipftest
OLD_FILES+=usr/sbin/ipresend
OLD_FILES+=usr/sbin/ipsend
@@ -828,6 +832,7 @@
OLD_FILES+=usr/libexec/getNAME
# 200411XX: gvinum replaces vinum
OLD_FILES+=bin/vinum
+OLD_FILES+=rescue/vinum
OLD_FILES+=sbin/vinum
OLD_FILES+=usr/share/man/man8/vinum.8.gz
# 200411XX: libxpg4 removal
==== //depot/projects/opentoe/contrib/less/main.c#6 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/contrib/less/main.c,v 1.11 2007/08/13 16:15:26 delphij Exp $ */
+/* $FreeBSD: src/contrib/less/main.c,v 1.12 2007/09/04 13:54:09 delphij Exp $ */
/*
* Copyright (C) 1984-2007 Mark Nudelman
*
@@ -244,7 +244,7 @@
quit(QUIT_OK);
}
- if (missing_cap && !know_dumb)
+ if (missing_cap && !know_dumb && !less_is_more)
error("WARNING: terminal is not fully functional", NULL_PARG);
init_mark();
open_getchr();
==== //depot/projects/opentoe/etc/rc.d/lockd#3 (text+ko) ====
@@ -2,11 +2,11 @@
#
# $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $
# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm
-# $FreeBSD: src/etc/rc.d/lockd,v 1.17 2007/08/18 04:08:53 mtm Exp $
+# $FreeBSD: src/etc/rc.d/lockd,v 1.18 2007/09/03 02:02:31 mtm Exp $
#
# PROVIDE: lockd
-# REQUIRE: nfsserver nfsclient nfsd rpcbind
+# REQUIRE: nfsserver nfsclient nfsd rpcbind statd
# BEFORE: DAEMON
# KEYWORD: nojail
==== //depot/projects/opentoe/lib/libutil/Makefile#3 (text+ko) ====
@@ -1,5 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 6/4/93
-# $FreeBSD: src/lib/libutil/Makefile,v 1.65 2007/05/21 02:49:07 deischen Exp $
+# $FreeBSD: src/lib/libutil/Makefile,v 1.66 2007/09/01 06:19:11 pjd Exp $
SHLIBDIR?= /lib
@@ -8,8 +8,8 @@
LIB= util
SHLIB_MAJOR= 7
-SRCS= _secure_path.c auth.c flopen.c fparseln.c humanize_number.c \
- kld.c login.c login_auth.c login_cap.c login_class.c \
+SRCS= _secure_path.c auth.c expand_number.c flopen.c fparseln.c \
+ humanize_number.c kld.c login.c login_auth.c login_cap.c login_class.c \
login_crypt.c login_ok.c login_times.c login_tty.c logout.c \
logwtmp.c pidfile.c property.c pty.c pw_util.c realhostname.c \
stub.c trimdomain.c uucplock.c
@@ -27,7 +27,7 @@
login_cap.3 login_class.3 login_times.3 login_ok.3 \
_secure_path.3 uucplock.3 property.3 auth.3 realhostname.3 \
realhostname_sa.3 trimdomain.3 fparseln.3 humanize_number.3 \
- pidfile.3 flopen.3
+ pidfile.3 flopen.3 expand_number.3
MAN+= login.conf.5 auth.conf.5
MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3
MLINKS+= property.3 properties_read.3 property.3 properties_free.3
==== //depot/projects/opentoe/lib/libutil/libutil.h#3 (text+ko) ====
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libutil/libutil.h,v 1.44 2007/05/10 15:01:42 des Exp $
+ * $FreeBSD: src/lib/libutil/libutil.h,v 1.45 2007/09/01 06:19:11 pjd Exp $
*/
#ifndef _LIBUTIL_H_
@@ -82,6 +82,7 @@
struct termios *_termp, struct winsize *_winp);
int humanize_number(char *_buf, size_t _len, int64_t _number,
const char *_suffix, int _scale, int _flags);
+int expand_number(char *_buf, int64_t *_num);
const char *uu_lockerr(int _uu_lockresult);
int uu_lock(const char *_ttyname);
int uu_unlock(const char *_ttyname);
==== //depot/projects/opentoe/release/doc/en_US.ISO8859-1/hardware/article.sgml#6 (text+ko) ====
@@ -18,7 +18,7 @@
<corpauthor>The &os; Documentation Project</corpauthor>
- <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/article.sgml,v 1.318 2007/08/18 16:40:37 bmah Exp $</pubdate>
+ <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/article.sgml,v 1.320 2007/09/02 09:15:08 brueffer Exp $</pubdate>
<copyright>
<year>2000</year>
@@ -742,8 +742,17 @@
<sect2 id="wlan">
<title>Wireless Network Interfaces</title>
- <para>[&arch.i386;] NCR / AT&T / Lucent Technologies WaveLan T1-speed
- ISA/radio LAN cards (&man.wl.4; driver)</para>
+ <para>[&arch.amd64;, &arch.i386;, &arch.pc98;] Cisco/Aironet 802.11b wireless adapters (&man.an.4; driver)
+ </para>
+
+ &hwlist.ath;
+
+ &hwlist.awi;
+
+ &hwlist.cnw;
+
+ <para>[&arch.i386;, &arch.pc98;] Raytheon Raylink 2.4GHz wireless adapters (&man.ray.4; driver)
+ </para>
<para>[&arch.amd64;, &arch.i386;, &arch.pc98;] Lucent Technologies WaveLAN/IEEE 802.11b
wireless network
@@ -752,17 +761,11 @@
Spectrum24 chipsets (&man.wi.4; driver)
</para>
- <para>[&arch.amd64;, &arch.i386;, &arch.pc98;] Cisco/Aironet 802.11b wireless adapters (&man.an.4; driver)
- </para>
+ <para>[&arch.i386;] NCR / AT&T / Lucent Technologies WaveLan T1-speed
+ ISA/radio LAN cards (&man.wl.4; driver)</para>
- <para>[&arch.i386;, &arch.pc98;] Raytheon Raylink 2.4GHz wireless adapters (&man.ray.4; driver)
- </para>
-
- &hwlist.awi;
+ &hwlist.zyd;
- &hwlist.cnw;
-
- &hwlist.ath;
</sect2>
<sect2 id="misc-network">
==== //depot/projects/opentoe/release/doc/share/misc/dev.archlist.txt#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/release/doc/share/misc/dev.archlist.txt,v 1.96 2007/08/15 04:46:04 bmah Exp $
+# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.97 2007/09/02 09:11:10 brueffer Exp $
#
#
@@ -172,3 +172,4 @@
vx i386,pc98,ia64,amd64
wb i386,pc98,amd64
xe i386,amd64
+zyd i386,amd64
==== //depot/projects/opentoe/sbin/geom/class/eli/geli.8#2 (text+ko) ====
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/sbin/geom/class/eli/geli.8,v 1.21 2007/03/05 12:39:49 pjd Exp $
+.\" $FreeBSD: src/sbin/geom/class/eli/geli.8,v 1.22 2007/09/01 06:33:01 pjd Exp $
.\"
.Dd September 16, 2006
.Dt GELI 8
@@ -146,7 +146,8 @@
.It
Supports many cryptographic algorithms (currently
.Nm AES ,
-.Nm Blowfish
+.Nm Blowfish ,
+.Nm Camellia
and
.Nm 3DES ) .
.It
@@ -227,7 +228,8 @@
Encryption algorithm to use.
Currently supported algorithms are:
.Nm AES ,
-.Nm Blowfish
+.Nm Blowfish ,
+.Nm Camellia
and
.Nm 3DES .
The default is
@@ -260,7 +262,9 @@
128 for
.Nm AES ,
128 for
-.Nm Blowfish
+.Nm Blowfish ,
+128 for
+.Nm Camellia
and 192 for
.Nm 3DES .
.It Fl s Ar sectorsize
@@ -652,5 +656,9 @@
.Nm
utility appeared in
.Fx 6.0 .
+Support for
+.Nm Camellia
+block cipher is implemented by Yoshisato Yanagisawa in
+.Fx 7.0 .
.Sh AUTHORS
.An Pawel Jakub Dawidek Aq pjd at FreeBSD.org
==== //depot/projects/opentoe/share/man/man4/Makefile#11 (text+ko) ====
@@ -1,5 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 6/18/93
-# $FreeBSD: src/share/man/man4/Makefile,v 1.392 2007/08/23 20:05:09 des Exp $
+# $FreeBSD: src/share/man/man4/Makefile,v 1.393 2007/09/02 07:09:25 imp Exp $
MAN= aac.4 \
acpi.4 \
@@ -415,7 +415,8 @@
xe.4 \
xl.4 \
xpt.4 \
- zero.4
+ zero.4 \
+ zyd.4
MLINKS= agp.4 agpgart.4
MLINKS+=altq.4 ALTQ.4
==== //depot/projects/opentoe/share/man/man9/suser.9#3 (text+ko) ====
@@ -27,9 +27,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man9/suser.9,v 1.33 2007/06/26 23:12:05 rwatson Exp $
+.\" $FreeBSD: src/share/man/man9/suser.9,v 1.34 2007/08/30 15:03:21 danger Exp $
.\"
-.Dd November 6, 2006
+.Dd August 30, 2007
.Dt SUSER 9
.Os
.Sh NAME
@@ -37,8 +37,7 @@
.Nm suser_cred
.Nd check if credentials have superuser privileges
.Sh SYNOPSIS
-.In sys/param.h
-.In sys/systm.h
+.In sys/priv.h
.Ft int
.Fn suser "struct thread *td"
.Ft int
==== //depot/projects/opentoe/sys/arm/xscale/i80321/i80321.c#2 (text+ko) ====
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321.c,v 1.6 2006/07/25 01:08:41 kevlo Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321.c,v 1.7 2007/09/04 18:45:27 cognet Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -213,8 +213,6 @@
PCIM_CMD_SERRESPEN;
bus_space_write_4(sc->sc_st, sc->sc_atu_sh,
PCIR_COMMAND, preg);
- preg = bus_space_read_4(sc->sc_st, sc->sc_atu_sh,
- PCIR_COMMAND);
}
/* Initialize the bus space tags. */
i80321_io_bs_init(&sc->sc_pci_iot, sc);
==== //depot/projects/opentoe/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c#3 (text+ko) ====
@@ -155,9 +155,9 @@
TUNABLE_ULONG("vfs.zfs.arc_max", &zfs_arc_max);
TUNABLE_ULONG("vfs.zfs.arc_min", &zfs_arc_min);
SYSCTL_DECL(_vfs_zfs);
-SYSCTL_ULONG(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RD, &zfs_arc_max, 0,
+SYSCTL_ULONG(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0,
"Maximum ARC size");
-SYSCTL_ULONG(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RD, &zfs_arc_min, 0,
+SYSCTL_ULONG(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, &zfs_arc_min, 0,
"Minimum ARC size");
/*
==== //depot/projects/opentoe/sys/dev/acpica/acpi_cpu.c#4 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.66 2007/06/03 00:40:56 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.67 2007/08/30 21:18:42 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -257,7 +257,7 @@
acpi_cpu_attach(device_t dev)
{
ACPI_BUFFER buf;
- ACPI_OBJECT arg, *obj;
+ ACPI_OBJECT arg[4], *obj;
ACPI_OBJECT_LIST arglist;
struct pcpu *pcpu_data;
struct acpi_cpu_softc *sc;
@@ -268,6 +268,11 @@
driver_t **drivers;
uint32_t cap_set[3];
+ /* UUID needed by _OSC evaluation */
+ static uint8_t cpu_oscuuid[16] = { 0x16, 0xA6, 0x77, 0x40, 0x0C, 0x29,
+ 0xBE, 0x47, 0x9E, 0xBD, 0xD8, 0x70,
+ 0x58, 0x71, 0x39, 0x53 };
+
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
sc = device_get_softc(dev);
@@ -334,19 +339,39 @@
/*
* CPU capabilities are specified as a buffer of 32-bit integers:
* revision, count, and one or more capabilities. The revision of
- * "1" is not specified anywhere but seems to match Linux. We should
- * also support _OSC here.
+ * "1" is not specified anywhere but seems to match Linux.
*/
if (sc->cpu_features) {
- arglist.Pointer = &arg;
+ arglist.Pointer = arg;
arglist.Count = 1;
- arg.Type = ACPI_TYPE_BUFFER;
- arg.Buffer.Length = sizeof(cap_set);
- arg.Buffer.Pointer = (uint8_t *)cap_set;
+ arg[0].Type = ACPI_TYPE_BUFFER;
+ arg[0].Buffer.Length = sizeof(cap_set);
+ arg[0].Buffer.Pointer = (uint8_t *)cap_set;
cap_set[0] = 1; /* revision */
cap_set[1] = 1; /* number of capabilities integers */
cap_set[2] = sc->cpu_features;
AcpiEvaluateObject(sc->cpu_handle, "_PDC", &arglist, NULL);
+
+ /*
+ * On some systems we need to evaluate _OSC so that the ASL
+ * loads the _PSS and/or _PDC methods at runtime.
+ *
+ * TODO: evaluate failure of _OSC.
+ */
+ arglist.Pointer = arg;
+ arglist.Count = 4;
+ arg[0].Type = ACPI_TYPE_BUFFER;
+ arg[0].Buffer.Length = sizeof(cpu_oscuuid);
+ arg[0].Buffer.Pointer = cpu_oscuuid; /* UUID */
+ arg[1].Type = ACPI_TYPE_INTEGER;
+ arg[1].Integer.Value = 1; /* revision */
+ arg[2].Type = ACPI_TYPE_INTEGER;
+ arg[2].Integer.Value = 1; /* count */
+ arg[3].Type = ACPI_TYPE_BUFFER;
+ arg[3].Buffer.Length = sizeof(cap_set); /* Capabilities buffer */
+ arg[3].Buffer.Pointer = (uint8_t *)cap_set;
+ cap_set[0] = 0;
+ AcpiEvaluateObject(sc->cpu_handle, "_OSC", &arglist, NULL);
}
/* Probe for Cx state support. */
==== //depot/projects/opentoe/sys/dev/iwi/if_iwi.c#5 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.55 2007/06/25 20:56:33 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.56 2007/08/29 21:52:03 thompsa Exp $");
/*-
* Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -957,7 +957,6 @@
struct iwi_softc *sc = ifp->if_softc;
int error = 0;
- IWI_LOCK_ASSERT(sc);
DPRINTF(("%s: %s -> %s flags 0x%x\n", __func__,
ieee80211_state_name[ic->ic_state],
ieee80211_state_name[nstate], sc->flags));
==== //depot/projects/opentoe/sys/dev/ixgbe/ixgbe.c#2 (text+ko) ====
@@ -30,7 +30,7 @@
POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $FreeBSD: src/sys/dev/ixgbe/ixgbe.c,v 1.3 2007/07/12 19:04:11 jfv Exp $ */
+/* $FreeBSD: src/sys/dev/ixgbe/ixgbe.c,v 1.4 2007/09/04 02:31:34 jfv Exp $ */
#ifdef HAVE_KERNEL_OPTION_HEADERS
#include "opt_device_polling.h"
@@ -46,7 +46,7 @@
/*********************************************************************
* Driver version
*********************************************************************/
-char ixgbe_driver_version[] = "1.1.3";
+char ixgbe_driver_version[] = "1.2.6";
/*********************************************************************
* PCI Device ID Table
@@ -60,10 +60,9 @@
static ixgbe_vendor_info_t ixgbe_vendor_info_array[] =
{
- {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598, 0, 0, 0},
{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, 0, 0, 0},
{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, 0, 0, 0},
- {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT_DUAL_PORT, 0, 0, 0},
+ {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4, 0, 0, 0},
/* required last entry */
{0, 0, 0, 0, 0}
};
@@ -100,8 +99,9 @@
static void ixgbe_setup_interface(device_t, struct adapter *);
static int ixgbe_allocate_queues(struct adapter *);
static int ixgbe_allocate_msix_resources(struct adapter *);
+#if __FreeBSD_version >= 700000
static int ixgbe_setup_msix(struct adapter *);
-
+#endif
static int ixgbe_allocate_transmit_buffers(struct tx_ring *);
static int ixgbe_setup_transmit_structures(struct adapter *);
static void ixgbe_setup_transmit_ring(struct tx_ring *);
@@ -119,7 +119,7 @@
static void ixgbe_enable_intr(struct adapter *);
static void ixgbe_disable_intr(struct adapter *);
static void ixgbe_update_stats_counters(struct adapter *);
-static boolean_t ixgbe_txeof(struct tx_ring *);
+static bool ixgbe_txeof(struct tx_ring *);
static int ixgbe_rxeof(struct rx_ring *, int);
static void ixgbe_rx_checksum(struct adapter *, uint32_t, struct mbuf *);
static void ixgbe_set_promisc(struct adapter *);
@@ -133,6 +133,7 @@
static int ixgbe_encap(struct adapter *, struct mbuf **);
static int ixgbe_sysctl_stats(SYSCTL_HANDLER_ARGS);
static int ixgbe_sysctl_debug(SYSCTL_HANDLER_ARGS);
+static int ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS);
static int ixgbe_dma_malloc(struct adapter *, bus_size_t,
struct ixgbe_dma_alloc *, int);
static void ixgbe_dma_free(struct adapter *, struct ixgbe_dma_alloc *);
@@ -143,14 +144,23 @@
static void ixgbe_set_ivar(struct adapter *, u16, u8);
static void ixgbe_configure_ivars(struct adapter *);
-/* Legacy Interrupt handler */
-static void ixgbe_intr(void *);
+/* Legacy Fast Interrupt routine and handlers */
+#if __FreeBSD_version >= 700000
+static int ixgbe_fast_irq(void *);
+/* The MSI/X Interrupt handlers */
+static void ixgbe_msix_tx(void *);
+static void ixgbe_msix_rx(void *);
+static void ixgbe_msix_link(void *);
+#else
+static void ixgbe_fast_irq(void *);
+#endif
-/* The MSI/X Interrupt handlers */
-static void ixgbe_txint(void *);
-static void ixgbe_rxint(void *);
-static void ixgbe_linkint(void *);
+static void ixgbe_rxtx(void *context, int pending);
+static void ixgbe_link(void *context, int pending);
+#ifndef NO_82598_A0_SUPPORT
+static void desc_flip(void *);
+#endif
/*********************************************************************
* FreeBSD Device Interface Entry Points
@@ -175,26 +185,40 @@
MODULE_DEPEND(ixgbe, pci, 1, 1, 1);
MODULE_DEPEND(ixgbe, ether, 1, 1, 1);
+/*
+** TUNEABLE PARAMETERS:
+*/
+
/* How many packets rxeof tries to clean at a time */
static int ixgbe_rx_process_limit = 100;
TUNABLE_INT("hw.ixgbe.rx_process_limit", &ixgbe_rx_process_limit);
-/*
- * Should the driver do MSI/X and RSS/MQ?
- * - default to MSI/X and RSS enabled
- */
-static int ixgbe_disable_msix = 0;
-TUNABLE_INT("hw.ixgbe.disable_msix", &ixgbe_disable_msix);
+/* Flow control setting, default to full */
+static int ixgbe_flow_control = 3;
+TUNABLE_INT("hw.ixgbe.flow_control", &ixgbe_flow_control);
+
+/* Number of TX Queues, note multi tx is not working */
+static int ixgbe_tx_queues = 1;
+TUNABLE_INT("hw.ixgbe.tx_queues", &ixgbe_tx_queues);
+
+/* Number of RX Queues */
+static int ixgbe_rx_queues = 8;
+TUNABLE_INT("hw.ixgbe.rx_queues", &ixgbe_rx_queues);
+
+/* Number of Other Queues, this is used for link interrupts */
+static int ixgbe_other_queues = 1;
+TUNABLE_INT("hw.ixgbe.other_queues", &ixgbe_other_queues);
+
+/* Number of TX descriptors per ring */
+static int ixgbe_txd = DEFAULT_TXD;
+TUNABLE_INT("hw.ixgbe.txd", &ixgbe_txd);
+
+/* Number of RX descriptors per ring */
+static int ixgbe_rxd = DEFAULT_RXD;
+TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd);
-/*
-** Flow control tuneable:
-** 0 - off
-** 1 - rx pause
-** 2 - tx pause
-** 3 - full
-*/
-static int ixgbe_flow_control = 0;
-TUNABLE_INT("hw.ixgbe.flow_control", &ixgbe_flow_control);
+/* Total number of Interfaces - need for config sanity check */
+static int ixgbe_total_ports;
/*********************************************************************
* Device identification routine
@@ -239,6 +263,15 @@
sprintf(adapter_name, "%s, Version - %s",
ixgbe_strings[ent->index],
ixgbe_driver_version);
+ switch (pci_device_id) {
+ case IXGBE_DEV_ID_82598AF_DUAL_PORT :
+ ixgbe_total_ports += 2;
+ break;
+ case IXGBE_DEV_ID_82598AF_SINGLE_PORT :
+ ixgbe_total_ports += 1;
+ default:
+ break;
+ }
device_set_desc_copy(dev, adapter_name);
return (0);
}
@@ -264,13 +297,17 @@
struct adapter *adapter;
int error = 0;
uint32_t ctrl_ext;
+ char name_string[16];
INIT_DEBUGOUT("ixgbe_attach: begin");
/* Allocate, clear, and link in our adapter structure */
adapter = device_get_softc(dev);
adapter->dev = adapter->osdep.dev = dev;
- IXGBE_LOCK_INIT(adapter, device_get_nameunit(dev));
+ /* General Lock Init*/
+ snprintf(name_string, sizeof(name_string), "%s:core",
+ device_get_nameunit(dev));
+ mtx_init(&adapter->core_mtx, name_string, NULL, MTX_DEF);
/* SYSCTL APIs */
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
@@ -283,25 +320,17 @@
OID_AUTO, "debug", CTLTYPE_INT | CTLFLAG_RW,
adapter, 0, ixgbe_sysctl_debug, "I", "Debug Info");
- SYSCTL_ADD_INT(device_get_sysctl_ctx(dev),
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
- OID_AUTO, "flow control", CTLFLAG_RW,
- &ixgbe_flow_control, 0, "Flow Control");
+ OID_AUTO, "flow_control", CTLTYPE_INT | CTLFLAG_RW,
+ adapter, 0, ixgbe_set_flowcntl, "I", "Flow Control");
/* Set up the timer callout */
- callout_init_mtx(&adapter->timer, &adapter->mtx, 0);
+ callout_init_mtx(&adapter->timer, &adapter->core_mtx, 0);
/* Determine hardware revision */
ixgbe_identify_hardware(adapter);
- /*
- ** Descriptors: (configurable by user), note these are
- ** constant for all rings, I saw no reason to vary
- ** them, but perhaps someone later would.
- */
- adapter->num_tx_desc = DEFAULT_TXD;
- adapter->num_rx_desc = DEFAULT_RXD;
-
/* Indicate to RX setup to use Jumbo Clusters */
adapter->bigbufs = TRUE;
@@ -312,17 +341,50 @@
goto err_out;
}
+ /* Do descriptor calc and sanity checks */
+ if (((ixgbe_txd * sizeof(union ixgbe_adv_tx_desc)) % DBA_ALIGN) != 0 ||
+ ixgbe_txd < MIN_TXD || ixgbe_txd > MAX_TXD) {
+ device_printf(dev, "TXD config issue, using default!\n");
+ adapter->num_tx_desc = DEFAULT_TXD;
+ } else
+ adapter->num_tx_desc = ixgbe_txd;
+
+ /*
+ ** With many RX rings it is easy to exceed the
+ ** system mbuf allocation. Tuning nmbclusters
+ ** can alleviate this.
+ */
+ if ((adapter->num_rx_queues > 1) && (nmbclusters > 0 )){
+ int s;
+ /* Calculate the total RX mbuf needs */
+ s = (ixgbe_rxd * adapter->num_rx_queues) * ixgbe_total_ports;
+ if (s > nmbclusters) {
+ device_printf(dev, "RX Descriptors exceed "
+ "system mbuf max, using default instead!\n");
+ ixgbe_rxd = DEFAULT_RXD;
+ }
+ }
+
+ if (((ixgbe_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) != 0 ||
+ ixgbe_rxd < MIN_TXD || ixgbe_rxd > MAX_TXD) {
+ device_printf(dev, "RXD config issue, using default!\n");
+ adapter->num_rx_desc = DEFAULT_RXD;
+ } else
+ adapter->num_rx_desc = ixgbe_rxd;
+
/* Allocate our TX/RX Queues */
if (ixgbe_allocate_queues(adapter)) {
error = ENOMEM;
goto err_out;
}
+#if __FreeBSD_version >= 700000
if (adapter->msix) {
error = ixgbe_setup_msix(adapter);
if (error)
goto err_out;
}
+#endif
/* Initialize the shared code */
if (ixgbe_init_shared_code(&adapter->hw)) {
@@ -382,14 +444,25 @@
INIT_DEBUGOUT("ixgbe_detach: begin");
/* Make sure VLANS are not using driver */
+#if __FreeBSD_version >= 700000
if (adapter->ifp->if_vlantrunk != NULL) {
+#else
+ if (adapter->ifp->if_nvlans != 0) {
+#endif
device_printf(dev,"Vlan in use, detach first\n");
return (EBUSY);
}
- IXGBE_LOCK(adapter);
+ mtx_lock(&adapter->core_mtx);
ixgbe_stop(adapter);
- IXGBE_UNLOCK(adapter);
+ mtx_unlock(&adapter->core_mtx);
+
+ if (adapter->tq != NULL) {
+ taskqueue_drain(adapter->tq, &adapter->rxtx_task);
+ taskqueue_drain(taskqueue_fast, &adapter->link_task);
+ taskqueue_free(adapter->tq);
+ adapter->tq = NULL;
+ }
/* let hardware know driver is unloading */
ctrl_ext = IXGBE_READ_REG(&adapter->hw, IXGBE_CTRL_EXT);
@@ -405,7 +478,7 @@
ixgbe_free_transmit_structures(adapter);
ixgbe_free_receive_structures(adapter);
- IXGBE_LOCK_DESTROY(adapter);
+ mtx_destroy(&adapter->core_mtx);
return (0);
}
@@ -419,9 +492,9 @@
ixgbe_shutdown(device_t dev)
{
struct adapter *adapter = device_get_softc(dev);
- IXGBE_LOCK(adapter);
+ mtx_lock(&adapter->core_mtx);
ixgbe_stop(adapter);
- IXGBE_UNLOCK(adapter);
+ mtx_unlock(&adapter->core_mtx);
return (0);
}
@@ -442,7 +515,7 @@
struct mbuf *m_head;
struct adapter *adapter = ifp->if_softc;
- IXGBE_LOCK_ASSERT(adapter);
+ mtx_assert(&adapter->tx_mtx, MA_OWNED);
if ((ifp->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) !=
IFF_DRV_RUNNING)
@@ -464,7 +537,7 @@
break;
}
/* Send a copy of the frame to the BPF listener */
- BPF_MTAP(ifp, m_head);
+ ETHER_BPF_MTAP(ifp, m_head);
/* Set timeout in case hardware has problems transmitting */
adapter->watchdog_timer = IXGBE_TX_TIMEOUT;
@@ -478,10 +551,10 @@
{
struct adapter *adapter = ifp->if_softc;
- IXGBE_LOCK(adapter);
+ mtx_lock(&adapter->tx_mtx);
if (ifp->if_drv_flags & IFF_DRV_RUNNING)
ixgbe_start_locked(ifp);
- IXGBE_UNLOCK(adapter);
+ mtx_unlock(&adapter->tx_mtx);
return;
}
@@ -508,9 +581,9 @@
if (ifa->ifa_addr->sa_family == AF_INET) {
ifp->if_flags |= IFF_UP;
if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
- IXGBE_LOCK(adapter);
+ mtx_lock(&adapter->core_mtx);
ixgbe_init_locked(adapter);
- IXGBE_UNLOCK(adapter);
+ mtx_unlock(&adapter->core_mtx);
}
arp_ifinit(ifp, ifa);
} else
@@ -521,17 +594,17 @@
if (ifr->ifr_mtu > IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN) {
error = EINVAL;
} else {
- IXGBE_LOCK(adapter);
+ mtx_lock(&adapter->core_mtx);
ifp->if_mtu = ifr->ifr_mtu;
adapter->max_frame_size =
ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
ixgbe_init_locked(adapter);
- IXGBE_UNLOCK(adapter);
+ mtx_unlock(&adapter->core_mtx);
}
break;
case SIOCSIFFLAGS:
IOCTL_DEBUGOUT("ioctl: SIOCSIFFLAGS (Set Interface Flags)");
- IXGBE_LOCK(adapter);
+ mtx_lock(&adapter->core_mtx);
if (ifp->if_flags & IFF_UP) {
if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) {
if ((ifp->if_flags ^ adapter->if_flags) &
@@ -545,17 +618,17 @@
if (ifp->if_drv_flags & IFF_DRV_RUNNING)
ixgbe_stop(adapter);
adapter->if_flags = ifp->if_flags;
- IXGBE_UNLOCK(adapter);
+ mtx_unlock(&adapter->core_mtx);
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
IOCTL_DEBUGOUT("ioctl: SIOC(ADD|DEL)MULTI");
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
- IXGBE_LOCK(adapter);
+ mtx_lock(&adapter->core_mtx);
ixgbe_disable_intr(adapter);
ixgbe_set_multi(adapter);
ixgbe_enable_intr(adapter);
- IXGBE_UNLOCK(adapter);
+ mtx_unlock(&adapter->core_mtx);
}
break;
case SIOCSIFMEDIA:
@@ -575,7 +648,9 @@
ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
if (ifp->if_drv_flags & IFF_DRV_RUNNING)
ixgbe_init(adapter);
+#if __FreeBSD_version >= 700000
VLAN_CAPABILITIES(ifp);
+#endif
break;
}
default:
@@ -598,7 +673,7 @@
ixgbe_watchdog(struct adapter *adapter)
{
- IXGBE_LOCK_ASSERT(adapter);
+ mtx_assert(&adapter->core_mtx, MA_OWNED);
/*
* The timer is set to 5 every time ixgbe_start() queues a packet.
@@ -651,13 +726,15 @@
INIT_DEBUGOUT("ixgbe_init: begin");
- IXGBE_LOCK_ASSERT(adapter);
+ mtx_assert(&adapter->core_mtx, MA_OWNED);
ixgbe_stop(adapter);
/* Get the latest mac address, User can use a LAA */
bcopy(IF_LLADDR(adapter->ifp), adapter->hw.mac.addr,
IXGBE_ETH_LENGTH_OF_ADDRESS);
+ ixgbe_set_rar(&adapter->hw, 0, adapter->hw.mac.addr, 0, 1);
+ adapter->hw.addr_ctrl.rar_used_count = 1;
/* Initialize the hardware */
if (ixgbe_hardware_init(adapter)) {
@@ -756,60 +833,91 @@
{
struct adapter *adapter = arg;
- IXGBE_LOCK(adapter);
+ mtx_lock(&adapter->core_mtx);
ixgbe_init_locked(adapter);
- IXGBE_UNLOCK(adapter);
+ mtx_unlock(&adapter->core_mtx);
return;
}
+static void
+ixgbe_link(void *context, int pending)
+{
+ struct adapter *adapter = context;
+ struct ifnet *ifp = adapter->ifp;
+
+ mtx_lock(&adapter->core_mtx);
+ if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
+ mtx_unlock(&adapter->core_mtx);
+ return;
+ }
+
+ callout_stop(&adapter->timer);
+ ixgbe_update_link_status(adapter);
+ callout_reset(&adapter->timer, hz, ixgbe_local_timer, adapter);
+ mtx_unlock(&adapter->core_mtx);
+}
+
+/*
+** MSI and Legacy Deferred Handler
+** - note this runs without the general lock
+*/
+static void
+ixgbe_rxtx(void *context, int pending)
+{
+ struct adapter *adapter = context;
+ struct ifnet *ifp = adapter->ifp;
+ /* For legacy there is only one of each */
+ struct rx_ring *rxr = adapter->rx_rings;
+ struct tx_ring *txr = adapter->tx_rings;
+
+ if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
+ if (ixgbe_rxeof(rxr, adapter->rx_process_limit) != 0)
+ taskqueue_enqueue(adapter->tq, &adapter->rxtx_task);
+ mtx_lock(&adapter->tx_mtx);
+ ixgbe_txeof(txr);
+
+ if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
+ ixgbe_start_locked(ifp);
+ mtx_unlock(&adapter->tx_mtx);
+ }
+
+ ixgbe_enable_intr(adapter);
+}
+
+
/*********************************************************************
*
* Legacy Interrupt Service routine
*
**********************************************************************/
+#if __FreeBSD_version >= 700000
+static int
+#else
static void
-ixgbe_intr(void *arg)
+#endif
+ixgbe_fast_irq(void *arg)
{
- u32 loop_cnt = MAX_INTR;
u32 reg_eicr;
struct adapter *adapter = arg;
- struct ifnet *ifp = adapter->ifp;
- struct rx_ring *rxr = adapter->rx_rings;
- struct tx_ring *txr = adapter->tx_rings;
- IXGBE_LOCK(adapter);
+ reg_eicr = IXGBE_READ_REG(&adapter->hw, IXGBE_EICR);
+ if (reg_eicr == 0)
+ return FILTER_STRAY;
- reg_eicr = IXGBE_READ_REG(&adapter->hw, IXGBE_EICR);
- if (reg_eicr == 0) {
- IXGBE_UNLOCK(adapter);
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list