summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Replace ffind_* with fget calls.alfred2002-01-142-6/+4
| | | | | | | | Make fget MPsafe. Make fgetvp and fgetsock use the fget subsystem to reduce code bloat. Push giant down in fpathconf().
* Include sys/_lock.h and sys/_mutex.h to reduce namespace pollution.alfred2002-01-131-0/+2
| | | | Requested by: jhb
* SMP Lock struct file, filedesc and the global file list.alfred2002-01-133-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seigo Tanimura (tanimura) posted the initial delta. I've polished it quite a bit reducing the need for locking and adapting it for KSE. Locks: 1 mutex in each filedesc protects all the fields. protects "struct file" initialization, while a struct file is being changed from &badfileops -> &pipeops or something the filedesc should be locked. 1 mutex in each struct file protects the refcount fields. doesn't protect anything else. the flags used for garbage collection have been moved to f_gcflag which was the FILLER short, this doesn't need locking because the garbage collection is a single threaded container. could likely be made to use a pool mutex. 1 sx lock for the global filelist. struct file * fhold(struct file *fp); /* increments reference count on a file */ struct file * fhold_locked(struct file *fp); /* like fhold but expects file to locked */ struct file * ffind_hold(struct thread *, int fd); /* finds the struct file in thread, adds one reference and returns it unlocked */ struct file * ffind_lock(struct thread *, int fd); /* ffind_hold, but returns file locked */ I still have to smp-safe the fget cruft, I'll get to that asap.
* Add missing move of relative offset for CTIO2 updates.mjacob2002-01-111-0/+1
|
* Fix reversed definitions for the bits that select half vs. full duplex.archie2002-01-101-4/+4
| | | | Submitted by: Darren Croke <djc@packetdesign.com>
* Implement 2 small helper functions:mdodd2002-01-102-0/+37
| | | | | pci_find_bsf() - Find a device_t by bus/slot/function. pci_find_device() - Find a device_t by vendor/device ID.
* Staticise the random_state array.msmith2002-01-102-5/+3
| | | | Reviewed by: markm
* Move the make_dev call from the cn_probe to a sysinit that runs atjake2002-01-091-1/+9
| | | | SI_SUB_DRIVERS. cnprobe is too early.
* Staticise the aac devclass.msmith2002-01-095-6/+5
|
* Regenerate from 1.26 pccarddevsimp2002-01-081-2/+23
|
* Catch up to NetBSD:imp2002-01-081-1/+8
| | | | | | | 1.156 pooka; Socket Low-Power CF WLAN 1.155 ichiro; IBM Smart Capture Card II 1.152-154 ichiro; Fujitsu CF EtherCard and FMV-181,182,182A 1.151 christos; Symbol Spectrum24
* - generic Arcnet frameworkfjoe2002-01-084-0/+1400
| | | | | | - device driver for SMC COM90cx6 Arcnet network adapters Obtained from: NetBSD
* Staticise a couple of debugging variables.msmith2002-01-082-4/+4
|
* Rename a variable that might accidentally be duplicated elsewhere.msmith2002-01-083-5/+5
|
* find_devclass -> devclass_find.msmith2002-01-081-1/+1
|
* Revert change that breaks the joy module. joydevclass must not be static.imp2002-01-081-1/+1
|
* Staticise a couple of things that shouldn't be leaked into thejoe2002-01-082-2/+2
| | | | | | kernel namespace. Submitted by: msmith
* Staticise the flash buffer, since it isn't needed anywhere else.msmith2002-01-081-1/+1
|
* Staticise the con_bios and digi_devclass variables, since they aren't neededmsmith2002-01-082-3/+2
| | | | by anything else.
* Staticise the device node pointers.msmith2002-01-081-1/+1
|
* Staticise the joy devclass.msmith2002-01-081-1/+1
|
* Fix a couple of bogus enums.msmith2002-01-081-4/+4
|
* Staticise the amr devclass.msmith2002-01-083-5/+3
|
* Staticise devclasses and some unnecessarily global variables.msmith2002-01-0814-17/+15
|
* Explicitly reload the multicast filters when the hardware is reinitializedjlemon2002-01-071-25/+57
| | | | | | | instead of relying on the previous filters to be present. Back out r1.125, as a reset is needed to unload any existing microcode, (which clears the multicast addresses), as it is superceded by this change.
* In the word selection mode don't append newline if the word ends at thesobomax2002-01-051-0/+4
| | | | screen boundary.
* Change the preemption code for software interrupt thread schedules andjhb2002-01-055-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mutex releases to not require flags for the cases when preemption is not allowed: The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent switching to a higher priority thread on mutex releease and swi schedule, respectively when that switch is not safe. Now that the critical section API maintains a per-thread nesting count, the kernel can easily check whether or not it should switch without relying on flags from the programmer. This fixes a few bugs in that all current callers of swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from fast interrupt handlers and the swi_sched of softclock needed this flag. Note that to ensure that swi_sched()'s in clock and fast interrupt handlers do not switch, these handlers have to be explicitly wrapped in critical_enter/exit pairs. Presently, just wrapping the handlers is sufficient, but in the future with the fully preemptive kernel, the interrupt must be EOI'd before critical_exit() is called. (critical_exit() can switch due to a deferred preemption in a fully preemptive kernel.) I've tested the changes to the interrupt code on i386 and alpha. I have not tested ia64, but the interrupt code is almost identical to the alpha code, so I expect it will work fine. PowerPC and ARM do not yet have interrupt code in the tree so they shouldn't be broken. Sparc64 is broken, but that's been ok'd by jake and tmm who will be fixing the interrupt code for sparc64 shortly. Reviewed by: peter Tested on: i386, alpha
* Add the system default timer engine.tanimura2002-01-042-0/+644
|
* - Provide toggles to show debug messages. Set new sysctl variablestanimura2002-01-0412-374/+881
| | | | | | | | | | | | | | hw.midi.debug and hw.midi.seq.debug to 1 to enable debug log. - Make debug messages human-frendly. - Implement /dev/music. - Add a timer engine required by /dev/music. - Fix nonblocking I/O. - Fix the numbering of midi and synth devices.
* unbreak -current (at least on my cvsups all today)julian2002-01-031-2/+0
|
* Implement REDUCED INTERRUPT OPERATION usage form FC cards- this allows themjacob2002-01-036-35/+185
| | | | | | | | | | | | | | | | | firmware to delay completion of commands so that it can attempt to batch a bunch of completions at once- either returning 16 bit handles in mailbox registers, or in a resposne queue entry that has a whole wad of 16 bit handles. Distinguish between 2300 and 2312 chipsets- if only because the revisions on the chips have different meanings. Add more instrumentation plus ISP_GET_STATS and ISP_CLR_STATS ioctls. Run up the maximum number of response queue entities we'll look at per interrupt. If we haven't set HBA role yet, always return success from isp_fc_runstate. MFC after: 2 weeks
* Regenerate.joe2002-01-032-2/+9
|
* Add a new linksys ethernet adapter: USB_PRODUCT_LINKSYS_USB10TX2.joe2002-01-032-0/+2
|
* Add some missing prototypes.joe2002-01-031-9/+3
| | | | Remove some diagnostics that aren't relevant yet.
* Sync with NetBSD:joe2002-01-031-81/+143
| | | | | | | * White space changes. * Updates to comments. * Replace some delay() calls with usb_delay_ms(). * Replace 0's with NULL's.
* Merge from NetBSD:joe2002-01-032-9/+12
| | | | | date: 2001/08/06 15:15:08; author: augustss; state: Exp; Don't write back status bits that are cleared when written.
* Merge from NetBSD:joe2002-01-032-2/+3
| | | | | date: 2001/11/20 16:08:10; author: augustss; state: Exp; Use longer reset for root hubs (as told in the spec).
* Revert uio.uio_td back to uio.uio_procp, using a #define in usb_port tojoe2002-01-024-5/+7
| | | | do the right thing on -current.
* Sync with NetBSD. Non-functional changes that bring this filejoe2002-01-021-55/+25
| | | | | | closer to the NetBSD version. Reviewed by: md5
* Sync usb.h with NetBSD, apart from usb_device_info.speed, whichjoe2002-01-025-73/+155
| | | | | requires logic changes. For now leave it as usb_device_info.lowspeed. It will get addressed when the usb.c code is sync'd.
* Revert part of the last commit. UIPROTO_MASS_BBB was renamed tojoe2002-01-022-4/+4
| | | | UIPROTO_MASS_BULK _after_ the previous change was made in NetBSD.
* Sync with NetBSD:joe2002-01-0211-84/+106
| | | | | | date: 2000/02/29 21:37:01; author: augustss; state: Exp; Distinguish between device and interface classes. (I finally found a document that said that they were different.)
* Remove the special casing for NetBSD and OpenBSD now that theyjoe2002-01-021-4/+0
| | | | appear to do what we do.
* NetBSD have introduced usb_proc_ptr for us (they'll be needing it soon too)joe2002-01-029-67/+78
| | | | to hide the distinction between struct proc and struct thread.
* If the CLK_VAL register is 0 bits wide, the system does not supportmsmith2002-01-021-10/+12
| | | | CPU throttling, so don't do some bogus math to check it.
* 1. Lower the poll timeout for the ofw console driver from hz / 50 to hz / 4.jake2002-01-011-2/+2
| | | | | | | | | | This gives a bit of a sluggish console, but it prevents the console from getting stuck if we poll too fast, as well as other badness on certain machines. 2. Fix a test for != 0 that should have been > 0. Noticed by: Jamey Wood <Jamey.Wood@Sun.COM> and myself Submitted by: tmm (2)
* Update of the VIA 82c686b southbridge data corruption fix, alsosos2002-01-011-15/+19
| | | | include more possible chipset candidates.
* - Do not uiomove with a mutex locked.tanimura2002-01-0115-425/+387
| | | | | | | | | - Move from msleep/wakeup to condvar. - Return either zero or a positive errno value from a function. Return additional result via references. - Unify the typedef of callback functions.
* Save stack space by converting areq in sc->areq.ambrisko2001-12-311-88/+84
| | | | | | | Reviewed by: Brooks Davis <brooks@freebsd.org> Warner Losh <imp@freebsd.org> Approved by: Brooks Davis <brooks@freebsd.org> Warner Losh <imp@freebsd.org>
* Fix bugs in the structure for rx_frame by making gap length one byte andambrisko2001-12-313-42/+722
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a packed array so sizeof work. This broke RFMON mode and passing up 802.11 packets. The Linux emulation code was derived from the open source Linux driver to maintain compatibility. LEAP support is added, hints from Richard Johnson. I've verified this locally with PC350v42510.img firmware. More bug fixing from Marco to fix long passwords. Change DELAYs in flash part of driver to FLASH_DELAY which uses tsleep so it doesn't look like your system died during a flash update. Install header files in /usr/include/dev/an Cleanup some ifmedia bugs add "Home" key mode to ifmedia and ancontrol. This way you can manage 2 keys a little easier. Map the home mode into key 5. Enhance ifconfig to dump the various configured SSIDs. I use a bunch of different ones and roam between them. Use the syntax similar to the WEP keys to deal with setting difference SSIDs. Bump up up the Card capabilities RID since they added 2 bytes to it in the latest firmware. Thankfully we changed it from a terminal failure so the card still worked but the driver whined. Some cleanup patches from Marco Molteni. Submitted by: Richard Johnson <raj@cisco.com> Marco Molteni <molter@tin.it> and myself Various checks: David Wolfskill <david@catwhisker.org> Reviewed by: Brooks Davis <brooks@freebsd.org> Warner Losh <imp@freebsd.org> Approved by: Brooks Davis <brooks@freebsd.org> Warner Losh <imp@freebsd.org> Obtained from: Linux emulation API's from Aironet driver.
OpenPOWER on IntegriCloud