summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* It has been observed on the mailing lists that the different categoriesalc2007-09-157-24/+28
| | | | | | | | | | | | | | | of pages don't sum to anywhere near the total number of pages on amd64. This is for the most part because uma_small_alloc() pages have never been counted as wired pages, like their kmem_malloc() brethren. They should be. This changes fixes that. It is no longer necessary for the page queues lock to be held to free pages allocated by uma_small_alloc(). I removed the acquisition and release of the page queues lock from uma_small_free() on amd64 and ia64 weeks ago. This patch updates the other architectures that have uma_small_alloc() and uma_small_free(). Approved by: re (kensmith)
* Correct an assertion in vm_pageout_flush(). Specifically, if a page'salc2007-09-151-1/+2
| | | | | | | | | | | status after vm_pager_put_pages() is VM_PAGER_PEND, then it could have already been recycled, i.e., freed and reallocated to a new purpose; thus, asserting that such pages cannot be written is inappropriate. Reported by: kris Submitted by: tegge Approved by: re (kensmith) MFC after: 1 week
* Add the PCI id for the Intel 7221's integrated graphics controller. It isalc2007-09-152-0/+4
| | | | | | | | similar to a 915G. Approved by: re (kensmith) Reviewed by: anholt MFC after: 3 weeks
* Fix typo which brokes VJ decompressionmav2007-09-151-1/+1
| | | | | | when VJC negotiated in only one direction. Approved by: re (bmah), glebius (mentor)
* Remove the definition and implementation of 'CALLOUT_NETGIANT', a now- (andrwatson2007-09-152-12/+2
| | | | | | | possibly always-) unused define. Reported by: kmacy Approved by: re (kensmith)
* Remove DIAG code that discards oversized packets.julian2007-09-141-14/+0
| | | | | | There has been general consensus that this was a bad idea/ Approved by: re (bmah)
* During boot(before setting IP address) PHY can generate link stateyongari2007-09-141-6/+6
| | | | | | | | | | | | change interrupt if the link is established with link parter. However interrupt handler didn't acknowledge the interrupt if nfe(4) was not running at the time of interrupt delivery. This caused endless interrupt generation. Fix the bug by acknowledging the interrupt regardless of running state of the driver. PR: kern/116295 Submitted by: Mark Derbyshire (mark At taom dot com) Approved by: re (kensmith)
* Fix typo.yongari2007-09-141-2/+2
| | | | | Pointed out: marius Approved by: re (bmah)
* Currently the LO_NOPROFILE flag (which is masked on upper level code byattilio2007-09-143-5/+7
| | | | | | | | | | | | | | | | | | per-primitive macros like MTX_NOPROFILE, SX_NOPROFILE or RW_NOPROFILE) is not really honoured. In particular lock_profile_obtain_lock_failure() and lock_profile_obtain_lock_success() are naked respect this flag. The bug leads to locks marked with no-profiling to be profiled as well. In the case of the clock_lock, used by the timer i8254 this leads to unpredictable behaviour both on amd64 and ia32 (double faults panic, sudden reboots, etc.). The amd64 clock_lock is also not marked as not profilable as it should be. Fix these bugs adding proper checks in the lock profiling code and at clock_lock initialization time. i8254 bug pointed out by: kris Tested by: matteo, Giuseppe Cocomazzi <sbudella at libero dot it> Approved by: jeff (mentor) Approved by: re
* Add support for a new device id (9). Mxge NICs with the newgallatin2007-09-132-1/+3
| | | | | | device id support MSI-X. Approved by: re (bmah)
* - DF bit was on for COOKIE-ECHO chunks. This isrrs2007-09-139-40/+60
| | | | | | | | | | | | | incorrect and should be OFF letting IP fragment large cookie-echos. - Rename sysctl variable logging to log_level. - Fix description of sysctl variable stats. - Add sysctl variable log to make sctp_log readable via sysctl mechanism (this is by compile switch and targets non KTR platforms or when someone wants to do performance wise tracing). - Removed debug code Approved by: re@freebsd.org (B Mah)
* - Incorrect error EAGAIN returned for invalid send on a lockedrrs2007-09-139-13/+36
| | | | | | | | | | stream (using EEOR mode). Changed to EINVAL (in sctp_output.c) - Static analysis comments added - fix in mobility code to return a value (static analysis found). - sctp6_notify function made visible instead of static (this is needed for Panda). Approved by: re@freebsd.org (B Mah)
* subr_sleepqueue.c presents a thread lock missing which leads to dangerousattilio2007-09-131-0/+2
| | | | | | | | | | | | | races for some struct thread members. More specifically, this bug seems responsible for some memory dumping problems people were experiencing. Fix this adding correct thread locking. Tested by: rwatson Submitted by: tegge Approved by: jeff Approved by: re
* Make the type of the memory used by the BPF filter unsigned, so itdwmalone2007-09-131-1/+1
| | | | | | | | | | | matches the BPF registers (which are the only thing that is assigned to/from BPF memory). This is a pedantic change that shouldn't change any behaviour. PR: 115931 Submitted by: Matthew Luckie <mjl@luckie.org.nz> Approved by: re (bmah) MFC after: 3 weeks
* Reject requests to start or ack a suspend sequence on platforms that do notnjl2007-09-131-0/+10
| | | | | | | support suspend/resume, currently all except i386. Tested by: jkim Approved by: re
* It's probably time I learn C.cognet2007-09-121-2/+2
| | | | | | | | | | Fix a few while (!uart_getreg() & SR1_TNF) when while (!(uart_getreg() & SR18TNF)) was really meant. This driver should die anyway, it's awful, and uart_ns8250 should be fine for the StrongArm 1110. I'll kill it later. Submitted by: Mikhael Skvorts Approved by: re (blanket)
* When restoring the mount after umount failed, the MNTK_UNMOUNT flagkib2007-09-123-5/+15
| | | | | | | | | | | | | | | prevents insmntque() from placing reallocated syncer vnode on mount list, that causes panic in vfs_allocate_syncvnode(). Introduce MNTK_NOINSMNTQ flag, that marks the period when instmntque is not allowed to success, instead of MNTK_UNMOUNT. The MNTK_NOINSMNTQ is set and cleared simultaneously with MNTK_UNMOUNT, except on umount error path, where it is cleaned just before the syncer vnode is going to be allocated. Reported by: Peter Jeremy <peterjeremy optushome com au> Suggested by: tegge Approved by: re (rwatson)
* Update snd_emu10kx driver with recent perforce changes (and fewariff2007-09-127-532/+1252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | other changes too). (without any real order) 1. Use device_get_nameunit for mutex naming 2. Add timer for low-latency playback 3. Move most mixer controls from sysctls to mixer(8) controls. This is a largest part of this patch. 4. Add analog/digital switch (as a temporary sysctl) 5. Get back support for low-bitrate playback (with help of (2)) 6. Change locking for exclusive I/O. Writing to non-PTR register is almost safe and does not need to be ordered with PTR operations. 7. Disable MIDI until we get it to detach properly and fix memory managment problems. 8. Enable multichannel playback by default. It is as stable as single-channel mode. Multichannel recording is still an experimental feature. 9. Multichannel options can be changed by loader tunables. 10. Add a way to disable card from a loader tunable. 11. Add new PCI IDs. 12. Debugger settings are loader tunables now. 14. Remove some unused variables. 15. Mark pcm sub-devices MPSAFE. 16. Partially revert (bus_setup_intr -> snd_setup_intr) since it need to be done independently Submitted by: Yuriy Tsibizov (driver maintainer) Approved by: re (bmah)
* Fix for an infinite loop in processing ESP, IPv6 packets.gnn2007-09-121-4/+17
| | | | | | | | The control input routine passes a NULL as its void argument when it has reached the innermost header, which terminates the loop. Reported by: Pawel Worach <pawel.worach@gmail.com> Approved by: re
* Evidently setup_rss needs to happen whenever bind_qsets is done. This fixeskmacy2007-09-111-4/+0
| | | | | | | a problem with jumbo frames when not using msi-x interrupts. Supported by: Chelsio Approved by: re (blanket)
* This is a follow-up, cleaning-up commit about recent changes involvingattilio2007-09-115-5/+5
| | | | | | | | | | | | | | | | topology foo functions. Working at the patch for topology problems in ia32/amd64 evicted some problems regarding functions ordering in the SI_SUB_CPU family of SYSINIT'ed subsystems. In order to avoid problems with new modified to involved functions, a correct ordering is not semantically specified for SI_SUB_CPU functions (for a larger view of the issue please visit: http://lists.freebsd.org/pipermail/freebsd-current/2007-July/075409.html ) Discussed with: peter Tested by: kris, Rui Paulo <rpaulo@FreeBSD.org> Approved by: jeff Approved by: re
* A number of small fixes:jfv2007-09-102-6/+5
| | | | | | | | | | - duplicate #define in header, thanks to Kevin Lo for pointing out. - incorrect BUSMASTER enable logic, thanks Patrick Oeschger - 82543 fails due to bogus IO BAR logic - Allow 82571 to use MSI interrupts - Checksum Offload for UDP not working on 82575 Approved by:re
* - Removed debug code and more C++ style comments in the mobilityrrs2007-09-101-14/+1
| | | | | code in sctp_asconf.c Approved by: re@freebsd.org (B Mah)
* Reduce the limit of vnodes on i386 when ZFS is loaded to 3/4 of the originalpjd2007-09-102-0/+82
| | | | | | | | | | | | | value, so we don't run out of KVA. The default vnodes limit fits better for UFS, but ZFS allocated more file system specific memory for a vnode than UFS. Don't touch vnodes limit if we detect it was tuned by system administrator and restore original value when ZFS is unloaded. This isn't final fix, but before we implement something better, this will help to stabilize ZFS under heavy load on i386. Approved by: re (bmah)
* Add PCI IDs for Intel ICH9.simon2007-09-102-0/+8
| | | | | | | | PR: kern/114473 Submitted by: Michael Fuckner <michael@fuckner.net> MFC after: 2 weeks OK'ed by: sos Approved by: re (bmah)
* After dfr@ vnode leak fix, we can allow ARC to consume more memory.pjd2007-09-102-4/+4
| | | | | Tested by: kris Approved by: re (bmah)
* - Added some comments to tell where the htcprrs2007-09-103-11/+19
| | | | | | | | | | code comes from. - Fix a LOR on Mac OS X: Do not hold an stcb lock when calling soisconnected for a socket which has the SS_INCOMP bit set on so_state. - fix a comment to be non c++ style. Approved by: re@freebsd.org (B Mah)
* Make sure that either inp is NULL or we have obtained a lock on it beforekensmith2007-09-101-13/+13
| | | | | | | | | | jumping to dropunlock to avoid a panic. While here move the calls to ipsec4_in_reject() and ipsec6_in_reject() so they are after we obtain the lock on inp. Original patch to avoid panic: pjd Review of locking adjustments: gnn, sam Approved by: re (rwatson)
* Further UDPv4 cleanup:rwatson2007-09-101-17/+17
| | | | | | | | | | | | - Resort includes a bit. - Correct typos and wording problems in comments. - Rename udpcksum to udp_cksum to be consistent with other UDP-related configuration variables. - Remove indirection of udp_notify through local notify variable in udp_ctlinput(), which is presumably due to copying and pasting from TCP, where multiple notify routines exist. Approved by: re (kensmith)
* Fix a DIV0 in case a large value for fs_avgfilesize or fs_avgfpdirbz2007-09-101-1/+4
| | | | | | | | | | | | | is given (with newfs or tunefs) and dirsize overflows. In case dirsize is <= 0 because of an overflow set maxcontigdirs to 0 so it will be 1 later. This is what would happen for large fs_avgfilesize. [1] Identified with help from: roberto, pjd Submitted by: pjd [1] Approved by: re (rwatson) MFC after: 8 days
* Fixing invalid channel display in ifconfig(8) by implementing requiredavatar2007-09-101-0/+17
| | | | | | | | | | | | | | | ioctl(). Note that other information provided by ifconfig(8) such like "list chan" or "list ap" are still not available at this moment. Before an(4) is connected to wlan(4), users are encouraged to use ancontrol(8) to retrieve aforementioned information. Reported by: dhw (http://lists.freebsd.org/pipermail/freebsd-current/2007-July/074848.html) Reviewed by: ambrisko Tested by: dhw Approved by: re (bmah)
* pull in changes made to RELENG_6 version in the process of doing the MFCkmacy2007-09-105-29/+36
| | | | | Supported by: Chelsio Approved by: re (blanket)
* Check for multicast destination on bpf injected packets and update the M_*CASTthompsa2007-09-101-4/+19
| | | | | | | | | | flags, the absense of these flags causes problems in other areas such as bridging which expect them to be correct. At the moment only Ethernet DLTs are checked. Reviewed by: bms, csjp, sam Approved by: re (bmah)
* Rename mac_check_vnode_delete() MAC Framework and MAC Policy entryrwatson2007-09-1010-138/+138
| | | | | | | | | | | | | | point to mac_check_vnode_unlink(), reflecting UNIX naming conventions. This is the first of several commits to synchronize the MAC Framework in FreeBSD 7.0 with the MAC Framework as it will appear in Mac OS X Leopard. Reveiwed by: csjp, Samy Bahra <sbahra at gwu dot edu> Submitted by: Jacques Vidrine <nectar at apple dot com> Obtained from: Apple Computer, Inc. Sponsored by: SPARTA, SPAWAR Approved by: re (bmah)
* - Remove filter supportkmacy2007-09-091-298/+0
| | | | | Supported by: Chelsio Approved by: re(blanket)
* In __bswap16_var(), make sure the 16 upper bits are cleared; whilecognet2007-09-091-2/+4
| | | | | | | optimizing, gcc4 doesn't always do so. Reported by: Nathan Whitehorn Approved by: re (blanket)
* Add back in support for normal mbuf chaining on RX under DISABLE_MBUF_IOVECkmacy2007-09-093-30/+174
| | | | | Approved by: re(blanket) Supported by: Chelsio
* Fix last-minute typo in last commit caused by pre-commit scriptskmacy2007-09-091-1/+1
| | | | Approved by: re(blanket)
* - fix qset to port binding as a proper fix for the problems encountered on ↵kmacy2007-09-0912-545/+685
| | | | | | | | | | | | the 4-port - fix the use after free seen when sending packets small enough to fit as an immediate and bpf peers are present - update to firmware rev 4.7 along with various small vendor fixes Supported by: Chelsio Approved by: re (blanket) MFC after: 3 days
* Do not set the RTF_GATEWAY flag if RTF_LLINFO is set, it doesn't make muchcognet2007-09-081-1/+2
| | | | | | | | | sense in that context, and leads to unusable routes. This should unbreak bootpd. Discussed with: glebius Submitted by: bms Approved by: re (bmah)
* - send call has a reference to uio->uio_resid inrrs2007-09-0820-655/+1268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the recent send code, but uio may be NULL on sendfile calls. Change to use sndlen variable. - EMSGSIZE is not being returned in non-blocking mode and needs a small tweak to look if the msg would ever fit when returning EWOULDBLOCK. - FWD-TSN has a bug in stream processing which could cause a panic. This is a follow on to the codenomicon fix. - PDAPI level 1 and 2 do not work unless the reader gets his returned buffer full. Fix so we can break out when at level 1 or 2. - Fix fast-handoff features to copy across properly on accepted sockets - Fix sctp_peeloff() system call when no true system call exists to screen arguments for errors. In cases where a real system call exists the system call itself does this. - Fix raddr leak in recent add-ip code change for bundled asconfs (even when non-bundled asconfs are received) - Make sure ipi_addr lock is held when walking global addr list. Need to change this lock type to a rwlock(). - Add don't wake flag on both input and output when the socket is closing. - When deleting an address verify the interface is correct before allowing the delete to process. This protects panda and unnumbered. - Clean up old sysctl stuff and get rid of the old Open/Net BSD structures. - Add a function to watch the ranges in the sysctl sets. - When appending in the reassembly queue, validate that the assoc has not gone to about to be freed. If so (in the middle) abort out. Note this especially effects MAC I think due to the lock/unlock they do (or with LOCK testing in place). - Netstat patch to get rid of warnings. - Make sure that no data gets queued to inactive/unconfirmed destinations. This especially effect CMT but also makes a impact on regular SCTP as well. - During init collision when we detect seq number out of sync we need to treat it like Case C and discard the cookie (no invarient needed here). - Atomic access to the random store. - When we declare a vtag good, we need to shove it into the time wait hash to prevent further use. When the tag is put into the assoc hash, we need to remove it from the twait hash (where it will surely be). This prevents duplicate tag assignments. - Move decr-ref count to better protect sysctl out of data. - ltrace error corrections in sctp6_usrreq.c - Add hook for interface up/down to be sent to us. - Make sysctl() exported structures independent of processor architecture. - Fix route and src addr cache clearing for delete address case. - Make sure address marked SCTP_DEL_IP_ADDRESS is never selected as src addr. - in icmp handling fixed so we actually look at the icmp codes to figure out what to do. - Modified mobility code. Reception of DELETE IP ADDRESS for a primary destination and SET PRIMARY for a new primary destination is used for retransmission trigger to the new primary destination. Also, in this case, destination of chunks in send_queue are changed to the new primary destination. - Fix so that we disallow sending by mbuf to ever have EEOR mode set upon it. Approved by: re@freebsd.org (B Mah)
* - Locking compatiability changes. This involves addingrrs2007-09-0818-255/+925
| | | | | | | | | | | additional flags to many function calls. The flags only get used in BSD when we compile with lock testing. These flags allow apple to escape the "giant" lock it holds on the socket and have more fine-grained locking in the NKE. It also allows us to test (with witness) the locking used by apple via a compile switch (manually applied). Approved by: re@freebsd.org(B Mah)
* Continue UDP/UDPv6 synchronization project:rwatson2007-09-081-61/+55
| | | | | | | | | - Fix copyrights, comments in UDPv6. - Remove macro defines for in6pcb and udp6stat. - Consistently refer to inpcbs as 'inp' and not also 'in6p'. Reviewed by: gnn, jinmei, bz Approved by: re (bmah)
* Back out tcp_timer.c:1.93 and associated changes that reimplemented the manyrwatson2007-09-075-335/+267
| | | | | | | | | | | | | | | | | | | | | | | TCP timers as a single timer, but retain the API changes necessary to reintroduce this change. This will back out the source of at least two reported problems: lock leaks in certain timer edge cases, and TCP timers continuing to fire after a connection has closed (a bug previously fixed and then reintroduced with the timer rewrite). In a follow-up commit, some minor restylings and comment changes performed after the TCP timer rewrite will be reapplied, and a further change to allow the TCP timer rewrite to be added back without disturbing the ABI. The new design is believed to be a good thing, but the outstanding issues are leading to significant stability/correctness problems that are holding up 7.0. This patch was generated by silby, but is being committed by proxy due to poor network connectivity for silby this week. Approved by: re (kensmith) Submitted by: silby Tested by: rwatson, kris Problems reported by: peter, kris, others
* - fix a bug that zyd_attach() returns 0 even if it encountered errorssam2007-09-071-3/+11
| | | | | | | | | | that can lead to a panic when the stick is yanked. - make sure that zyd_attach() returns 0 or errno. Submitted by: Weongyo Jeong <weongyo.jeong@gmail.com> Reported by: Ted Lindgreen <ted@tednet.nl> Reviewed by: sam Approved by: re (blanket wireless)
* o Revamp the sparc64 interrupt code in order to be able to interfacemarius2007-09-0611-545/+703
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with the INTR_FILTER-enabled MI code. Basically this consists of registering an interrupt controller (of which there can be multiple and optionally different ones either per host-to-foo bridge or shared amongst host-to-foo bridges in any one machine) along with an interrupt vector as specific argument for all the interrupt vectors used by a given host-to-foo bridge (roughly similar to registering interrupt sources on amd64 and i386), providing functions to enable, clear and disable the interrupts of the children beneath the bridge. This also includes: - No longer entering a critical section in tl0_intr() and tl1_intr() for executing interrupt handlers but rather let the handlers enter it themselves so in the case of intr_event_handle() we don't enter a nested critical section. - Adding infrastructure for binding delivery of interrupt vectors to specific CPUs which later on can be interfaced with the code from amd64/i386 for binding interrupts to specific CPUs. - Getting rid of the wrapper hack introduced along the lines of the API changes for INTR_FILTER which as a side-effect caused interrupts associated with ithread handlers only to get the elevated priority of those associated with filters ("fast handlers") (this removes the hack also in the non-INTR_FILTER case). - Disabling (by not clearing) an interrupt in the interrupt controller until all associated handlers have been executed, which is crucial for the typical locking strategy of NIC drivers in order to work correctly in case of shared interrupts. This was a more or less theoretical problem on sparc64 though, as shared interrupts are rather uncommon there except for the on-board SCCs and UARTs. Note that due to the behavior of at least of some of the interrupt controllers used on sparc64 an enable+EOI instead of a disable+EOI approach (as implied by the INTR_FILTER MI code and implemented on other architectures) is used as the latter can cause lost interrupts or in the worst case interrupt starvation. o Correct a typo in sbus_alloc_resource() which caused (pass-through) allocations to only work down to the grandchildren of the bus, which wasn't a real problem so far as we don't support any devices which are great-grandchildren or greater of a U2S bridge, yet. o In fhc(4) use bus_{read,write}_4() instead of bus_space_{read,write}_4() in order to get rid of sc_bh and sc_bt in the fhc_softc. Also get rid of some other unneeded members in fhc_softc. Reviewed by: marcel (earlier version) Approved by: re (kensmith)
* Style(9) fix - use #define<tab> consistently.marius2007-09-061-15/+15
| | | | Approved by: re (kensmith)
* oops, add missing bit from last changesam2007-09-061-0/+2
| | | | Approved by: re (blanket wireless)
* Fixup sta inactivity handling:sam2007-09-064-6/+24
| | | | | | | | | | | | o reset ni_inact when ni_inact_reload is changed so we're assured a valid setting o never let ni_inact go negative o add a knob to disable hostap sta idle handling (e.g. so it can be done by a user application) o remove bogus reload on associate Reviewed by: avatar Approved by: re (blanket wireless)
* Add missing bg scanning bits; update ic_lastdata and cancel anysam2007-09-051-0/+6
| | | | | | bg scan when there's outbound traffic. Approved by: re (blanket wireless)
OpenPOWER on IntegriCloud