Commit Graph

3889 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
f66c3cfc58 Make the handler routine for the hw.usb.template sysctl trigger the USB
host to reprobe the bus by switching the USB pull up resistors off and
back on.  In other words - when FreeBSD is configured as a USB device,
changing the sysctl will be immediately noticed by the machine it's
connected to.

Reviewed by:	hselasky@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-01-30 10:08:11 +00:00
Ian Lepore
2480071fbc Add a NO_GETMAXLUN quirk for the JMicron JMS567 USB to SATA bridge, to
prevent lengthy timeout pauses while probing/attaching drives.
2018-01-29 03:24:02 +00:00
Ruslan Bukin
11e11bd6d8 Add basic driver for Qualcomm USB 2.0 EHCI controller.
This driver relies on system initialization in u-boot.

Tested on DragonBoard 410c.

Sponsored by:	DARPA, AFRL
2018-01-25 16:58:23 +00:00
Edward Tomasz Napierala
28f3d8b2c2 Add SPDX identifiers to linux_ptrace.c and cfumass.c.
MFC after:	2 weeks
2018-01-24 17:04:01 +00:00
Edward Tomasz Napierala
1ee5bed72a Add missing manufacturer/serial number string descriptors.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-01-21 17:31:31 +00:00
Michal Meloun
f8759facd2 Convert extres/phy to kobj model.
Similarly as other extres pseudo-drivers, implement phy by using kobj model.
This detaches it from provider device, so single device driver can export
multiple different phys. Additionally, this  allows phy to be subclassed to
more specialized drivers, like is USB OTG phy, or PCIe phy with hot-plug
capability.

Tested by:	manu (previous version, on Allwinner board)
MFC after:	1 month
2018-01-20 17:02:17 +00:00
Edward Tomasz Napierala
ad2c142415 Remove unused index.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-01-20 14:05:55 +00:00
Edward Tomasz Napierala
42e42a9aa4 Add missing SPDX tags; the rest of the license text is the same as in other
USB templates.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-01-20 14:03:55 +00:00
Edward Tomasz Napierala
8e06491a4e Add sysctls to control device side USB identifiers. This makes it
possible to change string and numeric vendor and product identifiers,
as well as anything else there might be to change for a particular
device side template, eg the MAC address.

Reviewed by:	hselasky@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13920
2018-01-20 13:58:34 +00:00
Hans Petter Selasky
77e7601e6d Add new USB ID to U3G driver.
PR:		134299
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2018-01-19 13:06:36 +00:00
Hans Petter Selasky
cdadbbb03d Improve support for USB based 3G/4G/5G dongles from Huawei.
PR:		192345
Sponsored by:	Mellanox Technologies
2018-01-19 12:59:14 +00:00
Nick Hibma
7f64a99075 Add support for Quectel EC25.
Submitted by:	Samuel Crookes
MFC after:	3 days
2018-01-13 23:31:21 +00:00
Andriy Gapon
fac38b96d2 usbdevs: add ASMedia vendor ID
MFC after:	1 week
2018-01-09 13:42:08 +00:00
Adrian Chadd
9fbe631a1a [net80211] convert all of the WME use over to a temporary copy of WME info.
This removes the direct WME info access in the ieee80211com struct and instead
provides a method of fetching the data.  Right now it's a no-op but eventually
it'll turn into a per-VAP method for drivers that support it (eg iwn, iwm,
upcoming ath10k work) as things like p2p support require this kind of behaviour.

Tested:

* ath(4), STA and AP mode

TODO:

* yes, this is slightly stack size-y, but it is an important first step
  to get drivers migrated over to a sensible WME API.  A lot of per-phy things
  need to be converted to per-VAP before P2P, 11ac firmware, etc stuff shows up.
2018-01-02 00:07:28 +00:00
Conrad Meyer
66ad253880 Add AHCI/XHCI device IDs found on AMD 1950X+X399 system
A follow-up to r327094.

Sponsored by:	Dell EMC Isilon
2017-12-29 22:24:41 +00:00
Alexander Kabaev
151ba7933a Do pass removing some write-only variables from the kernel.
This reduces noise when kernel is compiled by newer GCC versions,
such as one used by external toolchain ports.

Reviewed by: kib, andrew(sys/arm and sys/arm64), emaste(partial), erj(partial)
Reviewed by: jhb (sys/dev/pci/* sys/kern/vfs_aio.c and sys/kern/kern_synch.c)
Differential Revision: https://reviews.freebsd.org/D10385
2017-12-25 04:48:39 +00:00
Alexander Motin
d171d2f281 Add AHCI/XHCI device IDs found on AMD Ryzen+B350 system.
MFC after:	2 weeks
2017-12-22 20:44:21 +00:00
Pedro F. Giffuni
9b10f59a10 SPDX: mostly fixes to previous changes.
Introduce the recently approved BSD-1-Clause and replace 0BSD which
never did fit well our use cases.
2017-12-13 16:13:17 +00:00
George V. Neville-Neil
b61cdf0e4e Add support for RealTek 8812 over USB
Tested with ALFA AWUS036ACH

MFC after:	1 week
2017-12-03 22:02:30 +00:00
Pedro F. Giffuni
718cf2ccb9 sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2017-11-27 14:52:40 +00:00
Pedro F. Giffuni
7282444b10 sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:36:21 +00:00
Pedro F. Giffuni
df57947f08 spdx: initial adoption of licensing ID tags.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

Initially, only tag files that use BSD 4-Clause "Original" license.

RelNotes:	yes
Differential Revision:	https://reviews.freebsd.org/D13133
2017-11-18 14:26:50 +00:00
Kevin Lo
ccaf7ad472 Add TP-LINK UE300.
Submitted by:	Kris G <netsick@gmail.com>
2017-11-14 01:57:54 +00:00
Hans Petter Selasky
e15936fc5b Add new USB quirk.
Submitted by:	Kris G <netsick@gmail.com>
Sponsored by:	Mellanox Technologies
MFC after:	1 week
2017-11-10 07:44:57 +00:00
Andriy Voskoboinyk
76ff59295f rsu(4): trim code for Rx rate calculation.
Include ridx <-> rate conversion functions from rtwn(4) +
reuse already calculated value for ieee80211_radiotap(9).

Tested with Asus USB-N10, STA mode.
2017-11-02 00:17:52 +00:00
Andriy Voskoboinyk
7e19293450 rtwn_usb(4): add few USB IDs.
Submitted by:	wfpower@yandex.ru (via github).
2017-10-30 08:57:08 +00:00
Oleksandr Tymoshenko
e130435139 Fix MAC address detection regression introduced by r324184
To accomodate all variaties of Pi DTS files floating around
we look for MAC address property either in DTS node for
USB ethernet (if it exists) or at predefined path
".../usb/hub/ethernet".

After r324184 smsc_fdt_find_eth_node started to return node
with compatibility string "usb424,ec00" as an eth node.
In imported GNU dts files this node still does not have
MAC address related property, and therefor following check for
"mac-address" and "local-mac-address" fails.

To make this logic more robust do not just search for the node
but also make sure it has required property, so if node with
accepted compatibility string exists but doesn't have the
property we fall back to looking for hardoded path mentioned above.
2017-10-27 21:22:38 +00:00
Bruce M Simpson
1d4c696a71 Add Prolific PL27A1 USB 3.0 Host-Host device to udbp(4).
Tested with a Plugable cable in VirtualBox against Linux 4.11.

MFC after:	2 weeks
2017-10-22 11:15:58 +00:00
Vladimir Kondratyev
7707483a07 ums(4): Unreverse evdev Tilt-axis reporting to match Linux.
sysmouse tilt to button mapping remained unchanged.

Reviewed by:		hselasky
Approved by:		gonzo (mentor)
MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D12671
2017-10-19 20:54:55 +00:00
Edward Tomasz Napierala
4ffeccf1e8 Replace some magic numbers in usb_template(4) code with #defines.
There should be no functional changes.

Reviewed by:	hselasky
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D12670
2017-10-15 11:46:11 +00:00
Kristof Provost
3b07bb2a64 Support the D-Link DWM-222 LTE Dongle
Submitted by:	Daniel Hänschke <jailedemon@googlemail.com>
2017-10-13 19:41:35 +00:00
Ian Lepore
c5765d84ac Allow Raspberry Pi platform and drivers to be configured with upstream DTBs.
- Added more compatibility strings to drivers not yet converted
 - Added new RPI platform code compatibility string to match the ones used
   upstream
 - Adapted RPI and RPI2 DTS to match the new platform code compatibility
   string

The goal is to use the upstream DTBs as a replacement for our custom one.
This is now possible with these changes.

Additionally, as the RPI firmware automatically chooses the right DTB for
us, this would allow to have one common armv6 kernel for RPI0 and RPI1
(BCM2835-based), and one common armv7 kernel for RPI2 v1.1 (BCM2836-based),
and RPI2 v1.2 / RPI3 (BCM2837-based).

Submitted by:	Sylvain Garrigues <sylgar@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D12360
2017-10-02 00:49:33 +00:00
Andriy Voskoboinyk
6acad03d6f uath(4): fix varible types, add missing checks for descriptor / command
header structure fields.

Reported by:	hselasky
Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D11786
2017-09-30 21:00:46 +00:00
Kevin Lo
21d36c9620 Add ThinkPad USB 3.0 Ethernet Adapter.
Submitted by:	jh
2017-09-29 01:19:22 +00:00
Hans Petter Selasky
d384b1673f Extend sysctl description for hw.usb.disable_enumeration .
PR:		222505
Submitted by:	Julian H. Stacey <jhs@berklix.com>
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2017-09-22 08:21:35 +00:00
Marcin Wojtas
be2d15eae6 Improve HW type checking in mv_ehci driver
This patch adds hwtype parameter which keeps information about hardware
revision of Marvell EHCI controller. It allows to replace multiple
calls to ofw_bus_is_compatible with comparing hwtype value during driver
initialization.

Submitted by: Patryk Duda <pdk@semihalf.com>
Suggested by: ian
Obtained from: Semihalf
Sponsored by: Semihalf
2017-09-11 10:41:42 +00:00
Marcin Wojtas
6c2c61060d Add support for Armada 3700 EHCI
This patch reuses ehci_mv driver by adding a support for the new
compatible string and adding ehci_mv.c to list of available options
for arm64 platforms.

Submitted by: Patryk Duda <pdk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Semihalf
Differential Revision: https://reviews.freebsd.org/D12255
2017-09-09 11:06:58 +00:00
Marcin Wojtas
0fd9794286 Add support for xhci in Armada 3700 and 7k/8k
This driver will be used by Marvell Armada 3700 and 7k/8k SoC families.
The same, generic xhci device also appears in Armada 380, so we are reusing
driver.

This patch also adds xhci_mv.c entry to the arm64 files list.

Submitted by: Patryk Duda <pdk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Semihalf
Differential Revision: https://reviews.freebsd.org/D12252
2017-09-09 10:54:13 +00:00
Hans Petter Selasky
5b4b1bb3a1 Add new USB quirk.
PR:			221775
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-09-06 13:59:57 +00:00
Ed Maste
89fdc67c9c usb: Add external "Intenso Memory" disk UQ_MSC_NO_INQUIRY quirk
PR:		221852
Submitted by:	Fabian Keil
Reviewed by:	hselasky
Obtained from:	ElectroBSD
MFC after:	1 week
2017-08-30 01:44:11 +00:00
Vladimir Kondratyev
76136d200d Add support for generic MS Windows 7/8/10-compatible USB HID touchscreens
found in many laptops.

Reviewed by:		hps, gonzo, bcr (manpages)
Approved by:		gonzo (mentor)
Differential Revision:	https://reviews.freebsd.org/D12017
2017-08-19 17:00:10 +00:00
Hans Petter Selasky
48a597ef59 Add new USB quirk.
Submitted by:		devel@stasyan.com
PR:			221328
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-08-15 08:44:36 +00:00
Alexander Motin
aaa9b2b3f3 Add new Intel Lewisburg and Union Point chipset PCI IDs.
While there, polish some old AHCI ones, since they are still reused.

MFC after:	1 week
2017-08-09 12:03:12 +00:00
Andriy Voskoboinyk
a08e9300f3 zyd: code cleanup + drop unneeded cast.
No functional change intended.
2017-07-30 22:17:08 +00:00
Hans Petter Selasky
bd9175e1aa Properly range check length of parsed information elements in RSU driver.
Found by:		Ilja van Sprundel <ivansprundel@ioactive.com>
MFC after:		3 days
Sponsored by:		Mellanox Technologies
2017-07-30 16:45:28 +00:00
Ian Lepore
2d5f51fb22 Put an #ifdef notyet wrapper around a function that's not being used yet,
to avoid compile warnings.
2017-07-13 02:20:07 +00:00
Ian Lepore
7164f27ddc Support the "disable-over-current" property for imx ehci controllers.
It turns out that this is more than a power optization.  The OTG port
won't work on boards that have this property unless this setting is honored.

Also ensure that the usb phy device attaches before ehci.
2017-07-13 02:16:15 +00:00
Hans Petter Selasky
a90f44b281 Implement fix for BULK IN-token retry mechanism. When the hardware is
programmed for infinite IN token retry after NAK, the SAF1761
hardware, however, does not retry the IN-token. This problem is
described in the SAF1761 errata, section 18.1.1.

While at it:
- Add some minor chip specific initialization for RTEMS.
- Add debug print for status registers in the interrupt filter.

Submitted by:	Christian Mauderer <christian.mauderer@embedded-brains.de>
MFC after:	1 week
2017-07-07 12:03:58 +00:00
Alexander Motin
eb76cfbcb7 Add some device IDs for Intel Denverton SoCs. 2017-06-21 00:30:57 +00:00
Ed Maste
3e85b721d6 Remove register keyword from sys/ and ANSIfy prototypes
A long long time ago the register keyword told the compiler to store
the corresponding variable in a CPU register, but it is not relevant
for any compiler used in the FreeBSD world today.

ANSIfy related prototypes while here.

Reviewed by:	cem, jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10193
2017-05-17 00:34:34 +00:00