diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-12-09 06:29:22 +0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-13 15:06:27 +0400 |
commit | 31e00fd116cab296da2d12bc0b82a30a9fbdd681 (patch) | |
tree | ec71c0b2e1b70c40ba7e5f63c291ed7cd680d209 /drivers/usb/renesas_usbhs | |
parent | 3edeee3893b107364fe4ed8535245773b1e1e72b (diff) | |
download | linux-31e00fd116cab296da2d12bc0b82a30a9fbdd681.tar.xz |
usb: renesas_usbhs: disable attch irq after device attached
attch interrupt might happen infinitely on some USB hub (self power?).
This patch disable attch irq after device attached,
and enable it again when detach irq happen.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r-- | drivers/usb/renesas_usbhs/mod_host.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c index 72ee8e55e717..c947d0aca9bf 100644 --- a/drivers/usb/renesas_usbhs/mod_host.c +++ b/drivers/usb/renesas_usbhs/mod_host.c @@ -1245,6 +1245,14 @@ static int usbhsh_irq_attch(struct usbhs_priv *priv, usbhsh_port_stat_set(hpriv, USB_PORT_STAT_CONNECTION); usbhsh_port_stat_set(hpriv, USB_PORT_STAT_C_CONNECTION << 16); + /* + * attch interrupt might happen infinitely on some device + * (on self power USB hub ?) + * disable it here. + */ + hpriv->mod.irq_attch = NULL; + usbhs_irq_callback_update(priv, &hpriv->mod); + return 0; } @@ -1259,6 +1267,12 @@ static int usbhsh_irq_dtch(struct usbhs_priv *priv, usbhsh_port_stat_clear(hpriv, USB_PORT_STAT_CONNECTION); usbhsh_port_stat_set(hpriv, USB_PORT_STAT_C_CONNECTION << 16); + /* + * enable attch interrupt again + */ + hpriv->mod.irq_attch = usbhsh_irq_attch; + usbhs_irq_callback_update(priv, &hpriv->mod); + return 0; } |