Commit Graph

26978 Commits

Author SHA1 Message Date
Kevin Lo
51fcfa2666 Fix comment. 2014-01-24 15:34:22 +00:00
Hans Petter Selasky
5c8c627bf9 Hide now harmless warning from dmesg.
MFC after:	1 week
2014-01-24 15:05:28 +00:00
Kevin Lo
56ae078529 Get rid of memmove(). It's not portable.
Tested on RT3071, RT3573, RT3570, RT3572, and RT5572.

Reviewed by:	hselasky
2014-01-24 09:17:29 +00:00
Ian Lepore
f2a7dc989c Be more robust with malformed interrupt config data. Instead of crashing
or going into a near-infinite loop, warn and make potentially-reasonable
assumptions.

Reviewed by:	brooks, nwhitehorn
2014-01-24 00:42:18 +00:00
Warner Losh
65e79cf474 clock-frequency is a FreeBSD-specific extention. Make it optional and
allow the client uart drivers to decide if a frequency is required.
2014-01-24 00:14:14 +00:00
John Baldwin
e07ef9b0f6 Move <machine/apicvar.h> to <x86/apicvar.h>. 2014-01-23 20:10:22 +00:00
Warner Losh
df10106a87 Add Atmel serial drivers. 2014-01-23 18:09:10 +00:00
Hans Petter Selasky
2719d9c909 Revert r261014. Let Kevin fix it.
MFC after:	1 week
2014-01-23 10:18:28 +00:00
Justin Hibbits
c821b4820f Properly sort the arguments to mtx_init(9).
PR:		misc/186020
Submitted by:	alfred
MFC after:	1 week
2014-01-23 01:09:33 +00:00
Hans Petter Selasky
dfd7cd8014 We are using the old callout API and should also add one extra tick in
the FreeBSD 10 case.

Suggested by:	mav @
MFC after:	1 week
2014-01-22 17:50:43 +00:00
Hans Petter Selasky
2e74d8c857 - Fix some non-portable code with regard to endianness. Don't use memmove().
- Fix a range check for maximum transmit length.
- Fix read from missing field when transmitting data.

MFC after:	2 weeks
2014-01-22 09:57:26 +00:00
Hans Petter Selasky
924b1f5db0 Ensure that the DMA delay does not get rounded down to zero ticks when
a timeout value of a single tick is given. With FreeBSD-10 and newer
the current system time is used as a starting point, and the minimum
callout time of a single tick will be guaranteed. This patch mostly
affect the DMA delay timeouts, which are typically in the range from
0.125 to 2ms.

MFC after:	1 week
2014-01-22 07:48:39 +00:00
Hans Petter Selasky
3448548027 Wait a bit more before we free any EHCI DMA descriptors. Some USB
controllers need more time than others.

MFC after:	1 week
2014-01-22 07:32:55 +00:00
Hans Petter Selasky
338b63a918 Add new quirk.
PR:		usb/185968
MFC after:	1 week
2014-01-22 07:22:42 +00:00
Aleksandr Rybalko
5beb07abdd Style(9) fix.
No functional changes.

Sponsored by:	The FreeBSD Foundation
2014-01-20 23:36:16 +00:00
John Baldwin
84b755dfe5 Add support for displaying VPD for PCI devices via pciconf.
- Store the length of each read-only VPD value since not all values are
  guaranteed to be ASCII values (though most are).
- Add a new pciio ioctl to fetch VPD for a single PCI device.  The values
  are returned as a list of variable length records, one for the device
  name and each keyword.
- Add a new -V flag to pciconf's list mode which displays VPD data for
  each device.

MFC after:	1 week
2014-01-20 20:56:09 +00:00
Warner Losh
138277120c Don't lock in the generic grab just to lock again in the specific grabs.
(I committed the wrong version of uart_core.c, which still had this).

Pointy hat: imp
2014-01-20 17:45:36 +00:00
Hans Petter Selasky
62b97a9adf Add support for GPS ports to UHSO driver.
Submitted by:	Lundberg, Johannes <johannes@brilliantservice.co.jp>
MFC after:	1 week
2014-01-20 07:09:19 +00:00
Warner Losh
1a75471bbb Free the dma memory from the dma map before destroying the dma map. 2014-01-19 20:32:20 +00:00
Warner Losh
d76a1ef4e1 Introduce grab and ungrab upcalls. When the kernel desires to grab the
console, it calls the grab functions. These functions should turn off
the RX interrupts, and any others that interfere. This makes mountroot
prompt work again. If there's more generalized need other than
prompting, many of these routines should be expanded to do those new
things.

Should have been part of r260889, but waasn't due to command line typo.

Reviewed by:	bde (with reservations)
2014-01-19 19:39:13 +00:00
Warner Losh
90a9a51875 Generalize AT91 NAND support a bit. Be more flexible about ALE and CLE
address line assignment. Provide convenince function to set these things.
2014-01-19 17:53:51 +00:00
Bryan Venteicher
10c4018057 Add very simple virtio_random(4) driver to harvest entropy from host
Reviewed by:	markm (random bits only)
2014-01-18 06:14:38 +00:00
Alexander Motin
3fcad654e2 Add ID for one more ASMedia AHCI-compatible controller.
Reported by:	ignace.peeters@gmail.com
MFC after:	2 weeks
2014-01-17 17:16:49 +00:00
Hans Petter Selasky
f97da128ab Fix a possible memory use after free and leak situation associated
with USB device detach when using character device handles. This also
includes LibUSB. It turns out that "usb_close()" cannot always get a
reference to clean up its USB transfers and such, if called during the
kernel USB device detach.

Analysis by:	hselasky @
Reported by:	Juergen Lock <nox@jelal.kn-bremen.de>
MFC after:	1 week
2014-01-17 10:35:18 +00:00
Hans Petter Selasky
c7d8c1c6e0 Close a minor deadlock.
MFC after:	1 week
2014-01-17 08:21:09 +00:00
Gleb Smirnoff
b8c83a1957 Another round of removing historical mbuf(9) allocator flags.
They are breeding! New ones arouse since last round.

Sponsored by:	Nginx, Inc.
2014-01-16 13:44:47 +00:00
Luigi Rizzo
f263752668 netmap_user.h:
add separate rx/tx ring indexes
   add ring specifier in nm_open device name

netmap.c, netmap_vale.c
   more consistent errno numbers

netmap_generic.c
   correctly handle failure in registering interfaces.

tools/tools/netmap/
   massive cleanup of the example programs
   (a lot of common code is now in netmap_user.h.)

nm_util.[ch] are going away soon.
pcap.c will also go when i commit the native netmap support for libpcap.
2014-01-16 00:20:42 +00:00
Aleksandr Rybalko
c3fbb0d11a Update xboxfb driver to actual state.
NOTE: Not tested.

Sponsored by:	The FreeBSD Foundation
2014-01-15 12:35:28 +00:00
Hans Petter Selasky
8af981a406 Don't output any modifier keys before we see a valid
non-modifier key press. This prevents so-called "ghost
keyboards" keeping modifier keys pressed while not
actually seen as a real keyboard.

MFC after:	2 weeks
2014-01-14 08:43:38 +00:00
Hans Petter Selasky
a0d53e0b38 Implement better error recovery for Transaction Translators, TTs,
found in High Speed USB HUBs which translate from High Speed USB into
FULL or LOW speed USB. In some rare cases SPLIT transactions might get
lost, which might leave the TT in an unknown state. Whenever we detect
such an error try to issue either a clear TT buffer request, or if
that is not possible reset the whole TT.

MFC after:	1 week
2014-01-13 15:21:11 +00:00
Hans Petter Selasky
a148d44fb5 Separate I/O errors from reception of STALL PID.
MFC after:	1 week
2014-01-13 15:06:03 +00:00
Bryan Venteicher
22525db507 Add unmapped IO support to virtio_scsi(4) 2014-01-13 04:46:48 +00:00
Bryan Venteicher
ee11ec3437 Add unmapped IO support to virtio_blk(4) 2014-01-13 04:43:01 +00:00
Bryan Venteicher
bf51187b26 Remove incorrect bit shift when assigning the LUN request field
This caused duplicate targets appearing on Google Compute Engine
instances.

PR:		kern/185626
Submitted by:	Venkatesh Srinivas <venkateshs@google.com>
MFC after:	3 days
2014-01-12 17:40:47 +00:00
Hans Petter Selasky
9ae7f7c13c Make sure reserved fields of the EHCI DMA descriptors are not dirty
after previous transfers.

MFC after:	1 week
2014-01-12 13:16:25 +00:00
Hans Petter Selasky
b353507895 Don't do synchronous USB requests inside USB transfer callbacks. It is
technically OK, but not recommended.

MFC after:	1 weeks
2014-01-12 11:44:28 +00:00
Kevin Lo
030dda5d1d Fix a logic error when checking if Tx power entries are greater than 31. 2014-01-11 14:48:16 +00:00
Hans Petter Selasky
67fd1a8fb6 Optimise interrupt logic. Technically writing a zero to the XHCI USB
status register has no effect. Can happen when the interrupt vector is
shared.

MFC after:	1 week
2014-01-11 08:16:31 +00:00
Hans Petter Selasky
13156a5241 Force clearing of event ring interrupts. The "Intel Lynx Point" XHCI
controller found in the MBP2013 has been observed to not work properly
unless this operation is performed.

MFC after:	1 week
Tested by:	Huang Wen Hui <huanghwh@gmail.com>
2014-01-11 08:10:01 +00:00
Hans Petter Selasky
5199761b66 Move USB ID from u3g driver to uhso driver.
Submitted by:	Lundberg, Johannes <johannes@brilliantservice.co.jp>
MFC after:	1 week
2014-01-11 07:53:03 +00:00
Alexander Motin
23c628f7f7 Remove not applicable PI_SDTR_ABLE and PI_WIDE_16 hba_inquiry flags to
make CAM to not try negotiate unsupported settings and suppress warnings.

While there, enable command queuing on pass-through devices, announced
in hba_inquiry, but disabled.  Even though queue size is very small, It
seems working well enough.

Reviewed by:	scottl
MFC after:	2 weeks
2014-01-10 19:21:46 +00:00
Luigi Rizzo
0c7ba37e01 Fix netmap emulation when NICs attached to a VALE switch have a different
number of tx and rx rings

Submitted by:	Vincenzo Maffione
2014-01-10 16:01:44 +00:00
Luigi Rizzo
f6c2a31f72 sync with our internal repo - small change in debugging messages 2014-01-10 16:00:27 +00:00
Kevin Lo
107f00c0b9 Use m_get2() instead of m_getcl().
Spotted by:	glebius
2014-01-10 14:47:20 +00:00
Kevin Lo
569dfed32c Use m_getcl() instead of MGETHDR/MCLGET macros.
Suggested by:	glebius
2014-01-10 02:47:20 +00:00
Kevin Lo
115ea7c105 Replace deprecated M_DONTWAIT with M_NOWAIT. 2014-01-09 01:48:33 +00:00
Gleb Smirnoff
339f59c096 Fix build with VIMAGE. 2014-01-09 00:59:03 +00:00
Aleksandr Rybalko
92762d566e Restore VGA mode on vt switch. It fix VESA mode left by Xorg on exit.
Sponsored by:	The FreeBSD Foundation
2014-01-08 14:42:26 +00:00
Robert Millan
57a9b881a3 Fix build of vt_xboxfb. 2014-01-08 14:36:35 +00:00
Gavin Atkinson
e4b141d4eb Add support for the Intel Centrino Wireless-N 135 chipset.
MFC after:	2 weeks
2014-01-08 13:59:33 +00:00