Add support to bge(4) to not break IPMI support when the driver attaches
to it. Try to co-operate with the IPMI/ASF firmware accessing the PHY.
One we get link we don't mess with the PHY. If we do then over time
the NIC will go off line. It would be nice if we could tell if IPMI
was enabled on the chip but I can't figure out a reliable way to do
that. The scheme I tried worked on a Dell PE850 but not on an HP machine.
So we assume any NIC that has ASF capability needs to deal with it.
The code was inspired by the support in Linux from kernel.org and Broadcom.
Broadcom did give me some info. but it is rather limited and is mostly
just what is in the Linux driver. Thanks to the numerous people that
helped debug the many prior versions and that I didn't break other
bge(4) HW.
David Xu [Sat, 9 Sep 2006 01:22:13 +0000 (01:22 +0000)]
The following functions need not to be reimplemented, reuse 64bit
syscalls instead:
sigqueue, thr_set_name, thr_setscheduler, thr_getscheduler,
thr_setschedparam.
Ruslan Ermilov [Fri, 8 Sep 2006 19:54:37 +0000 (19:54 +0000)]
Stop cutting the tarball names to eight symbols. This makes
it possible to e.g. distribute kernels with config names larger
than eight symbols, without the clash. Previousy, LALALALA
and LALALALA-SMP would be the same tarball. (I think this
comes from the old days where tarballs were put on the MS-DOS
formatted diskettes.)
Jason Evans [Fri, 8 Sep 2006 17:52:15 +0000 (17:52 +0000)]
Change the way base allocation is done for internal malloc data
structures, in order to avoid the possibility of attempted recursive
lock acquisition for chunks_mtx.
Add a sysctl net.inet.tcp.nolocaltimewait that allows to suppress
creating a compress TIME WAIT states, if both connection endpoints
are local. Default is off.
Ruslan Ermilov [Fri, 8 Sep 2006 10:09:02 +0000 (10:09 +0000)]
Previous revision wasn't enough for "make TARGET=<machine> build*"
to work. Some build-tools that are part of cross-tools (cc_tools)
also need to know the proper values of TARGET_ARCH and TARGET, so
tell them.
- Split failure probability configuration into read failure probability and
write failure probability.
- Allow to specify an error number to return of failure.
Make 8139C+ work again which was broken since rev 1.68.
Ever since rev 1.68 re(4) checks the validity of link in re_start.
But rlphy(4) got a garbled data due to a different bit layout used on
8139C+ and it couldn't report correct link state. To fix it, ignore
BMCR_LOOP and BMCR_ISO bits which have different meanings on 8139C+.
I think this also make dhclient(8) work on 8139C+.
Matt Jacob [Thu, 7 Sep 2006 23:08:21 +0000 (23:08 +0000)]
Create a 'ready' handler for each personality. The purpose of this handler
is to able to be called after *all* attach and enable events are done.
We establish a SYSINIT hook to call this handler. The current usage for it
is to add scsi target resources *after* all enables are done. There seems
to be some dependencies between different halves of a dual-port with respect
to target mode.
Put in more meaningful event messages for some events- in particular
QUEUE FULL events so we can see what the queue depth was when the
IOC sent us this message.
Eric Anholt [Thu, 7 Sep 2006 23:04:47 +0000 (23:04 +0000)]
Merge from DRM upstream:
- Add support for Intel 965 Express chipsets.
- Add support for R200 vertex programs, along with minor bugfixes.
- Add support for vblank synchronization to pipe B of Intel hardware
(laptop screens).
Warner Losh [Thu, 7 Sep 2006 21:53:28 +0000 (21:53 +0000)]
MFp4: first cut at getting I2C transfers working (generically). I'm
unsure if this driver correctly implements all the start/stop junk
right (but it did or didn't before I made this commit).
Warner Losh [Thu, 7 Sep 2006 21:50:01 +0000 (21:50 +0000)]
MFp4: berndt pointed me at an errata that shows that the stat register
offsets were originally documented incorrectly. This fixes that. It
shouldn't affect anything other than error stat reporting.
Ruslan Ermilov [Thu, 7 Sep 2006 20:27:56 +0000 (20:27 +0000)]
While experimenting with cross-building by specifying just TARGET,
I found one bug. Pass our idea of TARGET_ARCH and TARGET down to
XMAKE, the cross-tools make. Previously it worked because usually
TARGET_ARCH was specified on the initial make's command line.
This should also allow us to simplify the "universe" target, which
I'm currently testing.
Change the event log dump on initial boot to use get_event versus
AEN. This makes the boot messages cleaner. I now know how this
structure works so I can implement it versus guessing. Remove the
not ready type code since it is ready now.
I added the time stamp/locale/class so people can parse messages better.
Create a sysctl so that we can set the locale/class level.
John Baldwin [Thu, 7 Sep 2006 15:03:02 +0000 (15:03 +0000)]
Use a single constant to define the sizes of the physmap[], phys_avail[],
and dump_avail[] arrays so they are in sync (previously it was possible
to store more entries in the physmap[] then we could store in phys_avail[],
which was pointless). While I'm here, bump up the length of these tables
to hold 30 entries on amd64 and 16 on i386. This allows machines with
fairly fragmented memory maps to boot ok (at least one machine would
not boot FreeBSD/i386 but would boot FreeBSD/amd64 because amd64 allowed
for more fragments).
Ruslan Ermilov [Thu, 7 Sep 2006 13:06:00 +0000 (13:06 +0000)]
Back when we had T/TCP support, we used to apply different
timeouts for TCP and T/TCP connections in the TIME_WAIT
state, and we had two separate timed wait queues for them.
Now that is has gone, the timeout is always 2*MSL again,
and there is no reason to keep two queues (the first was
unused anyway!).
Also, reimplement the remaining queue using a TAILQ (it
was technically impossible before, with two queues).
Andre Oppermann [Thu, 7 Sep 2006 12:53:01 +0000 (12:53 +0000)]
Second step of TSO (TCP segmentation offload) support in our network stack.
TSO is only used if we are in a pure bulk sending state. The presence of
TCP-MD5, SACK retransmits, SACK advertizements, IPSEC and IP options prevent
using TSO. With TSO the TCP header is the same (except for the sequence number)
for all generated packets. This makes it impossible to transmit any options
which vary per generated segment or packet.
The length of TSO bursts is limited to TCP_MAXWIN.
The sysctl net.inet.tcp.tso globally controls the use of TSO and is enabled.
TSO enabled sends originating from tcp_output() have the CSUM_TCP and CSUM_TSO
flags set, m_pkthdr.csum_data filled with the header pseudo-checksum and
m_pkthdr.tso_segsz set to the segment size (net payload size, not counting
IP+TCP headers or TCP options).
IPv6 currently lacks a pseudo-header checksum function and thus doesn't support
TSO yet.
Warner Losh [Thu, 7 Sep 2006 07:37:16 +0000 (07:37 +0000)]
make "make TARGET=foo" work correctly. Before, it would fail to set
TARGET_ARCH correctly. Now it does, even for pc98. We should suggest
TARGET=foo in preference to TARGET_ARCH because the former is
unambiguous and the latter isn't, so update the docs.
This means that a long standing gripe I've had with this comes to a
close. I can build pc98 w/o specify both things. make TARGET=arm
works (rather than trying to build a arm:amd64 image and dying badly
in the attempt).
If you specify only TARGET_ARCH, then you get the old behavior.
# we can likely simplify the UNIVERSE target now to use this, but I'm not
# up for breaking that tonight :-).
# We should consider adding some kind of sanity check for TARGET_ARCH
# and TARGET.
Warner Losh [Wed, 6 Sep 2006 23:44:25 +0000 (23:44 +0000)]
s/Static/static/g
s/device_ptr_t/device_t/g
No md5 changes in the .o's
# Note to the md5 tracking club: $FreeBSD$ changes md5 after every commit
# so you need to checkout -kk to get $FreeBSD$ instead of the actual value
# of the keyword.
Andre Oppermann [Wed, 6 Sep 2006 22:07:14 +0000 (22:07 +0000)]
Make TSO (TCP segmentation offload) capabilities visible and accessible with
'ifconfig em0 tso' and 'ifconfig em0 -tso'. TSO for IPv4 and IPv6 is always
enabled or disabled together. The driver may enable only one if it doesn't
support both.
Document 'tso' and '-tso' in the ifconfig(8) man pages.
John Baldwin [Wed, 6 Sep 2006 21:59:36 +0000 (21:59 +0000)]
Use sysctl_handle_long() instead of duplicating it's logic for
kern.ipc.maxsockbuf so that this sysctl works for 32-bit binaries running
on amd64 via compat/freebsd32.
Andre Oppermann [Wed, 6 Sep 2006 21:51:59 +0000 (21:51 +0000)]
First step of TSO (TCP segmentation offload) support in our network stack.
o add IFCAP_TSO[46] for drivers to announce this capability for IPv4 and IPv6
o add CSUM_TSO flag to mbuf pkthdr csum_flags field
o add tso_segsz field to mbuf pkthdr
o enhance ip_output() packet length check to allow for large TSO packets
o extend tcp_maxmtu[46]() with a flag pointer to pass interface capabilities
o adjust all callers of tcp_maxmtu[46]() accordingly
Discussed on: -current, -net
Sponsored by: TCP/IP Optimization Fundraise 2005
Ruslan Ermilov [Wed, 6 Sep 2006 20:15:43 +0000 (20:15 +0000)]
While convenient, avoid using alloca() for reasons specified in
the BUGS section of the alloca(3) manpage. In particular, when
the number of TCP sockets is several tens of thousand, trying to
"sysctl -a" would SIGSEGV on the net.inet.tcp.pcblist entry (it
would exceed the stacksize ulimit, in an undetectable manner).
Mark Peek [Wed, 6 Sep 2006 15:11:20 +0000 (15:11 +0000)]
Remove call to fdfree() for the AIO daemons to prevent kernel panics
with linprocfs. This call is not needed since file descriptor sharing
was removed in v1.125.
Reviewed by: alc, davidxu, ambrisko
MFC after: 3 days
Ruslan Ermilov [Wed, 6 Sep 2006 14:23:40 +0000 (14:23 +0000)]
Refine previous revision to allow acpi_wakecode.h to be safely built
from both the acpi module build directory and a kernel build directory.
The latter didn't work when one attempted to build a kernel which had
"device acpi" with the "make kernel-toolchain buildkernel" command
because a cross-compiler couldn't find anything in the standard system
include path (it's empty in the kernel-toolchain case).
Fix this by passing a better root path to kernel headers (src/sys)
which works for both cases, kernel and module (-I@ only worked for
module).
Also, while here, pass -nostdinc (and a different spelling for icc) --
it's a feature that the kernel source tree is self-contained, and this
change enforces this.
o Backout rev. 1.125 of in_pcb.c. It appeared to behave extremely
bad under high load. For example with 40k sockets and 25k tcptw
entries, connect() syscall can run for seconds. Debugging showed
that it iterates the cycle millions times and purges thousands of
tcptw entries at a time.
Besides practical unusability this change is architecturally
wrong. First, in_pcblookup_local() is used in connect() and bind()
syscalls. No stale entries purging shouldn't be done here. Second,
it is a layering violation.
o Return back the tcptw purging cycle to tcp_timer_2msl_tw(),
that was removed in rev. 1.78 by rwatson. The commit log of this
revision tells nothing about the reason cycle was removed. Now
we need this cycle, since major cleaner of stale tcptw structures
is removed.
o Disable probably necessary, but now unused
tcp_twrecycleable() function.
Matt Jacob [Tue, 5 Sep 2006 23:53:07 +0000 (23:53 +0000)]
The poison pill of death: adding a target mode reply handler and target
resources to a non-FC card killed us dead. Sorry for the breakage since
last July 12.
Fix problems with destroy and forcible destroy functionality:
- hold/release device in start/done routines, this will probably slow
down things a bit, but previous code was racy;
- only release device if g_gate_destroy() failed - if it succeeded device
is dead and there is nothing to release;
- various other changes which makes forcible destruction reliable.
Ruslan Ermilov [Tue, 5 Sep 2006 20:00:07 +0000 (20:00 +0000)]
- Move descriptions of BOOT_COMCONSOLE_PORT, BOOT_COMCONSOLE_SPEED,
and LOADER_TFTP_SUPPORT options into the world section since boot
blocks are built as part of the world.
- Document BOOT_PXELDR_ALWAYS_SERIAL and BOOT_PXELDR_PROBE_KEYBOARD
options of pxeboot(8).
Ruslan Ermilov [Tue, 5 Sep 2006 19:28:03 +0000 (19:28 +0000)]
- Include <sys/reboot.h> to get the RB_* defines.
- Make the PROBE_KEYBOARD option better resemble the -P option in
boot2, i.e., if keyboard isn't present then boot with both
RB_SERIAL and RB_MULTIPLE set.
The FreeBSD by default "disables" hyper-threading cores, by not scheduling
any threads to them. However, it still counts those cores as "active but
permanently idle" when calculating system-wide CPUs statistics. It is
incorrect, since it skews statistics quite a bit and creates real problems
for certain types of applications (monitoring applications for example),
by making them believe that the system does have enough idle CPU resources,
while in fact it does not.
Correct the problem by not calling performance counting routines on "disabled"
cores. The cleaner solution would be to just disable APIC timer interrupts on
those cores completely, but ENOTIME here and it is not clear if the
additional complexity really worth minor performance gain.
Ruslan Ermilov [Tue, 5 Sep 2006 16:21:26 +0000 (16:21 +0000)]
GC dead code. If we want to stay polite to the foreign compilers,
we can find another way to issue an #error, but using a preprocessed
assembler for that purpose and clobbering libc.a with an empty .o
just for the sake of #error reporting is way too much of a burden.