]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoRemove the second check for a 64-bit BAR value on a 32-bit system in
jhb [Tue, 5 Aug 2008 21:04:00 +0000 (21:04 +0000)]
Remove the second check for a 64-bit BAR value on a 32-bit system in
pci_add_map().  First, this condition is already handled earlier in
the function.  Second, as written the check would never fire as the
'start' value was overwritten with a long value (rman_get_start() returns
long) before the comparison was done.

Discussed with: imp
MFC after: 2 weeks

16 years agoAdd a script to perform simple analysis of a crash dump (either a full
jhb [Tue, 5 Aug 2008 20:41:46 +0000 (20:41 +0000)]
Add a script to perform simple analysis of a crash dump (either a full
dump or minidump).  When the script is run, it generates a text file
containing the output of several commands run againt the core dump such
as kgdb (stack trace), ps, netstat, vmstat, iostat, dmesg, and fstat.

Obtained from: Yahoo!
MFC after: 2 weeks

16 years agoIf a thread that is swapped out is made runnable, then the setrunnable()
jhb [Tue, 5 Aug 2008 20:02:31 +0000 (20:02 +0000)]
If a thread that is swapped out is made runnable, then the setrunnable()
routine wakes up proc0 so that proc0 can swap the thread back in.
Historically, this has been done by waking up proc0 directly from
setrunnable() itself via a wakeup().  When waking up a sleeping thread
that was swapped out (the usual case when waking proc0 since only sleeping
threads are eligible to be swapped out), this resulted in a bit of
recursion (e.g. wakeup() -> setrunnable() -> wakeup()).

With sleep queues having separate locks in 6.x and later, this caused a
spin lock LOR (sleepq lock -> sched_lock/thread lock -> sleepq lock).
An attempt was made to fix this in 7.0 by making the proc0 wakeup use
the ithread mechanism for doing the wakeup.  However, this required
grabbing proc0's thread lock to perform the wakeup.  If proc0 was asleep
elsewhere in the kernel (e.g. waiting for disk I/O), then this degenerated
into the same LOR since the thread lock would be some other sleepq lock.

Fix this by deferring the wakeup of the swapper until after the sleepq
lock held by the upper layer has been locked.  The setrunnable() routine
now returns a boolean value to indicate whether or not proc0 needs to be
woken up.  The end result is that consumers of the sleepq API such as
*sleep/wakeup, condition variables, sx locks, and lockmgr, have to wakeup
proc0 if they get a non-zero return value from sleepq_abort(),
sleepq_broadcast(), or sleepq_signal().

Discussed with: jeff
Glanced at by: sam
Tested by: Jurgen Weber  jurgen - ish com au
MFC after: 2 weeks

16 years agoIf the kernel fails to allocate resources for the initial value of a BAR
jhb [Tue, 5 Aug 2008 18:24:41 +0000 (18:24 +0000)]
If the kernel fails to allocate resources for the initial value of a BAR
for a PCI device during the boot-time probe of the parent PCI bus, then
zero the BAR and clear the resource list entry for that BAR.  This forces
the PCI bus driver to request a valid resource range from the parent bridge
driver when the device driver tries to allocate the BAR.  Similarly, if the
initial value of a BAR is a valid range but it is > 4GB and the current OS
only has 32-bit longs, then do a full teardown of the initial value of the
BAR to force a reallocation.

Reviewed by: imp
MFC after: 1 week

16 years ago- Consolidate module version for the pcf module into just pcf.c instead
jhb [Tue, 5 Aug 2008 17:39:37 +0000 (17:39 +0000)]
- Consolidate module version for the pcf module into just pcf.c instead
  of having duplicate versions in each bus attachment.
- Add a DRIVER_MODULE() instance so that the iicbus(4) driver will
  actually attach to pcf(4) driver instances.
- Fix compile of envctrl.c.

Pointy hat: jhb (3)

16 years agoAdd lifetime informations to generated SPD entries when SPDDUMP
vanhu [Tue, 5 Aug 2008 15:36:50 +0000 (15:36 +0000)]
Add lifetime informations to generated SPD entries when SPDDUMP

Approved by: gnn (mentor)
MFC after: 4 weeks

16 years agoufsmount.h uses "struct\tfoo *bar;", except where it doesn't.
des [Tue, 5 Aug 2008 15:24:07 +0000 (15:24 +0000)]
ufsmount.h uses "struct\tfoo *bar;", except where it doesn't.
quota.h uses "struct foo\t*bar;", except where it doesn't.
Try to make them both agree with themselves (though not with eachother)

16 years agoWhitespace, prototypes
des [Tue, 5 Aug 2008 10:25:55 +0000 (10:25 +0000)]
Whitespace, prototypes

16 years ago- Reflect the iicbus infrastructure changes.
stas [Tue, 5 Aug 2008 08:38:33 +0000 (08:38 +0000)]
- Reflect the iicbus infrastructure changes.

Approved by: raj

16 years ago- Reflect changes in iic infrastructure.
stas [Tue, 5 Aug 2008 08:20:58 +0000 (08:20 +0000)]
- Reflect changes in iic infrastructure.

16 years agoMove functions which are only locally used into their C files and
edwin [Tue, 5 Aug 2008 08:16:37 +0000 (08:16 +0000)]
Move functions which are only locally used into their C files and
make them static.

usage() in calendar.c
event_*() in io.c

PR: bin/118644
Approved by: bde@ (mentor)

16 years agostyle(9)ify usr.bin/calendar
edwin [Tue, 5 Aug 2008 08:11:54 +0000 (08:11 +0000)]
style(9)ify usr.bin/calendar

PR: bin/118644
Approved by: bde@ (mentor)
MFC after: 1 week

16 years agoRemove a comment about bridging wireless client, the new net80211 vap code
thompsa [Mon, 4 Aug 2008 23:16:07 +0000 (23:16 +0000)]
Remove a comment about bridging wireless client, the new net80211 vap code
supports this.

16 years agoFix build when WITHOUT_DYNAMICROOT is specified in src.conf(5).
mlaier [Mon, 4 Aug 2008 22:45:27 +0000 (22:45 +0000)]
Fix build when WITHOUT_DYNAMICROOT is specified in src.conf(5).

16 years agoAdd EPERM to the ERRORS section.
trhodes [Mon, 4 Aug 2008 22:22:17 +0000 (22:22 +0000)]
Add EPERM to the ERRORS section.

PR: 125746

16 years agoLock the consumers of the iicbus(4) infrastructure:
jhb [Mon, 4 Aug 2008 21:14:24 +0000 (21:14 +0000)]
Lock the consumers of the iicbus(4) infrastructure:
- 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().

16 years agoAdd locking to the core iicbus(4) drivers:
jhb [Mon, 4 Aug 2008 21:03:06 +0000 (21:03 +0000)]
Add locking to the core iicbus(4) drivers:
- 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.

16 years agoAdd locking to the various iicbus(4) bridge drivers:
jhb [Mon, 4 Aug 2008 20:46:15 +0000 (20:46 +0000)]
Add locking to the various iicbus(4) bridge drivers:
- 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)

16 years agoDo not modify td->td_intr_nesting_level, it is now done in the MI code.
cognet [Mon, 4 Aug 2008 20:29:39 +0000 (20:29 +0000)]
Do not modify td->td_intr_nesting_level, it is now done in the MI code.
This fixes the cpu time being falsely reported as interrupt time.

MFC after: 3 days

16 years agoClose two different races with concurrent opens of pty master devices
jhb [Mon, 4 Aug 2008 19:51:23 +0000 (19:51 +0000)]
Close two different races with concurrent opens of pty master devices
that could result in leaked ttys or a leaked pty + tty pair.

MFC after: 1 week

16 years ago- Close a race with concurrent open's of a pts master device which could
jhb [Mon, 4 Aug 2008 19:49:05 +0000 (19:49 +0000)]
- Close a race with concurrent open's of a pts master device which could
  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

16 years agoFix a typo.
jhb [Mon, 4 Aug 2008 19:45:15 +0000 (19:45 +0000)]
Fix a typo.

16 years agoAdd locking to snc(4) so it is MPSAFE:
jhb [Mon, 4 Aug 2008 19:19:18 +0000 (19:19 +0000)]
Add locking to snc(4) so it is MPSAFE:
- 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

16 years agoAdd coretemp(4) and k8temp(4).
rpaulo [Mon, 4 Aug 2008 16:13:42 +0000 (16:13 +0000)]
Add coretemp(4) and k8temp(4).

MFC after: 1 day

16 years agoFix ARM nocache allocator:
raj [Mon, 4 Aug 2008 14:47:49 +0000 (14:47 +0000)]
Fix ARM nocache allocator:

- 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

16 years agoMerge state reuse for tcp.
mlaier [Mon, 4 Aug 2008 14:42:09 +0000 (14:42 +0000)]
Merge state reuse for tcp.

PR: kern/125261
Obtained from: OpenBSD
MFC after: 1 week

16 years agoWe need -I$S to compile the elf trampoline.
cognet [Mon, 4 Aug 2008 14:38:38 +0000 (14:38 +0000)]
We need -I$S to compile the elf trampoline.

MFC after: 3 days

16 years agoRemove unneeded #include <stdlib.h> (?)
cognet [Mon, 4 Aug 2008 14:37:32 +0000 (14:37 +0000)]
Remove unneeded #include <stdlib.h> (?)

MFC after: 3 days

16 years agoLower the priority of the sleep in the syscons for "waitvt" wchan to
kib [Mon, 4 Aug 2008 12:22:33 +0000 (12:22 +0000)]
Lower the priority of the sleep in the syscons for "waitvt" wchan to
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

16 years agoMake pmap_kenter_attr() static.
alc [Mon, 4 Aug 2008 08:04:09 +0000 (08:04 +0000)]
Make pmap_kenter_attr() static.

16 years agoMark functions as __dead2 in order to help the LLVM static checker
cperciva [Mon, 4 Aug 2008 07:36:53 +0000 (07:36 +0000)]
Mark functions as __dead2 in order to help the LLVM static checker
understand which code paths aren't possible.

Reported by: edwin

16 years agoDereferencing uninitialized pointers considered harmful. Prior to this
cperciva [Mon, 4 Aug 2008 07:01:42 +0000 (07:01 +0000)]
Dereferencing uninitialized pointers considered harmful.  Prior to this
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

16 years agoInitialize "nconv" to a reasonable value in all code paths. Prior to
cperciva [Mon, 4 Aug 2008 06:55:42 +0000 (06:55 +0000)]
Initialize "nconv" to a reasonable value in all code paths.  Prior to
this commit, sprintf("%s", "") could fail depending on what happened
to be on the stack.

Found by: LLVM/Clang Static Checker

16 years agoSet "max" to a reasonable value if BLOCKSIZE has a bogus unit. Prior
cperciva [Mon, 4 Aug 2008 06:53:13 +0000 (06:53 +0000)]
Set "max" to a reasonable value if BLOCKSIZE has a bogus unit.  Prior
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

16 years agoDon't close file descriptor number <whatever random garbage was on the
cperciva [Mon, 4 Aug 2008 06:48:54 +0000 (06:48 +0000)]
Don't close file descriptor number <whatever random garbage was on the
stack>.

Found by: LLVM/Clang Static Checker
MFC after: 1 week

16 years agoSetting a variable to the same value twice doesn't actually make it
cperciva [Mon, 4 Aug 2008 06:39:52 +0000 (06:39 +0000)]
Setting a variable to the same value twice doesn't actually make it
more likely to have the right value.  Remove superfluous assignments.

Found by: LLVM/Clang Static Checker

16 years agoRearrange conditional compilation directives. This makes syntax
yongari [Mon, 4 Aug 2008 04:00:10 +0000 (04:00 +0000)]
Rearrange conditional compilation directives. This makes syntax
highlighting work in vim.

16 years agoRemove return keyword at the end of functions that return void.
yongari [Mon, 4 Aug 2008 03:51:20 +0000 (03:51 +0000)]
Remove return keyword at the end of functions that return void.

16 years agoRemove register keyword.
yongari [Mon, 4 Aug 2008 03:47:29 +0000 (03:47 +0000)]
Remove register keyword.

16 years agoUse ANSI C declarations for all functions.
yongari [Mon, 4 Aug 2008 03:45:07 +0000 (03:45 +0000)]
Use ANSI C declarations for all functions.

16 years agoDon't enable TSO by default. Users of RTL8169/8110 reported
yongari [Mon, 4 Aug 2008 02:34:40 +0000 (02:34 +0000)]
Don't enable TSO by default. Users of RTL8169/8110 reported
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)

16 years agoThe number of bits reserved for MSS in RealTek controllers is
yongari [Mon, 4 Aug 2008 02:05:09 +0000 (02:05 +0000)]
The number of bits reserved for MSS in RealTek controllers is
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.

16 years agoMark functions as __dead2 in order to help the LLVM static checker
cperciva [Mon, 4 Aug 2008 01:25:48 +0000 (01:25 +0000)]
Mark functions as __dead2 in order to help the LLVM static checker
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".

16 years agoMake quota(1) to compile with WARNS=6:
delphij [Mon, 4 Aug 2008 00:43:49 +0000 (00:43 +0000)]
Make quota(1) to compile with WARNS=6:
 - ANSI'fy showrawquotas().
 - Shut up GCC by initializing bgrace and igrace.  The situation
   that caused the GCC warning can never happen though.

16 years agoRestructure and use different variables in the tests that involve
scf [Sun, 3 Aug 2008 22:47:23 +0000 (22:47 +0000)]
Restructure and use different variables in the tests that involve
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

16 years agoAdd EAGAIN to the ERRORS list, as found in kern_jail.c.
trhodes [Sun, 3 Aug 2008 21:56:58 +0000 (21:56 +0000)]
Add EAGAIN to the ERRORS list, as found in kern_jail.c.

PR: 125253
Submitted by: Mateusz Guzik <mjguzik@gmail.com> (original version)

16 years agoKill a dead variable
antoine [Sun, 3 Aug 2008 21:07:19 +0000 (21:07 +0000)]
Kill a dead variable

PR: 126223
Submitted by: Mateusz Guzik

16 years agoctime() expects a time_t, but qup->dqblk.dqb_btime is an int32_t, so for
cognet [Sun, 3 Aug 2008 20:36:40 +0000 (20:36 +0000)]
ctime() expects a time_t, but qup->dqblk.dqb_btime is an int32_t, so for
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

16 years agoRestored from previous backing out (because that is OpenBSD way, so
ache [Sun, 3 Aug 2008 20:15:22 +0000 (20:15 +0000)]
Restored from previous backing out (because that is OpenBSD way, so
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

16 years ago- back out my last commit as it seems to be wrong.
danger [Sun, 3 Aug 2008 19:01:07 +0000 (19:01 +0000)]
- back out my last commit as it seems to be wrong.

Spotted by: das

16 years agoFix some style bogosity from fdlibm.
das [Sun, 3 Aug 2008 17:49:05 +0000 (17:49 +0000)]
Fix some style bogosity from fdlibm.

16 years agoMinor improvements:
das [Sun, 3 Aug 2008 17:39:54 +0000 (17:39 +0000)]
Minor improvements:
- Improve the order of some tests.
- Fix style.

Submitted by: bde

16 years agoRemove broken code to replace st_mode value with ACCESSPERMS when
rwatson [Sun, 3 Aug 2008 15:44:56 +0000 (15:44 +0000)]
Remove broken code to replace st_mode value with ACCESSPERMS when
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

16 years agoAdd "add pc, whatever" as a branch instruction, we use it in memcpy().
cognet [Sun, 3 Aug 2008 15:35:32 +0000 (15:35 +0000)]
Add "add pc, whatever" as a branch instruction, we use it in memcpy().

MFC after: 3 days

16 years agoDDB scripting, textdumps, output capture, etc, all will appear in
rwatson [Sun, 3 Aug 2008 14:27:06 +0000 (14:27 +0000)]
DDB scripting, textdumps, output capture, etc, all will appear in
FreeBSD 7.1 before 8.0 ships.

Spotted by: Ulrich Spoerlein <uspoerlein at gmail dot com>
MFC after: 3 days

16 years agoFill in a few sysctl descriptions.
trhodes [Sun, 3 Aug 2008 14:26:15 +0000 (14:26 +0000)]
Fill in a few sysctl descriptions.

Reviewed by: alc, Matt Dillon <dillon@apollo.backplane.com>
Approved by: alc

16 years agoDDB scripting, textdumps, output capture, etc, all will appear in
rwatson [Sun, 3 Aug 2008 14:14:43 +0000 (14:14 +0000)]
DDB scripting, textdumps, output capture, etc, all will appear in
FreeBSD 7.1 before 8.0 ships.

Spotted by: Ulrich Spoerlein <uspoerlein at gmail dot com>
MFC after: 3 days

16 years agoDocument a few sysctls.
trhodes [Sun, 3 Aug 2008 14:11:06 +0000 (14:11 +0000)]
Document a few sysctls.

Approved by: imp

16 years agoCalling linker_load_dependencies() while holding the module'
kib [Sun, 3 Aug 2008 13:33:45 +0000 (13:33 +0000)]
Calling linker_load_dependencies() while holding the module'
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

16 years agoDisconnect drivers that haven't been ported to MPSAFE TTY yet.
ed [Sun, 3 Aug 2008 10:32:17 +0000 (10:32 +0000)]
Disconnect drivers that haven't been ported to MPSAFE TTY yet.

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).

16 years agocalendar.holiday: Buinea-bissau should be Guinea-Bissau
edwin [Sun, 3 Aug 2008 09:21:47 +0000 (09:21 +0000)]
calendar.holiday:  Buinea-bissau should be Guinea-Bissau

PR: conf/126199
Submitted by: comet--berkeley (aka Pablo Picasso) <comet@transbay.net>
Approved by: bde@

16 years agoKernel config for the Linksys NSLU2. This is just a basic configuration,
imp [Sun, 3 Aug 2008 07:10:25 +0000 (07:10 +0000)]
Kernel config for the Linksys NSLU2.  This is just a basic configuration,
with no support for the LED, buttons, realtime clock or flash support.

16 years agoMove the grekey to its own file, ifconfig.c does not have interface specific
thompsa [Sun, 3 Aug 2008 03:36:12 +0000 (03:36 +0000)]
Move the grekey to its own file, ifconfig.c does not have interface specific
code.

Submitted by: sam

16 years agoHandle ldr pc, [reg] in branch_taken().
cognet [Sun, 3 Aug 2008 01:53:14 +0000 (01:53 +0000)]
Handle ldr pc, [reg] in branch_taken().

Obtained from: NetBSD
MFC after: 3 days

16 years agoAdd blx as a branch instruction.
cognet [Sun, 3 Aug 2008 01:51:30 +0000 (01:51 +0000)]
Add blx as a branch instruction.

MFC after: 3 days

16 years agoBumpd date
imp [Sat, 2 Aug 2008 23:41:10 +0000 (23:41 +0000)]
Bumpd date
Minor word smithing on the need for newer firmware.

16 years agoAdd entry for Prism-3 based Siemens SpeedStream card. It has
imp [Sat, 2 Aug 2008 23:29:35 +0000 (23:29 +0000)]
Add entry for Prism-3 based Siemens SpeedStream card.  It has
identical packaging and model numbers, but has had the Prism-II chips
replaced by Prism-3.  The wi driver was just updated with the new
entry.

16 years agoMinor style nit.
imp [Sat, 2 Aug 2008 22:53:43 +0000 (22:53 +0000)]
Minor style nit.

16 years agoMinor style tweaks.
rwatson [Sat, 2 Aug 2008 22:30:51 +0000 (22:30 +0000)]
Minor style tweaks.

16 years agoRename mac_partition_enabled to partition_enabled to synchronize with
rwatson [Sat, 2 Aug 2008 20:53:59 +0000 (20:53 +0000)]
Rename mac_partition_enabled to partition_enabled to synchronize with
other policies that similarly now avoid the additional mac_ prefix on
variables.

MFC after: soon

16 years agoAdd an altnerative Siemens SpeedStream ID. This one is for a Prism 3
imp [Sat, 2 Aug 2008 20:50:13 +0000 (20:50 +0000)]
Add an altnerative Siemens SpeedStream ID.  This one is for a Prism 3
card.  I got a pair of these at a garage sale for US$1.00 today...

16 years agoReport what kind of chip only under bootverbose since that's now
imp [Sat, 2 Aug 2008 20:49:01 +0000 (20:49 +0000)]
Report what kind of chip only under bootverbose since that's now
exported via a sysctl.

16 years agoMinor tweaks to names and comments now that I understand what's going
imp [Sat, 2 Aug 2008 20:45:28 +0000 (20:45 +0000)]
Minor tweaks to names and comments now that I understand what's going
on better.

16 years agoAdd an alternative ID for the Siemens SpeedStream SS1021: 0x3021.
imp [Sat, 2 Aug 2008 20:36:25 +0000 (20:36 +0000)]
Add an alternative ID for the Siemens SpeedStream SS1021: 0x3021.

16 years agoAdd a quote too good to miss from:
phk [Sat, 2 Aug 2008 20:11:56 +0000 (20:11 +0000)]
Add a quote too good to miss from:

http://www.schneier.com/blog/archives/2008/08/schneier_misquo.html

(and reorder one I appearantly didn't get in the right place last time.)

16 years agoTest that the result is correctly rounded when |y/x| is huge.
das [Sat, 2 Aug 2008 19:21:33 +0000 (19:21 +0000)]
Test that the result is correctly rounded when |y/x| is huge.

16 years agoA few minor corrections, including some from bde:
das [Sat, 2 Aug 2008 19:17:00 +0000 (19:17 +0000)]
A few minor corrections, including some from bde:
- When y/x is huge, it's faster and more accurate to return pi/2
  instead of pi - pi/2.
- There's no need for 3 lines of bit fiddling to compute -z.
- Fix a comment.

16 years agochange list wme to only print the channel parameters; to
sam [Sat, 2 Aug 2008 18:10:14 +0000 (18:10 +0000)]
change list wme to only print the channel parameters; to
get channel+bss use -v

16 years agodon't silently exit if the regdomain.xml file is missing
sam [Sat, 2 Aug 2008 18:06:27 +0000 (18:06 +0000)]
don't silently exit if the regdomain.xml file is missing

16 years agoadd missing lock for htinfo update
sam [Sat, 2 Aug 2008 18:04:09 +0000 (18:04 +0000)]
add missing lock for htinfo update

Submitted by: Chris Zimmermann

16 years agocorrect decap of of AppleTalk and IPX frames; don't strip the SNAP
sam [Sat, 2 Aug 2008 18:02:57 +0000 (18:02 +0000)]
correct decap of of AppleTalk and IPX frames; don't strip the SNAP
header as they have one natively

Submitted by: Chris Zimmermann

16 years agouse new sysctl to generate a fake radar event
sam [Sat, 2 Aug 2008 18:01:58 +0000 (18:01 +0000)]
use new sysctl to generate a fake radar event

16 years agoadd a sysctl to deliver a radar event for testing
sam [Sat, 2 Aug 2008 18:00:33 +0000 (18:00 +0000)]
add a sysctl to deliver a radar event for testing

16 years agoschedule the correct timer when receiving a radar event during CAC
sam [Sat, 2 Aug 2008 17:58:39 +0000 (17:58 +0000)]
schedule the correct timer when receiving a radar event during CAC

16 years agoTry to fixup last (inadvertent) commit: firmware_drain was never added so
sam [Sat, 2 Aug 2008 17:51:38 +0000 (17:51 +0000)]
Try to fixup last (inadvertent) commit: firmware_drain was never added so
yank it's description; likewise for the FIRMWARE_WAIT flag to firmware_put.

For the record, the last commit was to cleanup various mistakes and correct
the example of embedding to reflect the npe firmware now being distributed
with the system.

16 years agoadd callout_schedule; besides being useful it also improves
sam [Sat, 2 Aug 2008 17:42:38 +0000 (17:42 +0000)]
add callout_schedule; besides being useful it also improves
compatibility with other systems

Reviewed by: ed, battlez

16 years agoremove whitespace bug (8 spaces into one tab)
remko [Sat, 2 Aug 2008 13:49:12 +0000 (13:49 +0000)]
remove whitespace bug (8 spaces into one tab)

Submitted by: ed

16 years agoCorrectly set the interrupt enable and disable bits. The previous
scottl [Sat, 2 Aug 2008 13:04:26 +0000 (13:04 +0000)]
Correctly set the interrupt enable and disable bits.  The previous
code interfered with Performant mode and legacy interrupts.  Also
remove a register read operation on the Simplq code that was
effectively a time-wasting no-op.

16 years agoFix software single-stepping: we need to check if the instruction is a
cognet [Sat, 2 Aug 2008 12:49:43 +0000 (12:49 +0000)]
Fix software single-stepping: we need to check if the instruction is a
return instruction as well, or we'll stop single-stepping as soon as we'll
return from a function.

MFC after: 3 days

16 years agoAdd yet another branch instruction.
cognet [Sat, 2 Aug 2008 12:48:30 +0000 (12:48 +0000)]
Add yet another branch instruction.

Obtained from: NetBSD
MFC after: 3 days

16 years agoUnbreak the arm build, by spelling LIBSRCS correctly.
cognet [Sat, 2 Aug 2008 12:33:39 +0000 (12:33 +0000)]
Unbreak the arm build, by spelling LIBSRCS correctly.

16 years agoAdd support for the ASUS P535 PDA
remko [Sat, 2 Aug 2008 12:15:18 +0000 (12:15 +0000)]
Add support for the ASUS P535 PDA

PR: kern/126097
Submitted by: Anton Kartashev <amokk@seb.org.ua>
Approved by: imp (mentor, implicit)
MFC after: 3 days

16 years agoVarious style fixes in the build32 rules.
jhb [Sat, 2 Aug 2008 12:14:22 +0000 (12:14 +0000)]
Various style fixes in the build32 rules.

Submitted by: bde (mostly)

16 years agoA few style and whitespace fixes.
jhb [Sat, 2 Aug 2008 12:04:59 +0000 (12:04 +0000)]
A few style and whitespace fixes.

Submitted by: bde

16 years agoMake the at91 uart(4) driver compile again.
ed [Sat, 2 Aug 2008 08:01:56 +0000 (08:01 +0000)]
Make the at91 uart(4) driver compile again.

As of r178766 this driver didn't compile anymore, because it missed a
switch()-statement. I'm getting tired of seeing this driver being broken
for two months already. When I run `make universe', everything passes,
except the BWCT kernel configuration file.

16 years agoixp425 parts aren't multicore, so remove the SMP option. They also
imp [Sat, 2 Aug 2008 07:20:30 +0000 (07:20 +0000)]
ixp425 parts aren't multicore, so remove the SMP option.  They also
don't support the ioapic either, so remove that option too.  These
were commented out, but could never be enabled, unlike the other
options in the file that are commented out.

16 years agoConform to the options<space><tab> convention everywhere in this file.
imp [Sat, 2 Aug 2008 07:18:12 +0000 (07:18 +0000)]
Conform to the options<space><tab> convention everywhere in this file.
This is just a white space change, no functional change.

16 years agoRegression tests for fmtcheck(3).
das [Sat, 2 Aug 2008 06:03:04 +0000 (06:03 +0000)]
Regression tests for fmtcheck(3).

Obtained from: NetBSD

16 years agoTeach fmtcheck() about wint_t, intmax_t, char *, intmax_t *, and
das [Sat, 2 Aug 2008 06:02:42 +0000 (06:02 +0000)]
Teach fmtcheck() about wint_t, intmax_t, char *, intmax_t *, and
wide string arguments.

Also simplify the code that handles length modifiers and make it
more conservative. For instance, be explicit about the modifiers
allowed for %d, rather than assuming that anything other than L,
q, t, or z implies an int argument.

16 years agoPOSIX says that octal escapes have the format \ddd in the format string,
das [Sat, 2 Aug 2008 06:02:02 +0000 (06:02 +0000)]
POSIX says that octal escapes have the format \ddd in the format string,
but \0ddd in a %b argument, with a length restriction of 3 octal digits
in either case. This seems silly, but it needs to be right so it's possible
to write an octal escape followed by an ordinary digit. Solaris printf(1)
and GNU printf(1) also behave this way.

Example: "printf '\0752'" now produces "=2" instead of garbage.