marius [Sat, 19 Mar 2005 01:46:37 +0000 (01:46 +0000)]
When disarming a watchdog by using an interval of WD_TO_NEVER a non-zero
return value of the ioctl doesn't indicate that the command has failed
so don't let watchdog(8) return an error in this case.
marius [Sat, 19 Mar 2005 01:04:48 +0000 (01:04 +0000)]
Add a driver for the 'clock-board' device (the clock board is an
inevitable component in Sun Exx00 machines and provides serial ports,
NVRAM and TOD amongst others which are handled by uart(4) and eeprom(4)
respectively). This driver currently only prints out information about
the chassis on attach and allows to blink the 'Cycling' LED (which is
duplicated on the front panel) of the clock board just like fhc(4) does
for the other boards. The device name for the LED is /dev/led/clockboard.
marius [Sat, 19 Mar 2005 00:50:28 +0000 (00:50 +0000)]
- Add a device interface method for bus_get_resource_list() and use
bus_generic_rl_release_resource() for the bus_release_resource() method
instead of a local copy.
- Correctly handle pass-through allocations in fhc_alloc_resource().
- In case the board model can't be determined just print "unknown model"
so the physical slot number is reported in any case.
- Add support for blinking the 'Cycling' LED of boards on a fhc(4) hanging
of off the nexus (i.e. all boards except the clock board) via led(4).
All boards have at least 3 controllable status LEDs, 'Power', 'Failure'
and 'Cycling'. While the 'Cycling' LED is suitable for signaling from
the OS the others are better off being controlled by the firmware.
The device name for the 'Cycling' LED of each board is /dev/led/boardX
where X is the physical slot number of the board. [1]
marius [Sat, 19 Mar 2005 00:47:02 +0000 (00:47 +0000)]
- Add a device interface method for bus_get_resource_list() and use
bus_generic_rl_release_resource() for the bus_release_resource() method
instead of a local copy.
- Correctly handle pass-through allocations in central_alloc_resource().
imp [Fri, 18 Mar 2005 17:49:08 +0000 (17:49 +0000)]
Sync usage and man page with reality. There's no '-c' command line
flag today. Maybe we should still retain it, but I'll let others fight
that windmill.
imp [Fri, 18 Mar 2005 16:37:51 +0000 (16:37 +0000)]
Need to initialize the resource list that we keep for our children.
STAILQ's require this, while it is optional for SLIST (well, as long
as the memory is bzeroed).
harti [Fri, 18 Mar 2005 15:25:23 +0000 (15:25 +0000)]
Replace Lst_Find calls with LST_FOREACH loops. This helps in
constification und simplifies the code because the one-liner
predicates can be inlined into the code.
murray [Fri, 18 Mar 2005 15:24:00 +0000 (15:24 +0000)]
Add a comment to note that pseudo-device bpf is required for DHCP.
This is mentioned in the Handbook but it is not as obvious to new
users why bpf is needed compared to the other largely self-explanatory
items in GENERIC.
harti [Fri, 18 Mar 2005 15:16:09 +0000 (15:16 +0000)]
Fix a bug in matching suffixes. Under certain circumstances the code
would access memory before the beginning of the string to match (the
suffix match starts at the end of both the string and the suffix and
proceedes to the begin until either the start of the suffix is hit
or the character does not match). This could lead to a memcpy copying
into random memory. Fix this by checking the length of the string to
match too and replacing the Lst_Find calls with LST_FOREACH loops
(last part by me).
Submitted by: Matt Dillon <dillon@apollo.backplane.com> (in principle)
sobomax [Fri, 18 Mar 2005 13:33:18 +0000 (13:33 +0000)]
Impose the upper limit on signals that are allowed between kernel threads
in set[ug]id program for compatibility with Linux. Linuxthreads uses
4 signals from SIGRTMIN to SIGRTMIN+3.
cperciva [Fri, 18 Mar 2005 12:55:07 +0000 (12:55 +0000)]
Run "make obj" before "make build-tools" in the directories used for
building the rescue binary. This fixes a problem with NO_TCSH, where
the "make obj" stage of buildworld doesn't recurse into bin/csh,
resulting in csh build-tools being put into /usr/src/bin/csh.
brueffer [Fri, 18 Mar 2005 10:21:35 +0000 (10:21 +0000)]
- autofs was removed some time ago and libautofs is not hooked up to
the build. Remove both from here.
- acpi_snc was renamed to acpi_sony some time ago.
iedowse [Fri, 18 Mar 2005 09:45:43 +0000 (09:45 +0000)]
Split configure() into 3 separate steps like we do on other
architectures. This makes it possible to insert hooks before and
after the device attachment step.
imp [Fri, 18 Mar 2005 05:19:50 +0000 (05:19 +0000)]
Use STAILQ in preference to SLIST for the resources. Insert new resources
last in the list rather than first.
This makes the resouces print in the 4.x order rather than the 5.x order
(eg fdc0 at 0x3f0-0x3f5,0x3f7 is 4.x, but 0x3f7,0x3f0-0x3f5 is 5.x). This
also means that the pci code will once again print the resources in BAR
ascending order.
jmg [Fri, 18 Mar 2005 01:11:39 +0000 (01:11 +0000)]
fix aio+kq... I've been running ambrisko's test program for much longer
w/o problems than I was before... This simply brings back the knote_delete
as knlist_delete which will also drop the knote's, instead of just clearing
the list and seeing _ONESHOT...
Fix a race where if a note was _INFLUX and _DETACHED, it could end up being
modified... whoopse..
ticso [Thu, 17 Mar 2005 22:47:18 +0000 (22:47 +0000)]
initialize pp->p_sc so it can be referenced later.
dynamicaly allocate the per port array.
allow up to 32 serials per USB device.
ask the device for correct pipe sizes.
njl [Thu, 17 Mar 2005 22:42:49 +0000 (22:42 +0000)]
Introduce a general name for the previously cmbat-only ioctls. It has the
same value as the previous ioctls so no binary change. Also, make a few
style changes to reduce diffs to my tree.
das [Thu, 17 Mar 2005 22:21:46 +0000 (22:21 +0000)]
Make the fenv.h routines work for programs that use SSE for
floating-point arithmetic on i386. Now I'm going to make excuses
for why this code is kinda scary:
- To avoid breaking the ABI with 5.3-RELEASE, we can't change
sizeof(fenv_t). I stuck the saved mxcsr in some discontiguous
reserved bits in the existing structure.
- Attempting to access the mxcsr on older processors results
in an illegal instruction exception, so support for SSE must
be detected at runtime. (The extra baggage is optimized away
if either the application or libm is compiled with -msse{,2}.)
I didn't run tests to ensure that this doesn't SIGILL on older 486's
lacking the cpuid instruction or on other processors lacking SSE.
Results from running the fenv regression test on these processors
would be appreciated. (You'll need to compile the test with
-DNO_STRICT_DFL_ENV.) If you have an 80386, or if your processor
supports SSE but the kernel didn't enable it, then you're probably out
of luck.
Also, I un-inlined some of the functions that grew larger as a result
of this change, moving them from fenv.h to fenv.c.
iedowse [Thu, 17 Mar 2005 20:31:36 +0000 (20:31 +0000)]
Split configure() into 3 separate steps like we do on other
architectures. This makes it possible to insert hooks before and
after the device attachment step.
iedowse [Thu, 17 Mar 2005 19:41:19 +0000 (19:41 +0000)]
Defer boot-time exploration of USB busses until all devices in the
system have been attached, but no later. This ensures that we do
not explore ohci or uhci busses before the companion echi controller
has been initialised, so it should fix the problem of multi-speed
USB devices getting attached as USB 1 devices first and then
re-attached as USB 2.
Some further changes are needed on architectures that do not currently
allow hooks to be inserted before configure_final() - alpha, ia64,
powerpc and sparc64. On these architectures the exploration will
now be delayed until the usb kthread runs.
jmg [Thu, 17 Mar 2005 19:34:57 +0000 (19:34 +0000)]
add m_copyup function.. This can be used to help make our ip stack less
alignment restrictive, and help performance on some ethernet cards which
currently copy the entire packet a couple bytes to get the packet aligned
properly...
Wordsmithing by: dwhite
Obtained from: NetBSD (code only)
I'll clean it up later: rwatson
imp [Thu, 17 Mar 2005 17:33:52 +0000 (17:33 +0000)]
Style(9) pass before some planned larger changes.
o return (foo);
o if (a == NULL) in preference to if (!a)
o () and {} reduction
o minor indentation fixes
rwatson [Thu, 17 Mar 2005 15:18:01 +0000 (15:18 +0000)]
A further step on the journey of meaking panics and debugging more reliable:
in the window between the beginning of panic() and entering the debugger,
it's possible to receive interrupts. If we receive an interrupt, don't
preempt if panicstr != NULL, as the system is in the process of failing, and
the preempting thread is likely to stumble over the failure. The typical
scenario is during the printf() in panic() prior to entering the debugger,
but when running with a slower console type such as serial console.
It could be that the panic string should be passed to the debugger to print,
so that it can run from the debugger's environment rather than a regular
kernel printf.
bz [Thu, 17 Mar 2005 14:27:22 +0000 (14:27 +0000)]
Do not try to free non allocated memory in error case.
Do our best to plug some memory leaks (VPD data, jumbo memory buffer,...).
Log if we cannot free because memory still in use[1].
Change locking to avoid ''acquiring duplicate lock of same
type: "network driver"'' and potential deadlock. Also seems to fix LOR #063.
[1] This change does not solve problems if buffers are still in use when
unloading if_sk.ko. There is ongoing work which will address jumbogram
allocations in a more general way.
PR: kern/75677 (with changes, no mii fixes in here)
Tested by: net, Antoine Brodin (slightly different version)
Approved by: rwatson (mentor)
MFC after: 5 days
bz [Thu, 17 Mar 2005 14:18:58 +0000 (14:18 +0000)]
* When adding/deleting multicast addresses, only whack the address filter
if the interface is marked RUNNING.
Obtained from: NetBSD if_sk.c rev. 1.12
* Don't initialize the card (and start an autonegotiation) every time the IP
address changes. Makes 'dhclient sk0' invocations way faster and more
consistant. i.e. one DHCPREQUEST elicits the DHCPACK.
Obtained from: OpenBSD if_sk.c rev. 1.56
* Additional locking changes in sk_ioctl.
PR: kern/61296 should see improvements by the last two.
Approved by: rwatson (mentor)
MFC after: 5 days
avatar [Thu, 17 Mar 2005 13:59:30 +0000 (13:59 +0000)]
Releasing TX/RX descriptor dmamaps during device detachment instead of
doing that in bfe_stop().
This should fix a panic recently reported on -current occuring when taking
device down then up. In the original implementation, an "ifconfig bfe0 down"
triggers bfe_stop(), which also destroys all TX/RX descriptor dmamaps. Hence
the subsequent "ifconfig bfe0 up" would force the device to use those
already-released dmamap and thus panic the kernel.
PR: kern/77804
Submitted by: Frank Mayhar <frank at exit dot com>
Reviewed by: dmlb, sam (mentor)
Tested by: Phil <pcasidy at casidy dot com>, myself
MFC after: 1 week