summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Optimize and clean TX time computation.damien2005-11-152-44/+14
| | | | | | Avoid a test and a modulus operation. MFC after: 2 weeks
* Recognize Broadcom BCM5752 chip, that can be found in HP DC7600.glebius2005-11-152-2/+7
| | | | | PR: kern/88940 Submitted by: Alexander Hausner
* Some whitespace and style cleanup.glebius2005-11-152-89/+88
|
* Update ieee80211_mhz2ieee to understand public safety bands and spectrumsam2005-11-152-9/+24
| | | | | | | that can potentially be mapped to negative ieee #'s. NB: before operation on the latter can be supported we need to cleanup various code that assumes ieee channel #'s are >= 0
* nuke special handling to extend cts when bursting; it was race pronesam2005-11-153-65/+2
| | | | MFC after: 7 days
* bandaid inconsistent state handling: the rate index map may besam2005-11-151-0/+5
| | | | | | stale when called to reset rate control state causing us to pickup an invalid index, check for this and skip 'em (things will eventually get fixed up so this is not harmful)
* Unbreak kernel builds.kan2005-11-151-2/+2
| | | | Submitted by: arr
* Keep track of volumes in non-optimal state and expose a simple countkan2005-11-152-0/+13
| | | | | | | of volumes that might need administrator attention through device specific sysctl to simplify device monitoring. Submitted by: Deomid Ryabkov <myself at rojer dot pp dot ru>
* Add a new sysctl, kern.elf[32|64].can_exec_dyn. When set to 1, one cancognet2005-11-141-1/+7
| | | | | | | | | execute a ET_DYN binary (shared object). This does not make much sense, but some linux scripts expect to be able to execute /lib/ld-linux.so.2 (ldd comes to mind). The sysctl defaults to 0. MFC after: 3 days
* 0xb1881106 seems to be an AGP bridge and some BIOSes incorrectly handlejkim2005-11-142-32/+144
| | | | | the bridge. Therefore, we give the same treatment as we did for nForce3-250 and ULi chipsets. VIA AGPv3 code was copied from agp_via.c.
* In ktr_getrequest(), acquire ktrace_mtx earlier -- while the racerwatson2005-11-141-2/+3
| | | | | | | | | | currently present is minor and offers no real semantic issues, it also doesn't make sense since an earlier lockless check has already occurred. Also hold the mutex longer, over a manipulation of per-process ktrace state, which requires synchronization. MFC after: 1 month Pointed out by: jhb
* Update my email address, so people know where the exact /ariff2005-11-143-7/+7
| | | | | | proper / correct place to bug me. Approved by: netchild (mentor)
* From luigi:ariff2005-11-141-35/+71
| | | | | | | | | | | | | This one simply tries to simplify the logic to select the buffer sizes. I am not sure it is necessary but the code seems a bit more readable to me. And at least i have tried to document how the buffer sizes are computed. Thanks to luigi for deciphering one of the most cryptic part of sound driver. Submitted by: luigi Approved by: netchild (mentor)
* From luigi:ariff2005-11-141-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | In SNDCTL_DSP_SETFRAGMENT, if you specify both read and write channels, the existing code first acts on the read channel, but as a side effect it updates the arguments (maxfrags, fragsz) passed by the caller according to acceptable values for the read channel, and then uses the modified values to act on the write channel. The problem with this approach is that, given a (maxfrags, fragsz) user-specified value, the actual values computed by the read and write channels may differ: e.g. the read channel might want to allocate more fragments than what the user specified because it has no side-effects on the delay and it helps in case of slow readers, whereas the write channel needs to use as few fragments as possible to keep the audio latency low (very important with telephony apps). This patch stores the values computed by the read channel into temproary variables so the write channel will use the actual arguments of the ioctl. This patch is very helpful with telephony apps such as asterisk. Submitted by: luigi Approved by: netchild (mentor)
* Unlike the rest of the world, NDIS code can access "structru2005-11-141-1/+2
| | | | | ifnet" before is has been fully initialized by if_attach(). Account for that to avoid a null pointer dereference.
* ac97.c:ariff2005-11-142-2/+3
| | | | | | | | | | | | | | - Added new codec id for CX20468-21 and VIA1617A. Submitted by: Chen Lihong <lihong.chen@gmail.com> - Re-enable SOUND_MIXER_IGAIN, but set the default level as 0 (mute) Suggested by: luigi mixer.c: - Set default value for SOUND_MIXER_IGAIN as 0 (mute) to avoid feedback problems on some laptops (was disabled by jhb during ac97.c revision 1.42). Approved by: netchild (mentor)
* Fix a long standing unhandled interrupt bug which can causeariff2005-11-141-2/+2
| | | | | | | | | erratic system slowdown (beaten to a pulp) and possible panic. This issue has bugged me for as long as I could remember, until I realized that it is possible for register base offset to hold zero value which is definitely a "FALSE". Approved by: netchild (mentor)
* - Added few more Intel HDA ids (ICH 6/7) which does have backwardariff2005-11-141-104/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | compatible AC97 codec. - As the driver supports so many variants, create a table ids for ease of probing and maintenance. Submitted by: yongari Reviewed/Tested by: multimedia@ - From luigi: The code to compute fragment sizes in the ich driver almost invariably ends up using the full buffer available, no matter how the user specifies fragment size and number. With audio telephony (8khz, 16bit-stereo) and the 16k buffer size this results in an unbearable 500ms delay. This patch makes sure that we never use more than 4 fragments, (i don't think we need more unless there are huge interrupt servicing latencies), and obey to the requested fragment size, so that latency is acceptable. Based on this (and after much regression tests), I can conclude that this driver works best with 2 fragments, thus solving various long standing issues of ICH driver not capable to flush or play short files perfectly. Suggested by: luigi (the idea of smaller fragments) - MPSAFE conversion. Approved by: netchild (mentor)
* Use both (enabled by default) DAC1 and DAC2 to provide 2ariff2005-11-141-105/+473
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | distinct hardware playback channels. DAC configuration can be accessed through kernel hint - hint.pcm.<unit>.dac="val" with following possible values: 0 = Enable both DACs (default) 1 = Enable single DAC (DAC1) 2 = Enable single DAC (DAC2) 3 = Enable both DACs, swap position (DAC2 comes first instead of DAC1) Special case for ES1370: Unlike ES1371,2,3/CT5880, volume for each DAC 1 and 2 can be controlled indepedently (synth for DAC1, pcm for DAC2). It is possible that user will confuse by this behaviour, since both DACs are enabled by default. Thus, provide a knob through sysctl hw.snd.pcm<unit>.single_pcm_mixer: 0 = each DACs will be controlled separately (synth/pcm). 1 = combine both DACs volume mixer controller into a single "pcm" (default) As a side note, fixed rate operation (provided by previous commit) is not a mandatory if the configuration space does not involve DAC2 (perhaps disabled by user through the above kernel hint). Unlike DAC2, DAC1 has its own register / control space, not affected by the speed settings of ADC. Tested by: multimedia@ Approved by: netchild (mentor)
* Fix left/right channel mixed-up during recording by splitting recdevariff2005-11-141-13/+22
| | | | | | | mask to recdev_l and recdev_r, since each have its own unique mask. Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp> Approved by: netchild (mentor)
* Unbreak for !INET6 case.ru2005-11-141-1/+1
|
* Fix misspelling.imp2005-11-141-2/+2
| | | | Submitted by: thompsa
* Provide a dummy NO_XBOX option that lives in opt_xbox.h for pc98.imp2005-11-144-6/+4
| | | | This allows us to eliminate a three ifdef PC98 instances.
* Add xbox associated options/devices to LINT.imp2005-11-141-0/+17
| | | | Submitted by: Rink P.W. Springer
* o Slightly refactor the ctlreq code to maximize code sharing betweenmarcel2005-11-131-67/+127
| | | | | | | | | | | | | | verbs. Only the create verb operates on a provider. All other verbs operate on a GPT geom. Also, the GPT entry oriented verbs require a non-downgraded GPT. o Have all verbs take an optional flags parameter. The flags parameter is a string of single-letter flags. The typical use of these flags is to enable certain behaviour in support fo the gpt(8) tool. o Add dummy implementations for the destroy and recover verbs. This change causes test 2 of the GPT regression test suite to fail. The presence of a geom parameter is now required even for unknown verbs.
* Restore backwards source compatibility with 6.x and 5.x.wpaul2005-11-131-2/+6
|
* Fix a second missed case where the refcount is not decremented.thompsa2005-11-131-2/+3
| | | | MFC after: 3 days
* Fix a mbuf and refcnt leak in the broadcast code.thompsa2005-11-131-4/+4
| | | | | | | If the packet is rejected from pfil(9) then continue the loop rather than returning, this means that we can still try to send it out the remaining interfaces but more importantly the mbuf is freed and refcount decremented on exit.
* Fix endianness issues. iwi now works on big endian architectures too.damien2005-11-131-10/+10
| | | | | Obtained from: NetBSD (scw@) MFC after: 2 weeks
* Remove the unused AAC_DRIVER_BUILD_DATE macro.schweikh2005-11-131-49/+48
| | | | | | Nuke whitespace at EOL while I'm here. Approved by: scottl (MAINTAINER)
* Be more robust when handling Rx interrupts. If we can't allocate a new mbuf,damien2005-11-131-11/+11
| | | | | | | just discard the received frame and reuse the old mbuf. This should prevent the connection from stalling after high network traffic. MFC after: 2 weeks
* Be more robust when handling Rx interrupts. If we can't allocate and DMA mapdamien2005-11-131-21/+41
| | | | | | | a new mbuf, just discard the received frame and reuse the old mbuf. This should fix kernel panics on high network traffic. MFC after: 2 weeks
* Be more robust when handling Rx interrupts. If we can't allocate and DMA mapdamien2005-11-131-24/+42
| | | | | | | a new mbuf, just discard the received frame and reuse the old mbuf. This should fix kernel panics on high network traffic. MFC after: 2 weeks
* Be more robust when handling Rx interrupts. If we can't allocate and DMA mapdamien2005-11-131-20/+40
| | | | | | | | a new mbuf, just discard the received frame and reuse the old mbuf. This should fix kernel panics on high network traffic. Obtained from: NetBSD (joerg@) MFC after: 2 weeks
* Add support for 24/32 bit audio formats/conversion.netchild2005-11-133-113/+264
| | | | | | | | | | | | | | | | | | | | | | | It may be the case that you may hear some unwanted noise while playing back with 24/32 bit. This is a problem in the USB system. Explanation from Hans Petter Selasky: ---snip--- The current USB sound driver only uses one isochronous buffer, that is restarted when it is completed. This will lead to a short period of time, +1ms, where no sound data is sent to the external USB device. Depending on the load of your computer, this can be as much as 50ms. So the USB sound driver must use 2 isochronous transfers. At the beginning one will queue both. Then these are restarted on completion. This will result in a constant-rate data stream to the external sound device, a minimum sound buffer equal to the size of the isochronous buffer, and possibly the sound will reach your ears with less delay. Little delay is a result of constant data rate. Currently only my USB driver will support that. If one tries that with the USB driver in *BSD, then it will crash at the first moment one gets a buffer underrun. ---snip--- Submitted by: Kazuhito HONDA <kazuhito@ph.noda.tus.ac.jp> Mono-recording still not tested by: julian
* Moderate rewrite of kernel ktrace code to attempt to generally improverwatson2005-11-138-92/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reliability when tracing fast-moving processes or writing traces to slow file systems by avoiding unbounded queueuing and dropped records. Record loss was previously possible when the global pool of records become depleted as a result of record generation outstripping record commit, which occurred quickly in many common situations. These changes partially restore the 4.x model of committing ktrace records at the point of trace generation (synchronous), but maintain the 5.x deferred record commit behavior (asynchronous) for situations where entering VFS and sleeping is not possible (i.e., in the scheduler). Records are now queued per-process as opposed to globally, with processes responsible for committing records from their own context as required. - Eliminate the ktrace worker thread and global record queue, as they are no longer used. Keep the global free record list, as records are still used. - Add a per-process record queue, which will hold any asynchronously generated records, such as from context switches. This replaces the global queue as the place to submit asynchronous records to. - When a record is committed asynchronously, simply queue it to the process. - When a record is committed synchronously, first drain any pending per-process records in order to maintain ordering as best we can. Currently ordering between competing threads is provided via a global ktrace_sx, but a per-process flag or lock may be desirable in the future. - When a process returns to user space following a system call, trap, signal delivery, etc, flush any pending records. - When a process exits, flush any pending records. - Assert on process tear-down that there are no pending records. - Slightly abstract the notion of being "in ktrace", which is used to prevent the recursive generation of records, as well as generating traces for ktrace events. Future work here might look at changing the set of events marked for synchronous and asynchronous record generation, re-balancing queue depth, timeliness of commit to disk, and so on. I.e., performing a drain every (n) records. MFC after: 1 month Discussed with: jhb Requested by: Marc Olzheim <marcolz at stack dot nl>
* Add some cards:netchild2005-11-134-5/+67
| | | | | | | | | | | | | | - several TerraTec TValue [1] - PixelView PlayTV Pro REV-4C [2] In case you have the PixelView card, please tell us the "pciconf -v -l" output on multimedia@FreeBSD.org if it works. There are revisions out there which may not work and we need to know which ones work. PR: 53383 [1], 76002 [2] Submitted by: Tanja Wittke <tawi@gruft.de> [1], barner [1], Dan Angelescu <mrhsaacdoh@yahoo.com> [2] MFC after: 2 months
* Don't augment the DRIVER_VERSION "v1.12" with __DATE__ and __TIME__.schweikh2005-11-131-1/+1
| | | | | | | This is the only file of > 1700 files in a buildkernel here doing that. It makes reproducible builds (same source => same binary) impossible. Spotted by: devel/ccache
* Define SIGLWP which is an alias for SIGTHR, the reason why I did thisdavidxu2005-11-131-0/+1
| | | | | | | | is that gdb knows SIGLWP and will pass it to program, otherwise gdb will print out "unknown signal" and discard it, and then thread cancellation won't work for libthr under gdb. MFC: 3 days
* In get_pv_entry() use PMAP_LOCK() instead of PMAP_TRYLOCK() when deadlockalc2005-11-134-4/+16
| | | | cannot possibly occur.
* Make the kern.geom.conftxt sysctl more usable by also dumping themarcel2005-11-121-5/+4
| | | | | | | | | | | MD class. Previously only the DISK class was dumped. The only consumer of this sysctl is libdisk (i.e. sysinstall) and it tests explicitly for instances of the DISK class. Dumping other classes is therefore harmless. By also dumping the MD class regression tests can be written that use the MD class for operations that would normally be done on the DISK class. The sysctl can now be used to test if those operations took an effect. An example is partitioning.
* Really fix it this time.ru2005-11-121-3/+3
|
* Attempt to fix pc98 GENERIC compile breakage.ru2005-11-121-3/+3
|
* Fix a > 1 year old typo that caused the ulpt driver to try readingiedowse2005-11-121-1/+1
| | | | | | | | | | from the printer and discarding the data even if the ulpt device was opened for reading. This resulted in crashes because two conconcurrent read transfers were using the same transfer structure. PR: usb/88886 Reported By: Alex Pivovarov MFC after: 1 week
* style(9) cleanups.rodrigc2005-11-121-16/+17
| | | | Spotted by: njl, bde
* Significant refactoring of the accounting code to improve locking and VFSrwatson2005-11-121-108/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | happiness, as well as correct other bugs: - Replace notion of current and saved accounting credential/vnode with a single credential/vnode and an acct_suspended flag. This simplifies the accounting logic substantially. - Replace acct_mtx with acct_sx, a sleepable lock held exclusively during reconfiguration and space polling, but shared during log entry generation. This avoids holding a mutex over sleepable VFS operations. - Hold the sx lock over the duration of the I/O so that the vnode I/O cannot occur after vnode close, which could occur previously if accounting was disabled as a process exited. - Write the accounting log entry with Giant conditionally acquired based on the file system where the log is stored. Previously, the accounting code relied on the caller acquiring Giant. - Acquire Giant conditionally in the accounting callout based on the file system where the accounting log is stored. Run the callout MPSAFE. - Expose acct_suspended via a read-only sysctl so it is possibly to programmatically determine whether accounting is suspended or not without attempting to parse logs. - Check both acct_vp and acct_suspended lock-free before entering the accounting sx lock in acct(). - When accounting is disabled due to a VBAD vnode (i.e., forceable unmount), generate a log message indicating accounting has been disabled. - Correct a long-standing bug in how free space is calculated and compared to the required space: generate and compare signed results, not unsigned results, or negative free space will cause accounting to not be suspended when required, or worse, incorrectly resumed once negative free space is reached. MFC after: 2 weeks
* Make sure only remove one signal by debugger.davidxu2005-11-121-1/+2
|
* Update PCI ids to add the E200, E200i, P400, and P400i storageps2005-11-111-3/+8
| | | | | | controllers. Remove the E400 since it is not a real product. Submitted by: HP
* - Store pointer to the link-level address right in "struct ifnet"ru2005-11-1181-242/+220
| | | | | | | | | | rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead.
* Use the more appropriate ifnet_byindex() instead of ifaddr_byindex().ru2005-11-111-2/+2
|
OpenPOWER on IntegriCloud