Commit Graph

3023 Commits

Author SHA1 Message Date
kevlo
42d3ee4f93 Fix a typo: s/KLSI/CATC/ 2013-06-13 01:33:01 +00:00
rpaulo
86a8fe4a73 Use STRUCT_USB_HOST_ID to make sure we have the right ELF section. 2013-06-10 05:45:16 +00:00
rpaulo
8f36fe887a Import Kevin Lo's port of urtwn(4) from OpenBSD. urtwn(4) is a driver for the
Realtek RTL8188CU/RTL8192CU USB IEEE 802.11b/g/n wireless cards.
This driver requires microcode which is available in FreeBSD ports:
net/urtwn-firmware-kmod.

Hiren ported the urtwn(4) man page from OpenBSD and Glen just commited a port
for the firmware.

TODO:
- 802.11n support
- Stability fixes - the driver can sustain lots of traffic but has trouble
coping with simultaneous iperf sessions.
- fix debugging

MFC after:	2 months
Tested by:	kevlo, hiren, gjb
2013-06-08 16:02:31 +00:00
hselasky
216ef5e5fe Fix some recent regression issues:
1) Only multi-TD isochronous transfers should use NORMAL
type after specific type as per XHCI specification.

2) BEI bit is only available in NORMAL and ISOCHRONOUS
TRB types. Don't use this bit for other types to avoid
hardware asserts. Reserved bits should be don't care
though ...

MFC after:	1 week
PR:		usb/179342
2013-06-07 22:35:58 +00:00
hselasky
5311e12c93 Add support for polling the XHCI interrupt handler when
the regular interrupt handler is not working properly or
in case of MSI interrupts which are not yet supported.
Remove interrupt setup code for FreeBSD versions older
than 700031.

MFC after:	1 week
PR:		usb/179342
2013-06-07 14:30:06 +00:00
hiren
b0a4699398 Fixing a typo.
Approved by:	sbruno (mentor)
MFC after:	3 days
2013-06-03 22:22:53 +00:00
hselasky
174cc36edb Correct the TD size computation. npkt should reflect the number of packets
remaining after the current TRB has been executed. Refer to section 4.11.2.4
of the XHCI specification for USB.

MFC after:	1 week
2013-06-02 12:28:29 +00:00
hselasky
5aecb2fa14 Correct TRB type for multi TRB transfers of non-NORMAL type, like isochronous.
Only the first TRB should be markes as special. Subsequent ones should be
marked as NORMAL. Optimise away TD first variable.

MFC after:	1 week
2013-06-02 12:16:58 +00:00
hselasky
91382e18a7 Use the correct constant for 8000 IRQ/s.
MFC after:	1 week
2013-06-02 12:00:16 +00:00
hselasky
28fdbc94a3 Block event interrupts when we don't need it as soon as possible.
Typically this feature is used for isochronous transfers.
This reduces the amount of XHCI interrupting.

MFC after:	1 week
2013-06-02 11:58:31 +00:00
hselasky
58ab3853c2 Don't set the start ISOC ASAP bit for non-isochronous TRBs.
MFC after:	1 week
2013-06-02 10:54:47 +00:00
hselasky
7b42f3f2da Correct some XHCI streams mode transfer handling found by code inspection.
The existing streams mode support is not working and has not been tested
due to lack of hardware which supports the given feature.

MFC after:	1 week
2013-06-02 10:32:57 +00:00
eadler
d8a1822e27 Add support for tethering on the iPhone 4S
PR:	usb/179078
Submitted by:	Christopher Sean Hilton <chris@vindaloo.com>
MFC After:	1 week
2013-05-29 20:36:51 +00:00
hselasky
3d6f59397c Revert r251023 until a more proper solution is found
for ATI based USB controllers.

MFC after:	1 week
2013-05-28 18:51:30 +00:00
hselasky
e97a0dc965 Workaround for for a problem seen with ATI Technologies EHCI
controller hardware most likely present on UHCI chipsets aswell. The
bug manifests itself when issuing isochronous transfers and bulk
transfers towards the same device simultaneously. From time to time it
happens that either the completion IRQ was missing or that the
completion IRQ was happening before the ITD/SITD was completely
written back to memory. The workaround assumes that double buffered
isochronous transfers are used, and that a second interrupt is
generated at the beginning of the next isochronous transfer to
complete the previous one. Possibly skipping the interrupt at the last
isochronous frame is possible, but will then break single buffered
isochronous transfers. For now we can live with some extra interrupts.

MFC after:	1 week
2013-05-27 06:32:07 +00:00
hselasky
0a25601db3 Fix some statical clang analyzer warnings. 2013-05-25 17:09:58 +00:00
hselasky
dff9cf75d8 Add new USB quirk.
MFC after:	1 week
PR:		usb/178771
2013-05-21 06:13:38 +00:00
imp
f2e601b1f6 For ARM, MIPS, and PowerPC, default to 32-byte alignment, but allow it
to be as small as 8.
2013-05-17 20:53:15 +00:00
gavin
c519844bb9 o Retrive the part number (CP2103 etc) from the hardware on attach.
o  The CP2101 and CP2102 do not support GPIO pin use at all, enforce this.
o  Support reading the GPIO status on the second port of the CP2105.  More
   work is needed before the CP2105 GPIO pins can be used as outputs.

Hardware donated by:	Silicon Labs
MFC after:		3 weeks
2013-05-17 19:13:31 +00:00
eadler
6907881cb8 Fix several typos
PR:		kern/176054
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
MFC after:	3 days
2013-05-12 16:43:26 +00:00
hselasky
cc9f388839 Fix compile warning. 2013-05-03 13:33:36 +00:00
hselasky
fad53c9a9b - Add more defines to limit USB memory usage and number of allocations
in reduced memory systems.

- Split allocation and freeing of the configuration descriptor into a separate
function, so that the configuration descriptor can be made fixed size
to save memory allocations. This applies for both device and host mode.
2013-05-03 11:10:04 +00:00
hselasky
e7d3a7e303 Always put space before the comma before ##__VA_ARGS__ due to subtle compiler
differences.
2013-05-03 10:13:29 +00:00
hselasky
57751c1012 Add some defines to limit USB memory usage in reduced memory systems. 2013-05-03 09:23:06 +00:00
hselasky
345c64961e Allow the default USB template to be specified at compile time. 2013-05-03 08:19:09 +00:00
hselasky
b7fe9e8c88 Add new USB API to get the port path of a USB device.
MFC after:	2 weeks
Requested by:	emaste @
2013-05-03 07:44:58 +00:00
glebius
b4bc270e8f Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
hselasky
17ea3ba57c Add convenience wrapper functions to run callbacks in the context of the
USB explore thread.
2013-04-23 10:42:15 +00:00
hselasky
f9d1400e69 Add descriptive comment. 2013-04-23 06:26:54 +00:00
hselasky
993a273ad6 Add OHCI controller ID.
MFC after:	2 weeks
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
2013-04-21 16:02:50 +00:00
gabor
3d6a89082d - Correct mispellings of word miscellaneous
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
2013-04-17 11:43:46 +00:00
mav
d03d8a4ecf Add ID for ASMedia ASM1042 USB 3.0 controller.
MFC after:	1 week
2013-04-10 17:43:20 +00:00
hselasky
c29caa8936 Fix regression issue after r248910.
PR:		arm/177685
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2013-04-07 13:03:57 +00:00
hselasky
a45e6fa395 Add new USB ID.
PR:		usb/177666
Submitted by:	Nicolai Petri <nicolai@petri.dk>
2013-04-06 17:00:11 +00:00
hselasky
e9e96300b7 Add missing ifdef's for reduced feature compilations. 2013-04-03 10:31:13 +00:00
hselasky
b01bfe0b5b Add new USB ID.
MFC after:	1 week
Submitted by:	Bruce Simpson <bms@fastmail.net>
2013-04-03 06:45:21 +00:00
hselasky
8e557a9f12 Add new USB ID.
PR:		usb/177173
MFC after:	1 week
2013-03-21 07:04:17 +00:00
ray
a88f1a3d13 Integrate Efika MX project back to home.
Sponsored by:	The FreeBSD Foundation
2013-03-20 15:39:27 +00:00
hselasky
1ba62d29d1 Fix spelling. 2013-03-20 11:51:26 +00:00
hselasky
f67d1cc4dd Add new USB ID.
PR:		usb/177105
MFC after:	1 week
2013-03-19 12:52:13 +00:00
hselasky
77164fe10d Add new USB ID.
PR:		usb/177013
MFC after:	1 week
2013-03-18 07:02:58 +00:00
hselasky
586e58b27c Fix typo. 2013-03-13 15:42:04 +00:00
hselasky
2dd657bd7a - Make quirk for reading device descriptor from broken USB devices.
Else they won't enumerate at all:
hw.usb.full_ddesc=1
- Reduce the USB descriptor read timeout from 1000ms to
500ms. Typical value for LOW speed devices is 50-100ms.
- Enumerate USB device a maximum of 3 times when a port
connection change event is detected, before giving up.

MFC after:	1 month
2013-03-13 15:38:01 +00:00
gavin
842239b44e Add support for Optoelectronics USB barcode readers to uftdi(4).
Add entries for other Optoelectronics devices to usbdevs.

MFC after:	1 week
2013-03-11 22:17:39 +00:00
hselasky
14920d090f Fix init/uninit function type. 2013-02-25 10:57:35 +00:00
hselasky
a23dc2de30 Add new USB ID.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
2013-02-25 08:24:21 +00:00
hselasky
5d87c6bca9 Fix bad EEPROM parsing code.
MFC after:	2 weeks
2013-02-18 17:55:27 +00:00
hselasky
d7b1840a86 Add USB API to read power draw on USB devices.
Update usbconfig to print power draw on USB devices.

MFC after:	2 weeks
Submitted by:	Matt Burke @ icritical.com
2013-02-14 12:22:40 +00:00
hselasky
5f9d7af0e4 Remove unused variable.
MFC after:	1 week
2013-02-13 15:43:15 +00:00
hselasky
a40dc60f62 Resolve a LOR after r246616. Protect control requests using the USB device
enumeration lock. Make sure all callers of usbd_enum_lock() check the return
value. Remove the control transfer specific lock. Bump the FreeBSD version
number, hence external USB modules may need to be recompiled due to a USB
device structure change.

MFC after:	1 week
2013-02-13 12:35:17 +00:00