summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Remove IEEE80211_C_WPA from capabilities flags. WPA support is not fullydamien2005-08-201-2/+1
| | | | | | implemented in ipw. MFC after: 1 week
* Export adapter's internal statistics sysctl even if IPW_DEBUG is not defined.damien2005-08-201-6/+0
| | | | MFC after: 1 week
* Export adapter's internal statistics sysctl even if IWI_DEBUG is not defined.damien2005-08-201-6/+0
| | | | MFC after: 1 week
* Don't automatically start scanning in if_init() if IEEE80211_ROAMING_MANUALdamien2005-08-203-12/+18
| | | | | | flag is set. MFC after: 1 week
* Remove a stale occurrence of 'alpha' in a comment.stefanf2005-08-201-1/+1
|
* Properly un-giant-trick the cdevsw in fini_cdevsw()phk2005-08-201-3/+7
| | | | Tripped over by: Huang wen hui <huang@gddsn.org.cn>
* Add a __packed keyword to g_eli_metadata struct definition, sopjd2005-08-201-1/+1
| | | | | | | | | | | sizeof(struct g_eli_metadata) will return the exact number of bytes needed for storing it on the disk. Without this change GELI was unusable on amd64 (and probably other 64-bit archs), because sizeof(struct g_eli_metadata) was greater than 512 bytes and geli(8) was failing on assertion. Reported by: Michael Reifenberger <mike@Reifenberger.com> MFC after: 3 days
* Add missing brackets.davidxu2005-08-191-1/+1
| | | | Noticed by: stefanf@
* Allow to change number of iterations for PKCS#5v2. It can only be usedpjd2005-08-191-2/+21
| | | | | | when there is only one key set. MFC after: 3 days
* - Add a missing period.pjd2005-08-191-3/+3
| | | | | | - Fix number of spaces. MFC after: 3 days
* Avoid code duplication and implement bitcount32() function in systm.h only.pjd2005-08-195-113/+55
| | | | | Reviewed by: cperciva MFC after: 3 days
* Fix a LOR between sched_lock and sleep queue lock.davidxu2005-08-192-7/+8
|
* Move up code for testing KEF_HOLD to avoid ke_cpu being changed unexpectlydavidxu2005-08-191-8/+8
| | | | for PRI_ITHD and PRI_REALTIME threads.
* Correct a performance bug in revision 1.462. The effect of the bug is toalc2005-08-191-14/+7
| | | | | | | execute the outer loop in procedures such as pmap_protect() many more times than necessary. Reviewed by: tegge
* Pad the strings sccs[], version[], and osrelease[] up to a minimum ofcperciva2005-08-191-3/+10
| | | | | | | | 128 bytes, 256 bytes, and 32 bytes respectively. This makes it much easier to identify when two kernels are identical apart from a version number bump (as often happens on security branches). Discussed on: freebsd-arch, in May 2005
* Add missing braces around bpf_filter which were missed when Icsjp2005-08-181-2/+4
| | | | | | | | merged the bpfstat code. Pointed out by: iedowse Pointy hat to: csjp MFC after: 3 days
* Mark the callouts as MPSAFE as if_bridge has been giant-free since day 1.thompsa2005-08-182-8/+9
| | | | | | | Use the SMP friendly callout_init_mtx() while we are here. Approved by: mlaier (mentor) MFC after: 3 days
* Various fixups to locking:jhb2005-08-182-49/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | - Remove a lot of superfluous locking during attach. There is no need to lock access to the driver until some other thread has a way of getting to it. For ethernet drivers the other ways include registering an interrupt handler via bus_setup_intr(), calling ether_ifattach() to hook into the network stack, and kicking off a callout-driven timer via callout_reset(). - Use callout_* rather than timeout/untimeout. - Break out of xl_rxeof() if IFF_DRV_RUNNING is clear after ifp->if_input returns to handle the case where the interface was stopped while we were passing a packet up the stack. Don't call xl_rxeof() in xl_rxeof_task() unless IFF_DRV_RUNNING is set. With these fixes in place, any outstanding task will gracefully terminate as soon as it gets a chance to run after the interface has been stopped via xl_stop(). As a result, taskqueue_drain() is no longer required in xl_stop(). The task is still drained in detach() however to make sure that detach() can safely destroy the driver mutex at the end of the function. - Lock the driver lock in the ifmedia callouts and don't lock across ifmedia_ioctl() in xl_ioctl(). Note: glebius came up with most of (3) as well independently. I took a rather roundabout way of arriving at the same conclusion. MFC after: 3 days
* Fixup locking and mark MPSAFE:jhb2005-08-182-140/+154
| | | | | | | | | | | | | - Add locked versions of start and init. The SRM_MEDIA code in dc_init() stayed in dc_init() instead of moving to dc_init_locked() to make the locking saner. - Use callout_init_mtx(). - Fixup locking in detach and ioctl. - Lock the driver in the ifmedia callouts. - Don't recurse on the driver lock. - De-spl. MFC after: 3 days
* When we started calling if_findindex() from if_alloc() with an emptybrooks2005-08-181-56/+16
| | | | | | | | | | | | | | | | | | | | struct ifnet most of if_findindex() become a complex no-op. Remove it and replace it with a corrected version of the four line for loop it devolved to plus some error handling. This should probably be replaced with subr_unit at some point. Switch from checking ifaddr_byindex to ifnet_byindex when looking for empty indexes. Since we're doing this from if_alloc/if_free, we can only be sure that ifnet_byindex will be correct. This fixes panics when loading the ef(4) module. The panics were caused by the fact that if_alloc was called four time before if_attach was called and thus ifaddr_byindex was not set and the same unit was allocated again. This in turn caused the first if_attach to fail because the ifp was not the one in ifnet_byindex(ifp->if_index). Reported by: "Wojciech A. Koszek" <dunstan at freebsd dot czest dot pl> PR: kern/84987 MFC After: 1 day
* Fixup locking for sf(4) and mark MPSAFE:jhb2005-08-184-106/+166
| | | | | | | | | | | | - Add locked variants of start, init, and ifmedia_upd. - Use callout_* instead of timeout/untimeout. - Don't recurse on the driver lock. - Fixup locking in ioctl. - Lock the driver lock in the ifmedia handlers rather than across ifmedia_ioctl(). Tested by: brueffer MFC after: 3 days
* - don't forget to save freqency when priority is raised.ume2005-08-181-3/+2
| | | | - nuke redundant variable initialization.
* don't forget to update curr_priority. even when frequency isume2005-08-181-0/+1
| | | | not changed, priority may be changed.
* Define the target for opt_compat.h only if KERNBUILDDIRyar2005-08-181-0/+5
| | | | | | | | | | | | | | | is not defined, so that the module will get the compatibility options from the current kernel configuration if built with the latter, not with the world. [Some other modules seem in need of fixing WRT this, too.] Add more compatibility options found in GENERIC to the default opt_compat.h. While not all of them are used in the procfs code, we can't tell for sure if the system .h files don't need them either, so let's stay on the safe side. Submitted by: kensmith Reviewed by: ru
* Add aliases for atomic operations on 64-bit integers just like otherjhb2005-08-181-0/+20
| | | | | | 64-bit platforms. MFC after: 1 week
* In re_shutdown() mark interface as down since otherwise we will panic ifsobomax2005-08-181-0/+7
| | | | | | | | | | | interrupt comes in later on, which can happen in some uncommon cases. Another possible fix is to call re_detach() instead of re_stop(), like ve(4) does, but I am not sure if the latter is really RTTD, so that stick with this one-liner for now. PR: kern/80005 Approved by: silence on -arch, no reply from selected network gurus
* Don't break local style.yar2005-08-181-1/+2
|
* Fix bogus check. It was possible to panic the kernel by giving 0 length.pjd2005-08-181-2/+4
| | | | | | | | | This is actually a local DoS, as every user can use /dev/crypto if there is crypto hardware in the system and cryptodev.ko is loaded (or compiled into the kernel). Reported by: Mike Tancsa <mike@sentex.net> MFC after: 1 day
* added a missing unlock (just do the same thing as in netinet/raw_ip.c)suz2005-08-181-0/+1
| | | | | Obtained from: KAME MFC after: 3 days
* In order to support CARP interfaces kernel was taught to handle moreglebius2005-08-181-2/+12
| | | | | | | | | | | | | than one interface in one subnet. However, some userland apps rely on the believe that this configuration is impossible. Add a sysctl switch net.inet.ip.same_prefix_carp_only. If the switch is on, then kernel will refuse to add an additional interface to already connected subnet unless the interface is CARP. Default value is off. PR: bin/82306 In collaboration with: mlaier
* Add a "comconsole_speed" loader variable that can be used to changeiedowse2005-08-184-11/+136
| | | | | | | | | | | | the serial console speed (i386 and amd64 only). If the previous stage boot loader requested a serial console (RB_SERIAL or RB_MULTIPLE) then the default speed is determined from the current serial port speed. Otherwise it is set to 9600 or the value of BOOT_COMCONSOLE_SPEED at compile time. This makes it possible to set the serial port speed once in /boot.config and the setting will propagate to boot2, loader and the kernel serial console.
* Add the ability to specify the boot2 serial console speed iniedowse2005-08-184-32/+59
| | | | | | | | /boot.config or on the "boot:" prompt line via a "-S<speed>" flag, e.g. "-h -S19200". This adds about 50 bytes to the size of boot2 and required a few other small changes to limit the size impact. This changes only affects boot2; there are further loader changes to follow.
* Add VIA/ACE "PadLock" support as a crypto(9) driver.pjd2005-08-184-0/+519
| | | | | | HW donated by: Mike Tancsa <mike@sentex.net> Most of the code obtained from: OpenBSD MFC after: 3 days
* Rename variables:rodrigc2005-08-181-12/+13
| | | | | | | | | | | | r_gdt -> saved_gdt r_idt -> saved_idt r_ldt -> saved_ldt in order to prevent clashes with variables with same names defined in <machine/segments.h>. This fixes compilation of this file with GCC 4.0. Reviewed by: njl
* Remove an unnecessicary bzero that was zeroing the softc's struct ifnetbrooks2005-08-171-1/+0
| | | | | | | pointer. Submitted by: brueffer Reviewed by: dfr
* - Use htole32() instead of using bswap32() conditional on #if BYTE_ORDER.jhb2005-08-172-38/+16
| | | | | | | - Don't set IFF_ALLMULTI in our ifnet's if_flags if we end up allowing all multicast due to limits in the MAC receive filters in hardware. Requested by: rwatson (2)
* Remove the unused TULIP_CSR_{READ,WRITE}BYTE macros.jhb2005-08-172-18/+0
|
* Use callout_init_mtx() to simplify the stats callout.jhb2005-08-171-8/+2
| | | | MFC after: 3 days
* Add callout_drain()'s to foo_detach() after calling foo_stop() to make surejhb2005-08-172-0/+2
| | | | | | | | | that if softclock is running on another CPU and is blocked on our driver lock, we will wait until it has acquired the lock, seen that it was cancelled, dropped the lock, and awakened us so that we can safely destroy the mutex. MFC after: 3 days
* Fix locking in el(4) and mark mpsafe.jhb2005-08-171-45/+79
| | | | | | | | | | | | | | | | | | - Add locked variants of el_init and el_start. - Don't initialize the mutex and lock it during el_probe(). - Do initialize the mutex during attach. (el_probe() did destroy the mutex to cleanup, so this meant the driver was always using a destroyed mutex when it was running.) - Setup the interrupt handler after ether_ifattach(). - Fix locking in el_detach() and el_ioctl(). Note: Since I couldn't actually find anyone with this hardware, I'm going ahead and committing these changes so they won't be lost. I'll remove the driver in a week (real purpose of the MFC after below) unless someone pipes up to test this. MFC after: 1 week Tested by: gcc(1)
* don't raise cpu speed over the value when passive cooling is inume2005-08-171-11/+24
| | | | | | | | effect. since CPU speed is restored by degrees, we cannot use the facility of saving cpu speed by CPUFREQ_set() effectively. so, we need to save the value when passive cooling is in effect. Repoeted by: Kevin Oberman <oberman__at__es.net>
* - fix race condition using sx lock.ume2005-08-171-14/+24
| | | | | | - use TAILQ_FOREACH() for readability. Suggested by: jhb
* Always run dedicated kernel thread (even when we have hardware support).pjd2005-08-171-114/+37
| | | | | | | | There is no performance impact, but allows to allocate memory with M_WAITOK flag. As a side effect this simplify code a bit. MFC after: 3 days
* We should now return 0.pjd2005-08-171-1/+1
|
* Add support for working around controllers that cannot do DMA in 48bit mode.sos2005-08-175-35/+97
| | | | | The workaround use PIO mode above ~137GB to allow using the disk. Add the Acer chips with rev < 0xc4 as first candidate.
* Use the bio field instead of the driver field as intended.sos2005-08-171-2/+2
|
* Use device_printf() and if_printf() and remove ste_unit from the softc.jhb2005-08-172-24/+19
|
* Even if crypto_dispatch() return an error, request is not canceled andpjd2005-08-171-12/+2
| | | | | | | | our callback will still be called, just to tell us that requested failed... Reported by: Mike Tancsa <mike@sentex.net> MFC after: 3 days
* Catch up to ic_curchan changes by making the same change here that was madejhb2005-08-171-1/+1
| | | | | | | in ipw(4) in the earlier ic_curchan mega commit. Submitted by: Øyvind Kolbu oyvind at kolbu dot ws Tested by: Stefan Ehmann shoesoft at gmx dot net
* We don't need to clear allocated memory. This will speed-up things a bit.pjd2005-08-171-1/+1
| | | | MFC after: 3 days
OpenPOWER on IntegriCloud