aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* beacon handling fixups for adhoc mode:Sam Leffler2005-01-241-12/+21
| | | | | | | | | | | | | o don't reclaim any previous beacon state in ath_beacon_alloc; do it explicitly in ath_newstate o reference count the node held in the beacon frame state block o process ibss merge more intelligently; let the state machine do the right thing instead of explicitly setting the new bssi id o explicitly stop tx dma before doing beacon setup to handle the ibss merge case Notes: svn path=/head/; revision=140759
* switch to use bus_dmamap_load_mbuf_sgSam Leffler2005-01-241-25/+13
| | | | Notes: svn path=/head/; revision=140756
* o correct beacon interval calculation; the internal setting is in TU's not msSam Leffler2005-01-241-7/+4
| | | | | | | o replace the private macro to convert MS->TU with the common one Notes: svn path=/head/; revision=140755
* o clarify that beacon interval settings are in TU's, not msSam Leffler2005-01-241-3/+6
| | | | | | | o add macros to convert between TU's and ms Notes: svn path=/head/; revision=140754
* statically allocate the station/neighbor node table; the deferredSam Leffler2005-01-249-175/+76
| | | | | | | | allocation scheme introduced a race condition during device state transitions Notes: svn path=/head/; revision=140753
* There have been a substantial number of changes to this file from theWarner Losh2005-01-241-1/+28
| | | | | | | NetBSD original, so add our copyright notice as well. Notes: svn path=/head/; revision=140752
* Begin the first phase of trying to add IRP support (and ultimatelyBill Paul2005-01-249-820/+1340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USB device support): - Convert all of my locally chosen function names to their actual Windows equivalents, where applicable. This is a big no-op change since it doesn't affect functionality, but it helps avoid a bit of confusion (it's now a lot easier to see which functions are emulated Windows API routines and which are just locally defined). - Turn ndis_buffer into an mdl, like it should have been. The structure is the same, but now it belongs to the subr_ntoskrnl module. - Implement a bunch of MDL handling macros from Windows and use them where applicable. - Correct the implementation of IoFreeMdl(). - Properly implement IoAllocateMdl() and MmBuildMdlForNonPagedPool(). - Add the definitions for struct irp and struct driver_object. - Add IMPORT_FUNC() and IMPORT_FUNC_MAP() macros to make formatting the module function tables a little cleaner. (Should also help with AMD64 support later on.) - Fix if_ndis.c to use KeRaiseIrql() and KeLowerIrql() instead of the previous calls to hal_raise_irql() and hal_lower_irql() which have been renamed. The function renaming generated a lot of churn here, but there should be very little operational effect. Notes: svn path=/head/; revision=140751
* Add an entry for Magic Ram, Inc's ETHERNET PC CARD 933926 card I justWarner Losh2005-01-241-0/+9
| | | | | | | | won on ebay. Also, add a pointer to the PCMCIA's web site for the registered tuples (== manufacturer ID's). Notes: svn path=/head/; revision=140749
* Fix spelling in a comment.Yaroslav Tykhiy2005-01-241-1/+1
| | | | Notes: svn path=/head/; revision=140745
* Save a line by unlocking before we test.Poul-Henning Kamp2005-01-241-2/+1
| | | | Notes: svn path=/head/; revision=140742
* Change vprint() to vn_printf() which takes varargs.Poul-Henning Kamp2005-01-242-13/+17
| | | | | | | Add #define for vprint() to call vn_printf(). Notes: svn path=/head/; revision=140739
* Fix an evil typo.Gleb Smirnoff2005-01-241-1/+1
| | | | | | | | Submitted by: Roselyn Lee MFC after: 3 days Notes: svn path=/head/; revision=140737
* Remove unused cred argument to ext2_reload()Poul-Henning Kamp2005-01-242-12/+6
| | | | Notes: svn path=/head/; revision=140736
* Kill the VV_OBJBUF and test the v_object for NULL instead.Poul-Henning Kamp2005-01-247-15/+7
| | | | Notes: svn path=/head/; revision=140734
* Fix a list corruption issue in cloning device management using thePoul-Henning Kamp2005-01-241-16/+41
| | | | | | | | western strategy ("allocate first, ask questions later") so we can extend the devmtx coverage to the clone list. Notes: svn path=/head/; revision=140733
* Remove "register" keywords.Poul-Henning Kamp2005-01-241-2/+2
| | | | Notes: svn path=/head/; revision=140732
* Remove unused cred arg from nfs_vinvalbuf() and many bogus argumentsPoul-Henning Kamp2005-01-245-29/+21
| | | | | | | passed for it. Notes: svn path=/head/; revision=140731
* - Convert so_qlen, so_incqlen, so_qlimit fields of struct socket fromGleb Smirnoff2005-01-242-8/+29
| | | | | | | | | | | | | | short to unsigned short. - Add SYSCTL_PROC() around somaxconn, not accepting values < 1 or > U_SHRTMAX. Before this change setting somaxconn to smth above 32767 and calling listen(fd, -1) lead to a socket, which doesn't accept connections at all. Reviewed by: rwatson Reported by: Igor Sysoev Notes: svn path=/head/; revision=140730
* Polish style.Poul-Henning Kamp2005-01-241-9/+4
| | | | Notes: svn path=/head/; revision=140729
* Style: Remove the commented out vop_foo_args replicas.Poul-Henning Kamp2005-01-241-103/+15
| | | | Notes: svn path=/head/; revision=140728
* - Somehow I mangled KTR_CRITICAL.Jeff Roberson2005-01-241-1/+1
| | | | | | | Spotted by: ru Notes: svn path=/head/; revision=140726
* - Regen for recent vfs syscall changes.Jeff Roberson2005-01-245-51/+51
| | | | | | | Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140725
* - Change all VFS syscalls to MSTD as they all manually deal with giantJeff Roberson2005-01-241-46/+46
| | | | | | | | | or the appropriate filesystem locks. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140724
* - Remove GIANT_REQUIRED where giant is no longer required.Jeff Roberson2005-01-244-22/+29
| | | | | | | | | | - Use VFS_LOCK_GIANT() rather than directly acquiring giant in places where giant is only held because vfs requires it. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140723
* - Don't acquire giant around calls to bufdone().Jeff Roberson2005-01-241-2/+0
| | | | | | | Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140722
* - Add CTR calls to trace the lifecycle of a buffer.Jeff Roberson2005-01-241-79/+84
| | | | | | | | | | | | | | | | | | | | - Remove some KASSERTs which are invalid if the appropriate lock is not held. - Slightly restructure bremfree() so that it is more sane. - Change the flush code in bdwrite() to avoid acquiring a mutex whenever possible. - Change the flush code in bdwrite() to avoid holding the bufobj mutex while calling buf_countdeps(). This introduces a lock-order relationship with the softdep lock that can not otherwise be resolved. - Don't set B_DONE until bufdone() is complete, otherwise another processor may believe the buf is done before it is. - Only acquire Giant if the caller has set b_iodone. Don't grab giant around normal bufdone() calls. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140721
* - Add the tunable and sysctl for the mpsafevfs. It currently defaultsJeff Roberson2005-01-241-37/+49
| | | | | | | | | | | | | | | | | | to off. - Protect access to mnt_kern_flag with the mointpoint mutex. - Remove some KASSERTs which are not legal checks without the appropriate locks held. - Use VCANRECYCLE() rather than rolling several slightly different checks together. - Return from vtryrecycle() with a recycled vnode rather than a locked vnode. This simplifies some locking. - Remove several GIANT_REQUIRED lines. - Add a few KASSERTs to help with INACT debugging. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140720
* - Add a VCANRECYCLE() which performs all the checks required to ensureJeff Roberson2005-01-241-0/+6
| | | | | | | that we are free to release a vnode. Notes: svn path=/head/; revision=140719
* - Remove GIANT_REQUIRED where giant is no longer required.Jeff Roberson2005-01-241-6/+0
| | | | | | | Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140718
* - Remove GIANT_REQUIRED where it is no longer required.Jeff Roberson2005-01-241-4/+0
| | | | | | | Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140717
* - Remove GIANT_REQUIRED where giant is no longer required.Jeff Roberson2005-01-241-54/+81
| | | | | | | | | | | | | | | | - Protect access to mnt_kern_flag with the mountpoint mutex. - Use the appropriate nd flags to deal with giant in vn_open_cred(). We currently determine whether the caller is mpsafe by checking for a valid fdidx. Any caller coming from user-space is now mpsafe and supplies a valid fd. No kenrel callers have been converted to mpsafe, so this check is sufficient for now. - Use VFS_LOCK_GIANT instead of manual giant acquisition where appropriate. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140716
* - Protect mnt_kern_flag with the mountpoint's mutex. This is requiredJeff Roberson2005-01-241-7/+11
| | | | | | | | | to make the suspend related functions mpsafe. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140715
* - Acquire and release Giant as we enter and leave filesystems whichJeff Roberson2005-01-241-6/+37
| | | | | | | | | | | | require it. - Track the status of Giant with the nd flag HASGIANT. - Release giant on return of namei() callers are not marked MPSAFE as they already own giant. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140714
* - Change all vfs syscalls to use VFS_LOCK_GIANT(), and MPSAFE nds.Jeff Roberson2005-01-242-200/+532
| | | | | | | | | | - Move Giant acquisition into the few vfs syscalls that weren't already directly acquiring it. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140713
* - Simplify the cache locking. The lock order relationship with theJeff Roberson2005-01-241-37/+33
| | | | | | | | | | | | vnode lock is much simpler than I originally thought it would be. Now, the cache lock is always acquired before the vnode lock. - Provide some gotos in __getcwd() to simplify the unlocking a bit. - Move Giant acquisition down into __getcwd(). Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140712
* - Do not use APAUSE if LK_INTERLOCK is set. We lose synchronizationJeff Roberson2005-01-241-10/+19
| | | | | | | | | | | if the lockmgr interlock is dropped after the caller's interlock is dropped. - Change some lockmgr KTRs to be slightly more helpful. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140711
* - Use VFS_LOCK_GIANT() in place of mtx_lock(&giant), etc.Jeff Roberson2005-01-241-9/+9
| | | | | | | Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140710
* - Convert the global LK lock to a mutex.Jeff Roberson2005-01-241-738/+454
| | | | | | | | | | | | | | | | | | | | - Expand the scope of lk to cover not only interrupt races, but also top-half races, which includes many new uses over global top-half only data. - Get rid of interlocked_sleep() and use msleep or BUF_LOCK where appropriate. - Use the lk mutex in place of the various hand rolled semaphores. - Stop dropping the lk lock before we panic. - Fix getdirtybuf() callers so that they reacquire access to whatever softdep datastructure they were inxpecting in the failure/retry case. Previously, sleeps in getdirtybuf() could leave us with pointers to bad memory. - Update handling of ffs to be compatible with ffs locking changes. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140709
* - Initialize and destroy the per-filesystem ufs lock where appropriate.Jeff Roberson2005-01-241-3/+24
| | | | | | | | | | | - Use the buffer lock on the superblock buf to serialize calls to sbupdate. - Set the MNTK_MPSAFE flag when QUOTA is not defined in the kernel. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140708
* - Remove GIANT_REQUIRED where giant is no longer required.Jeff Roberson2005-01-241-10/+0
| | | | | | | Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140707
* - Use the ufs lock to protect fs_active.Jeff Roberson2005-01-241-10/+26
| | | | | | | Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140706
* - Acquire the ufs lock around several ffs_alloc functions that requireJeff Roberson2005-01-241-2/+23
| | | | | | | | | it. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140705
* - Don't use atomic operations to deal with the active array, insteadJeff Roberson2005-01-241-96/+183
| | | | | | | | | | | | | | | it is now quite naturally protected by the ufsmount mutex. - Use the ufs lock to protect various fields in struct fs, primarily the cg summary needs protection to avoid allocation races. Several functions have been slightly re-arranged to reduce the number of lock operations. - Adjust several functions (blkfree, freefile, etc.) to accept a ufsmount as an argument so that we may access the ufs lock. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140704
* - Acquire the ufs lock when manipulating some fields of struct fs.Jeff Roberson2005-01-241-7/+13
| | | | | | | | | | - Change arguments to various ffs functions to match their new prototypes. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140703
* - Mark the struct fs members that require the ufsmount mutex.Jeff Roberson2005-01-241-7/+15
| | | | | | | | | - Define some macros for manipulating the fs_active bitmap. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140702
* - Change some function parameters so that the ufsmount structure isJeff Roberson2005-01-241-3/+4
| | | | | | | | | accessable in places where the ufs lock will be needed. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140701
* - Add a mutex to the ufsmount structure. This mutex is used to protectJeff Roberson2005-01-241-3/+8
| | | | | | | | | | | | | any per-instance global data that is not already protected by a buf or vnode lock. Presently, only fields in ffs's struct fs utilize this lock. - Sort some ufsmount members so that fields used for quotas are grouped together. This is in anticipation of quota locking. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140700
* - Add two new flags to the nd structure. MPSAFE indicates that theJeff Roberson2005-01-241-16/+20
| | | | | | | | | | | | | caller may not be holding Giant, and namei() should acquire it as necessary. HASGIANT is used to indicate when namei() is returning with a reference to a vnode that requires giant, and giant is locked. - Add the macro NDHASGIANT() which can be used in conjunction with VFS_UNLOCK_GIANT() in callers who have marked the nd with MPSAFE. Sponsored By: Isilon Systems, Inc. Notes: svn path=/head/; revision=140698
* - Add the mount flag MNTK_MPSAFE which indicates whether or not GiantJeff Roberson2005-01-241-0/+24
| | | | | | | | | must be held when any vnode owned by the filesystem is manipulated. - Add VFS_LOCK_GIANT and VFS_UNLOCK_GIANT macros which are used to conditionally lock and unlock Giant based on a particular mountpoint. Notes: svn path=/head/; revision=140697
* - Add a new KTR class for the buffer cache.Jeff Roberson2005-01-241-2/+3
| | | | Notes: svn path=/head/; revision=140696