summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove a comment about bridging wireless client, the new net80211 vap codethompsa2008-08-041-3/+0
| | | | supports this.
* Fix build when WITHOUT_DYNAMICROOT is specified in src.conf(5).mlaier2008-08-041-0/+2
|
* Add EPERM to the ERRORS section.trhodes2008-08-041-1/+3
| | | | PR: 125746
* Lock the consumers of the iicbus(4) infrastructure:jhb2008-08-043-103/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | - ad7418(4) uses an sx lock instead of a mtx since the iicbus(4) stuff it calls can sleep (request_bus()). Also, I expanded the locking slightly to serialize writes to data stored in the softc. - Similarly, the icee(4) driver now uses an sx lock instead of a mutex. I also removed the pointless OPENED flag and flags field from the softc. - The locking for the ic(4) driver was a bit trickier: - Add a mutex to the softc to protect softc data. - The driver uses malloc'd buffers that are the size of the interface MTU to send and receive packets. Previously, these were allocated every time the interface was brought up and anytime the MTU was changed, with various races that could result in memory leaks. I changed this to be a bit simpler and more like other NIC drivers in that we allocate buffers during attach for the default MTU size and only reallocate them on MTU changes. The reallocation procedure goes to some lengths with various flags to not replace either the the receive or transmit buffers while the driver is busy receiving or transmitting a packet. - Store the device_t of the driver in the softc instead of detours into new-bus using if_dunit from the ifnet and an even more bizarre detour to get the softc instead of using if_softc. - Drop the driver mutex when invoking netisr_dispatch() to pass the packet up to IP. - Use if_printf().
* Add locking to the core iicbus(4) drivers:jhb2008-08-045-106/+128
| | | | | | | | | | | | | | | | | | - Add an sx lock to the iic(4) driver to serialize open(), close(), read(), and write and to protect sc_addr and sc_count in the softc. - Use cdev->si_drv1 instead of using the minor number of the cdev to lookup the softc via newbus in iic(4). - Store the device_t in the softc to avoid a similar detour via minor numbers in iic(4). - Only add at most one instance of iic(4) and iicsmb(4) to each iicbus(4) instance, and do it in the child driver. - Add a mutex to the iicbus(4) softc to synchronize the request/release bus stuff. - Use __BUS_ACCESSOR() for IICBUS_ACCESSOR() instead of rolling our own. - Add a mutex to the iicsmb(4) softc to protect softc state updated in the interrupt handler. - Remove Giant from all the smbus methods in iicsmb(4) now that all the iicbus(4) backend is locked.
* Add locking to the various iicbus(4) bridge drivers:jhb2008-08-0411-57/+142
| | | | | | | | | | | | | | | | | | | | | - Just grab Giant in the ixp425_iic(4) driver since this driver uses a shared address/data register window pair to access the actual I2C registers. None of the other ixp425 drivers lock access to these shared address/data registers yet and that would need to be done before this could use any meaningful locking. - Add locking to the interrupt handler and 'iicbus_reset' methods of the at91_twi(4) driver. - Add locking to the pcf(4) driver. Other pcf(4) fixes include: - Don't needlessly zero the softc. - Use bus_foo rather than bus_space_foo and remove bus space tag and handle from softc. - The lpbb(4) driver just grabs Giant for now. This will be refined later when ppbus(4) is locked. - As was done with smbus earlier, move the DRIVER_MODULE() lines to match the bus driver (either iicbus or iicbb) to the bridge driver into the bridge drivers. Tested by: sam (arm/ixp425)
* Do not modify td->td_intr_nesting_level, it is now done in the MI code.cognet2008-08-041-3/+0
| | | | | | This fixes the cpu time being falsely reported as interrupt time. MFC after: 3 days
* Close two different races with concurrent opens of pty master devicesjhb2008-08-041-5/+24
| | | | | | that could result in leaked ttys or a leaked pty + tty pair. MFC after: 1 week
* - Close a race with concurrent open's of a pts master device which couldjhb2008-08-041-7/+13
| | | | | | | | result in leaked tty structures. - When constructing a new pty, allocate it's tty structure before adding it to the list. MFC after: 1 week
* Fix a typo.jhb2008-08-041-1/+1
|
* Add locking to snc(4) so it is MPSAFE:jhb2008-08-045-76/+130
| | | | | | | | | | | | | | | | - Add a mutex to the softc to protect the softc and device hardware. - Use a private timer routine to drive the transmit watchdog timer instead of using if_watchdog/if_timer. - If if_alloc() fails during attach, fail the attach with an error rather than panic'ing. - Clear RUNNING and OACTIVE only in sncstop(). - Don't mess with IFF_UP. - Don't leak 'struct ifnet' on detach. - Setup interrupt handler after ether_ifattach(). - Call ether_ifdetach() rather than if_detach() in the pccard detach routine. Tested by: no one despite repeated requests
* Add coretemp(4) and k8temp(4).rpaulo2008-08-041-0/+2
| | | | MFC after: 1 day
* Fix ARM nocache allocator:raj2008-08-041-5/+4
| | | | | | | | | | | | - let the loop iterate every page (as intended), and not some multiplies (which led to a fake exhaustion of the ARM_NOCACHE_KVA_SIZE) - eliminate using MIN(): it compared number of pages vs. address (ARM_TP_ADDRESS), which was bogus Reviewed by: cognet, imp Obtained from: Piotr Ziecik kosmo ! semihalf dot com MFC after: 3 days
* Merge state reuse for tcp.mlaier2008-08-041-0/+17
| | | | | | PR: kern/125261 Obtained from: OpenBSD MFC after: 1 week
* We need -I$S to compile the elf trampoline.cognet2008-08-041-5/+7
| | | | MFC after: 3 days
* Remove unneeded #include <stdlib.h> (?)cognet2008-08-041-2/+0
| | | | MFC after: 3 days
* Lower the priority of the sleep in the syscons for "waitvt" wchan tokib2008-08-041-1/+1
| | | | | | | | | PZERO + 1. The sleeping process at the priority <= PZERO is counted as blocked, or, as comment states, 'disk wait'. PZERO + 1 works as well, and does not cause user confusion. Reported by: sam <samflanker at gmail com> MFC after: 1 week
* Make pmap_kenter_attr() static.alc2008-08-044-4/+4
|
* Mark functions as __dead2 in order to help the LLVM static checkercperciva2008-08-041-2/+2
| | | | | | understand which code paths aren't possible. Reported by: edwin
* Dereferencing uninitialized pointers considered harmful. Prior to thiscperciva2008-08-041-0/+4
| | | | | | | | | commit, calling i386_parsedev(..., X, ...) where X is "ad", "bge", or any other disk or network device name without a unit number, would result in dereferencing whatever happened to be on the stack where the variable "cp" is stored. Found by: LLVM/Clang Static Checker
* Initialize "nconv" to a reasonable value in all code paths. Prior tocperciva2008-08-041-1/+3
| | | | | | | this commit, sprintf("%s", "") could fail depending on what happened to be on the stack. Found by: LLVM/Clang Static Checker
* Set "max" to a reasonable value if BLOCKSIZE has a bogus unit. Priorcperciva2008-08-041-0/+1
| | | | | | | | | to this commit, "env BLOCKSIZE=4X df" prints not only "4X: unknown blocksize" as expected, but sometimes also "maximum blocksize is 1G" and "minimum blocksize is 512" depending on what happened to be on the stack. Found by: LLVM/Clang Static Checker
* Don't close file descriptor number <whatever random garbage was on thecperciva2008-08-041-0/+1
| | | | | | | stack>. Found by: LLVM/Clang Static Checker MFC after: 1 week
* Setting a variable to the same value twice doesn't actually make itcperciva2008-08-043-4/+1
| | | | | | more likely to have the right value. Remove superfluous assignments. Found by: LLVM/Clang Static Checker
* Rearrange conditional compilation directives. This makes syntaxyongari2008-08-041-2/+3
| | | | highlighting work in vim.
* Remove return keyword at the end of functions that return void.yongari2008-08-041-14/+0
|
* Remove register keyword.yongari2008-08-041-4/+4
|
* Use ANSI C declarations for all functions.yongari2008-08-041-104/+41
|
* Don't enable TSO by default. Users of RTL8169/8110 reportedyongari2008-08-041-0/+7
| | | | | | | | | | | | watchdog timeout issues and the root cause seems to stem from silicon bug of controller. Personally I couldn't reproduce it on RTL8169 controller but it seems it's dependent on usage pattern. For newer PCIe based controllers I have no TSO complaints but turning off TSO would be more safe. Users who are sure that their controller works with TSO can still reenable the TSO with ifconfig(8). Reported by: Oliver Lehmann (lehmann at ans-netz dot de), Eugene Butusov (ebutusov at gmail dot com)
* The number of bits reserved for MSS in RealTek controllers isyongari2008-08-042-0/+26
| | | | | | | 11bits. This limits the maximum interface MTU size in TSO case as upper stack should not generate TCP segments with MSS greater than the limit. Armed with this information, disable TSO if interface MTU is greater than the limit.
* Mark functions as __dead2 in order to help the LLVM static checkercperciva2008-08-049-32/+33
| | | | | | | understand which code paths aren't possible. This commit eliminates 117 false positive bug reports of the form "allocate memory; error out if pointer is NULL; use pointer".
* Make quota(1) to compile with WARNS=6:delphij2008-08-041-5/+2
| | | | | | - ANSI'fy showrawquotas(). - Shut up GCC by initializing bgrace and igrace. The situation that caused the GCC warning can never happen though.
* Restructure and use different variables in the tests that involvescf2008-08-031-13/+15
| | | | | | | | | environ[0] to be more obvious that environ is not NULL before environ[0] is tested. Although I believe the previous code worked, this change improves code maintainability. Reviewed by: ache MFC after: 3 days
* Add EAGAIN to the ERRORS list, as found in kern_jail.c.trhodes2008-08-031-1/+3
| | | | | PR: 125253 Submitted by: Mateusz Guzik <mjguzik@gmail.com> (original version)
* Kill a dead variableantoine2008-08-031-2/+0
| | | | | PR: 126223 Submitted by: Mateusz Guzik
* ctime() expects a time_t, but qup->dqblk.dqb_btime is an int32_t, so forcognet2008-08-031-6/+9
| | | | | | | | | big endian platforms where time_t is 64bits (ie armeb and sparc64), it will be a problem. Use a temporary time_t to work around this. Submitted by: Matthew Luckie <mjl AT luckie DOT org dot nz> MFC after: 3 days
* Restored from previous backing out (because that is OpenBSD way, soache2008-08-031-12/+16
| | | | | | | | | assumed to be reviewd by them): Stir directly from the kernel PRNG, without taking less random pid & time bytes too (when it is possible). The difference with OpenBSD code is that they have KERN_ARND sysctl for that task, while we need to read /dev/random
* - back out my last commit as it seems to be wrong.danger2008-08-031-2/+0
| | | | Spotted by: das
* Fix some style bogosity from fdlibm.das2008-08-032-12/+12
|
* Minor improvements:das2008-08-033-20/+20
| | | | | | | - Improve the order of some tests. - Fix style. Submitted by: bde
* Remove broken code to replace st_mode value with ACCESSPERMS whenrwatson2008-08-031-5/+0
| | | | | | | | | | | | | | | | | lstat(2) is called on symlinks -- this code appears never to have worked. The PR this addresses suggests that the intended original behavior is the right one, but as bde points out in the PR comments, we do actually support storing a mode on symlinks, so returning it seems reasonable. This is consistent with Mac OS X, which despite documentation to the contrary does return the mode set on a symlink, but not some other platforms. The Single Unix Spec requires only that the returned bits be "meaningful", which seems at best unhelpful as advice goes. PR: 25018 MFC after: 3 days
* Add "add pc, whatever" as a branch instruction, we use it in memcpy().cognet2008-08-032-2/+39
| | | | MFC after: 3 days
* DDB scripting, textdumps, output capture, etc, all will appear inrwatson2008-08-031-1/+1
| | | | | | | FreeBSD 7.1 before 8.0 ships. Spotted by: Ulrich Spoerlein <uspoerlein at gmail dot com> MFC after: 3 days
* Fill in a few sysctl descriptions.trhodes2008-08-034-7/+8
| | | | | Reviewed by: alc, Matt Dillon <dillon@apollo.backplane.com> Approved by: alc
* DDB scripting, textdumps, output capture, etc, all will appear inrwatson2008-08-032-1/+6
| | | | | | | FreeBSD 7.1 before 8.0 ships. Spotted by: Ulrich Spoerlein <uspoerlein at gmail dot com> MFC after: 3 days
* Document a few sysctls.trhodes2008-08-032-5/+7
| | | | Approved by: imp
* Calling linker_load_dependencies() while holding the module'kib2008-08-032-0/+4
| | | | | | | | | vnode lock may cause a LOR between kld_sx lock and vnode lock. linker_load_dependencies() drops kld_sx, and another thread may attempt to load the same kld. Reported and tested by: pjd MFC after: 1 week
* Disconnect drivers that haven't been ported to MPSAFE TTY yet.ed2008-08-0314-181/+0
| | | | | | | | | | | | | As clearly mentioned on the mailing lists, there is a list of drivers that have not been ported to the MPSAFE TTY layer yet. Remove them from the kernel configuration files. This means people can now still use these drivers if they explicitly put them in their kernel configuration file, which is good. People should keep in mind that after August 10, these drivers will not work anymore. Even though owners of the hardware are capable of getting these drivers working again, I will see if I can at least get them to a compilable state (if time permits).
* calendar.holiday: Buinea-bissau should be Guinea-Bissauedwin2008-08-031-1/+1
| | | | | | PR: conf/126199 Submitted by: comet--berkeley (aka Pablo Picasso) <comet@transbay.net> Approved by: bde@
* Kernel config for the Linksys NSLU2. This is just a basic configuration,imp2008-08-032-0/+150
| | | | with no support for the LED, buttons, realtime clock or flash support.
OpenPOWER on IntegriCloud