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>
jh [Tue, 17 Aug 2010 15:07:23 +0000 (15:07 +0000)]
MFC r200633:
Sync getline() with comm(1):
- Prevent overflowing of the buffer length variable in getline() by
limiting its maximum value.
- Exit if reallocf(3) fails in getline(). Failure was silently
considered as end-of-file.
MFC r204803 by ache:
1) Rewrite input processing to not exit with error on the first EILSEQ found
in the input data but fallback to "binary equal" check instead.
POSIX says: "The input file shall be a text file", nothing more,
so the text file with illegal sequence is valid input.
BTW, GNU sort does not fails on EILSEQ too.
2) Speedup input processing a bit in complex cases like skipping fields,
chars or ignore case.
3) Enforce the implied LINE_MAX limit (from POSIX definition of "text file"
and POSIX uniq(1) description).
MFC r204811 by ache:
Remove vestiges of old %-format which prevents build on amd64
MFC r204876 by ache:
1) Reimplement (differently) unlimited line length restricted in prev.
commit.
2) Honor missing the very last \n (if absent) on output.
jh [Tue, 17 Aug 2010 15:02:33 +0000 (15:02 +0000)]
MFC r200442:
Don't read the newline character to line buffer because lines are passed
to wcscoll(3). Newline characters could cause incorrect results when
comparing lines.
Also, if an input line didn't contain a newline character, it was
omitted from the output. According to my interpretation, SUSv3 requires
that the newline is always printed.
Add regression tests for the cases.
PR: bin/140976
MFC r200604:
- Prevent overflowing of the buffer length variable in getline() by
limiting its maximum value.
- Exit if reallocf(3) fails in getline(). Failure was silently
considered as end-of-file.
MFC r204896 by ache:
Rewrite input processing to not exit with error on the first EILSEQ found
in the input data but fallback to "binary comparison" instead.
POSIX says: "The input files shall be text files", nothing more,
so the text file with illegal sequence is valid input.
BTW, GNU sort does not fails on EILSEQ too.
bz [Tue, 17 Aug 2010 07:58:10 +0000 (07:58 +0000)]
MFC r211301:
In rip6_input(), in case of multicast, we might skip the normal processing
and go to the next iteration early if multicast filtering would decide that
this socket shall not receive the data.
Unlock the pcb in that case or we leak the read lock and next time trying
to get a write lock, would hang forever.
PR: kern/149608
Submitted by: Chris Luke (chrisy flirble.org)
yongari [Sun, 15 Aug 2010 23:47:04 +0000 (23:47 +0000)]
MFC r210263,210267,210269-210270:
r210263:
Do not report current link state if interface is not UP.
r210267:
Add KASSERT to check number of returned DMA segments.
r210269:
Use bus_get_dma_tag() to get parent tag. Also use
BUS_SPACE_MAXSIZE_32BIT to specify sum of all segment lengths.
Previously it used MAXBSIZE which was wrong.
r210270:
Specify BUS_DMA_ZERO flag to bus_dmamem_alloc(9) and remove bzero()
calls. Also add BUS_DMA_COHERENT flag to bus_dmamem_alloc(9) to
take advantage of efficient synchronization for architectures that
support that feature.
yongari [Sun, 15 Aug 2010 23:38:49 +0000 (23:38 +0000)]
MFC r210257,210259-210261:
r210257:
When we didn't find a matching flash device, do not touch flash
config data. While I'm here, use return code of bce_init_nvram()
to set error instead of directly setting ENODEV.
r210259:
Have bce_init_ctx() return error code and make caller check the
return code. If context was not setup correctly give up
initialization. While I'm here move variable declarations to the
beginning of the function.
r210260:
Don't change current media in bce_stop(). There is no need to do
this here.
r210261:
Correctly check the result of media selection. Previously it always
returned success.
yongari [Sun, 15 Aug 2010 23:30:53 +0000 (23:30 +0000)]
MFC r207411:
- Enable flow control.
- Print device details only when verbose boot is enabled.
- Add debug output for shared memory access.
- Add debug statistics (checksum offload & VLAN frame counters).
- Modify TX path to update consumer index for each frame completed
rather than updating the consumer index only once for a group of
frames to improve small packet performance.
- Print driver/firmware pulse messages only when verbose boot
is enabled.
- Add debug sysctl to clear statistics.
- Fix more style(9) violations.
yongari [Sun, 15 Aug 2010 22:57:50 +0000 (22:57 +0000)]
MFC r210083,210152:
r210083:
Remove enabling Data FIFO protection with indirect memory access.
r165114 added that code and that change ignored the same logic
committed in r135772. In addition, data FIFO protection should be
selectively enabled instead of applying to all PCIe devices.
While I'm here add BCM5785 to devices that do not require this
fix.
r210152:
Use Miscellaneous Configuration Register bit definition instead of
magic number.
yongari [Sun, 15 Aug 2010 22:40:47 +0000 (22:40 +0000)]
MFC r209714:
It seems read DMA mode register requires both IPv4 TSO and IPv6 TSO
configuration to get IPv4 TSO work on BCM57780. While I'm here
apply the same fix to BCM5785 which shares similar hardware feature
of BCM57780. This change makes TSO work on BCM57780.
yongari [Sun, 15 Aug 2010 21:56:45 +0000 (21:56 +0000)]
MFC r209818:
Remove enabling RX checksum offloading in RX filter setup. RX
checksum is enabled in sge_init_locked().
While I'm here do not set RX checksum bits in RX descriptor
initialization. It is controller's job to set these bits.
yongari [Sun, 15 Aug 2010 21:51:10 +0000 (21:51 +0000)]
MFC r209865:
Some revision of Yukon controller generates corrupted frame when TX
checksum offloading is enabled. The frame has a valid checksum
value so payload might be modified during TX checksum calculation.
Disable TX checksum offloading but give users chance to enable it
when they know their controller works without problems with TX
checksum offloading.
Reported by: Andrzej Tobola <ato <> iem dot pw dot edu dot pl>
yongari [Sun, 15 Aug 2010 21:43:51 +0000 (21:43 +0000)]
MFC r211089:
It seems some old Sundace(now IC Plus Corp.) controllers do not
like memory mapped register access. Typical problem from the issue
was MII access returned unreliable values. I'm not sure this comes
from lack of register flushing in MII access after accessing
STE_PHYCTL register though.
To address the issue, read hints data that controls which type of
memory mapping should be used in driver. ste(4) still prefers
memory mapping to io mapping but honor hints entered by user except
for controllers that have problems with memory mapping.
The hint to use iomapping could be given by adding the following
line to /boot/device.hints file.
andre [Sat, 14 Aug 2010 19:36:48 +0000 (19:36 +0000)]
MFC r210666:
Fix a bug in syncache where the initial CWND for new incoming connections
was limited to one segment under the faulty assumption of a retransmit.
Due to this the opportunity to initialize the increased congestion window
according to RFC3390 was missed.
kib [Sat, 14 Aug 2010 14:13:58 +0000 (14:13 +0000)]
MFC r211006:
Prefer struct sysentvec sv_psstrings to hardcoding FREEBSD32_PS_STRINGS
in the compat32 code. Use sv_usrstack instead of FREEBSD32_USRSTACK as well.
bz [Sat, 14 Aug 2010 13:44:24 +0000 (13:44 +0000)]
MFC r210686:
MFp4 @181628:
Free the rtentry after we diconnected it from the FIB and are counting
it as rttrash. There might still be a chance we leak it from a different
code path but there is nothing we can do about this here.
rmacklem [Wed, 11 Aug 2010 03:08:03 +0000 (03:08 +0000)]
MFC: r210786
Modify the return value for nfscl_mustflush() from boolean_t,
which I mistakenly thought was correct w.r.t. style(9), back
to int and add the checks for != 0. This is just a stylistic
modification.
fabient [Mon, 9 Aug 2010 14:29:23 +0000 (14:29 +0000)]
MFC r210794:
Allow file as a top source, it works with socket now.
This will allow top monitoring using socket/ssh tunnelling
of system without local symbols.
- Move the file read in the event loop
- Initialize and clean log in all cases
- Preserve global stats value during top refresh
- Fix the rtld/line resolver that ignore '-r' prefix
- Support socket for '-R' (server mode)
- Display the statistics when exiting top mode
- Don't return EAGAIN from gv_unload(). It was used to work around the
deadlock fixed in r207671.
- Wait for worker process to exit at class unload. The worker process
was not guaranteed to exit before the linker unloaded the module.
- Use 0 as the worker process exit status instead of ENXIO and style
the NOTREACHED comment.
brucec [Sat, 7 Aug 2010 12:51:44 +0000 (12:51 +0000)]
MFC r209468:
Make it easier to cancel a failing installation by only attempting to
extract distributions once. If a distribution fails to fetch/extract
and the user doesn't want to retry, abort the installation.
brucec [Sat, 7 Aug 2010 12:41:12 +0000 (12:41 +0000)]
MFC r209467:
When installing on a machine which doesn't have a VGA card installed, enable
a getty on the serial port so that it's possible to login when the system is
rebooted.
brucec [Sat, 7 Aug 2010 12:18:36 +0000 (12:18 +0000)]
MFC r209764:
Increase the default and minimum partition sizes.
Bump / to 1GB, /var to 4GB and /tmp to 1GB.
A 512MB root partition is now too small to hold two kernels, so to
prevent installkernel failing 1GB is a better default. Likewise,
applications are storing more data in /var so 4GB is more reasonable
on a modern machine.
The previous minimum partition sizes were too small to hold a minimal
installation, and have been adjusted accordingly.
brucec [Sat, 7 Aug 2010 10:51:01 +0000 (10:51 +0000)]
MFC r209235, r210381 (bug fix for r209235):
* Allow partial MB/GB values to be entered in the slice and label editors.
* Don't strdup the name when calling deviceRegister because the string is
copied within new_device.
* Use a subtype of 165, not 3, when creating a slice in noninteractive
mode.
rmacklem [Sat, 7 Aug 2010 01:05:02 +0000 (01:05 +0000)]
MFC: r210455, r210456
Move sys/nfsclient/nfs_lock.c into sys/nfs and build it as a separate
module that can be used by both the regular and experimental nfs
clients. This fixes the problem reported by jh@ where /dev/nfslock
would be registered twice when both nfs clients were used.
I also defined the size of the lm_fh field to be the correct value,
as it should be the maximum size of an NFSv3 file handle.
Also fix the include path for nfs_lock.h for usr.sbin/rpc.lockd/kern.c.
Since r186119 IP6 input counters for octets and packets were not
working anymore. In addition more checks and operations were missing.
In case lla_lookup results in a match, get the ifaddr to update the
statistics counters, and check that the address is neither tentative,
duplicate or otherwise invalid before accepting the packet. If ok,
record the address information in the mbuf. [ as is done in case
lla_lookup does not return a result and we go through the FIB ].
Document the mandatory argument to the arptimer() and
nd6_llinfo_timer() functions with a KASSERT().
Note: there is no need to return after panic.
In the legacy IP case, only assign the arg after the check,
in the IPv6 case, remove the extra checks for the table and
interface as they have to be there unless we freed and forgot
to cancel the timer. It doesn't matter anyway as we would
panic on the NULL pointer deref immediately and the bug is
elsewhere.
This unifies the code of both address families to some extend.