Re: [PATCH 7/7] musb_hdrc: Fix doing HNP multiple times

Tony Lindgren
2007-08-17T12:59:24Z

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

Hi,

* Tony Lindgren <tony@atomide.com> [070817 04:45]:
> Without this patch OPT HS B TD.6.15 fails if run multiple
> times in a row.

Here's a follow-up patch to this one to remove compile warning.

Tony

[-- Attachment #2: musb-remove-unused-delay-port-power-off.patch --]
[-- Type: text/x-diff, Size: 1549 bytes --]

musb_hdrc: Remove old unused delay_port_power_off

Remove old unused delay_port_power_off

Signed-off-by: Tony Lindgren <tony@atomide.com>

--- a/drivers/usb/musb/musbdefs.h
+++ b/drivers/usb/musb/musbdefs.h
@@ -450,11 +450,6 @@ struct musb {
struct usb_gadget_driver *gadget_driver; /* its driver */
#endif

-#ifdef CONFIG_USB_MUSB_OTG
- /* FIXME this can't be OTG-specific ... ? */
- u8 delay_port_power_off;
-#endif
-
#ifdef MUSB_CONFIG_PROC_FS
struct proc_dir_entry *proc_entry;
#endif
diff --git a/drivers/usb/musb/plat_uds.c b/drivers/usb/musb/plat_uds.c
index 4d02460..3e63565 100644
--- a/drivers/usb/musb/plat_uds.c
+++ b/drivers/usb/musb/plat_uds.c
@@ -557,7 +557,6 @@ static irqreturn_t musb_stage0_irq(struct musb * musb, u8 int_usb,
if (is_peripheral_active(musb)) {
// REVISIT HNP; just force disconnect
}
- musb->delay_port_power_off = FALSE;
musb_writew(mbase, MUSB_INTRTXE, musb->epmask);
musb_writew(mbase, MUSB_INTRRXE, musb->epmask & 0xfffe);
musb_writeb(mbase, MUSB_INTRUSBE, 0xf7);
diff --git a/drivers/usb/musb/virthub.c b/drivers/usb/musb/virthub.c
index 757da5e..d9f3c28 100644
--- a/drivers/usb/musb/virthub.c
+++ b/drivers/usb/musb/virthub.c
@@ -121,13 +121,6 @@ static void musb_port_reset(struct musb *musb, u8 bReset)
musb->port1_status &= ~USB_PORT_STAT_RESET;
return;
}
-
- /* REVISIT this looks wrong for HNP */
- u8 devctl = musb_readb(mbase, MUSB_DEVCTL);
-
- if (musb->delay_port_power_off || !(devctl & MUSB_DEVCTL_HM)) {
- return;
- }
#endif

if (!is_host_active(musb))

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]