USB fixes for 3.17-rc3
Here are a bunch of fixes for the USB drivers for 3.17-rc3. Also in here is the movement of the usbip driver out of staging, into the "real" part of the kernel, it had to wait until after -rc1 to handle the merge issues involved between the USB and staging trees. The code is identical, just file movements there. The USB fixes are all over the place, new device ids, xhci fixes for reported issues and the usual gadget driver fixes as well. All have been in linux-next for a while now. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlQAuxcACgkQMUfUDdst+ylE8QCgk2luzxAMArd+mUKBajExD0a/ Hy4AoKb+cUezLDSHXPUyFuNg6zMs/JpQ =G9Gi -----END PGP SIGNATURE----- Merge tag 'usb-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a bunch of fixes for the USB drivers for 3.17-rc3. Also in here is the movement of the usbip driver out of staging, into the "real" part of the kernel, it had to wait until after -rc1 to handle the merge issues involved between the USB and staging trees. The code is identical, just file movements there. The USB fixes are all over the place, new device ids, xhci fixes for reported issues and the usual gadget driver fixes as well. All have been in linux-next for a while now" * tag 'usb-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (46 commits) USB: fix build error with CONFIG_PM_RUNTIME disabled Revert "usb: ehci/ohci-exynos: Fix PHY getting sequence" xhci: Disable streams on Via XHCI with device-id 0x3432 USB: serial: fix potential heap buffer overflow USB: serial: fix potential stack buffer overflow usb: ehci/ohci-exynos: Fix PHY getting sequence usb: hub: Prevent hub autosuspend if usbcore.autosuspend is -1 USB: sisusb: add device id for Magic Control USB video usb: dwc2: gadget: Set the default EP max packet value as 8 bytes usb: ehci: using wIndex + 1 for hub port USB: storage: add quirk for Newer Technology uSCSI SCSI-USB converter MAINTAINERS: Add an entry for USB/IP driver usbip: remove struct usb_device_id table usbip: move usbip kernel code out of staging usbip: move usbip userspace code out of staging USB: whiteheat: Added bounds checking for bulk command response usb: gadget: remove $(PWD) in ccflags-y usb: pch_udc: usb gadget device support for Intel Quark X1000 usb: gadget: uvc: fix possible lockup in uvc gadget usb: wusbcore: fix below build warning ...
This commit is contained in:
commit
848298c6fb
@ -9557,6 +9557,14 @@ S: Maintained
|
||||
F: Documentation/usb/ohci.txt
|
||||
F: drivers/usb/host/ohci*
|
||||
|
||||
USB OVER IP DRIVER
|
||||
M: Valentina Manea <valentina.manea.m@gmail.com>
|
||||
M: Shuah Khan <shuah.kh@samsung.com>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/usb/usbip/
|
||||
F: tools/usb/usbip/
|
||||
|
||||
USB PEGASUS DRIVER
|
||||
M: Petko Manolov <petkan@nucleusys.com>
|
||||
L: linux-usb@vger.kernel.org
|
||||
|
@ -28,8 +28,6 @@ source "drivers/staging/et131x/Kconfig"
|
||||
|
||||
source "drivers/staging/slicoss/Kconfig"
|
||||
|
||||
source "drivers/staging/usbip/Kconfig"
|
||||
|
||||
source "drivers/staging/wlan-ng/Kconfig"
|
||||
|
||||
source "drivers/staging/comedi/Kconfig"
|
||||
|
@ -6,7 +6,6 @@ obj-$(CONFIG_STAGING) += staging.o
|
||||
obj-y += media/
|
||||
obj-$(CONFIG_ET131X) += et131x/
|
||||
obj-$(CONFIG_SLICOSS) += slicoss/
|
||||
obj-$(CONFIG_USBIP_CORE) += usbip/
|
||||
obj-$(CONFIG_PRISM2_USB) += wlan-ng/
|
||||
obj-$(CONFIG_COMEDI) += comedi/
|
||||
obj-$(CONFIG_FB_OLPC_DCON) += olpc_dcon/
|
||||
|
@ -92,6 +92,8 @@ source "drivers/usb/storage/Kconfig"
|
||||
|
||||
source "drivers/usb/image/Kconfig"
|
||||
|
||||
source "drivers/usb/usbip/Kconfig"
|
||||
|
||||
endif
|
||||
|
||||
source "drivers/usb/musb/Kconfig"
|
||||
|
@ -60,3 +60,5 @@ obj-$(CONFIG_USB_RENESAS_USBHS) += renesas_usbhs/
|
||||
obj-$(CONFIG_USB_GADGET) += gadget/
|
||||
|
||||
obj-$(CONFIG_USB_COMMON) += common/
|
||||
|
||||
obj-$(CONFIG_USBIP_CORE) += usbip/
|
||||
|
@ -1728,8 +1728,14 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
||||
* - Change autosuspend delay of hub can avoid unnecessary auto
|
||||
* suspend timer for hub, also may decrease power consumption
|
||||
* of USB bus.
|
||||
*
|
||||
* - If user has indicated to prevent autosuspend by passing
|
||||
* usbcore.autosuspend = -1 then keep autosuspend disabled.
|
||||
*/
|
||||
pm_runtime_set_autosuspend_delay(&hdev->dev, 0);
|
||||
#ifdef CONFIG_PM_RUNTIME
|
||||
if (hdev->dev.power.autosuspend_delay >= 0)
|
||||
pm_runtime_set_autosuspend_delay(&hdev->dev, 0);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hubs have proper suspend/resume support, except for root hubs
|
||||
@ -2107,8 +2113,8 @@ void usb_disconnect(struct usb_device **pdev)
|
||||
{
|
||||
struct usb_port *port_dev = NULL;
|
||||
struct usb_device *udev = *pdev;
|
||||
struct usb_hub *hub;
|
||||
int port1;
|
||||
struct usb_hub *hub = NULL;
|
||||
int port1 = 1;
|
||||
|
||||
/* mark the device as inactive, so any further urb submissions for
|
||||
* this device (and any of its children) will fail immediately.
|
||||
@ -4631,9 +4637,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
|
||||
if (status != -ENODEV &&
|
||||
port1 != unreliable_port &&
|
||||
printk_ratelimit())
|
||||
dev_err(&udev->dev, "connect-debounce failed, port %d disabled\n",
|
||||
port1);
|
||||
|
||||
dev_err(&port_dev->dev, "connect-debounce failed\n");
|
||||
portstatus &= ~USB_PORT_STAT_CONNECTION;
|
||||
unreliable_port = port1;
|
||||
} else {
|
||||
|
@ -1901,7 +1901,7 @@ static void s3c_hsotg_epint(struct s3c_hsotg *hsotg, unsigned int idx,
|
||||
static void s3c_hsotg_irq_enumdone(struct s3c_hsotg *hsotg)
|
||||
{
|
||||
u32 dsts = readl(hsotg->regs + DSTS);
|
||||
int ep0_mps = 0, ep_mps;
|
||||
int ep0_mps = 0, ep_mps = 8;
|
||||
|
||||
/*
|
||||
* This should signal the finish of the enumeration phase
|
||||
|
@ -425,7 +425,7 @@ static void dwc3_omap_set_utmi_mode(struct dwc3_omap *omap)
|
||||
|
||||
static int dwc3_omap_extcon_register(struct dwc3_omap *omap)
|
||||
{
|
||||
u32 ret;
|
||||
int ret;
|
||||
struct device_node *node = omap->dev->of_node;
|
||||
struct extcon_dev *edev;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
subdir-ccflags-$(CONFIG_USB_GADGET_DEBUG) := -DDEBUG
|
||||
subdir-ccflags-$(CONFIG_USB_GADGET_VERBOSE) += -DVERBOSE_DEBUG
|
||||
ccflags-y += -I$(PWD)/drivers/usb/gadget/udc
|
||||
ccflags-y += -Idrivers/usb/gadget/udc
|
||||
|
||||
obj-$(CONFIG_USB_LIBCOMPOSITE) += libcomposite.o
|
||||
libcomposite-y := usbstring.o config.o epautoconf.o
|
||||
|
@ -2,8 +2,8 @@
|
||||
# USB peripheral controller drivers
|
||||
#
|
||||
|
||||
ccflags-y := -I$(PWD)/drivers/usb/gadget/
|
||||
ccflags-y += -I$(PWD)/drivers/usb/gadget/udc/
|
||||
ccflags-y := -Idrivers/usb/gadget/
|
||||
ccflags-y += -Idrivers/usb/gadget/udc/
|
||||
|
||||
# USB Functions
|
||||
usb_f_acm-y := f_acm.o
|
||||
|
@ -1127,10 +1127,7 @@ void gether_disconnect(struct gether *link)
|
||||
|
||||
DBG(dev, "%s\n", __func__);
|
||||
|
||||
netif_tx_lock(dev->net);
|
||||
netif_stop_queue(dev->net);
|
||||
netif_tx_unlock(dev->net);
|
||||
|
||||
netif_carrier_off(dev->net);
|
||||
|
||||
/* disable endpoints, forcing (synchronous) completion
|
||||
|
@ -195,6 +195,7 @@ uvc_video_complete(struct usb_ep *ep, struct usb_request *req)
|
||||
printk(KERN_INFO "Failed to queue request (%d).\n", ret);
|
||||
usb_ep_set_halt(ep);
|
||||
spin_unlock_irqrestore(&video->queue.irqlock, flags);
|
||||
uvc_queue_cancel(queue, 0);
|
||||
goto requeue;
|
||||
}
|
||||
spin_unlock_irqrestore(&video->queue.irqlock, flags);
|
||||
@ -281,6 +282,7 @@ error:
|
||||
static int
|
||||
uvc_video_pump(struct uvc_video *video)
|
||||
{
|
||||
struct uvc_video_queue *queue = &video->queue;
|
||||
struct usb_request *req;
|
||||
struct uvc_buffer *buf;
|
||||
unsigned long flags;
|
||||
@ -322,6 +324,7 @@ uvc_video_pump(struct uvc_video *video)
|
||||
printk(KERN_INFO "Failed to queue request (%d)\n", ret);
|
||||
usb_ep_set_halt(video->ep);
|
||||
spin_unlock_irqrestore(&video->queue.irqlock, flags);
|
||||
uvc_queue_cancel(queue, 0);
|
||||
break;
|
||||
}
|
||||
spin_unlock_irqrestore(&video->queue.irqlock, flags);
|
||||
|
@ -2,9 +2,9 @@
|
||||
# USB gadget drivers
|
||||
#
|
||||
|
||||
ccflags-y := -I$(PWD)/drivers/usb/gadget/
|
||||
ccflags-y += -I$(PWD)/drivers/usb/gadget/udc/
|
||||
ccflags-y += -I$(PWD)/drivers/usb/gadget/function/
|
||||
ccflags-y := -Idrivers/usb/gadget/
|
||||
ccflags-y += -Idrivers/usb/gadget/udc/
|
||||
ccflags-y += -Idrivers/usb/gadget/function/
|
||||
|
||||
g_zero-y := zero.o
|
||||
g_audio-y := audio.o
|
||||
|
@ -222,10 +222,12 @@ static void dbgp_unbind(struct usb_gadget *gadget)
|
||||
{
|
||||
#ifdef CONFIG_USB_G_DBGP_SERIAL
|
||||
kfree(dbgp.serial);
|
||||
dbgp.serial = NULL;
|
||||
#endif
|
||||
if (dbgp.req) {
|
||||
kfree(dbgp.req->buf);
|
||||
usb_ep_free_request(gadget->ep0, dbgp.req);
|
||||
dbgp.req = NULL;
|
||||
}
|
||||
|
||||
gadget->ep0->driver_data = NULL;
|
||||
|
@ -440,7 +440,7 @@ ep_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
|
||||
|
||||
value = -ENOMEM;
|
||||
kbuf = memdup_user(buf, len);
|
||||
if (!kbuf) {
|
||||
if (IS_ERR(kbuf)) {
|
||||
value = PTR_ERR(kbuf);
|
||||
goto free1;
|
||||
}
|
||||
|
@ -332,7 +332,7 @@ config USB_GOKU
|
||||
gadget drivers to also be dynamically linked.
|
||||
|
||||
config USB_EG20T
|
||||
tristate "Intel EG20T PCH/LAPIS Semiconductor IOH(ML7213/ML7831) UDC"
|
||||
tristate "Intel QUARK X1000/EG20T PCH/LAPIS Semiconductor IOH(ML7213/ML7831) UDC"
|
||||
depends on PCI
|
||||
help
|
||||
This is a USB device driver for EG20T PCH.
|
||||
@ -353,6 +353,7 @@ config USB_EG20T
|
||||
ML7213/ML7831 is companion chip for Intel Atom E6xx series.
|
||||
ML7213/ML7831 is completely compatible for Intel EG20T PCH.
|
||||
|
||||
This driver can be used with Intel's Quark X1000 SOC platform
|
||||
#
|
||||
# LAST -- dummy/emulated controller
|
||||
#
|
||||
|
@ -1661,7 +1661,7 @@ static irqreturn_t usba_udc_irq(int irq, void *devid)
|
||||
if (dma_status) {
|
||||
int i;
|
||||
|
||||
for (i = 1; i < USBA_NR_DMAS; i++)
|
||||
for (i = 1; i <= USBA_NR_DMAS; i++)
|
||||
if (dma_status & (1 << i))
|
||||
usba_dma_irq(udc, &udc->usba_ep[i]);
|
||||
}
|
||||
|
@ -1398,13 +1398,17 @@ static int fusb300_probe(struct platform_device *pdev)
|
||||
|
||||
/* initialize udc */
|
||||
fusb300 = kzalloc(sizeof(struct fusb300), GFP_KERNEL);
|
||||
if (fusb300 == NULL)
|
||||
if (fusb300 == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
for (i = 0; i < FUSB300_MAX_NUM_EP; i++) {
|
||||
_ep[i] = kzalloc(sizeof(struct fusb300_ep), GFP_KERNEL);
|
||||
if (_ep[i] == NULL)
|
||||
if (_ep[i] == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto clean_up;
|
||||
}
|
||||
fusb300->ep[i] = _ep[i];
|
||||
}
|
||||
|
||||
|
@ -343,6 +343,7 @@ struct pch_vbus_gpio_data {
|
||||
* @setup_data: Received setup data
|
||||
* @phys_addr: of device memory
|
||||
* @base_addr: for mapped device memory
|
||||
* @bar: Indicates which PCI BAR for USB regs
|
||||
* @irq: IRQ line for the device
|
||||
* @cfg_data: current cfg, intf, and alt in use
|
||||
* @vbus_gpio: GPIO informaton for detecting VBUS
|
||||
@ -370,14 +371,17 @@ struct pch_udc_dev {
|
||||
struct usb_ctrlrequest setup_data;
|
||||
unsigned long phys_addr;
|
||||
void __iomem *base_addr;
|
||||
unsigned bar;
|
||||
unsigned irq;
|
||||
struct pch_udc_cfg_data cfg_data;
|
||||
struct pch_vbus_gpio_data vbus_gpio;
|
||||
};
|
||||
#define to_pch_udc(g) (container_of((g), struct pch_udc_dev, gadget))
|
||||
|
||||
#define PCH_UDC_PCI_BAR_QUARK_X1000 0
|
||||
#define PCH_UDC_PCI_BAR 1
|
||||
#define PCI_DEVICE_ID_INTEL_EG20T_UDC 0x8808
|
||||
#define PCI_DEVICE_ID_INTEL_QUARK_X1000_UDC 0x0939
|
||||
#define PCI_VENDOR_ID_ROHM 0x10DB
|
||||
#define PCI_DEVICE_ID_ML7213_IOH_UDC 0x801D
|
||||
#define PCI_DEVICE_ID_ML7831_IOH_UDC 0x8808
|
||||
@ -3076,7 +3080,7 @@ static void pch_udc_remove(struct pci_dev *pdev)
|
||||
iounmap(dev->base_addr);
|
||||
if (dev->mem_region)
|
||||
release_mem_region(dev->phys_addr,
|
||||
pci_resource_len(pdev, PCH_UDC_PCI_BAR));
|
||||
pci_resource_len(pdev, dev->bar));
|
||||
if (dev->active)
|
||||
pci_disable_device(pdev);
|
||||
kfree(dev);
|
||||
@ -3144,9 +3148,15 @@ static int pch_udc_probe(struct pci_dev *pdev,
|
||||
dev->active = 1;
|
||||
pci_set_drvdata(pdev, dev);
|
||||
|
||||
/* Determine BAR based on PCI ID */
|
||||
if (id->device == PCI_DEVICE_ID_INTEL_QUARK_X1000_UDC)
|
||||
dev->bar = PCH_UDC_PCI_BAR_QUARK_X1000;
|
||||
else
|
||||
dev->bar = PCH_UDC_PCI_BAR;
|
||||
|
||||
/* PCI resource allocation */
|
||||
resource = pci_resource_start(pdev, 1);
|
||||
len = pci_resource_len(pdev, 1);
|
||||
resource = pci_resource_start(pdev, dev->bar);
|
||||
len = pci_resource_len(pdev, dev->bar);
|
||||
|
||||
if (!request_mem_region(resource, len, KBUILD_MODNAME)) {
|
||||
dev_err(&pdev->dev, "%s: pci device used already\n", __func__);
|
||||
@ -3211,6 +3221,12 @@ finished:
|
||||
}
|
||||
|
||||
static const struct pci_device_id pch_udc_pcidev_id[] = {
|
||||
{
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL,
|
||||
PCI_DEVICE_ID_INTEL_QUARK_X1000_UDC),
|
||||
.class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe,
|
||||
.class_mask = 0xffffffff,
|
||||
},
|
||||
{
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EG20T_UDC),
|
||||
.class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe,
|
||||
|
@ -1868,8 +1868,8 @@ static int r8a66597_probe(struct platform_device *pdev)
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
reg = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (!reg)
|
||||
return -ENODEV;
|
||||
if (IS_ERR(reg))
|
||||
return PTR_ERR(reg);
|
||||
|
||||
ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
irq = ires->start;
|
||||
|
@ -1230,7 +1230,7 @@ int ehci_hub_control(
|
||||
if (selector == EHSET_TEST_SINGLE_STEP_SET_FEATURE) {
|
||||
spin_unlock_irqrestore(&ehci->lock, flags);
|
||||
retval = ehset_single_step_set_feature(hcd,
|
||||
wIndex);
|
||||
wIndex + 1);
|
||||
spin_lock_irqsave(&ehci->lock, flags);
|
||||
break;
|
||||
}
|
||||
|
@ -101,6 +101,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
/* AMD PLL quirk */
|
||||
if (pdev->vendor == PCI_VENDOR_ID_AMD && usb_amd_find_chipset_info())
|
||||
xhci->quirks |= XHCI_AMD_PLL_FIX;
|
||||
|
||||
if (pdev->vendor == PCI_VENDOR_ID_AMD)
|
||||
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
|
||||
|
||||
if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
|
||||
xhci->quirks |= XHCI_LPM_SUPPORT;
|
||||
xhci->quirks |= XHCI_INTEL_HOST;
|
||||
@ -151,6 +155,11 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
if (pdev->vendor == PCI_VENDOR_ID_VIA)
|
||||
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
||||
|
||||
/* See https://bugzilla.kernel.org/show_bug.cgi?id=79511 */
|
||||
if (pdev->vendor == PCI_VENDOR_ID_VIA &&
|
||||
pdev->device == 0x3432)
|
||||
xhci->quirks |= XHCI_BROKEN_STREAMS;
|
||||
|
||||
if (xhci->quirks & XHCI_RESET_ON_RESUME)
|
||||
xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
|
||||
"QUIRK: Resetting on resume");
|
||||
|
@ -364,32 +364,6 @@ static void ring_doorbell_for_active_rings(struct xhci_hcd *xhci,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Find the segment that trb is in. Start searching in start_seg.
|
||||
* If we must move past a segment that has a link TRB with a toggle cycle state
|
||||
* bit set, then we will toggle the value pointed at by cycle_state.
|
||||
*/
|
||||
static struct xhci_segment *find_trb_seg(
|
||||
struct xhci_segment *start_seg,
|
||||
union xhci_trb *trb, int *cycle_state)
|
||||
{
|
||||
struct xhci_segment *cur_seg = start_seg;
|
||||
struct xhci_generic_trb *generic_trb;
|
||||
|
||||
while (cur_seg->trbs > trb ||
|
||||
&cur_seg->trbs[TRBS_PER_SEGMENT - 1] < trb) {
|
||||
generic_trb = &cur_seg->trbs[TRBS_PER_SEGMENT - 1].generic;
|
||||
if (generic_trb->field[3] & cpu_to_le32(LINK_TOGGLE))
|
||||
*cycle_state ^= 0x1;
|
||||
cur_seg = cur_seg->next;
|
||||
if (cur_seg == start_seg)
|
||||
/* Looped over the entire list. Oops! */
|
||||
return NULL;
|
||||
}
|
||||
return cur_seg;
|
||||
}
|
||||
|
||||
|
||||
static struct xhci_ring *xhci_triad_to_transfer_ring(struct xhci_hcd *xhci,
|
||||
unsigned int slot_id, unsigned int ep_index,
|
||||
unsigned int stream_id)
|
||||
@ -459,9 +433,12 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci,
|
||||
struct xhci_virt_device *dev = xhci->devs[slot_id];
|
||||
struct xhci_virt_ep *ep = &dev->eps[ep_index];
|
||||
struct xhci_ring *ep_ring;
|
||||
struct xhci_generic_trb *trb;
|
||||
struct xhci_segment *new_seg;
|
||||
union xhci_trb *new_deq;
|
||||
dma_addr_t addr;
|
||||
u64 hw_dequeue;
|
||||
bool cycle_found = false;
|
||||
bool td_last_trb_found = false;
|
||||
|
||||
ep_ring = xhci_triad_to_transfer_ring(xhci, slot_id,
|
||||
ep_index, stream_id);
|
||||
@ -486,45 +463,45 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci,
|
||||
hw_dequeue = le64_to_cpu(ep_ctx->deq);
|
||||
}
|
||||
|
||||
/* Find virtual address and segment of hardware dequeue pointer */
|
||||
state->new_deq_seg = ep_ring->deq_seg;
|
||||
state->new_deq_ptr = ep_ring->dequeue;
|
||||
while (xhci_trb_virt_to_dma(state->new_deq_seg, state->new_deq_ptr)
|
||||
!= (dma_addr_t)(hw_dequeue & ~0xf)) {
|
||||
next_trb(xhci, ep_ring, &state->new_deq_seg,
|
||||
&state->new_deq_ptr);
|
||||
if (state->new_deq_ptr == ep_ring->dequeue) {
|
||||
WARN_ON(1);
|
||||
new_seg = ep_ring->deq_seg;
|
||||
new_deq = ep_ring->dequeue;
|
||||
state->new_cycle_state = hw_dequeue & 0x1;
|
||||
|
||||
/*
|
||||
* We want to find the pointer, segment and cycle state of the new trb
|
||||
* (the one after current TD's last_trb). We know the cycle state at
|
||||
* hw_dequeue, so walk the ring until both hw_dequeue and last_trb are
|
||||
* found.
|
||||
*/
|
||||
do {
|
||||
if (!cycle_found && xhci_trb_virt_to_dma(new_seg, new_deq)
|
||||
== (dma_addr_t)(hw_dequeue & ~0xf)) {
|
||||
cycle_found = true;
|
||||
if (td_last_trb_found)
|
||||
break;
|
||||
}
|
||||
if (new_deq == cur_td->last_trb)
|
||||
td_last_trb_found = true;
|
||||
|
||||
if (cycle_found &&
|
||||
TRB_TYPE_LINK_LE32(new_deq->generic.field[3]) &&
|
||||
new_deq->generic.field[3] & cpu_to_le32(LINK_TOGGLE))
|
||||
state->new_cycle_state ^= 0x1;
|
||||
|
||||
next_trb(xhci, ep_ring, &new_seg, &new_deq);
|
||||
|
||||
/* Search wrapped around, bail out */
|
||||
if (new_deq == ep->ring->dequeue) {
|
||||
xhci_err(xhci, "Error: Failed finding new dequeue state\n");
|
||||
state->new_deq_seg = NULL;
|
||||
state->new_deq_ptr = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Find cycle state for last_trb, starting at old cycle state of
|
||||
* hw_dequeue. If there is only one segment ring, find_trb_seg() will
|
||||
* return immediately and cannot toggle the cycle state if this search
|
||||
* wraps around, so add one more toggle manually in that case.
|
||||
*/
|
||||
state->new_cycle_state = hw_dequeue & 0x1;
|
||||
if (ep_ring->first_seg == ep_ring->first_seg->next &&
|
||||
cur_td->last_trb < state->new_deq_ptr)
|
||||
state->new_cycle_state ^= 0x1;
|
||||
|
||||
state->new_deq_ptr = cur_td->last_trb;
|
||||
xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
|
||||
"Finding segment containing last TRB in TD.");
|
||||
state->new_deq_seg = find_trb_seg(state->new_deq_seg,
|
||||
state->new_deq_ptr, &state->new_cycle_state);
|
||||
if (!state->new_deq_seg) {
|
||||
WARN_ON(1);
|
||||
return;
|
||||
}
|
||||
} while (!cycle_found || !td_last_trb_found);
|
||||
|
||||
/* Increment to find next TRB after last_trb. Cycle if appropriate. */
|
||||
trb = &state->new_deq_ptr->generic;
|
||||
if (TRB_TYPE_LINK_LE32(trb->field[3]) &&
|
||||
(trb->field[3] & cpu_to_le32(LINK_TOGGLE)))
|
||||
state->new_cycle_state ^= 0x1;
|
||||
next_trb(xhci, ep_ring, &state->new_deq_seg, &state->new_deq_ptr);
|
||||
state->new_deq_seg = new_seg;
|
||||
state->new_deq_ptr = new_deq;
|
||||
|
||||
/* Don't update the ring cycle state for the producer (us). */
|
||||
xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
|
||||
@ -2487,7 +2464,8 @@ static int handle_tx_event(struct xhci_hcd *xhci,
|
||||
* last TRB of the previous TD. The command completion handle
|
||||
* will take care the rest.
|
||||
*/
|
||||
if (!event_seg && trb_comp_code == COMP_STOP_INVAL) {
|
||||
if (!event_seg && (trb_comp_code == COMP_STOP ||
|
||||
trb_comp_code == COMP_STOP_INVAL)) {
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -2880,6 +2880,9 @@ void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci,
|
||||
ep_index, ep->stopped_stream, ep->stopped_td,
|
||||
&deq_state);
|
||||
|
||||
if (!deq_state.new_deq_ptr || !deq_state.new_deq_seg)
|
||||
return;
|
||||
|
||||
/* HW with the reset endpoint quirk will use the saved dequeue state to
|
||||
* issue a configure endpoint command later.
|
||||
*/
|
||||
|
@ -3250,6 +3250,7 @@ static const struct usb_device_id sisusb_table[] = {
|
||||
{ USB_DEVICE(0x0711, 0x0918) },
|
||||
{ USB_DEVICE(0x0711, 0x0920) },
|
||||
{ USB_DEVICE(0x0711, 0x0950) },
|
||||
{ USB_DEVICE(0x0711, 0x5200) },
|
||||
{ USB_DEVICE(0x182d, 0x021c) },
|
||||
{ USB_DEVICE(0x182d, 0x0269) },
|
||||
{ }
|
||||
|
@ -96,7 +96,7 @@ static bool ux500_configure_channel(struct dma_channel *channel,
|
||||
struct musb *musb = ux500_channel->controller->private_data;
|
||||
|
||||
dev_dbg(musb->controller,
|
||||
"packet_sz=%d, mode=%d, dma_addr=0x%llu, len=%d is_tx=%d\n",
|
||||
"packet_sz=%d, mode=%d, dma_addr=0x%llx, len=%d is_tx=%d\n",
|
||||
packet_sz, mode, (unsigned long long) dma_addr,
|
||||
len, ux500_channel->is_tx);
|
||||
|
||||
|
@ -260,10 +260,8 @@ static int gpio_vbus_probe(struct platform_device *pdev)
|
||||
|
||||
gpio_vbus->phy.otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg),
|
||||
GFP_KERNEL);
|
||||
if (!gpio_vbus->phy.otg) {
|
||||
kfree(gpio_vbus);
|
||||
if (!gpio_vbus->phy.otg)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, gpio_vbus);
|
||||
gpio_vbus->dev = &pdev->dev;
|
||||
|
@ -1601,8 +1601,8 @@ static int msm_otg_probe(struct platform_device *pdev)
|
||||
*/
|
||||
if (motg->phy_number) {
|
||||
phy_select = devm_ioremap_nocache(&pdev->dev, USB2_PHY_SEL, 4);
|
||||
if (IS_ERR(phy_select))
|
||||
return PTR_ERR(phy_select);
|
||||
if (!phy_select)
|
||||
return -ENOMEM;
|
||||
/* Enable second PHY with the OTG port */
|
||||
writel(0x1, phy_select);
|
||||
}
|
||||
|
@ -216,7 +216,7 @@
|
||||
|
||||
#define EXYNOS5_DRD_PHYPARAM1 (0x20)
|
||||
|
||||
#define PHYPARAM1_PCS_TXDEEMPH_MASK (0x1f << 0)
|
||||
#define PHYPARAM1_PCS_TXDEEMPH_MASK (0x3f << 0)
|
||||
#define PHYPARAM1_PCS_TXDEEMPH (0x1c)
|
||||
|
||||
#define EXYNOS5_DRD_PHYTERM (0x24)
|
||||
|
@ -232,6 +232,9 @@ struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
|
||||
phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
|
||||
if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) {
|
||||
dev_dbg(dev, "unable to find transceiver\n");
|
||||
if (!IS_ERR(phy))
|
||||
phy = ERR_PTR(-ENODEV);
|
||||
|
||||
goto err0;
|
||||
}
|
||||
|
||||
|
@ -146,6 +146,7 @@ static const struct usb_device_id id_table_combined[] = {
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_BM_ATOM_NANO_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_NXTCAM_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_EV3CON_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) },
|
||||
@ -934,6 +935,8 @@ static const struct usb_device_id id_table_combined[] = {
|
||||
{ USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_2_PID) },
|
||||
{ USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_3_PID) },
|
||||
{ USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_4_PID) },
|
||||
/* ekey Devices */
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_EKEY_CONV_USB_PID) },
|
||||
/* Infineon Devices */
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_PID, 1) },
|
||||
{ } /* Terminating entry */
|
||||
|
@ -42,6 +42,8 @@
|
||||
/* www.candapter.com Ewert Energy Systems CANdapter device */
|
||||
#define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */
|
||||
|
||||
#define FTDI_BM_ATOM_NANO_PID 0xa559 /* Basic Micro ATOM Nano USB2Serial */
|
||||
|
||||
/*
|
||||
* Texas Instruments XDS100v2 JTAG / BeagleBone A3
|
||||
* http://processors.wiki.ti.com/index.php/XDS100
|
||||
@ -1378,3 +1380,8 @@
|
||||
#define BRAINBOXES_US_160_6_PID 0x9006 /* US-160 16xRS232 1Mbaud Port 11 and 12 */
|
||||
#define BRAINBOXES_US_160_7_PID 0x9007 /* US-160 16xRS232 1Mbaud Port 13 and 14 */
|
||||
#define BRAINBOXES_US_160_8_PID 0x9008 /* US-160 16xRS232 1Mbaud Port 15 and 16 */
|
||||
|
||||
/*
|
||||
* ekey biometric systems GmbH (http://ekey.net/)
|
||||
*/
|
||||
#define FTDI_EKEY_CONV_USB_PID 0xCB08 /* Converter USB */
|
||||
|
@ -275,8 +275,12 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define ZTE_PRODUCT_MF622 0x0001
|
||||
#define ZTE_PRODUCT_MF628 0x0015
|
||||
#define ZTE_PRODUCT_MF626 0x0031
|
||||
#define ZTE_PRODUCT_MC2718 0xffe8
|
||||
#define ZTE_PRODUCT_AC2726 0xfff1
|
||||
#define ZTE_PRODUCT_CDMA_TECH 0xfffe
|
||||
#define ZTE_PRODUCT_AC8710T 0xffff
|
||||
#define ZTE_PRODUCT_MC2718 0xffe8
|
||||
#define ZTE_PRODUCT_AD3812 0xffeb
|
||||
#define ZTE_PRODUCT_MC2716 0xffed
|
||||
|
||||
#define BENQ_VENDOR_ID 0x04a5
|
||||
#define BENQ_PRODUCT_H10 0x4068
|
||||
@ -494,6 +498,10 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define INOVIA_VENDOR_ID 0x20a6
|
||||
#define INOVIA_SEW858 0x1105
|
||||
|
||||
/* VIA Telecom */
|
||||
#define VIATELECOM_VENDOR_ID 0x15eb
|
||||
#define VIATELECOM_PRODUCT_CDS7 0x0001
|
||||
|
||||
/* some devices interfaces need special handling due to a number of reasons */
|
||||
enum option_blacklist_reason {
|
||||
OPTION_BLACKLIST_NONE = 0,
|
||||
@ -527,10 +535,18 @@ static const struct option_blacklist_info zte_k3765_z_blacklist = {
|
||||
.reserved = BIT(4),
|
||||
};
|
||||
|
||||
static const struct option_blacklist_info zte_ad3812_z_blacklist = {
|
||||
.sendsetup = BIT(0) | BIT(1) | BIT(2),
|
||||
};
|
||||
|
||||
static const struct option_blacklist_info zte_mc2718_z_blacklist = {
|
||||
.sendsetup = BIT(1) | BIT(2) | BIT(3) | BIT(4),
|
||||
};
|
||||
|
||||
static const struct option_blacklist_info zte_mc2716_z_blacklist = {
|
||||
.sendsetup = BIT(1) | BIT(2) | BIT(3),
|
||||
};
|
||||
|
||||
static const struct option_blacklist_info huawei_cdc12_blacklist = {
|
||||
.reserved = BIT(1) | BIT(2),
|
||||
};
|
||||
@ -1070,6 +1086,7 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1012, 0xff) },
|
||||
{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) },
|
||||
{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */
|
||||
@ -1544,13 +1561,18 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff93, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff94, 0xff, 0xff, 0xff) },
|
||||
|
||||
/* NOTE: most ZTE CDMA devices should be driven by zte_ev, not option */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff),
|
||||
.driver_info = (kernel_ulong_t)&zte_mc2718_z_blacklist },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AD3812, 0xff, 0xff, 0xff),
|
||||
.driver_info = (kernel_ulong_t)&zte_ad3812_z_blacklist },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff),
|
||||
.driver_info = (kernel_ulong_t)&zte_mc2716_z_blacklist },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) },
|
||||
|
||||
{ USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) },
|
||||
{ USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) },
|
||||
@ -1724,6 +1746,7 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */
|
||||
{ USB_DEVICE(INOVIA_VENDOR_ID, INOVIA_SEW858) },
|
||||
{ USB_DEVICE(VIATELECOM_VENDOR_ID, VIATELECOM_PRODUCT_CDS7) },
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, option_ids);
|
||||
@ -1916,6 +1939,8 @@ static void option_instat_callback(struct urb *urb)
|
||||
dev_dbg(dev, "%s: type %x req %x\n", __func__,
|
||||
req_pkt->bRequestType, req_pkt->bRequest);
|
||||
}
|
||||
} else if (status == -ENOENT || status == -ESHUTDOWN) {
|
||||
dev_dbg(dev, "%s: urb stopped: %d\n", __func__, status);
|
||||
} else
|
||||
dev_err(dev, "%s: error %d\n", __func__, status);
|
||||
|
||||
|
@ -45,6 +45,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_GPRS) },
|
||||
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_HCR331) },
|
||||
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MOTOROLA) },
|
||||
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ZTEK) },
|
||||
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
|
||||
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },
|
||||
{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
|
||||
|
@ -22,6 +22,7 @@
|
||||
#define PL2303_PRODUCT_ID_GPRS 0x0609
|
||||
#define PL2303_PRODUCT_ID_HCR331 0x331a
|
||||
#define PL2303_PRODUCT_ID_MOTOROLA 0x0307
|
||||
#define PL2303_PRODUCT_ID_ZTEK 0xe1f1
|
||||
|
||||
#define ATEN_VENDOR_ID 0x0557
|
||||
#define ATEN_VENDOR_ID2 0x0547
|
||||
|
@ -764,29 +764,39 @@ static int usb_serial_probe(struct usb_interface *interface,
|
||||
if (usb_endpoint_is_bulk_in(endpoint)) {
|
||||
/* we found a bulk in endpoint */
|
||||
dev_dbg(ddev, "found bulk in on endpoint %d\n", i);
|
||||
bulk_in_endpoint[num_bulk_in] = endpoint;
|
||||
++num_bulk_in;
|
||||
if (num_bulk_in < MAX_NUM_PORTS) {
|
||||
bulk_in_endpoint[num_bulk_in] = endpoint;
|
||||
++num_bulk_in;
|
||||
}
|
||||
}
|
||||
|
||||
if (usb_endpoint_is_bulk_out(endpoint)) {
|
||||
/* we found a bulk out endpoint */
|
||||
dev_dbg(ddev, "found bulk out on endpoint %d\n", i);
|
||||
bulk_out_endpoint[num_bulk_out] = endpoint;
|
||||
++num_bulk_out;
|
||||
if (num_bulk_out < MAX_NUM_PORTS) {
|
||||
bulk_out_endpoint[num_bulk_out] = endpoint;
|
||||
++num_bulk_out;
|
||||
}
|
||||
}
|
||||
|
||||
if (usb_endpoint_is_int_in(endpoint)) {
|
||||
/* we found a interrupt in endpoint */
|
||||
dev_dbg(ddev, "found interrupt in on endpoint %d\n", i);
|
||||
interrupt_in_endpoint[num_interrupt_in] = endpoint;
|
||||
++num_interrupt_in;
|
||||
if (num_interrupt_in < MAX_NUM_PORTS) {
|
||||
interrupt_in_endpoint[num_interrupt_in] =
|
||||
endpoint;
|
||||
++num_interrupt_in;
|
||||
}
|
||||
}
|
||||
|
||||
if (usb_endpoint_is_int_out(endpoint)) {
|
||||
/* we found an interrupt out endpoint */
|
||||
dev_dbg(ddev, "found interrupt out on endpoint %d\n", i);
|
||||
interrupt_out_endpoint[num_interrupt_out] = endpoint;
|
||||
++num_interrupt_out;
|
||||
if (num_interrupt_out < MAX_NUM_PORTS) {
|
||||
interrupt_out_endpoint[num_interrupt_out] =
|
||||
endpoint;
|
||||
++num_interrupt_out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -809,8 +819,10 @@ static int usb_serial_probe(struct usb_interface *interface,
|
||||
if (usb_endpoint_is_int_in(endpoint)) {
|
||||
/* we found a interrupt in endpoint */
|
||||
dev_dbg(ddev, "found interrupt in for Prolific device on separate interface\n");
|
||||
interrupt_in_endpoint[num_interrupt_in] = endpoint;
|
||||
++num_interrupt_in;
|
||||
if (num_interrupt_in < MAX_NUM_PORTS) {
|
||||
interrupt_in_endpoint[num_interrupt_in] = endpoint;
|
||||
++num_interrupt_in;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -850,6 +862,11 @@ static int usb_serial_probe(struct usb_interface *interface,
|
||||
num_ports = type->num_ports;
|
||||
}
|
||||
|
||||
if (num_ports > MAX_NUM_PORTS) {
|
||||
dev_warn(ddev, "too many ports requested: %d\n", num_ports);
|
||||
num_ports = MAX_NUM_PORTS;
|
||||
}
|
||||
|
||||
serial->num_ports = num_ports;
|
||||
serial->num_bulk_in = num_bulk_in;
|
||||
serial->num_bulk_out = num_bulk_out;
|
||||
|
@ -514,6 +514,10 @@ static void command_port_read_callback(struct urb *urb)
|
||||
dev_dbg(&urb->dev->dev, "%s - command_info is NULL, exiting.\n", __func__);
|
||||
return;
|
||||
}
|
||||
if (!urb->actual_length) {
|
||||
dev_dbg(&urb->dev->dev, "%s - empty response, exiting.\n", __func__);
|
||||
return;
|
||||
}
|
||||
if (status) {
|
||||
dev_dbg(&urb->dev->dev, "%s - nonzero urb status: %d\n", __func__, status);
|
||||
if (status != -ENOENT)
|
||||
@ -534,7 +538,8 @@ static void command_port_read_callback(struct urb *urb)
|
||||
/* These are unsolicited reports from the firmware, hence no
|
||||
waiting command to wakeup */
|
||||
dev_dbg(&urb->dev->dev, "%s - event received\n", __func__);
|
||||
} else if (data[0] == WHITEHEAT_GET_DTR_RTS) {
|
||||
} else if ((data[0] == WHITEHEAT_GET_DTR_RTS) &&
|
||||
(urb->actual_length - 1 <= sizeof(command_info->result_buffer))) {
|
||||
memcpy(command_info->result_buffer, &data[1],
|
||||
urb->actual_length - 1);
|
||||
command_info->command_finished = WHITEHEAT_CMD_COMPLETE;
|
||||
|
@ -272,28 +272,8 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port)
|
||||
}
|
||||
|
||||
static const struct usb_device_id id_table[] = {
|
||||
/* AC8710, AC8710T */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xffff, 0xff, 0xff, 0xff) },
|
||||
/* AC8700 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xfffe, 0xff, 0xff, 0xff) },
|
||||
/* MG880 */
|
||||
{ USB_DEVICE(0x19d2, 0xfffd) },
|
||||
{ USB_DEVICE(0x19d2, 0xfffc) },
|
||||
{ USB_DEVICE(0x19d2, 0xfffb) },
|
||||
/* AC8710_V3 */
|
||||
{ USB_DEVICE(0x19d2, 0xfff6) },
|
||||
{ USB_DEVICE(0x19d2, 0xfff7) },
|
||||
{ USB_DEVICE(0x19d2, 0xfff8) },
|
||||
{ USB_DEVICE(0x19d2, 0xfff9) },
|
||||
{ USB_DEVICE(0x19d2, 0xffee) },
|
||||
/* AC2716, MC2716 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xffed, 0xff, 0xff, 0xff) },
|
||||
/* AD3812 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xffeb, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE(0x19d2, 0xffec) },
|
||||
{ USB_DEVICE(0x05C6, 0x3197) },
|
||||
{ USB_DEVICE(0x05C6, 0x6000) },
|
||||
{ USB_DEVICE(0x05C6, 0x9008) },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, id_table);
|
||||
|
@ -922,6 +922,12 @@ UNUSUAL_DEV( 0x069b, 0x3004, 0x0001, 0x0001,
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_FIX_CAPACITY ),
|
||||
|
||||
UNUSUAL_DEV( 0x06ca, 0x2003, 0x0100, 0x0100,
|
||||
"Newer Technology",
|
||||
"uSCSI",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init,
|
||||
US_FL_SCM_MULT_TARG ),
|
||||
|
||||
/* Reported by Adrian Pilchowiec <adi1981@epf.pl> */
|
||||
UNUSUAL_DEV( 0x071b, 0x3203, 0x0000, 0x0000,
|
||||
"RockChip",
|
||||
|
@ -25,33 +25,6 @@
|
||||
#include "usbip_common.h"
|
||||
#include "stub.h"
|
||||
|
||||
/*
|
||||
* Define device IDs here if you want to explicitly limit exportable devices.
|
||||
* In most cases, wildcard matching will be okay because driver binding can be
|
||||
* changed dynamically by a userland program.
|
||||
*/
|
||||
static struct usb_device_id stub_table[] = {
|
||||
#if 0
|
||||
/* just an example */
|
||||
{ USB_DEVICE(0x05ac, 0x0301) }, /* Mac 1 button mouse */
|
||||
{ USB_DEVICE(0x0430, 0x0009) }, /* Plat Home Keyboard */
|
||||
{ USB_DEVICE(0x059b, 0x0001) }, /* Iomega USB Zip 100 */
|
||||
{ USB_DEVICE(0x04b3, 0x4427) }, /* IBM USB CD-ROM */
|
||||
{ USB_DEVICE(0x05a9, 0xa511) }, /* LifeView USB cam */
|
||||
{ USB_DEVICE(0x55aa, 0x0201) }, /* Imation card reader */
|
||||
{ USB_DEVICE(0x046d, 0x0870) }, /* Qcam Express(QV-30) */
|
||||
{ USB_DEVICE(0x04bb, 0x0101) }, /* IO-DATA HD 120GB */
|
||||
{ USB_DEVICE(0x04bb, 0x0904) }, /* IO-DATA USB-ET/TX */
|
||||
{ USB_DEVICE(0x04bb, 0x0201) }, /* IO-DATA USB-ET/TX */
|
||||
{ USB_DEVICE(0x08bb, 0x2702) }, /* ONKYO USB Speaker */
|
||||
{ USB_DEVICE(0x046d, 0x08b2) }, /* Logicool Qcam 4000 Pro */
|
||||
#endif
|
||||
/* magic for wild card */
|
||||
{ .driver_info = 1 },
|
||||
{ 0, } /* Terminating entry */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, stub_table);
|
||||
|
||||
/*
|
||||
* usbip_status shows the status of usbip-host as long as this driver is bound
|
||||
* to the target device.
|
@ -29,7 +29,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/wait.h>
|
||||
#include "uapi/usbip.h"
|
||||
#include <uapi/linux/usbip.h>
|
||||
|
||||
#define USBIP_VERSION "1.0.0"
|
||||
|
@ -2602,6 +2602,7 @@ static void wa_buf_in_cb(struct urb *urb)
|
||||
dev = &wa->usb_iface->dev;
|
||||
--(wa->active_buf_in_urbs);
|
||||
active_buf_in_urbs = wa->active_buf_in_urbs;
|
||||
rpipe = xfer->ep->hcpriv;
|
||||
|
||||
if (usb_pipeisoc(xfer->urb->pipe)) {
|
||||
struct usb_iso_packet_descriptor *iso_frame_desc =
|
||||
@ -2659,7 +2660,6 @@ static void wa_buf_in_cb(struct urb *urb)
|
||||
resubmit_dti = (isoc_data_frame_count ==
|
||||
urb_frame_count);
|
||||
} else if (active_buf_in_urbs == 0) {
|
||||
rpipe = xfer->ep->hcpriv;
|
||||
dev_dbg(dev,
|
||||
"xfer %p 0x%08X#%u: data in done (%zu bytes)\n",
|
||||
xfer, wa_xfer_id(xfer), seg->index,
|
||||
@ -2685,7 +2685,6 @@ static void wa_buf_in_cb(struct urb *urb)
|
||||
*/
|
||||
resubmit_dti = wa->dti_state != WA_DTI_TRANSFER_RESULT_PENDING;
|
||||
spin_lock_irqsave(&xfer->lock, flags);
|
||||
rpipe = xfer->ep->hcpriv;
|
||||
if (printk_ratelimit())
|
||||
dev_err(dev, "xfer %p 0x%08X#%u: data in error %d\n",
|
||||
xfer, wa_xfer_id(xfer), seg->index,
|
||||
|
Loading…
Reference in New Issue
Block a user