Commit Graph

27429 Commits

Author SHA1 Message Date
Hans Petter Selasky
3bee4e7bdb Make SAF1761 driver endian safe.
Sponsored by:	DARPA, AFRL
2014-05-25 06:42:43 +00:00
Alexander Motin
c2a0f07a10 Increase taskqueue thread priority from idle to PRIBIO.
Idle priority is not even time-share, so if system is busy in any way,
those events may never be executed.  Since in some cases system waits
for events processed by that thread, that may cause deadlocks.
2014-05-24 13:00:49 +00:00
Bjoern A. Zeeb
255cd9fd58 Move the tcp_fields_to_host() and tcp_fields_to_net() (inline)
functions to the tcp_var.h header file in order to avoid further
duplication with upcoming commits.

Reviewed by:	np
MFC after:	2 weeks
2014-05-23 20:15:01 +00:00
Navdeep Parhar
7a5b897dfe cxgbe(4): Remove stray if_up from the code that creates the tracing ifnet. 2014-05-23 01:45:44 +00:00
Edward Tomasz Napierala
8acd0be199 Make iwn(4) able to get itself back into working condition after
"fatal firmware error" happens.  Previously it was neccessary to reset
it manually, using "/etc/rc.d/netif restart".

Approved by:	adrian@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-05-22 15:29:25 +00:00
Edward Tomasz Napierala
43c2aa0f86 Erm, revert r266544; wrong tree. 2014-05-22 15:00:32 +00:00
Edward Tomasz Napierala
983aa498d5 Make iwn(4) able to get itself back into working condition after
"fatal firmware error" happens.  Previously it was neccessary to reset
it manually, using "/etc/rc.d/netif restart".

Approved by:	adrian@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-05-22 14:56:34 +00:00
Hans Petter Selasky
1593e8754e - Give firmware loading more time.
MFC after:	3 days
2014-05-22 12:01:43 +00:00
Hans Petter Selasky
c73bbf989d - Fix a bug where the TLBPC value was forced to being odd for IN
direction isochronous transfers.
- Remove setting of fields which does not belong to the respective
TRBs. These fields are currently set as zero and this is more a
cosmetic change.

MFC after:	3 days
Submitted by:	Horse Ma <HMa@wyse.com>
2014-05-22 11:58:15 +00:00
Aleksandr Rybalko
c23c960364 Proper fix of VT_LOCKSWITCH ioctl.
Sponsored by:	The FreeBSD Foundation
2014-05-22 09:31:18 +00:00
Hans Petter Selasky
885476cb9a - Stop transfers when RSU init fails.
- Make sure TX/RX lists don't leak and are only allocated once.
- Fix off-by one transfer index computation.
- Give firmware loading more time.

MFC after:	3 days
2014-05-22 06:28:09 +00:00
Hans Petter Selasky
8e14e4a03a Implement interrupt endpoint methods for host mode transfers.
Sponsored by:	DARPA, AFRL
2014-05-21 17:22:41 +00:00
Hans Petter Selasky
400b4e53bd - Split transmit queue into one for each type. Apparently there will
be a race when using a single active queue for all transmit types.
- Last argument of usb_pause_mtx() is ticks and not milliseconds.
- Remove unused watchdog.
- Remove some unused fields from the RSU softc structure.
- Workaround usbd_transfer_start() recursion from inside of completion
callback.

MFC after:	3 days
2014-05-21 16:52:55 +00:00
Aleksandr Rybalko
7ee92f6e08 Fix tty locking.
o Correct expected values for VT_LOCKSWITCH ioctl.
o Check current window for locked state.

Sponsored by:	The FreeBSD Foundation
2014-05-21 11:15:38 +00:00
Hans Petter Selasky
c13c64fa63 - Replace some constants with macros.
- Need to set the pre-fetch memory address when reading the host memory.
- We currently assume that no endianness conversion is needed.

Sponsored by:	DARPA, AFRL
2014-05-21 09:26:02 +00:00
Kevin Lo
61c067adc3 - Configure Rx bulk
- Announce flow control capability to PHY drivers
2014-05-21 08:09:44 +00:00
Hans Petter Selasky
302a703b5b Avoid starting a USB transfer inside the callback function, right
after its been submitted.

MFC after:	3 days
2014-05-21 06:23:52 +00:00
Jim Harris
0572ccaa45 Add ismt(4) driver.
ismt(4) supports the SMBus Message Transport controller found on Intel
C2000 series (Avoton) and S1200 series (Briarwood) Atom SoCs.

Sponsored by:	Intel
2014-05-20 19:55:06 +00:00
Hans Petter Selasky
aff6e94558 - The DELAY() should not be used in USB drivers.
- The usb_pause_mtx() function takes ticks and not milliseconds as last argument.

MFC after:	3 days
2014-05-20 15:53:17 +00:00
Hans Petter Selasky
b41381aea9 - The DELAY() should not be used in USB drivers.
- The usb_pause_mtx() function takes ticks and not milliseconds as last argument.

MFC after:	3 days
2014-05-20 15:47:37 +00:00
Alexander Motin
e887c1dedf Add IOMMU PCI subclass, found on Tyan S8236 motherboard.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2014-05-20 14:39:22 +00:00
Hans Petter Selasky
6804df87a9 Correct some programming details. The layout of the PDTs were
different from what was initially thought. Fix re-programming of
hardware mode register after reset.

Sponsored by:	DARPA, AFRL
2014-05-20 14:15:03 +00:00
Hans Petter Selasky
7243077c9d Make sure detach code is executed in all cases. This fixes a panic
when debugging is enabled.

Reported by:	Idwer Vollering <vidwer@gmail.com>
MFC after:	3 days
2014-05-20 12:22:53 +00:00
Jack F Vogel
a7353153c1 This is the beta release of the driver for the new
Intel 40G Ethernet Controller XL710 Family. This is
the core driver, a VF driver called i40evf, will be
following soon. Questions or comments to myself or
my co-developer Eric Joyner. Cheers!
2014-05-19 01:21:02 +00:00
Hans Petter Selasky
e85f0d3141 - Remove no longer used file. FDT is used to attach device drivers. 2014-05-18 09:19:13 +00:00
Hans Petter Selasky
2fe7ad87e9 - Add softc pointer argument to FIFO functions as an optimisation.
- Implement support for interrupt filters in the DWC OTG driver, to
reduce the amount of CPU task switching when only feeding the FIFOs.
- Add common spinlock to the USB bus structure.

MFC after:	2 weeks
2014-05-18 09:13:29 +00:00
Andrew Turner
27521ff8e4 Add the start of the ARM platform code. This is based on the PowerPC
platform code, it is expected these will be merged in the future when the
ARM code is more complete.

Until more boards can be tested only use this with the Raspberry Pi and
rrename the functions on the other SoCs.

Reviewed by:	ian@
2014-05-17 11:27:36 +00:00
John Baldwin
b2b39b0478 Clear the data buffer length field when freeing a command structure so that
it doesn't leak through when the command structure is reused for a user
command without a data buffer.

PR:		amd64/189668
Tested by:	Pete Long <pete@nrth.org>
MFC after:	1 week
2014-05-17 02:45:04 +00:00
Christian Brueffer
73aa8b9a75 Remove some unused variables.
Found with:	Clang Static Analyzer
MFC after:	2 weeks
2014-05-16 21:19:17 +00:00
Hans Petter Selasky
dfe11c1395 Enable host controller interrupts.
Sponsored by:	DARPA, AFRL
2014-05-16 16:36:07 +00:00
Hans Petter Selasky
56a052ffdd Remove old files.
Sponsored by:	DARPA, AFRL
2014-05-16 15:53:47 +00:00
Hans Petter Selasky
4327a6c8c6 Fix a compile warning about unused variable.
Sponsored by:	DARPA, AFRL
2014-05-16 15:53:14 +00:00
Hans Petter Selasky
f46e2f146b Rename "saf1761_dci_xxx" into "saf1761_otg_xxx" to reflect that this
driver supports both host and device side mode.

Sponsored by:	DARPA, AFRL
2014-05-16 15:50:21 +00:00
Hans Petter Selasky
2550c55ed3 Implement basic support for the USB host controller found in the
SAF1761 chip, supporting BULK and CONTROL endpoints. This code is not
yet tested.

Sponsored by:	DARPA, AFRL
2014-05-16 15:41:55 +00:00
Hans Petter Selasky
39c913fb21 - Allow the SAF1761 driver to attach to the root HUB USB driver.
Sponsored by:	DARPA, AFRL
2014-05-16 10:37:25 +00:00
Hans Petter Selasky
fffa71cbfe - Add flattended device tree probe-, attach- and detach code for the
SAF1761 driver, compatible to existing Linux based FDT tables for the
same hardware.

Sponsored by:	DARPA, AFRL
2014-05-16 10:35:21 +00:00
Hans Petter Selasky
a673f4c22b - Correct some programming details for the SAF1761 driver.
- Add some more register details.

Sponsored by:	DARPA, AFRL
2014-05-16 10:30:30 +00:00
Mark Johnston
2a1681877e Remove some prototypes for undefined functions.
MFC after:	3 days
2014-05-15 21:19:13 +00:00
Hans Petter Selasky
b9f21c2ce8 Implement USB device side driver code for SAF1761 and compatible
chips, based on datasheet and existing USS820 DCI driver. This code is
not yet tested.

Sponsored by:	DARPA, AFRL
2014-05-14 17:04:02 +00:00
Hans Petter Selasky
f5bf22f3b5 Disable configuration of the host frame interval register until
further, hence it breaks USB support on some non-RPI platforms.
2014-05-14 11:32:15 +00:00
Hans Petter Selasky
af26e3dfe7 Make sure the USB audio driver is loaded last. This is important when
built as part of a kernel module to prevent panics when the USB audio
driver kernel module is unloaded.

Suggested by:	marius @
MFC after:	1 week
2014-05-14 11:25:59 +00:00
Hans Petter Selasky
40ba168d27 - Isochronous transfers should use the alternate next transfer
descriptor upon receiving a short packet, in host and device mode.
- Correct some comments.
2014-05-13 13:46:38 +00:00
Pyun YongHyeon
74a034464e Disable TX IP/TCP/UDP checksum offloading for RTL8168C/RTL8168CP.
Previously only TX IP checksum offloading was disabled but it's
reported that TX checksum offloading for UDP datagrams with IP
options also generates corrupted frames.  Reporter's controller is
RTL8168CP but I guess RTL8168C also have the same issue since it
shall share the same core.

Reported and tested by:	tuexen
2014-05-13 05:19:29 +00:00
Aleksandr Rybalko
ae866603c7 Update terminal sizes in any case when new vt(4) driver arrive.
(Plus remove one unused newline)

Sponsored by:	The FreeBSD Foundation
2014-05-12 19:29:38 +00:00
Hans Petter Selasky
1d6b6e9d46 Create driver file templates, kernel module Makefile and add initial
version of register definitions for ISP1761 and SAF1761 compatible
chips.

Sponsored by:	DARPA, AFRL
2014-05-12 09:05:07 +00:00
Nathan Whitehorn
e2fc1af45e OF_peer() in IEEE 1275 returns 0 if no peer exists, not -1. 2014-05-11 18:22:05 +00:00
Hans Petter Selasky
4541f27356 Optimise host mode data roundtrip time. When BULK data is submitted to
the main processing queue, clear the NAK counter for any associated
BULK or CONTROL transfers and poll the endpoint(s) for 1 millisecond
at 125us rate interval, before going into slow, 10ms, NAK polling mode
again.  This has the effect that typical ping-ping protocols respond
quicker when initiated from the USB host.

MFC after:	2 weeks
2014-05-11 08:17:46 +00:00
Nathan Whitehorn
0ee4b22d75 Port over mmap routine from syscons. This lets X11 work on PowerPC with vt.
The last obstacle to switching PowerPC entirely to vt is that the Playstation 3
framebuffer driver needs to be ported over. This only applies for powerpc64,
however.
2014-05-11 02:16:08 +00:00
Nathan Whitehorn
015ac42e4b Make ofwfb not be painfully slow. This reduces the time for a verbose boot
on my G4 iBook by more than half. Still 10% slower than syscons, but that's
much better than a factor of 2.

The slowness had to do with pathological write performance on 8-bit
framebuffers, which are almost universally used on Open Firmware systems.
Writing 1 byte at a time, potentially nonconsecutively, resulted in many
extra PCI write cycles. This patch, in the common case where it's writing
one or several characters in an 8x8 font, gangs the writes together into
a set of 32-bit writes. This is a port of r143830 to vt(4).

The EFI framebuffer is also extremely slow, probably for the same reason,
and the same patch will likely help there.
2014-05-11 01:58:56 +00:00
Nathan Whitehorn
bdf49e3953 Make ofwfb actually work again. Apparently the API it was written against
still exists but is now silently ignored by the VT core. At least xboxfb
needs similar changes.
2014-05-11 01:19:55 +00:00