Commit Graph

2908 Commits

Author SHA1 Message Date
Gleb Smirnoff
42a58907c3 Make the "struct if_clone" opaque to users of the cloning API. Users
now use function calls:

  if_clone_simple()
  if_clone_advanced()

to initialize a cloner, instead of macros that initialize if_clone
structure.

Discussed with:		brooks, bz, 1 year ago
2012-10-16 13:37:54 +00:00
Nick Hibma
da016e84de Implement modem control in u3g. Tested on Option GTM382W, Huawei E220,
and Sierra Wireless MC8790V. Also implement the .ucom_poll method.

Note: This makes it possible to use lqr/echo in ppp.conf. And it
resolves ppp hanging during the PPp> phase.

Reviewed by:	hps
MFC after:	1 week
2012-10-14 19:15:54 +00:00
Eitan Adler
d6025c7bb7 Add support for the extrememory Snippy
PR:		usb/159611
Submitted by:	Fabian Keil <fk@fabiankeil.de>
Approved by:	cperciva (implicit)
MFC after:	3 days
2012-10-14 17:26:45 +00:00
Eitan Adler
c0f4985dbd Add support for Feiya Elango USB MicroSD
PR:		usb/153599
Submitted by:	CyberLeo <cyberleo@cyberleo.net>
Approved by:	cperciva (implicit)
MFC after:	3 days
2012-10-14 17:26:40 +00:00
Eitan Adler
35ed5bb738 Add support for the Buffalo RUF2 flash drive.
PR:		usb/166848
Submitted by:	Andrew Gregory <andrew@scss.com.au>
Reviewed by:	hselasky
Approved by:	cperciva (implicit)
MFC after:	3 days
2012-10-14 17:26:32 +00:00
Alexander Motin
72acfaabbf - Remove ancient checks for sim->softc == NULL. It can't be NULL, as it is
set not-NULL during SIM registration and set to UMASS_GONE on destruction.
Debug messages there look broken for at least 9 years, as they dereference
softc value that was just checked to be equal to NULL.
 - Remove magic pointer value UMASS_GONE and use simple NULL instead.

Found by:	Clang Static Analyzer
2012-10-10 22:02:11 +00:00
Kevin Lo
9823d52705 Revert previous commit...
Pointyhat to:	kevlo (myself)
2012-10-10 08:36:38 +00:00
Kevin Lo
a10cee30c9 Prefer NULL over 0 for pointers 2012-10-09 08:27:40 +00:00
Hans Petter Selasky
6320afb5c5 Style.
MFC after:	1 week
2012-10-02 10:09:23 +00:00
Hans Petter Selasky
1d8fa9519f Remove unused field.
MFC after:	1 week
2012-10-02 10:05:39 +00:00
Hans Petter Selasky
0324d54acb Inherit USB mode from RootHUB port where the USB device is connected.
Only RootHUB ports can be dual mode. Disallow OTG ports on external HUBs.
This simplifies some checks in the USB controller drivers.

MFC after:	1 week
2012-10-01 05:42:43 +00:00
Kevin Lo
000811380d If devclass_get_devices(9) returns success but a count of 0,
free the pointer.
2012-09-29 16:27:13 +00:00
Hans Petter Selasky
2196d98ea0 Make sure we don't leak a mbuf in a fail case. 2012-09-28 16:23:01 +00:00
Hans Petter Selasky
66249c7c82 Remove some trailing bytes which are not part of the ethernet packet.
Discussed with:		bgray @
2012-09-28 15:33:13 +00:00
Hans Petter Selasky
a3bfcf3e5d Correct NYET handling. Remove superfluous transfer complete interrupt mask. 2012-09-28 15:24:14 +00:00
Hans Petter Selasky
7a2275046d Make sure the "wMaxPacketSize" limitations are respected. 2012-09-27 15:45:24 +00:00
Hans Petter Selasky
19f9c619a2 Make sure we record NAK tokens in the TD structure for IN direction.
Improve host channel disabling. Wait two times 125us for channel to be
disabled. The DWC OTG doesn't like when channels are re-used too early.
2012-09-27 15:23:38 +00:00
Hans Petter Selasky
55df160153 Make sure the DWC OTG host mode channels are given enough time to disable. 2012-09-26 18:59:20 +00:00
Hans Petter Selasky
391d3f18dc DWC OTG host mode improvements:
- Make HSIC selection dynamic.
 - Make LOW speed USB devices work through HIGH speed USB HUB.
2012-09-24 16:34:13 +00:00
Hans Petter Selasky
3eabad2587 DWC OTG host mode improvements. Add support for the 3-strikes and you are
gone rule. Optimise use of channels so that when a channel
is not ready another channel is used. Instead of using the SOF interrupt
use the system timer to drive the host statemachine. This might
give lower throughput and higher latency, but reduces the CPU usage
significantly. The DWC OTG host mode support should not be considered
for serious USB host controller applications. Some problems are still
seen with LOW speed USB devices.
2012-09-23 12:19:19 +00:00
Hans Petter Selasky
3c12706c5e Correct driver name.
MFC after:	1 weeks
2012-09-23 09:39:04 +00:00
Hans Petter Selasky
9b42038b8a Apply some more casting. 2012-09-22 08:02:42 +00:00
Hans Petter Selasky
8692ca3647 Apply correct casting. 2012-09-22 07:27:24 +00:00
Hans Petter Selasky
2a4e4c6772 Fix typo. 2012-09-20 15:11:59 +00:00
Kevin Lo
26f370d011 Fix typo: s/protocl/protocol 2012-09-20 10:07:31 +00:00
Gavin Atkinson
d11d0374ab Add entries for two USB devices I have locally.
MFC after:	1 week
2012-09-18 22:25:49 +00:00
Hans Petter Selasky
d7dd13419e Add UQ_UMS_IGNORE quirk.
Wrap two long lines.
Some minor spelling correction.

PR:	usb/171721
2012-09-17 19:06:35 +00:00
Kevin Lo
4e4eb12038 Remove unused variable cd.
This variable is initialized but not used.
2012-09-17 09:32:11 +00:00
Hans Petter Selasky
b792f659e3 DWC OTG improvements. Implement full support for SPLIT transactions, in other
words FULL/LOW speed devices through HIGH speed HUBs. Improve support for
suspend and resume in host mode.
2012-09-14 07:52:57 +00:00
Hans Petter Selasky
beefefd4b0 Fix TX FIFO sizes. Correct FIFO handling in Host mode. 2012-09-12 19:15:29 +00:00
Kevin Lo
92665d2b55 Restart the USB transfer if the error is not USB_ERR_CANCELLED. 2012-09-12 07:59:28 +00:00
Hans Petter Selasky
d4b6c03ea9 Reduce DWC OTG polling rate by using the SOF interrupt. 2012-09-12 07:34:09 +00:00
Hans Petter Selasky
537aca954f Fix missing parts of DWC OTG host mode support. The host mode support
of the DWC OTG is very simple in PIO mode, and we need to re-transmit
data when NAK is received among other things. We probably will need
to implement some kind of rate limitation on the NAK-ing.
2012-09-11 22:08:19 +00:00
Hans Petter Selasky
e828eaabf4 Poll VBUS status every second, hence the AT91 GPIO library doesn't support
registering interrupt handlers yet for GPIO events.
2012-09-10 13:50:34 +00:00
Hans Petter Selasky
460febc7be Fix for IRQ hang in DWC OTG host mode. 2012-09-10 12:23:56 +00:00
Hans Petter Selasky
92a80a4cef Cleanup interrupt handling in Host Mode. 2012-09-10 08:23:56 +00:00
Hans Petter Selasky
58ecbe49f5 Implement missing USB suspend and resume support for DWC OTG driver. 2012-09-09 17:23:57 +00:00
Hans Petter Selasky
268ae63a2a Add support for DWC OTG. 2012-09-09 14:53:34 +00:00
Hans Petter Selasky
9cfd07315e Add support for host mode to the DWC OTG controller driver.
The DWC OTG host mode support should still be considered
experimental. Isochronous support for DWC OTG is not
fully implemented. Some code added derives from
Aleksandr Rybalko's dotg.c driver.
2012-09-09 14:41:34 +00:00
Gavin Atkinson
5163813777 Support another uchcom(4) device.
MFC after:	1 week
2012-09-04 23:13:24 +00:00
Hans Petter Selasky
f83fab0234 Add more DWC OTG register definitions.
Submitted by:	Nick Hudson
2012-09-03 15:22:02 +00:00
Hans Petter Selasky
710764f7c2 Preparations for adding USB HOST mode to the DWC OTG driver.
Merge register file with external one and put all register
definitions in a separate file.

Submitted by:	ray @
2012-08-30 16:19:05 +00:00
Hans Petter Selasky
a0942dd7b2 Add tunable for XHCI port routing.
MFC after:	1 week
2012-08-23 17:40:20 +00:00
Hans Petter Selasky
6623910e4a Add new USB device ID.
Submitted by:	Dmitry Luhtionov
MFC after:	1 week
2012-08-22 18:30:13 +00:00
Hans Petter Selasky
a451c791cc Style. 2012-08-21 20:18:01 +00:00
Hans Petter Selasky
b7d049b789 Fix USB drivers for KB920X target.
Add missing clock settings.
VBUS GPIO IRQ is still missing (TODO).
2012-08-21 20:10:59 +00:00
Hans Petter Selasky
419ce5a654 Add new USB device ID.
PR:		usb/170688
MFC after:	1 week
2012-08-17 16:27:11 +00:00
Hans Petter Selasky
c01fc06ee9 Revert r239178 and implement two new functions, namely
"device_free_softc()" and "device_claim_softc()",
to allow USB serial drivers refcounting the softc.
These functions are used to grab the softc from
auto-free and to free the softc back to the correct
malloc type, respectivly.

Discussed with:	jhb
MFC after:	2 weeks
2012-08-15 15:42:57 +00:00
Hans Petter Selasky
84e1a128d1 Add new USB device quirk.
Submitted by:	Kra OTN
MFC after:	2 weeks
2012-08-15 15:35:20 +00:00
Oleksandr Tymoshenko
b011f8c450 Merging of projects/armv6, part 5
- Driver for SMSC LAN95XX and LAN8710A ethernet controllers
- Driver for LAN8710A PHY

Submitted by:	Ben Gray, Damjan Marion, Tim Kientzle
2012-08-15 04:03:55 +00:00