- Fix compilation of the subr_unit.c user space test program.
- Use %zu for size_t in a few format strings.
- Correct a comment typo.
- Assert that low and high are >= 0 in new_unrhdr().
MFC r211800:
- Change the threshold from 'running next scrub the <value+1>th day after the
last one' to 'running next scrub the <value>th day after the last one'.
- Improve wording.
yongari [Tue, 31 Aug 2010 00:15:20 +0000 (00:15 +0000)]
MFC r211648:
It seems some newer RTL8139 controllers provides only memory space
register mapping. I'm not sure whether it comes from the fact that
controllers live behind certain PCI brdge(PLX PCI 6152 33BC) and
the bridge has some issues in handling I/O space register mapping.
Unfortunately it's not possible to narrow down to an exact
controller that shows this issue because RealTek used the same PCI
device/revision id again. In theory, it's possible to check parent
PCI bridge device and change rl(4) to use memory space register
mapping if the parent PCI bridge is PLX PCI 6152. But I didn't try
to do that and we wouldn't get much benefit with added complexity.
Blindly switching to use memory space register mapping for rl(4)
may make most old controllers not to work. At least, I don't want
to take potential risk from such change. So use I/O space register
mapping by default but give users chance to override it via a
tunable. The tunable to use memory space register mapping would be
given by adding the following line to /boot/loader.conf file.
dev.rl.%d.prefer_iomap="0"
This change makes P811B quad-port work with this tunable.
yongari [Mon, 30 Aug 2010 21:15:40 +0000 (21:15 +0000)]
MFC r211105:
Add support for Atheros AR8151/AR8152 PCIe gigabit/fast ethernet
controller. These controllers are known as L1D(AR8151) and
L2CB/B2(AR8152). This change adds supports for the following
controllers.
o AR8151 v1.0(L1D) gigabit ethernet controller
o AR8151 v2.0(L1D) gigabit ethernet controller
o AR8152 v1.1(L2CB) fast ethernet controller
o AR8152 v2.0(L2CB2) fast ethernet controller
These controllers have the same feature of AR8131/AR8132 and
support improved power saving control. The user visible change at
this moment is reduced jumbo frame size from 9KB to 6KB. Many
thanks to Atheros for continuing to support FreeBSD.
yongari [Mon, 30 Aug 2010 21:07:26 +0000 (21:07 +0000)]
MFC r211047-211048,211051-211053,211285:
r211047:
Controller does not seem to support more than 1024 bytes DMA burst.
Limit DMA burst size to be less than or equal to 1024 bytes.
r211048:
Do not touch CMB TX threshold register when CMB is not used.
Note, alc(4) does not use CMB at all due to silicon bug.
r211051:
Always disable ASPM L0s and enable L1 before entering into WOL
suspend state. Also disable master clock after PHY power down,
this is supposed to save more power. The master clock should be
enabled if WOL is active.
r211052:
Remove unnecessary assignment.
r211053:
Cache PCIY_PMG and PCIY_EXPRESS capability pointer to softc and use
it instead of calling pci_find_extcap().
r211285:
Make sure to disable RX MAC in alc_stop_mac(). Previously there
was a logic error which it always enabled RX MAC.
yongari [Mon, 30 Aug 2010 20:49:51 +0000 (20:49 +0000)]
MFC r210904:
Reduce Tx interrupt moderation timer from 50ms to 1ms. The default
value resulted in poor performance for UDP packets. With this
change, UDP bulk transfer performance is more than 940Mbps.
jkim [Mon, 30 Aug 2010 17:34:59 +0000 (17:34 +0000)]
MFC: r211823
Check opcode for short jump as well. Some option ROMs do short jumps
(e.g., some NVIDIA video cards) and we were not able to do POST while
resuming because we only honored long jump.
jh [Mon, 30 Aug 2010 14:44:22 +0000 (14:44 +0000)]
MFC r211342:
- Check that strtoul(3) succeeds to convert the entire string in a few
places.
- In getasciilabel(), set the disk type only when a valid type is given.
attilio [Mon, 30 Aug 2010 10:30:35 +0000 (10:30 +0000)]
MFC r208752, r209590:
Protect periph drivers list and rearrange things to minimize the chance of
stepping oneself during probing.
Don't blindly decrement a periph probe count.
davidxu [Sun, 29 Aug 2010 08:19:07 +0000 (08:19 +0000)]
Record merge info for r211960.
-This line, and those below, will be ignored--
> Description of fields to fill in above: 76 columns --|
> PR: If a GNATS PR is affected by the change.
> Submitted by: If someone else sent in the change.
> Reviewed by: If someone else reviewed your modification.
> Approved by: If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email.
> Security: Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.
ume [Sat, 28 Aug 2010 17:06:22 +0000 (17:06 +0000)]
MFC r211276:
- When there is no room for returning the result, nss backend
have to return ERANGE and terminate with NS_RETURN.
- When gethostbyname_r(3) and the friends end with an error,
set errno to the value nss backend returns, and return errno
value.
bschmidt [Sat, 28 Aug 2010 07:21:15 +0000 (07:21 +0000)]
MFC r211295,211314,211546:
Introduce IEEE80211_C_RATECTL, drivers which use the ratectl framework
should set this capability. Initialize ni_txrate after txparams have
been setup. Some drivers calculate various things prior to association
based on ni_txrate and rely on it being nonzero.
- Utilize IA32_TEMPERATURE_TARGET, a.k.a. Tj(target) in place
of Tj(max) when a sane value is available, as documented
in Intel whitepaper "CPU Monitoring With DTS/PECI"; (By sane
value we mean 70C - 100C for now);
- Print the probe results when booting verbose;
- Replace cpu_mask with cpu_stepping;
- Use CPUID_* macros instead of rolling our own.
Catch known CPUs before using IA32_TEMPERATURE_TARGET.
This way we would have an opportunity to hide the
Tj(target) value doesn't seem right stuff if we know
it's not working there.
Add temperature value for Core2 Duo Extreme Mobile that
I have access to.
mckusick [Sat, 28 Aug 2010 00:27:47 +0000 (00:27 +0000)]
MFC of -r210382 to note that foreground fsck should be run after
a filesystem related panic. Also -r210933 and -r211397 by joel
to fix typos and spelling mistakes.
bz [Fri, 27 Aug 2010 21:52:05 +0000 (21:52 +0000)]
MFC r211451:
When calculating the expected memory size for userspace, also take the
number of syncache entries into account for the surplus we add to account
for a possible increase of records in the re-entry window.
jhb [Fri, 27 Aug 2010 18:55:24 +0000 (18:55 +0000)]
MFC 210774,210935:
- Tweak the logic to disable CLFLUSH in virtual environments to work around
problems with flushing the local APIC register range so that it checks
vm_guest directly.
- Add Xen to the list of virtual vendors. In the non PV (HVM) case this
fixes the virtualization detection successfully disabling the CLFLUSH
instruction.
jhb [Fri, 27 Aug 2010 18:50:12 +0000 (18:50 +0000)]
MFC 211433:
Ensure a minimum "slop" of 10 extra pcb structures when providing a
memory size estimate to userland for pcb list sysctls. The previous
behavior of a "slop" of n/8 does not work well for small values of n
(e.g. no slop at all if you have less than 8 open UDP connections).
andre [Fri, 27 Aug 2010 10:15:45 +0000 (10:15 +0000)]
MFC r211464:
If a TCP connection has been idle for one retransmit timeout or more
it must reset its congestion window back to the initial window.
RFC3390 has increased the initial window from 1 segment to up to
4 segments.
The initial window increase of RFC3390 wasn't reflected into the
restart window which remained at its original defaults of 4 segments
for local and 1 segment for all other connections. Both values are
controllable through sysctl net.inet.tcp.local_slowstart_flightsize
and net.inet.tcp.slowstart_flightsize.
The increase helps TCP's slow start algorithm to open up the congestion
window much faster.
r209116
Add knob to get packet timestamps from the hardware.
r209839
Fix bufsize calculation so that cxgbtool can display information for the
last I/O queue too.
r209840
Eliminate ext_intr_task. The "slow" interrupt handler is already
running on the adapter's task queue. Just do what the task does
instead of enqueueing it.
r209841
Improved link detection.
r211345
wakeup is required if the adapter lock is released anywhere during
init and not just for the may_sleep case.
r211346
Always reset the XGMAC's XAUI PCS on a link up.
r211347
Fix tx pause quanta and timer calculations.
edwin [Tue, 24 Aug 2010 07:59:39 +0000 (07:59 +0000)]
For some reason, the new files which got merged from the head branch
didn't get automatically added to the repository.
MFC of r205821 r205827 r205828 r205862 r205872 r205937 r206568
MFC of r208825 r208826 r208827 r208828 r208829 r208943
r205821:
Long awaited update to the calendar system:
- Repeating events which span multiple years (because of -A, -B or
just the three days before the end of the year).
- Support for lunar events (full moon, new moon) and solar events
(equinox and solstice, chinese new year). Because of this, the
options -U (UTC offset) and -l (longitude) are available to
compensate if reality doesn't match the calculated values.
r205828:
Use local names for calendar.dutch
r205862:
Fix DST thingies in calendar.australia
r205872:
Make licenses 3 clause instead of 4 clause
r205937:
Make the dates in the Tasmanian part of calendar.australia properly
variable.
r206568:
Typo in Allerheiligen in calendar.dutch
r208825, r208826, r208827, r208828, r208829, r208943:
Coverity Prevent related fixes.
edwin [Mon, 23 Aug 2010 22:09:25 +0000 (22:09 +0000)]
MFC of r205821 r205827 r205828 r205862 r205872 r205937 r206568
MFC of r208825 r208826 r208827 r208828 r208829 r208943
r205821:
Long awaited update to the calendar system:
- Repeating events which span multiple years (because of -A, -B or
just the three days before the end of the year).
- Support for lunar events (full moon, new moon) and solar events
(equinox and solstice, chinese new year). Because of this, the
options -U (UTC offset) and -l (longitude) are available to
compensate if reality doesn't match the calculated values.
r205828:
Use local names for calendar.dutch
r205862:
Fix DST thingies in calendar.australia
r205872:
Make licenses 3 clause instead of 4 clause
r205937:
Make the dates in the Tasmanian part of calendar.australia properly
variable.
r206568:
Typo in Allerheiligen in calendar.dutch
r208825, r208826, r208827, r208828, r208829, r208943:
Coverity Prevent related fixes.
jhb [Mon, 23 Aug 2010 20:53:01 +0000 (20:53 +0000)]
MFC 210936,210946:
Ethernet vlan(4) interfaces have valid Ethernet link layer addresses but
use a different interface type (IFT_L2VLAN vs IFT_ETHER). Treat IFT_L2VLAN
interfaces like IFT_ETHER interfaces when handling link layer addresses.
- Fix typo in macro name and macro usage.
- Consistently spell our email addresses <foo@FreeBSD.org>
- Wordsmithing of bsnmpd.1; bump .Dd
- Fix two minor typos.
andre [Sun, 22 Aug 2010 08:47:00 +0000 (08:47 +0000)]
MFC r211327:
Add more logging points for failures in syncache_socket() to
report when a new socket couldn't be created because one of
in_pcbinshash(), in6_pcbconnect() or in_pcbconnect() failed.
nwhitehorn [Sun, 22 Aug 2010 00:04:24 +0000 (00:04 +0000)]
MFC r209950:
Unify ABI-related bits of the Book-E and AIM machdep routines
(exec_setregs, etc.) in order to simplify the addition of 64-bit support,
and possible future extension of the Book-E code to handle hard floating
point and Altivec.
nwhitehorn [Sat, 21 Aug 2010 22:23:22 +0000 (22:23 +0000)]
MFC r209812:
Replace the existing PowerPC busdma implementation with the one from
amd64 (with slight modifications). This provides support for bounce
buffers, which are required on systems with RAM above 4 GB.
jilles [Sat, 21 Aug 2010 20:48:09 +0000 (20:48 +0000)]
MFC r211155: sh: Fix heap-based buffer overflow in pathname generation.
The buffer for generated pathnames could be too small in some cases. It
happened to be always at least PATH_MAX long, so there was never an overflow
if the resulting pathnames would be usable.
This bug may be abused if a script subjects input from an untrusted source
to pathname generation, which a bad idea anyhow. Most shell scripts do not
work on untrusted data. secteam@ says no advisory is necessary.
PR: bin/148733
Reported by: Changming Sun snnn119 at gmail com
kib [Sat, 21 Aug 2010 08:49:53 +0000 (08:49 +0000)]
MFC r210679:
Report the time left for the sleep on SIGINFO.
Be stricter in the checking of interval specification.
MFC r210696:
Deal with proper format for printing time_t.
MFC r210749:
Simplify argument parser by using sscanf(); simplify usage() by not
refusing to use stdio.
Reduce nesting level in the sleep loop by returning earlier for negative
timeouts.
Limit the maximum timeout to INT_MAX seconds.
MFC r210750:
Document the new argument parser for sleep(1) and SIGINFO behaviour.
Remove higlight for the unportability notice.
bz [Fri, 20 Aug 2010 15:26:09 +0000 (15:26 +0000)]
MFC r211115:
MFp4 CH180235:
Add proto spacers to inet6sw like we have for legacy IP. This allows us
to dynamically pf_proto_register() for INET6 from modules, needed by
upcoming CARP changes and SeND.
MC and SCTP could make use of it as well in theory in the future after
upcoming VIMAGE vnet teardown work.
jh [Thu, 19 Aug 2010 15:33:43 +0000 (15:33 +0000)]
MFC r208951:
Add a new function devfs_parent_dirent() for resolving devfs parent
directory entry. Use the new function in devfs_fqpn(), devfs_lookupx()
and devfs_vptocnp() instead of manually resolving the parent entry.
netchild [Thu, 19 Aug 2010 13:24:13 +0000 (13:24 +0000)]
sort of MFC: r211495 was supposed to add this script from HEAD, and while
the merge seems to have been successful, the script does not show up
in releng-8. This is a "svn copy head/.../800.zfs-scrub ." as retrying
the svn merge does not result in the file showing up. This may not be
the best way to fix the problem in svn, but it is the only way I'm aware of
to fix the stable branch (which is IMO more important than to use a potential
best way I'm not aware of).
Relevant commit log for this file (r209195):
Add a periodic zfs scrub script.
Features:
- configurable amount of days between scrubs (default value or per pool)
- do not scrub directly after pool creation (respects the configured
number of days between scrubs)
- do not scrub if a scrub is in progress
- tells how to see the status of the scrub
- tells how many days since the last scrub if it skips the scrubbing
- warns if a non-existent pool is specified explicitely
(default: no pools specified -> all currently imported pools are
handled)
- runs late in the periodic run to not slow down the other periodic daily
scripts
netchild [Thu, 19 Aug 2010 09:00:17 +0000 (09:00 +0000)]
MFC
r209195:
Add a periodic zfs scrub script.
Features:
- configurable amount of days between scrubs (default value or per pool)
- do not scrub directly after pool creation (respects the configured
number of days between scrubs)
- do not scrub if a scrub is in progress
- tells how to see the status of the scrub
- tells how many days since the last scrub if it skips the scrubbing
- warns if a non-existent pool is specified explicitely
(default: no pools specified -> all currently imported pools are
handled)
- runs late in the periodic run to not slow down the other periodic daily
scripts
r209250:
- connect the zfs scrub script
- move the zfs status script into the MK_ZFS conditional to respect
WITHOUT_ZFS
r209253:
Add the ZFS periodic daily scripts to the ZFS part. (make delete-old)
gavin [Wed, 18 Aug 2010 21:17:57 +0000 (21:17 +0000)]
Merge r210524 from head:
- Support two devices made by West Mountain Radio in uslcom(4) [1]
- Remove duplicate SILABS CP2102 define from usbdevs
Merge r211022 from head:
Sync the list of devices supported by uslcom(4) with NetBSD, Linux, OpenBSD
and BeOS. The devices supported by uslcom(4) are now in sync with:
NetBSD src/sys/dev/usb/uslsa.c 1.11
OpenBSD src/sys/dev/usb/uslcom.c 1.20
Linux source/drivers/usb/serial/cp210x.c from kernel 2.6.35
BeOS usb_serial/driver.c 1.32
Two vendor/product IDs from Linux have not been added to uslcom(4):
SILABS SAEL - This device has special code in u3g to support it
SILABS GSM2228 - I suspect this should also be covered by u3g(4).
PR: usb/131912 [1]
Submitted by: Jack Twilley <mathuin gmail.com> [1]
gavin [Wed, 18 Aug 2010 20:23:55 +0000 (20:23 +0000)]
Merge 210839 from head:
Do not free sc if attach failed, as it was allocated by the bus
infrastructure, not us. This appears to be a leftover from an older
version of the driver.
Submitted by: avg
Tested by: Anton Shterenlikht <mexas bristol.ac.uk>