usb: gadget: net2280: Add support for PLX USB338X
PATCH v3 1/1 usb: gadget: net2280: Add support for PLX USB338X
This patch adds support for the PLX USB3380 and USB3382.
This driver is based on the driver from the manufacturer.
Since USB338X is register compatible with NET2280, I thought that it would be better to include this hardware into net2280 driver.
Manufacturer's driver only supported the USB33X, did not follow the Kernel Style and contain some trivial errors. This patch has tried to address this issues.
This patch has only been tested on USB338x hardware, but the merge has been done trying to not affect the behaviour of NET2280.
---
v3: -Fix Double parenthesis
-Comments by Joe Perches:
- declare ep_bit as global const
- logical continuations at end of line
- fix multiline comment
v2:
-use usb_ep_set_maxpacket_limit
-usb338x: Fix support for high speed
drivers/usb/gadget/Kconfig | 10 +- drivers/usb/gadget/net2280.c | 1115 ++++++++++++++++++++++++++++++++++++++---- drivers/usb/gadget/net2280.h | 97 +++- include/linux/usb/usb338x.h | 199 ++++++++ 4 files changed, 1330 insertions(+), 91 deletions(-) create mode 100644 include/linux/usb/usb338x.h
drivers/usb/gadget/Kconfig +9 -1
@@ -415,7 +415,7 @@ config USB_NET2272_DMA If unsure, say "N" here. The driver works fine in PIO mode. config USB_NET2280 - tristate "NetChip 228x" + tristate "NetChip 228x / PLX USB338x" depends on PCI help NetChip 2280 / 2282 is a PCI based USB peripheral controller which
@@ -425,6 +425,14 @@ config USB_NET2280 (for control transfers) and several endpoints with dedicated functions. + PLX 3380 / 3382 is a PCIe based USB peripheral controller which + supports full, high speed USB 2.0 and super speed USB 3.0 + data transfers. + + It has eight configurable endpoints, as well as endpoint zero + (for control transfers) and several endpoints with dedicated + functions. + Say "y" to link the driver statically, or "m" to build a dynamically linked module called "net2280" and force all gadget drivers to also be dynamically linked.
drivers/usb/gadget/net2280.c +1030 -85
1,503 lines not on this page · raw message
drivers/usb/gadget/net2280.h +92 -5
173 lines not on this page · raw message
include/linux/usb/usb338x.h new file +199 -0
199 lines not on this page · raw message
Signature · 1 line
2.0.0.rc0