Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275801
b: refs/heads/master
c: 7fccd48
h: refs/heads/master
i:
  275799: 1fafbab
v: v3
  • Loading branch information
Kuninori Morimoto authored and Greg Kroah-Hartman committed Nov 14, 2011
1 parent da56d34 commit 5bd9701
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 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: 0e042be348b864a57a8a452aaa7ec49be5fb9e59
refs/heads/master: 7fccd480b7fe84a98ee252fa79dd92f7fff5ec2a
19 changes: 5 additions & 14 deletions trunk/drivers/usb/renesas_usbhs/mod_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ struct usbhsh_hpriv {

u32 port_stat; /* USB_PORT_STAT_xxx */

struct completion *done;
struct completion setup_ack_done;

/* see usbhsh_req_alloc/free */
struct list_head ureq_link_active;
Expand Down Expand Up @@ -549,8 +549,7 @@ static void usbhsh_setup_stage_packet_push(struct usbhsh_hpriv *hpriv,
* usbhsh_irq_setup_ack()
* usbhsh_irq_setup_err()
*/
DECLARE_COMPLETION(done);
hpriv->done = &done;
init_completion(&hpriv->setup_ack_done);

/* copy original request */
memcpy(&req, urb->setup_packet, sizeof(struct usb_ctrlrequest));
Expand All @@ -572,8 +571,7 @@ static void usbhsh_setup_stage_packet_push(struct usbhsh_hpriv *hpriv,
/*
* wait setup packet ACK
*/
wait_for_completion(&done);
hpriv->done = NULL;
wait_for_completion(&hpriv->setup_ack_done);

dev_dbg(dev, "%s done\n", __func__);
}
Expand Down Expand Up @@ -1095,10 +1093,7 @@ static int usbhsh_irq_setup_ack(struct usbhs_priv *priv,

dev_dbg(dev, "setup packet OK\n");

if (unlikely(!hpriv->done))
dev_err(dev, "setup ack happen without necessary data\n");
else
complete(hpriv->done); /* see usbhsh_urb_enqueue() */
complete(&hpriv->setup_ack_done); /* see usbhsh_urb_enqueue() */

return 0;
}
Expand All @@ -1111,10 +1106,7 @@ static int usbhsh_irq_setup_err(struct usbhs_priv *priv,

dev_dbg(dev, "setup packet Err\n");

if (unlikely(!hpriv->done))
dev_err(dev, "setup err happen without necessary data\n");
else
complete(hpriv->done); /* see usbhsh_urb_enqueue() */
complete(&hpriv->setup_ack_done); /* see usbhsh_urb_enqueue() */

return 0;
}
Expand Down Expand Up @@ -1279,7 +1271,6 @@ int __devinit usbhs_mod_host_probe(struct usbhs_priv *priv)
hpriv->mod.stop = usbhsh_stop;
hpriv->pipe_info = pipe_info;
hpriv->pipe_size = pipe_size;
hpriv->done = NULL;
usbhsh_req_list_init(hpriv);
usbhsh_port_stat_init(hpriv);

Expand Down

0 comments on commit 5bd9701

Please sign in to comment.