glebius [Sat, 21 Oct 2006 09:44:02 +0000 (09:44 +0000)]
Fix error in rev. 1.68. The intention was to break out the switch(){},
but actually exited from the for(){} loop. This fixes the PPPIOCSCOMPRESS
ioctl.
PR: kern/101333
Submitted by: Igor Popov <igorpopov newmail.ru>
scottl [Sat, 21 Oct 2006 07:54:39 +0000 (07:54 +0000)]
Be more like the BGE driver. Ensure that at least 16 TX descriptors are
kept unused in the ring. This check should probably be moved up to
bce_start_locked at some point, as it'll make the loop up there slightly
more efficient, and will eliminate a costly set of busdma operations when
the ring is full. But this works for now.
This makes all of my UDP torture tests work. I'll cautiously say that
it might even work for other users now. Feedback is appreciated.
cognet [Sat, 21 Oct 2006 00:46:56 +0000 (00:46 +0000)]
Ok I am an idiot. On 32 bits big-endian systems, it is needed to handle the
syscalls using __syscall but only actually returning 32bits, such as mmap(),
specially : they set the return value in td->td_retval[0], but the userland
functions will expect this in r1, and not in r0 as it is normally done, as it
is the LSB. So add a special case for all these syscalls (all except lseek,
which truly returns 64bits).
Many thanks to Peter Grehan for his patience while explaining me the issue.
jmg [Fri, 20 Oct 2006 21:28:11 +0000 (21:28 +0000)]
fix tab indentation for CP and RV...
If the length is zero, catch this early, instead of making dflen go negative
and letting bad things happen... We also check to see if RV (checksum) is
0, and handle that has a checksum failure...
Properly handle checksum failures by not processing read-write VPD data,
and removing all the found read-only data...
jhb [Fri, 20 Oct 2006 16:19:21 +0000 (16:19 +0000)]
Remove the check that prevented signals from being delivered to exiting
processes. It was originally added back when support for Linux threads
(and thus shared sigacts objects) was added, but no one knows why. My
guess is that at some point during the Linux threads patches, the sigacts
object was torn down during exit1(), so this check was added to prevent
a panic for that race. However, the stuff that was actually committed to
the tree doesn't teardown sigacts until wait() making the above race moot.
Re-allowing signals here lets one interrupt a NFS request during process
teardown (such as closing descriptors) on an interruptible mount.
Requested by: kib (long time ago)
MFC after: 1 week
bde [Fri, 20 Oct 2006 09:44:21 +0000 (09:44 +0000)]
Don't show debug registers in "show registers". Special registers should
be displayed specially, and debug registers are among of the least
interesting special registers (far behind %cr3). The debug registers
are still accessible as variables and displayed in another bogus place
("show watches").
imp [Fri, 20 Oct 2006 09:12:05 +0000 (09:12 +0000)]
MFp4:
Massive update. The highlights:
o dramatically cut memory usage by writing better, less intertwingled
code.
o implement booting off mmc/sd cards (sd only tested one at the moment)
o start to split out board specific stuff for boot2.
kib [Fri, 20 Oct 2006 07:59:50 +0000 (07:59 +0000)]
Fix the race between devfs_fp_check and devfs_reclaim. Derefence the
vnode' v_rdev and increment the dev threadcount , as well as clear it
(in devfs_reclaim) under the dev_lock().
imp [Fri, 20 Oct 2006 06:44:04 +0000 (06:44 +0000)]
MMC/SD bridge driver (host adapter) for AT91RM9200's MCI interface.
This interface also appears in the AT91SAM9260 and '61 as well as the
AVR32 based micros from Atmel. We don't yet support write protect or
hot-swap in this bridge driver.
imp [Fri, 20 Oct 2006 06:39:59 +0000 (06:39 +0000)]
Preliminary MMC stack. This stack supports SD 1.0 cards only, but
should be easily adapted to SD 2.0 (aka SDHC), SDIO, MMC and MMCplus
cards. At the present time, there's only one bridge driver for the
ARM9 based Atmel AT91RM9200.
rink [Thu, 19 Oct 2006 19:46:49 +0000 (19:46 +0000)]
My previous commit made it impossible to export / over NFS; this small
change fixes this.
Reported by: Lin Jui-Nan Eric < ericlin dot jnlin at gmail dot com >
Submitted by: Erik Trulsson < ertr1013 at student dot uu dot se > (commit is inspired by a patch from Erik)
Pointyhat to: me
Reviewed by: stable@
Approved by: imp (mentor)
MFC after: 3 days
jhb [Thu, 19 Oct 2006 14:36:41 +0000 (14:36 +0000)]
- Define time_t in sys/sem.h so it doesn't require sys/types.h.
- Move the pid_t, size_t, and time_t definitions earlier in the file, sort
them, and fix whitespace.
- Drop redundant includes of sys/cdefs.h and sys/_types.h as sys/ipc.h
already includes them.
scottl [Thu, 19 Oct 2006 08:01:43 +0000 (08:01 +0000)]
I can't find any reason why an 8 byte alignment should be enforced on rx
and tx buffers. Fix it there, and also don't have it be overridden by the
parent tag.
iedowse [Thu, 19 Oct 2006 01:15:58 +0000 (01:15 +0000)]
Use a different task queue for host controller and peripheral driver
tasks. Since the host controllers rely on tasks to process transfer
timeouts, if a synchronous transfer from a driver was invoked from
a task and timed out, it would never complete because the single
task thread was stuck performing the synchronous transfer so couldn't
process the timeout.
marcel [Thu, 19 Oct 2006 00:53:35 +0000 (00:53 +0000)]
Fix previous revision:
o day and mday are the same. No need to subtract 1 from mday.
o Set dow to -1 as clock_ct_to_ts() checks this field and
returns EINVAL on any day of the week but Sunday.
imp [Wed, 18 Oct 2006 21:09:43 +0000 (21:09 +0000)]
Package the dumpcisfile functionality into a new dumpcis command.
Also, don't build pccardc now. I've left it in place for people that
wish to build it to test experimental support for oldcard
functionality that may have been lost in newcard.
bde [Wed, 18 Oct 2006 04:48:09 +0000 (04:48 +0000)]
kern_intr.c:
- Count (scheduling of) software interrupts (SWIs) as SWIs, not as
hardware interrupts.
- Don't count (scheduling of) delayed SWIs as interrupts at all, since
in the delayed case it is expected that there are many more scheduling
calls than handling calls. Perhaps all interrupts should be counted
only when they are handled, but it is only counts of delayed SWIs that
shouldn never be combined with the other counts.
subr_trap.c:
- Count (handling of) Asynchronous System Traps (ASTs) as traps, not as
software interrupts.
Before these changes, the counter for SWIs only counted ASTs, and SWIs
weren't counted separately, but a subcounter for ASTs alone is less
needed than for most other exception sources.
4.4BSD-Lite uses the counters for similar things (actually matching
their names) on its main arches (hp300, ..., !i386) where more of the
exceptions are in hardware.
imp [Tue, 17 Oct 2006 18:08:04 +0000 (18:08 +0000)]
Collapse the two identical emu10k1-alsa%diked.h creation rules for
snd_emu10k1 and snd_emu10kx into one line. The 'pci' dependency here
adds no value, so I eliminted it (we don't have a snd.all file that
might make it mildly useful, and even then it wouldn't be that
useful). With the pci optional component eliminated, I could use the
'|' operator. I could have also include pci on both sides of the |
operator, but since it isn't a value add at all, it was better to
eliminate it.
glebius [Tue, 17 Oct 2006 16:52:09 +0000 (16:52 +0000)]
Some clenaup of ngs_rcvmsg():
- Inline ship_msg() into ngs_rcvmsg().
- Plug memory leak in case if no control socket present.
- Remove malloc() and allocate the sockaddr on stack.
- style(9).
gallatin [Tue, 17 Oct 2006 14:39:19 +0000 (14:39 +0000)]
Fix a driver bug which could result in frames MHLEN or (MHLEN - 1) bytes
long being DMA'ed 2 (or 1) bytes past the end of the mbuf and corrupting
random kernel memory. I had forgotten about the 2 bytes of implict
padding the firmware assumes.
glebius [Tue, 17 Oct 2006 12:21:48 +0000 (12:21 +0000)]
Some cleanup and small changes:
- Use malloc() and free() instead of MALLOC() and FREE() macros.
- Do not check malloc results if M_WAITOK was used.
- Remove linked list of all netgraph sockets. It isn't needed.
- Use ng_findhook() instead of searching the list ourselves.
- Use NG_WAITOK in syscalls.
- Remove unneeded includes.
- style(9)
davidxu [Tue, 17 Oct 2006 02:24:47 +0000 (02:24 +0000)]
o Add keyword volatile for user mutex owner field.
o Fix type consistent problem by using type long for old
umtx and wait channel.
o Rename casuptr to casuword.
jb [Mon, 16 Oct 2006 22:09:48 +0000 (22:09 +0000)]
Add a .PATH entry to search for sources in the ${MACHINE}/${MACHINE}
directory before the ${MACHINE_ARCH}/${MACHINE_ARCH} directory so that
machine-specific files take precedence of architecture-specific ones.
This fixes the build on sun4v which doesn't use the sparc64 version
of mem.c.
jhb [Mon, 16 Oct 2006 20:06:32 +0000 (20:06 +0000)]
Restore the 'proc' and 'tid' commands which allow one to switch to the
first thread in a process or to a specific thread via PIDs and TIDs,
respectively.