Commit Graph

61005 Commits

Author SHA1 Message Date
alc
31fbaf5d5c Long ago, revision 1.22 of vm/vm_pager.h introduced a bug. Specifically,
it introduced a check after the call to file system's get pages method
that assumes that the get pages method does not change the array of pages
that is passed to it.  In the case of vnode_pager_generic_getpages(),
this assumption has been incorrect.  The contents of the array of pages
may be shifted by vnode_pager_generic_getpages().  Likely, the problem
has been hidden by vnode_pager_haspage() limiting the set of pages that
are passed to vnode_pager_generic_getpages() such that a shift never
occurs.

The fix implemented herein is to adjust the pointer to the array of pages
rather than shifting the pages within the array.

MFC after: 3 weeks
Fix suggested by: tegge
2006-10-14 23:21:48 +00:00
alc
07a6c3ab4e Change vnode_pager_addr() such that on returning it distinguishes between
an error returned by VOP_BMAP() and a hole in the file.

Change the callers to vnode_pager_addr() such that they return
VM_PAGER_ERROR when VOP_BMAP fails instead of a zero-filled page.

Reviewed by: tegge
MFC after: 3 weeks
2006-10-14 22:09:03 +00:00
ru
1bc0f5fc76 Prevent IOC_IN with zero size argument (this is only supported
if backward copatibility options are present) from attempting
to free memory that wasn't allocated.  This is an old bug, and
previously it would attempt to free a null pointer.  I noticed
this bug when working on the previous revision, but forgot to
fix it.

Security:	local DoS
Reported by:	Peter Holm
MFC after:	3 days
2006-10-14 19:01:55 +00:00
trhodes
e7d9ab0897 Close a race condition where num can be larger than tmp, giving the user
too large of a boundary.

Reported by:	Ilja Van Sprundel
2006-10-14 10:30:14 +00:00
bde
d0962ab7a5 Don't do null Setattr RPCs for VA_MARK_ATIME. When we added the
VA_MARK_ATIME feature to fix POSIX conformance fore execve() and mmap(),
we thought that it was optimized well enough for the one file system
that supports it (ffs) and harmless for other file systems (except
layered ones which already get the layering for VOP_SETATTR() wrong).
However, nfs_setattr() doesn't do much parameter checking, so when
it gets a combination of parameters that it doesn't understand, it
always does a Setattr RPC.  This RPC can't do anything good, and for
VA_MARK_ATIME it is null except for wasting a lot of time.

This is the smallest and easiest to fix of several bugs that have
increased the number of RPCs for kernel builds on nfs by more than
100% since 2004-11-05.  The real-time increase depends on network
latency and parallelization and can also be very large (approaching
the same percentage for unparallelized operations like "make depend"
on systems with fast CPUs and high-latency networks).
2006-10-14 07:25:11 +00:00
scottl
8bd9cc6205 Simplify the arguments to bce_tx_encap. 2006-10-14 05:30:12 +00:00
scottl
2640fdfe79 More small whitespace cleanups 2006-10-14 04:28:23 +00:00
scottl
5cccc781cc Don't copy the bd_chain head pointers into temporary objects, they are
available globally.
2006-10-14 03:58:59 +00:00
ru
a17c967b42 Define an empty C_DIALECT in case of "icc", just in case. 2006-10-13 22:29:06 +00:00
ru
ca460b4ef0 - Remove include links only when .depend is also removed, so that
"make depend; make clean; make -n" works.

- Preseve kernel's .depend if it already exists and its creation
  is interrupted.

Reported/reviewed by:	bde
2006-10-13 22:28:14 +00:00
jb
47f75c2b66 Ignore the uart device. 2006-10-13 21:55:30 +00:00
jb
a0df1f1daf Remove a nmdm comment which ru@ thinks was no longer required. 2006-10-13 21:44:57 +00:00
jb
edbbcce00c sun4v uses the sparc64 version of this file. 2006-10-13 21:30:18 +00:00
tegge
2d3b850cd6 Wait for thread count to reach zero in destroy_devl() even when no purge
method is defined, to avoid memory being modified after free.

Temporarily increase refcount in destroy_devl() to avoid a double free
if dev_rel() is called while waiting for thread count to reach zero.
2006-10-13 20:49:24 +00:00
ru
c43e76ed8f Replace a rarely used "depuration" with "debugging".
PR:		docs/85127
Submitted by:	Gary W. Swearingen (partially)
MFC after:	3 days
2006-10-13 20:48:17 +00:00
glebius
501eeb3d83 Include pcpu.h so that kernel is buildable w/o RWLOCK_NOINLINE option
and with some code that uses rwlock(9).
2006-10-13 19:43:35 +00:00
jhb
42c2806808 Move the 2 additional #includes down into the #ifndef DEV_ATPIC section. 2006-10-13 17:31:57 +00:00
ume
8b35df5a80 Make net.inet6.ip6.auto_linklocal tunable. Someone may want to
enable/disable auto_linklocal even in single user mode.

Discussed with:	re@, gnn@
MFC after:	3 days
2006-10-13 12:45:53 +00:00
ume
73c8098699 Revert the default value of net.inet6.ip6.auto_linklocal to 1.
If ipv6_enable is not set to "YES", net.inet6.ip6.auto_linklocal
is turned to 0 at boot.

Discussed with:	re@, gnn@
MFC after:	3 days
2006-10-13 12:41:36 +00:00
jb
ad383478c8 Attempt to fix the sun4v tinderbox build (which unhelpfully doesn't
report errors -- just warnings).

Submitted by: ru@
2006-10-13 09:55:17 +00:00
glebius
da25bed089 Fix result of some mechanical change that I did some time ago, when
writing this node.
2006-10-13 09:11:12 +00:00
jb
df3c1f6420 Remove one of the duplicate 'device nmdm' lines.
Noticed in the sun4v tinderbox log.
2006-10-13 09:05:44 +00:00
kmacy
9d0d526018 Fix console and update to new api.
The style changes are required as a result of the CONSOLE_DRIVER macro.

Approved by: rwatson (mentor)
2006-10-13 06:45:50 +00:00
scottl
aad3bc0906 Fix some whitespace 2006-10-13 05:18:03 +00:00
jb
1d3426872f Attempt to fix the GENERIC kernel build which has been failing on
tinderbox for a couple of days.
2006-10-13 04:53:22 +00:00
jhb
c1d1eb92e9 ipmi_polled_enqueue_request() is already called with the lock held, just
assert it rather than recursing.

Reported by:	mjacob
Pointy hat:	jhb
MFC after:	3 days
2006-10-12 16:26:42 +00:00
ariff
48bb5fd39c - Fix support for ASUS U5F laptop. This laptop (and possibly others)
need a special inverted EAPD quirk.
- Add "eapdinv" config for future testing purposes.

Tested by:	Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
          	#freebsd-azalia @ irc.freenode.net
2006-10-12 15:37:43 +00:00
jhb
fbcae8f09d Fix nodevice atpic compile.
Pointy hat to:	jhb
2006-10-12 12:48:21 +00:00
kmacy
94d242076a This won't be needed. There is already userland infrastructure for fpu emulation
for sparc64.
2006-10-12 06:00:34 +00:00
kmacy
f64ee1a32f The T2000 has multiple PCI domains requiring bus allocation to be done differently.
This pulls in changes by jmg from perforce and makes them sun4v only for now.

Approved by: scottl (acting as backup for mentor rwatson)
2006-10-12 04:44:01 +00:00
kmacy
e728d44745 sun4v requires TSBs (translation storage buffers) to be contiguous and be
size aligned requiring heavy usage of vm_page_alloc_contig

This change makes vm_page_alloc_contig SMP safe

Approved by: scottl (acting as backup for mentor rwatson)
2006-10-12 04:41:39 +00:00
ariff
ebead78931 Fix support for IBM/Lenovo Thinkcentre M52 series. Its vendorid / 0x1014
accidentally match with HP vendorid / 0x103c.

Reported by:	Robert Noland <rnoland@2hip.net>
2006-10-12 04:19:37 +00:00
imp
a44c175cd0 Remove redundant casts. The casts inside the macros should be
sufficient (or fixed if not).
2006-10-12 03:05:45 +00:00
keramida
18f94ee242 Spell proc/sys/kernel/pid_max correctly in a comment.
Submitted by:	rdivacky
2006-10-11 20:32:46 +00:00
glebius
e2fb442f9b Recognize 802.1q frames in Ethernet input and process them.
PR:		kern/101162
Submitted by:	CoolDavid (Tseng Guo-Fu) <cooldavid cdpa.nsysu.edu.tw>
2006-10-11 15:27:13 +00:00
glebius
7fc0346961 Improve ktr(4) logging for callout(9) subsystem. Log all inserts and
removals, including failures, into the callwheel.

XXX: Most of the CTR() macros are called with callout_lock spin mutex
held, thus won't be logged into file, if KTR_ALQ is used. Moving the
CTR() macros out from the spinlocked code would require copying of all
arguments. I'm too lazy to do this.
2006-10-11 14:57:03 +00:00
glebius
119a1b5374 Do not leak hooks in ng_bypass().
Submitted by:	Alexander Motin <mav alkar.net>
2006-10-11 14:33:08 +00:00
glebius
da7c9c2fef Make it buildable. 2006-10-11 13:28:37 +00:00
glebius
9355a9d023 Unbreak a short one.
Submitted by:	maxim
2006-10-11 12:39:21 +00:00
glebius
cb82f81bfe Break long line. 2006-10-11 12:32:53 +00:00
glebius
c93c44c80d Use hash functions with better distribution. Tested on live traffic.
Submitted by:	Alexander Motin <mav alkar.net>
2006-10-11 12:31:14 +00:00
maxim
3194151ff3 o Do not do args->f_id.addr_type == 6 when there is
IS_IP6_FLOW_ID() exactly for that.
2006-10-11 12:14:28 +00:00
maxim
69b55f4fa1 o Kill a nit in the comment. 2006-10-11 12:00:53 +00:00
maxim
dd217a5254 o Extend not very informative ipfw(4) message 'drop session, too many
entries' by src:port and dst:port pairs.  IPv6 part is non-functional
as ``limit'' does not support IPv6 flows.

PR:		kern/103967
Submitted by:	based on Bruce Campbell patch
MFC after:	1 month
2006-10-11 11:52:34 +00:00
glebius
e97262352e Use bitcount32() from sys/systm.h instead of my own. 2006-10-11 10:47:44 +00:00
glebius
38c5b1044f - Update the baudrate every time the parent changes its link state.
- Rearrange the curly braces so that this piece of code is more
  readable.
2006-10-11 10:06:35 +00:00
ru
da24a0b645 Merge the rest of my changes. 2006-10-11 07:11:56 +00:00
ru
cf6d68f396 Fix CPU value. 2006-10-11 04:14:41 +00:00
kmacy
59e3dc5a09 Using the ptr defines broke the powerpc build - convert set_mmfsa to the same
convention as the rest of openfirm.c
2006-10-11 02:52:46 +00:00
jhb
920b219fcf Change the x86 interrupt code to suspend/resume interrupt controllers
(PICs) rather than interrupt sources.  This allows interrupt controllers
with no interrupt pics (such as the 8259As when APIC is in use) to
participate in suspend/resume.
- Always register the 8259A PICs even if we don't use any of their pins.
- Explicitly reset the 8259As on resume on amd64 if 'device atpic' isn't
  included.
- Add a "dummy" PIC for the local APIC on the BSP to reset the local APIC
  on resume.  This gets suspend/resume working with APIC on UP systems.
  SMP still needs more work to bring the APs back to life.

The MFC after is tentative.

Tested by:	anholt (i386)
Submitted by:	Andrea Bittau <a.bittau at cs.ucl.ac.uk> (3)
MFC after:	1 week
2006-10-10 23:23:12 +00:00
jhb
97247d4f25 Don't pass unused bufsz to kern_shmctl(). 2006-10-10 22:46:50 +00:00
jhb
2447c3b930 Only try to copyin a msqid for the IPC_SET command to msgctl(). Other
commands (such as IPC_RMID) were bogusly failing with EFAULT.

Tested by:	jkim
2006-10-10 22:46:22 +00:00
jhb
af5122eb88 Remove unnecessary casts before PTRIN(). 2006-10-10 22:44:59 +00:00
jhb
1e61deec33 Oops, fix sign bug in #ifdef for value of INTRCNT_COUNT.
PR:		kern/99870
Submitted by:	jkim
MFC after:	3 days
2006-10-10 19:26:35 +00:00
alc
26e34ffad0 Distinguish between two distinct kinds of errors from VOP_BMAP() in
vnode_pager_generic_getpages(): (1) that VOP_BMAP() is unsupported by the
underlying file system and (2) an error in performing the VOP_BMAP().
Previously, vnode_pager_generic_getpages() assumed that all errors were
of the first type.  If, in fact, the error was of the second type, the
likely outcome was for the process to become permanently blocked on a busy
page.

MFC after: 3 weeks
Reviewed by: tegge
2006-10-10 18:26:18 +00:00
mlaier
c75170f4a7 Remind firmware of the ESSID to use in a directed scan. This fixes scanning
for hidden APs when we are not comming from iwi_config.

Reported by:	Andrew N. Below
MFC after:	3 days
2006-10-10 18:02:22 +00:00
rwatson
10cc7e208a Do allow jailed superuser to override the port ACL.
MFC after:	3 days
Submitted by:	Michal Mertl <mime at traveller dot cz>
2006-10-10 17:04:19 +00:00
csjp
fde20b9adc Mark the audit system calls as being un-implemented in jails. Currently we do
not trust jails enough to execute audit related system calls. An example of
this is with su(1), or login(1) within prisons. So, if the syscall request
comes from a jail return ENOSYS. This will cause these utilities to operate
as if audit is not present in the kernel.

Looking forward, this problem will be remedied by allowing non privileged
users to maintain and their own audit streams, but the details on exactly how
this will be implemented needs to be worked out.

This change should fix situations when options AUDIT has been compiled into
the kernel, and utilities like su(1), or login(1) fail due to audit system
call failures within jails.

This is a RELENG_6 candidate.

Reported by:	Christian Brueffer
Discussed with:	rwatson
MFC after:	3 days
2006-10-10 15:49:10 +00:00
pjd
e4e060fa9e Guard against invalid metadata.
MFC after:	1 week
2006-10-10 15:01:47 +00:00
kib
dc1147adb0 Do not translate the IN_ACCESS inode flag into the IN_MODIFIED while filesystem
is suspending/suspended. Doing so may result in deadlock. Instead, set the
(new) IN_LAZYACCESS flag, that becomes IN_MODIFIED when suspend is lifted.

Change the locking protocol in order to set the IN_ACCESS and timestamps
without upgrading shared vnode lock to exclusive (see comments in the
inode.h). Before that, inode was modified while holding only shared
lock.

Tested by:	Peter Holm
Reviewed by:	tegge, bde
Approved by:	pjd (mentor)
MFC after:	3 weeks
2006-10-10 09:20:54 +00:00
bde
f79090f0c4 The powerpc and sparc64 MD `reboot' commands should never have existed
since they just duplicated the MI `reset' command.  Instead of removing
them, make `reboot' an MI alias for `reboot' since this gives a better
way of killing the `r' alias for `reset'.  Remove the `registers' command
that was used to kill the alias.

Turn the powerpc and sparc64 MD `halt' command into an MI command.

A copy of sparc64/db_interface.c grew in sun4v just after I found the
extra reboot commands.  It has not been changed, and is now not
identical.  Duplicated commands come out duplicated in ddb's online
help, but cause large problems when used (e.g., on i386's with 2 halt's
and an hwatch, typing h doesn' give the expected message about an
ambiguous command, but hangs like the halt command or a looping parseri
would).
2006-10-10 07:26:54 +00:00
bde
04cca344b3 Fixed loss of whitespace suppression at ends of lines. Whitespace
suppression is only needed at ends of lines, but rev.1.32 forced it
off precisely there.

The --More-- prompt is now cleared by explicitly forcing out the
whitespace in "\r        \r".  It might be better to use the line
editor's clearing functions, but these are currently static and not
much different.
2006-10-10 06:36:01 +00:00
sam
2f46986e2f correct diag request to fetch isr state on fatal interrupts
MFC after:	1 week
2006-10-09 23:45:26 +00:00
jkim
9a14ae1f7e Fix style(9) nits. 2006-10-09 20:26:32 +00:00
jkim
43f4f64397 Fix 32-bit PTE in the GART table.
Noticed by:	jmg
2006-10-09 20:24:49 +00:00
jmg
6a8dfa7618 provide routines to access VPD data at the PCI layer...
remove sk's own implementation, and use the new calls to get the data...

Reviewed by:	-arch
2006-10-09 16:15:56 +00:00
kmacy
5a59ed693d more sun4v fallout - missed add
Approved by: rwatson (mentor)
2006-10-09 07:00:59 +00:00
kmacy
6051e81fe9 unbreak buildkernel for sparc64 - fallout from sun4v
Approved by: rwatson (mentor)
Reviewed by: jmg
2006-10-09 06:08:24 +00:00
kmacy
98d1f51687 unbreak sparc64 loader build
re-add accidentally deleted asi value
remove sun4v only header include

Approved by: rwatson (mentor)
Reviewed by: jmg
2006-10-09 05:59:04 +00:00
kmacy
65e20bda09 kernel clean up to make the sun4v kernel build
Reviewed by: jmg
Approved by: rwatson (mentor)
2006-10-09 04:45:19 +00:00
kmacy
e9d6f8c905 add sun4v support to the sparc64 boot loader
Approved by: rwatson (mentor)
Reviewed by: jmg
Tested by: kris, dwhite, and jmg
2006-10-09 04:43:07 +00:00
thompsa
abf293f91c Use LIST_FOREACH_SAFE instead of a hand rolled version. 2006-10-09 00:49:57 +00:00
alc
bd713f224f Change vnode_pager_generic_getpages() so that it does not panic if the
given file is sparse.  Instead, it zeroes the requested page.

Reviewed by: tegge
PR: kern/98116
MFC after: 3 days
2006-10-08 20:26:16 +00:00
ariff
df130660f1 Added few more pci ids for Intel, ATI, NVidia, VIA and SiS. 2006-10-08 18:51:58 +00:00
bde
6b6256a939 Added some aliases:
- `b' is now an official alias for `break'.  It used to be an unofficial
  alias, but this was broken by adding the `bt' alias for `trace'.
- `t' is now an official alias for `trace'.  It used to be an unofficial
  alias, but this was broken by adding the `thread' command.
- `registers' is now an alias for `show registers'.  This is a hack to
  break the unofficial `r' alias for `reset'.  `r' really means
  `registers' in some debuggers, so I sometimes type it accidentally and
  am annoyed when it resets the system.  A short command shouldn't have
  such a large effect.  Now at least `res' must be typed to disambiguate
  `reset'.
2006-10-08 18:37:00 +00:00
bde
ff5fb7910a Fixed formatting of printing of command tables. WIth the default max
output width of 79, only 6 columns of width 12 each fit, but 7 columns
were printed.

The fix is to pass the width of the next output to db_end_line() and
not assume there that this width is always 1.

Related unfixed bugs:
- 1 character is wasted for a space after the last column
- suppression of trailing spaces used to limit the misformatting, but
  seems to have been lost
- in db_examine(), the width of the next output is not know and is
  still assumed to be 1.
2006-10-08 18:15:08 +00:00
netchild
d3f48a8444 Remove unnecessary test case. (As written, that branch will never
be followed.)

Submitted by:	ryanb
Found with:	Coverity Prevent
CID:		239860
2006-10-08 17:13:54 +00:00
netchild
ae7b29d2e1 - change if (cond) panic() to KASSERT.
- Dont forget to free em in a case of error.

Suggested by:	ssouhlal
Submitted by:	rdivacky
Tested with:	LTP
2006-10-08 17:10:34 +00:00
netchild
4e02401696 - Replace homegrown check for FIFO with S_ISFIFO. [1]
- Check the status of the options before messing with it.

Inspired by:	NetBSD [1]
Submitted by:	rdivacky
Tested with:	LTP
2006-10-08 17:08:27 +00:00
netchild
eefbee99be Implement /proc/sys/kernel/pid_max.
Submitted by:	rdivacky
Tested with:	LTP
2006-10-08 16:55:27 +00:00
piso
862e1ed026 Various mdoc and grammar fixes.
Approved by: glebius
Reviewed by: glebius, ru
2006-10-08 13:53:45 +00:00
piso
ea5780c70e Sort libalias files.
Approved by: glebius
Reviewed by: glebius, ru
2006-10-08 13:51:27 +00:00
sos
ddda382a25 Add missing PCI ID for the acer m5288 2006-10-08 09:58:00 +00:00
flz
233a9f7a23 Add a USB umass(4) quirk for Panasonic KXL-840AN CD-R drive.
PR:		usb/81073
Submitted by:	James E. Flemer <jflemer@alum.rpi.edu>
MFC after:	3 days
2006-10-07 20:08:37 +00:00
flz
1466573db4 Add a USB quirk for CMOTECH CDMA USB modem.
PR:		usb/97948
Submitted by:	Alexei Volkov <kot@kotzone.ru>
MFC after:	3 days
2006-10-07 19:42:45 +00:00
flz
1a1ef9b9b6 Add a USB quirk for Motorola A41x/V32x USB phones.
PR:		usb/97512
Submitted by:	Mark Diekhans <markd@kermodei.com>
MFC after:	3 days
2006-10-07 19:27:53 +00:00
flz
1d55490221 Add a SCSI da(4) quirk for Rekam USB Camera.
PR:		usb/98713
Submitted by:	Alex <goo@t72.ru>
MFC after:	3 days
2006-10-07 19:04:23 +00:00
flz
354e5b83f7 Add SCSI da(4) quirk for the iRiver H10.
PR:		usb/102547
Submitted by:	Sven Esbjerg <freebsd-pr@xbsd.net>
MFC after:	3 days
2006-10-07 18:28:55 +00:00
flz
e55861767d Add support for Novatech NV902 wireless NIC in ural(4).
PR:		usb/102852
Submitted by:	Jonathan Fosburgh <jonathan@fosburgh.org>
MFC after:	3 days
2006-10-07 18:18:40 +00:00
flz
c04301e6e1 Add support for Epson Stylus CX4200 in uscanner(4).
PR:		usb/102851
Submitted by:	Jonathan Fosburgh <jonathan@fosburgh.org>
MFC after:	3 days
2006-10-07 18:09:27 +00:00
flz
4be9e0e86e Add support for Psion Gold Port Ethernet USB NIC.
PR:		usb/102296
Submitted by:	Volker <volker@vwsoft.com>
MFC after:	3 days
2006-10-07 18:03:39 +00:00
flz
047eefd144 Add support for Netgear FA101 ethernet USB NIC.
PR:		usb/102286
Submitted by:	Volker <volker@vwsoft.com>
MFC after:	3 days
2006-10-07 17:58:50 +00:00
flz
d058f4a656 Add a quirk for the Belkin FC6550-AVR UPS.
PR:		usb/102260
Submitted by:	David Grochowski <grocho98@students.rowan.edu>
MFC after:	3 days
2006-10-07 17:47:16 +00:00
flz
14cf6c1266 Add support for Familiar Linux powered iPaq handhelds to cdce(4).
PR:		usb/103865
Submitted by:	Alexey Roslyakov <internetworking@mail.ru>
MFC after:	3 days
2006-10-07 17:35:37 +00:00
flz
47b4c75258 Add quirk for Logitech iFeel MouseMan USB mouse.
PR:		usb/101066
Submitted by:	Heiko Przybyl <zuxez@uni.de>
MFC after:	3 days
2006-10-07 17:16:48 +00:00
flz
d315543cc4 - Add support for Epson USB Scanners (3590 [1] and 4990 [2]).
- Add entries in the uscanner.4 man page (along with missing 3500).

PR:		usb/100957 [1], usb/100992 [2]
Submitted by:	Jim Teresco <terescoj@teresco.org> [1],
		Walter C. Pelissero <walter.pelissero@iesy.net> [2]
MFC after:	3 days
2006-10-07 16:00:59 +00:00
pav
2c9c02b81b - Update URL of Intel documentation
Submitted by:	Rob <spamrefuse@yahoo.com> on freebsd-doc
MFC after:	3 days
2006-10-07 10:39:34 +00:00
bz
af0ae0b158 Set scope on MC address so IPv6 carp advertisement will not get dropped
in ip6_output. In case this fails  handle the error directly and log it[1].
In addition permit CARP over v6 in ip_fw2.

PR:                     kern/98622
Similar patch by:       suz
Discussed with:         glebius [1]
Tested by:              Paul.Dekkers surfnet.nl, Philippe.Pegon crc.u-strasbg.fr
MFC after:              3 days
2006-10-07 10:19:58 +00:00
jmg
11508cc344 fix fxp so that it will reset the link when you change the speed... This
will fix a problem where you boot w/ the default of autoselect, but then
set the speed to 100/full, the switch will keep the autoselect/100/full
negotiation...  This will continue to work till someone resets the switch
or unplugs the cable resulting in the switch failing to autoneg and falling
back to 100/half, causing a hard to track down duplex mismatch..

Submitted by:	nCircle Network Security, Inc.
MFC after:	1 week
2006-10-06 20:53:01 +00:00
marcel
a0da43241f Include freebsd32_signal.h now that signal-related definitions are
moved there.

Found by: ia64 tinderbox.
2006-10-06 19:33:44 +00:00
ariff
98b999adca - Fix wrong id for ALC882, add ALC883 id.
- Add support for the Conexant Waikiki/CX20551-22, found
  in most Toshiba P100 series laptops. Despite of growing
  urban legend of "unsupported Conexant", this codec is fully
  supported in this driver.
  Note: Toshiba P100 has broken (acpi) BIOS, thus rendering
        its soundchip useless. Please disable ACPI, or get
        BIOS updates (if any).

  Found/tested by: Vulpes Velox <v.velox@vvelox.net>
  URL: http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-September/004896.html

- Parser cleanups to handle possible oss/mixer collision. Found
  after parsing Conexant Waikiki nodes.

- Increase resilient against resource failure during attach/detach.

- Implement simple config through hint.pcm.<unit>.config. Supported
  options:
    gpio0 (default on Acer), gpio1, gpio2, softpcmvol,
    fixedrate (default), forcestereo (default)
  * Option prefixed with "no" (such as "nofixedrate") will do
    the opposite.
  * Options can be separated using space " " or comma ",".
  * The "no" option will take precedence over anything else.
  Example:
    hint.pcm.0.config="gpio2,nofixedrate,noforcestereo,nogpio0,softpcmvol"
    hint.pcm.0.config="softpcmvol noforcestereo"
2006-10-06 18:59:27 +00:00
ru
c29a0764f4 Actually make bounds checking for PCIOCREAD and PCIOCWRITE work. 2006-10-06 14:31:32 +00:00
ru
ec61c3c64a Added the GEOM_CACHE option.
Reminded by:	pjd
2006-10-06 10:43:42 +00:00
ru
f53bc81fe1 A GEOM cache can speed up read performance by sending fixed size
read requests to its consumer.  It has been developed to address
the problem of a horrible read performance of a 64k blocksize FS
residing on a RAID3 array with 8 data components, where a single
disk component would only get 8k read requests, thus effectively
killing disk performance under high load.  Documentation will be
provided later.  I'd like to thank Vsevolod Lobko for his bright
ideas, and Pawel Jakub Dawidek for helping me fix the nasty bug.
2006-10-06 08:27:07 +00:00
davidxu
209fbeff01 Regenerate. 2006-10-06 08:24:37 +00:00
davidxu
c5bda619e9 Implement 32bit umtx_lock and umtx_unlock system calls, these two system
calls are not used by libthr in RELENG_6 and HEAD, it is only used by
the libthr in RELENG-5, the _umtx_op system call can do more incremental
dirty works than these two system calls without having to introduce new
system calls or throw away old system calls when things are going on.
2006-10-06 08:22:08 +00:00
simon
440a3866d6 - Remove SCHED_ULE from GENERIC to better avoid foot-shooting by
unsuspecting users.
- Add a comment in NOTES about experimental status of SCHED_ULE.
- Make warning about experimental status in sched_ule(4) a bit
  stronger.

Suggested and reviewed by:	dougb
Discussed on:			developers
MFC after:			3 days
2006-10-05 20:31:58 +00:00
jhb
88140f6436 The IPMI spec is ambiguous (or rather, it contradicts itself) about whether
or not the OS has to wait for RX_RDY or TX_RDY to be set before the OS sets
the control code in the control/status register.  Looking at the interface
design, it seems that RX_RDY and TX_RDY are probably there to protect
access to the data register and have nothing to do with the control/status
register.  Nevertheless, try to take what I think is the more conservative
approach and always wait for the appropriate [TR]X_RDY flag to be set
before writing any of the WR_NEXT, WR_END, RD_START, or RD_NEXT control
codes to the control/status register.
2006-10-05 15:38:59 +00:00
jhb
4131837d35 Add detailed debugging printf's for SMIC under SMIC_DEBUG. 2006-10-05 15:35:11 +00:00
jhb
d68a9f2714 Oops, don't toss the last character read during an SMIC transaction with
at least 1 data byte beyond the completion code.

Tested by:	Terry Kennedy <terry at tmk dot com>
2006-10-05 15:33:43 +00:00
jhb
f576e0540b - Fix a couple of improper uses of leal in the previous space saving
commits.  For some reason I thought the scale factor was a shift count
  rather than the multiplicand (that is, I thought leal (%eax,%edx,4) was
  going to generate %eax + %edx << 4 rather than %eax + %edx * 4).  What
  I need is to multiply by 16 to convert a real-mode (seg, offset) tuple
  into a flat address.  However, the max multiplicand for scaled/index
  addressing on i386 is 8, so go back to using a shl and an add.
- Convert two more inter-register mov instructions where we don't need to
  preserve the source register to xchg instructions to keep our space
  savings.

Tested by:	Ian FREISLICH if at hetzner.co.za
MFC after:	1 week
2006-10-05 15:30:51 +00:00
oleg
60fe2e7137 Workaround bad locking design:
do not try to lock/unlock destroyed/non-existsing mutex.

PR:		kern/103569
Reviewed by:	guido
Approved by:	glebius (mentor)
Silence from:	darrenr
MFC:		2 week
2006-10-05 09:48:25 +00:00
maxim
1e121f2849 o Add Adaptec ServeRAID 7x IDs. IDs taken from Linux.
PR:		kern/90012
Submitted by:	Andrey V. Elsukov
MFC after:	1 month
2006-10-05 07:28:43 +00:00
kmacy
254e1d0b6b placate Grim Reaper with sun4v support 2006-10-05 06:14:28 +00:00
grehan
cb2fdfacbd Catch up with recent clock modifications:
- include <sys/clock.h> for inittodr prototype
 - remove now-conflicting SECDAY definition that is in <sys/clock.h>
2006-10-05 06:04:44 +00:00
davidxu
9c4d7bfd2b Regenerate. 2006-10-05 01:58:57 +00:00
davidxu
ba1205dedf Oops, add the missing file. 2006-10-05 01:58:08 +00:00
davidxu
0fa66af83d Move some declaration of 32-bit signal structures into file
freebsd32-signal.h, implement sigtimedwait and sigwaitinfo system calls.
2006-10-05 01:56:11 +00:00
jb
bf543444cf PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
Security:
Move the relocation definitions to the common elf header so that DTrace
can use them on one architecture targeted to a different one.

Add the additional ELF types defines in Sun's "Linker and Libraries"
manual.
2006-10-04 21:37:10 +00:00
glebius
c0d4b0e19f Save space on stack moving token ring stuff to its own hack block. 2006-10-04 11:08:14 +00:00
glebius
ce5c7dcc2b Style rev. 1.152. 2006-10-04 10:59:21 +00:00
jb
36c5519c1a This file is the same as the one installed in /usr/include, however
there are enough places in the DTrace kernel/module sources that
having a header that gathers together all the individual elf headers
is convenient.

Note that the Solaris compatibility definions are conditionally
included iff _SOLARIS_C_SOURCE is defined.
2006-10-04 07:23:31 +00:00
jb
b936f3f4eb ELF compatibility definitions for OpenSolaris. These are covered
by Sun's CDDL and this file is only intended for inclusion where
_SOLARIS_C_SOURCE is defined (with the assumption that the code
being compiled is licensed under the CDDL too).
2006-10-04 07:19:39 +00:00
mbr
7d21b9894a Back out part of rev. 1.149. While adding a workaround in ptcopen() to
avoid leaked ptys works fine, this opens a possible security hole.

Submitted by:	bde
MFC after:	3 days
2006-10-04 05:43:39 +00:00
rwatson
dafc0585f0 Regenerate. 2006-10-03 20:48:11 +00:00
rwatson
087fd8d723 Change getpagesize() system call audit event to more clearly indicate
that we don't audit it.

MFC after:	3 days
Obtained from:	TrustedBSD Project
2006-10-03 20:48:03 +00:00
rwatson
b54cd1fd3c Audit creat() system call (compat code), and change type for getpagesize(),
which isn't actually being audited anyway.

MFC after:	3 days
Obtained from:	TrustedBSD Project
2006-10-03 20:46:52 +00:00
rwatson
b648628439 Add BSM conversion switch entries for a number of system calls, many
administrative, to prevent console warnings and enable basic event
auditing (generally without arguments).

MFC after:	3 days
Obtained from:	TrustedBSD Project
2006-10-03 20:43:48 +00:00
kib
38b2c3b26f Fix the remaining race in the revs. 1.232, 1,233 that could occur during
unmount when mp structure is reused while waiting for coveredvp lock.
Introduce struct mount generation count, increment it on each reuse and
compare the generations before and after obtaining the coveredvp lock.

Reviewed by:	tegge, pjd
Approved by:	pjd (mentor)
MFC after:	2 weeks
2006-10-03 10:47:04 +00:00
glebius
b2a6f9f628 Remove 3Com 985 deviceid that is really ti(4).
Submitted by:	erwin
2006-10-03 09:31:49 +00:00
iedowse
d74ccdf4fe Fix compile in non-debug case. 2006-10-03 08:38:08 +00:00
imp
97eacfa4a1 aic_pccard_products can be static.
Noticed by: cscope
2006-10-03 04:51:18 +00:00
jb
81fff2da0b Solaris compatibility only: Be specific about the fact that
the inline function takes no arguments.
2006-10-03 04:01:30 +00:00
iedowse
46a11df83f When changing the device address and max packet size in usbd_new_device(),
close and re-open the default pipe instead of relying on the host
controller driver to notice the changes. Remove the unreliable code
that attempted to update these fields while the pipe was active.
This fixes a case where the hardware could cache and continue to
use the old address, resulting in a "getting first desc failed"
error.

PR:		usb/103167
2006-10-03 01:13:26 +00:00
iedowse
2698dd58d9 Don't attempt to insert the transfer in an error case where it has
already been inserted.
2006-10-03 01:04:11 +00:00
ariff
c41681030d Backout remaining changes that make most AD1981B users unhappy.
The exact situation is understood, and proper solution will follow
sooner.
2006-10-02 20:46:34 +00:00
jhay
8c3f4d74b0 Hopefully the last tweak in trying to make it possible to add ipv6 direct
host routes without side effects.

Submitted by:	JINMEI Tatuya
MFC after:	4 days
2006-10-02 19:15:10 +00:00
phk
638e020bc6 Use utc_offset() where applicable, and hide the internals of it
as static variables.
2006-10-02 18:23:37 +00:00
jhb
5d888a0655 Trim trailing whitespace. 2006-10-02 18:16:29 +00:00
jhb
c6ef2daf02 Update description of td_locks.
MFC after: 	3 days
Requested by:	pjd
2006-10-02 17:48:13 +00:00
phk
f245b890e0 Use calendrical calculations from subr_clock.c instead of home-rolled. 2006-10-02 16:32:36 +00:00
ariff
279f0f0d02 - Streamline quirks management for a better future.
- Fix support for ASUS M5200ae (buggy BIOS)
- Fix few problems, reported by Coverity Prevent (TM).

CID:		246991, 246676, 246675, 246674, 246477
Found by:	Coverity Prevent (TM)
2006-10-02 16:30:04 +00:00
phk
cb60338223 Use Calendrical Calculations from subr_clock.c instead of home copy&pasted. 2006-10-02 16:21:16 +00:00
phk
96a07a01fd Use calendaric calculation support from subr_clock.c instead of home-rolled.
Eventually, this RTC should probably use subr_rtc.c as well
2006-10-02 16:18:40 +00:00
phk
52fd275504 Introduce utc_offset() to capture a calculation currently done all over the
place.
2006-10-02 16:17:23 +00:00
phk
3c8ce106f3 remove orphaned sysctl_machdep_adjkerntz() 2006-10-02 16:08:20 +00:00
phk
7a874f961d Move tz_minuteswest and tz_dsttime to subr_clock.c 2006-10-02 16:06:26 +00:00
ru
b60fe62d99 Ignore the UKBD_DFLT_KEYMAP option when compiling as a module.
The parallel LINT build sometimes broke if kernel-depend wasn't
fast enough in generating ukbdmap.h.  If someone thinks this
option would still be useful for the module, a proper fix is
to add the code generating ukbdmap.h into modules/ukbd/Makefile
and backing this change out.
2006-10-02 16:02:41 +00:00
phk
84cc0f277f Second part of a little cleanup in the calendar/timezone/RTC handling.
Split subr_clock.c in two parts (by repo-copy):
   subr_clock.c contains generic RTC and calendaric stuff. etc.
   subr_rtc.c contains the newbus'ified RTC interface.

Centralize the machdep.{adjkerntz,disable_rtc_set,wall_cmos_clock}
sysctls and associated variables into subr_clock.c.  They are
not machine dependent and we have generic code that relies on being
present so they are not even optional.
2006-10-02 15:42:02 +00:00
ariff
81bdd4b329 Disable ad1981_patch for now until the real solution can be found
and makes everybody happy.
2006-10-02 15:32:12 +00:00