PERFORCE change 106356 for review
Matt Jacob
mjacob at FreeBSD.org
Tue Sep 19 13:07:45 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=106356
Change 106356 by mjacob at newisp on 2006/09/19 20:06:34
IFC
Affected files ...
.. //depot/projects/newisp/amd64/amd64/vm_machdep.c#2 integrate
.. //depot/projects/newisp/cam/cam_xpt.c#3 integrate
.. //depot/projects/newisp/cam/scsi/scsi_da.c#2 integrate
.. //depot/projects/newisp/compat/freebsd32/freebsd32_proto.h#4 integrate
.. //depot/projects/newisp/compat/freebsd32/freebsd32_syscall.h#4 integrate
.. //depot/projects/newisp/compat/freebsd32/freebsd32_syscalls.c#4 integrate
.. //depot/projects/newisp/compat/freebsd32/freebsd32_sysent.c#4 integrate
.. //depot/projects/newisp/compat/freebsd32/syscalls.master#4 integrate
.. //depot/projects/newisp/conf/files#2 integrate
.. //depot/projects/newisp/conf/kern.pre.mk#2 integrate
.. //depot/projects/newisp/contrib/dev/ath/freebsd/ah_if.m#2 delete
.. //depot/projects/newisp/contrib/dev/ath/freebsd/ah_osdep.c#2 delete
.. //depot/projects/newisp/contrib/dev/ath/freebsd/ah_osdep.h#2 delete
.. //depot/projects/newisp/dev/ath/ah_osdep.c#1 branch
.. //depot/projects/newisp/dev/ath/ah_osdep.h#1 branch
.. //depot/projects/newisp/dev/ath/if_ath.c#2 integrate
.. //depot/projects/newisp/dev/ath/if_athvar.h#2 integrate
.. //depot/projects/newisp/dev/bce/if_bce.c#2 integrate
.. //depot/projects/newisp/dev/bge/if_bge.c#5 integrate
.. //depot/projects/newisp/dev/bktr/bktr_i2c.h#2 integrate
.. //depot/projects/newisp/dev/em/if_em.c#7 integrate
.. //depot/projects/newisp/dev/hwpmc/hwpmc_mod.c#2 integrate
.. //depot/projects/newisp/dev/ixgb/if_ixgb.c#2 integrate
.. //depot/projects/newisp/dev/kbdmux/kbdmux.c#2 integrate
.. //depot/projects/newisp/dev/nfe/if_nfe.c#3 integrate
.. //depot/projects/newisp/dev/nge/if_nge.c#3 integrate
.. //depot/projects/newisp/dev/re/if_re.c#4 integrate
.. //depot/projects/newisp/dev/stge/if_stge.c#2 integrate
.. //depot/projects/newisp/dev/ti/if_ti.c#3 integrate
.. //depot/projects/newisp/dev/txp/if_txp.c#2 integrate
.. //depot/projects/newisp/dev/uart/uart_kbd_sun.c#2 integrate
.. //depot/projects/newisp/dev/vge/if_vge.c#3 integrate
.. //depot/projects/newisp/fs/devfs/devfs.h#2 integrate
.. //depot/projects/newisp/fs/devfs/devfs_devs.c#2 integrate
.. //depot/projects/newisp/fs/devfs/devfs_vfsops.c#2 integrate
.. //depot/projects/newisp/fs/devfs/devfs_vnops.c#2 integrate
.. //depot/projects/newisp/kern/init_sysent.c#4 integrate
.. //depot/projects/newisp/kern/kern_acct.c#2 integrate
.. //depot/projects/newisp/kern/kern_jail.c#2 integrate
.. //depot/projects/newisp/kern/kern_mbuf.c#2 integrate
.. //depot/projects/newisp/kern/kern_proc.c#2 integrate
.. //depot/projects/newisp/kern/kern_prot.c#2 integrate
.. //depot/projects/newisp/kern/subr_prf.c#2 integrate
.. //depot/projects/newisp/kern/syscalls.c#4 integrate
.. //depot/projects/newisp/kern/syscalls.master#4 integrate
.. //depot/projects/newisp/kern/systrace_args.c#4 integrate
.. //depot/projects/newisp/kern/vfs_mount.c#2 integrate
.. //depot/projects/newisp/kern/vfs_syscalls.c#2 integrate
.. //depot/projects/newisp/modules/ath/Makefile#2 integrate
.. //depot/projects/newisp/modules/ath_hal/Makefile#2 integrate
.. //depot/projects/newisp/modules/ath_rate_amrr/Makefile#2 integrate
.. //depot/projects/newisp/modules/ath_rate_onoe/Makefile#2 integrate
.. //depot/projects/newisp/modules/ath_rate_sample/Makefile#2 integrate
.. //depot/projects/newisp/net/if_bridge.c#2 integrate
.. //depot/projects/newisp/net/if_vlan.c#2 integrate
.. //depot/projects/newisp/net/if_vlan_var.h#2 integrate
.. //depot/projects/newisp/net80211/ieee80211_input.c#2 integrate
.. //depot/projects/newisp/net80211/ieee80211_output.c#2 integrate
.. //depot/projects/newisp/netgraph/ng_vlan.c#2 integrate
.. //depot/projects/newisp/netinet/tcp_usrreq.c#2 integrate
.. //depot/projects/newisp/security/audit/audit.c#4 integrate
.. //depot/projects/newisp/security/audit/audit_bsm.c#4 integrate
.. //depot/projects/newisp/security/audit/audit_private.h#3 integrate
.. //depot/projects/newisp/security/audit/audit_syscalls.c#3 integrate
.. //depot/projects/newisp/security/audit/audit_worker.c#2 integrate
.. //depot/projects/newisp/security/mac/mac_internal.h#2 integrate
.. //depot/projects/newisp/sys/mbuf.h#4 integrate
.. //depot/projects/newisp/sys/syscall.h#4 integrate
.. //depot/projects/newisp/sys/syscall.mk#4 integrate
.. //depot/projects/newisp/sys/sysctl.h#2 integrate
.. //depot/projects/newisp/sys/sysproto.h#4 integrate
.. //depot/projects/newisp/ufs/ufs/ufs_quota.c#2 integrate
Differences ...
==== //depot/projects/newisp/amd64/amd64/vm_machdep.c#2 (text+ko) ====
@@ -41,10 +41,11 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.251 2006/07/24 12:24:56 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.252 2006/09/17 14:54:14 davidxu Exp $");
#include "opt_isa.h"
#include "opt_cpu.h"
+#include "opt_compat.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -69,6 +70,7 @@
#include <machine/cpu.h>
#include <machine/md_var.h>
#include <machine/pcb.h>
+#include <machine/specialreg.h>
#include <vm/vm.h>
#include <vm/vm_extern.h>
@@ -79,6 +81,12 @@
#include <amd64/isa/isa.h>
+#ifdef COMPAT_IA32
+
+extern struct sysentvec ia32_freebsd_sysvec;
+
+#endif
+
static void cpu_reset_real(void);
#ifdef SMP
static void cpu_reset_proxy(void);
@@ -320,6 +328,28 @@
*/
cpu_thread_clean(td);
+#ifdef COMPAT_IA32
+ if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) {
+ /*
+ * Set the trap frame to point at the beginning of the uts
+ * function.
+ */
+ td->td_frame->tf_rbp = 0;
+ td->td_frame->tf_rsp =
+ (((uintptr_t)stack->ss_sp + stack->ss_size - 4) & ~0x0f) - 4;
+ td->td_frame->tf_rip = (uintptr_t)entry;
+
+ /*
+ * Pass the address of the mailbox for this kse to the uts
+ * function as a parameter on the stack.
+ */
+ suword32((void *)(td->td_frame->tf_rsp + sizeof(int32_t)),
+ (uint32_t)(uintptr_t)arg);
+
+ return;
+ }
+#endif
+
/*
* Set the trap frame to point at the beginning of the uts
* function.
@@ -344,6 +374,19 @@
if ((u_int64_t)tls_base >= VM_MAXUSER_ADDRESS)
return (EINVAL);
+#ifdef COMPAT_IA32
+ if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) {
+ if (td == curthread) {
+ critical_enter();
+ td->td_pcb->pcb_gsbase = (register_t)tls_base;
+ wrmsr(MSR_KGSBASE, td->td_pcb->pcb_gsbase);
+ critical_exit();
+ } else {
+ td->td_pcb->pcb_gsbase = (register_t)tls_base;
+ }
+ return (0);
+ }
+#endif
if (td == curthread) {
critical_enter();
td->td_pcb->pcb_fsbase = (register_t)tls_base;
==== //depot/projects/newisp/cam/cam_xpt.c#3 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.164 2006/09/11 17:57:23 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.165 2006/09/16 17:35:47 mjacob Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -592,6 +592,10 @@
CAM_QUIRK_NOHILUNS, /*mintags*/2, /*maxtags*/255
},
{
+ { T_ENCLOSURE, SIP_MEDIA_FIXED, "DP", "BACKPLANE", "*" },
+ CAM_QUIRK_NOLUNS, /*mintags*/0, /*maxtags*/0
+ },
+ {
/* Default tagged queuing parameters for all devices */
{
T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED,
==== //depot/projects/newisp/cam/scsi/scsi_da.c#2 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.191 2006/07/14 13:58:32 delphij Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.192 2006/09/16 21:21:07 mjacob Exp $");
#include <sys/param.h>
@@ -1519,15 +1519,30 @@
block_size = scsi_4btoul(rcaplong->length);
maxsector = scsi_8btou64(rcaplong->addr);
}
- dasetgeom(periph, block_size, maxsector);
- dp = &softc->params;
- snprintf(announce_buf, sizeof(announce_buf),
- "%juMB (%ju %u byte sectors: %dH %dS/T %dC)",
- (uintmax_t) (((uintmax_t)dp->secsize *
- dp->sectors) / (1024*1024)),
- (uintmax_t)dp->sectors,
- dp->secsize, dp->heads, dp->secs_per_track,
- dp->cylinders);
+
+ /*
+ * Because GEOM code just will panic us if we
+ * give them an 'illegal' value we'll avoid that
+ * here.
+ */
+ if (block_size >= MAXPHYS || block_size == 0) {
+ xpt_print_path(periph->path);
+ printf("unsupportable block size %ju\n",
+ (uintmax_t) block_size);
+ announce_buf[0] = '\0';
+ cam_periph_invalidate(periph);
+ } else {
+ dasetgeom(periph, block_size, maxsector);
+ dp = &softc->params;
+ snprintf(announce_buf, sizeof(announce_buf),
+ "%juMB (%ju %u byte sectors: %dH %dS/T "
+ "%dC)", (uintmax_t)
+ (((uintmax_t)dp->secsize *
+ dp->sectors) / (1024*1024)),
+ (uintmax_t)dp->sectors,
+ dp->secsize, dp->heads,
+ dp->secs_per_track, dp->cylinders);
+ }
} else {
int error;
==== //depot/projects/newisp/compat/freebsd32/freebsd32_proto.h#4 (text+ko) ====
@@ -2,8 +2,8 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.61 2006/09/09 01:22:13 davidxu Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.73 2006/09/03 16:17:49 rwatson Exp
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.62 2006/09/17 13:29:35 rwatson Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp
*/
#ifndef _FREEBSD32_SYSPROTO_H_
@@ -419,7 +419,7 @@
#define FREEBSD32_SYS_AUE_freebsd32_recvmsg AUE_RECVMSG
#define FREEBSD32_SYS_AUE_freebsd32_sendmsg AUE_SENDMSG
#define FREEBSD32_SYS_AUE_freebsd32_recvfrom AUE_RECVFROM
-#define FREEBSD32_SYS_AUE_freebsd32_sigaltstack AUE_SIGPENDING
+#define FREEBSD32_SYS_AUE_freebsd32_sigaltstack AUE_SIGALTSTACK
#define FREEBSD32_SYS_AUE_freebsd32_execve AUE_EXECVE
#define FREEBSD32_SYS_AUE_freebsd32_setitimer AUE_SETITIMER
#define FREEBSD32_SYS_AUE_freebsd32_getitimer AUE_GETITIMER
==== //depot/projects/newisp/compat/freebsd32/freebsd32_syscall.h#4 (text+ko) ====
@@ -2,8 +2,8 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.59 2006/09/09 01:22:13 davidxu Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.73 2006/09/03 16:17:49 rwatson Exp
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.60 2006/09/17 13:29:35 rwatson Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp
*/
#define FREEBSD32_SYS_syscall 0
==== //depot/projects/newisp/compat/freebsd32/freebsd32_syscalls.c#4 (text+ko) ====
@@ -2,8 +2,8 @@
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.50 2006/09/09 01:22:13 davidxu Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.73 2006/09/03 16:17:49 rwatson Exp
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.51 2006/09/17 13:29:35 rwatson Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp
*/
const char *freebsd32_syscallnames[] = {
==== //depot/projects/newisp/compat/freebsd32/freebsd32_sysent.c#4 (text+ko) ====
@@ -2,8 +2,8 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.60 2006/09/09 01:22:13 davidxu Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.73 2006/09/03 16:17:49 rwatson Exp
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.61 2006/09/17 13:29:35 rwatson Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp
*/
#include "opt_compat.h"
@@ -85,7 +85,7 @@
{ AS(setlogin_args), (sy_call_t *)setlogin, AUE_SETLOGIN, NULL, 0, 0 }, /* 50 = setlogin */
{ AS(acct_args), (sy_call_t *)acct, AUE_ACCT, NULL, 0, 0 }, /* 51 = acct */
{ compat(0,freebsd32_sigpending), AUE_SIGPENDING, NULL, 0, 0 }, /* 52 = old freebsd32_sigpending */
- { AS(freebsd32_sigaltstack_args), (sy_call_t *)freebsd32_sigaltstack, AUE_SIGPENDING, NULL, 0, 0 }, /* 53 = freebsd32_sigaltstack */
+ { AS(freebsd32_sigaltstack_args), (sy_call_t *)freebsd32_sigaltstack, AUE_SIGALTSTACK, NULL, 0, 0 }, /* 53 = freebsd32_sigaltstack */
{ AS(ioctl_args), (sy_call_t *)ioctl, AUE_IOCTL, NULL, 0, 0 }, /* 54 = ioctl */
{ AS(reboot_args), (sy_call_t *)reboot, AUE_REBOOT, NULL, 0, 0 }, /* 55 = reboot */
{ AS(revoke_args), (sy_call_t *)revoke, AUE_REVOKE, NULL, 0, 0 }, /* 56 = revoke */
==== //depot/projects/newisp/compat/freebsd32/syscalls.master#4 (text+ko) ====
@@ -1,4 +1,4 @@
- $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.74 2006/09/09 01:22:13 davidxu Exp $
+ $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp $
; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94
; from: src/sys/kern/syscalls.master 1.107
;
@@ -124,7 +124,7 @@
50 AUE_SETLOGIN NOPROTO { int setlogin(char *namebuf); }
51 AUE_ACCT NOPROTO { int acct(char *path); }
52 AUE_SIGPENDING COMPAT { int freebsd32_sigpending(void); }
-53 AUE_SIGPENDING STD { int freebsd32_sigaltstack( \
+53 AUE_SIGALTSTACK STD { int freebsd32_sigaltstack( \
struct sigaltstack32 *ss, \
struct sigaltstack32 *oss); }
54 AUE_IOCTL NOPROTO { int ioctl(int fd, u_long com, \
==== //depot/projects/newisp/conf/files#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1140 2006/08/14 21:09:37 imp Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1142 2006/09/18 17:23:35 sam Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -255,8 +255,6 @@
contrib/dev/acpica/utobject.c optional acpi
contrib/dev/acpica/utstate.c optional acpi
contrib/dev/acpica/utxface.c optional acpi
-contrib/dev/ath/freebsd/ah_osdep.c optional ath_hal \
- compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd"
contrib/ipfilter/netinet/fil.c optional ipfilter inet \
compile-with "${NORMAL_C} -I$S/contrib/ipfilter"
contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \
@@ -478,15 +476,17 @@
dev/ata/atapi-cd.c optional atapicd
dev/ata/atapi-fd.c optional atapifd
dev/ata/atapi-tape.c optional atapist
+dev/ath/ah_osdep.c optional ath_hal \
+ compile-with "${NORMAL_C} -I$S/dev/ath"
dev/ath/ath_rate/amrr/amrr.c optional ath_rate_amrr
dev/ath/ath_rate/onoe/onoe.c optional ath_rate_onoe \
- compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd"
+ compile-with "${NORMAL_C} -I$S/dev/ath"
dev/ath/ath_rate/sample/sample.c optional ath_rate_sample \
- compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd"
+ compile-with "${NORMAL_C} -I$S/dev/ath"
dev/ath/if_ath.c optional ath \
- compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd"
+ compile-with "${NORMAL_C} -I$S/dev/ath"
dev/ath/if_ath_pci.c optional ath pci \
- compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd"
+ compile-with "${NORMAL_C} -I$S/dev/ath"
dev/awi/am79c930.c optional awi
dev/awi/awi.c optional awi
dev/awi/if_awi_pccard.c optional awi pccard
==== //depot/projects/newisp/conf/kern.pre.mk#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.76 2006/07/17 18:43:16 obrien Exp $
+# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.78 2006/09/18 16:49:14 sam Exp $
# Part of a unified Makefile for building kernels. This part contains all
# of the definitions that need to be before %BEFORE_DEPEND.
@@ -58,12 +58,6 @@
# include path into contrib'ed source files.
INCLUDES+= -I$S/contrib/altq
-# ... and the same for Atheros HAL when the author builds it from
-# non-distributable sources.
-.if defined(ATH_BUILDING_FROM_SOURCE)
-INCLUDES+= -I$S/contrib/dev/ath
-.endif
-
.if make(depend) || make(kernel-depend)
# ... and the same for ipfilter
@@ -73,7 +67,7 @@
INCLUDES+= -I$S/contrib/pf
# ... and the same for Atheros HAL
-INCLUDES+= -I$S/contrib/dev/ath/freebsd
+INCLUDES+= -I$S/dev/ath
# ... and the same for the NgATM stuff
INCLUDES+= -I$S/contrib/ngatm
==== //depot/projects/newisp/dev/ath/if_ath.c#2 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.153 2006/08/10 16:31:37 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.155 2006/09/18 16:26:19 sam Exp $");
/*
* Driver for the Atheros Wireless LAN controller.
@@ -117,7 +117,6 @@
static void ath_fatal_proc(void *, int);
static void ath_rxorn_proc(void *, int);
static void ath_bmiss_proc(void *, int);
-static void ath_radar_proc(void *, int);
static int ath_key_alloc(struct ieee80211com *,
const struct ieee80211_key *,
ieee80211_keyix *, ieee80211_keyix *);
@@ -257,7 +256,7 @@
} while (0)
#define KEYPRINTF(sc, ix, hk, mac) do { \
if (sc->sc_debug & ATH_DEBUG_KEYCACHE) \
- ath_keyprint(__func__, ix, hk, mac); \
+ ath_keyprint(sc, __func__, ix, hk, mac); \
} while (0)
static void ath_printrxbuf(struct ath_buf *bf, u_int ix, int);
static void ath_printtxbuf(struct ath_buf *bf, u_int qnum, u_int ix, int done);
@@ -345,18 +344,6 @@
*/
for (i = 0; i < sc->sc_keymax; i++)
ath_hal_keyreset(ah, i);
- /*
- * Mark key cache slots associated with global keys
- * as in use. If we knew TKIP was not to be used we
- * could leave the +32, +64, and +32+64 slots free.
- * XXX only for splitmic.
- */
- for (i = 0; i < IEEE80211_WEP_NKID; i++) {
- setbit(sc->sc_keymap, i);
- setbit(sc->sc_keymap, i+32);
- setbit(sc->sc_keymap, i+64);
- setbit(sc->sc_keymap, i+32+64);
- }
/*
* Collect the channel list using the default country
@@ -403,7 +390,6 @@
TASK_INIT(&sc->sc_rxorntask, 0, ath_rxorn_proc, sc);
TASK_INIT(&sc->sc_bmisstask, 0, ath_bmiss_proc, sc);
TASK_INIT(&sc->sc_bstucktask,0, ath_bstuck_proc, sc);
- TASK_INIT(&sc->sc_radartask, 0, ath_radar_proc, sc);
/*
* Allocate hardware transmit queues: one queue for
@@ -545,12 +531,30 @@
*/
if (ath_hal_ciphersupported(ah, HAL_CIPHER_MIC))
ic->ic_caps |= IEEE80211_C_TKIPMIC;
- if (ath_hal_tkipsplit(ah))
+ /*
+ * If the h/w supports storing tx+rx MIC keys
+ * in one cache slot automatically enable use.
+ */
+ if (ath_hal_hastkipsplit(ah) ||
+ !ath_hal_settkipsplit(ah, AH_FALSE))
sc->sc_splitmic = 1;
}
sc->sc_hasclrkey = ath_hal_ciphersupported(ah, HAL_CIPHER_CLR);
sc->sc_mcastkey = ath_hal_getmcastkeysearch(ah);
/*
+ * Mark key cache slots associated with global keys
+ * as in use. If we knew TKIP was not to be used we
+ * could leave the +32, +64, and +32+64 slots free.
+ */
+ for (i = 0; i < IEEE80211_WEP_NKID; i++) {
+ setbit(sc->sc_keymap, i);
+ setbit(sc->sc_keymap, i+64);
+ if (sc->sc_splitmic) {
+ setbit(sc->sc_keymap, i+32);
+ setbit(sc->sc_keymap, i+32+64);
+ }
+ }
+ /*
* TPC support can be done either with a global cap or
* per-packet support. The latter is not available on
* all parts. We're a bit pedantic here as all parts
@@ -878,24 +882,6 @@
}
}
-static void
-ath_radar_proc(void *arg, int pending)
-{
- struct ath_softc *sc = arg;
- struct ifnet *ifp = sc->sc_ifp;
- struct ath_hal *ah = sc->sc_ah;
- HAL_CHANNEL hchan;
-
- if (ath_hal_procdfs(ah, &hchan)) {
- if_printf(ifp, "radar detected on channel %u/0x%x/0x%x\n",
- hchan.channel, hchan.channelFlags, hchan.privFlags);
- /*
- * Initiate channel change.
- */
- /* XXX not yet */
- }
-}
-
static u_int
ath_chan2flags(struct ieee80211com *ic, struct ieee80211_channel *chan)
{
@@ -1323,7 +1309,7 @@
#ifdef ATH_DEBUG
static void
-ath_keyprint(const char *tag, u_int ix,
+ath_keyprint(struct ath_softc *sc, const char *tag, u_int ix,
const HAL_KEYVAL *hk, const u_int8_t mac[IEEE80211_ADDR_LEN])
{
static const char *ciphers[] = {
@@ -1341,9 +1327,16 @@
printf("%02x", hk->kv_val[i]);
printf(" mac %s", ether_sprintf(mac));
if (hk->kv_type == HAL_CIPHER_TKIP) {
- printf(" mic ");
+ printf(" %s ", sc->sc_splitmic ? "mic" : "rxmic");
for (i = 0; i < sizeof(hk->kv_mic); i++)
printf("%02x", hk->kv_mic[i]);
+#if HAL_ABI_VERSION > 0x06052200
+ if (!sc->sc_splitmic) {
+ printf(" txmic ");
+ for (i = 0; i < sizeof(hk->kv_txmic); i++)
+ printf("%02x", hk->kv_txmic[i]);
+ }
+#endif
}
printf("\n");
}
@@ -1364,21 +1357,34 @@
KASSERT(k->wk_cipher->ic_cipher == IEEE80211_CIPHER_TKIP,
("got a non-TKIP key, cipher %u", k->wk_cipher->ic_cipher));
- KASSERT(sc->sc_splitmic, ("key cache !split"));
if ((k->wk_flags & IEEE80211_KEY_XR) == IEEE80211_KEY_XR) {
- /*
- * TX key goes at first index, RX key at the rx index.
- * The hal handles the MIC keys at index+64.
- */
- memcpy(hk->kv_mic, k->wk_txmic, sizeof(hk->kv_mic));
- KEYPRINTF(sc, k->wk_keyix, hk, zerobssid);
- if (!ath_hal_keyset(ah, k->wk_keyix, hk, zerobssid))
- return 0;
+ if (sc->sc_splitmic) {
+ /*
+ * TX key goes at first index, RX key at the rx index.
+ * The hal handles the MIC keys at index+64.
+ */
+ memcpy(hk->kv_mic, k->wk_txmic, sizeof(hk->kv_mic));
+ KEYPRINTF(sc, k->wk_keyix, hk, zerobssid);
+ if (!ath_hal_keyset(ah, k->wk_keyix, hk, zerobssid))
+ return 0;
- memcpy(hk->kv_mic, k->wk_rxmic, sizeof(hk->kv_mic));
- KEYPRINTF(sc, k->wk_keyix+32, hk, mac);
- /* XXX delete tx key on failure? */
- return ath_hal_keyset(ah, k->wk_keyix+32, hk, mac);
+ memcpy(hk->kv_mic, k->wk_rxmic, sizeof(hk->kv_mic));
+ KEYPRINTF(sc, k->wk_keyix+32, hk, mac);
+ /* XXX delete tx key on failure? */
+ return ath_hal_keyset(ah, k->wk_keyix+32, hk, mac);
+ } else {
+ /*
+ * Room for both TX+RX MIC keys in one key cache
+ * slot, just set key at the first index; the hal
+ * will handle the reset.
+ */
+ memcpy(hk->kv_mic, k->wk_rxmic, sizeof(hk->kv_mic));
+#if HAL_ABI_VERSION > 0x06052200
+ memcpy(hk->kv_txmic, k->wk_txmic, sizeof(hk->kv_txmic));
+#endif
+ KEYPRINTF(sc, k->wk_keyix, hk, mac);
+ return ath_hal_keyset(ah, k->wk_keyix, hk, mac);
+ }
} else if (k->wk_flags & IEEE80211_KEY_XR) {
/*
* TX/RX key goes at first index.
@@ -1447,8 +1453,7 @@
mac = mac0;
if (hk.kv_type == HAL_CIPHER_TKIP &&
- (k->wk_flags & IEEE80211_KEY_SWMIC) == 0 &&
- sc->sc_splitmic) {
+ (k->wk_flags & IEEE80211_KEY_SWMIC) == 0) {
return ath_keyset_tkip(sc, k, &hk, mac);
} else {
KEYPRINTF(sc, k->wk_keyix, &hk, mac);
@@ -1513,6 +1518,54 @@
}
/*
+ * Allocate tx/rx key slots for TKIP. We allocate two slots for
+ * each key, one for decrypt/encrypt and the other for the MIC.
+ */
+static u_int16_t
+key_alloc_pair(struct ath_softc *sc,
+ ieee80211_keyix *txkeyix, ieee80211_keyix *rxkeyix)
+{
+#define N(a) (sizeof(a)/sizeof(a[0]))
+ u_int i, keyix;
+
+ KASSERT(!sc->sc_splitmic, ("key cache split"));
+ /* XXX could optimize */
+ for (i = 0; i < N(sc->sc_keymap)/4; i++) {
+ u_int8_t b = sc->sc_keymap[i];
+ if (b != 0xff) {
+ /*
+ * One or more slots in this byte are free.
+ */
+ keyix = i*NBBY;
+ while (b & 1) {
+ again:
+ keyix++;
+ b >>= 1;
+ }
+ if (isset(sc->sc_keymap, keyix+64)) {
+ /* full pair unavailable */
+ /* XXX statistic */
+ if (keyix == (i+1)*NBBY) {
+ /* no slots were appropriate, advance */
+ continue;
+ }
+ goto again;
+ }
+ setbit(sc->sc_keymap, keyix);
+ setbit(sc->sc_keymap, keyix+64);
+ DPRINTF(sc, ATH_DEBUG_KEYCACHE,
+ "%s: key pair %u,%u\n",
+ __func__, keyix, keyix+64);
+ *txkeyix = *rxkeyix = keyix;
+ return 1;
+ }
+ }
+ DPRINTF(sc, ATH_DEBUG_KEYCACHE, "%s: out of pair space\n", __func__);
+ return 0;
+#undef N
+}
+
+/*
* Allocate a single key cache slot.
*/
static int
@@ -1597,8 +1650,11 @@
if (k->wk_flags & IEEE80211_KEY_SWCRYPT) {
return key_alloc_single(sc, keyix, rxkeyix);
} else if (k->wk_cipher->ic_cipher == IEEE80211_CIPHER_TKIP &&
- (k->wk_flags & IEEE80211_KEY_SWMIC) == 0 && sc->sc_splitmic) {
- return key_alloc_2pair(sc, keyix, rxkeyix);
+ (k->wk_flags & IEEE80211_KEY_SWMIC) == 0) {
+ if (sc->sc_splitmic)
+ return key_alloc_2pair(sc, keyix, rxkeyix);
+ else
+ return key_alloc_pair(sc, keyix, rxkeyix);
} else {
return key_alloc_single(sc, keyix, rxkeyix);
}
@@ -1631,11 +1687,13 @@
*/
clrbit(sc->sc_keymap, keyix);
if (cip->ic_cipher == IEEE80211_CIPHER_TKIP &&
- (k->wk_flags & IEEE80211_KEY_SWMIC) == 0 &&
- sc->sc_splitmic) {
+ (k->wk_flags & IEEE80211_KEY_SWMIC) == 0) {
clrbit(sc->sc_keymap, keyix+64); /* TX key MIC */
- clrbit(sc->sc_keymap, keyix+32); /* RX key */
- clrbit(sc->sc_keymap, keyix+32+64); /* RX key MIC */
+ if (sc->sc_splitmic) {
+ /* +32 for RX key, +32+64 for RX key MIC */
+ clrbit(sc->sc_keymap, keyix+32);
+ clrbit(sc->sc_keymap, keyix+32+64);
+ }
}
}
return 1;
@@ -3082,8 +3140,6 @@
/* rx signal state monitoring */
ath_hal_rxmonitor(ah, &sc->sc_halstats, &sc->sc_curchan);
- if (ath_hal_radar_event(ah))
- taskqueue_enqueue(sc->sc_tq, &sc->sc_radartask);
if (ngood)
sc->sc_lastrx = tsf;
==== //depot/projects/newisp/dev/ath/if_athvar.h#2 (text+ko) ====
@@ -33,7 +33,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGES.
*
- * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.51 2006/08/17 22:50:32 imp Exp $
+ * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.53 2006/09/18 16:26:19 sam Exp $
*/
/*
@@ -256,7 +256,6 @@
u_int32_t *sc_rxlink; /* link ptr in last RX desc */
struct task sc_rxtask; /* rx int processing */
struct task sc_rxorntask; /* rxorn int processing */
- struct task sc_radartask; /* radar processing */
u_int8_t sc_defant; /* current default antenna */
u_int8_t sc_rxotherant; /* rx's on non-default antenna*/
u_int64_t sc_lastrx; /* tsf at last rx'd frame */
@@ -464,8 +463,12 @@
((*(_ah)->ah_setRegulatoryDomain)((_ah), (_rd), NULL))
#define ath_hal_getcountrycode(_ah, _pcc) \
(*(_pcc) = (_ah)->ah_countryCode)
-#define ath_hal_tkipsplit(_ah) \
+#define ath_hal_hastkipsplit(_ah) \
(ath_hal_getcapability(_ah, HAL_CAP_TKIP_SPLIT, 0, NULL) == HAL_OK)
+#define ath_hal_gettkipsplit(_ah) \
+ (ath_hal_getcapability(_ah, HAL_CAP_TKIP_SPLIT, 1, NULL) == HAL_OK)
+#define ath_hal_settkipsplit(_ah, _v) \
+ ath_hal_setcapability(_ah, HAL_CAP_TKIP_SPLIT, 1, _v, NULL)
#define ath_hal_hwphycounters(_ah) \
(ath_hal_getcapability(_ah, HAL_CAP_PHYCOUNTERS, 0, NULL) == HAL_OK)
#define ath_hal_hasdiversity(_ah) \
@@ -575,12 +578,6 @@
#define ath_hal_gpiosetintr(_ah, _gpio, _b) \
((*(_ah)->ah_gpioSetIntr)((_ah), (_gpio), (_b)))
-#define ath_hal_radar_event(_ah) \
- ((*(_ah)->ah_radarHaveEvent)((_ah)))
-#define ath_hal_procdfs(_ah, _chan) \
- ((*(_ah)->ah_processDfs)((_ah), (_chan)))
-#define ath_hal_checknol(_ah, _chan, _nchans) \
- ((*(_ah)->ah_dfsNolCheck)((_ah), (_chan), (_nchans)))
#define ath_hal_radar_wait(_ah, _chan) \
((*(_ah)->ah_radarWait)((_ah), (_chan)))
==== //depot/projects/newisp/dev/bce/if_bce.c#2 (text) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.7 2006/08/15 04:56:29 julian Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.8 2006/09/17 13:33:27 andre Exp $");
/*
* The following controllers are supported by this driver:
@@ -4251,9 +4251,8 @@
#if __FreeBSD_version < 700000
VLAN_INPUT_TAG(ifp, m, l2fhdr->l2_fhdr_vlan_tag, continue);
#else
- VLAN_INPUT_TAG(ifp, m, l2fhdr->l2_fhdr_vlan_tag);
- if (m == NULL)
- continue;
+ m->m_pkthdr.ether_vtag = l2fhdr->l2_fhdr_vlan_tag;
+ m->m_flags |= M_VLANTAG;
#endif
}
@@ -4600,7 +4599,6 @@
u16 *chain_prod, u32 *prod_bseq)
{
u32 vlan_tag_flags = 0;
- struct m_tag *mtag;
struct bce_dmamap_arg map_arg;
bus_dmamap_t map;
int i, error, rc = 0;
@@ -4614,10 +4612,9 @@
}
/* Transfer any VLAN tags to the bd. */
- mtag = VLAN_OUTPUT_TAG(sc->bce_ifp, m_head);
- if (mtag != NULL)
+ if (m_head->m_flags & M_VLANTAG)
vlan_tag_flags |= (TX_BD_FLAGS_VLAN_TAG |
- (VLAN_TAG_VALUE(mtag) << 16));
+ (m_head->m_pkthdr.ether_vtag << 16));
/* Map the mbuf into DMAable memory. */
map = sc->tx_mbuf_map[*chain_prod];
==== //depot/projects/newisp/dev/bge/if_bge.c#5 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.145 2006/09/15 15:16:10 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.148 2006/09/18 22:18:21 jkim Exp $");
/*
* Broadcom BCM570x family gigabit ethernet driver for FreeBSD.
@@ -349,6 +349,7 @@
static uint8_t bge_eeprom_getbyte(struct bge_softc *, int, uint8_t *);
static int bge_read_eeprom(struct bge_softc *, caddr_t, int, int);
+static void bge_setpromisc(struct bge_softc *);
static void bge_setmulti(struct bge_softc *);
static int bge_newbuf_std(struct bge_softc *, int, struct mbuf *);
@@ -937,6 +938,27 @@
}
static void
+bge_setpromisc(struct bge_softc *sc)
+{
+ struct ifnet *ifp;
+
+ BGE_LOCK_ASSERT(sc);
+
+ ifp = sc->bge_ifp;
+
+ /*
+ * Enable or disable promiscuous mode as needed.
+ * Do not strip VLAN tag when promiscuous mode is enabled.
+ */
+ if (ifp->if_flags & IFF_PROMISC)
+ BGE_SETBIT(sc, BGE_RX_MODE, BGE_RXMODE_RX_PROMISC |
+ BGE_RXMODE_RX_KEEP_VLAN_DIAG);
+ else
+ BGE_CLRBIT(sc, BGE_RX_MODE, BGE_RXMODE_RX_PROMISC |
+ BGE_RXMODE_RX_KEEP_VLAN_DIAG);
+}
+
+static void
bge_setmulti(struct bge_softc *sc)
{
struct ifnet *ifp;
@@ -2632,7 +2654,8 @@
rxidx = cur_rx->bge_idx;
BGE_INC(sc->bge_rx_saved_considx, sc->bge_return_ring_cnt);
- if (cur_rx->bge_flags & BGE_RXBDFLAG_VLAN_TAG) {
+ if (!(ifp->if_flags & IFF_PROMISC) &&
+ (cur_rx->bge_flags & BGE_RXBDFLAG_VLAN_TAG)) {
have_tag = 1;
vlan_tag = cur_rx->bge_vlan_tag;
}
@@ -2716,9 +2739,8 @@
* attach that information to the packet.
*/
if (have_tag) {
- VLAN_INPUT_TAG(ifp, m, vlan_tag);
- if (m == NULL)
- continue;
+ m->m_pkthdr.ether_vtag = vlan_tag;
+ m->m_flags |= M_VLANTAG;
}
BGE_UNLOCK(sc);
@@ -3078,7 +3100,6 @@
bus_dmamap_t map;
struct bge_tx_bd *d;
struct mbuf *m = *m_head;
- struct m_tag *mtag;
uint32_t idx = *txidx;
uint16_t csum_flags;
int nsegs, i, error;
@@ -3150,9 +3171,9 @@
/* ... and put VLAN tag into first segment. */
d = &sc->bge_ldata.bge_tx_ring[*txidx];
- if ((mtag = VLAN_OUTPUT_TAG(sc->bge_ifp, m)) != NULL) {
+ if (m->m_flags & M_VLANTAG) {
d->bge_flags |= BGE_TXBDFLAG_VLAN_TAG;
- d->bge_vlan_tag = VLAN_TAG_VALUE(mtag);
+ d->bge_vlan_tag = m->m_pkthdr.ether_vtag;
} else
d->bge_vlan_tag = 0;
@@ -3317,12 +3338,8 @@
CSR_WRITE_4(sc, BGE_MAC_ADDR1_LO, htons(m[0]));
CSR_WRITE_4(sc, BGE_MAC_ADDR1_HI, (htons(m[1]) << 16) | htons(m[2]));
- /* Enable or disable promiscuous mode as needed. */
- if (ifp->if_flags & IFF_PROMISC) {
- BGE_SETBIT(sc, BGE_RX_MODE, BGE_RXMODE_RX_PROMISC);
- } else {
- BGE_CLRBIT(sc, BGE_RX_MODE, BGE_RXMODE_RX_PROMISC);
- }
+ /* Program promiscuous mode. */
+ bge_setpromisc(sc);
/* Program multicast filter. */
bge_setmulti(sc);
@@ -3528,7 +3545,7 @@
struct bge_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *) data;
struct mii_data *mii;
- int mask, error = 0;
+ int flags, mask, error = 0;
switch (command) {
case SIOCSIFMTU:
@@ -3555,19 +3572,12 @@
* waiting for it to start up, which may take a
* second or two. Similarly for ALLMULTI.
*/
- if (ifp->if_drv_flags & IFF_DRV_RUNNING &&
- ifp->if_flags & IFF_PROMISC &&
- !(sc->bge_if_flags & IFF_PROMISC)) {
- BGE_SETBIT(sc, BGE_RX_MODE,
- BGE_RXMODE_RX_PROMISC);
- } else if (ifp->if_drv_flags & IFF_DRV_RUNNING &&
- !(ifp->if_flags & IFF_PROMISC) &&
- sc->bge_if_flags & IFF_PROMISC) {
- BGE_CLRBIT(sc, BGE_RX_MODE,
- BGE_RXMODE_RX_PROMISC);
- } else if (ifp->if_drv_flags & IFF_DRV_RUNNING &&
- (ifp->if_flags ^ sc->bge_if_flags) & IFF_ALLMULTI) {
- bge_setmulti(sc);
+ if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
+ flags = ifp->if_flags ^ sc->bge_if_flags;
+ if (flags & IFF_PROMISC)
+ bge_setpromisc(sc);
+ if (flags & IFF_ALLMULTI)
+ bge_setmulti(sc);
} else
bge_init_locked(sc);
} else {
==== //depot/projects/newisp/dev/bktr/bktr_i2c.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/bktr/bktr_i2c.h,v 1.4 2002/03/23 15:47:08 nsouch Exp $
+ * $FreeBSD: src/sys/dev/bktr/bktr_i2c.h,v 1.5 2006/09/18 20:17:42 jhb Exp $
*
*/
#ifndef _BT848_I2C_H
@@ -39,7 +39,7 @@
extern int bti2c_iic_getscl(device_t);
extern int bti2c_iic_reset(device_t, u_char, u_char, u_char *);
-extern int bti2c_smb_callback(device_t, int, caddr_t *);
+extern int bti2c_smb_callback(device_t, int, void *);
extern int bti2c_smb_writeb(device_t dev, u_char slave, char cmd, char byte);
extern int bti2c_smb_writew(device_t dev, u_char slave, char cmd, short word);
extern int bti2c_smb_readb(device_t dev, u_char slave, char cmd, char *byte);
==== //depot/projects/newisp/dev/em/if_em.c#7 (text+ko) ====
@@ -31,7 +31,7 @@
***************************************************************************/
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.144 2006/09/11 20:59:01 pdeuskar Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.146 2006/09/18 23:44:12 andre Exp $*/
#ifdef HAVE_KERNEL_OPTION_HEADERS
#include "opt_device_polling.h"
@@ -1447,7 +1447,6 @@
struct em_buffer *tx_buffer, *tx_buffer_last;
struct em_tx_desc *current_tx_desc;
struct mbuf *m_head;
- struct m_tag *mtag;
uint32_t txd_upper, txd_lower, txd_used, txd_saved;
int nsegs, i, j;
int error, do_tso, tso_desc = 0;
@@ -1470,16 +1469,13 @@
}
}
- /* Find out if we are in vlan mode. */
- mtag = VLAN_OUTPUT_TAG(ifp, m_head);
-
/*
* When operating in promiscuous mode, hardware encapsulation for
* packets is disabled. This means we have to add the vlan
* encapsulation in the driver, since it will have come down from the
* VLAN layer with a tag instead of a VLAN header.
*/
- if (mtag != NULL && adapter->em_insert_vlan_header) {
+ if ((m_head->m_flags & M_VLANTAG) && adapter->em_insert_vlan_header) {
struct ether_vlan_header *evl;
struct ether_header eh;
@@ -1503,9 +1499,7 @@
bcopy(&eh, evl, sizeof(*evl));
evl->evl_proto = evl->evl_encap_proto;
evl->evl_encap_proto = htons(ETHERTYPE_VLAN);
- evl->evl_tag = htons(VLAN_TAG_VALUE(mtag));
- m_tag_delete(m_head, mtag);
- mtag = NULL;
+ evl->evl_tag = htons(m_head->m_pkthdr.ether_vtag);
*m_headp = m_head;
}
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list