summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* If either ed_probe_Novell or ed_attach returns an error, release theimp2005-02-091-2/+5
| | | | resources too.
* Remove some unused variables.scottl2005-02-091-2/+0
|
* In revision 1.29 timeout() was converted to ng_callout().ru2005-02-091-15/+9
| | | | | | | | | | | | | | | | | | | | | The difference is that the callout function installed via the ng_callout() method is guaranteed to NOT fire after the shutdown method was run (when a node is marked NGF_INVALID). Also, the shutdown method and the callout function are guaranteed to NOT run at the same time, as both require the writer lock. Thus we can safely ignore a zero return value from ng_uncallout() (callout_stop()) in shutdown methods, and go on with freeing the node. The said revision broke the node shutdown -- ng_bridge_timeout() is no longer fired after ng_bridge_shutdown() was run, resulting in a memory leak, dead nodes, and inability to unload the module. Fix this by cancelling the callout on shutdown, and moving part responsible for freeing a node resources from ng_bridge_timer() to ng_bridge_shutdown(). Noticed by: ru Submitted by: glebius, ru
* style polishing.phk2005-02-091-4/+3
|
* Use CFLAGS+=.ru2005-02-091-1/+1
|
* Remove the messy locking dance around xpt_done()scottl2005-02-092-13/+0
|
* Provide locking for the ccb_bioq. This allows xpt_done() to be called withoutscottl2005-02-091-5/+22
| | | | | | | | | | | Giant held. In camisr(), move the ccb_bioq elements to a temporary local list and then process the elements off of that list. This enables the list to be processed by only taking the ccb_bioq_lock once and only for a very short time. ccb_bioq_lock is a leaf mutex, so it's fine to call xpt_done() with other locks held. This is just a very minor step in the work to lock CAM, but it allows us to avoid some messy locking/unlock dances in certain drivers.
* Fix the standalone module build.obrien2005-02-093-4/+3
|
* - Remove g_gate_hold()/g_gate_release() from start/done paths. It savespjd2005-02-092-59/+40
| | | | | | | | | | 4 mutex operations per I/O requests. - Use only one mutex to protect both (incoming and outgoing) queue. As MUTEX_PROFILING(9) shows, there is no big contention for this lock. - Protect sc_queue_count with queue mutex, instead of doing atomic operations on it. - Remove DROP_GIANT()/PICKUP_GIANT() - ggate is marked as MPSAFE and no Giant there.
* Emblish rev 1.180 to -fno-strict-alias w/-Os & -O3 also.obrien2005-02-091-1/+3
|
* Remove DLINK_3, its unused. Remove NETGEAR FA410TX, since it is theimp2005-02-091-3/+0
| | | | | | | same as the LINKSYS COMBO_ECARD (which also seems to be the same as another linksys product that also has a modem, but I can't find that one at the moment). Remove the PCM100, since it is now no longer used.
* o Remove duplicate LINKSYS ETHERFAST entry.imp2005-02-091-4/+3
| | | | | | | | | | | | o The COMBO_ECARD comes in many flavors, it seems, so probe both the DL10019 and the AX88x90 on it. Since this seems to work with no ill effects, maybe the probing should happen more generally rather than being table driven. Need to think more about this. o Remove PCM100 because it is duplicative (the ETHERFAST is the pcm100 and apparently has the same IDs). It was here for NetBSD because they match up an expected MAC address OID, but since we don't bother with that, we don't need to be so finely discriminating. o Minor style nit.
* Remove reference to softc from probe entirely...imp2005-02-091-1/+0
|
* s/descr/oid_descr/marcel2005-02-091-1/+1
|
* Add missed merge of ripcbinfo extern. Given how widely usedrwatson2005-02-091-0/+1
| | | | | | ripcbinfo is, we should probably add it to an include file. Spotted by: mux
* Minor style cleanup. Get rid of extra {}, extra blank lines and someimp2005-02-091-131/+67
| | | | continued line indentation. Should be no functional changes.
* move pmap.h after vm.h include... some of the headers from pmap.h dependjmg2005-02-091-1/+1
| | | | upon vm.h
* o Remove ifdef PC98, since this file has diverged quite a bit fromimp2005-02-091-134/+59
| | | | | | | | | | if_ed_isa.c, and they seem to not be helpful anymore. o Fix style issues from de-Pification. o change from _isa_ to _cbus_ to the largest extent possible to reflect that this is really for cbus, not isa. o Use ANSI function definitions. o Use ed_clear_memory o eliminate kvtop
* No need to bzero softc.imp2005-02-081-2/+0
|
* Convenience function to clear memory of the card, and then check to makeimp2005-02-082-0/+23
| | | | sure that it works by reading back as 0.
* - Add a new assert in the getnewvnode(). Assert that the usecount is stilljeff2005-02-081-2/+4
| | | | | | | 0 to detect getnewvnode() races. - Add the vnode address to a few panics near by to help in debugging. Sponsored by: Isilon Systems, Inc.
* - Remove an invalid KASSERT added in recent background write reshuffling.jeff2005-02-081-3/+0
| | | | Sponsored by: Isilon Systems, Inc.
* Lock raw IP socket pcb list and PCBs when processing input viarwatson2005-02-081-5/+13
| | | | | | | icmp6_rip6_input(). Reviewed by: gnn MFC after: 1 week
* - Add debug.watchdog tunable, so we can specify watchdog CPU from loaderpjd2005-02-081-20/+31
| | | | | | | | | which will help to debug hangs on boot. - Remove 'U' from debug.watchdog sysctl definition, so if we set it to '-1' it really shows '-1'. - Fix comment. Reviewed by: rwatson
* Add a new sysctl, "security.jail.chflags_allowed", which controls thecperciva2005-02-083-4/+15
| | | | | | | | | | | | | behaviour of chflags within a jail. If set to 0 (the default), then a jailed root user is treated as an unprivileged user; if set to 1, then a jailed root user is treated the same as an unjailed root user. This is necessary to allow "make installworld" to work inside a jail, since it attempts to manipulate the system immutable flag on certain files. Discussed with: csjp, rwatson MFC after: 2 weeks
* Split the vop_vector for ffs1 and ffs2, this is mostly for the differentphk2005-02-083-26/+33
| | | | EXTATTR support.
* Use ffs_truncate() directly instead of UFS_TRUNCATE()phk2005-02-081-1/+1
|
* Remove type 0x4 (FAT12 <32MB) to make room for type 0x7 (NTFS).des2005-02-081-2/+2
|
* Background writes are entirely an FFS/Softupdates thing.phk2005-02-085-138/+179
| | | | | | | | | | | | | | | | Give FFS vnodes a specific bufwrite method which contains all the background write stuff and then calls into the default bufwrite() for the rest of the job. Remove all the background write related stuff from the normal bufwrite. This drags the softdep_move_dependencies() back into FFS. Long term, it is worth looking at simply copying the data into allocated memory and issuing the bio directly and not create the "shadow buf" in the first place (just like copy-on-write is done in snapshots for instance). I don't think we really gain anything but complexity from doing this with a buf.
* Use the local APIC timer to drive the various kernel clocks on SMP machinesjhb2005-02-087-113/+252
| | | | | | | | | | | | | | | | | | | | | | | rather than forwarding interrupts from the clock devices around using IPIs: - Add an IDT vector that pushes a clock frame and calls lapic_handle_timer(). - Add functions to program the local APIC timer including setting the divisor, and setting up the timer to either down a periodic countdown or one-shot countdown. - Add a lapic_setup_clock() function that the BSP calls from cpu_init_clocks() to setup the local APIC timer if it is going to be used. The setup uses a one-shot countdown to calibrate the timer. We then program the timer on each CPU to fire at a frequency of hz * 3. stathz is defined as freq / 23 (hz * 3 / 23), and profhz is defined as freq / 2 (hz * 3 / 2). This gives the clocks relatively prime divisors while keeping a low LCM for the frequency of the clock interrupts. Thanks to Peter Jeremy for suggesting this approach. - Remove the hardclock and statclock forwarding code including the two associated IPIs. The bitmap IPI handler has now effectively degenerated to just IPI_AST. - When the local APIC timer is used we don't turn the RTC on at all, but we still enable interrupts on the ISA timer 0 (i8254) for timecounting purposes.
* Drag another softupdates tentacle back into FFS: Now that FFS'sphk2005-02-085-11/+7
| | | | | vop_fsync is separate from the internal use we can do the full job there.
* Maxunit is inclusive so fix off-by-one in previous commit.njl2005-02-081-1/+1
|
* Update device_find_child(9) to return the first matching child if unitnjl2005-02-081-5/+15
| | | | | | is set to -1. Reviewed by: dfr, imp
* Simplify the "and if we're in the debugger, don't use locks" logic,rwatson2005-02-081-9/+5
| | | | | | correcting some misthinking. Discussed with (really this time): bde
* Don't use the UFS_* and VFS_* functions where a direct call is possble.phk2005-02-086-39/+39
| | | | | The UFS_ functions are for UFS to call back into VFS. The VFS functions are external entry points into the filesystem.
* Next step on the road to IRPs: create and use an imitation of thewpaul2005-02-0813-359/+1488
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows DRIVER_OBJECT and DEVICE_OBJECT mechanism so that we can simulate driver stacking. In Windows, each loaded driver image is attached to a DRIVER_OBJECT structure. Windows uses the registry to match up a given vendor/device ID combination with a corresponding DRIVER_OBJECT. When a driver image is first loaded, its DriverEntry() routine is invoked, which sets up the AddDevice() function pointer in the DRIVER_OBJECT and creates a dispatch table (based on IRP major codes). When a Windows bus driver detects a new device, it creates a Physical Device Object (PDO) for it. This is a DEVICE_OBJECT structure, with semantics analagous to that of a device_t in FreeBSD. The Windows PNP manager will invoke the driver's AddDevice() function and pass it pointers to the DRIVER_OBJECT and the PDO. The AddDevice() function then creates a new DRIVER_OBJECT structure of its own. This is known as the Functional Device Object (FDO) and corresponds roughly to a private softc instance. The driver uses IoAttachDeviceToDeviceStack() to add this device object to the driver stack for this PDO. Subsequent drivers (called filter drivers in Windows-speak) can be loaded which add themselves to the stack. When someone issues an IRP to a device, it travel along the stack passing through several possible filter drivers until it reaches the functional driver (which actually knows how to talk to the hardware) at which point it will be completed. This is how Windows achieves driver layering. Project Evil now simulates most of this. if_ndis now has a modevent handler which will use MOD_LOAD and MOD_UNLOAD events to drive the creation and destruction of DRIVER_OBJECTs. (The load event also does the relocation/dynalinking of the image.) We don't have a registry, so the DRIVER_OBJECTS are stored in a linked list for now. Eventually, the list entry will contain the vendor/device ID list extracted from the .INF file. When ndis_probe() is called and detectes a supported device, it will create a PDO for the device instance and attach it to the DRIVER_OBJECT just as in Windows. ndis_attach() will then call our NdisAddDevice() handler to create the FDO. The NDIS miniport block is now a device extension hung off the FDO, just as it is in Windows. The miniport characteristics table is now an extension hung off the DRIVER_OBJECT as well (the characteristics are the same for all devices handled by a given driver, so they don't need to be per-instance.) We also do an IoAttachDeviceToDeviceStack() to put the FDO on the stack for the PDO. There are a couple of fake bus drivers created for the PCI and pccard buses. Eventually, there will be one for USB, which will actually accept USB IRP.s Things should still work just as before, only now we do things in the proper order and maintain the correct framework to support passing IRPs between drivers. Various changes: - corrected the comments about IRQL handling in subr_hal.c to more accurately reflect reality - update ndiscvt to make the drv_data symbol in ndis_driver_data.h a global so that if_ndis_pci.o and/or if_ndis_pccard.o can see it. - Obtain the softc pointer from the miniport block by referencing the PDO rather than a private pointer of our own (nmb_ifp is no longer used) - implement IoAttachDeviceToDeviceStack(), IoDetachDevice(), IoGetAttachedDevice(), IoAllocateDriverObjectExtension(), IoGetDriverObjectExtension(), IoCreateDevice(), IoDeleteDevice(), IoAllocateIrp(), IoReuseIrp(), IoMakeAssociatedIrp(), IoFreeIrp(), IoInitializeIrp() - fix a few mistakes in the driver_object and device_object definitions - add a new module, kern_windrv.c, to handle the driver registration and relocation/dynalinkign duties (which don't really belong in kern_ndis.c). - made ndis_block and ndis_chars in the ndis_softc stucture pointers and modified all references to it - fixed NdisMRegisterMiniport() and NdisInitializeWrapper() so they work correctly with the new driver_object mechanism - changed ndis_attach() to call NdisAddDevice() instead of ndis_load_driver() (which is now deprecated) - used ExAllocatePoolWithTag()/ExFreePool() in lookaside list routines instead of kludged up alloc/free routines - added kern_windrv.c to sys/modules/ndis/Makefile and files.i386.
* Don't use VOP_LEASE() with operations on extended attribute backingrwatson2005-02-081-10/+2
| | | | | | files. Pointed out by: phk
* For snapshots we need all VOP_LOCKs to be exclusive.phk2005-02-088-49/+42
| | | | | | | | | | | The "business class upgrade" was implemented in UFS's VOP_LOCK implementation ufs_lock() which is the wrong layer, so move it to ffs_lock(). Also, as long as we have not abandonned advanced vfs-stacking we should not preclude it from happening: instead of implementing a copy locally, use the VOP_LOCK_APV(&ufs) to correctly arrive at vop_stdlock() at the bottom.
* For snapshots we need all VOP_LOCKs to be exclusive.phk2005-02-082-29/+24
| | | | | | | | | | | The "business class upgrade" was implemented in UFS's VOP_LOCK implementation ufs_lock() which is the wrong layer, so move it to ffs_lock(). Also, as long as we have not abandonned advanced vfs-stacking we should not preclude it from happening: instead of implementing a copy locally, use the VOP_LOCK_APV(&ufs) to correctly arrive at vop_stdlock() at the bottom.
* Use VOP_STRATEGY_APV() instead of direct dereference, this is morephk2005-02-081-2/+2
| | | | correct.
* Add VOP_FOO_APV() which takes a pointer to the vop_vector.phk2005-02-081-6/+11
| | | | | | | This allows stacked or partitioned filesystems to say "Continue the normal resolution from here", for instace from FFS to UFS. Use VNASSERT() instead of KASSERT().
* merge from geom_vol_ffs.c rev 1.14 (avoid unaligned I/O requests)des2005-02-081-0/+10
|
* bzero() -> M_ZERO.ru2005-02-083-5/+2
|
* Take care not to issue unaligned I/O requests while tasting a provider.des2005-02-081-0/+10
|
* Unroll the loop for calculating the 8.3 filename checksum. In testingnjl2005-02-081-5/+14
| | | | | | on my P3, microbenchmarks show the unrolled version is 78x faster. In actual use (recursive ls), this gives an average of 9% improvement in system time and 2% improvement in wall time.
* Use ANSI function definitions, tweak a couple of prototypes to match (sinceimp2005-02-081-116/+48
| | | | | K&R prototypes needed to mismatch in the way that they were mismatched), rename ds_getmcaf to ed_ds_getmcaf. Remove a few register keywords.
* use fixed types for the calls to ed_pio_readmem, ed_pio_writemem.imp2005-02-083-35/+18
| | | | | | | Make the special hp versions match the general ones. Also use fixed types in the WD80x3_generic probe, and change callers' arrays to match. Fix a couple of minor style issues by using newstyle function definitions in a couple places.
* Make it possible to unload ed. Move the ed_pccard_detach routine toimp2005-02-086-22/+25
| | | | | | | | | | | | if_ed and rename it to ed_detach(). Tell other busses to use this routine for detach. Since I don't actually have any non-pccard ed hardware I can test with, I've only tested with my pccards. More improvements in this area likely are possible. Prodded by: rwatson
* Fix style bugs introduced in the de__Pification of this code.imp2005-02-081-25/+23
| | | | Style bug generically noted by: bde
* Fix crashdumps on twe. The twe_immediate_request() path was not onlyscottl2005-02-082-12/+25
| | | | | | | | | | | | copying data to a temporary buffer before the I/O, but also copying that temporary buffer back to the original data location after the I/O. When you're dumping kernel heap and stack and protected pages, this is very very bad. A belated thanks to Robert Watson for donating hardware for this (and future) work. MFC after: 3 days
OpenPOWER on IntegriCloud