PERFORCE change 121384 for review
Robert Watson
rwatson at FreeBSD.org
Mon Jun 11 04:17:40 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=121384
Change 121384 by rwatson at rwatson_zoo on 2007/06/11 04:17:06
Integrate TrustedBSD priv branch.
Affected files ...
.. //depot/projects/trustedbsd/priv/sys/amd64/amd64/trap.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/amd64/conf/DEFAULTS#4 integrate
.. //depot/projects/trustedbsd/priv/sys/amd64/ia32/ia32_syscall.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/amd64/include/kdb.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/arm/arm/busdma_machdep.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/arm/include/kdb.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/cam/README.quirks#2 integrate
.. //depot/projects/trustedbsd/priv/sys/compat/linux/linux_file.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/compat/linux/linux_misc.c#16 integrate
.. //depot/projects/trustedbsd/priv/sys/compat/ndis/kern_ndis.c#3 integrate
.. //depot/projects/trustedbsd/priv/sys/compat/svr4/svr4_misc.c#9 integrate
.. //depot/projects/trustedbsd/priv/sys/conf/NOTES#16 integrate
.. //depot/projects/trustedbsd/priv/sys/conf/files#17 integrate
.. //depot/projects/trustedbsd/priv/sys/conf/files.amd64#10 integrate
.. //depot/projects/trustedbsd/priv/sys/conf/files.i386#9 integrate
.. //depot/projects/trustedbsd/priv/sys/conf/files.pc98#8 integrate
.. //depot/projects/trustedbsd/priv/sys/conf/files.sparc64#7 integrate
.. //depot/projects/trustedbsd/priv/sys/conf/files.sun4v#3 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ath/ath_rate/amrr/amrr.c#3 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ath/ath_rate/onoe/onoe.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ath/ath_rate/sample/sample.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ath/if_ath.c#11 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ath/if_athioctl.h#3 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ath/if_athvar.h#7 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/awi/awi.c#2 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/awi/awivar.h#3 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/if_ndis/if_ndis.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ipw/if_ipw.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/iwi/if_iwi.c#8 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/iwi/if_iwireg.h#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/iwi/if_iwivar.h#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/mii/icsphy.c#1 branch
.. //depot/projects/trustedbsd/priv/sys/dev/mii/icsphyreg.h#1 branch
.. //depot/projects/trustedbsd/priv/sys/dev/mii/miidevs#8 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/msk/if_msk.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/msk/if_mskreg.h#3 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ral/if_ral_pci.c#3 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ral/rt2560.c#5 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ral/rt2560reg.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ral/rt2560var.h#3 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ral/rt2661.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ral/rt2661reg.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/ral/rt2661var.h#3 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/isa/ad1816.c#5 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/isa/ess.c#6 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/isa/mss.c#6 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/isa/sb16.c#5 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/isa/sb8.c#5 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/als4000.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/atiixp.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/aureal.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/cmi.c#5 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/cs4281.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/csapcm.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/ds1.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/emu10k1.c#5 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/emu10kx-pcm.c#5 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/es137x.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/fm801.c#5 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/hda/hdac.c#10 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/ich.c#6 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/maestro3.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/neomagic.c#2 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/solo.c#5 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/t4dwave.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/via8233.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/via82c686.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/vibes.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pcm/channel.c#6 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pcm/channel.h#5 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pcm/dsp.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/pcm/vchan.c#6 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/usb/uaudio.c#8 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/sound/usb/uaudio_pcm.c#6 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/usb/if_axe.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/usb/if_axereg.h#3 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/usb/if_cdce.c#5 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/usb/if_cdcereg.h#3 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/usb/if_rum.c#3 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/usb/if_rumreg.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/usb/if_rumvar.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/usb/if_ural.c#11 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/usb/if_uralreg.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/usb/if_uralvar.h#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/usb/ufoma.c#5 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/usb/umct.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/usb/usb_subr.c#8 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/wi/if_wi.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/dev/wi/if_wivar.h#3 integrate
.. //depot/projects/trustedbsd/priv/sys/fs/procfs/procfs_status.c#5 integrate
.. //depot/projects/trustedbsd/priv/sys/gdb/gdb_packet.c#2 integrate
.. //depot/projects/trustedbsd/priv/sys/gnu/fs/reiserfs/reiserfs_namei.c#2 integrate
.. //depot/projects/trustedbsd/priv/sys/gnu/fs/reiserfs/reiserfs_stree.c#2 integrate
.. //depot/projects/trustedbsd/priv/sys/i386/conf/DEFAULTS#4 integrate
.. //depot/projects/trustedbsd/priv/sys/i386/i386/trap.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/i386/include/kdb.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/ia64/ia64/db_machdep.c#2 integrate
.. //depot/projects/trustedbsd/priv/sys/ia64/ia64/machdep.c#8 integrate
.. //depot/projects/trustedbsd/priv/sys/ia64/include/cpufunc.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/ia64/include/kdb.h#3 integrate
.. //depot/projects/trustedbsd/priv/sys/ia64/include/vmparam.h#4 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/init_main.c#11 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/kern_acct.c#10 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/kern_clock.c#8 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/kern_exit.c#8 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/kern_fork.c#13 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/kern_mutex.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/kern_proc.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/kern_resource.c#14 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/kern_sig.c#11 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/kern_thread.c#8 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/kern_time.c#10 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/subr_witness.c#13 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/tty.c#9 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/vfs_aio.c#8 integrate
.. //depot/projects/trustedbsd/priv/sys/kern/vfs_bio.c#11 integrate
.. //depot/projects/trustedbsd/priv/sys/modules/Makefile#12 integrate
.. //depot/projects/trustedbsd/priv/sys/modules/bge/Makefile#3 integrate
.. //depot/projects/trustedbsd/priv/sys/modules/mii/Makefile#2 integrate
.. //depot/projects/trustedbsd/priv/sys/modules/wlan_scan_ap/Makefile#1 branch
.. //depot/projects/trustedbsd/priv/sys/modules/wlan_scan_sta/Makefile#1 branch
.. //depot/projects/trustedbsd/priv/sys/net/if_media.h#4 integrate
.. //depot/projects/trustedbsd/priv/sys/net/if_spppsubr.c#3 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/_ieee80211.h#6 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211.c#6 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211.h#4 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_acl.c#3 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_amrr.c#3 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_crypto.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_crypto.h#4 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_crypto_ccmp.c#3 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_crypto_none.c#3 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_crypto_tkip.c#3 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_crypto_wep.c#3 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_freebsd.c#4 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_freebsd.h#5 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_ht.c#1 branch
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_ht.h#1 branch
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_input.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_ioctl.c#7 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_ioctl.h#3 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_node.c#6 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_node.h#4 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_output.c#6 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_power.c#1 branch
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_power.h#1 branch
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_proto.c#6 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_proto.h#5 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_radiotap.h#3 integrate
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_regdomain.c#1 branch
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_regdomain.h#1 branch
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_scan.c#1 branch
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_scan.h#1 branch
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_scan_ap.c#1 branch
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_scan_sta.c#1 branch
.. //depot/projects/trustedbsd/priv/sys/net80211/ieee80211_var.h#5 integrate
.. //depot/projects/trustedbsd/priv/sys/netinet/sctp_auth.c#8 integrate
.. //depot/projects/trustedbsd/priv/sys/netinet/sctp_auth.h#5 integrate
.. //depot/projects/trustedbsd/priv/sys/netinet/sctp_input.c#11 integrate
.. //depot/projects/trustedbsd/priv/sys/netinet/sctp_output.c#10 integrate
.. //depot/projects/trustedbsd/priv/sys/netinet/sctp_uio.h#9 integrate
.. //depot/projects/trustedbsd/priv/sys/netinet/sctputil.c#11 integrate
.. //depot/projects/trustedbsd/priv/sys/netinet/tcp_input.c#13 integrate
.. //depot/projects/trustedbsd/priv/sys/netinet/tcp_output.c#11 integrate
.. //depot/projects/trustedbsd/priv/sys/netinet/tcp_timer.c#6 integrate
.. //depot/projects/trustedbsd/priv/sys/nfsserver/nfs_serv.c#6 integrate
.. //depot/projects/trustedbsd/priv/sys/pc98/conf/DEFAULTS#4 integrate
.. //depot/projects/trustedbsd/priv/sys/powerpc/include/cpu.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/powerpc/include/kdb.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/powerpc/include/md_var.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/powerpc/powerpc/db_interface.c#3 integrate
.. //depot/projects/trustedbsd/priv/sys/powerpc/powerpc/syncicache.c#2 integrate
.. //depot/projects/trustedbsd/priv/sys/powerpc/powerpc/uio_machdep.c#3 integrate
.. //depot/projects/trustedbsd/priv/sys/sparc64/conf/DEFAULTS#4 integrate
.. //depot/projects/trustedbsd/priv/sys/sparc64/include/kdb.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/sun4v/conf/DEFAULTS#5 integrate
.. //depot/projects/trustedbsd/priv/sys/sun4v/include/kdb.h#2 integrate
.. //depot/projects/trustedbsd/priv/sys/sys/param.h#12 integrate
.. //depot/projects/trustedbsd/priv/sys/sys/proc.h#11 integrate
.. //depot/projects/trustedbsd/priv/sys/sys/resourcevar.h#3 integrate
.. //depot/projects/trustedbsd/priv/sys/sys/systm.h#14 integrate
.. //depot/projects/trustedbsd/priv/sys/sys/vmmeter.h#5 integrate
.. //depot/projects/trustedbsd/priv/sys/vm/vm_contig.c#10 integrate
.. //depot/projects/trustedbsd/priv/sys/vm/vm_object.c#8 integrate
.. //depot/projects/trustedbsd/priv/sys/vm/vm_page.c#11 integrate
.. //depot/projects/trustedbsd/priv/sys/vm/vm_pageout.c#6 integrate
.. //depot/projects/trustedbsd/priv/sys/vm/vm_pageq.c#5 integrate
.. //depot/projects/trustedbsd/priv/sys/vm/vm_phys.c#1 branch
.. //depot/projects/trustedbsd/priv/sys/vm/vm_phys.h#1 branch
Differences ...
==== //depot/projects/trustedbsd/priv/sys/amd64/amd64/trap.c#7 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.317 2007/06/04 21:38:44 attilio Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.318 2007/06/10 21:59:12 attilio Exp $");
/*
* AMD64 Trap and System call handling
@@ -736,10 +736,6 @@
int reg, regcnt;
ksiginfo_t ksi;
- /*
- * note: PCPU_INC() can only be used if we can afford
- * occassional inaccuracy in the count.
- */
PCPU_INC(cnt.v_syscall);
#ifdef DIAGNOSTIC
==== //depot/projects/trustedbsd/priv/sys/amd64/conf/DEFAULTS#4 (text+ko) ====
@@ -1,7 +1,7 @@
#
# DEFAULTS -- Default kernel configuration file for FreeBSD/amd64
#
-# $FreeBSD: src/sys/amd64/conf/DEFAULTS,v 1.9 2006/11/04 23:50:11 jb Exp $
+# $FreeBSD: src/sys/amd64/conf/DEFAULTS,v 1.10 2007/06/11 00:38:05 marcel Exp $
machine amd64
@@ -15,5 +15,9 @@
# UART chips on this platform
device uart_ns8250
+# Default partitioning schemes
+options GEOM_BSD
+options GEOM_MBR
+
# KSE support went from being default to a kernel option
options KSE
==== //depot/projects/trustedbsd/priv/sys/amd64/ia32/ia32_syscall.c#4 (text+ko) ====
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.18 2007/06/04 21:38:45 attilio Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.19 2007/06/10 21:59:12 attilio Exp $");
/*
* 386 Trap and System call handling
@@ -104,12 +104,7 @@
u_int code;
ksiginfo_t ksi;
- /*
- * note: PCPU_INC() can only be used if we can afford
- * occassional inaccuracy in the count.
- */
PCPU_INC(cnt.v_syscall);
-
td->td_pticks = 0;
td->td_frame = frame;
if (td->td_ucred != p->p_ucred)
==== //depot/projects/trustedbsd/priv/sys/amd64/include/kdb.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/kdb.h,v 1.3 2006/04/03 22:51:46 marcel Exp $
+ * $FreeBSD: src/sys/amd64/include/kdb.h,v 1.4 2007/06/09 21:55:16 marcel Exp $
*/
#ifndef _MACHINE_KDB_H_
@@ -47,6 +47,11 @@
}
static __inline void
+kdb_cpu_sync_icache(unsigned char *addr, size_t size)
+{
+}
+
+static __inline void
kdb_cpu_trap(int type, int code)
{
}
==== //depot/projects/trustedbsd/priv/sys/arm/arm/busdma_machdep.c#7 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.32 2007/06/07 21:51:09 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.33 2007/06/10 12:33:01 cognet Exp $");
/*
* ARM bus dma support routines
@@ -427,7 +427,8 @@
}
/* Performed initial allocation */
newtag->flags |= BUS_DMA_MIN_ALLOC_COMP;
- }
+ } else
+ newtag->bounce_zone = NULL;
if (error != 0)
free(newtag, M_DEVBUF);
else
==== //depot/projects/trustedbsd/priv/sys/arm/include/kdb.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/arm/include/kdb.h,v 1.3 2005/01/05 21:58:48 imp Exp $
+ * $FreeBSD: src/sys/arm/include/kdb.h,v 1.4 2007/06/09 21:55:16 marcel Exp $
*/
#ifndef _MACHINE_KDB_H_
@@ -44,6 +44,11 @@
}
static __inline void
+kdb_cpu_sync_icache(unsigned char *addr, size_t size)
+{
+}
+
+static __inline void
kdb_cpu_trap(int type, int code)
{
cpu_idcache_wbinv_all();
==== //depot/projects/trustedbsd/priv/sys/cam/README.quirks#2 (text+ko) ====
@@ -1,4 +1,212 @@
-/* $FreeBSD: src/sys/cam/README.quirks,v 1.1 2007/05/29 20:07:22 mjacob Exp $ */
+/* $FreeBSD: src/sys/cam/README.quirks,v 1.2 2007/06/10 04:31:55 mjacob Exp $ */
+
+ FreeBSD Quirk Guidelines
+
+ Nate Lawson - njl at freebsd org
+
+0. Introduction
+
+FreeBSD drivers make every attempt possible to support the standards
+behind hardware. Where possible and not in conflict with the standard,
+they also attempt to work around hardware which doesn't strictly
+conform. However, some devices have flaws which can't be worked
+around while keeping the driver compatible with the standard. For
+these devices, we have created a quirks mechanism to indicate to
+the driver that it must avoid certain commands or use them differently
+with a specific model and/or version of hardware. This document
+focuses on identifying and committing quirks for storage hardware
+involving CAM and UMASS but is applicable to other areas.
+
+CAM provides a generic transport for SCSI-like devices. Many different
+transports use SCSI command sets including parallel SCSI, firewire
+(1394), USB UMASS, fibre channel, and ATAPI. For block devices (i.e.
+hard drives, flash adapters, cameras) there are two standards, SBC
+and RBC. SCSI hard drives are usually SBC-compliant and smaller
+devices like flash drives are usually RBC-compliant. Multimedia
+devices including CDROMs and DVD-RW are usually MMC-compliant.
+
+Please follow these guidelines to get your device working as soon
+as possible. If you are a committer, please do NOT commit quirks
+directly but follow this process also.
+
+1. Determing the problem
+
+The first step is to determine what's wrong. If the device should
+be supported but hangs while attaching, it's possible a quirk can
+help. The types of things a quirk can fix are:
+`
+ * cam/cam_xpt.c quirks
+
+ o CAM_QUIRK_NOLUNS - do not probe luns other than 0 since device
+ responds to all inquiries with "lun present".
+
+ o CAM_QUIRK_NOSERIAL - do not send an inquiry for serial number.
+
+ o CAM_QUIRK_HILUNS - probe all luns even if some respond "not present"
+ since device has a sparse lun space.
+
+ * cam/scsi/scsi_da.c quirks
+
+ o DA_Q_NO_SYNC_CACHE - The sync cache command is used to force a
+ drive to write out all changes to disk before shutting down. Some
+ drives hang when receiving this command even though it is required
+ by all SBC and RBC standards. Note that a warning message on
+ console is NOT sufficient to add this quirk. The warning messages
+ are harmless and only a device or system hang is cause for adding
+ this quirk.
+
+ o DA_Q_NO_6_BYTE - The RBC spec (see Links below) does not allow
+ for 6-byte READ/WRITE commands. Some manufacturers took that too
+ literally and crash when receiving 6-byte commands. This quirk
+ causes FreeBSD to only send 10-byte commands. Since the CAM subsystem
+ has been modified to not send 6-byte commands to USB, 1394, and
+ other transports that don't support SBC, this quirk should be very
+ rare.
+
+ o DA_Q_NO_PREVENT - Don't use the prevent/allow commands to keep a
+ removable medium from being ejected. Some systems can't handle these
+ commands (rare).
+
+ * cam/scsi/scsi_cd.c quirks
+
+ o CD_Q_NO_TOUCH - not implemented
+
+ o CD_Q_BCD_TRACKS - convert start/end track to BCD
+
+ o CD_Q_NO_CHANGER - never treat as a changer
+
+ o CD_Q_CHANGER - always treat as a changer
+
+ * cam/scsi/scsi_ch.c quirks
+ o CH_Q_NO_DBD - disable block descriptors in mode sense
+
+ * cam/scsi/scsi_sa.c quirks
+
+ o SA_QUIRK_NOCOMP - Can't deal with compression at all
+
+ o SA_QUIRK_FIXED - Force fixed mode
+
+ o SA_QUIRK_VARIABLE - Force variable mode
+
+ o SA_QUIRK_2FM - Needs Two File Marks at EOD
+
+ o SA_QUIRK_1FM - No more than 1 File Mark at EOD
+
+ o SA_QUIRK_NODREAD - Don't try and dummy read density
+
+ o SA_QUIRK_NO_MODESEL - Don't do mode select at all
+
+ o SA_QUIRK_NO_CPAGE - Don't use DEVICE COMPRESSION page
+
+ * dev/usb/umass.c quirks
+
+ o NO_TEST_UNIT_READY - The drive does not support Test Unit Ready.
+ Convert to Start Unit. This command is a simple no-op for most
+ firmware but some of them hang when this command is sent.
+
+ o RS_NO_CLEAR_UA - The drive does not reset the Unit Attention state
+ after REQUEST SENSE has been sent. The INQUIRY command does not
+ reset the UA either, and so CAM runs in circles trying to retrieve
+ the initial INQUIRY data. This quirk signifies that after a unit
+ attention condition, don't try to clear the condition with a request
+ sense command.
+
+ o NO_START_STOP - Like test unit ready, don't send this command if it hangs the device.
+
+ o FORCE_SHORT_INQUIRY - Don't ask for full inquiry data (256
+ bytes). Some drives can only handle the shorter inquiry length
+ (36 bytes).
+
+ o SHUTTLE_INIT - Needs to be initialised the Shuttle way. Haven't
+ looked into what this does but apparently it's mostly Shuttle
+ devices.
+
+ o ALT_IFACE_1 - Drive needs to be switched to alternate interface 1. Rare.
+
+ o FLOPPY_SPEED - Drive does not do 1Mb/s, but just floppy speeds (20kb/s).
+
+ o IGNORE_RESIDUE - The device can't count and gets the residue
+ of transfers wrong. This is sometimes needed for devices where
+ large transfers cause stalls.
+
+ o NO_GETMAXLUN - Get maximum LUN is a command to identify multiple
+ devices sharing the same ID. For instance, a multislot compact
+ flash reader might be on two LUNS. Some non-standard devices hang
+ when receiving this command so this quirk disables it.
+
+ o WRONG_CSWSIG - The device uses a weird CSWSIGNATURE. Rare.
+
+ o NO_INQUIRY - Device cannot handle INQUIRY so fake a generic
+ response. INQUIRY is one of the most basic commands but some
+ drives can't even handle it. (No idea how such devices even work
+ at all on other OS's.) This quirk fakes up a valid but generic
+ response for devices that can't handle INQUIRY.
+
+ o NO_INQUIRY_EVPD - Device cannot handle an extended INQUIRY
+ asking for vital product data (EVPD) so just return a "no data"
+ response (check condition) without sending the command to the
+ device.
+
+2. Testing a Quirk
+
+After you have an idea what you want to try, edit the proper file
+above, using wildcarding to be sure your device is matched. Here
+is a list of the common things to try. Note that some devices require
+multiple quirks or quirks in different drivers. For example, some
+USB pen drives or flash readers require quirks in both da(4) and
+umass(4).
+
+* umass(4) device (sys/dev/usb/umass.c) -- this quirk matches an Asahi Optical device with any product ID or revision ID.
+*
+* { USB_VENDOR_ASAHIOPTICAL, PID_WILDCARD, RID_WILDCARD,
+* UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I,
+* RS_NO_CLEAR_UA
+* },
+* da(4) device (sys/cam/scsi/scsi_da.c) -- this quirk matches a Creative device with a name of "NOMAD_MUVO" and any revision.
+*
+* {
+* /*
+* * Creative Nomad MUVO mp3 player (USB)
+* * PR: kern/53094
+* */
+* {T_DIRECT, SIP_MEDIA_REMOVABLE, "CREATIVE", "NOMAD_MUVO", "*"},
+* /*quirks*/ DA_Q_NO_SYNC_CACHE|DA_Q_NO_PREVENT
+* },
+
+3. Filing a PR
+
+All quirk submissions MUST go through GNATS. For information on how
+to submit a PR, see this page.
+
+Please include the following in your PR:
+
+ * Subject: QUIRK: FooCo USB DVD-RAM drive
+ * Output of "camcontrol inquiry yourdevice"
+ * Manufacturer name, model number, etc.
+ * Transport type (FC, SCSI, USB, Firewire)
+ * Output from dmesg for failed attach attempts
+ * Output from dmesg for successful attach attempts (after quirk added)
+ * Output of "usbdevs -v" with device attached
+ * Valid email address
+
+Here are some examples of well-formed PRs:
+
+ * kern/43580
+ * kern/49054
+
+4. What happens next
+
+I will review your submission, respond with comments, and once the
+quirk is deemed necessary and ready for committing, I'll commit it,
+referencing the PR. (Again, all quirks must be submitted as PRs).
+Questions? Email njl AT freebsd.org.
+
+5. Note to Committers
-This is a place holder for instructions about how both committers
-and non-committers should submit device quirks.
+Please insert quirks in the right section in scsi_da.c, sorted by
+PR number. Always include the name and PR number for scsi_da.c (see
+above for an example.) Please sort quirks alphabetically in umass.c.
+Follow the surrounding style in all drivers. Be sure to correspond
+with the submitter to be sure the quirk you are adding is the minimum
+necessary, not quirking other useful features and not overly broad
+(i.e., too many wildcards).
==== //depot/projects/trustedbsd/priv/sys/compat/linux/linux_file.c#7 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.103 2007/04/04 09:11:31 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.104 2007/06/10 04:37:22 mjacob Exp $");
#include "opt_compat.h"
#include "opt_mac.h"
@@ -239,6 +239,8 @@
*newpath = malloc(strlen(fullpath) + strlen(filename) + 2, M_TEMP, M_WAITOK | M_ZERO);
*freebuf = freepath;
sprintf(*newpath, "%s/%s", fullpath, filename);
+ } else {
+ *newpath = NULL;
}
vfslocked = VFS_LOCK_GIANT(dvp->v_mount);
vrele(dvp);
==== //depot/projects/trustedbsd/priv/sys/compat/linux/linux_misc.c#16 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.211 2007/05/31 22:52:11 attilio Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.212 2007/06/09 21:48:43 attilio Exp $");
#include "opt_compat.h"
#include "opt_mac.h"
@@ -670,7 +670,9 @@
if (args->buf != NULL) {
p = td->td_proc;
PROC_LOCK(p);
+ PROC_SLOCK(p);
calcru(p, &utime, &stime);
+ PROC_SUNLOCK(p);
calccru(p, &cutime, &cstime);
PROC_UNLOCK(p);
==== //depot/projects/trustedbsd/priv/sys/compat/ndis/kern_ndis.c#3 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.95 2007/04/06 11:18:57 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.96 2007/06/10 04:40:13 mjacob Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -945,7 +945,7 @@
ndis_senddone_func senddonefunc;
int i;
ndis_packet *p;
- uint8_t irql;
+ uint8_t irql = 0;
sc = arg;
adapter = sc->ndis_block->nmb_miniportadapterctx;
@@ -988,7 +988,7 @@
ndis_status status;
ndis_sendsingle_handler sendfunc;
ndis_senddone_func senddonefunc;
- uint8_t irql;
+ uint8_t irql = 0;
sc = arg;
adapter = sc->ndis_block->nmb_miniportadapterctx;
@@ -1081,7 +1081,7 @@
ndis_reset_handler resetfunc;
uint8_t addressing_reset;
int rval;
- uint8_t irql;
+ uint8_t irql = 0;
sc = arg;
==== //depot/projects/trustedbsd/priv/sys/compat/svr4/svr4_misc.c#9 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.94 2007/06/05 00:00:50 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.96 2007/06/09 21:48:43 attilio Exp $");
#include "opt_mac.h"
@@ -827,7 +827,9 @@
p = td->td_proc;
PROC_LOCK(p);
+ PROC_SLOCK(p);
calcru(p, &utime, &stime);
+ PROC_SUNLOCK(p);
calccru(p, &cutime, &cstime);
PROC_UNLOCK(p);
@@ -1225,20 +1227,24 @@
nfound++;
+ PROC_SLOCK(p);
/*
* See if we have a zombie. If so, WNOWAIT should be set,
* as otherwise we should have called kern_wait() up above.
*/
if ((p->p_state == PRS_ZOMBIE) &&
((uap->options & (SVR4_WEXITED|SVR4_WTRAPPED)))) {
+ PROC_SUNLOCK(p);
KASSERT(uap->options & SVR4_WNOWAIT,
("WNOWAIT is clear"));
/* Found a zombie, so cache info in local variables. */
pid = p->p_pid;
status = p->p_xstat;
- ru = *p->p_ru;
+ ru = p->p_ru;
+ PROC_SLOCK(p);
calcru(p, &ru.ru_utime, &ru.ru_stime);
+ PROC_SUNLOCK(p);
PROC_UNLOCK(p);
sx_sunlock(&proctree_lock);
@@ -1252,7 +1258,6 @@
* See if we have a stopped or continued process.
* XXX: This duplicates the same code in kern_wait().
*/
- PROC_SLOCK(p);
if ((p->p_flag & P_STOPPED_SIG) &&
(p->p_suspcount == p->p_numthreads) &&
(p->p_flag & P_WAITED) == 0 &&
@@ -1263,8 +1268,10 @@
sx_sunlock(&proctree_lock);
pid = p->p_pid;
status = W_STOPCODE(p->p_xstat);
- ru = *p->p_ru;
+ ru = p->p_ru;
+ PROC_SLOCK(p);
calcru(p, &ru.ru_utime, &ru.ru_stime);
+ PROC_SUNLOCK(p);
PROC_UNLOCK(p);
if (((uap->options & SVR4_WNOWAIT)) == 0) {
@@ -1284,9 +1291,11 @@
if (((uap->options & SVR4_WNOWAIT)) == 0)
p->p_flag &= ~P_CONTINUED;
pid = p->p_pid;
- ru = *p->p_ru;
+ ru = p->p_ru;
status = SIGCONT;
+ PROC_SLOCK(p);
calcru(p, &ru.ru_utime, &ru.ru_stime);
+ PROC_SUNLOCK(p);
PROC_UNLOCK(p);
if (((uap->options & SVR4_WNOWAIT)) == 0) {
==== //depot/projects/trustedbsd/priv/sys/conf/NOTES#16 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1429 2007/06/08 21:36:52 attilio Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1430 2007/06/11 03:36:48 sam Exp $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -786,6 +786,8 @@
device wlan_xauth #802.11 external authenticator support
device wlan_acl #802.11 MAC ACL support
device wlan_amrr #AMRR transmit rate control algorithm
+device wlan_scan_ap #802.11 AP mode scanning
+device wlan_scan_sta #802.11 STA mode scanning
device token #Generic TokenRing
device fddi #Generic FDDI
device arcnet #Generic Arcnet
==== //depot/projects/trustedbsd/priv/sys/conf/files#17 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1214 2007/06/05 00:12:36 jeff Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1216 2007/06/11 03:36:48 sam Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -768,6 +768,7 @@
# XXX only xl cards?
dev/mii/exphy.c optional miibus | exphy
dev/mii/gentbi.c optional miibus | gentbi
+dev/mii/icsphy.c optional miibus | icsphy
# XXX only fxp cards?
dev/mii/inphy.c optional miibus | inphy
dev/mii/ip1000phy.c optional miibus | ip1000phy
@@ -1612,11 +1613,17 @@
net80211/ieee80211_crypto_tkip.c optional wlan_tkip
net80211/ieee80211_crypto_wep.c optional wlan_wep
net80211/ieee80211_freebsd.c optional wlan
+net80211/ieee80211_ht.c optional wlan
net80211/ieee80211_input.c optional wlan
net80211/ieee80211_ioctl.c optional wlan
net80211/ieee80211_node.c optional wlan
net80211/ieee80211_output.c optional wlan
+net80211/ieee80211_power.c optional wlan
net80211/ieee80211_proto.c optional wlan
+net80211/ieee80211_regdomain.c optional wlan
+net80211/ieee80211_scan.c optional wlan
+net80211/ieee80211_scan_ap.c optional wlan_scan_ap
+net80211/ieee80211_scan_sta.c optional wlan_scan_sta
net80211/ieee80211_xauth.c optional wlan_xauth
netatalk/aarp.c optional netatalk
netatalk/at_control.c optional netatalk
==== //depot/projects/trustedbsd/priv/sys/conf/files.amd64#10 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.amd64,v 1.103 2007/05/23 15:45:51 kib Exp $
+# $FreeBSD: src/sys/conf/files.amd64,v 1.104 2007/06/11 00:38:05 marcel Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -199,10 +199,6 @@
dev/syscons/scvgarndr.c optional sc vga
dev/syscons/scvtb.c optional sc
dev/uart/uart_cpu_amd64.c optional uart
-geom/geom_bsd.c standard
-geom/geom_bsd_enc.c standard
-geom/geom_mbr.c standard
-geom/geom_mbr_enc.c standard
isa/syscons_isa.c optional sc
isa/vga_isa.c optional vga
kern/link_elf_obj.c standard
==== //depot/projects/trustedbsd/priv/sys/conf/files.i386#9 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.i386,v 1.576 2007/05/23 15:45:51 kib Exp $
+# $FreeBSD: src/sys/conf/files.i386,v 1.577 2007/06/11 00:38:05 marcel Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -231,10 +231,6 @@
dev/syscons/scvgarndr.c optional sc vga
dev/syscons/scvtb.c optional sc
dev/uart/uart_cpu_i386.c optional uart
-geom/geom_bsd.c standard
-geom/geom_bsd_enc.c standard
-geom/geom_mbr.c standard
-geom/geom_mbr_enc.c standard
dev/acpica/acpi_if.m standard
i386/acpica/OsdEnvironment.c optional acpi
i386/acpica/acpi_machdep.c optional acpi
==== //depot/projects/trustedbsd/priv/sys/conf/files.pc98#8 (text+ko) ====
@@ -3,7 +3,7 @@
#
# modified for PC-9801/PC-9821
#
-# $FreeBSD: src/sys/conf/files.pc98,v 1.354 2007/05/23 15:45:51 kib Exp $
+# $FreeBSD: src/sys/conf/files.pc98,v 1.355 2007/06/11 00:38:06 marcel Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -137,10 +137,6 @@
dev/speaker/spkr.c optional speaker
dev/syscons/apm/apm_saver.c optional apm_saver apm
dev/uart/uart_cpu_pc98.c optional uart
-geom/geom_bsd.c standard
-geom/geom_bsd_enc.c standard
-geom/geom_pc98.c standard
-geom/geom_pc98_enc.c standard
i386/bios/apm.c optional apm
#i386/i386/apic_vector.s optional apic
i386/i386/atomic.c standard \
==== //depot/projects/trustedbsd/priv/sys/conf/files.sparc64#7 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.sparc64,v 1.88 2007/03/07 21:13:49 marius Exp $
+# $FreeBSD: src/sys/conf/files.sparc64,v 1.89 2007/06/11 00:38:06 marcel Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -67,10 +67,6 @@
dev/syscons/scvtb.c optional sc
dev/uart/uart_cpu_sparc64.c optional uart
dev/uart/uart_kbd_sun.c optional uart sc
-geom/geom_bsd.c standard
-geom/geom_bsd_enc.c standard
-geom/geom_sunlabel.c standard
-geom/geom_sunlabel_enc.c standard
kern/syscalls.c optional ktr
libkern/ffs.c standard
libkern/ffsl.c standard
==== //depot/projects/trustedbsd/priv/sys/conf/files.sun4v#3 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.sun4v,v 1.8 2006/12/18 07:26:35 kmacy Exp $
+# $FreeBSD: src/sys/conf/files.sun4v,v 1.9 2007/06/11 00:38:06 marcel Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -28,10 +28,6 @@
dev/ofw/openfirmio.c standard
dev/ofw/openpromio.c standard
dev/uart/uart_cpu_sparc64.c optional uart
-geom/geom_bsd.c standard
-geom/geom_bsd_enc.c standard
-geom/geom_sunlabel.c standard
-geom/geom_sunlabel_enc.c standard
kern/syscalls.c optional ktr
libkern/ffs.c standard
libkern/ffsl.c standard
==== //depot/projects/trustedbsd/priv/sys/dev/ath/ath_rate/amrr/amrr.c#3 (text+ko) ====
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/ath_rate/amrr/amrr.c,v 1.12 2006/12/13 19:34:34 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/ath_rate/amrr/amrr.c,v 1.13 2007/06/11 03:36:50 sam Exp $");
/*
* AMRR rate control. See:
@@ -297,27 +297,27 @@
/* NB: the rate set is assumed sorted */
for (; srate >= 0 && RATE(srate) > 72; srate--)
;
- KASSERT(srate >= 0, ("bogus rate set"));
}
} else {
/*
- * A fixed rate is to be used; ic_fixed_rate is an
- * index into the supported rate set. Convert this
+ * A fixed rate is to be used; ic_fixed_rate is the
+ * IEEE code for this rate (sans basic bit). Convert this
* to the index into the negotiated rate set for
* the node. We know the rate is there because the
* rate set is checked when the station associates.
*/
- const struct ieee80211_rateset *rs =
- &ic->ic_sup_rates[ic->ic_curmode];
- int r = rs->rs_rates[ic->ic_fixed_rate] & IEEE80211_RATE_VAL;
/* NB: the rate set is assumed sorted */
srate = ni->ni_rates.rs_nrates - 1;
- for (; srate >= 0 && RATE(srate) != r; srate--)
+ for (; srate >= 0 && RATE(srate) != ic->ic_fixed_rate; srate--)
;
- KASSERT(srate >= 0,
- ("fixed rate %d not in rate set", ic->ic_fixed_rate));
}
- ath_rate_update(sc, ni, srate);
+ /*
+ * The selected rate may not be available due to races
+ * and mode settings. Also orphaned nodes created in
+ * adhoc mode may not have any rate set so this lookup
+ * can fail. This is not fatal.
+ */
+ ath_rate_update(sc, ni, srate < 0 ? 0 : srate);
#undef RATE
}
==== //depot/projects/trustedbsd/priv/sys/dev/ath/ath_rate/onoe/onoe.c#4 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/ath_rate/onoe/onoe.c,v 1.13 2007/06/06 15:49:16 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/ath_rate/onoe/onoe.c,v 1.14 2007/06/11 03:36:50 sam Exp $");
/*
* Atsushi Onoe's rate control algorithm.
@@ -274,27 +274,27 @@
/* NB: the rate set is assumed sorted */
for (; srate >= 0 && RATE(srate) > 72; srate--)
;
- KASSERT(srate >= 0, ("bogus rate set"));
}
} else {
/*
- * A fixed rate is to be used; ic_fixed_rate is an
- * index into the supported rate set. Convert this
+ * A fixed rate is to be used; ic_fixed_rate is the
+ * IEEE code for this rate (sans basic bit). Convert this
* to the index into the negotiated rate set for
* the node. We know the rate is there because the
* rate set is checked when the station associates.
*/
- const struct ieee80211_rateset *rs =
- &ic->ic_sup_rates[ic->ic_curmode];
- int r = rs->rs_rates[ic->ic_fixed_rate] & IEEE80211_RATE_VAL;
/* NB: the rate set is assumed sorted */
srate = ni->ni_rates.rs_nrates - 1;
- for (; srate >= 0 && RATE(srate) != r; srate--)
+ for (; srate >= 0 && RATE(srate) != ic->ic_fixed_rate; srate--)
;
- KASSERT(srate >= 0,
- ("fixed rate %d not in rate set", ic->ic_fixed_rate));
}
- ath_rate_update(sc, ni, srate);
+ /*
+ * The selected rate may not be available due to races
+ * and mode settings. Also orphaned nodes created in
+ * adhoc mode may not have any rate set so this lookup
+ * can fail. This is not fatal.
+ */
+ ath_rate_update(sc, ni, srate < 0 ? 0 : srate);
#undef RATE
}
==== //depot/projects/trustedbsd/priv/sys/dev/ath/ath_rate/sample/sample.c#4 (text+ko) ====
@@ -32,10 +32,11 @@
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGES.
+ *
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/ath_rate/sample/sample.c,v 1.16 2007/01/15 01:17:44 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/ath_rate/sample/sample.c,v 1.17 2007/06/11 03:36:50 sam Exp $");
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list