thompsa [Mon, 17 May 2010 23:45:31 +0000 (23:45 +0000)]
MFC r208008
If a USB device is suspended and a USB set config request is issued when the
USB enumeration lock is locked, then the USB stack fails to resume the device
because locking the USB enumeration lock is part of the resume procedure. To
solve this issue a new lock is introduced which only protects the suspend and
resume callbacks, which can be dropped inside the usbd_do_request_flags()
function, to allow suspend and resume during so-called enumeration operations.
yongari [Mon, 17 May 2010 17:17:57 +0000 (17:17 +0000)]
MFC r207971:
Document undocumented tunables and sysctl variables.
While here use actual string to specify width as well as using Cm
to set command argument.
yongari [Mon, 17 May 2010 17:12:35 +0000 (17:12 +0000)]
MFC r207852:
SiS190 supports RX 10 bytes padding, CRC stripping as well as VLAN
hardware tag insertion/stripping. Remove conditional code that
disables these hardware features on SiS190. Also nuke RX fixup code
which is no more required on strict-alignment architectures because
SiS190 supports RX 10 bytes padding.
Now all hardware features except jumbo frame and WOL are supported.
Thanks to Masa Murayama who confirmed SiS190 also has the same
hardware features of SiS191.
I guess the only difference between SiS191 and SiS190 would be
jumbo frame support. It will be implemented in near future.
yongari [Mon, 17 May 2010 17:02:42 +0000 (17:02 +0000)]
MFC r207851:
Implement TSO and TSO over VLAN. Increase number of allowed
fragmentation of mbuf chain to 32 from 16 because TSO can send 64KB
sized packet which in turn requires long list of mbuf chain. Due to
lack of documentation, I'm not sure whether driver have to pull up
ethernet/IP/TCP header with options to make controller work but
driver have to parse TCP header to update pseudo TCP checksum
anyway. The controller expects pseudo TCP checksum computed by
upper stack and the checksum should follow the MS NDIS
specification to make TSO work.
yongari [Mon, 17 May 2010 16:57:55 +0000 (16:57 +0000)]
MFC r207832:
Export hardware MAC statistics through sysctl node. Previously
fxp(4) already used to extract most hardware MAC statistics but it
didn't show them. With this change, all MAC statistics counters
are exported. Because there are a couple of new counters for 82558
and 82559, enable extended MAC statistics functionality to get
these counters. Accoring to public data sheet, 82559 MAC statistics
return 24 DWORD counters(3 counters are unknown at this moment) so
increase MAC counter structure to meet the MAC statistics block size.
The completion of MAC counter dump is now checked against
FXP_STATS_DR_COMPLETE status code which is appended at the end of
status block. Previously fxp(4) ignored the status of the
FXP_SCB_COMMAND_CU_DUMPRESET command. fxp(4) does not wait for the
completion of pending command before issuing
FXP_SCB_COMMAND_CU_DUMPRESET. Instead it skips the command and try
it next time. This scheme may show better performance but there is
chance to loose updated counters after stopping controller. So make
sure to update MAC statistics in fxp_stop().
While I'm here move sysctl node creation to fxp_sysctl_node().
yongari [Mon, 17 May 2010 16:47:25 +0000 (16:47 +0000)]
MFC r207750:
8255x configure command requires number of bytes of configuration
table. The default size of the configuration table was 22 bytes. To
use extended feature of 82550/82551 the configuration table size
was expanded to 32 bytes. The added configuration for 82550/82551
specifies VLAN hardware tagging and IPSec configuration as well as
TCO.
To make configuration easier fxp(4) used a configuration template
and the template was copied to configuration table. After that,
some parameters of the configuration table was changed depending on
controller type and operation mode. However the size of template
was 22 bytes so some configuration parameters were not properly
initialized on 82550/82551.
Fix this by increasing the template size. For 82557, 82558 and
82559 the size of the configuration is still 22 bytes.
kensmith [Mon, 17 May 2010 14:20:26 +0000 (14:20 +0000)]
Since sometimes developer activity the week before a code freeze starts causes
the stable branch to be a little less reliable than normal mark the stable/8
branch as 8.1-PRERELEASE to warn users.
kib [Mon, 17 May 2010 08:15:04 +0000 (08:15 +0000)]
MFC r207848:
The thread_unsuspend() requires both process mutex and process spinlock
locked. Postpone the process unlock till the thread_unsuspend() is called.
kib [Mon, 17 May 2010 08:11:23 +0000 (08:11 +0000)]
MFC r207847:
For detach procfs ctl command, also clear P_STOPPED_TRACE process stop
flag, and for each thread, TDB_SUSPEND debug flag, same as it is done by
exit1() for orphaned debugee.
rmacklem [Mon, 17 May 2010 01:41:11 +0000 (01:41 +0000)]
MFC: r207764
Patch the experimental NFS client so that it works for NFSv2
by adding the necessary mapping from NFSv3 procedure numbers
to NFSv2 procedure numbers when doing NFSv2 RPCs.
rmacklem [Mon, 17 May 2010 01:18:12 +0000 (01:18 +0000)]
MFC: r207689
If the "-alldirs" export option was used for the V4: line, mountd
would crash in check_options() since dp == NULL for the V4: line.
This patch moves the check for options allowed on the V4: line to
ahead of where dp is used to avoid this crash.
Because this is the first code I'm importing from dash to expand.c, add the
Herbert Xu copyright notice which is in dash's expand.c.
When pathname expanding *\/, the CTLESC representing the quoted state was
erroneously taken as part of the * pathname component. This CTLESC was then
seen by the pattern matching code as escaping the '\0' terminating the
string.
The code is slightly different because dash converts the CTLESC characters
to backslashes and removes all the other CTL* characters to allow
substituting glob(3).
The effect of the bug was also slightly different from dash (where nothing
matched at all). Because a CTLESC can escape a '\0' in some way, whether
files were included despite the bug depended on memory that should not be
read. In particular, on many machines /*\/ expanded to a strict subset of
what /*/ expanded to.
rrs [Sun, 16 May 2010 16:51:44 +0000 (16:51 +0000)]
MFC 207983
More PR-SCTP bugs:
- Make sure that when you kick the streams you add correctly
using a 16 bit unsigned.
- Make sure when sending out you allow FWD-TSN to skip over
and list the ACKED chunks in the stream/seq list (so the
rcv will kick the stream)
rrs [Sun, 16 May 2010 16:45:49 +0000 (16:45 +0000)]
MFC of 207963
This fixes PR-SCTP issues:
- Slide the map at the proper place.
- Mark the bits in the nr_array ONLY if there
is no marking.
- When generating a FWD-TSN we allow us to skip past
ACKED chunks too.
rrs [Sun, 16 May 2010 16:42:52 +0000 (16:42 +0000)]
MFC of 207924:
This fixes a bug with the one-2-one model socket when a
user sets up a socket to a server sends data and closes
the socket before the server has called accept(). It used
to NOT work at all. Now we add a flag to the assoc and
defer assoc cleanup so that the accept will succeed
zec [Sun, 16 May 2010 14:53:43 +0000 (14:53 +0000)]
MFC r208036:
Increase the target buffer for performing NGM_ASCII2BINARY conversion
from 2000 bytes to 20 Kbytes, which now matches the buffer size used for
NGM_BINARY2ASCII conversions.
The aim of this change is to allow for bigger binary structures to be
managed via netgraph ASCII messages, until we come up with an API
improvement which would get rid of such arbitrary hardcoded limits.
jilles [Sun, 16 May 2010 11:03:46 +0000 (11:03 +0000)]
MFC r207816: Document clock and pshared condvar attributes.
Note: clock accepts CLOCK_VIRTUAL and CLOCK_PROF too, but this seems broken
as it simply waits for the difference of the current and given value of the
clock as if it were CLOCK_MONOTONIC. So document only CLOCK_REALTIME and
CLOCK_MONOTONIC as allowed.
marius [Fri, 14 May 2010 19:11:41 +0000 (19:11 +0000)]
MFC: r207585
- Don't set CAS_PCS_DATAPATH to anything except CAS_PCS_DATAPATH_SERDES
on Cassini using the external PCS SERDES otherwise unaligned access
traps and other strange effects happen with some machines. Don't touch
the MIF which is unused in that case either. These changes require the
PHY type to use to be determined via the OFW device tree or from the
VPD in machines without the former.
- Disable the SERDES pins of Saturn when not used in order to save power
and ensure they are enabled otherwise.
- In cas_attach() use the correct register offset for CAS_PCS_CONF_EN.
- Add some bus space barriers missing in the PCS code path.
These changes make the Sun GigaSwift Ethernet 1.0 MMF cards as well as
the on-board interfaces found in Sun Fire B100s Blade Server work.
fabient [Fri, 14 May 2010 13:48:11 +0000 (13:48 +0000)]
MFC r207761 partially:
Add a fastpath to allocate from packet zone when using m_getjcl.
This will add support for packet zone for at least igb and ixgbe.
ed [Fri, 14 May 2010 12:34:06 +0000 (12:34 +0000)]
MFC r207453:
Remove WNOHANG flag from wait3().
Because script(1) now reliably terminates when the TTY is closed, it may
be the case that the call to wait3() occurs just before the child
process exits. This causes error codes to be ignored.
Just change script(1) to use waitpid() instead of wait3(). This makes it
more portable and prevents the need for a loop, since waitpid() only
returns a specified process.
attilio [Fri, 14 May 2010 01:43:13 +0000 (01:43 +0000)]
MFC r206878, r206897, r207921:
Fix a deadlock in the shutdown code when some CPUs are performing
smp_rendezvous() (or smp_tlb_shootdown()) and are waiting for
acknowledgment.
delphij [Thu, 13 May 2010 23:28:20 +0000 (23:28 +0000)]
MFC r205099-205100,205108:
Two optimizations to MI strlen(3) inspired by David S. Miller's
blog posting [1].
- Use word-sized test for unaligned pointer before working
the hard way.
Memory page boundary is always integral multiple of a word
alignment boundary. Therefore, if we can access memory
referenced by pointer p, then (p & ~word mask) must be also
accessible.
- Better utilization of multi-issue processor's ability of
concurrency.
The previous implementation utilized a formular that must be
executed sequentially. However, the ~, & and - operations can
actually be caculated at the same time when the operand were
different and unrelated.
The original Hacker's Delight formular also offered consistent
performance regardless whether the input would contain
characters with their highest-bit set, as it catches real
nul characters only.
These two optimizations has shown further improvements over the
previous implementation on microbenchmarks on i386 and amd64 CPU
including Pentium 4, Core Duo 2 and i7.
kib [Thu, 13 May 2010 20:26:16 +0000 (20:26 +0000)]
MFC elimination of several settings of PG_REFERENCED bit, that either
do not make sense or are harmful.
MFC r206761 (by alc):
Setting PG_REFERENCED on the requested page in swap_pager_getpages() is
either redundant or harmful, depending on the caller.
MFC r206768 (by alc):
In vm_object_backing_scan(), setting PG_REFERENCED on a page before
sleeping on that page is nonsensical.
MFC r206770 (by alc):
In vm_object_madvise() setting PG_REFERENCED on a page before sleeping on
that page only makes sense if the advice is MADV_WILLNEED.
MFC r206801 (by alc):
There is no justification for vm_object_split() setting PG_REFERENCED on a
page that it is going to sleep on.
np [Thu, 13 May 2010 17:45:32 +0000 (17:45 +0000)]
MFC r207639, r207643, r207687, r207688
r207639: Add IFCAP_LINKSTATE to cxgb
r207643: T3 hardware filters + cxgbtool interface to this functionality.
r207687: if_cxgb should not depend on the T3 firmware module directly.
r207688: various doorbell adjustments
jilles [Thu, 13 May 2010 15:44:49 +0000 (15:44 +0000)]
MFC r207734: sigaltstack(2): document some modernizations:
* un-document 'struct sigaltstack' tag for stack_t as this is BSD-specific;
this doesn't seem useful enough to document as such
* alternate stacks are per thread, not per process
* update error codes to what the kernel does and POSIX requires
kib [Thu, 13 May 2010 09:26:31 +0000 (09:26 +0000)]
MFC r207364:
In swap pager, do not free the non-requested pages from the run if they are
wired. Kstack pages are wired, this change prepares swap pager for handling
of long runs of kstack pages.
yongari [Wed, 12 May 2010 17:07:19 +0000 (17:07 +0000)]
MFC r207748:
It seems controller has two types of promiscuous control, one for
unicast and the other for multicast. To receive multicast frames
that host didn't join in promiscuous mode, driver have to set
promiscuous mode for multicast frames as well.
The Open Source Software Developer Manual for i8255x was not clear
how to handle promiscuous mode.
vanhu [Wed, 12 May 2010 11:49:15 +0000 (11:49 +0000)]
MFC:
Set/update SA's NAT-T stuff before calling key_mature() in
key_add() and key_update(), as the SA may be used as soon as
key_mature() has been called
bschmidt [Tue, 11 May 2010 17:21:54 +0000 (17:21 +0000)]
MFC r207709:
Add a workaround for a bug in the firmware regarding the transition
from passive to active scans. Basicly disable it by increasing the
amount packets to be received to an amount which can't be reached
during dwell times.
kib [Tue, 11 May 2010 13:18:41 +0000 (13:18 +0000)]
MFC r207468:
Extract thread_lock()/ruxagg()/thread_unlock() fragment into utility
function ruxagg_tlock().
Convert the definition of kern_getrusage() to ANSI C.
MFC r207602:
Implement RUSAGE_THREAD. Add td_rux to keep extended runtime and ticks
information for thread to allow calcru1() (re)use.
Rename ruxagg()->ruxagg_locked(), ruxagg_tlock()->ruxagg() [1].
The ruxagg_locked() function no longer clears thread ticks nor
td_incruntime.
Not an MFC: the td_rux is added to the end of struct thread to keep
the KBI. Explicit bzero() of td_rux is added to new thread initialization
points.
edwin [Mon, 10 May 2010 21:04:45 +0000 (21:04 +0000)]
MFC of 207898, tzdata2010j:
- Bahia de Banderas (Mexican state of Nayarit) changed time zone
UTC-7 to new time zone UTC-6 on April 4, 2010 (to share the same
time zone as nearby city Puerto Vallarta, Jalisco).
marius [Mon, 10 May 2010 20:55:24 +0000 (20:55 +0000)]
MFC: r207683
- Fix broken symlinks on cross platform zfs send/recv. [1]
- Enable zfs_ace_byteswap() on FreeBSD as it works just fine (tested between
amd64 and sparc64 in both directions by Michael Moll).
PR: 146272
Approved by: mm, pjd
Obtained from: OpenSolaris (onnv rev. 8283:1ca59f393041; Bug ID 6764193) [1]
marius [Mon, 10 May 2010 20:25:51 +0000 (20:25 +0000)]
MFC: r207537
Add support for SPARC64 V (and where it already makes sense for other
HAL/Fujitsu) CPUs. For the most part this consists of fleshing out the
MMU and cache handling, it doesn't add pmap optimizations possible with
these CPU, yet, though.
With these changes FreeBSD runs stable on Fujitsu Siemens PRIMEPOWER 250
and likely also other models based on SPARC64 V like 450, 650 and 850.
Thanks go to Michael Moll for providing access to a PRIMEPOWER 250.
yongari [Mon, 10 May 2010 20:01:51 +0000 (20:01 +0000)]
MFC r207622-207623,207638
r207622:
Drop driver lock before exiting from interrupt handler.
r207623:
Make sure to check whether driver is running before processing
received frames. Also check driver has valid ifp pointer before
calling msk_stop() in device_shutdown handler. While I'm here
remove unnecessary accesses to interrupt mask registers in
device_shutdown handler because driver puts the controller into
reset state.
With these changes, msk(4) now survive from heavy RX traffic(1byte
UDP frame) while reboot is in progress.
r207638:
When VLAN hardware tagging is disabled, make sure to disable VLAN
checksum offloading as well as TSO over VLAN.
yongari [Mon, 10 May 2010 19:47:37 +0000 (19:47 +0000)]
MFC r207628,207635:
r207628:
Enable multi-descriptor transmisstion for fragmented mbufs. There
is no more need to defragment mbufs. After transmitting the
multi-fragmented frame, the controller updates only the first
descriptor of multi-descriptor transmission so it's driver's
responsibility to clear OWN bits of remaining descriptor of
multi-descriptor transmission. It seems the controller behaves much
like jme(4) controllers in descriptor handling.
r207635:
Free entire mbuf chain instead of the first mbuf.
jkim [Mon, 10 May 2010 19:21:50 +0000 (19:21 +0000)]
MFC: r207330, r207620
- Remove dead code. Calculated greatest common divisor was not used at all.
- Prefer u_int32_t over unsigned int to make its intention more clearer.
- Move the function to a header file and make it a static inline function.
marius [Mon, 10 May 2010 18:56:36 +0000 (18:56 +0000)]
MFC: r207287
On sparc64 obtain the initiator ID to be used for SPI HBAs from the
Open Firmware device tree in order to match what the PROM built-in
driver uses. This is especially important when netbooting Fujitsu
Siemens PRIMEPOWER250 as in that case the built-in driver isn't used
and the port facts PortSCSIID defaults to 0, conflicting with the
disk at the same address.
marius [Mon, 10 May 2010 18:53:32 +0000 (18:53 +0000)]
MFC: r207285
- On sparc64 obtain the initiator ID from the Open Firmware device tree
in order to match what the PROM built-in driver uses.
- Remove some no longer used includes.
marius [Mon, 10 May 2010 18:50:26 +0000 (18:50 +0000)]
MFC: r207248
Don't bother enabling interrupts before we're ready to handle them. This
prevents the firmware of Fujitsu Siemens PRIMEPOWER250, which both causes
stray interrupts and erroneously enables interrupts at least when calling
SUNW,set-trap-table, from shooting itself in the foot.
marius [Mon, 10 May 2010 18:47:52 +0000 (18:47 +0000)]
MFC: r207243
Add OF_getscsinitid(), a helper similar to OF_getetheraddr() but for
obtaining the initiator ID to be used for SPI controllers from the
Open Firmware device tree.
delphij [Mon, 10 May 2010 02:07:57 +0000 (02:07 +0000)]
MFC r207247,r207283,207284:
- Add a signal handler for SIGINT which removes output file when necessary.
- While I'm there, move unlink_input() slightly down to after closing the
output file, in uncompression path.
- Language improvements to make the BUGS section easier to read.
emaste [Mon, 10 May 2010 01:22:29 +0000 (01:22 +0000)]
MFC r207590:
Update GRANDPARENTED text to match the contents of tzdata/factory r19879.
This eliminates "warning: time zone abbreviation differs from POSIX" on
installworld.