Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 2004 13:52:40 -0800 (PST)
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 50081 for review
Message-ID:  <200403312152.i2VLqe6X003070@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=50081

Change 50081 by imp@imp_pacopaco on 2004/03/31 13:52:31

	IFC

Affected files ...

.. //depot/projects/power/sys/amd64/amd64/pmap.c#7 integrate
.. //depot/projects/power/sys/amd64/amd64/support.S#5 integrate
.. //depot/projects/power/sys/amd64/include/md_var.h#5 integrate
.. //depot/projects/power/sys/conf/NOTES#8 integrate
.. //depot/projects/power/sys/conf/options#8 integrate
.. //depot/projects/power/sys/dev/acpica/acpi.c#12 integrate
.. //depot/projects/power/sys/dev/acpica/acpi_pci.c#7 integrate
.. //depot/projects/power/sys/dev/acpica/acpi_resource.c#4 integrate
.. //depot/projects/power/sys/dev/acpica/acpivar.h#8 integrate
.. //depot/projects/power/sys/dev/sound/pci/ich.c#4 integrate
.. //depot/projects/power/sys/fs/fifofs/fifo_vnops.c#3 integrate
.. //depot/projects/power/sys/fs/portalfs/portal_vnops.c#3 integrate
.. //depot/projects/power/sys/kern/subr_trap.c#3 integrate
.. //depot/projects/power/sys/kern/uipc_socket.c#7 integrate
.. //depot/projects/power/sys/kern/uipc_usrreq.c#6 integrate
.. //depot/projects/power/sys/net/bpf.h#6 integrate
.. //depot/projects/power/sys/net80211/ieee80211_ioctl.c#5 integrate
.. //depot/projects/power/sys/net80211/ieee80211_ioctl.h#3 integrate
.. //depot/projects/power/sys/net80211/ieee80211_node.c#4 integrate
.. //depot/projects/power/sys/net80211/ieee80211_proto.c#4 integrate
.. //depot/projects/power/sys/net80211/ieee80211_var.h#4 integrate
.. //depot/projects/power/sys/pci/if_sk.c#8 integrate
.. //depot/projects/power/sys/pci/if_skreg.h#5 integrate
.. //depot/projects/power/sys/powerpc/powermac/ata_kauai.c#2 integrate
.. //depot/projects/power/sys/sys/un.h#2 integrate

Differences ...

==== //depot/projects/power/sys/amd64/amd64/pmap.c#7 (text+ko) ====

@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.453 2004/03/07 21:06:47 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.454 2004/03/31 02:03:48 alc Exp $");
 
 /*
  *	Manages physical address maps.
@@ -2463,7 +2463,7 @@
 	vm_offset_t src = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(msrc));
 	vm_offset_t dst = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(mdst));
 
-	bcopy((void *)src, (void *)dst, PAGE_SIZE);
+	pagecopy((void *)src, (void *)dst);
 }
 
 /*

==== //depot/projects/power/sys/amd64/amd64/support.S#5 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.105 2003/11/27 17:20:44 peter Exp $
+ * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.106 2004/03/31 02:03:49 alc Exp $
  */
 
 #include "opt_ddb.h"
@@ -167,6 +167,32 @@
 	movsb
 	ret
 
+/*
+ * pagecopy(%rdi=from, %rsi=to)
+ */
+ENTRY(pagecopy)
+	movq	$-PAGE_SIZE,%rax
+	movq	%rax,%rdx
+	subq	%rax,%rdi
+	subq	%rax,%rsi
+1:
+	prefetchnta (%rdi,%rax)
+	addq	$64,%rax
+	jne	1b
+2:
+	movq	(%rdi,%rdx),%rax
+	movnti	%rax,(%rsi,%rdx)
+	movq	8(%rdi,%rdx),%rax
+	movnti	%rax,8(%rsi,%rdx)
+	movq	16(%rdi,%rdx),%rax
+	movnti	%rax,16(%rsi,%rdx)
+	movq	24(%rdi,%rdx),%rax
+	movnti	%rax,24(%rsi,%rdx)
+	addq	$32,%rdx
+	jne	2b
+	sfence
+	ret
+
 /* fillw(pat, base, cnt) */  
 /*       %rdi,%rsi, %rdx */
 ENTRY(fillw)

==== //depot/projects/power/sys/amd64/include/md_var.h#5 (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/amd64/include/md_var.h,v 1.71 2004/01/29 00:05:03 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/md_var.h,v 1.72 2004/03/31 02:03:49 alc Exp $
  */
 
 #ifndef _MACHINE_MD_VAR_H_
@@ -65,11 +65,12 @@
 void	doreti_iret_fault(void) __asm(__STRING(doreti_iret_fault));
 void	enable_sse(void);
 void	fillw(int /*u_short*/ pat, void *base, size_t cnt);
-void	pagezero(void *addr);
+void	fpstate_drop(struct thread *td);
 int	is_physical_memory(vm_offset_t addr);
 int	isa_nmi(int cd);
+void	pagecopy(void *from, void *to);
+void	pagezero(void *addr);
 void	setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist);
 int	user_dbreg_trap(void);
-void	fpstate_drop(struct thread *td);
 
 #endif /* !_MACHINE_MD_VAR_H_ */

==== //depot/projects/power/sys/conf/NOTES#8 (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.1210 2004/03/31 08:22:09 scottl 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
@@ -2385,8 +2398,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/power/sys/conf/options#8 (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.437 2004/03/31 08:22:09 scottl Exp $
 #
 #        On the handling of kernel options
 #
@@ -30,46 +30,18 @@
 # If filename is missing, the default is
 # opt_<name-of-option-in-lower-case>.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.
-
-# 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
+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
 
 # 3ware 9000 series RAID controller driver options
 TWA_DEBUG		opt_twa.h	# 0-10; 10 prints the most messages.

==== //depot/projects/power/sys/dev/acpica/acpi.c#12 (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.132 2004/03/31 17:23:46 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),
@@ -739,6 +700,55 @@
 }
 
 /*
+ * Location hint for devctl(8)
+ */
+ 
+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)
+ */
+
+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 = {ACPI_ALLOCATE_BUFFER, NULL}; 
+    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
  */
 static int
@@ -1201,7 +1211,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/power/sys/dev/acpica/acpi_pci.c#7 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__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.8 2004/03/31 17:27:19 takawata Exp $");
 
 #include "opt_bus.h"
 
@@ -65,6 +65,11 @@
 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);
 static ACPI_STATUS acpi_pci_save_handle(ACPI_HANDLE handle, UINT32 level,
@@ -96,7 +101,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),
@@ -136,6 +141,22 @@
     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);
+    int status;
+    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 (0);
+}
+
+#if 0
 /*
  * PCI power manangement
  */

==== //depot/projects/power/sys/dev/acpica/acpi_resource.c#4 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__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 <sys/param.h>
@@ -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/power/sys/dev/acpica/acpivar.h#8 (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"
@@ -199,7 +199,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);
@@ -222,7 +222,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/power/sys/dev/sound/pci/ich.c#4 (text+ko) ====

@@ -32,7 +32,7 @@
 #include <dev/pci/pcireg.h>
 #include <dev/pci/pcivar.h>
 
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ich.c,v 1.39 2004/03/17 17:50:44 njl Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ich.c,v 1.40 2004/03/31 00:11:24 matk Exp $");
 
 /* -------------------------------------------------------------------- */
 
@@ -693,12 +693,23 @@
 	}
 
 	/*
+	 * By default, ich4 has NAMBAR and NABMBAR i/o spaces as
+	 * read-only.  Need to enable "legacy support", by poking into
+	 * pci config space.  The driver should use MMBAR and MBBAR,
+	 * but doing so will mess things up here.  ich4 has enough new
+	 * features it warrants it's own driver. 
+	 */
+	if (pci_get_devid(dev) == ICH4ID) {
+		pci_write_config(dev, PCIR_ICH_LEGACY, ICH_LEGACY_ENABLE, 1);
+	}
+
+	/*
 	 * Enable bus master. On ich4/5 this may prevent the detection of
 	 * the primary codec becoming ready in ich_init().
 	 */
 	pci_enable_busmaster(dev);
 
-	if ((pci_get_devid(dev) == ICH4ID) || (pci_get_devid(dev) == ICH5ID)) {
+	if (pci_get_devid(dev) == ICH5ID) {
 		sc->nambarid = PCIR_MMBAR;
 		sc->nabmbarid = PCIR_MBBAR;
 		sc->regtype = SYS_RES_MEMORY;

==== //depot/projects/power/sys/fs/fifofs/fifo_vnops.c#3 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)fifo_vnops.c	8.10 (Berkeley) 5/27/95
- * $FreeBSD: src/sys/fs/fifofs/fifo_vnops.c,v 1.91 2003/11/16 01:11:11 truckman Exp $
+ * $FreeBSD: src/sys/fs/fifofs/fifo_vnops.c,v 1.92 2004/03/31 01:41:29 rwatson Exp $
  */
 
 #include <sys/param.h>
@@ -201,7 +201,7 @@
 		if (error)
 			goto fail2;
 		fip->fi_writesock = wso;
-		error = unp_connect2(wso, rso);
+		error = uipc_connect2(wso, rso);
 		if (error) {
 			(void)soclose(wso);
 fail2:

==== //depot/projects/power/sys/fs/portalfs/portal_vnops.c#3 (text+ko) ====

@@ -35,7 +35,7 @@
  *
  *	@(#)portal_vnops.c	8.14 (Berkeley) 5/21/95
  *
- * $FreeBSD: src/sys/fs/portalfs/portal_vnops.c,v 1.60 2004/03/01 03:14:21 rwatson Exp $
+ * $FreeBSD: src/sys/fs/portalfs/portal_vnops.c,v 1.61 2004/03/31 01:41:29 rwatson Exp $
  */
 
 /*
@@ -203,7 +203,7 @@
 		    M_NOWAIT);
 	so2 = so3;
 
-	return (unp_connect2(so, so2));
+	return (uipc_connect2(so, so2));
 }
 
 static int

==== //depot/projects/power/sys/kern/subr_trap.c#3 (text+ko) ====

@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__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/power/sys/kern/uipc_socket.c#7 (text+ko) ====

@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_socket.c,v 1.167 2004/03/29 18:06:15 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_socket.c,v 1.168 2004/03/31 03:48:35 rwatson Exp $");
 
 #include "opt_inet.h"
 #include "opt_mac.h"
@@ -283,6 +283,7 @@
 sofree(so)
 	struct socket *so;
 {
+	struct socket *head;
 	int s;
 
 	KASSERT(so->so_count == 0, ("socket %p so_count not 0", so));
@@ -290,7 +291,7 @@
 	if (so->so_pcb || (so->so_state & SS_NOFDREF) == 0)
 		return;
 	if (so->so_head != NULL) {
-		struct socket *head = so->so_head;
+		head = so->so_head;
 		if (so->so_state & SS_INCOMP) {
 			TAILQ_REMOVE(&head->so_incomp, so, so_list);
 			head->so_incqlen--;

==== //depot/projects/power/sys/kern/uipc_usrreq.c#6 (text+ko) ====

@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.118 2004/03/30 02:16:25 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.119 2004/03/31 01:41:29 rwatson Exp $");
 
 #include "opt_mac.h"
 
@@ -89,6 +89,7 @@
 static void    unp_detach(struct unpcb *);
 static int     unp_bind(struct unpcb *,struct sockaddr *, struct thread *);
 static int     unp_connect(struct socket *,struct sockaddr *, struct thread *);
+static int     unp_connect2(struct socket *so, struct socket *so2);
 static void    unp_disconnect(struct unpcb *);
 static void    unp_shutdown(struct unpcb *);
 static void    unp_drop(struct unpcb *, int);
@@ -167,7 +168,7 @@
 	return (unp_connect(so, nam, curthread));
 }
 
-static int
+int
 uipc_connect2(struct socket *so1, struct socket *so2)
 {
 	struct unpcb *unp = sotounpcb(so1);
@@ -765,7 +766,7 @@
 	return (error);
 }
 
-int
+static int
 unp_connect2(so, so2)
 	register struct socket *so;
 	register struct socket *so2;

==== //depot/projects/power/sys/net/bpf.h#6 (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 <kent@praesum.com>
+ * 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/power/sys/net80211/ieee80211_ioctl.c#5 (text+ko) ====

@@ -31,12 +31,15 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ioctl.c,v 1.11 2004/01/19 05:25:43 onoe Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ioctl.c,v 1.13 2004/03/30 22:57:57 sam Exp $");
 
 /*
  * IEEE 802.11 ioctl support (FreeBSD-specific)
  */
 
+#include "opt_inet.h"
+#include "opt_ipx.h"
+
 #include <sys/endian.h>
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -49,6 +52,16 @@
 #include <net/if_media.h>
 #include <net/ethernet.h>
 
+#ifdef INET
+#include <netinet/in.h>
+#include <netinet/if_ether.h>
+#endif
+
+#ifdef IPX
+#include <netipx/ipx.h>
+#include <netipx/ipx_if.h>
+#endif
+
 #include <net80211/ieee80211_var.h>
 #include <net80211/ieee80211_ioctl.h>
 
@@ -756,6 +769,7 @@
 	u_int8_t tmpkey[IEEE80211_KEYBUF_SIZE];
 	char tmpssid[IEEE80211_NWID_LEN];
 	struct ieee80211_channel *chan;
+	struct ifaddr *ifa;			/* XXX */
 
 	switch (cmd) {
 	case SIOCSIFMEDIA:
@@ -859,8 +873,18 @@
 		case IEEE80211_IOC_RTSTHRESHOLD:
 			ireq->i_val = ic->ic_rtsthreshold;
 			break;
+		case IEEE80211_IOC_PROTMODE:
+			ireq->i_val = ic->ic_protmode;
+			break;
+		case IEEE80211_IOC_TXPOWER:
+			if ((ic->ic_caps & IEEE80211_C_TXPMGT) == 0)
+				error = EINVAL;
+			else
+				ireq->i_val = ic->ic_txpower;
+			break;
 		default:
 			error = EINVAL;
+			break;
 		}
 		break;
 	case SIOCS80211:
@@ -1000,6 +1024,29 @@
 			ic->ic_rtsthreshold = ireq->i_val;
 			error = ENETRESET;
 			break;
+		case IEEE80211_IOC_PROTMODE:
+			if (ireq->i_val > IEEE80211_PROT_RTSCTS) {
+				error = EINVAL;
+				break;
+			}
+			ic->ic_protmode = ireq->i_val;
+			/* NB: if not operating in 11g this can wait */
+			if (ic->ic_curmode == IEEE80211_MODE_11G)
+				error = ENETRESET;
+			break;
+		case IEEE80211_IOC_TXPOWER:
+			if ((ic->ic_caps & IEEE80211_C_TXPMGT) == 0) {
+				error = EINVAL;
+				break;
+			}
+			if (!(IEEE80211_TXPOWER_MIN < ireq->i_val &&
+			      ireq->i_val < IEEE80211_TXPOWER_MAX)) {
+				error = EINVAL;
+				break;
+			}
+			ic->ic_txpower = ireq->i_val;
+			error = ENETRESET;
+			break;
 		default:
 			error = EINVAL;
 			break;
@@ -1026,6 +1073,51 @@
 		else
 			ifp->if_mtu = ifr->ifr_mtu;
 		break;
+	case SIOCSIFADDR:
+		/*
+		 * XXX Handle this directly so we can supress if_init calls.
+		 * XXX This should be done in ether_ioctl but for the moment
+		 * XXX there are too many other parts of the system that
+		 * XXX set IFF_UP and so supress if_init being called when
+		 * XXX it should be.
+		 */
+		ifa = (struct ifaddr *) data;
+		switch (ifa->ifa_addr->sa_family) {
+#ifdef INET
+		case AF_INET:
+			if ((ifp->if_flags & IFF_UP) == 0) {
+				ifp->if_flags |= IFF_UP;
+				ifp->if_init(ifp->if_softc);
+			}
+			arp_ifinit(ifp, ifa);
+			break;
+#endif
+#ifdef IPX
+		/*
+		 * XXX - This code is probably wrong,
+		 *	 but has been copied many times.
+		 */
+		case AF_IPX: {
+			struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr);
+			struct arpcom *ac = (struct arpcom *)ifp;
+
+			if (ipx_nullhost(*ina))
+				ina->x_host = *(union ipx_host *) ac->ac_enaddr;
+			else
+				bcopy((caddr_t) ina->x_host.c_host,
+				      (caddr_t) ac->ac_enaddr,
+				      sizeof(ac->ac_enaddr));
+			/* fall thru... */
+		}
+#endif
+		default:
+			if ((ifp->if_flags & IFF_UP) == 0) {
+				ifp->if_flags |= IFF_UP;
+				ifp->if_init(ifp->if_softc);
+			}
+			break;
+		}
+		break;
 	default:
 		error = ether_ioctl(ifp, cmd, data);
 		break;

==== //depot/projects/power/sys/net80211/ieee80211_ioctl.h#3 (text+ko) ====


>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403312152.i2VLqe6X003070>