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.
kib [Sat, 8 May 2010 18:54:47 +0000 (18:54 +0000)]
MFC r204051 (by imp):
n64 has a different size for KINFO_PROC_SIZE.
Approved by: imp
MFC r207152:
Move the constants specifying the size of struct kinfo_proc into
machine-specific header files. Add KINFO_PROC32_SIZE for struct
kinfo_proc32 for architectures providing COMPAT_FREEBSD32. Add
CTASSERT for the size of struct kinfo_proc32.
MFC r207269:
Style: use #define<TAB> instead of #define<SPACE>.
mav [Sat, 8 May 2010 16:06:54 +0000 (16:06 +0000)]
MFC r207499:
Make SATA XPT negotiate and enable some additional SATA features, such as:
- device initiated power management (some devices support only this way);
- Automatic Partial to Slumber Transition (more power saving);
- DMA auto-activation (expected to slightly improve performance).
More features could be added later, when hardware supports.
mav [Sat, 8 May 2010 13:09:36 +0000 (13:09 +0000)]
MFC r207433:
Revert r198705.
As scottl@ noticed, max_target/max_lun was intended to be only a hint for
existing bus scanner. Some FC/SAS SIMs report fake values there, that are
smaller then maximum supported IDs. In that case this check makes impossible
manual scan outside hinted range.
For ATA/SATA SIMs respective check was instead implemented at SIM level.
Newer SCSI SIMs expected to have these checks at driver or firmware level.
Some older SCSI SIMs have no this check and the issues will get back there.
mav [Sat, 8 May 2010 13:02:52 +0000 (13:02 +0000)]
MFC r207430:
Add Target/LUN ID checks and deny access to targets 1-14 when PMP absent.
Enforce PMA bit clearing when PMP detached to avoid further scan timeouts.
jilles [Fri, 7 May 2010 20:58:50 +0000 (20:58 +0000)]
MFC r207449: telnet: Fix infinite loop if local output generates SIGPIPE.
Instead of catching SIGPIPE and jumping out of the signal handler with
longjmp, ignore it and handle write errors to the local output by exiting
from there. I have changed the error message to mention the local output
instead of NetBSD's wrong "Connection closed by foreign host". Write errors
to the network were already handled by exiting immediately and this now
applies to EPIPE too.
The code assumed that SIGPIPE could only be generated by the network
connection; if it was generated by the local output, it would longjmp out of
the signal handler and write an error message which caused another SIGPIPE.
tuexen [Fri, 7 May 2010 20:02:36 +0000 (20:02 +0000)]
MFC 206758, 206840, 206891, 206892, 207099, 207191, 207197
* Fix a bug where SACKs are not sent when they should.
* Get delayed SACK working again.
* Really print the nr_mapping array when it should be printed.
* Update highest_tsn variables when sliding mapping arrays.
* Sending a FWDTSN chunk should not affect the retran count.
* Cleanups.
yongari [Thu, 6 May 2010 18:43:00 +0000 (18:43 +0000)]
MFC r207409,207442:
r207409:
Both RX_GMF_LP_THR and RX_GMF_UP_THR must be 16 bits register. If
it is 8bits register then RX FIFO size can't exceed 2KB which is
not true for almost all Yukon II controller.
r207442:
Disable non-ASF packet flushing on Yukon Extreme as vendor's driver
does. Without this change, Yukon Extreme seems to generate lots of
RX FIFO overruns even though controller has available RX buffers.
These excessive RX FIFO overruns generated lots of pause frames
which in turn killed devices plugged into switch. It seems there is
still occasional RX frame corruption on Yukon Extreme but this
change seems to fix the pause frame storm.
yongari [Thu, 6 May 2010 18:34:15 +0000 (18:34 +0000)]
MFC r207380:
Enable VLAN hardware tag insertion/stripping. Due to lack of SiS190
controller, I'm not sure whether this is also applicable to SiS190
so this feature is only activated on SiS191 controller.
In theory, controller reinitialization is not needed when VLAN tag
configuration is changed, but xclin said controller was not stable
whenever toggling VLAN tag bit. To address that, sge(4)
reinitialize controller for VLAN configuration which seems to work
as expected. VLAN tag information for TX/RX descriptor and
configure bit of RxMacControl register was found by xclin.
yongari [Thu, 6 May 2010 18:30:46 +0000 (18:30 +0000)]
MFC r207379:
Enable FCS stripping and padding 10 bytes bit of RX MAC control
register. Due to lack of SiS190 controller, I'm not sure whether
this is also applicable to SiS190 so this feature is only activated
on SiS191 controller.
The controller can pad 10 bytes before DMAing a received frame to
RX buffer and received bytes include the padded bytes. This padding
is very useful on strict-alignment architectures because driver
does not have to copy received frame to align IP header on 4 bytes
boundary. It also gives better RX performance on non-strict
alignment architectures. Special thanks to xclin to give me
valuable register information. Without his enthusiastic trial and
errors this wouldn't be even possible.
While I'm here tighten validity check of received frame. Controller
clears RDS_CRCOK bit when it received bad CRC frames. xclin found
that using loop back testing.
yongari [Thu, 6 May 2010 18:17:36 +0000 (18:17 +0000)]
MFC r207375-207377.
r207375:
Preserve unknown bits of RX MAC control register when driver
programs RX filter configuration. It seems RX MAC control register
is one of key registers to get various offloading features as well
as performance. Blindly clearing unrelated bits can result in
unexpected results.
Remove the need for some "init" functions within the network
stack, like pim6_init(), icmp_init() or significantly shorten
others like ip6_init() and nd6_init(), using static initialization
again where possible and formerly missed.
Move (most) variables back to the place they used to be before the
container structs and VIMAGE_GLOABLS (before r185088) and try to
reduce the diff to stable/7 and earlier as good as possible,
to help out-of-tree consumers to update from 6.x or 7.x to 8 or 9.
This also removes some header file pollution for putatively
static global variables.
Revert VIMAGE specific changes in ipfilter::ip_auth.c, that are
no longer needed.
Reviewed by: jhb
Discussed with: rwatson
Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
rmacklem [Thu, 6 May 2010 01:08:36 +0000 (01:08 +0000)]
MFC: r207350
For the experimental NFS client, it should always flush dirty
buffers before closing the NFSv4 opens, as the comment states.
This patch deletes the call to nfscl_mustflush() which would
return 0 for the case where a delegation still exists, which
was incorrect and could cause crashes during recovery from
an expired lease.
jilles [Wed, 5 May 2010 22:17:17 +0000 (22:17 +0000)]
MFC r206760: getcwd(3): Clarify that EACCES may or may not be checked.
POSIX permits but does not require checking access on the current and parent
directories.
Because various programs do not like it if getcwd(3) fails, it seems best
to avoid checking access as much as possible. There are various reports in
GNATS about this (search for getcwd).
Our getcwd(3) implementation first queries the kernel for the pathname
directly, which does not check any permissions but sometimes fails, and then
falls back to reading all parent directories for the names.
jilles [Wed, 5 May 2010 22:00:57 +0000 (22:00 +0000)]
MFC r207186: sysctl(3): Update description of various kern.* variables.
Also add xrefs for confstr(3) (as sysconf(3) but for strings) and kvm(3)
(which is a more convenient way to access some of the variables).
kensmith [Wed, 5 May 2010 16:58:29 +0000 (16:58 +0000)]
Merge r206423:
> Shift the version of perl used by the release build process over to
> perl-5.10. This aligns the release build process with the current
> default version of perl in the ports tree.
kensmith [Wed, 5 May 2010 16:25:57 +0000 (16:25 +0000)]
Merge r206422:
> Pass the HTTP_PROXY and FTP_PROXY environment variables through in addition
> to FTP_PASSIVE_MODE so release building works for a machine that needs
> to use a proxy.
mav [Wed, 5 May 2010 05:11:12 +0000 (05:11 +0000)]
MFC r207490:
Add xpt_schedule_dev_sendq() call, lost at r203108. It is not needed in
usual operation, but required in some conditions to make queue running
after being shrinked.
delphij [Wed, 5 May 2010 00:38:20 +0000 (00:38 +0000)]
MFC r206973:
When CPUTYPE is defined to any value, on amd64 platform "mmx" is
available through MACHINE_CPU, indicating the CPU supports that
feature, as done by revision 138685.
This changeset adds "mmx" into the default amd64 MACHINE_CPU list
when no CPUTYPE is specified to provide consistent behavior.
Add C/c/f/p/v switches plus a bunch of minor fixes and cleanups.
Obtained from: NetBSD
r200844 (jh):
Don't print the archive name with -p and -q options.
PR: bin/141280
r201630 (kientzle):
When restoring files, use the mode for the mode.
Thanks to: Jun Kuriyama for pointing this out
r203977 (gavin):
Implement the rename query, for when a file with the same name as the one
about to be extracted already exists. The question, and interpretation
of the response is deliberately compatible with Info-Zip.
This change was originally obtained from NetBSD, but has three changes:
- better compatibility with Info-Zip in the handling of ^D
- Use getdelim() rather than getline()
- bug fix: != changed to == in the "file rename" code
I suspect the latter is also a bug in NetBSD, but I can't easily confirm
this.
edwin [Tue, 4 May 2010 08:06:53 +0000 (08:06 +0000)]
MFC of r201613, r201627
Be able to specify a certain date and/or time for which to calculate
the phase of the moon.
While not worlds best improvements, it will help calendar(1) later on.
kib [Tue, 4 May 2010 05:34:18 +0000 (05:34 +0000)]
MFC r206893:
Slightly modernize realpath(3).
SUSv4 requires that implementation returns EINVAL if supplied path is NULL,
and ENOENT if path is empty string [1].
Bring prototype in conformance with SUSv4, adding restrict keywords.
Allow the resolved path buffer pointer be NULL, in which case realpath(3)
allocates storage with malloc().
MFC r206898:
Free() is not allowed to modify errno, remove safety brackets around it.
Add small optimization, do not copy a string to the buffer that is
to be freed immediately after.
MFC r206997:
Move realpath(3) prototype to a POSIX section.
MFC r206998:
Add standards section, improve wording, taking into account the handling
of NULL and changed type in declaration.
kib [Tue, 4 May 2010 05:14:43 +0000 (05:14 +0000)]
MFC r206264:
When OOM searches for a process to kill, ignore the processes already
killed by OOM. When killed process waits for a page allocation, try to
satisfy the request as fast as possible.
imp [Tue, 4 May 2010 03:56:25 +0000 (03:56 +0000)]
MFC: r207461
sparc64, and possibly other architectures, pads the length of the
section holding the config file to sh_addralign bytes using NULs.
This bogusly triggers an assert. Break out of the loop when we hit an
NUL within that many bytes of the end.
delphij [Mon, 3 May 2010 09:46:47 +0000 (09:46 +0000)]
MFC r206838:
Partially MFp4 #176265 by pjd@:
- Properly initialize and destroy system_taskq.
- Add a dummy implementation of taskq_create_proc().
Note: We do not currently use system_taskq in ZFS so this is mostly a
no-op at this time. Proper system_taskq initialization is required
by newer ZFS code.
bms [Mon, 3 May 2010 09:31:51 +0000 (09:31 +0000)]
MFC r207275:
Fix a regression where DVMRP diagnostic traffic, such as that used
by mrinfo and mtrace, was dropped by the IGMP TTL check. IGMP control
traffic must always have a TTL of 1.
yongari [Mon, 3 May 2010 01:04:44 +0000 (01:04 +0000)]
MFC r207251:
It seems ale(4) controllers do not like to see TCP payload in the
first descriptor in TSO case. Otherwise controller can generate bad
frames during TSO. To address it, make sure to pull up ethernet +
IP + TCP header with options in first buffer. Also ensure the
buffer length of the first descriptor for TSO covers entire ethernet
+ IP + TCP with options and setup additional Tx descriptor if the
first buffer includes TCP payload.
marius [Sun, 2 May 2010 16:55:10 +0000 (16:55 +0000)]
MFC: r207151
Add a TestFloat based test suite for floating-point implementations
currently supporting sparc64. After a `make depend all` there are
three programs; testsoftfloat for testing against the SoftFloat in
src/lib/libc/softfloat for reference purposes, testemufloat for
testing the emulator source in src/lib/libc/sparc64/fpu and testfloat
for testing with the installed libc. Support for other architectures
can be added as needed.
marius [Sun, 2 May 2010 16:52:23 +0000 (16:52 +0000)]
MFC: r206490, r206492
While SPARC V9 allows tininess to be detected either before or after
rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and
UltraSPARC processors defines that in all cases tininess is detected
before rounding therefore rounding up to the smallest normalized number
should set the underflow flag. This change is needed for using SoftFloat
on sparc64 for reference purposes.
marius [Sun, 2 May 2010 16:46:20 +0000 (16:46 +0000)]
MFC: r206450
Correct the DCR_IPE macro to refer to the right bit. Also improve the
associated comment as besides US-IV+ these bits are only available with
US-III++, i.e. the 1.2GHz version of the US-III+.
marius [Sun, 2 May 2010 16:40:18 +0000 (16:40 +0000)]
MFC: r206448
Do as the comment suggests and determine the bus space based on the last
bus we actually mapped at rather than always based on the last bus we
encountered while moving upward in the tree. Otherwise we might use the
wrong bus space in case the bridge directly underneath the nexus doesn't
require mapping, i.e. was skipped as it's the case for ssm(4) nodes.
MFC r207277:
Enhance the historic behaviour of raw sockets and jails in a way
that we allow all possible jail IPs as source address rather than
forcing the "primary". While IPv6 naturally has source address
selection, for legacy IP we do not go through the pain in case
IP_HDRINCL was not set. People should bind(2) for that.
This will, for example, allow ping(|6) -S to work correctly for
non-primary addresses.
MFC r207276:
Make sure IPv6 source address selection does not change interface
addresses while walking the IPv6 address list if in the jail case
something is connecting to ::1.
Reported by: Pieter de Boer (pieter thedarkside.nl)
Tested by: Pieter de Boer (pieter thedarkside.nl)