marius [Wed, 9 Jan 2008 21:45:37 +0000 (21:45 +0000)]
MFC: 1.25
Fix some bugs in the FreeBSD 4/5/6 pci(4) IOCTLs compatibility code:
- Use the correct offsets when copying out the results of PCIOCGETCONF_OLD.
This happened to not affect the 64-bit architectures because there the
addition of pc_domain to struct pcisel didn't change the overall size of
struct pci_conf.
- Always copy the name and unit information to conf_old so it's also part
of the output once this information is cached in dinfo.
- Use the correct type for flags in struct pci_match_conf_old. This
change is more or less cosmetic though.
mav [Wed, 9 Jan 2008 19:55:51 +0000 (19:55 +0000)]
MFC rev. 1.22
Increase control channel xmit queue to 128 packets.
Previous value 16 was too small for real LAC as temporal activity
spike cound easily overflow queue demanding tunnel disconnection due
to possible state inconsistency.
mux [Wed, 9 Jan 2008 15:23:36 +0000 (15:23 +0000)]
MFC route.c@1.125 and route.h@1.68:
Add a workaround for a deadlock between the rt_setgate() and rt_check()
functions. It is easily triggered by running routed, and, I expect, by
running any other daemon that uses routing sockets.
delphij [Wed, 9 Jan 2008 08:55:10 +0000 (08:55 +0000)]
MFC important fixes by sos@:
Implement a workaround of the datacorruption problem on ServerWorks
HT1000 chipsets. The HT1000 DMA engine seems to not always like 64K
transfers and sometimes barfs data all over memory leading to instant
chrash and burn.
Also fix 48bit adressing issues, apparently newer chips needs 16bit
writes and not the usual fifo thing.
HW donated by: Travis Mikalson at TerraNovaNet
Original work: sos
Approved by: re (kensmith)
marius [Sat, 5 Jan 2008 22:58:51 +0000 (22:58 +0000)]
On FreeBSD GCC 4.2.x checks for the existence of pthread_cancel() in
order to determine whether a program is running with multithreading
support. This check causes __gthread_active_p() to always return 1
however, regardless of whether the program was actually compiled with
-pthread or not, due to the fact that the FreeBSD libc contains a
pthread_cancel() stub. Fix this by using the __gthread_active_p()
version that GCC uses for Solaris and which actively checks for a
working POSIX threads implementation (if such functions exist) instead
of checking for the mere existence of corresponding functions.
On platforms without TLS support, i.e. on arm and sparc64 due to the
lack of GNU TLS support for these archs in binutils 2.15., the false
positives returned by __gthread_active_p() for non-threaded programs
cause the exception handling implementation GCC uses in this case to
crash. This is because GCC assumes that the POSIX threading functions
actually work when __gthread_active_p() returns 1 while in fact the
corresponding stubs in libc just immediately return.
Given that __gthread_active_p() is also used in a couple of other
places besides exception handling, this bug has great potential to
also cause problems in other areas and on all archs.
This is committed to RELENG_7 directly in order to get a fix into
RELENG_7_0 as soon as possible while allowing to loop the official
fix back into the vendor branch and not taking gthr-posix.h off the
vendor branch in HEAD.
gabor [Fri, 4 Jan 2008 13:33:01 +0000 (13:33 +0000)]
MFC
r1.62:
- Document icase variable of make search, which can be used to control
case-sensitivity
r1.63:
- Document PORT_DBDIR
r1.64:
- Remove incomplete sentence fragment
kib [Thu, 3 Jan 2008 12:31:44 +0000 (12:31 +0000)]
MFC rev. 1.106:
Do not allow the SNPSTTY ioctl for the snoop device that has a tty
attached. Otherwise, the snp->snp_tty would be overwritten, while the
tty line discipline still set to the snpdisc. Then snplwrite() causes
panic because ttytosnp() cannot find the snp. (And do it at the proper
place, from rev. 1.107).
MFC rev. 1.107:
The snp_target == NULL implies the snp_tty == NULL. Remove the code
that is put under snp_target == NULL and snp_tty != NULL clause.
In snpclose(), do the snp_detach() before scheduling the snp device
destruction. Otherwise, after the return from snpclose(), the snp
device is already removed from the snp_list, but tty is still in
snooped state. Any attempt to do i/o on such tty cause panic because
ttytosnp() returns NULL.
thompsa [Sat, 29 Dec 2007 17:29:11 +0000 (17:29 +0000)]
MFC r1.8
Fix a panic where if the mbuf was consumed by the filter for requeueing
(dummynet), ipsec_filter() would return the empty error code and the ipsec
code would continue to forward/deference the null mbuf.
kensmith [Sat, 29 Dec 2007 06:17:39 +0000 (06:17 +0000)]
MFC v1.117:
> Plug a memory leak. Once any given package (e.g. perl) was installed
> we would leak a saved screen for every other package we tried to install
> that listed perl as one of its dependencies. When installing things
> like gnome and kde that wound up being a LOT of leaked memory.
kensmith [Sat, 29 Dec 2007 06:14:35 +0000 (06:14 +0000)]
MFC v1.78 and v1.79:
Remove process limits for datasize and stacksize which are unlimited
during a "normal login" (thanks to /etc/login.conf) but not when
sysinstall is running as part of an installation. Fixups for error
messages and a comment that became untrue.
kensmith [Mon, 24 Dec 2007 06:42:35 +0000 (06:42 +0000)]
MFC v1.116:
> For the INDEX file to be used on disc1 of the 7.0-RELEASE the longest
> "build dependencies" field is 5,108 characters which overflows the
> length of the junk buffer by a teeny bit. This whole section needs
> much more error checking but for now just completely ignore stuff
> we have no interest in instead of copying it to someplace we don't
> use in the process.
kensmith [Sat, 22 Dec 2007 11:28:40 +0000 (11:28 +0000)]
Technically speaking RELENG_7 becomes 7.0-STABLE once RELENG_7_0 gets
created but that confuses too many people who think that means the
release happened. So call it PRERELEASE for now.
kensmith [Sat, 22 Dec 2007 06:32:45 +0000 (06:32 +0000)]
Adjust to shift some packages onto disc3. Strictly speaking not an MFC
since packages are decided on a release-by-release basis but for now
this is the same package set as for 6.3.
kensmith [Sat, 22 Dec 2007 06:29:13 +0000 (06:29 +0000)]
MFC v1.887.2.22:
> Add support for disc3. Depending on architecture the combination of
> kde3 and gnome2 is at least 670Mb which would mean if we stick with
> just disc1/disc2 the only packages we could provide on the iso's
> would be X11, kde3, and gnome2...
kensmith [Sat, 22 Dec 2007 06:25:49 +0000 (06:25 +0000)]
MFC v1.253 of dist.c and v1.71 of dist.h:
> A few more adjustments needed because of changes in xorg. Just installing
> xorg-server doesn't include any video drivers so install xorg-drivers as
> well. And if font-alias isn't installed the X server won't start,
> complaining it can't find the font "fixed".
rwatson [Fri, 21 Dec 2007 14:32:04 +0000 (14:32 +0000)]
Merge mac_posix_sem.c:1.12 from HEAD to RELENG_7:
Fix a MAC label leak for POSIX semaphores, in which per-policy labels
would be properly disposed of, but the global label structure for the
semaphore wouldn't be freed.
Reported by: tanyong <tanyong at ercist dot iscas dot ac dot cn>,
zhouzhouyi
rwatson [Fri, 21 Dec 2007 14:25:43 +0000 (14:25 +0000)]
Merge in6_pcb.c:1.86 from HEAD to RELENG_7:
Fix leaking MAC labels for IPv6 inpcbs by adding missing MAC label
destroy call; this transpired because the inpcb alloc path for IPv4/IPv6
is the same code, but IPv6 has a separate free path. The results was
that as new IPv6 TCP connections were created, kernel memory would
gradually leak.
Reported by: tanyong <tanyong at ercist dot iscas dot ac dot cn>,
zhouzhouyi
thompsa [Fri, 21 Dec 2007 05:33:48 +0000 (05:33 +0000)]
MFC r1.25
- Use the macro to check the port status has it will also test if its
administratively down (!IFF_UP)
- Use the same parameters to lagg_link_active() to get the backup port as in
the output path, this didnt actually matter in practice as sc_primary is
always the first on the port list.
rpaulo [Wed, 19 Dec 2007 20:52:37 +0000 (20:52 +0000)]
MFC revision 1.679:
Disallow the legacy USB circuit to generate an SMI# via an ICH
register (MacBooks only).
This allows MacBooks to boot in SMP mode without any trick and
solves
the timer problems with HZ=1000.
rpaulo [Wed, 19 Dec 2007 20:47:44 +0000 (20:47 +0000)]
MFC revision 1.662 and 1.663:
Disallow the legacy USB circuit to generate an SMI# via an ICH
register (MacBooks only).
This allows MacBooks to boot in SMP mode without any trick and solves
the timer problems with HZ=1000.
rrs [Sat, 15 Dec 2007 23:16:04 +0000 (23:16 +0000)]
- Add real sysctl's that change the limits on the number of
4k/9k and 16k clusters, the old sysctl's were just empty
things that just set delusional numbers that had no effect :-(
- Add an initial limit each to be 1/2 of the previous value starting
at 2k.. i.e. limit for 4k = 1/2 of 2k, limit for 9k = 1/2 4k etc.
delphij [Sat, 15 Dec 2007 18:39:07 +0000 (18:39 +0000)]
MFC revision 1.46
date: 2007/11/03 17:33:41; author: scottl; state: Exp; lines: +2 -1
Ever since the module registration system was introduced to this driver,
it's been printing out scary messages about "Unhanded Event Notify Frame"
that are needlessly worrisome to users. Change this warning to only print
out at an elevated debugging level.
ariff [Sat, 15 Dec 2007 04:07:25 +0000 (04:07 +0000)]
MFC:
Limit total hardware playback channels to just 1. The reliability of
it's multi DAC / playback channels is not that good. Enabling vchans
make the bug more visible since playback allocation will look for
possible free hardware channels first (i.e: the next DAC, the very first
has been consumed by vchan mixer) which in this case has been proven faulty.
Tested by: Dominic Fandrey <LoN_Kamikaze at gmx dot de>
URL: http://lists.freebsd.org/pipermail/freebsd-stable/2007-December/039022.html
Approved by: re (kensmith)
ariff [Sat, 15 Dec 2007 04:06:52 +0000 (04:06 +0000)]
MFC:
Disable AC97 microphone channel. Due to the channel allocation priority
that favours true hardware channel, the first instance of recording
request will grab this channel (the first channel is being used as
vchan master). In many cases, it is not really work as intended and give
false impression of broken recording.
ariff [Sat, 15 Dec 2007 04:06:12 +0000 (04:06 +0000)]
MFC:
- nid 28 for Acer @ ALC268 should be identified as analog CD input pin,
though it doesn't provides proper (sane, valid, usable, etc) analog CD
playback due to its stripped down nature.
- Add speaker/headphone controls for HP Compaq DC7700 Small Form Factor PC
@ ALC262. [1]
Submitted by: [1] Carlos A. M. dos Santos <unixmania at gmail dot com>
emaste [Mon, 10 Dec 2007 20:18:19 +0000 (20:18 +0000)]
MFC to RELENG_7:
aac.c:1.124
aacvar.h:1.49
Allow simultaneous opens of the device for issuing commands to the
controller. This is merged from Adaptec driver build 11669.
aac.c:1.125
aac_pci.c:1.66
aacreg.h:1.24
Add family support to allow the driver to attach to new devices that
share the same interface.
aac_cam.c:1.30
Merge from Adaptec a 64 bit fix and a workaround for luns != 0
returning CAM_SEL_TIMEOUT on SAS controllers, which prevented
passthrough devices from being created.
jkim [Mon, 10 Dec 2007 17:49:16 +0000 (17:49 +0000)]
MFC: 1.3
Teach dhclient(8) about net80211 link (association) status.
Especially it helps ndis(4) where it is used with wpa_supplicant(8)
since 0.5.8 is imported. Previously ndis_events(8) was used to notify
link status to wpa_supplicant but it is defuct now, i. e., external event
notification mechanism is removed by the vendor and there is no substitute
for ndisulator yet.
Reviewed by: brooks
OK'd by: sam
Approved by: re (kensmith)
rrs [Sun, 9 Dec 2007 20:23:47 +0000 (20:23 +0000)]
- Found a problem in non-blocking sends. When
sending, once the locks are all unlocked to
do the copy's in, its possible that other
events could then raise the number of bytes
outstanding pushing it so not all the message
would fit. This would then cause us to send
only part of the message. This fix makes it
so we keep a "reserved" amount that can be
kept in mind when making calculations to send.
- rcv msg args with a NULL/NULL for to/tolen will return
an error incorrectly for the 1-2-1 model.
- We were not doing 0 len return correctly and not
setting socantrcv() more correctly. Previouly we "fixed"
this area by taking out the socantrcv()
since we then could not get the data out. The correct fix
is to still flag the socket but alow a by-pass route to
continue to read until all data is consumed.
- Fix the initial buf calculation to be more friendly, calc is
the same but we use different variable to make it easier
amongst the different code versions.
- Signedness issue with one of the new var's (this is an issue
mainly in apple but with the right -Wall it could effect us too).
- optimize the initialization of the SB max variables.
- Missing lock(s) when sending data and moving it to the
outqueue.
- If a mbuf alloc fails during moving to outqueue the
reassembly of the old mbuf chain was incorrect.
- some_taken becomes a counter in sctputil.c instead of a set to 1.
- Fix a panic to be only under invarients and have a proper recovery
in reading messages.
- msg_flags needed to be set to the value collected not or'd.
- More fixes for lock misses on the transfer of data to
the sent_queue. Sometimes I wonder why any code
ever works :-)
- Fix the pad of the last mbuf routine, It was working improperly
on non-4 byte aligned chunks which could cause memory overruns.
Approved by: re@freebsd.org(gnn)
delphij [Sun, 9 Dec 2007 19:27:19 +0000 (19:27 +0000)]
Sync up ata(4) work by sos@ on -HEAD:
* Add preliminary SATA ATAPI support for sii 3132/3124 chips.
* Fix speed report on Intel SATA chips in compat mode.
* Fix broken detect of JMicron 368.
Related revisions:
- ata-chipset.c: 1.208, 1.210
- ata-disk.c.c: 1.205
o Initial Import of Intel 3945abg Wireless Lan Controller (wpi) driver
o Turn off debug output
o Fix WEP compatiblity
o Handle missed beacons correctly