Commit Graph

150120 Commits

Author SHA1 Message Date
Andrew Thompson
9d294893a4 MFC r199060
Improve support for High-speed USB audio devices.
 - fix issues regarding the mixer, where the interface number was not set in
   time.
 - fix wrong use of resolution parameter.

Submitted by:	Hans Petter Selasky
2009-12-09 23:11:27 +00:00
Andrew Thompson
40e55da3d1 MFC r196487
Remove redundant Giant reference. Giant will be dropped
 automatically when the mutex argument is NULL.
2009-12-09 23:10:32 +00:00
Andrew Thompson
c1b5138fc1 MFC r199816
Remove overuse of exclamation marks in kernel printfs, there mere fact a
 message has been printed is enough to get someones attention. Also remove the
 line number for DPRINTF/DPRINTFN, it already prints the funtion name and a
 unique message.
2009-12-09 22:42:40 +00:00
Andrew Thompson
fd29c5e00e MFC r199814
Disable interrupts after doing early takeover of the usb controller in case usb
 isnt actually compiled in (or kldloaded) as the controller could cause spurious
 interrupts.
2009-12-09 22:41:50 +00:00
Andrew Thompson
044745556c MFC r199718
Actually disable interrupts in ehci_detach().
2009-12-09 22:41:11 +00:00
Andrew Thompson
0ae254cb36 MFC r199676
Correct register access for USB device side operation on the musb controller.

Submitted by:	Hans Petter Selasky
2009-12-09 22:40:27 +00:00
Andrew Thompson
c7838bf992 MFC r199675
Provide tunables for some of the usb sysctls that affect boot behaviour.

Submitted by:	Andriy Gapon
2009-12-09 22:39:09 +00:00
Andrew Thompson
4cd01f7750 MFC r199673
Initialise variable before use.

Submitted by:	Hans Petter Selasky
2009-12-09 22:38:02 +00:00
Andrew Thompson
b7167d5d0d MFC r199672
Improve High Speed slot allocation mechanism by moving the computation to the
 endpoint rather than per xfer and provide functions around get/free of resources.

Submitted by:	Hans Petter Selasky
2009-12-09 22:37:06 +00:00
Andrew Thompson
62460f64ff MFC r199062
Correct Olympus quirk.

Submitted by:	Pavel Gubin
2009-12-09 22:36:16 +00:00
Andrew Thompson
2785d01590 MFC r199061
Add missing mtx_destroy().

Submitted by:	Sebastian Huber
2009-12-09 22:35:08 +00:00
Andrew Thompson
1250e0e321 MFC r199059
improve support for high speed isochronous endpoints which does not run 1:1,
 but needs intervalling 1:2, 1:4 or 1:8

Submitted by:	Hans Petter Selasky
2009-12-09 22:34:11 +00:00
Andrew Thompson
653a3d45c4 MFC r199057
ehci_init() will do reset and set the usbrev flag.  Fix problem where
 ehci_reset() was called before ehci_init().

PR:		usb/140242
Submitted by:	Sebastian Huber
2009-12-09 22:33:22 +00:00
Andrew Thompson
2265c34554 MFC r198776
- Add usb_fill_bulk_urb() and usb_bulk_msg() linux compat functions [1]
 - Don't write actual length if the actual length pointer is NULL [2]
 - correct Linux Compatibility error codes for short isochronous IN transfers
   and make status field signed.

Submitted by:	Leunam Elebek [1], Manuel Gebele [2]
2009-12-09 22:32:36 +00:00
Andrew Thompson
975199a5ac MFC r198774
Check unit number and provide string name for consdev.

Submitted by:	HPS
2009-12-09 22:31:45 +00:00
Andrew Thompson
c39d541d9f MFC r197761,r198194,r198862
updates device entries supported with the product name not magic numbers
 and sorts entries.  WUSB54GCV2 is added.

 overhauls urtw(4) for supporting RTL8187B devices properly that there
 was major changes to initialize RF chipset and set H/W registers and
 removed a lot of magic numbers on code.
2009-12-09 22:10:45 +00:00
Nathan Whitehorn
c15901d48b MFC r199949:
Add atp(4) to powerpc GENERIC. Most late-generation Apple PowerPC laptops
have trackpads that do not work at all without this driver.
2009-12-09 21:58:39 +00:00
Nathan Whitehorn
a4ca386425 MFC r199169:
Reduce probe priority of USB input devices to BUS_PROBE_GENERIC from
BUS_PROBE_SPECIFIC. This allows device-specific drivers like atp to
attach reliably.
2009-12-09 21:56:55 +00:00
Andrew Thompson
310ce38f75 MFC r199086,199151,199680,199948,200241
Driver for the Apple Touchpad present on MacBook (non-Pro & Pro).

Submitted by:	Rohit Grover <rgrover1 at gmail.com>
2009-12-09 21:47:42 +00:00
Andrew Thompson
4b56fe67b6 MFC r199575
- fix a transfer cancelling bug/segfault [1]
  - correct a return code in the transfer cancel function.
  - add new API function, libusb20_tr_bulk_intr_sync().

 Submitted by:	HPS
 Reported by:	Robert Jenssen [1]
2009-12-09 21:34:38 +00:00
Alexander Motin
26952f96e5 MFC r200121:
Do not ignore device interrupt if bus mastering is still active. It is
normal in case of media read error and some ATAPI cases, when transfer size
is unknown beforehand. PCI ATA BM specification tells that in case of such
underrun driver should just manually stop DMA engine. DMA engine should
same time guarantie that all bus mastering transfers completed at the moment
of driver reads interrupt flag asserted.
This change fixes interrupt storms and command timeouts in many cases.

PR:             kern/103602, sparc64/121539, kern/133122, kern/139654
2009-12-09 17:20:10 +00:00
Alexander Motin
3ca1ec74ed MFC r200117:
On Soft Reset, read device signature from FIS receive area, instead of
PxSIG register. It works better for NVidia chipsets. ahci(4) does the same.

PR:             kern/140472, i386/138668
2009-12-09 17:11:09 +00:00
Alexander Motin
67c3bd2681 MFC r200223:
Explicitly acknowledge MSI completion, as required by SiI3124 datasheet.
It makes MSI working there. Later (and cheaper) PCIe chips (3132/3531)
still randomly crashing system in few seconds of high MSI rates, generating
something inaporopriate, like NMI or "Fatal trap 30".
2009-12-09 13:32:49 +00:00
Alexander Motin
0d8f2099fa MFC r200217:
SiI3124 has no SNotification register. Handle Asynchronous Notifications
there without it as good as possible.
2009-12-09 13:30:11 +00:00
Alexander Motin
240d980d7c MFC r200196:
Add Asynchronous Notification support for controllers without SNTF
capability by snooping SDB FIS receive area. It should be even faster
then regular way, but less reliable.
2009-12-09 13:27:06 +00:00
Alexander Motin
417f972601 MFC r200086:
Change 'load' balancing mode algorithm:
- Instead of measuring last request execution time for each drive and
choosing one with smallest time, use averaged number of requests, running
on each drive. This information is more accurate and timely. It allows to
distribute load between drives in more even and predictable way.
- For each drive track offset of the last submitted request. If new request
offset matches previous one or close for some drive, prefer that drive.
It allows to significantly speedup simultaneous sequential reads.

PR:             kern/113885
2009-12-08 23:23:45 +00:00
Alexander Motin
e99e819fed MFC r196879:
Add support for changing providers priority.
2009-12-08 23:15:48 +00:00
Rick Macklem
6d54ecd38f MFC: r199715
Modify the experimental nfs server so that it falls back to
using VOP_LOOKUP() when VFS_VGET() returns EOPNOTSUPP in the
ReaddirPlus RPC. This patch is based upon one by pjd@ for the
regular nfs server which has not yet been committed. It is needed
when a ZFS volume is exported and ReaddirPlus (which almost
always happens for NFSv4) is performed by a client. The patch
also simplifies vnode lock handling somewhat.

Tested by:	gerrit at pmp.uni-hannover.de
2009-12-08 22:41:37 +00:00
Rick Macklem
52b239b029 MFC: r199616
Patch the experimental NFS server is a manner analagous to
r197525, so that the creation verifier is handled correctly
in va_atime for 64bit architectures. There were two problems.
One was that the code incorrectly assumed that
sizeof (struct timespec) == 8 and the other was that the tv_sec
field needs to be assigned from a signed 32bit integer, so that
sign extension occurs on 64bit architectures. This is required
for correct operation when exporting ZFS volumes.

Tested by:	gerrit at pmp.uni-hannover.de
Reviewed by:	pjd
2009-12-08 22:28:55 +00:00
Fabien Thomas
f8abda828b MFC 198464:
Inform hwpmc(4) of a thread's impending demise prior to invoking sched_throw().
2009-12-08 18:23:52 +00:00
Xin LI
a1b9e5fa76 MFC revisions 196550 and 196552:
Add a new rc.d script, static_arp, which enables the administrator to
statically bind IPv4 <-> MAC address at boot time.

In order to use this, the administrator needs to configure the following
rc.conf(5) variable:

 - static_arp_pairs: A list of names for static bind pairs, and,
 - a series of static_arp_(name): the arguments that is being passed to
   ``arp -S'' operation.

Example:
  static_arp_pairs="gw"
  static_arp_gw="192.168.1.1 00:01:02:03:04:05"

See the rc.conf(5) manual page for more details.
2009-12-08 18:23:51 +00:00
Andriy Gapon
2cd46f059b MFC r199968: x86 cpu features: add MOVBE reporting and flag 2009-12-08 15:27:06 +00:00
Andriy Gapon
3ed91d6a6d MFC r199184: reflect that pg_ps_enabled is a tunable 2009-12-08 15:21:39 +00:00
Andriy Gapon
66d19b8579 MFC r200052: ichsmb: add pci ids for some newer supported hardware 2009-12-08 15:14:55 +00:00
Nathan Whitehorn
496ef31252 MFC r199886:
Add a CPU features framework on PowerPC and simplify CPU setup a little
more. This provides three new sysctls to user space:
hw.cpu_features - A bitmask of available CPU features
hw.floatingpoint - Whether or not there is hardware FP support
hw.altivec - Whether or not Altivec is available

PR:		powerpc/139154
2009-12-08 05:37:08 +00:00
Nathan Whitehorn
3c2ef79634 MFC r198678:
ake procstat -k work on PowerPC by avoiding mistakenly using signed
compares with a low address (0x1000) and a high address
(the KVA kernel stack).
2009-12-08 05:32:44 +00:00
Nathan Whitehorn
e9962146c6 MFC r198445:
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.

MFC r198968:

Unbreak E500 builds. The inline assembly for the 970 CPUs
is invalid when compiling for BookE.

MFC r199533:

Fix cpuid output on E500 core.
2009-12-08 05:27:06 +00:00
Nathan Whitehorn
3958967343 MFC r198444:
Allow Heathrow-based machines to boot a kernel containing option SMP
without panicing.
2009-12-08 05:23:07 +00:00
Nathan Whitehorn
9ad8053be5 MFC r200070:
Add manpages for ams(4), akbd(4), adb(4), and cuda(4), which describe
various drivers for Apple Desktop Bus controllers and peripherals.
2009-12-08 05:18:59 +00:00
Fabien Thomas
86cff089e7 MFC 200060:
Use a better check for a valid kernel stack address when capturing
kernel call chains.
2009-12-07 20:49:49 +00:00
Fabien Thomas
d7fbf69d96 MFC 198433:
Not all Intel Core (TM) CPUs implement PMC_CLASS_IAF fixed-function
counters.  For such CPUs, use an alternate mapping of convenience
names to events supported by PMC_CLASS_IAP programmable counters.
2009-12-07 20:44:43 +00:00
Fabien Thomas
29439ac7a1 MFC 198432:
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.
2009-12-07 20:40:48 +00:00
Xin LI
931d13672c MFC revision 197579 and 199617:
Add two new fcntls to enable/disable read-ahead:

 - F_READAHEAD: specify the amount for sequential access.  The amount is
   specified in bytes and is rounded up to nearest block size.
 - F_RDAHEAD: Darwin compatible version that use 128KB as the sequential
   access size.

A third argument of zero disables the read-ahead behavior.

Please note that the read-ahead amount is also constrainted by sysctl
variable, vfs.read_max, which may need to be raised in order to better
utilize this feature.

Thanks Igor Sysoev for proposing the feature and submitting the original
version, and kib@ for his valuable comments.
2009-12-07 19:59:28 +00:00
John Baldwin
cd6d7a15cf MFC 200061:
The fd_mask type is an unsigned long, not an int, so treat the mask as a
long instead of an int when examining the results of select() to look for
RPC requests.  Previously this routine would ignore RPC requests to sockets
whose file descriptor mod 64 was greater than 31 on a 64-bit platform.
2009-12-07 19:07:45 +00:00
John Baldwin
42e9dd5cad MFC 199974:
Remove extra parantheses from usb_ethernet.c and usb_serial.c lines.
config(8) doesn't parse parantheses and instead treated them as being
part of the device driver name (e.g. '(u3g' vs 'u3g').  While here, fix the
style of these long lines to match the wrapping used for other long lines
in this file.
2009-12-07 17:18:52 +00:00
Robert Noland
c9ab55149b MFC 199714
Create a seperate ZFS enabled loader.

This adds zfsloader which will be called by zfsboot/gptzfsboot code rather
than the tradional loader.  This eliminates the need to set the
LOADER_ZFS_SUPPORT variable in order to get a ZFS enabled loader.

Note however, that you must reinstall your bootcode (zfsboot/gptzfsboot)
in order for the boot process to use the new loader.

New installations will no longer be required to build a ZFS enabled
loader for a working ZFS boot system.  Installing zfsboot/gptzfsboot is
sufficient for acknowledging the use of CDDL code and therefore the ZFS
enabled loader.
2009-12-07 16:37:02 +00:00
Christian Brueffer
02a7ccf746 MFC: r200019
Fix the dprintf() prototype.
2009-12-07 08:38:44 +00:00
Christian Brueffer
4d672d94c1 MFC: r197900
Improved one-line description of this module (taken from NOTES).
2009-12-07 08:36:49 +00:00
Hiroki Sato
3cec660ea4 MFC:
r197139
- Add afexists() to check if the specified address family exists
  on the system or not.

r197697
- Add AF_IPX and AF_NATM to afexists().
2009-12-07 07:41:29 +00:00
Michael Tuexen
cf19fced17 MFC 197288,197326,197327,197328,197342,197914,197929,
197955,199365,199370,199371,199373,199866
This MFCs all SCTP/VNET relevant fixes from head.

Approved by: rrs (mentor)
2009-12-07 07:33:51 +00:00