Commit Graph

2859 Commits

Author SHA1 Message Date
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
Gavin Atkinson
c64253a898 Rename command defines to match names used in the datasheet, in order to
make maintaining this driver from the documentation easier in the future.
This is a mostly mechanical change.

In uslcom_param(), move the zeroing of the final two fields of the
flowctrl structure outside of the "if CRTSCTS" section - not only were
they being zeroed in both the clauses, but these two fields have nothing
to do with hardware flow control anyway.
2012-08-14 22:21:46 +00:00
Hans Petter Selasky
f61fc4bd7d Fix for missing locks due to recent change.
PR:		usb/170606
MFC after:	2 weeks
2012-08-13 18:34:04 +00:00
Hans Petter Selasky
e9cec01683 Rename new IOCTL to singular form of the noun "streams".
MFC after:	2 weeks
2012-08-13 18:09:19 +00:00
Hans Petter Selasky
0cb5abc7ca Improve auto-quirks detection for certain Kingston memory sticks.
MFC after:	2 weeks
2012-08-13 18:00:34 +00:00
Hans Petter Selasky
a015554f40 Compile fix.
MFC after:	2 weeks
2012-08-12 19:58:56 +00:00
Hans Petter Selasky
a5cf1aaaff Add support for the so-called streams feature of BULK endpoints
in SUPER-speed mode, USB 3.0.

This feature has not been tested yet, due to lack of hardware.

This feature is useful when implementing protocols like UASP,
USB attached SCSI which promises higher USB mass storage throughput.

This patch also implements support for hardware processing of endpoints
for increased performance. The switching to hardware processing
of an endpoint is done via a callback to the USB controller driver. The
stream feature is implemented like a variant of a hardware USB protocol.

USB controller drivers implementing device mode needs to be updated to
implement the new "xfer_stall" USB controller method and remove the
"xfer" argument from the "set_stall" method.

The API's toward existing USB drivers are preserved. To setup a USB transfer
in stream mode, set the "stream_id" field of the USB config structure to
the desired value.

The maximum number of BULK streams is currently hardcoded and limited to 8
via a define in usb_freebsd.h.

All USB drivers should be re-compiled after this change.

LibUSB will be updated next week to support streams mode. A new IOCTL to
setup BULK streams as already been implemented. The ugen device nodes
currently only supports stream ID zero.

The FreeBSD version has been bumped.

MFC after:	2 weeks
2012-08-12 17:53:06 +00:00
Hans Petter Selasky
65b31289ae Style.
MFC after:	2 weeks
2012-08-10 17:43:20 +00:00
Hans Petter Selasky
1216d2c543 Remove unused structure field.
MFC after:	2 weeks
2012-08-10 17:42:14 +00:00
Hans Petter Selasky
5805d1782d Take advantage of new UCOM and bus functionality so that
the device_detach() function doesn't block on UCOM device
drivers until the TTY handle is closed by the userspace
application. This is implemented by a postpone of the
softc free where the UCOM structures reside until the
TTY references are gone.

Discussed with:	kib, ed
MFC after:	2 weeks
2012-08-10 15:29:41 +00:00
Hans Petter Selasky
8f42c74844 Switch unit management in UCOM to unrhdr.
Extend the callback table of UCOM to include a
"ucom_free" function pointer which is called when
all refs on a UCOM super structure is gone.

Implement various helper functions to handle
refcounting and draining on the UCOM super
structure.

Implement macro which can be used in device
drivers to avoid module unload before all
pending TTY references are gone.

The UCOM API is backwards compatible after this
change and device drivers require no changes
to function with this change. Only a recompilation
of UCOM device drivers is required. The FreeBSD
version has been bumped in that regard.

Discussed with:	kib, ed
MFC after:	2 weeks
2012-08-10 15:21:12 +00:00
Hans Petter Selasky
2203949434 Style.
MFC after:	2 weeks
2012-08-10 14:51:41 +00:00
Hans Petter Selasky
f83858fe37 Fix spelling.
MFC after:	2 weeks
2012-08-10 14:44:04 +00:00
Hans Petter Selasky
3426950e9c Update the list of devices supported by the FTDI driver. It might be
that the wrong UART reference clock will be used for a few of the IDs.
It is currently not possible to figure that out because the Linux FTDI
driver detects this run-time and not compile time based on the bcdDevice
field of the USB device descriptor. Some of the ID's in usbdevs are not
sorted according to the product ID value. Please feel free to fix this.
I'm out of my xemacs magic today.

This syncronises us with the linux kernel at kernel.org (HEAD).

MFC after:	2 weeks
2012-08-05 11:50:56 +00:00
Hans Petter Selasky
7a27d904bd Minor style nit:
Use the interface number from the USB interface descriptor
like in the other USB serial drivers. These numbers are not
supposed to be different, though in theory they can. Make sure
that the driver then uses the interface number given by the USB
descriptor, and not the logical index of the USB stack.

For the future:
Whenever the term "index" is used in the USB code, it refers to
a number computed by the USB stack.
Whenever the term "number" is used in the USB code, it refers to
a number in a USB descriptor.

MFC after:	2 weeks
2012-08-05 08:56:29 +00:00
Gavin Atkinson
b5ba3bdb25 Support multiple interface devices. The driver had previously hardcoded
support for only the first port, but the CP2105 can have multiple ports.
Although this allowed the first port to mostly work on multi port devices,
there could be issues with this arrangement.

Update the man page to reflect support for both ports and the CP2105.

Many thanks to Silicon Labs (www.silabs.com) for providing a CP2105-EK
dev board for testing.

MFC after:	2 weeks
2012-08-04 15:11:36 +00:00
Warner Losh
6020cc464d Make this compile again. Also note that it is AT91RM9200+KB9202B
specific still and needs some love to make it work on anything else.
2012-07-27 17:28:11 +00:00
Warner Losh
21818d2313 Minor style(9) nit. 2012-07-27 05:24:09 +00:00
Gavin Atkinson
a713d656da Improve descriptions for several devices supported by uslcom(4).
Correct the spelling of the company Telegesis.
Move MpMan to the correct location alphabetically.

MFC after:	2 weeks
2012-07-26 12:18:23 +00:00
Gavin Atkinson
78a1f1400f Add support for more devices to uslcom(4). This commit syncronises the
list of supported devices with the union of:

NetBSD  src/sys/dev/usb/uslsa.c 1.18
OpenBSD src/sys/dev/usb/uslcom.c 1.24
Linux   source/drivers/usb/serial/cp210x.c HEAD

Remove duplicate JABLOTRON PC60B entry.

Note that some of the devices added here are multi-port devices.  The
uslcom(4) driver currently only supports the first port on such devices.

Update the man page to reflect the full list of supported devices.
Remove two caveats from the CAVEATS section, as both listed caveats no
longer apply.  Add a caveat about multi-port devices.

MFC after:	2 weeks
2012-07-26 12:10:19 +00:00
Gavin Atkinson
7f14a4d6b1 Add vendor.product for a mouse I have laying around 2012-07-25 21:32:55 +00:00
Gavin Atkinson
0ba4723b9e The baud rate on CP1201/2/3 devices can be set in one of two ways:
- The USLCOM_SET_BAUD_DIV command (0x01)
 - The USLCOM_SET_BAUD_RATE command (0x13)

Devices based on the CP1204 will only accept the latter command, and ignore
the former.  As the latter command works on all chips that this driver
supports, switch to always using it.

A slight confusion here is that the previously used command was incorrectly
named USLCOM_BAUD_RATE - even though we no longer use it, rename it to
USLCOM_SET_BAUD_DIV to closer match the name used in the datasheet.

This change reflects a similar change made in the Linux driver, which was
submitted by preston.fick at silabs.com, and has been tested on all of the
uslcom(4) devices I have to hand.

MFC after:	2 weeks
2012-07-25 20:46:22 +00:00
Gavin Atkinson
d01755ed20 Update the list of devices supported by uplcom. Although this only adds
one device (support for Motorola cables), this syncronises us with:

OpenBSD src/sys/dev/usb/uplcom.c 1.56
NetBSD  src/sys/dev/usb/uplcom.c 1.73
Linux   kernel.org HEAD

MFC after:	1 week
2012-07-25 11:33:43 +00:00
Ed Maste
b225878c75 Quirk MS keyboard so that function keys work
The function keys on a Microsoft Natural Egronomic Keyboard 4000 have been
repurposed as "Help", "Undo", "Redo" etc., and a special "F Lock" key is
required to return them to their normal purpose.

This change enables the UQ_KBD_BOOTPROTO quirk for the MS Natural 4000
keyboard to get the keys working again.  More extensive changes to the USB
keyboard infrastructure would be needed to fully support the "F Lock" mode
and the extended keys on this keyboard.

PR:		usb/116947
Approved by:	hselasky@
2012-07-23 15:14:28 +00:00
Eygene Ryabinkin
411e2f7fc8 u3g: add support for Huawei E392 LTE modem
I am using it rebranded and it carries the label "Megafon"
(it is Russian mobile operator); works fine with my 3G network.

Approved by: hselasky
2012-07-23 14:22:45 +00:00
Alexander Motin
f4f6d5e0ab For Intel Panther/Lynx Point USB 3.0 xHCI controllers enable SuperSpeed USB
capability and reroute USB 2.0 ports to the xHCI controller.

Reviewed by:	hselasky
2012-07-17 14:03:04 +00:00
Hans Petter Selasky
c6b5a9a02b Add new USB device ID.
PR:		usb/169789
Submitted by:	Ruslan Bukin
MFC after:	1 week
2012-07-16 10:12:07 +00:00
Hans Petter Selasky
6446f79981 Add new USB device ID.
PR:		usb/169789
MFC after:	1 week
2012-07-16 09:35:47 +00:00
Hans Petter Selasky
48804d9c0e Add new USB device ID.
PR:		usb/169789
MFC after:	1 week
2012-07-15 18:12:09 +00:00
Rui Paulo
63490e32b2 The JP1082 device doesn't respond to the MII_BMSR command and it turns
out that it has an unusable PHY. It still works, although very slowly,
without a PHY, so I implemented non-PHY support in the udav driver.
2012-07-15 05:49:02 +00:00
Hiroki Sato
89b4ba9934 Merge from r234532:
- Fix an ifname matching issue which prevented "ifconfig wlan0 create" from
  working.
- Return non-zero status when unit < 0.

Spotted by:	dhw
2012-07-11 02:57:32 +00:00
Hiroki Sato
739047446d Make usbusN logging pseudo-interface used by usbdump(8) clonable. One is
now created/destroyed automatically by usbdump(8).

Note that "hw.usb.no_pf" loader tunable is now obsolete.

Reviewed by:	hselasky
2012-07-09 07:25:09 +00:00
Hiroki Sato
be5033937a - Add support of the following USB devices to run(4):
* Logitec LAN-W150N/U2
 * Buffalo WLI-UC-GNM2

- Add device id of Planex GW-USValue-EZ.
2012-07-09 06:34:15 +00:00
Hans Petter Selasky
583cd66931 Add new USB device ID.
Submitted by:	Erich Dollansky
MFC after:	1 week
2012-07-03 16:32:47 +00:00
Hans Petter Selasky
e84260dce4 Add more quirks for USB mass storage adapters.
Submitted by:	Erich Dollansky
MFC after:	1 week
2012-07-03 16:29:41 +00:00
Alexander Motin
f0d0cee0be Add IDs for some USB controllers I have around. Just a cosmetics.
MFC after:	3 days
2012-07-02 19:35:56 +00:00
Marius Strobl
f3b44896bb Refine r237102 a bit:
- Anounce JTAG interfaces deliberately skipped.
- Bring back empty lines too eagerly removed.

MFC after:	3 days
2012-06-18 19:18:31 +00:00
Marius Strobl
a589806b07 - Add support for the FT2232 based egnite Turtelizer 2 JTAG/RS232 Adapter.
This includes adding support for skipping FTDI interfaces used for JTAG
  leaving them for userland and just attaching to the RS232 half, similarly
  to how the corresponding Linux drivers handles these kind of adapters.
  While at it, sort uftdi_devs and return BUS_PROBE_SPECIFIC (because
  uftdi_probe() alters the instance variables for better or worse as do
  other probe routines of USB drivers) instead of 0.
- Remove duplicated entries for BeagleBone.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Remove some stray lines.

MFC after:	3 days
2012-06-14 21:16:19 +00:00
Hans Petter Selasky
271e5fb00d Add more quirks for USB MIDI adapters.
Obtained from:	Clemens Ladisch
MFC after:	1 week
2012-06-14 16:20:19 +00:00
Hans Petter Selasky
bb57146269 Add appropriate checks for ic_bsschan being set to IEEE80211_CHAN_ANYC in
some of the USB WLAN drivers. This fixes a panic when using monitor mode.

MFC after:	1 week
Submitted by:	PseudoCylon
2012-06-02 09:10:51 +00:00
Hans Petter Selasky
d9073c1e6a Improve support for detaching kernel drivers on a per interface basis.
MFC after:	1 week
2012-06-01 16:30:54 +00:00
Rafal Jaworowski
c49504be41 Import EHCI attachment driver for Freescale integrated controller.
Obtained from:	Freescale, Semihalf.
Written by:	Michal Dubiel
2012-05-26 21:05:11 +00:00
Marius Strobl
243d601f05 Make the VIA workaround application somewhat more consistent with the
ATI one.
2012-05-26 08:43:51 +00:00
Marius Strobl
af3839c4ab Consistently use USB_PAGE_SIZE. Currently, this is cosmetic.
MFC after:	3 days
2012-05-26 08:33:53 +00:00
Marius Strobl
7e543a0ed3 Make the VIA workaround actually do its intended job.
MFC after:	3 days
2012-05-26 08:31:12 +00:00
Alexander Motin
3dfe1a8e49 Fix for the r235558: interrupt output pipe is optional, so fix the driver
attach and operation when it is absent.

Sponsored by:	iXsystems, Inc.
MFC after:	1 week
2012-05-17 22:04:17 +00:00
Alexander Motin
3a38def3ed Add support for writing to HID devices through the interrupt output pipe.
Supermicro LCD screen modules seem to not support accessing reports through
the control pipes, but working fine with the interrupt pipes.

Sponsored by:	iXsystems, Inc.
MFC after:	1 week
2012-05-17 18:40:27 +00:00
Alexander Motin
cff79d9ed3 HID Report ID is unsigned value, so clear the rest of bits from possible
sign expansion.
2012-05-16 17:51:56 +00:00
Hans Petter Selasky
32e79f5540 Move reset of USB mouse parameters from the USB mouse attach to
the USB mouse device open. Protect against multi character
device open. Some other nits.

MFC after:	1 week
2012-05-14 17:00:32 +00:00
Marius Strobl
e4029d4cac - Change the module order of these MAC drivers to be last so they are
deterministically handled after the corresponding PHY drivers when
  loaded as modules. Otherwise, when these MAC/PHY driver pairs are
  compiled into a single module probing the PHY driver may fail. This
  makes r151438 and r226154 actually work. [1]
  Reported and tested by: yongari (fxp(4))
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

Submitted by:	jhb [1]
MFC after:	3 days
2012-05-11 02:40:40 +00:00