mckusick [Tue, 18 Oct 2011 18:42:26 +0000 (18:42 +0000)]
The current /etc/dumpdates file restricts device names to 32 characters.
With the addition of various GEOM layers some device names now exceed
this length, for example /dev/mirror/encrypted.elig.journal. This
change expands the field to 53 bytes which brings the /etc/dumpdates
lines to 80 characters. Exceeding 80 characters makes the /etc/dumpdates
file much less human readable. A test is added to dump so that it
verifies that the device name will fit in the 53 character field
failing the dump if it is too long.
This change has been checked to verify that its /etc/dumpdates file
is compatible with older versions of dump.
dim [Tue, 18 Oct 2011 17:37:18 +0000 (17:37 +0000)]
Fix the way clang retrieves the major FreeBSD release number from the
target triple, so that the __FreeBSD__ and __FreeBSD_cc_version builtin
macros return the expected results.
jchandra [Tue, 18 Oct 2011 16:37:28 +0000 (16:37 +0000)]
Fix wakeup latency when sleeping with 'wait'
If we handle an interrupt just before the 'wait' and the interrupt
schedules some work, we need to skip the 'wait' call. The simple solution
of calling sched_runnable() with interrupts disabled immediately before
wait still leaves a window after the call and before 'wait' in which
the same issue can occur.
The solution implemented is to check the EPC in the interrupt handler, and
if it is in a region before the 'wait' call, to fix up the EPC to skip the
wait call.
Reported/analysed by: adrian
Fix suggested by: kib
fabient [Tue, 18 Oct 2011 15:25:43 +0000 (15:25 +0000)]
Add a flush of the current PMC log buffer before displaying the next top.
As the underlying block is 4KB if the PMC throughput is low the measurement
will be reported on the next tick. pmcstat(8) use the modified flush API to
reclaim current buffer before displaying next top.
kensmith [Tue, 18 Oct 2011 13:45:16 +0000 (13:45 +0000)]
Comment out the sbp(4) driver for architectures that support it.
As part of the 8.0-RELEASE cycle this was done in stable/8 (r199112)
but was left alone in head so people could work on fixing an issue that
caused boot failure on some motherboards. Apparently nobody has worked
on it and we are getting reports of boot failure with the 9.0 test builds.
So this time I'll comment out the driver in head (still hoping someone
will work on it) and MFC to stable/9.
Submitted by: Alberto Villa <avilla at FreeBSD dot org>
kensmith [Tue, 18 Oct 2011 11:29:10 +0000 (11:29 +0000)]
Escape the newline so we get a proper line continuation. Without this
the text of the menu selections doesn't get displayed properly and it
makes the installer appear to lock up for no obvious reason.
des [Tue, 18 Oct 2011 08:18:26 +0000 (08:18 +0000)]
Simplify df(1) by factoring out most of the common code:
- In the argc == 0 case, just populate the mount list as before, but
do not calculate widths, update totals or print anything.
- In the argv > 0 case, collect information about the requested file
systems and store it in the mount list, but do not calculate
widths, update totals or print anything.
- In either case, once all the information has been collected,
iterate once through the mount list to calculate widths and totals,
then once more to print everything.
This also fixes two bugs: firstly, column widths were not calculated
correctly if more than one file system was specified on the command
line; and secondly, file systems with MNT_IGNORE were included in the
totals even if -a was not specified.
jchandra [Tue, 18 Oct 2011 08:10:23 +0000 (08:10 +0000)]
Support for booting XLP using FDT.
- update xlp_machdep.c to read arguments from FDT if FDT support is
compiled in.
- define rmi_uart_bus_space, and use it as fdtbus_bs_tag
- update conf files for FDT support
- add default dts file xlp-basic.dts
ed [Tue, 18 Oct 2011 08:09:44 +0000 (08:09 +0000)]
Get rid of D_PSEUDO.
It seems the D_PSEUDO flag was meant to allow make_dev() to return NULL.
Nowadays we have a different interface for that; make_dev_p(). There's
no need to keep it there.
While there, remove an unneeded D_NEEDMINOR from the gpio driver.
des [Tue, 18 Oct 2011 07:28:58 +0000 (07:28 +0000)]
Revisit the capability failure trace points. The initial implementation
only logged instances where an operation on a file descriptor required
capabilities which the file descriptor did not have. By adding a type enum
to struct ktr_cap_fail, we can catch other types of capability failures as
well, such as disallowed system calls or attempts to wrap a file descriptor
with more capabilities than it had to begin with.
adrian [Tue, 18 Oct 2011 03:32:18 +0000 (03:32 +0000)]
Add in a currently-disabled WAR for PCI NICs.
Some earlier series (~AR5212?) play badly with BIOSes.
In these instances, they may require a forced reset (by transitioning
the NIC through D0 -> D3 -> D0) before they probe/attach correctly.
This is currently disabled because:
* I haven't figured out the "right" code to ensure this only happens
for PCI NICs (not PCIe or Cardbus);
* I haven't at all done wide scale testing for this, and I'm not yet
ready for said wide-scale testing.
I'm documenting this primarily so users with misbehaving NICs have
something to tinker with.
adrian [Tue, 18 Oct 2011 03:17:06 +0000 (03:17 +0000)]
Port over some missing code from the ar5212 reference driver reset path.
The final missing bit here is enabling the PCI configuration register
read, but there's currently no glue available for the HAL to read (and
write) PCI configuration space registers.
adrian [Tue, 18 Oct 2011 03:01:41 +0000 (03:01 +0000)]
Implement the first part of the BB read workaround.
The AR5008/AR9001 series NICs have a bug where BB register reads
will occasionally be corrupted. This could cause issues with things
such as ANI, which adjust operational parameters based on the
BB radio register reads. This was introduced in the AR5008 chip
and fixed with the first released AR9002 series NIC (AR9280v2.)
A followup commit will implement the acutal WAR when reading
BB registers. I'm still not sure how I'll implement it - whether
it should be done in the osdep layer, or whether it should just
live in the AR5416 HAL. Either way, they can use this capability
bit to determine whether to implement the WAR or not.
Thankyou to various sources inside Atheros who have helped me track
down what this particular issue is.
adrian [Tue, 18 Oct 2011 02:43:59 +0000 (02:43 +0000)]
Include opt_ah.h when compiling the driver.
There are HAL methods which are actually direct register
access, rather than simply HAL calls. Because of this, these
register accesses would use the non-debug path in ah_osdep.h
as opt_ah.h isn't included.
With this, the correct register access methods are used,
so debugging traces show things such as TXDP checking and
TSF32 access.
delphij [Mon, 17 Oct 2011 22:23:27 +0000 (22:23 +0000)]
Fix a bug in sa_find_sizes() which could lead to panic:
When calculating space needed for SA_BONUS buffers,
hdrsize is always rounded up to next 8-aligned boundary.
However, in two places the round up was done against
sum of 'total' plus hdrsize. On the other hand,
hdrsize increments by 4 each time, which means in
certain conditions, we would end up returning with
will_spill == 0 and (total + hdrsize) larger than
full_space, leading to a failed assertion because
it's invalid for dmu_set_bonus.
Sponsored by: iXsystems, Inc.
Reviewed by: mm
MFC after: 3 days
yongari [Mon, 17 Oct 2011 19:51:38 +0000 (19:51 +0000)]
Close a race where SIOCGIFMEDIA ioctl get inconsistent link status.
Because driver is accessing a common MII structure in
mii_pollstat(), updating user supplied structure should be done
before dropping a driver lock.
yongari [Mon, 17 Oct 2011 19:49:00 +0000 (19:49 +0000)]
Close a race where SIOCGIFMEDIA ioctl get inconsistent link status.
Because driver is accessing a common MII structure in
mii_pollstat(), updating user supplied structure should be done
before dropping a driver lock.
se [Mon, 17 Oct 2011 14:37:24 +0000 (14:37 +0000)]
Add missing default values for daily/800.scrub-zfs for documentation
purposes. No functional change, since all parameters are set to their
default values.
MFC after: 1 week
se [Mon, 17 Oct 2011 14:33:41 +0000 (14:33 +0000)]
Fix error message in case the backup storage directory does not exist and
cannot be created ($daily_backup_pkgdb_dbdir -> $daily_backup_pkgdb_dir).
MFC after: 1 week
jchandra [Mon, 17 Oct 2011 13:44:33 +0000 (13:44 +0000)]
FDT changes for 64 bit kernel
Use the offset into the device tree from fdtp as the phandle instead
of using pointer into the device tree. This will make sure that the
phandle fits into a uint32_t type, even when compiled for 64bit.
adrian [Mon, 17 Oct 2011 13:12:47 +0000 (13:12 +0000)]
Fix an issue with 11g beacon frames which looks to be a limitation
on the largest multi-write size.
From the submitter:
==
I looked further into the magic 88-byte threshold after which the bug
occurs. It turns out that figure included the 24-byte tx_desc, and up
to 64 bytes of beacon frame (header+data).
rum_write_multi doesn't seem happy with writing >64 bytes at a time to
the MAC register. If I break it up into separate calls (e.g. bytes
0-63, then bytes 64-65, written at the appropriate offset) I see the
proper beacon frames being transmitted now.
==
Submitted by: Steven Chamberlain <steven@pyro.eu.org>
MFC after: 3 days
des [Mon, 17 Oct 2011 13:05:57 +0000 (13:05 +0000)]
The rc_force test was inverted in the previous commit, so that dhclient ran
for interfaces which were not configured for DHCP *unless* rc_force was set;
the correct logic is to run dhclient for those interfaces *only if* rc_force
is set.
Broken by: des@
Noticed by: everybody and his dog
Submitted by: rea@
PR: bin/161733
pjd [Mon, 17 Oct 2011 09:54:07 +0000 (09:54 +0000)]
When path to the configuration file is relative, obtain full path,
so we can always find the file, even after daemonizing and changing
working directory to /.
das [Mon, 17 Oct 2011 06:10:32 +0000 (06:10 +0000)]
It's no longer accurate to say that math.h "constitute[s] the C math
library," since complex.h, tgmath.h, and fenv.h are also part of the
math library. Replace the outdated sentence with some references to
the other parts.
jchandra [Mon, 17 Oct 2011 05:42:53 +0000 (05:42 +0000)]
Fix for crash on MIPS /dev/mem read.
Reading /dev/mem in 64 bit kernel crashes. This is because the page
used to call uiomove_fromphys() from memrw() does not have md.pv_list
initialized correctly.
The fix is to call pmap_page_init() on the page to initialize it.
bz [Mon, 17 Oct 2011 00:05:31 +0000 (00:05 +0000)]
Add syntactic sugar missed in r226437 and then not added either when moving
things around in r226448 but desperately needed to always make things
compile successfully.
qingli [Sun, 16 Oct 2011 22:24:04 +0000 (22:24 +0000)]
The code change made in r226040 was incomplete and resulted in
routes such as fe80::1%lo0 no being installed. This patch completes
the original intended fix.
qingli [Sun, 16 Oct 2011 22:15:13 +0000 (22:15 +0000)]
The IPv6 code was influx at the time of r196865 due to the L2/L3
separation rewrite changes. r196865 was committed to fix a scope
violation problem in the following test scenario:
pjd [Sun, 16 Oct 2011 21:30:15 +0000 (21:30 +0000)]
In pidfile_open(), if the pidfile is locked, but empty (PID is not stored yet)
and the caller requested other process' PID by passing non-NULL pidptr
argument, we will wait at most 100ms for the PID to show up in the file and if
it won't, we will store -1 in *pidptr.
From now on, pidfile_open() function never sets errno to EAGAIN on failure.
andre [Sun, 16 Oct 2011 20:18:39 +0000 (20:18 +0000)]
Move the tcp_sendspace and tcp_recvspace sysctl's from
the middle of tcp_usrreq.c to the top of tcp_output.c
and tcp_input.c respectively next to the socket buffer
autosizing controls.
hrs [Sun, 16 Oct 2011 19:46:52 +0000 (19:46 +0000)]
Fix a problem that an interface unexpectedly becomes IFF_UP by
just doing "ifconfing inet6 -ifdisabled" when the interface has
ND6_IFF_AUTO_LINKLOCAL flag and no link-local address.
ed [Sun, 16 Oct 2011 19:15:25 +0000 (19:15 +0000)]
Don't cast SIZE_T_MAX to off_t.
I focused so much on the 32-bits case where we have to cast SIZE_T_MAX
up in size, that I forgot about the 64-bits case, where off_t and size_t
are equal in size. Simply cast both numbers to uintmax_t, as we can
assume st_size is never negative.
cognet [Sun, 16 Oct 2011 17:59:28 +0000 (17:59 +0000)]
Fix 2 bugs :
- A race condition could happen if two threads were using RAS at the same time
as the code didn't reset RAS_END, the RAS code could believe we were not in
a RAS, when we were in fact.
- Using signed value logic to compare addresses wasn't such a good idea.
Many thanks to Ian to investigate on these issues.
Pointy hat to: cognet
PR: arm/161498
Submitted by: Ian Lepore <freebsd At damnhippie DOT dyndns dot org
MFC after: 1 week
cognet [Sun, 16 Oct 2011 17:37:54 +0000 (17:37 +0000)]
Explicitely set ARM_RAS_START and ARM_RAS_END once the cacheline or the
page has been allocated, or we could end up using random values, and bad things
could happen.
PR: arm/161492
Submitted by: Ian Lepore <freebsd AT damnhippie dot dyndns DOT org>
MFC after: 1 week
andre [Sun, 16 Oct 2011 15:08:43 +0000 (15:08 +0000)]
VNET virtualize tcp_sendspace/tcp_recvspace and change the
type to INT. A long is not necessary as the TCP window is
limited to 2**30. A larger initial window isn't useful.
marcel [Sun, 16 Oct 2011 14:11:05 +0000 (14:11 +0000)]
o Use C99 designated initializer to properly handle ELFOSABI_STANDALONE.
o In elf_get_byte(), cast through uint8_t and not char to avoid sign
extension.
ed [Sun, 16 Oct 2011 07:36:27 +0000 (07:36 +0000)]
Make some internal fixes to ruptime(1):
- Prevent possible unaligned access to struct whoent.
- Increase uptime column by one, to properly print hosts with an uptime
greater than 1000 days.
- Reduce code complexity by storing struct whod inside struct hs.
- Set WARNS to 6.
delphij [Sun, 16 Oct 2011 07:35:26 +0000 (07:35 +0000)]
According to the NetBSD foundation [1]:
Third parties are encouraged to change the license on any files which have
a 4-clause license contributed to the NetBSD Foundation to a 2-clause
license. We would also encourage you to inform us about these files, so
that we can continue to track the many places in which NetBSD is used.
trociny [Sat, 15 Oct 2011 19:08:22 +0000 (19:08 +0000)]
In r225809 the intention was to send VEOF only once if STDIN was not a
terminal. Unfortunately the fix was incorrect and for flushtime > 0 it
keept sending VEOF.
Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
in bin/161526. Note, we still send VEOF at least once. Otherwise
commands like below would hang forever:
echo 1 |script /tmp/script.out cat
PR: bin/161526
Reported by: Adrian Wontroba <aw1@stade.co.uk>, Stefan Bethke <stb@lassitu.de>
Tested by: Stefan Bethke <stb@lassitu.de>
MFC after: 3 days
glebius [Sat, 15 Oct 2011 18:41:25 +0000 (18:41 +0000)]
Add support for IPv4 /31 prefixes, as described in RFC3021.
To run a /31 network, participating hosts MUST drop support
for directed broadcasts, and treat the first and last addresses
on subnet as unicast. The broadcast address for the prefix
should be the link local broadcast address, INADDR_BROADCAST.
glebius [Sat, 15 Oct 2011 16:28:06 +0000 (16:28 +0000)]
Remove last remnants of classful addressing:
- Remove ia_net, ia_netmask, ia_netbroadcast from struct in_ifaddr.
- Remove net.inet.ip.subnetsarelocal, I bet no one need it in 2011.
- fix bug when we were not forwarding to a host which matches classful
net address. For example router having 192.168.x.y/16 network attached,
would not forward traffic to 192.168.*.0, which are legal IPs in
CIDR world.
- For compatibility, leave autoguessing of mask based on class.