From owner-p4-projects@FreeBSD.ORG Wed Mar 31 14:45:46 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0147B16A4D0; Wed, 31 Mar 2004 14:45:45 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B31D916A4CE for ; Wed, 31 Mar 2004 14:45:45 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8C5843D3F for ; Wed, 31 Mar 2004 14:45:45 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i2VMjjGe014481 for ; Wed, 31 Mar 2004 14:45:45 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i2VMjjhg014478 for perforce@freebsd.org; Wed, 31 Mar 2004 14:45:45 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 31 Mar 2004 14:45:45 -0800 (PST) Message-Id: <200403312245.i2VMjjhg014478@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 50082 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2004 22:45:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=50082 Change 50082 by rwatson@rwatson_paprika on 2004/03/31 14:44:53 NOTES sorting. ACPI rearrangement, arguments, etc. Pre-loaded md fix. Tcpdump vendor import. pf-related tcpdump pieces. if_ste polling support. Affected files ... .. //depot/projects/netperf_socket/sys/conf/NOTES#11 integrate .. //depot/projects/netperf_socket/sys/conf/options#7 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#10 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pci.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_resource.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpivar.h#5 integrate .. //depot/projects/netperf_socket/sys/dev/md/md.c#10 integrate .. //depot/projects/netperf_socket/sys/kern/subr_trap.c#5 integrate .. //depot/projects/netperf_socket/sys/net/bpf.h#3 integrate .. //depot/projects/netperf_socket/sys/pci/if_sk.c#6 integrate .. //depot/projects/netperf_socket/sys/pci/if_skreg.h#2 integrate .. //depot/projects/netperf_socket/sys/pci/if_ste.c#7 integrate .. //depot/projects/netperf_socket/sys/pci/if_stereg.h#2 integrate .. //depot/projects/netperf_socket/sys/powerpc/powermac/ata_kauai.c#3 integrate Differences ... ==== //depot/projects/netperf_socket/sys/conf/NOTES#11 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1209 2004/03/30 07:01:56 bde Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1211 2004/03/31 18:46:13 vkashyap Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -1264,16 +1264,29 @@ # Bitmap of units to enable targetmode operations. options AHC_TMODE_ENABLE +# Compile in Aic7xxx Debugging code. +options AHC_DEBUG + +# Aic7xxx driver debugging options. See sys/dev/aic7xxx/aic7xxx.h +options AHC_DEBUG_OPTS + +# Print register bitfields in debug output. Adds ~128k to driver. +# See the ahc(4) manpage +options AHC_REG_PRETTY_PRINT + # Compile in aic79xx debugging code. options AHD_DEBUG -# Aic79xx driver debugging options. +# Aic79xx driver debugging options. Adds ~215k to driver. # See the ahd(4) manpage options AHD_DEBUG_OPTS=0xFFFFFFFF # Print human-readable register definitions when debugging options AHD_REG_PRETTY_PRINT +# Bitmap of units to enable targetmode operations. +options AHD_TMODE_ENABLE + # The adw driver will attempt to use memory mapped I/O for all PCI # controllers that have it configured only if this option is set. options ADW_ALLOW_MEMIO @@ -1375,6 +1388,14 @@ device twe # 3ware ATA RAID # +# 3ware 9000 series PATA/SATA RAID controller driver and options. +# The driver is implemented as a SIM, and so, needs the CAM infrastructure. +# +options TWA_DEBUG # 0-10; 10 prints the most messages. +options TWA_FLASH_FIRMWARE # firmware image bundled when defined. +device twa # 3ware 9000 series PATA/SATA RAID + +# # The 'ATA' driver supports all ATA and ATAPI devices, including PC Card # devices. You only need one "device ata" for it to find all # PCI and PC Card ATA/ATAPI devices on modern machines. @@ -2385,8 +2406,15 @@ options KSTACK_MAX_PAGES=32 # Maximum pages to give the kernel stack +# Adaptec Array Controller driver options +options AAC_DEBUG # Debugging levels: + # 0 - quiet, only emit warnings + # 1 - noisy, emit major function + # points and things done + # 2 - extremely noisy, emit trace + # items in loops, etc. + # Yet more undocumented options for linting. -options AAC_DEBUG # Broken: ##options ASR_MEASURE_PERFORMANCE # BKTR_ALLOC_PAGES has no effect except to cause warnings, and ==== //depot/projects/netperf_socket/sys/conf/options#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.436 2004/03/30 18:53:18 vkashyap Exp $ +# $FreeBSD: src/sys/conf/options,v 1.438 2004/03/31 18:46:13 vkashyap Exp $ # # On the handling of kernel options # @@ -30,50 +30,21 @@ # If filename is missing, the default is # opt_.h -# Adaptec Array Controller driver options -AAC_DEBUG opt_aac.h # Debugging levels: - # 0 - quiet, only emit warnings - # 1 - noisy, emit major function - # points and things done - # 2 - extremely noisy, emit trace - # items in loops, etc. +AAC_DEBUG opt_aac.h +AHC_ALLOW_MEMIO opt_aic7xxx.h +AHC_TMODE_ENABLE opt_aic7xxx.h +AHC_DUMP_EEPROM opt_aic7xxx.h +AHC_DEBUG opt_aic7xxx.h +AHC_DEBUG_OPTS opt_aic7xxx.h +AHC_REG_PRETTY_PRINT opt_aic7xxx.h +AHD_DEBUG opt_aic79xx.h +AHD_DEBUG_OPTS opt_aic79xx.h +AHD_TMODE_ENABLE opt_aic79xx.h +AHD_REG_PRETTY_PRINT opt_aic79xx.h +ADW_ALLOW_MEMIO opt_adw.h -# Adaptec aic7xxx SCSI controller options -AHC_ALLOW_MEMIO opt_aic7xxx.h # Allow PCI devices to use memory - # mapped I/O - -AHC_TMODE_ENABLE opt_aic7xxx.h # Bitmap of units to enable - # targetmode operations. - -AHC_DUMP_EEPROM opt_aic7xxx.h # Dump the contents of our - # configuration prom. - -AHC_DEBUG opt_aic7xxx.h # Compile in Aic7xxx Debugging code. - -AHC_DEBUG_OPTS opt_aic7xxx.h # Aic7xxx driver debugging options. - # See sys/dev/aic7xxx/aic7xxx.h - -AHC_REG_PRETTY_PRINT opt_aic7xxx.h # Print register bitfields in debug - # output. Adds ~128k to driver. - -# Adaptec aic79xx SCSI controller options -AHD_DEBUG opt_aic79xx.h # Compile in Aic79xx Debugging code. - -AHD_DEBUG_OPTS opt_aic79xx.h # Aic79xx driver debugging options. - # See sys/dev/aic7xxx/aic79xx.h - -AHD_TMODE_ENABLE opt_aic79xx.h # Bitmap of units to enable - # targetmode operations. - -AHD_REG_PRETTY_PRINT opt_aic79xx.h # Print register bitfields in debug - # output. Adds ~215k to driver. - -ADW_ALLOW_MEMIO opt_adw.h # Allow PCI devices to use memory - # mapped I/O - -# 3ware 9000 series RAID controller driver options -TWA_DEBUG opt_twa.h # 0-10; 10 prints the most messages. -TWA_FLASH_FIRMWARE opt_twa.h # firmware image bundled when defined. +TWA_DEBUG opt_twa.h +TWA_FLASH_FIRMWARE opt_twa.h # Miscellaneous options. ADAPTIVE_MUTEXES ==== //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#10 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.130 2004/03/30 07:35:18 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.133 2004/03/31 17:35:28 njl Exp $ */ #include "opt_acpi.h" @@ -145,46 +145,7 @@ static int acpi_child_pnpinfo_str_method(device_t acdev, device_t child, char *buf, size_t buflen); -int -acpi_child_location_str_method(device_t cbdev, device_t child, char *buf, - size_t buflen) -{ - struct acpi_device *dinfo= device_get_ivars(child); - - dinfo = device_get_ivars(child); - if(dinfo->ad_handle) - snprintf(buf, buflen, "path=%s", acpi_name(dinfo->ad_handle)); - else - snprintf(buf, buflen, "magic=unknown"); - return (0); -} -int -acpi_child_pnpinfo_str_method(device_t cbdev, device_t child, char *buf, - size_t buflen) -{ - struct acpi_device *dinfo = device_get_ivars(child); - ACPI_DEVICE_INFO adinfo; - ACPI_BUFFER adbuf = {sizeof(adinfo), &adinfo}; - char * end; - int error; - - dinfo = device_get_ivars(child); - error = AcpiGetObjectInfo(dinfo->ad_handle, &adbuf); - - if(error) - snprintf(buf, buflen, "Unknown"); - else - snprintf(buf, buflen, "_HID=%s _UID=%u", - (adinfo.Valid & ACPI_VALID_HID)? - adinfo.HardwareId.Value : "UNKNOWN", - (unsigned int)((adinfo.Valid & ACPI_VALID_UID)? - strtoul(adinfo.UniqueId.Value, &end, 10):0 )); - - return (0); -} - - static device_method_t acpi_methods[] = { /* Device interface */ DEVMETHOD(device_identify, acpi_identify), @@ -204,8 +165,8 @@ DEVMETHOD(bus_get_resource, acpi_get_resource), DEVMETHOD(bus_alloc_resource, acpi_alloc_resource), DEVMETHOD(bus_release_resource, acpi_release_resource), - DEVMETHOD(bus_child_pnpinfo_str, acpi_child_pnpinfo_str_method), - DEVMETHOD(bus_child_location_str, acpi_child_location_str_method), + DEVMETHOD(bus_child_pnpinfo_str, acpi_child_pnpinfo_str_method), + DEVMETHOD(bus_child_location_str, acpi_child_location_str_method), DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), @@ -738,6 +699,49 @@ return (retval); } +/* Location hint for devctl(8) */ +static int +acpi_child_location_str_method(device_t cbdev, device_t child, char *buf, + size_t buflen) +{ + struct acpi_device *dinfo = device_get_ivars(child); + + if (dinfo->ad_handle) + snprintf(buf, buflen, "path=%s", acpi_name(dinfo->ad_handle)); + else + snprintf(buf, buflen, "magic=unknown"); + return (0); +} + +/* PnP information for devctl(8) */ +static int +acpi_child_pnpinfo_str_method(device_t cbdev, device_t child, char *buf, + size_t buflen) +{ + ACPI_BUFFER adbuf = {ACPI_ALLOCATE_BUFFER, NULL}; + ACPI_DEVICE_INFO *adinfo; + struct acpi_device *dinfo = device_get_ivars(child); + char *end; + int error; + + error = AcpiGetObjectInfo(dinfo->ad_handle, &adbuf); + adinfo = (ACPI_DEVICE_INFO *) adbuf.Pointer; + + if (error) + snprintf(buf, buflen, "Unknown"); + else + snprintf(buf, buflen, "_HID=%s _UID=%lu", + (adinfo->Valid & ACPI_VALID_HID) ? + adinfo->HardwareId.Value : "UNKNOWN", + (adinfo->Valid & ACPI_VALID_UID) ? + strtoul(adinfo->UniqueId.Value, &end, 10) : 0); + + if (adinfo) + AcpiOsFree(adinfo); + + return (0); +} + /* * Handle per-device ivars */ @@ -1201,7 +1205,7 @@ * device. Ignore the return value here; it's OK for the * device not to have any resources. */ - acpi_parse_resources(child, handle, &acpi_res_parse_set); + acpi_parse_resources(child, handle, &acpi_res_parse_set, NULL); /* If we're debugging, probe/attach now rather than later */ ACPI_DEBUG_EXEC(device_probe_and_attach(child)); ==== //depot/projects/netperf_socket/sys/dev/acpica/acpi_pci.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci.c,v 1.7 2004/03/03 18:34:42 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci.c,v 1.9 2004/03/31 17:35:28 njl Exp $"); #include "opt_bus.h" @@ -65,6 +65,10 @@ static int acpi_pci_attach(device_t dev); static int acpi_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); +static int acpi_pci_child_location_str_method(device_t cbdev, + device_t child, char *buf, size_t buflen); + + #if 0 static int acpi_pci_set_powerstate_method(device_t dev, device_t child, int state); @@ -99,7 +103,7 @@ DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_child_pnpinfo_str, pci_child_pnpinfo_str_method), - DEVMETHOD(bus_child_location_str, pci_child_location_str_method), + DEVMETHOD(bus_child_location_str, acpi_pci_child_location_str_method), /* PCI interface */ DEVMETHOD(pci_read_config, pci_read_config_method), @@ -132,12 +136,27 @@ struct acpi_pci_devinfo *dinfo; switch (which) { - case ACPI_IVAR_HANDLE: + case ACPI_IVAR_HANDLE: dinfo = device_get_ivars(child); *result = (uintptr_t)dinfo->ap_handle; - return(0); + return (0); + } + return (pci_read_ivar(dev, child, which, result)); +} + +static int +acpi_pci_child_location_str_method(device_t cbdev, device_t child, char *buf, + size_t buflen) +{ + struct acpi_pci_devinfo *dinfo = device_get_ivars(child); + + pci_child_location_str_method(cbdev, child, buf, buflen); + + if (dinfo->ap_handle) { + strlcat(buf, " path=", buflen); + strlcat(buf, acpi_name(dinfo->ap_handle), buflen); } - return(pci_read_ivar(dev, child, which, result)); + return (0); } #if 0 ==== //depot/projects/netperf_socket/sys/dev/acpica/acpi_resource.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_resource.c,v 1.21 2004/03/17 17:50:24 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_resource.c,v 1.22 2004/03/31 17:23:46 njl Exp $"); #include "opt_acpi.h" #include @@ -56,7 +56,7 @@ */ ACPI_STATUS acpi_parse_resources(device_t dev, ACPI_HANDLE handle, - struct acpi_parse_resource_set *set) + struct acpi_parse_resource_set *set, void *arg) { ACPI_BUFFER buf; ACPI_RESOURCE *res; @@ -86,7 +86,7 @@ } ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES, "%s - got %ld bytes of resources\n", acpi_name(handle), (long)buf.Length)); - set->set_init(dev, &context); + set->set_init(dev, arg, &context); /* Iterate through the resources */ curr = buf.Pointer; @@ -373,7 +373,7 @@ * Resource-set vectors used to attach _CRS-derived resources * to an ACPI device. */ -static void acpi_res_set_init(device_t dev, void **context); +static void acpi_res_set_init(device_t dev, void *arg, void **context); static void acpi_res_set_done(device_t dev, void *context); static void acpi_res_set_ioport(device_t dev, void *context, u_int32_t base, u_int32_t length); @@ -411,15 +411,17 @@ int ar_nmem; int ar_nirq; int ar_ndrq; + void *ar_parent; }; static void -acpi_res_set_init(device_t dev, void **context) +acpi_res_set_init(device_t dev, void *arg, void **context) { struct acpi_res_context *cp; if ((cp = AcpiOsAllocate(sizeof(*cp))) != NULL) { bzero(cp, sizeof(*cp)); + cp->ar_parent = arg; *context = cp; } } ==== //depot/projects/netperf_socket/sys/dev/acpica/acpivar.h#5 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.57 2004/03/09 05:41:28 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.58 2004/03/31 17:23:46 njl Exp $ */ #include "bus_if.h" @@ -198,7 +198,7 @@ uint8_t notify); struct acpi_parse_resource_set { - void (*set_init)(device_t dev, void **context); + void (*set_init)(device_t dev, void *arg, void **context); void (*set_done)(device_t dev, void *context); void (*set_ioport)(device_t dev, void *context, u_int32_t base, u_int32_t length); @@ -221,7 +221,7 @@ extern struct acpi_parse_resource_set acpi_res_parse_set; extern ACPI_STATUS acpi_parse_resources(device_t dev, ACPI_HANDLE handle, - struct acpi_parse_resource_set *set); + struct acpi_parse_resource_set *set, void *arg); /* ACPI event handling */ extern UINT32 acpi_event_power_button_sleep(void *context); ==== //depot/projects/netperf_socket/sys/dev/md/md.c#10 (text+ko) ==== @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $FreeBSD: src/sys/dev/md/md.c,v 1.118 2004/03/19 21:19:15 alc Exp $ + * $FreeBSD: src/sys/dev/md/md.c,v 1.119 2004/03/31 21:48:02 luigi Exp $ * */ @@ -110,7 +110,6 @@ static g_init_t md_drvinit; -static int mdrootready; static int mdunits; static dev_t status_dev = 0; @@ -1180,8 +1179,10 @@ sc->nsect = length / DEV_BSIZE; sc->pl_ptr = image; sc->pl_len = length; +#ifdef MD_ROOT if (sc->unit == 0) - mdrootready = 1; + rootdevnames[0] = "ufs:/dev/md0"; +#endif mdinit(sc); } @@ -1253,15 +1254,3 @@ }; DECLARE_MODULE(md, md_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); MODULE_VERSION(md, MD_MODVER); - - -#ifdef MD_ROOT -static void -md_takeroot(void *junk) -{ - if (mdrootready) - rootdevnames[0] = "ufs:/dev/md0"; -} - -SYSINIT(md_root, SI_SUB_MOUNT_ROOT, SI_ORDER_FIRST, md_takeroot, NULL); -#endif /* MD_ROOT */ ==== //depot/projects/netperf_socket/sys/kern/subr_trap.c#5 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/subr_trap.c,v 1.265 2004/03/13 22:31:39 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_trap.c,v 1.266 2004/03/31 08:20:44 julian Exp $"); #include "opt_ktrace.h" #include "opt_mac.h" @@ -140,7 +140,6 @@ { struct thread *td; struct proc *p; - struct kse *ke; struct ksegrp *kg; struct rlimit rlim; u_int prticks, sticks; @@ -171,7 +170,6 @@ * ast() will be called again. */ mtx_lock_spin(&sched_lock); - ke = td->td_kse; sticks = td->td_sticks; flags = td->td_flags; sflag = p->p_sflag; ==== //depot/projects/netperf_socket/sys/net/bpf.h#3 (text+ko) ==== @@ -38,7 +38,7 @@ * @(#)bpf.h 8.1 (Berkeley) 6/10/93 * @(#)bpf.h 1.34 (LBL) 6/16/96 * - * $FreeBSD: src/sys/net/bpf.h,v 1.32 2004/02/26 03:53:53 mlaier Exp $ + * $FreeBSD: src/sys/net/bpf.h,v 1.34 2004/03/31 14:22:13 bms Exp $ */ #ifndef _NET_BPF_H_ @@ -182,6 +182,12 @@ #define DLT_PPP_ETHER 51 /* PPP over Ethernet */ /* + * Reserved for the Symantec Enterprise Firewall. + */ +#define DLT_SYMANTEC_FIREWALL 99 + + +/* * This value was defined by libpcap 0.5; platforms that have defined * it with a different value should define it here with that value - * a link type of 104 in a save file will be mapped to DLT_C_HDLC, @@ -207,6 +213,14 @@ */ /* + * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides + * with other values. + * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header + * (DLCI, etc.). + */ +#define DLT_FRELAY 107 + +/* * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except * that the AF_ type in the link-layer header is in network byte order. * @@ -224,6 +238,13 @@ */ /* + * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's + * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other + * than OpenBSD. + */ +#define DLT_ENC 109 + +/* * This is for Linux cooked sockets. */ #define DLT_LINUX_SLL 113 @@ -250,7 +271,6 @@ * in capture-file headers. */ #define DLT_PFLOG 117 -#define DLT_PFSYNC 121 /* * Registered for Cisco-internal use. @@ -271,6 +291,95 @@ #define DLT_AIRONET_HEADER 120 /* + * Reserved for use by OpenBSD's pfsync device. + */ +#define DLT_PFSYNC 121 + +/* + * Reserved for Siemens HiPath HDLC. XXX + */ +#define DLT_HHDLC 121 + +/* + * Reserved for RFC 2625 IP-over-Fibre Channel. + */ +#define DLT_IP_OVER_FC 122 + +/* + * Reserved for Full Frontal ATM on Solaris. + */ +#define DLT_SUNATM 123 + +/* + * Reserved as per request from Kent Dahlgren + * for private use. + */ +#define DLT_RIO 124 /* RapidIO */ +#define DLT_PCI_EXP 125 /* PCI Express */ +#define DLT_AURORA 126 /* Xilinx Aurora link layer */ + +/* + * BSD header for 802.11 plus a number of bits of link-layer information + * including radio information. + */ +#ifndef DLT_IEEE802_11_RADIO +#define DLT_IEEE802_11_RADIO 127 +#endif + +/* + * Reserved for TZSP encapsulation. + */ +#define DLT_TZSP 128 /* Tazmen Sniffer Protocol */ + +/* + * Reserved for Linux ARCNET. + */ +#define DLT_ARCNET_LINUX 129 + +/* + * Juniper-private data link types. + */ +#define DLT_JUNIPER_MLPPP 130 +#define DLT_JUNIPER_MLFR 131 +#define DLT_JUNIPER_ES 132 +#define DLT_JUNIPER_GGSN 133 +#define DLT_JUNIPER_MFR 134 +#define DLT_JUNIPER_ATM2 135 +#define DLT_JUNIPER_SERVICES 136 +#define DLT_JUNIPER_ATM1 137 + +/* + * Reserved for Apple IP-over-IEEE-1394. + */ +#define DLT_APPLE_IP_OVER_IEEE1394 138 + +/* + * Reserved for DOCSIS. + */ +#define DLT_DOCSIS 143 + +/* + * Reserved for Linux IrDA. + */ +#define DLT_LINUX_IRDA 144 + +/* + * Reserved for IBM SP switch and IBM Next Federation switch. + */ +#define DLT_IBM_SP 145 +#define DLT_IBM_SN 146 + +/* + * Reserved for AbsoluteValue Systems 802.11 capture. + */ +#define DLT_IEEE802_11_RADIO_AVS 163 + +/* + * Reserved for Juniper-private DLT. + */ +#define DLT_JUNIPER_MONITOR 164 + +/* * The instruction encodings. */ /* instruction classes */ ==== //depot/projects/netperf_socket/sys/pci/if_sk.c#6 (text+ko) ==== @@ -48,7 +48,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/pci/if_sk.c,v 1.77 2004/03/17 17:50:53 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/pci/if_sk.c,v 1.78 2004/03/31 12:35:51 mckay Exp $"); /* * SysKonnect SK-NET gigabit ethernet driver for FreeBSD. Supports @@ -135,7 +135,7 @@ #ifndef lint static const char rcsid[] = - "$FreeBSD: src/sys/pci/if_sk.c,v 1.77 2004/03/17 17:50:53 njl Exp $"; + "$FreeBSD: src/sys/pci/if_sk.c,v 1.78 2004/03/31 12:35:51 mckay Exp $"; #endif static struct sk_type sk_devs[] = { @@ -164,6 +164,11 @@ DEVICEID_LINKSYS_EG1032, "Linksys EG1032 Gigabit Ethernet" }, + { + VENDORID_DLINK, + DEVICEID_DLINK_DGE530T, + "D-Link DGE-530T Gigabit Ethernet" + }, { 0, 0, NULL } }; @@ -465,6 +470,12 @@ sk_vpd_read_res(sc, &res, pos); + /* + * Bail out quietly if the eeprom appears to be missing or empty. + */ + if (res.vr_id == 0xff && res.vr_len == 0xff && res.vr_pad == 0xff) + return; + if (res.vr_id != VPD_RES_ID) { printf("skc%d: bad VPD resource id: expected %x got %x\n", sc->sk_unit, VPD_RES_ID, res.vr_id); @@ -1580,8 +1591,13 @@ case DEVICEID_SK_V2: case DEVICEID_3COM_3C940: case DEVICEID_LINKSYS_EG1032: + case DEVICEID_DLINK_DGE530T: sc->sk_type = SK_YUKON; break; + default: + printf("skc%d: unknown device!\n", unit); + error = ENXIO; + goto fail; } /* Reset the adapter. */ @@ -1644,7 +1660,8 @@ } /* Announce the product name. */ - printf("skc%d: %s\n", sc->sk_unit, sc->sk_vpd_prodname); + if (sc->sk_vpd_prodname != NULL) + printf("skc%d: %s\n", sc->sk_unit, sc->sk_vpd_prodname); sc->sk_devs[SK_PORT_A] = device_add_child(dev, "sk", -1); port = malloc(sizeof(int), M_DEVBUF, M_NOWAIT); *port = SK_PORT_A; ==== //depot/projects/netperf_socket/sys/pci/if_skreg.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/pci/if_skreg.h,v 1.19 2003/11/14 19:00:32 sam Exp $ + * $FreeBSD: src/sys/pci/if_skreg.h,v 1.20 2004/03/31 12:35:51 mckay Exp $ */ /* @@ -91,6 +91,16 @@ #define DEVICEID_LINKSYS_EG1032 0x1032 /* + * D-Link PCI vendor ID + */ +#define VENDORID_DLINK 0x1186 + +/* + * D-Link gigabit ethernet device ID + */ +#define DEVICEID_DLINK_DGE530T 0x4c00 + +/* * GEnesis registers. The GEnesis chip has a 256-byte I/O window * but internally it has a 16K register space. This 16K space is * divided into 128-byte blocks. The first 128 bytes of the I/O ==== //depot/projects/netperf_socket/sys/pci/if_ste.c#7 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/pci/if_ste.c,v 1.64 2004/03/30 19:23:38 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/pci/if_ste.c,v 1.66 2004/03/31 21:10:01 ru Exp $"); #include #include @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -162,6 +163,9 @@ DRIVER_MODULE(ste, pci, ste_driver, ste_devclass, 0, 0); DRIVER_MODULE(miibus, ste, miibus_driver, miibus_devclass, 0, 0); +static int ste_rxsyncs; +SYSCTL_INT(_hw, OID_AUTO, ste_rxsyncs, CTLFLAG_RW, &ste_rxsyncs, 0, ""); + #define STE_SETBIT4(sc, reg, x) \ CSR_WRITE_4(sc, reg, CSR_READ_4(sc, reg) | (x)) @@ -622,7 +626,53 @@ return; } +#ifdef DEVICE_POLLING +static poll_handler_t ste_poll; + static void +ste_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +{ + struct ste_softc *sc = ifp->if_softc; + + STE_LOCK(sc); + if (cmd == POLL_DEREGISTER) { /* final call, enable interrupts */ + CSR_WRITE_2(sc, STE_IMR, STE_INTRS); + goto done; + } + + sc->rxcycles = count; + ste_rxeof(sc); + ste_txeof(sc); + if (ifp->if_snd.ifq_head != NULL) + ste_start(ifp); + + if (cmd == POLL_AND_CHECK_STATUS) { /* also check status register */ + u_int16_t status; + + status = CSR_READ_2(sc, STE_ISR_ACK); + + if (status & STE_ISR_TX_DONE) + ste_txeoc(sc); + + if (status & STE_ISR_STATS_OFLOW) { + untimeout(ste_stats_update, sc, sc->ste_stat_ch); + ste_stats_update(sc); + } + + if (status & STE_ISR_LINKEVENT) + mii_pollstat(device_get_softc(sc->ste_miibus)); + + if (status & STE_ISR_HOSTERR) { + ste_reset(sc); + ste_init(sc); + } + } +done: + STE_UNLOCK(sc); +} +#endif /* DEVICE_POLLING */ + +static void ste_intr(xsc) void *xsc; { @@ -634,6 +684,16 @@ STE_LOCK(sc); ifp = &sc->arpcom.ac_if; +#ifdef DEVICE_POLLING + if (ifp->if_flags & IFF_POLLING) + goto done; + if (ether_poll_register(ste_poll, ifp)) { /* ok, disable interrupts */ + CSR_WRITE_2(sc, STE_IMR, 0); + ste_poll(ifp, 0, 1); + goto done; + } +#endif /* DEVICE_POLLING */ + /* See if this is really our interrupt. */ if (!(CSR_READ_2(sc, STE_ISR) & STE_ISR_INTLATCH)) { STE_UNLOCK(sc); @@ -676,6 +736,9 @@ if (ifp->if_snd.ifq_head != NULL) ste_start(ifp); +#ifdef DEVICE_POLLING +done: +#endif /* DEVICE_POLLING */ STE_UNLOCK(sc); return; @@ -699,8 +762,28 @@ ifp = &sc->arpcom.ac_if; + if (sc->ste_cdata.ste_rx_head->ste_ptr->ste_status == 0) { + cur_rx = sc->ste_cdata.ste_rx_head; + do { + cur_rx = cur_rx->ste_next; + /* If the ring is empty, just return. */ + if (cur_rx == sc->ste_cdata.ste_rx_head) + return; + } while (cur_rx->ste_ptr->ste_status == 0); + /* We've fallen behind the chip: catch it. */ + sc->ste_cdata.ste_rx_head = cur_rx; + ++ste_rxsyncs; + }; + while((rxstat = sc->ste_cdata.ste_rx_head->ste_ptr->ste_status) & STE_RXSTAT_DMADONE) { +#ifdef DEVICE_POLLING + if (ifp->if_flags & IFF_POLLING) { + if (sc->rxcycles <= 0) + break; + sc->rxcycles--; + } +#endif /* DEVICE_POLLING */ if ((STE_RX_LIST_CNT - count) < 3) { break; } @@ -1243,7 +1326,7 @@ } /* Set RX polling interval */ - CSR_WRITE_1(sc, STE_RX_DMAPOLL_PERIOD, 1); + CSR_WRITE_1(sc, STE_RX_DMAPOLL_PERIOD, 64); /* Init TX descriptors */ ste_init_tx_list(sc); @@ -1305,8 +1388,14 @@ /* Enable stats counters. */ STE_SETBIT2(sc, STE_MACCTL1, STE_MACCTL1_STATS_ENABLE); + CSR_WRITE_2(sc, STE_ISR, 0xFFFF); +#ifdef DEVICE_POLLING + /* Disable interrupts if we are polling. */ + if (ifp->if_flags & IFF_POLLING) + CSR_WRITE_2(sc, STE_IMR, 0); + else +#endif /* DEVICE_POLLING */ /* Enable interrupts. */ - CSR_WRITE_2(sc, STE_ISR, 0xFFFF); CSR_WRITE_2(sc, STE_IMR, STE_INTRS); /* Accept VLAN length packets */ @@ -1334,6 +1423,10 @@ ifp = &sc->arpcom.ac_if; untimeout(ste_stats_update, sc, sc->ste_stat_ch); + ifp->if_flags &= ~(IFF_RUNNING|IFF_OACTIVE); +#ifdef DEVICE_POLLING + ether_poll_deregister(ifp); +#endif /* DEVICE_POLLING */ CSR_WRITE_2(sc, STE_IMR, 0); STE_SETBIT2(sc, STE_MACCTL1, STE_MACCTL1_TX_DISABLE); @@ -1365,8 +1458,6 @@ } bzero(sc->ste_ldata, sizeof(struct ste_list_data)); - - ifp->if_flags &= ~(IFF_RUNNING|IFF_OACTIVE); STE_UNLOCK(sc); return; ==== //depot/projects/netperf_socket/sys/pci/if_stereg.h#2 (text+ko) ==== @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/pci/if_stereg.h,v 1.12 2003/11/14 19:00:32 sam Exp $ + * $FreeBSD: src/sys/pci/if_stereg.h,v 1.13 2004/03/31 20:39:20 ru Exp $ */ /* @@ -526,6 +526,9 @@ struct callout_handle ste_stat_ch; struct mtx ste_mtx; u_int8_t ste_one_phy; +#ifdef DEVICE_POLLING + int rxcycles; +#endif }; #define STE_LOCK(_sc) mtx_lock(&(_sc)->ste_mtx) ==== //depot/projects/netperf_socket/sys/powerpc/powermac/ata_kauai.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * */ #include >>> TRUNCATED FOR MAIL (1000 lines) <<<