Commit Graph

74635 Commits

Author SHA1 Message Date
Bjoern A. Zeeb
d97bee3e7e Unconditionally call the setsockopt for IPV6_V6ONLY for v6 linux sockets
no matter whether we are compiled as module or if our default of the
net.inet6.ip6.v6only sysctl already matches what we would set.

This avoids unnecessary complications with modules, VIMAGES, INET6 and
the sysctl value, especially considering that most users will use
linux compat as a module.

Discussed with:	kib, rwatson (weeks ago)
Reviewed by:	rwatson
MFC after:	6 weeks
2009-10-25 09:58:56 +00:00
Rui Paulo
f91c218bf8 Output a comment on top of each generated file explaining where it came
from.
2009-10-25 09:48:21 +00:00
Joseph Koshy
16d95d4f92 Inform hwpmc(4) of a thread's impending demise prior to invoking sched_throw().
Debugging help:		fabient
Review and testing by:	fabient
2009-10-25 04:34:47 +00:00
Alan Cox
a0c703bf21 Update a comment to reflect the previous change. 2009-10-25 02:48:29 +00:00
Marcel Moolenaar
59085a35e8 Add PRINTF_BUFR_SIZE=128, since we have SMP by default.
While here, fix tabulation.
2009-10-24 20:35:34 +00:00
Marcel Moolenaar
b475d22d67 A 32KB kernel stack is not quite enough. The new USB stack is a bit
more stack hungry as compared to the old one that my RX2660 gets
a machine check and spontaneously reboots at the time the USB DVD
drive is found and attached to CAM as a mass storage device. This
doesn't happen always, but definitely varies per kernel build.
Likewise when using a 128-byte printf buffer. The additional 128
bytes that printf needs seems to be enough to have the memory stack
and register stack collide and causing a machine check.

Thus: Bump KSTACK_PAGES from 4 to 5.
2009-10-24 20:28:42 +00:00
Ruslan Ermilov
4d9d1e823c - Rename tunable kern.ipc.shmmaxpgs to kern.ipc.shmall.
- Explain the fuss when initializing shmmax.

PR:	75542 (mistakenly closed instead of PR 75541)
2009-10-24 19:00:58 +00:00
Ruslan Ermilov
90147b7506 Spell DIAGNOSTIC correctly. 2009-10-24 18:49:17 +00:00
Nathan Whitehorn
570d2b25a6 Turn on NAP mode on G5 systems, and refactor the HID0 setup code a little.
This makes my G5 Xserve sound slightly less like it is filled with
howling banshees.
2009-10-24 18:33:01 +00:00
Nathan Whitehorn
37a7f59644 Allow Heathrow-based machines to boot a kernel containing option SMP
without panicing.
2009-10-24 18:31:22 +00:00
Rui Paulo
e7e0fcbea8 Updates to the iwn driver:
* iwnfw has now been split into individual modules so autoloading of
  firmware module(s) does work again.
* Changes have been made to RUN -> AUTH transition, this should fix the
  issue reported by Glen and others.
* Brandon reported issues in iwn_cmd() with large commands, those have
  been fixed to.
* DEAUTH is now handled correctly.

Submitted by:	Bernhard Schmidt <bschmidt at techwires.net>
2009-10-24 09:55:11 +00:00
Robert Watson
99b96cf934 Correct spelling typo in ip_input comment.
Pointed out by:	N.J. Mann <njm at njm.me.uk>,
		John Nielsen <john at jnielsen.net>, julian (!), lstewart
MFC after:	2 days
2009-10-24 09:18:26 +00:00
Joseph Koshy
27be5d5888 Only claim that the PMC_CLASS_IAF PMCs are supported by a CPU if
there are PMCs on the CPU that belong to the class.

Review and testing by:	fabient
2009-10-24 01:58:10 +00:00
Marcel Moolenaar
d6eb44c8b0 BIOSes, buggy or otherwise, are i386 or amd64 specific.
Have the early USB takeover enabled for i386 and amd64
by default.
This also avoids a panic on PowerPC where the resource
isn't released properly and we find a busy resource
when the USB host controller wants to allocate it...
2009-10-23 22:53:01 +00:00
Rui Paulo
8f30200753 Updated iwn(4) driver supporting the newer series, 5000, 5150 and 5300.
Submitted by:	Bernhard Schmidt <bschmidt at techwires.net>
2009-10-23 22:04:18 +00:00
Nathan Whitehorn
4c1826ad5d Remove debugging printf that snuck in here.
Pointy hat to:	me
2009-10-23 21:44:46 +00:00
Nathan Whitehorn
dab90f68ed Add some more paranoia to setting HID registers, and update the AIM
clock routines to work better with SMP. This makes SMP work fully and
stably on an Xserve G5.

Obtained from:	Book-E (clock bits)
2009-10-23 21:36:33 +00:00
Alexander Motin
27acd6ea1f Reimplement device reset sequence in more controller-specific way. 2009-10-23 21:33:26 +00:00
Jung-uk Kim
9871fde43f Remove a redundant byte swapping in the previous commit. 2009-10-23 19:02:53 +00:00
Jung-uk Kim
1d9fd1477c Try hiding annoying text cursor after the video controller is reset. 2009-10-23 18:57:52 +00:00
Jung-uk Kim
974f3534c0 Search for default 800x600 graphics mode from supported VESA mode list.
Many video controllers do not support 800x600x24 mode any more.
2009-10-23 18:53:21 +00:00
Robert Noland
14c436e101 Correct some issues with zfs boot.
- Teach it to read gang blocks. (essentially untested)
   If you see "ZFS: gang block detected!", please let
   me know, so we can either remove the printf if it
   works, or fix it if it doesn't.

 - If multiple partitions exist on a disk, probe them all.
   We also need to reset dsk->start to 0 to read the right
   sector here.

 - With GPT, we can have 128 partitions.

 - If the bootfs property has ever been set on a pool
   it seems that it never goes away.  zpool won't allow
   you to add to the pool with the bootfs property set.
   However, if you clear the property back to default
   we end up getting 0 for the object number and read
   a bogus block pointer and fail to boot.

 - Fix some error printfs. The printf in the loader is
   only capable of c,s and u formats.

 - Teach printf how to display %llu

Reviewed by:	dfr, jhb
MFC after:	2 weeks
2009-10-23 18:44:53 +00:00
Jung-uk Kim
a0ce33465f - When we restore VESA state, try BIOS POST earlier. VESA restore state
function may not work properly if we don't.  Turn off hardware cursor as
vesa_set_mode() does.
- Add VBE 3.0 specific fields in VESA mode structure and pack it.  Note
the padding is 190 bytes although VBE 3.0 says 189 bytes.  It must be wrong
because the size of structure becomes 255 bytes and the specification says
it must be 256 bytes in total.  In fact, an example code in the spec. does
it right, though.  While we are at it, fix some i386-isms.
- Remove state buffer size limitation.  It is no longer necessary since
sys/compat/x86bios/x86bios.c r198251.
- Move int 0x10 vector test into vesa_bios_post() as we always do it anyway.
2009-10-23 18:41:00 +00:00
Qing Li
6cb2b4e7a8 Use the correct option name in the preprocessor command to enable
or disable diagnostic messages.

Reviewed by:	ru
MFC after:	3 days
2009-10-23 18:27:34 +00:00
Robert Watson
974e99b008 Remove unneeded blank line from bpf_drvinit().
MFC after:	3 days
2009-10-23 17:26:29 +00:00
John Baldwin
5ca4819ddf - Fix several off-by-one errors when using MAXCOMLEN. The p_comm[] and
td_name[] arrays are actually MAXCOMLEN + 1 in size and a few places that
  created shadow copies of these arrays were just using MAXCOMLEN.
- Prefer using sizeof() of an array type to explicit constants for the
  array length in a few places.
- Ensure that all of p_comm[] and td_name[] is always zero'd during
  execve() to guard against any possible information leaks.  Previously
  trailing garbage in p_comm[] could be leaked to userland in ktrace
  record headers via td_name[].

Reviewed by:	bde
2009-10-23 15:14:54 +00:00
John Baldwin
0deb032554 Style fix. 2009-10-23 15:10:41 +00:00
John Baldwin
4f9d48e478 Don't bother copying the name of a kproc or kthread out into a temporary
array just to pass that array to printf().  kproc and kthread names are
NUL-terminated and can be printed using printf() directly.

Reviewed by:	bde
2009-10-23 15:09:51 +00:00
Alexander Motin
90759b0021 MFp4:
Do not differentiate 12/16 bytes ATAPI CCB formats when it is not needed.
2009-10-23 14:56:29 +00:00
Nathan Whitehorn
e2ee8728ee Do not map the trap vectors into the kernel's address space. They are
only used in real mode and keeping them mapped only serves to make NULL
a valid address, which results in silent NULL pointer deferences.

Suggested by:   Patrick Kerharo
Obtained from:	projects/ppc64
2009-10-23 14:27:40 +00:00
Alexander Motin
0f3e215954 Make "Retrying Command" to be printed before actual retrying.
It should make debug/error log a bit more readable.
2009-10-23 13:39:30 +00:00
Robert Watson
0d3d0d74ea Improve grammar in ip_input comment while attempting to maintain what
might be its meaning.

MFC after:	3 days
2009-10-23 13:35:00 +00:00
John Baldwin
62486e93c4 Properly sort the intr_event_describe_handler() prototype.
Submitted by:	bde
2009-10-23 13:28:33 +00:00
Alexander Motin
c269e21049 Revert interrupt reason check order back.
ATAPI errors may set IF bit together with TFE.
2009-10-23 13:07:22 +00:00
Alexander Motin
65d0fb03ad MFp4:
Move Port Multiplier support code out of ATA XPT into pmp periph driver.
This is convinient, as PMP itself is a bus target and has own state.
2009-10-23 12:36:42 +00:00
Alexander Motin
48f2bfe224 Fix the build. 2009-10-23 11:26:58 +00:00
Rui Paulo
d392e74276 The draft spec doesn't say beacon frames need to have a wildcard BSSID,
so remove the mesh code necessary for that.

MFC after:	2 days
2009-10-23 11:13:08 +00:00
Alexander Motin
bbfa4aa1a6 Replace most of priority numbers with defines. No logical changes. 2009-10-23 08:27:55 +00:00
Alexander Motin
ee64944219 Remove some obsoleted comments. 2009-10-23 07:54:15 +00:00
Nathan Whitehorn
999987e51a Add SMP support on U3-based G5 systems. This does not yet work perfectly:
at least on my Xserve, getting the decrementer and timebase on APs to tick
requires setting up a clock chip over I2C, which is not yet done.

While here, correct the 64-bit tlbie function to set the CPU to 64-bit
mode correctly.

Hardware donated by:	grehan
2009-10-23 03:17:02 +00:00
Alexander Motin
20a7933f53 After thinking again, implement cam_ccbq_fini().
This is effectively NULL change, but makes this API a bit more consistent.
2009-10-22 21:07:32 +00:00
Ed Maste
97aa4d9845 Rename default to default_function, for compatibility with GNU awk.
(For cross-compiling out-of-tree kernel modules, for example.)
2009-10-22 20:57:17 +00:00
Andrew Thompson
4ed0304c97 Allow dumping the USB mouse reports via 'sysctl -b dev.ums.N.parseinfo',
previously only available via bootverbose.

PR:		usb/137191
Submitted by:	Eygene Ryabinkin
2009-10-22 20:54:01 +00:00
Alexander Motin
ab593611be cam_ccbq_fini() declared for 11 years, but never implemented. Remove it. 2009-10-22 20:44:55 +00:00
Rui Paulo
038abe369e Initialize rann_flags properly.
MFC after:	2 days
2009-10-22 17:30:22 +00:00
John Baldwin
3eec6f034a Set the devclass_t pointer specified in the DRIVER_MODULE() macro
sooner so it is always valid when a driver's identify routine is
called.  Previously, new-bus would attempt to create the devclass for
a newly loaded driver in two separate places, once in
devclass_add_driver(), and again after devclass_add_driver() returned
in driver_module_handler().  Only the second lookup attempted to set a
device class' parent and set the devclass_t pointer specified in the
DRIVER_MODULE() macro.  However, by the time it was executed, the
driver was already added to existing instances of the parent driver at
which point in time the new driver's identify routine would have been
invoked.  The fix is to merge the two attempts and only create the
devclass once in devclass_add_driver() including setting the
devclass_t pointer passed to DRIVER_MODULE() before the driver is
added to any existing bus devices.

Reported by:	avg
Reviewed by:	imp
MFC after:	2 weeks
2009-10-22 14:53:44 +00:00
Rui Paulo
bcda02c3e4 Don't use BUS_DMA_ALLOCNOW as that causes the attachment to fail on
Cambria boards.

MFC after:	2 months
2009-10-22 12:48:17 +00:00
Christian Brueffer
ef1be3b042 Check pointer for NULL before dereferencing it, not after.
PR:		138387, 138388
Submitted by:	Patroklos Argyroudis <argp@census-labs.com>
MFC after:	1 week
2009-10-22 06:51:29 +00:00
Christian Brueffer
4382b0681e Check pointer for NULL before dereferencing it, not after.
PR:		138390
Submitted by:	Patroklos Argyroudis <argp@census-labs.com>
MFC after:	1 week
2009-10-22 06:17:04 +00:00
Christian Brueffer
e6fa23b0da Fix a memory leak in an error case.
PR:		138376
Submitted by:	Patroklos Argyroudis <argp@census-labs.com>
Reviewed by:	scottl
MFC after:	1 week
2009-10-22 06:13:07 +00:00