daichi [Mon, 22 Oct 2007 05:34:00 +0000 (05:34 +0000)]
MFC:
- It has been become MPSAFE.
- Fixed lock panic issue under MPSAFE.
- Fixed panic issue whenever it locks vnode with reclaim.
- Fixed lock implementations not conforming to vnode_if.src style.
daichi [Mon, 22 Oct 2007 05:30:40 +0000 (05:30 +0000)]
MFC:
- Added support for vfs_cache on unionfs. As a result, you can use
applications that use procfs on unionfs.
- Removed unionfs internal cache mechanism because it has
vfs_cache support instead. As a result, it just simplified code of
unionfs.
- Fixed kern/111262 issue.
- Fix the handling of R_SPARC_OLO10, which is a bit of a special case
in the way we implement handling of relocations.
As for the kernel part this fixes the loading of lots of modules,
which failed to load due to unresolvable symbols when built after
the GCC 4.2.0 import. This wasn't due to a change in GCC itself
though but one of several changes in configuration done along the
import. Specfically, HAVE_AS_REGISTER_PSEUDO_OP, which causes GCC
to denote global registers used for scratch purposes and in turn
GAS uses R_SPARC_OLO10 relocations for, is now defined.
While at it replace some more ELF_R_TYPE which should have been
ELF64_R_TYPE_ID but didn't cause problems so far.
- Sync a sanity check between kernel and rtld(1) and change it to be
maintenance free regarding the type used for the lookup table.
- Sprinkle const on lookup tables.
- Use __FBSDID.
cognet [Fri, 19 Oct 2007 17:08:38 +0000 (17:08 +0000)]
MFC rev 1.63:
date: 2007/10/16 18:32:37; author: cognet; state: Exp; lines: +3 -1
Backout rev 1.62, and revert to use -march=armv5te -D__XSCALE__ instead
of -mcpu=xscale for XScale.
gcc still has issues with -mcpu=xscale, and now crashes while building
systat.
ariff [Fri, 19 Oct 2007 15:53:45 +0000 (15:53 +0000)]
- Gigabyte G33-S2H fixup, due to the present of multiple competing
codecs. Codec at address 0 seems purely digital, or perhaps an HDMI
interface. Let the driver skip it and continue scanning the codecs
starting with address 2 (Realtek ALC885).
* Due to possibilities of future similar cases, put enough logic
in hdac_scan_codecs() to force codec scanning starting from
XX address via tunable "hint.pcm.%d.codec_index".
Reported / Tested by: Toomas Pelberg <toomasp@gmx.net>
- Trivial headphone / speaker automute fixup for Fujitsu-Siemens
AMILO Si 1848 laptop.
- Some smart vendor trying to create interplanetary wormhole by
screwing pci config space during their BIOS update. The side effects
of their failure attempt includes mutilated hardware id, broken
speaker automuting and loosing the entire analog CD connectivity,
thus causing enough collateral damages to collapse the entire
universe. Move along with it.
Please exercise extra cautious when applying BIOS updates.
Reported / Tested by: Pietro Cerutti <gahr@gahr.ch>
- assembled laptop, based on the MSI-1034
(662) which is now becoming MSI-034A.
- Fix no sound issues (on headphones) for Lenovo ThinkCentre A55 due
to global automute table entry which is not applicable for
non-laptops.
Reported / Tested by: Piotr Smyrak <piotr.smyrak@heron.pl>
- Speaker mute control for HP DC7700 since the front headphone jack
does not generate any interesting unsolicited signal/response.
scottl [Fri, 19 Oct 2007 15:21:16 +0000 (15:21 +0000)]
Merge rev 1.6: Disable defered interrupt processing. There are reports that
this feature still works with the 4BSD scheduler, but I'm disabling it anyways
for the sake of safety.
alc [Fri, 19 Oct 2007 05:48:45 +0000 (05:48 +0000)]
MFC revision 1.386
The previous revision, updating vm_object_page_remove() for the new page
cache, did not account for the case where the vm object has nothing but
cached pages.
edwin [Thu, 18 Oct 2007 12:55:27 +0000 (12:55 +0000)]
Fast MFC for inclusion of 7.0-BETA1:
Teach makewhatis.c to treat .SS with the same severity as .SH.
At least one port (net-mgmt/net-snmp) creates man-pages which are
in the format:
.SH NAME
The Net-SNMP agent \- The snmp agent responds to SNMP queries from manag
ement stations.
.PP
.SS "Modules"
At this moment, makewhatis determines the end of the .SH NAME section
as where it finds .SH again, but there is none here, is it "terminated"
by the .SS.
kientzle [Thu, 18 Oct 2007 05:16:50 +0000 (05:16 +0000)]
MFC 1.15: When reading ZIP archives, non-regular files should
return EOF immediately on any attempts to read their data.
(Previously, it would return a zero-length block, then EOF,
which elicited bogus warnings from bsdtar.)
Also, correct the EOF return to correctly identify EOF
as part of an empty block at the correct offset.
thompsa [Thu, 18 Oct 2007 01:28:30 +0000 (01:28 +0000)]
MFC if_lagg.c r1.20, if_lagg.h r1.11
Fix two panics in lagg.
1. The locking was changed to shared but roundrobin mode still updated a
pointer in the softc with the next tx interface to use. This will panic
under high load. Change this to an atomically incremented sequence number
in order to choose the tx port in round robin.
2. IFQ_HANDOFF will free the mbuf if the queue is full, this will then be
freed again by lagg_start() and panic. Reorganised the error handling and
freeing to fix this.
sam [Tue, 16 Oct 2007 19:07:26 +0000 (19:07 +0000)]
MFC 1.19:
revert 1.18: the negotiated rate set may not match the hal rate
tables, so using the hal's rateCodeToIndex array will produce wrong
indices for the negotiated rate set
mp [Tue, 16 Oct 2007 16:18:39 +0000 (16:18 +0000)]
Apply two vendor fixes from tcsh-6.15.01. The fixes are:
- Fix pty detection for autologout setting
- kill `foo` got stuck because sigchld was disabled too soon
kib [Mon, 15 Oct 2007 10:49:05 +0000 (10:49 +0000)]
MFC rev. 1.6, 1.7 of src/lib/libutil/pidfile.3,
rev. 1.8 of src/lib/libutil/pidfile.c:
When pidfile is already locked and has zero length, do not return
success and zero pid from pidfile_read(). Return EAGAIN instead. Sleep
up to three times for 5 ms while waiting for pidfile to be written.
mohans [Fri, 12 Oct 2007 19:18:46 +0000 (19:18 +0000)]
MFC:
NFS MP scaling changes.
- Eliminate the hideous nfs_sndlock that serialized NFS/TCP request senders
thru the sndlock.
- Institute a new nfs_connectlock that serializes NFS/TCP reconnects. Add
logic to wait for pending request senders to finish sending before
reconnecting. Dial down the sb_timeo for NFS/TCP sockets to 1 sec.
- Break out the nfs xid manipulation under a new nfs xid lock, rather than
over loading the nfs request lock for this purpose.
- Fix some of the locking in nfs_request.
Many thanks to Kris Kennaway for his help with this and for initiating the
MP scaling analysis and work. Kris also tested this patch thorougly.
Approved by: re@ (Ken Smith)
bmah [Fri, 12 Oct 2007 15:12:17 +0000 (15:12 +0000)]
Stage RELENG_7 release documentation to the correct directory.
Technically, "7-STABLE" isn't the right name for
this directory but it will be after 7.0-RELEASE, and naming the
directory this way means we don't have to go fix it up later.
mohans [Fri, 12 Oct 2007 03:59:18 +0000 (03:59 +0000)]
MFC :
Set the NFS server sockbuf high watermarks to the system defaults
(up form 32KB). The low highwatermark setting caused UDP fullsock
request drops, throttling thruput greatly.
Reported by: Kris Kennaway
Approved by: re@ (Ken Smith)
yongari [Fri, 12 Oct 2007 03:41:54 +0000 (03:41 +0000)]
MFC if_vr.c, 1.127 to RELENG_7:
Not all VIA Rhine chips support 256 register space. So touching
VR_STICKHW register would result in unexpected results on these
hardwares. wpaul said the following for the issue.
The vr_attach() routine unconditionally does this for all supported
chips:
/*
* Windows may put the chip in suspend mode when it
* shuts down. Be sure to kick it in the head to wake it
* up again.
*/
VR_CLRBIT(sc, VR_STICKHW, (VR_STICKHW_DS0|VR_STICKHW_DS1));
The problem is, the VR_STICKHW register is not valid on all Rhine
devices. The VT86C100A chip, which is present on the D-Link DFE-530TX
boards, doesn't support power management, and its register space is
only 128 bytes wide. The VR_STICKHW register offset falls outside this
range. This may go unnoticed in most scenarios, but if you happen to have
another PCI device in your system which is assigned the register
space immediately after that of the Rhine, the vr(4) driver will
incorrectly stomp it. In my case, the BIOS on my test board decided
to put the register space for my PRO/100 ethernet board right next
to the Rhine, and the Rhine driver ended up clobbering the IMR register
of the PRO/100 device. (Long story short: the board kept locking up on
boot. Took me the better part of the morning suss out why.)
The strictly correct thing to do would be to check the PCI config space
to make sure the device supports the power management capability and only
write to the VR_STICKHW register if it does.
Instead of inspecting chip revision numbers for the availability of
VR_STICKHW register, check the existence of power management capability
of the hardware as wpaul suggested.
delphij [Thu, 11 Oct 2007 20:45:06 +0000 (20:45 +0000)]
MFC:
- Mention that less v408 was MFC'ed.
- Mention tzdata2007h update. An in advance &merged; is
added so that we don't have to change this again when
it is actually MFC'ed.
kensmith [Thu, 11 Oct 2007 06:20:27 +0000 (06:20 +0000)]
Remove debugging support from GENERIC kernels, remove warning in
UPDATING that says debugging support makes FreeBSD slower, and note
RELENG_7 creation.
scottl [Tue, 9 Oct 2007 17:43:57 +0000 (17:43 +0000)]
Update to version 3.70.03.007 from the vendor. This adds support for new
SAS-enabled cards. It also makes the driver MPSAFE, eliminating some
problems that resulted from CAM becoming MPSAFE. Many thanks to 3Ware/AMCC
for continuing to support FreeBSD.
Submitted by: Manjunath Ranganathaiah
Approved by: re
obrien [Tue, 9 Oct 2007 14:16:39 +0000 (14:16 +0000)]
Repo copy libpthreads to libkse.
This introduces the WITHOUT_LIBKSE nob,
and changes WITHOUT_LIBPTHREADS to mean with neither threading libs.
Approved by: re(kensmith)
obrien [Tue, 9 Oct 2007 13:42:34 +0000 (13:42 +0000)]
Repo copy libpthreads to libkse.
This introduces the WITHOUT_LIBKSE nob,
and changes WITHOUT_LIBPTHREADS to mean with neither threading libs.
Approved by: re(kensmith)
njl [Tue, 9 Oct 2007 07:51:46 +0000 (07:51 +0000)]
When the EC times out (common with Compaqs), it may report a design
voltage of 0. This can result in a divide by zero trap. Add a guard
for this case. The value of lfcap is checked in acpi_battery_bif_valid()
just before this, so it is safe.
njl [Tue, 9 Oct 2007 07:48:07 +0000 (07:48 +0000)]
Fix the HPET table probe routine to run from device_identify() instead
of directly from acpi0. Before it would attach prior to the sysresource
devices, causing the later allocation of its memory range to fail and
print a warning like "acpi0: reservation of fed00000, 1000 (3) failed".
Use an explicit define for our probe order base value of 10.
Help from: jhb
Tested by: Abdullah Ibn Hamad Al-Marri <almarrie / gmail.com>
MFC after: 3 days
Approved by: re
dougb [Tue, 9 Oct 2007 07:30:14 +0000 (07:30 +0000)]
Deprecate use of the early.sh script as advertised when the support for
local rc.d scripts in the overall boot order was added.
Proper rc.d scripts are run by rc.subr in a subshell, whereas scripts that
end in .sh are sourced into rc's shell. The latter has potential to create
serious boot problems, and there is no reason that the same functionality
cannot be added by the user in the form of a proper rc.d script (as
opposed to being added by the user in the form of /etc/rc.early).
This script will be removed prior to the 8.0 branch.
jeff [Mon, 8 Oct 2007 23:50:39 +0000 (23:50 +0000)]
- Bail out of tdq_idled if !smp_started or idle stealing is disabled. This
fixes a bug on UP machines with SMP kernels where the idle thread
constantly switches after trying to steal work from the local cpu.
- Make the idle stealing code more robust against self selection.
- Prefer to steal from the cpu with the highest load that has at least one
transferable thread. Before we selected the cpu with the highest
transferable count which excludes bound threads.
jeff [Mon, 8 Oct 2007 23:45:24 +0000 (23:45 +0000)]
- Restore historical sched_yield() behavior by changing sched_relinquish()
to simply switch rather than lowering priority and switching. This allows
threads of equal priority to run but not lesser priority.
jeff [Mon, 8 Oct 2007 23:37:28 +0000 (23:37 +0000)]
- Fix ULE in kernels without PREEMPTION compiled in by always enabling the
critical_exit() owepreempt check. ULE will always use owepreempt to
preempt the idle thread. This change does not effect 4BSD since it will
never set owepreempt without PREEMPTION enabled.
- Remove some unused code from choosethread().
edwin [Mon, 8 Oct 2007 21:41:29 +0000 (21:41 +0000)]
MFV for tzdata2007h
Timezone data changes in the following locations:
- Egypt (push possible DST ending one year ahead)
- Iran gets DST again in 2008.
- Palestine DST time for this year fixed.
- Brasils DST rule change in 2008.
- Venezuela time moves half an hour back at the end of this year.
marius [Mon, 8 Oct 2007 18:59:34 +0000 (18:59 +0000)]
Disable TLS for arm and sparc64 here as binutils 2.15 predate GNU TLS
support for these. This is in line with gnu/lib/libgomp/config.h and
gnu/lib/libstdc++/config.h.
Reviewed by: cognet, obrien
Approved by: re (kensmith)
alc [Mon, 8 Oct 2007 18:01:38 +0000 (18:01 +0000)]
In the rare case that vm_page_cache() actually frees the given page,
it must first ensure that the page is no longer mapped. This is
trivially accomplished by calling pmap_remove_all() a little earlier
in vm_page_cache(). While I'm in the neighborbood, make a related
panic message a little more useful.
Approved by: re (kensmith)
Reported by: Peter Holm and Konstantin Belousov
Reviewed by: Konstantin Belousov
alc [Sun, 7 Oct 2007 18:03:03 +0000 (18:03 +0000)]
Correct a lock assertion failure in sparc64's pmap_page_is_mapped() that is
a consequence of sparc64/sparc64/vm_machdep.c revision 1.76. It occurs
when uma_small_free() frees a page. The solution has two parts: (1) Mark
pages allocated with VM_ALLOC_NOOBJ as PG_UNMANAGED. (2) Defer the lock
assertion in pmap_page_is_mapped() until after PG_UNMANAGED is tested.
This is safe because both PG_UNMANAGED and PG_FICTITIOUS are immutable
flags, i.e., they do not change state between the time that a page is
allocated and freed.
silby [Sun, 7 Oct 2007 00:07:27 +0000 (00:07 +0000)]
Improve the debugging message:
TCP: [X.X.X.X]:X to [X.X.X.X]:X tcpflags 0x18<PUSH,ACK>; tcp_do_segment: FIN_WAIT_2: Received data after socket was closed, sending RST and removing tcpcb
So that it also includes how many bytes of data were received. It now looks
like this:
TCP: [X.X.X.X]:X to [X.X.X.X]:X tcpflags 0x18<PUSH,ACK>; tcp_do_segment: FIN_WAIT_2: Received X bytes of data after socket was closed, sending RST and removing tcpcb
kmacy [Sat, 6 Oct 2007 21:42:39 +0000 (21:42 +0000)]
This patch adds an M_NOFREE flag which allows one to mark an mbuf as
not being independently freeable. This allows one to embed an mbuf in
the cluster itself. This confers the benefits of the packet zone on
all cluster sizes. Embedded mbufs currently suffer from the same
limitation that packet zone mbufs do in that one cannot disconnect
them and pass them around independently of the cluster. It would
likely be possible to eliminate this limitation in the future by
adding a second reference for the mbuf itself.
rwatson [Fri, 5 Oct 2007 22:39:44 +0000 (22:39 +0000)]
Disable TCP syncache debug logging by default. While useful in debugging
problems with the syncache, it produces a lot of console noise and has led
to quite a few false positive bug reports. It can be selectively
re-enabled when debugging specific problems by frobbing the same sysctl.
jhb [Fri, 5 Oct 2007 17:37:25 +0000 (17:37 +0000)]
Use the correct pid when checking to see whether or not the /proc/<pid>
directory itself (rather than any of its contents) is visible to the
current thread.
MFC after: 1 week
PR: kern/90063
Submitted by: john of 8192.net
Approved by: re (kensmith)
luigi [Fri, 5 Oct 2007 15:17:14 +0000 (15:17 +0000)]
manpage update for the recent commit to uscanner.c
I also took the chance to make the list of supported devices a
bit more compact, as it was really long to read.
Even though re@ and Warner only saw the diffs for the code, i expect
their approval also covered the manpage update.
Approved by: re, imp (implicitly i hope)
MFC after: 3 days
luigi [Fri, 5 Oct 2007 07:26:39 +0000 (07:26 +0000)]
Add entries for Epson multifunction scanner/printer/card readers,
with all functions supported. This is done adding usb device IDs
to the table of recognised devices (because there is no standard
'scanner' class, so no other way to recognise them), and with
a small change to the uscanner attach routine that prevents
reconfiguring the whole USB device while we are dealing only with
one of its USB interfaces.
The latter part has been suggested by Steinar Hamre in
http://www.freebsd.org/cgi/query-pr.cgi?pr=107665 , i have
only added a bit of explaination to the code.
I have personally tried this on the Epson DX-5050 and DX-6000
devices (on the US market they have different names, CX-something).
I have good reasons to think that, possibly with the mere addition
of more USB ids to the table in uscanner.c, this should work with
all Epson multifunction devices in that family (from DX-3800 to
DX-7000 - these units are in the 50-120$ price range).
More details on related topics (SANE configuration, OCR, etc.)
at http://info.iet.unipi.it/~luigi/FreeBSD/dx5050.html
Make selector parsing accept the dot "." as an alternative selector
with identical meaning as the colon ":". This is to support a syntax
that is more similar to a PCI device specification in the device hints
file. The selector is not fully compatible with the specification in
the hints file, since entries in that file use a different prefix,
which needs to be added to the getsel() routine, if full support of
that syntax is found to be desirable.