Date: Sun, 18 Apr 2004 23:00:22 -0700 (PDT) From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 51330 for review Message-ID: <200404190600.i3J60MYL002118@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=51330 Change 51330 by imp@imp_pacopaco on 2004/04/18 23:00:18 IFC @51327 Affected files ... .. //depot/projects/power/sys/alpha/alpha/interrupt.c#4 integrate .. //depot/projects/power/sys/alpha/alpha/vm_machdep.c#6 integrate .. //depot/projects/power/sys/alpha/include/sf_buf.h#2 integrate .. //depot/projects/power/sys/amd64/amd64/vm_machdep.c#9 integrate .. //depot/projects/power/sys/amd64/include/sf_buf.h#2 integrate .. //depot/projects/power/sys/cam/scsi/scsi_da.c#5 integrate .. //depot/projects/power/sys/compat/ndis/subr_ntoskrnl.c#6 integrate .. //depot/projects/power/sys/conf/NOTES#12 integrate .. //depot/projects/power/sys/conf/options#12 integrate .. //depot/projects/power/sys/dev/acpica/acpi.c#19 integrate .. //depot/projects/power/sys/dev/arl/if_arl.c#3 integrate .. //depot/projects/power/sys/dev/arl/if_arlreg.h#3 integrate .. //depot/projects/power/sys/dev/awi/awi.c#3 integrate .. //depot/projects/power/sys/dev/ciss/ciss.c#7 integrate .. //depot/projects/power/sys/dev/ciss/cissreg.h#3 integrate .. //depot/projects/power/sys/dev/ciss/cissvar.h#2 integrate .. //depot/projects/power/sys/dev/puc/puc_pccard.c#3 integrate .. //depot/projects/power/sys/dev/puc/pucdata.c#6 integrate .. //depot/projects/power/sys/dev/puc/pucvar.h#3 integrate .. //depot/projects/power/sys/dev/random/harvest.c#5 integrate .. //depot/projects/power/sys/dev/random/nehemiah.c#2 integrate .. //depot/projects/power/sys/dev/random/randomdev.c#6 integrate .. //depot/projects/power/sys/dev/random/randomdev.h#4 integrate .. //depot/projects/power/sys/dev/random/randomdev_soft.c#2 integrate .. //depot/projects/power/sys/i386/acpica/madt.c#4 integrate .. //depot/projects/power/sys/i386/i386/apic_vector.s#5 integrate .. //depot/projects/power/sys/i386/i386/exception.s#4 integrate .. //depot/projects/power/sys/i386/i386/support.s#5 integrate .. //depot/projects/power/sys/i386/isa/atpic_vector.s#4 integrate .. //depot/projects/power/sys/i386/pci/pci_pir.c#2 integrate .. //depot/projects/power/sys/ia64/ia64/vm_machdep.c#8 integrate .. //depot/projects/power/sys/ia64/include/sf_buf.h#2 integrate .. //depot/projects/power/sys/isa/psm.c#6 integrate .. //depot/projects/power/sys/kern/kern_intr.c#5 integrate .. //depot/projects/power/sys/kern/uipc_mbuf.c#5 integrate .. //depot/projects/power/sys/modules/netgraph/Makefile#3 integrate .. //depot/projects/power/sys/modules/netgraph/hub/Makefile#1 branch .. //depot/projects/power/sys/net/if.c#9 integrate .. //depot/projects/power/sys/net/if_arp.h#3 integrate .. //depot/projects/power/sys/net/if_ethersubr.c#8 integrate .. //depot/projects/power/sys/net/if_fddisubr.c#6 integrate .. //depot/projects/power/sys/net/if_iso88025subr.c#6 integrate .. //depot/projects/power/sys/net/if_ppp.c#5 integrate .. //depot/projects/power/sys/net/if_stf.c#7 integrate .. //depot/projects/power/sys/net/if_var.h#10 integrate .. //depot/projects/power/sys/net/radix.c#4 integrate .. //depot/projects/power/sys/net/radix.h#3 integrate .. //depot/projects/power/sys/net/route.c#9 integrate .. //depot/projects/power/sys/net/route.h#7 integrate .. //depot/projects/power/sys/net/rtsock.c#6 integrate .. //depot/projects/power/sys/netgraph/ng_eiface.c#4 integrate .. //depot/projects/power/sys/netgraph/ng_ether.c#6 integrate .. //depot/projects/power/sys/netgraph/ng_hub.c#1 branch .. //depot/projects/power/sys/netgraph/ng_hub.h#1 branch .. //depot/projects/power/sys/netinet/if_ether.c#8 integrate .. //depot/projects/power/sys/netinet6/nd6.c#7 integrate .. //depot/projects/power/sys/netinet6/nd6_rtr.c#5 integrate .. //depot/projects/power/sys/netipsec/xform_ipip.c#4 integrate .. //depot/projects/power/sys/powerpc/include/sf_buf.h#2 integrate .. //depot/projects/power/sys/powerpc/powerpc/vm_machdep.c#8 integrate .. //depot/projects/power/sys/sys/mbuf.h#10 integrate Differences ... ==== //depot/projects/power/sys/alpha/alpha/interrupt.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ /* __KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.23 1998/02/24 07:38:01 thorpej Exp $");*/ -__FBSDID("$FreeBSD: src/sys/alpha/alpha/interrupt.c,v 1.77 2004/03/23 22:28:16 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/interrupt.c,v 1.78 2004/04/16 20:09:53 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -134,7 +134,7 @@ alpha_clock_interrupt(framep); break; - case ALPHA_INTR_ERROR: /* Machine Check or Correctable Error */ + case ALPHA_INTR_ERROR: /* Machine Check or Correctable Error */ a0 = alpha_pal_rdmces(); if (platform.mcheck_handler) (*platform.mcheck_handler)(a0, framep, a1, a2); ==== //depot/projects/power/sys/alpha/alpha/vm_machdep.c#6 (text+ko) ==== @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.102 2004/04/03 09:16:24 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.103 2004/04/18 06:24:51 alc Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -101,21 +101,7 @@ #include <sys/user.h> -static void sf_buf_init(void *arg); -SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL) - /* - * Expanded sf_freelist head. Really an SLIST_HEAD() in disguise, with the - * sf_freelist head with the sf_lock mutex. - */ -static struct { - SLIST_HEAD(, sf_buf) sf_head; - struct mtx sf_lock; -} sf_freelist; - -static u_int sf_buf_alloc_want; - -/* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child * ready to run and return to user mode. @@ -384,69 +370,24 @@ } /* - * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) + * Allocate an sf_buf for the given vm_page. On this machine, however, there + * is no sf_buf object. Instead, an opaque pointer to the given vm_page is + * returned. */ -static void -sf_buf_init(void *arg) -{ - struct sf_buf *sf_bufs; - int i; - - mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF); - SLIST_INIT(&sf_freelist.sf_head); - sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, - M_NOWAIT | M_ZERO); - for (i = 0; i < nsfbufs; i++) - SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list); - sf_buf_alloc_want = 0; -} - -/* - * Get an sf_buf from the freelist. Will block if none are available. - */ struct sf_buf * sf_buf_alloc(struct vm_page *m, int pri) { - struct sf_buf *sf; - int error; - mtx_lock(&sf_freelist.sf_lock); - while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) { - sf_buf_alloc_want++; - mbstat.sf_allocwait++; - error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri, - "sfbufa", 0); - sf_buf_alloc_want--; - - /* - * If we got a signal, don't risk going back to sleep. - */ - if (error) - break; - } - if (sf != NULL) { - SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list); - sf->m = m; - nsfbufsused++; - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); - } - mtx_unlock(&sf_freelist.sf_lock); - return (sf); + return ((struct sf_buf *)m); } /* - * Release resources back to the system. + * Free the sf_buf. In fact, do nothing because there are no resources + * associated with the sf_buf. */ void sf_buf_free(struct sf_buf *sf) { - - mtx_lock(&sf_freelist.sf_lock); - SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list); - nsfbufsused--; - if (sf_buf_alloc_want > 0) - wakeup_one(&sf_freelist); - mtx_unlock(&sf_freelist.sf_lock); } /* ==== //depot/projects/power/sys/alpha/include/sf_buf.h#2 (text+ko) ==== @@ -23,35 +23,36 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/include/sf_buf.h,v 1.1 2003/11/16 06:11:24 alc Exp $ + * $FreeBSD: src/sys/alpha/include/sf_buf.h,v 1.2 2004/04/18 06:24:51 alc Exp $ */ #ifndef _MACHINE_SF_BUF_H_ #define _MACHINE_SF_BUF_H_ -#include <sys/queue.h> - #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/vm_page.h> -struct sf_buf { - SLIST_ENTRY(sf_buf) free_list; /* list of free buffer slots */ - vm_page_t m; /* currently mapped page */ -}; +/* + * On this machine, the only purpose for which sf_buf is used is to implement + * an opaque pointer required by the machine-independent parts of the kernel. + * That pointer references the vm_page that is "mapped" by the sf_buf. The + * actual mapping is provided by the direct virtual-to-physical mapping. + */ +struct sf_buf; static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { - return (ALPHA_PHYS_TO_K0SEG(sf->m->phys_addr)); + return (ALPHA_PHYS_TO_K0SEG(VM_PAGE_TO_PHYS((vm_page_t)sf))); } static __inline vm_page_t sf_buf_page(struct sf_buf *sf) { - return (sf->m); + return ((vm_page_t)sf); } #endif /* !_MACHINE_SF_BUF_H_ */ ==== //depot/projects/power/sys/amd64/amd64/vm_machdep.c#9 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.233 2004/04/11 04:26:58 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.234 2004/04/18 05:36:37 alc Exp $"); #include "opt_isa.h" #include "opt_cpu.h" @@ -85,20 +85,7 @@ static u_int cpu_reset_proxyid; static volatile u_int cpu_reset_proxy_active; #endif -static void sf_buf_init(void *arg); -SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL) - -/* - * Expanded sf_freelist head. Really an SLIST_HEAD() in disguise, with the - * sf_freelist head with the sf_lock mutex. - */ -static struct { - SLIST_HEAD(, sf_buf) sf_head; - struct mtx sf_lock; -} sf_freelist; -static u_int sf_buf_alloc_want; - /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child @@ -439,69 +426,24 @@ } /* - * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) - */ -static void -sf_buf_init(void *arg) -{ - struct sf_buf *sf_bufs; - int i; - - mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF); - SLIST_INIT(&sf_freelist.sf_head); - sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, - M_NOWAIT | M_ZERO); - for (i = 0; i < nsfbufs; i++) - SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list); - sf_buf_alloc_want = 0; -} - -/* - * Get an sf_buf from the freelist. Will block if none are available. + * Allocate an sf_buf for the given vm_page. On this machine, however, there + * is no sf_buf object. Instead, an opaque pointer to the given vm_page is + * returned. */ struct sf_buf * sf_buf_alloc(struct vm_page *m, int pri) { - struct sf_buf *sf; - int error; - mtx_lock(&sf_freelist.sf_lock); - while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) { - sf_buf_alloc_want++; - mbstat.sf_allocwait++; - error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri, - "sfbufa", 0); - sf_buf_alloc_want--; - - /* - * If we got a signal, don't risk going back to sleep. - */ - if (error) - break; - } - if (sf != NULL) { - SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list); - sf->m = m; - nsfbufsused++; - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); - } - mtx_unlock(&sf_freelist.sf_lock); - return (sf); + return ((struct sf_buf *)m); } /* - * Release resources back to the system. + * Free the sf_buf. In fact, do nothing because there are no resources + * associated with the sf_buf. */ void sf_buf_free(struct sf_buf *sf) { - - mtx_lock(&sf_freelist.sf_lock); - SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list); - nsfbufsused--; - if (sf_buf_alloc_want > 0) - wakeup_one(&sf_freelist); - mtx_unlock(&sf_freelist.sf_lock); } /* ==== //depot/projects/power/sys/amd64/include/sf_buf.h#2 (text+ko) ==== @@ -23,35 +23,36 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/sf_buf.h,v 1.1 2003/11/16 06:11:25 alc Exp $ + * $FreeBSD: src/sys/amd64/include/sf_buf.h,v 1.2 2004/04/18 05:36:37 alc Exp $ */ #ifndef _MACHINE_SF_BUF_H_ #define _MACHINE_SF_BUF_H_ -#include <sys/queue.h> - #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/vm_page.h> -struct sf_buf { - SLIST_ENTRY(sf_buf) free_list; /* list of free buffer slots */ - vm_page_t m; /* currently mapped page */ -}; +/* + * On this machine, the only purpose for which sf_buf is used is to implement + * an opaque pointer required by the machine-independent parts of the kernel. + * That pointer references the vm_page that is "mapped" by the sf_buf. The + * actual mapping is provided by the direct virtual-to-physical mapping. + */ +struct sf_buf; static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { - return (PHYS_TO_DMAP(sf->m->phys_addr)); + return (PHYS_TO_DMAP(VM_PAGE_TO_PHYS((vm_page_t)sf))); } static __inline vm_page_t sf_buf_page(struct sf_buf *sf) { - return (sf->m); + return ((vm_page_t)sf); } #endif /* !_MACHINE_SF_BUF_H_ */ ==== //depot/projects/power/sys/cam/scsi/scsi_da.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.164 2004/02/22 01:14:54 cperciva Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.166 2004/04/19 04:14:09 njl Exp $"); #ifdef _KERNEL #include "opt_da.h" @@ -238,151 +238,55 @@ {T_DIRECT, SIP_MEDIA_FIXED, "COMPAQ", "RAID*", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, -#ifdef DA_OLD_QUIRKS - /* USB floppy devices supported by umass(4) */ - { - /* - * This USB floppy drive uses the UFI command set. This - * command set is a derivative of the ATAPI command set and - * does not support READ_6 commands only READ_10. It also does - * not support sync cache (0x35). - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "Y-E DATA", "USB-FDU", "*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { - /* Another USB floppy */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "MATSHITA", "FDD CF-VFDU*","*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { - /* - * The vendor, product and version strings coming from the - * controller are null terminated instead of being padded with - * spaces. The trailing wildcard character '*' is required. - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "SMSC*", "USB FDC*","*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { - /* - * SmartDisk (Mitsumi) USB floppy drive - * PR: kern/50226 - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "MITSUMI", "USB FDD", "*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE - }, /* USB mass storage devices supported by umass(4) */ { /* - * Sony Memory Stick adapter MSAC-US1 and - * Sony PCG-C1VJ Internal Memory Stick Slot (MSC-U01). - * Make all sony MS* products use this quirk. + * EXATELECOM (Sigmatel) i-Bead 100/105 USB Flash MP3 Player + * PR: kern/51675 */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "Sony", "MS*", "*"}, + {T_DIRECT, SIP_MEDIA_REMOVABLE, "EXATEL", "i-BEAD10*", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, { /* - * Sony Memory Stick adapter for the CLIE series - * of PalmOS PDA's + * Power Quotient Int. (PQI) USB flash key + * PR: kern/53067 */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "Sony", "CLIE*", "*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { - /* - * Intelligent Stick USB disk-on-key - * PR: kern/53005 - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "USB Card", - "IntelligentStick*", "*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { - /* - * Sony DSC cameras (DSC-S30, DSC-S50, DSC-S70) - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "Sony", "Sony DSC", "*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { - /* - * Microtech USB CameraMate - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "eUSB Compact*", - "Compact Flash*", "*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { - /* - * Olympus digital cameras (C-3040ZOOM, C-2040ZOOM, C-1) - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "C-*", "*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { - /* - * Olympus digital cameras (E-100RS, E-10). - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "E-*", "*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { - /* - * KingByte Pen Drives - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "NO BRAND", "PEN DRIVE", "*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE + {T_DIRECT, SIP_MEDIA_REMOVABLE, "Generic*", "USB Flash Disk*", + "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE + }, + { + /* + * 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 }, { /* - * Minolta Dimage E203 + * Jungsoft NEXDISK USB flash key + * PR: kern/54737 */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "MINOLTA", "DiMAGE E203", "*"}, + {T_DIRECT, SIP_MEDIA_REMOVABLE, "JUNGSOFT", "NEXDISK*", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, { /* - * Daisy Technology PhotoClip on Zoran chip - * PR: kern/43580 + * FreeDik USB Mini Data Drive + * PR: kern/54786 */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "ZORAN", "COACH", "*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE + {T_DIRECT, SIP_MEDIA_REMOVABLE, "FreeDik*", "Mini Data Drive", + "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, { /* - * Sony USB Key-Storage - * PR: kern/46386 + * Sigmatel USB Flash MP3 Player + * PR: kern/57046 */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "Sony", "Storage Media", "*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE + {T_DIRECT, SIP_MEDIA_REMOVABLE, "SigmaTel", "MSCN", "*"}, + /*quirks*/ DA_Q_NO_SYNC_CACHE|DA_Q_NO_PREVENT }, -#endif /* DA_OLD_QUIRKS */ - { - /* - * EXATELECOM (Sigmatel) i-Bead 100/105 USB Flash MP3 Player - * PR: kern/51675 - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "EXATEL", "i-BEAD10*", "*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { - /* - * Jungsoft NEXDISK USB flash key - * PR: kern/54737 - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "JUNGSOFT", "NEXDISK*", "*"}, - /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { - /* - * 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 - }, }; static disk_strategy_t dastrategy; ==== //depot/projects/power/sys/compat/ndis/subr_ntoskrnl.c#6 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.35 2004/04/16 00:04:28 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.36 2004/04/18 18:38:59 wpaul Exp $"); #include <sys/ctype.h> #include <sys/unistd.h> @@ -1029,7 +1029,7 @@ __asm__ __volatile__ ("" : "=c" (lock)); while (atomic_cmpset_acq_int((volatile u_int *)lock, 0, 1) == 0) - /* do nothing */; + /* sit and spin */; return; } @@ -1041,7 +1041,7 @@ __asm__ __volatile__ ("" : "=c" (lock)); - atomic_cmpset_rel_int((volatile u_int *)lock, 1, 0); + atomic_store_rel_int((volatile u_int *)lock, 0); return; } ==== //depot/projects/power/sys/conf/NOTES#12 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1214 2004/04/12 02:36:51 imp Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1215 2004/04/19 03:33:54 njl Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -968,12 +968,6 @@ options SCSI_NO_OP_STRINGS options SCSI_DELAY=8000 # Be pessimistic about Joe SCSI device -# Options for the CAM SCSI disk driver: -# DA_OLD_QUIRKS: Restore old USB and firewire quirks that have been -# deprecated. Please also email scsi@freebsd.org if you -# have a device that needs this option. -options DA_OLD_QUIRKS - # Options for the CAM CDROM driver: # CHANGER_MIN_BUSY_SECONDS: Guaranteed minimum time quantum for a changer LUN # CHANGER_MAX_BUSY_SECONDS: Maximum time quantum per changer LUN, only ==== //depot/projects/power/sys/conf/options#12 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.440 2004/04/11 20:01:18 imp Exp $ +# $FreeBSD: src/sys/conf/options,v 1.441 2004/04/19 03:33:55 njl Exp $ # # On the handling of kernel options # @@ -241,8 +241,6 @@ CHANGER_MIN_BUSY_SECONDS opt_cd.h CHANGER_MAX_BUSY_SECONDS opt_cd.h -DA_OLD_QUIRKS opt_da.h - # Options used only in cam/scsi/scsi_sa.c. SA_IO_TIMEOUT opt_sa.h SA_SPACE_TIMEOUT opt_sa.h ==== //depot/projects/power/sys/dev/acpica/acpi.c#19 (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.138 2004/04/14 17:48:33 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.139 2004/04/16 16:27:37 njl Exp $ */ #include "opt_acpi.h" @@ -265,6 +265,7 @@ */ AcpiGbl_AllMethodsSerialized = acpi_serialize_methods; AcpiGbl_CreateOsiMethod = acpi_osi_method; + AcpiGbl_LeaveWakeGpesDisabled = FALSE; /* Start up the ACPI CA subsystem. */ #ifdef ACPI_DEBUGGER ==== //depot/projects/power/sys/dev/arl/if_arl.c#3 (text+ko) ==== @@ -3,7 +3,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/arl/if_arl.c,v 1.4 2004/04/15 20:31:07 luigi Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/arl/if_arl.c,v 1.5 2004/04/17 20:30:05 fjoe Exp $"); #include "opt_inet.h" @@ -69,6 +69,9 @@ */ #define ARL_CHECKREG(sc) (ar->registrationMode && ar->registrationStatus == 0) +#define GET_ARL_PARAM(name) (arcfg.name = ar->name) +#define SET_ARL_PARAM(name) (ar->name = arcfg.name) + #ifndef BPF_MTAP #define BPF_MTAP(_ifp,_m) \ do { \ @@ -114,6 +117,13 @@ devclass_t arl_devclass; +u_int8_t rate2media[4] = { + IFM_IEEE80211_DS354k, + IFM_IEEE80211_DS512k, + IFM_IEEE80211_DS1, + IFM_IEEE80211_DS2 +}; + /* * Copy config values to local cache */ @@ -194,13 +204,16 @@ ifmedia_init(&sc->arl_ifmedia, 0, arl_media_change, arl_media_status); #define ADD(s, o) ifmedia_add(&sc->arl_ifmedia, \ IFM_MAKEWORD(IFM_IEEE80211, (s), (o), 0), 0, NULL) + ADD(IFM_IEEE80211_DS354k, 0); + ADD(IFM_IEEE80211_DS354k, IFM_IEEE80211_ADHOC); + ADD(IFM_IEEE80211_DS512k, 0); + ADD(IFM_IEEE80211_DS512k, IFM_IEEE80211_ADHOC); ADD(IFM_IEEE80211_DS1, 0); ADD(IFM_IEEE80211_DS1, IFM_IEEE80211_ADHOC); ADD(IFM_IEEE80211_DS2, 0); ADD(IFM_IEEE80211_DS2, IFM_IEEE80211_ADHOC); ifmedia_set(&sc->arl_ifmedia, IFM_MAKEWORD(IFM_IEEE80211, - arcfg.spreadingCode == 4 ? IFM_IEEE80211_DS2 : IFM_IEEE80211_DS1 - , 0, 0)); + rate2media[arcfg.spreadingCode - 1], 0, 0)); #undef ADD /* @@ -1152,16 +1165,19 @@ int i; static int cache_slot = 0; static int wrapindex = 0; + u_int8_t zero[6] = {0, 0, 0, 0, 0, 0}; + u_char *mac; if ((ntohs(eh->ether_type) != ETHERTYPE_IP)) { return; } + mac = (dir == ARLCACHE_RX ? eh->ether_shost : eh->ether_dhost); + for (i = 0; i < MAXARLCACHE; i++) { - if (!bcmp(dir == ARLCACHE_RX ? eh->ether_shost : eh->ether_dhost, - sc->arl_sigcache[i].macsrc, 6)) { + if (!bcmp(zero, sc->arl_sigcache[i].macsrc, 6) || + !bcmp(mac, sc->arl_sigcache[i].macsrc, 6)) break; - } } if (i < MAXARLCACHE) @@ -1187,12 +1203,19 @@ struct arl_softc *sc = ifp->if_softc; int otype = arcfg.registrationMode; int orate = arcfg.spreadingCode; + int nrate, i; + + nrate = IFM_SUBTYPE(sc->arl_ifmedia.ifm_cur->ifm_media); + + for(i = 1; i <= 4; i++) { + if (rate2media[i - 1] == nrate) + break; + } - arcfg.spreadingCode = ieee80211_media2rate( - IFM_SUBTYPE(sc->arl_ifmedia.ifm_cur->ifm_media)); + if (i == 5) + return (EINVAL); - if (arcfg.spreadingCode == 2) - arcfg.spreadingCode = 3; + arcfg.spreadingCode = i; /* XXX Need fix for PSP mode */ if ((sc->arl_ifmedia.ifm_cur->ifm_media & IFM_IEEE80211_ADHOC) != 0) @@ -1213,14 +1236,14 @@ struct ifmediareq *imr; { struct arl_softc *sc = ifp->if_softc; - int rate = (arcfg.spreadingCode == 4 ? 4 : 2); imr->ifm_active = IFM_IEEE80211; if (arcfg.registrationMode == 0) imr->ifm_active |= IFM_IEEE80211_ADHOC; - imr->ifm_active |= ieee80211_rate2media(NULL, rate, IEEE80211_T_DS); + imr->ifm_active |= IFM_MAKEWORD(IFM_IEEE80211, + rate2media[arcfg.spreadingCode - 1], 0, 0); imr->ifm_status = IFM_AVALID; if (!ARL_CHECKREG(sc)) imr->ifm_status |= IFM_ACTIVE; ==== //depot/projects/power/sys/dev/arl/if_arlreg.h#3 (text+ko) ==== @@ -1,6 +1,6 @@ /* * $RISS: if_arl/dev/arl/if_arlreg.h,v 1.4 2004/03/16 04:43:27 count Exp $ - * $FreeBSD: src/sys/dev/arl/if_arlreg.h,v 1.3 2004/04/13 19:25:23 fjoe Exp $ + * $FreeBSD: src/sys/dev/arl/if_arlreg.h,v 1.4 2004/04/17 20:30:05 fjoe Exp $ */ #ifndef _IF_ARLREG_H @@ -299,9 +299,6 @@ } \ } while (0); -#define GET_ARL_PARAM(name) (arcfg.name = ar->name) -#define SET_ARL_PARAM(name) (ar->name = arcfg.name) - #ifdef _KERNEL void arl_release_resources (device_t); int arl_alloc_memory (device_t, int, int); ==== //depot/projects/power/sys/dev/awi/awi.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $NetBSD: awi.c,v 1.61 2004/01/15 13:29:05 onoe Exp $ */ +/* $NetBSD: awi.c,v 1.62 2004/01/16 14:13:15 onoe Exp $ */ /*- * Copyright (c) 1999,2000,2001 The NetBSD Foundation, Inc. @@ -86,10 +86,10 @@ #include <sys/cdefs.h> #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: awi.c,v 1.61 2004/01/15 13:29:05 onoe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: awi.c,v 1.62 2004/01/16 14:13:15 onoe Exp $"); #endif #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/dev/awi/awi.c,v 1.31 2004/03/20 19:57:46 mdodd Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/awi/awi.c,v 1.32 2004/04/18 01:05:02 onoe Exp $"); #endif #include "opt_inet.h" @@ -1112,7 +1112,7 @@ } sc->sc_mib_mac.aPromiscuous_Enable = 0; #ifdef __FreeBSD__ - if (ifp->if_amcount != 0) + if (ifp->if_flags & IFF_ALLMULTI) goto set_mib; TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) @@ -1141,10 +1141,12 @@ sc->sc_mib_local.Accept_All_Multicast_Dis = 1; set_mib: +#ifndef __FreeBSD__ if (sc->sc_mib_local.Accept_All_Multicast_Dis) ifp->if_flags &= ~IFF_ALLMULTI; else ifp->if_flags |= IFF_ALLMULTI; +#endif sc->sc_mib_mgt.Wep_Required = (sc->sc_ic.ic_flags & IEEE80211_F_WEPON) ? AWI_WEP_ON : AWI_WEP_OFF; @@ -1926,7 +1928,7 @@ case IEEE80211_S_ASSOC: case IEEE80211_S_INIT: ieee80211_begin_scan(ifp); - /* FALLTHRU */ + break; case IEEE80211_S_SCAN: /* scan next */ break; @@ -2084,8 +2086,11 @@ return (*sc->sc_newstate)(ic, nstate, arg); out: - if (error != 0) + if (error != 0) { + if (error == EINPROGRESS) + error = 0; return error; + } return (*sc->sc_newstate)(ic, nstate, arg); } ==== //depot/projects/power/sys/dev/ciss/ciss.c#7 (text+ko) ==== @@ -1,5 +1,6 @@ /*- * Copyright (c) 2001 Michael Smith + * Copyright (c) 2004 Paul Saab * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ciss/ciss.c,v 1.39 2004/04/14 19:45:07 ps Exp $ + * $FreeBSD: src/sys/dev/ciss/ciss.c,v 1.43 2004/04/19 00:57:29 ps Exp $ */ /* @@ -57,7 +58,7 @@ * are available, but we aren't supposed to know about them, and it is * dubious whether they would provide major performance improvements * except under extreme load. - * + * * Currently the only supported CISS adapters are the Compaq Smart * Array 5* series (5300, 5i, 532). Even with only three adapters, * Compaq still manage to have interface variations. @@ -66,6 +67,11 @@ * Thanks must go to Fred Harris and Darryl DeVinney at Compaq, as * well as Paul Saab at Yahoo! for their assistance in making this * driver happen. + * + * More thanks must go to John Cagle at HP for the countless hours + * spent making this driver "work" with the MSA* series storage + * enclosures. Without his help (and nagging), this driver could not + * be used with these enclosures. */ #include <sys/param.h> @@ -75,6 +81,8 @@ #include <sys/bus.h> #include <sys/conf.h> #include <sys/stat.h> +#include <sys/kthread.h> +#include <sys/queue.h> #include <cam/cam.h> #include <cam/cam_ccb.h> @@ -116,12 +124,16 @@ int nseg, int error); static int ciss_identify_adapter(struct ciss_softc *sc); static int ciss_init_logical(struct ciss_softc *sc); +static int ciss_init_physical(struct ciss_softc *sc); static int ciss_identify_logical(struct ciss_softc *sc, struct ciss_ldrive *ld); static int ciss_get_ldrive_status(struct ciss_softc *sc, struct ciss_ldrive *ld); static int ciss_update_config(struct ciss_softc *sc); -static int ciss_accept_media(struct ciss_softc *sc, int ldrive, int async); +static int ciss_accept_media(struct ciss_softc *sc, struct ciss_ldrive *ld, + int async); static void ciss_accept_media_complete(struct ciss_request *cr); static void ciss_free(struct ciss_softc *sc); +static void ciss_spawn_notify_thread(struct ciss_softc *sc); +static void ciss_kill_notify_thread(struct ciss_softc *sc); /* request submission/completion */ static int ciss_start(struct ciss_request *cr); @@ -155,7 +167,8 @@ /* CAM interface */ static int ciss_cam_init(struct ciss_softc *sc); -static void ciss_cam_rescan_target(struct ciss_softc *sc, int target); +static void ciss_cam_rescan_target(struct ciss_softc *sc, + int bus, int target); static void ciss_cam_rescan_all(struct ciss_softc *sc); static void ciss_cam_rescan_callback(struct cam_periph *periph, union ccb *ccb); static void ciss_cam_action(struct cam_sim *sim, union ccb *ccb); @@ -164,8 +177,9 @@ static void ciss_cam_poll(struct cam_sim *sim); static void ciss_cam_complete(struct ciss_request *cr); static void ciss_cam_complete_fixup(struct ciss_softc *sc, struct ccb_scsiio *csio); -static struct cam_periph *ciss_find_periph(struct ciss_softc *sc, int target); -static int ciss_name_device(struct ciss_softc *sc, int target); +static struct cam_periph *ciss_find_periph(struct ciss_softc *sc, + int bus, int target); +static int ciss_name_device(struct ciss_softc *sc, int bus, int target); /* periodic status monitoring */ static void ciss_periodic(void *arg); @@ -280,7 +294,7 @@ return(-10); } return(ENOENT); -} +} /************************************************************************ * Attach the driver to this adapter. @@ -350,7 +364,7 @@ error = ENXIO; goto out; } - + /* * Do PCI-specific init. */ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404190600.i3J60MYL002118>