randi [Fri, 21 May 2010 23:08:53 +0000 (23:08 +0000)]
MFC r198317,206995:
Introduce 'netDev=ANY' support for scripted (install.cfg) installs, which
results in the first ethernet interface with physical link being selected.
marius [Fri, 21 May 2010 19:45:54 +0000 (19:45 +0000)]
MFC: r197362
IEEE Std 1003.1, 2004 Edition states:
"The escape sequence '\n' shall match a <newline> embedded in
the pattern space."
It is unclear whether this also applies to a \n embedded in a
character class. Disable the existing handling of \n in a character
class following Mac OS X, GNU sed version 4.1.5 with --posix, and
SunOS 5.10 /usr/bin/sed.
marius [Fri, 21 May 2010 19:44:23 +0000 (19:44 +0000)]
MFC: r197361
Follow POSIX (IEEE Std 1003.1, 2004 Edition) in the implementation
of the y (translate) command.
"If a backslash character is immediately followed by a backslash
character in string1 or string2, the two backslash characters shall
be counted as a single literal backslash character"
marius [Fri, 21 May 2010 19:09:41 +0000 (19:09 +0000)]
MFC: r197352
The transition to Subversion allows us to rename files without
repo-copy hacks.
Remove the test-number prefix from the name of the output files,
so that new test cases can be easily added.
jhb [Fri, 21 May 2010 16:17:08 +0000 (16:17 +0000)]
MFC 208213:
Prevent unloading a kld for a driver that has subinterfaces (vlan and/or
wlan interfaces) from being automatically reloaded via devd shutdown
event handlers.
- Revert part of my previous changes to call ifn_stop on subinterfaces
when an interface is detached. It is better to destroy the interfaces
first so that an 'ifconfig foo0.blah down' doesn't result in ifconfig
auto-loading if_foo.ko. The ifconfig command will not be invoked if
foo0.blah is gone when ifn_stop() is called. Furthermore, it is not
necessary to explicitly invoke ifn_stop() after the subinterface is
destroyed as devd will already do that.
- Pass -n to ifconfig when destroying interfaces so that destroying a
cloned interface does not kldload any drivers.
trasz [Thu, 20 May 2010 18:45:07 +0000 (18:45 +0000)]
MFC r208033:
Make it possible to actually use NFSv4 permission bits with acl_set_perm(3)
and acl_delete_perm(3). It went undetected, because neither setfacl(1)
nor Samba use this routines. D'oh.
alc [Thu, 20 May 2010 16:21:19 +0000 (16:21 +0000)]
MFC r207306
Change vm_object_madvise() so that it checks whether the page is invalid
or unmanaged before acquiring the page queues lock. Neither of these
tests require that lock. Moreover, a better way of testing if the page
is unmanaged is to test the type of vm object. This avoids a pointless
vm_page_lookup().
mm [Thu, 20 May 2010 06:51:48 +0000 (06:51 +0000)]
MFC r208047:
Import OpenSolaris revision 7837:001de5627df3
It includes the following changes:
- parallel reads in traversal code (Bug ID 6333409)
- faster traversal for zfs send (Bug ID 6418042)
- traversal code cleanup (Bug ID 6725675)
- fix for two scrub related bugs (Bug ID 6729696, 6730101)
- fix assertion in dbuf_verify (Bug ID 6752226)
- fix panic during zfs send with i/o errors (Bug ID 6577985)
- replace P2CROSS with P2BOUNDARY (Bug ID 6725680)
gordon [Wed, 19 May 2010 22:03:45 +0000 (22:03 +0000)]
MFC r207981:
Fix a bug due to a type conversion from 64 to 32 bits. The side effect of
this type conversion is the high bits which were used to indicate if a
special character was a literal or special were dropped. As a result, all
special character were treated as special, even if they were supposed to
be literals.
yongari [Wed, 19 May 2010 21:08:38 +0000 (21:08 +0000)]
MFC r208084:
If controller received bad frames make sure to update newly added
RFA. Also drop frames that have either CRC error or alignment
error. Normally bad frames are not received at all. But controllers
running in promiscuous mode will receive bad frames. 82557 will
also receive bad frames to receive VLAN oversized frames.
While I'm here mark RNR condition if driver happen to see RNR in
RFA status and restart RU to receive frames again. Because driver
checks all received frames in RX loop, RNR condition could be set
in the middle of RX processing. Just relying on RNR interrupt was
not enough.
This change fixes "Memory modified after free" issue when fxp(4)
is running as a member of if_bridge(4).
jilles [Wed, 19 May 2010 20:53:21 +0000 (20:53 +0000)]
MFC r208116: Change the commented msgs examples in profile/csh.login
from -f to -q.
Starting something that wants input on login seems strange and can be
dangerous. In some configurations, causing output can be bad, but it is not
as dangerous.
I do not expect this msgs invocation to be uncommented often.
jhb [Wed, 19 May 2010 19:43:49 +0000 (19:43 +0000)]
MFC 207335:
Initialize the callout structure earlier in attach before calling any
routines that can fail since ciss_free() always tries to stop and drain
the callout.
mav [Wed, 19 May 2010 14:50:07 +0000 (14:50 +0000)]
MFC r207536, r207696, r208183:
Import mvs(4) - Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA controllers
driver for CAM ATA subsystem. This driver supports same hardware as
atamarvell, ataadaptec and atamvsata drivers from ata(4), but provides
many additional features, such as NCQ, PMP, etc.
brucec [Tue, 18 May 2010 18:19:06 +0000 (18:19 +0000)]
MFC r207006:
Remove the reference to DD mode, and replace "Wizard" mode with "Expert" mode.
Also, make sure the "Q = Finish" text is visible.
Reword the boot manager screen to try and avoid confusion, and make the
order of the menu items match that in sysinstall.
PR: bin/142916
Submitted by: Jeremy Chadwick <freebsd at jdc.parodius.com>
Approved by: rrs (mentor)
marius [Tue, 18 May 2010 17:02:24 +0000 (17:02 +0000)]
MFC: r205254, r208097
- Add quirk handling for Sun Fire V1280. The firmware of these machines
provides no ino-bitmap properties so forge them using the default set
of controller interrupts and let schizo_setup_intr() take care of the
children, hoping for non-fancy routing.
- Enable DMA write parity error interrupts on Schizo with a working
implementation.
- Let schizo_pci_bus() only panic in case of fatal errors as the interrupt
triggered by the error the firmware of Sun Fire V890 as well as 280R
with version 7 Schizo caused may happen as late as using the HBA and not
only prior to touching the PCI bus (in the former case the actual error
still is fatal but we clear it before touching the PCI bus).
While at it count and export non-fatal error interrupts via sysctl(9).
- Remove unnecessary locking from schizo_ue().
kaiw [Tue, 18 May 2010 10:32:20 +0000 (10:32 +0000)]
MFC r205728
Merge improvements from kernel HID parser to the userland usbhid(3)
parser. This merge does not change any API and should not break any
native or thirdparty applications.
Changes include:
* Merge multiple report ID support and other improvements from kernel
HID parser.
* Ignore rid argument in hid_start_parser, parse all the report items since
we now support multiple report ID.
* Skip report ID byte in hid_get_data() and set report ID byte in
hid_set_data(), if report ID is non-zero.
* Reimplement hid_get_report_id: instead get report id from uhid device
(which is always 0), try parsing the report descriptor and return the
first report ID encountered.
MFC r207812
hid_get_data() now expects that the hid data passed in always contains
the report ID byte. Thus we should not skip the the report ID byte in
hid_interrupt(). Also, if HUP_KEYBOARD usage is an array, do not try
to modify the 'data' pointer, instead, increase the hid_item_t field
'pos' by 'report_size' before calling hid_get_data() during each
iteration.
attilio [Tue, 18 May 2010 10:24:23 +0000 (10:24 +0000)]
MFC r207922, r207925, r207929, r208052:
- Change the db_printf return value in order to catch up with printf
- Make witness_list_locks() and witness_display_spinlock() accept
callbacks for printf-like functions in order to queue the output on the
correct channel.
bz [Tue, 18 May 2010 04:20:35 +0000 (04:20 +0000)]
MFC r208100:
Fix an issue with the dynamic pcpu/vnet data allocators.
We cannot expect that modspace is the last entry in the linker
set and thus that modspace + possible extra space up to PAGE_SIZE
would be contiguous. For the moment do not support more than
*_MODMIN space and ignore the extra space.
Discussed with: jeff, rwatson (briefly)
Reviewed by: jeff
Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
mm [Tue, 18 May 2010 00:46:15 +0000 (00:46 +0000)]
MFC r204738, r205113 (imp):
MFC r204738:
Remove stale references to libkrb5.
Rejigger the SUBDIR setting a smidge: we now set all the libraries that depend
on something else, and then SUBDIR+= the rest.
MFC r205113:
Make this conform to the other top-level Makefile subdir listings with
one file per line.
thompsa [Mon, 17 May 2010 23:59:14 +0000 (23:59 +0000)]
MFC r203773
Within libusb 0.1 API, bus number is always faked to 0. Device numbers,
however, are possitive and seem to be reverse sorted in the list.
Conform device numbering and bring a result that is consistent with the
libusb 0.1 API. It is now possible to distinguish a device based on its
(bus, dev) numbers.
thompsa [Mon, 17 May 2010 23:48:51 +0000 (23:48 +0000)]
MFC r208014
Back out r203140 which was causing problems when the first and the last
microframe slot was not in the smask. The problem was that the EHCI driver was
then thinking that the transfer was immediately complete in some cases. Which
could lead to freeze-like situations, which can be recovered by unplugging the
USB device.
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.