Warner Losh [Sat, 9 Jun 2007 06:31:07 +0000 (06:31 +0000)]
The devinfo stuff has been moved up into the parent bus. There's no
need to do it at all anymore. Remove it from here. Expand
USB_ATTACH_SETUP inline now that it is one line and we're moving away
from the compat macros. Remove some bzero calls that turn out not be
be necessary.
Warner Losh [Fri, 8 Jun 2007 22:25:09 +0000 (22:25 +0000)]
Cleanup messages printed on attach. Since the description gets set to
what we print, don't print it anymore. And don't compute it anymore.
And don't malloc/free memory for it anymore. While I'm here, prefer
device_printf where appropriate.
Doug White [Fri, 8 Jun 2007 22:00:56 +0000 (22:00 +0000)]
Don't cast the command argument to ether_ioctl() to an int since its not an
int anymore. This was causing all sorts of bad behavior when booting a system
with an nve interface present.
Attilio Rao [Fri, 8 Jun 2007 21:36:52 +0000 (21:36 +0000)]
Remove the MUTEX_WAKE_ALL option and make it the default behaviour for our
mutexes.
Currently we alredy force MUTEX_WAKE_ALL beacause of some problems with the
!MUTEX_WAKE_ALL case (unavioidable priority inversion).
Yaroslav Tykhiy [Fri, 8 Jun 2007 13:35:51 +0000 (13:35 +0000)]
Add a sysctl for the purge run interval so that it can
be tuned along with the rest of hostcache parameters.
The new sysctl name is `net.inet.tcp.hostcache.prune'.
Andrew Gallatin [Fri, 8 Jun 2007 12:43:25 +0000 (12:43 +0000)]
Correct the definition of PFIL_HOOKED() so that it compares
the value of ph_nhooks to zero, not the address. This removes
extranious calls to pfil_run_hooks (and an rw lock) from the
network stack's critical path when no pfil hooks are active.
- Reduce number of atomic operations needed to be implemented in asm by
implementing some of them using existing ones.
- Allow to compile ZFS on all archs and use atomic operations surrounded
by global mutex on archs we don't have or can't have all atomic
operations needed by ZFS.
Randall Stewart [Fri, 8 Jun 2007 10:57:11 +0000 (10:57 +0000)]
- RTO was not being initialized to 0, thus the rtt calculation
algoritm would not go through the proper initialization.
- The initialization was incorrect as well, causing problems in
sat networks with > 1sec RTT
- Get rid of magic numbers in RTT calculations.
Sync with other platforms: add kluge to use contigmalloc when the
alignment is larger than the size and print a diagnostic when we
didn't satisfy the alignment.
Add the address of IDT in the configuration ROM. (i386/amd64 only)
A change to dconschat(8) will follow so that it can bomb
this address over FireWire to reset a wedged system.
Though this method is just a hack and far from perfection,
it should be useful if you don't want to go machine room
just to reset or to power-cycle a machine without
remote-managed power supply. And much better than doing:
# fwcontrol -m target-eui64
# dd if=/dev/zero of=/dev/fwmem0.2 bs=1m
Warner Losh [Fri, 8 Jun 2007 04:03:57 +0000 (04:03 +0000)]
gcc 4.2 thinks that tupleid is uninitialized. Or might be used
uninitialized. It gets passed into other routines that initialize
it... Cope by initializing.
Poll bus resets on FireWire while kdb/gdb is active.
Now, it's safe to call the fwohci interrupt(polling) routine while ddb/gdb
is active. After this change, a dcons connnection over FireWire can survive
bus resets even in kernel debugger.
This means that it is not too late to plug a FireWire cable after a panic
to investigate the problem.
Actually there is a small window(between a jump to kernel from loader and
initialization of dcons_crom) in which no one can take care of a bus reset.
Except that window, firewire console should keep working
from loader to reboot even with a panic and a bus reset.
(as far as you enable LOADER_FIREWIRE_SUPPORT)
Robert Watson [Thu, 7 Jun 2007 22:27:15 +0000 (22:27 +0000)]
Move per-process audit state from a pointer in the proc structure to
embedded storage in struct ucred. This allows audit state to be cached
with the thread, avoiding locking operations with each system call, and
makes it available in asynchronous execution contexts, such as deep in
the network stack or VFS.
Andre Oppermann [Thu, 7 Jun 2007 21:41:50 +0000 (21:41 +0000)]
In tcp_hc_insert() we may have the case where we have hit the global
cache size limit but this bucket row is empty. Normally we want to
recycle the oldest entry in the bucket row. If there isn't any the
TAILQ_REMOVE leads to a panic by trying to remove a non-existing
element. Fix this by just returning NULL and failing the insert.
This is not a problem as the TCP hostache is only advisory.
Eliminate pmap_install(), which was used to wrap pmap_switch() and
grab sched_lock. This would serialize calls to pmap_switch from
cpu_switch(). With the introduction of thread_lock, this is not
possible anymore, because thread_lock is not a single lock. It
varies. Secondly and most importantly, it's not needed at all. The
only requirement for pmap_switch() is that it's not preempted
while in the middle of updating the CPU and PCPU. In other words,
it's a critical region. No locking required.
Peter Wemm [Thu, 7 Jun 2007 06:28:48 +0000 (06:28 +0000)]
Calculate the correct PCI BAR for the Timedia based serial cards. The
Linux equivalent gives BAR offsets relative to the implied base of 0x10.
Our PUC_CFG_GET_RID functions have to add the base offset themselves.
New features:
- Moved BCM5706S/5708S SerDes support to brgphy (since they are not technically
TBI interfaces)
- Added 2.5G support for BCM5708S
Comments:
Since this driver is shared with bge I tested several available controllers
supported by bge and all worked as expected, however the list was not
exhaustive. Need wider testing.
Pyun YongHyeon [Thu, 7 Jun 2007 00:28:47 +0000 (00:28 +0000)]
The maxsegsz of a dma tag created in de(4) is TULIP_DATA_PER_DESC bytes.
In Rx path it allocates a new mbuf with m_getcl(9) so the length of
the mbuf is MCLBYTES which is greater than a segment size specified by
the dma tag. This segment size mismatch caused a voluntary panic.
Fix the panic by settting the mbuf length to TULIP_DATA_PER_DESC.
Reported by: Arne H Juul <arnej AT yahoo-inc DOT com>
Tested by: Arne H Juul <arnej AT yahoo-inc DOT com>
MFp4: MPSAFE firewire stack.
- lock its own locks and drop Giant.
- create its own taskqueue thread.
- split interrupt routine
- use interrupt filter as a fast interrupt.
- run watchdog timer in taskqueue so that it should be
serialized with the bottom half.
- add extra sanity check for transaction labels.
disable ad-hoc workaround for unknown tlabels.
- add sleep/wakeup synchronization primitives
- don't reset OHCI in fwohci_stop()
Rong-En Fan [Wed, 6 Jun 2007 02:23:03 +0000 (02:23 +0000)]
- Fix crash with ncurses on FreeBSD/amd64 CURRENT by including missing
header <term.h>, which is required by both tputs() and tgoto().
Without this header, nvi crashes with the call to tputs() at line 114.
This is because the first argument of tputs() is a pointer, and the
returned pointer from tgoto() is casted to an integer by compiler.
For some reasons, this only crashes on amd64+CURRENT. On 6.x system,
this does not happen.
PR: 101248
Reported by: yar, infofarmer, Roland Smith
Tested by: infofarmer, delphij, rafan
Approved by: delphij (mentor)
Randall Stewart [Wed, 6 Jun 2007 00:40:41 +0000 (00:40 +0000)]
- Fixes a case where doing a sysctl would leave locks held
when coping out association data.
- Fixes a small bug that prevented the SCTP_UNORDERED indication
from going up to the app on a recv in the sinfo_flags field.
Ariff Abdullah [Tue, 5 Jun 2007 20:30:16 +0000 (20:30 +0000)]
- Do triple reads on reset register to detect read register bug. 2 reads
seems not enough to verify its consistencies.
- Define AC97_MIXER_SIZE as SOUND_MIXER_NRDEVICES (25), since we
don't need more than that. Stop doing wild and random guess about
its size since we're stricly bound to it.
Attilio Rao [Tue, 5 Jun 2007 18:57:09 +0000 (18:57 +0000)]
Fix a problem with not-preemptive kernels caming from mis-merging of
existing code with the new thread_lock patch.
This also cleans up a bit unlock operation for mutexes.
Warner Losh [Tue, 5 Jun 2007 17:04:44 +0000 (17:04 +0000)]
MFp4: When querying the operating condition of SD cards (using the
application specific SEND_OP_COND (CMD55 + ACMD41), go ahead and allow
100 tries. This gives a timeout of a second rather than the ~100ms
the old style produces.
I've had one old 16MB SD card which needs the extra time. I've now
had reports from the field that other cards need this too.
Originally done at BSDcan 2007 while waiting to give my embedding
madness minitalk.