Commit Graph

92946 Commits

Author SHA1 Message Date
Eitan Adler
b213939ba6 Make temp, temp1 the same type that they will later be used for.
PR:		kern/176712
Submitted by:	Hiren Panchasara <hiren.panchasara@gmail.com>
Reviewed by:	jmg (earlier version)
Approved by:	cperciva (mentor)
2013-04-23 13:02:51 +00:00
Eitan Adler
512515147b Remove tautological compare.
PR:		kern/176712
Submitted by:	Hiren Panchasara <hiren.panchasara@gmail.com>
Approved by:	cperciva (mentor)
2013-04-23 13:02:48 +00:00
Hans Petter Selasky
455a367f95 Add support for runtime switching of sample rate for
USB audio devices. Previously the highest sample
rate was unconditionally selected.

Requested by:	Craig Leres <leres@ee.lbl.gov>
2013-04-23 10:48:14 +00:00
Hans Petter Selasky
751aaf5a93 Add convenience wrapper functions to run callbacks in the context of the
USB explore thread.
2013-04-23 10:42:15 +00:00
Warner Losh
0cc59c05a3 Add an option for the GE FES based packet engines. Its board IDs
overlap with the standard ones, so kernels for this family of boards
need the option OCTEON_VENDOR_GEFES.
2013-04-23 09:40:42 +00:00
Warner Losh
f97ccd1a35 Update trapframe to be consistent with the changes made to regnum.h. This
should fix the booting problems people have been seeing.
2013-04-23 09:38:18 +00:00
Martin Matuska
90eafc0bb8 The zfs synctask code restructuring introduced a new bug that makes it
impossible to set quota and reservation on pools lower than version 22.
Problem has been reported and a solution discussed with vendor.

Illumos ZFS issues:
  3739 cannot set zfs quota or reservation on pool version < 22

Reviewed by:	Matthew Ahrens <mahrens@delphix.com>
Reported by:	Steve Wills <swills@FreeBSD.org>
MFC after:	3 days
2013-04-23 06:28:35 +00:00
Hans Petter Selasky
0cfbd57ebc Add descriptive comment. 2013-04-23 06:26:54 +00:00
Brooks Davis
2d60c24f70 MFP4 223084, 227821:
Partially implement generic_bs_*_8() for MIPS platforms.

This is known to work with TARGET_ARCH=mips64 with FreeBSD/BERI.
Assuming that other definitions in cpufunc.h are correct it will
work on non-o64 ABI systems except sibyte. On sibyte and o32 systems
generic_bs_*_8() will remain panic() implementations.

Sponsored by:	DARPA, AFRL
Reviewed by:	imp, jmallett (older versions)
2013-04-22 19:02:37 +00:00
Adrian Chadd
03d48af292 Update arswitch to the new API. 2013-04-22 18:58:12 +00:00
Oleksandr Tymoshenko
833addedf8 Split BeagleBone DTS to generic AM335x part and Beagle-bone specific 2013-04-22 18:53:36 +00:00
John Baldwin
60d306f035 - Some BIOSes use an Extended IRQ resource descriptor in _PRS for a link
that uses non-ISA IRQs but use a plain IRQ resource in _CRS.  However,
  a non-ISA IRQ can't fit into a plain IRQ resource.  If we encounter a
  link like this, build the resource buffer from _PRS instead of _CRS.
- Set the correct size of the end tag in a resource buffer.

Tested by:	Benjamin Lee <ben@b1c1l1.com>
MFC after:	2 weeks
2013-04-22 15:51:06 +00:00
Yoshihiro Takahashi
3280345272 Build uart_dev_lpc.c on arm only. This fixes pc98 build. 2013-04-22 13:02:41 +00:00
Gleb Smirnoff
08a3102c0b Panic if UMA_ZONE_PCPU is created at early stages of boot, when mp_ncpus
isn't yet initialized. Otherwise we will panic at first allocation later.

Sponsored by:	Nginx, Inc.
2013-04-22 09:02:23 +00:00
Damjan Marion
10443bc3c3 Initialize GIC_PMRR register on ARM GIC.
Provided by: Thomas Skibo
2013-04-22 08:28:53 +00:00
Adrian Chadd
a321935999 Convert over the etherswitch framework to use VLAN IDs per port, rather
than VLAN groups.

Some chips (eg this rtl8366rb) has a VLAN group per port - you first
define a set of VLANs in a vlan group, then you assign a VLAN group
to a port.

Other chips (eg the AR8xxx switch chips) have a VLAN ID array per
port - there's no group per se, just a list of vlans that can be
configured.

So for now, the switch API will use the latter and rely on drivers
doing the heavy lifting if one wishes to use the VLAN group method.
Maybe later on both can be supported.

PR:		kern/177878
PR:		kern/177873
Submitted by:	Luiz Otavio O Souza <loos.br@gmail.com>
Reviewed by:	ray
2013-04-22 05:52:18 +00:00
Alan Cox
384875a3a6 Simplify vm_radix_{add,dec}lev().
Sponsored by:	EMC / Isilon Storage Division
2013-04-22 01:26:13 +00:00
Oleg Bulyzhin
1571132f14 Plug static llentry leak (ipv4 & ipv6 were affected).
PR:		kern/172985
MFC after:	1 month
2013-04-21 21:28:38 +00:00
Hans Petter Selasky
d81b160aa5 Add OHCI controller ID.
MFC after:	2 weeks
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
2013-04-21 16:02:50 +00:00
Tijl Coosemans
c67f5b54d9 Remove redundant definitions of _ALIGN and _ALIGNBYTES. 2013-04-21 11:12:44 +00:00
Andrey V. Elsukov
584a9cf8bf Since we didn't break the loop, we should set i to -1 to start from the
beginning.

Submitted by:	Steven Hartland
MFC after:	1 week
2013-04-21 09:10:35 +00:00
Rui Paulo
4885497dc1 Fix an off by one calculation in wiipic_dispatch(). 2013-04-21 08:35:38 +00:00
Adrian Chadd
3527f6a9b1 When doing BAW tracking, don't dereference a NULL pointer if the BAW
slot is actually NULL.
2013-04-21 00:41:15 +00:00
Adrian Chadd
dff5bdf48c There's some races (likely in the BAR handling, sigh) which is causing
the pause/resume code to not be called completely symmetrically.

I'll chase down the root cause of that soon; this at least works around
the bug and tells me when it happens.
2013-04-20 22:46:31 +00:00
Kenneth D. Merry
e1ee2f21d9 Fix compilation.
Pointy hat to:	ken
2013-04-20 14:33:55 +00:00
Sean Bruno
6b156f6137 Expose CAM_BOOT_DELAY as a kernel conf item now.
This allows users who boot without loader to adjust their environments
around slightly buggy or slow hardware.

PR:	kern/161809
Submitted by:	rozhuk.im@gmail.com
MFC after:	2 weeks
2013-04-20 00:33:37 +00:00
Jung-uk Kim
895f26a936 Merge ACPICA 20130418. 2013-04-19 23:49:34 +00:00
Adrian Chadd
ff5b563430 Initialise the chainmask fields regardless of whether 11n support
is compiled in or not.

This fixes issues with people running -HEAD but who build modules
without doing a "make buildkernel KERNCONF=XXX", thus picking up
opt_*.h.  The resulting module wouldn't have 11n enabled and the
chainmask configuration would just be plain wrong.
2013-04-19 21:49:11 +00:00
Luigi Rizzo
2579e2d715 mostly whitespace changes:
- remove vestiges of the old memory allocator
- clean up some comments
2013-04-19 21:08:21 +00:00
Kenneth D. Merry
21b6ee96fc Update chio(1) and ch(4) to support reporting element designators.
This allows mapping a tape drive in a changer (as reported by
'chio status') to a sa(4) driver instance by comparing the
serial numbers.

The designators can be ASCII (which is printed out directly), binary
(which is printed in hex format) or UTF-8, which is printed in either
native UTF-8 format if the terminal can support it, or in %XX notation
for non-ASCII characters.  Thanks to Hiroki Sato <hrs@> for the
explaining UTF-8 printing and example UTF-8 printing code.

chio.h:		Modify the changer_element_status structure to add new
		fields and definitions from the SMC3r16 spec.

		Rename the original CHIOGSTATUS ioctl to OCHIOGTATUS and
		define a new CHIOGSTATUS ioctl.

		Clean up some tab/space issues.

chio.c: 	For the 'status' subcommand, print the designator field
		if it is supplied by a device.

scsi_ch.h:	Add new flags for DVCID and CURDATA to the READ
		ELEMENT STATUS command structure.

		Add a read_element_status_device_id structure
		for the data fields in the new standard. Add new
		unions, dt_or_obsolete and voltage_devid, to hold
		and address data from either SCSI-2 or newer devices.

scsi_ch.c:	Implement support for fetching device IDs with READ
		ELEMENT STATUS data.

		Add new arguments to scsi_read_element_status() to
		allow the user to request the DVCID and CURDATA bits.
		This isn't compiled into libcam (it's only an internal
		kernel interface), so we don't need any special
		handling for the API change.

		If the user issues the new CHIOGSTATUS ioctl, copy all of
		the available element status data out.  If he issues the
		OCHIOGSTATUS ioctl, we don't copy the new fields in the
		structure.

		Fix a bug in chopen() that would result in the peripheral
		never getting unheld if chgetparams() failed.

Sponsored by:	Spectra Logic
Submitted by:	Po-Li Soong
MFC After:	1 week
2013-04-19 20:03:51 +00:00
Adrian Chadd
7b796c4039 Implement a very basic multi-PHY aware switch device.
This is intended to be used as a stop-gap for switch devices
which expose multiple ethernet PHYs but we don't have a driver
for - here, etherswitchcfg and the general switch configuration
API can be used to interface to said PHYs.

Submitted by:	Luiz Otavio O Souza <loos.br@gmail.com>
2013-04-19 17:50:38 +00:00
Jaakko Heinonen
a208417c41 Include PID in the error message which is printed when the maxproc limit
is exceeded. Improve formatting of the message while here.

PR:		kern/60550
Submitted by:	Lowell Gilbert, bde
2013-04-19 15:19:29 +00:00
Gleb Smirnoff
14658a80fe Don't compare unsigned socklen_t against < 0.
Reviewed by:	jhb
2013-04-19 13:40:13 +00:00
Jilles Tjoelker
1e367efa8b sem: Restart the POSIX sem_* calls after signals with SA_RESTART set.
Programs often do not expect an [EINTR] return from sem_wait() and POSIX
only allows it if the signal was installed without SA_RESTART. The timeout
in sem_timedwait() is absolute so it can be restarted normally.

The umtx call can be invoked with a relative timeout and in that case
[ERESTART] must be changed to [EINTR]. However, libc does not do this.

The old POSIX semaphore implementation did this correctly (before r249566),
unlike the new umtx one.

It may be desirable to avoid [EINTR] completely, which matches the pthread
functions and is explicitly permitted by POSIX. However, the kernel must
return [EINTR] at least for signals with SA_RESTART clear, otherwise pthread
cancellation will not abort a semaphore wait. In this commit, only restore
the 8.x behaviour which is also permitted by POSIX.

Discussed with:	jhb
MFC after:	1 week
2013-04-19 10:16:00 +00:00
Adrian Chadd
7904f51655 Add a debug statement to log the currently chosen chainmask configuration. 2013-04-19 08:06:45 +00:00
Adrian Chadd
b0bf95ff15 .. don't know how this snuck into this commit. Sorry.
Fix compile build before anyone notices.
2013-04-19 08:01:34 +00:00
Adrian Chadd
b661bd2e52 Print out the chainmask configuration. 2013-04-19 07:56:22 +00:00
Adrian Chadd
6f4fb2d8e6 Use uint32_t for fields that are fetched via ath_hal_getcapability(). 2013-04-19 06:59:10 +00:00
Justin Hibbits
6ba2699056 Fix the uart(4) module build. Without uart_dev_lpc the module cannot be loaded. 2013-04-19 05:46:16 +00:00
Andrey A. Chernov
2b50ce65be Attempt to mitigate poor initialization of arc4 by one-shot
reinitialization from yarrow right after good entropy is harvested.

Approved by:    secteam (delphij)
MFC after:      1 week
2013-04-19 00:30:52 +00:00
Rick Macklem
64a0e848ab When an NFS unmount occurs, once vflush() writes the last dirty
buffer for the last vnode on the mount back to the server, it
returns. At that point, the code continues with the unmount,
including freeing up the nfs specific part of the mount structure.
It is possible that an nfsiod thread will try to check for an
empty I/O queue in the nfs specific part of the mount structure
after it has been free'd by the unmount. This patch avoids this problem by
setting the iodmount entries for the mount back to NULL while holding the
mutex in the unmount and checking the appropriate entry is non-NULL after
acquiring the mutex in the nfsiod thread.

Reported and tested by:	pho
Reviewed by:	kib
MFC after:	2 weeks
2013-04-18 23:20:16 +00:00
Navdeep Parhar
3cc7ae06fd cxgbe(4): Refuse to install T5 firmwares on a T4 card (and vice versa).
MFC after:	1 week
2013-04-18 22:54:41 +00:00
Oleg Bulyzhin
2c5b403e2d Recover missing arp_ifinit() call.
MFC after:	2 weeks
2013-04-18 20:13:33 +00:00
Navdeep Parhar
dd181b2652 cxgbe/tom: Update the CLIP table on the chip when there are changes
to the list of IPv6 addresses on the system.  The table is used for
TOE+IPv6 only.
2013-04-18 19:52:11 +00:00
Alexander Motin
b2c63698d4 Introduce kern.timecounter.smp_tsc_adjust tunable (disabled by default) and
respective functionality, allowing to synchronize TSC on APs to match BSP's
during boot.  It may be unsafe in general case due to theoretical chance of
later drift if CPUs are using different clock rate or source, but it allows
to use TSC in some cases when difference caused by some initialization bug,
while TSCs are known to increment synchronously.

Reviewed by:	jimharris, kib
MFC after:	1 month
2013-04-18 17:07:04 +00:00
Rick Macklem
175b3f31d3 Both NFS clients can deadlock when using the "rdirplus" mount
option. This can occur when an nfsiod thread that already holds
a buffer lock attempts to acquire a vnode lock on an entry in
the directory (a LOR) when another thread holding the vnode lock
is waiting on an nfsiod thread. This patch avoids the deadlock by disabling
readahead for this case, so the nfsiod threads never do readdirplus.
Since readaheads for directories need the directory offset cookie
from the previous read, they cannot normally happen in parallel.
As such, testing by jhb@ and myself didn't find any performance
degredation when this patch is applied. If there is a case where
this results in a significant performance degradation, mounting
without the "rdirplus" option can be done to re-enable readahead
for directories.

Reported and tested by:	jhb
Reviewed by:	jhb
MFC after:	2 weeks
2013-04-18 13:09:04 +00:00
Alexander Motin
ca11419237 Make siis(4) and mvs(4) send bus_get_dma_tag() requests to parent buses
passing real bus' child pointers instead of grandchilds.

Requested by:	kib
2013-04-18 12:43:06 +00:00
Rui Paulo
5dfae12246 Move the previously added CPUID7 macros to CPUID_STDEXT. 2013-04-18 07:09:27 +00:00
Alan Cox
880659fe81 When calculating the number of reserved nodes, discount the pages that will
be used to store the nodes.

Sponsored by:	EMC / Isilon Storage Division
2013-04-18 05:34:33 +00:00
Rui Paulo
ba5f77bf16 Add the most current CPUID7_* definitions. 2013-04-18 01:30:08 +00:00