diff --git a/[refs] b/[refs] index 2124dd843b24..5541592b7123 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 97f93227e646741adf4d7cbf4baf7a087746e93a +refs/heads/master: 3abeca998a44205cfd837fa0bf1f7c24f8294acb diff --git a/trunk/drivers/usb/class/cdc-acm.c b/trunk/drivers/usb/class/cdc-acm.c index 395a347f2ebb..58754b508a0f 100644 --- a/trunk/drivers/usb/class/cdc-acm.c +++ b/trunk/drivers/usb/class/cdc-acm.c @@ -853,7 +853,7 @@ static int acm_probe(struct usb_interface *intf, u8 ac_management_function = 0; u8 call_management_function = 0; int call_interface_num = -1; - int data_interface_num = -1; + int data_interface_num; unsigned long quirks; int num_rx_buf; int i; @@ -937,11 +937,7 @@ static int acm_probe(struct usb_interface *intf, if (!union_header) { if (call_interface_num > 0) { dev_dbg(&intf->dev, "No union descriptor, using call management descriptor\n"); - /* quirks for Droids MuIn LCD */ - if (quirks & NO_DATA_INTERFACE) - data_interface = usb_ifnum_to_if(usb_dev, 0); - else - data_interface = usb_ifnum_to_if(usb_dev, (data_interface_num = call_interface_num)); + data_interface = usb_ifnum_to_if(usb_dev, (data_interface_num = call_interface_num)); control_interface = intf; } else { if (intf->cur_altsetting->desc.bNumEndpoints != 3) { @@ -1539,11 +1535,6 @@ static const struct usb_device_id acm_ids[] = { .driver_info = NOT_A_MODEM, }, - /* Support for Droids MuIn LCD */ - { USB_DEVICE(0x04d8, 0x000b), - .driver_info = NO_DATA_INTERFACE, - }, - /* control interfaces without any protocol set */ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM, USB_CDC_PROTO_NONE) }, diff --git a/trunk/drivers/usb/class/cdc-acm.h b/trunk/drivers/usb/class/cdc-acm.h index ca7937f26e27..7b5c0bd07f80 100644 --- a/trunk/drivers/usb/class/cdc-acm.h +++ b/trunk/drivers/usb/class/cdc-acm.h @@ -126,4 +126,3 @@ struct acm { #define SINGLE_RX_URB 2 #define NO_CAP_LINE 4 #define NOT_A_MODEM 8 -#define NO_DATA_INTERFACE 16 diff --git a/trunk/drivers/usb/host/xhci-ring.c b/trunk/drivers/usb/host/xhci-ring.c index c35058b94de6..237a765f8d18 100644 --- a/trunk/drivers/usb/host/xhci-ring.c +++ b/trunk/drivers/usb/host/xhci-ring.c @@ -1641,6 +1641,9 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td, else *status = 0; break; + case COMP_STOP_INVAL: + case COMP_STOP: + return finish_td(xhci, td, event_trb, event, ep, status, false); default: if (!xhci_requires_manual_halt_cleanup(xhci, ep_ctx, trb_comp_code)) @@ -1685,15 +1688,12 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td, } } else { /* Maybe the event was for the data stage? */ - if (trb_comp_code != COMP_STOP_INVAL) { - /* We didn't stop on a link TRB in the middle */ - td->urb->actual_length = - td->urb->transfer_buffer_length - - TRB_LEN(le32_to_cpu(event->transfer_len)); - xhci_dbg(xhci, "Waiting for status " - "stage event\n"); - return 0; - } + td->urb->actual_length = + td->urb->transfer_buffer_length - + TRB_LEN(le32_to_cpu(event->transfer_len)); + xhci_dbg(xhci, "Waiting for status " + "stage event\n"); + return 0; } } diff --git a/trunk/drivers/usb/renesas_usbhs/common.c b/trunk/drivers/usb/renesas_usbhs/common.c index f3664d6af661..34e68e0205c5 100644 --- a/trunk/drivers/usb/renesas_usbhs/common.c +++ b/trunk/drivers/usb/renesas_usbhs/common.c @@ -321,11 +321,11 @@ static int __devinit usbhs_probe(struct platform_device *pdev) /* call pipe and module init */ ret = usbhs_pipe_probe(priv); if (ret < 0) - goto probe_end_iounmap; + goto probe_end_mod_exit; ret = usbhs_mod_probe(priv); if (ret < 0) - goto probe_end_pipe_exit; + goto probe_end_iounmap; /* dev_set_drvdata should be called after usbhs_mod_init */ dev_set_drvdata(&pdev->dev, priv); @@ -346,7 +346,7 @@ static int __devinit usbhs_probe(struct platform_device *pdev) ret = usbhs_platform_call(priv, hardware_init, pdev); if (ret < 0) { dev_err(&pdev->dev, "platform prove failed.\n"); - goto probe_end_mod_exit; + goto probe_end_pipe_exit; } /* reset phy for connection */ @@ -372,10 +372,10 @@ static int __devinit usbhs_probe(struct platform_device *pdev) probe_end_call_remove: usbhs_platform_call(priv, hardware_exit, pdev); -probe_end_mod_exit: - usbhs_mod_remove(priv); probe_end_pipe_exit: usbhs_pipe_remove(priv); +probe_end_mod_exit: + usbhs_mod_remove(priv); probe_end_iounmap: iounmap(priv->base); probe_end_kfree: @@ -403,8 +403,8 @@ static int __devexit usbhs_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); usbhs_platform_call(priv, hardware_exit, pdev); - usbhs_mod_remove(priv); usbhs_pipe_remove(priv); + usbhs_mod_remove(priv); iounmap(priv->base); kfree(priv); diff --git a/trunk/drivers/usb/renesas_usbhs/pipe.c b/trunk/drivers/usb/renesas_usbhs/pipe.c index bc4521c54261..5897ddad05f2 100644 --- a/trunk/drivers/usb/renesas_usbhs/pipe.c +++ b/trunk/drivers/usb/renesas_usbhs/pipe.c @@ -183,6 +183,7 @@ static void usbhsp_pipe_select(struct usbhs_pipe *pipe) static int usbhsp_pipe_barrier(struct usbhs_pipe *pipe) { struct usbhs_priv *priv = usbhsp_pipe_to_priv(pipe); + struct device *dev = usbhs_priv_to_dev(priv); int timeout = 1024; u16 val; @@ -205,7 +206,6 @@ static int usbhsp_pipe_barrier(struct usbhs_pipe *pipe) * - "Pipe Control Registers Switching Procedure" */ usbhs_write(priv, CFIFOSEL, 0); - usbhs_fifo_disable(pipe); do { val = usbhsp_pipectrl_get(pipe); @@ -217,6 +217,21 @@ static int usbhsp_pipe_barrier(struct usbhs_pipe *pipe) } while (timeout--); + /* + * force NAK + */ + timeout = 1024; + usbhs_fifo_disable(pipe); + do { + val = usbhsp_pipectrl_get(pipe); + val &= PBUSY; + if (!val) + return 0; + + } while (timeout--); + + dev_err(dev, "pipe barrier failed\n"); + return -EBUSY; } @@ -255,22 +270,10 @@ static void __usbhsp_pid_try_nak_if_stall(struct usbhs_pipe *pipe) void usbhs_fifo_disable(struct usbhs_pipe *pipe) { - int timeout = 1024; - u16 val; - /* see "Pipe n Control Register" - "PID" */ __usbhsp_pid_try_nak_if_stall(pipe); usbhsp_pipectrl_set(pipe, PID_MASK, PID_NAK); - - do { - val = usbhsp_pipectrl_get(pipe); - val &= PBUSY; - if (!val) - break; - - udelay(10); - } while (timeout--); } void usbhs_fifo_enable(struct usbhs_pipe *pipe)