Commit 6e134424 authored by Felipe Balbi's avatar Felipe Balbi Committed by Luis Henriques

usb: musb: use new USB_RESUME_TIMEOUT

commit 309be239 upstream.

Make sure we're using the new macro, so our
resume signaling will always pass certification.

Based on original work by Bin Liu <Bin Liu <b-liu@ti.com>>

Cc: Bin Liu <b-liu@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
[ luis: backported to 3.16:
  - only two msecs_to_jiffies() invocations
  - adjusted context ]
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 14170204
...@@ -99,6 +99,7 @@ ...@@ -99,6 +99,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/usb.h>
#include "musb_core.h" #include "musb_core.h"
...@@ -477,10 +478,10 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, ...@@ -477,10 +478,10 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
(USB_PORT_STAT_C_SUSPEND << 16) (USB_PORT_STAT_C_SUSPEND << 16)
| MUSB_PORT_STAT_RESUME; | MUSB_PORT_STAT_RESUME;
musb->rh_timer = jiffies musb->rh_timer = jiffies
+ msecs_to_jiffies(20); + msecs_to_jiffies(USB_RESUME_TIMEOUT);
schedule_delayed_work( schedule_delayed_work(
&musb->finish_resume_work, &musb->finish_resume_work,
msecs_to_jiffies(20)); msecs_to_jiffies(USB_RESUME_TIMEOUT));
musb->xceiv->state = OTG_STATE_A_HOST; musb->xceiv->state = OTG_STATE_A_HOST;
musb->is_active = 1; musb->is_active = 1;
......
...@@ -136,7 +136,7 @@ void musb_port_suspend(struct musb *musb, bool do_suspend) ...@@ -136,7 +136,7 @@ void musb_port_suspend(struct musb *musb, bool do_suspend)
/* later, GetPortStatus will stop RESUME signaling */ /* later, GetPortStatus will stop RESUME signaling */
musb->port1_status |= MUSB_PORT_STAT_RESUME; musb->port1_status |= MUSB_PORT_STAT_RESUME;
schedule_delayed_work(&musb->finish_resume_work, schedule_delayed_work(&musb->finish_resume_work,
msecs_to_jiffies(20)); msecs_to_jiffies(USB_RESUME_TIMEOUT));
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment