Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248857
b: refs/heads/master
c: 3abeca9
h: refs/heads/master
i:
  248855: b86dafb
v: v3
  • Loading branch information
Sarah Sharp committed May 11, 2011
1 parent 78c3de9 commit 2808115
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 41 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97f93227e646741adf4d7cbf4baf7a087746e93a
refs/heads/master: 3abeca998a44205cfd837fa0bf1f7c24f8294acb
13 changes: 2 additions & 11 deletions trunk/drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) },
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/usb/class/cdc-acm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 9 additions & 9 deletions trunk/drivers/usb/host/xhci-ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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;
}
}

Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/usb/renesas_usbhs/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 */
Expand All @@ -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:
Expand Down Expand Up @@ -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);

Expand Down
29 changes: 16 additions & 13 deletions trunk/drivers/usb/renesas_usbhs/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
Expand All @@ -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;
}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2808115

Please sign in to comment.