diff options
author | Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> | 2009-10-21 07:33:39 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-10-30 17:57:33 -0400 |
commit | 1e6159f858f5da608612ae10d6554bb7ecac9755 (patch) | |
tree | 65c840136933ccca2be8493654e0c14bb588482b | |
parent | b64dc0a597fd3c66d888df0886635eba210cc19f (diff) |
USB: r8a66597-hcd: fix cannot detect a device when uses_new_polling is set
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/host/r8a66597-hcd.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index 749b53742828..e33d36256350 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c | |||
@@ -1003,19 +1003,20 @@ static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port, | |||
1003 | if (syssts == SE0) { | 1003 | if (syssts == SE0) { |
1004 | r8a66597_write(r8a66597, ~ATTCH, get_intsts_reg(port)); | 1004 | r8a66597_write(r8a66597, ~ATTCH, get_intsts_reg(port)); |
1005 | r8a66597_bset(r8a66597, ATTCHE, get_intenb_reg(port)); | 1005 | r8a66597_bset(r8a66597, ATTCHE, get_intenb_reg(port)); |
1006 | return; | 1006 | } else { |
1007 | } | 1007 | if (syssts == FS_JSTS) |
1008 | r8a66597_bset(r8a66597, HSE, get_syscfg_reg(port)); | ||
1009 | else if (syssts == LS_JSTS) | ||
1010 | r8a66597_bclr(r8a66597, HSE, get_syscfg_reg(port)); | ||
1008 | 1011 | ||
1009 | if (syssts == FS_JSTS) | 1012 | r8a66597_write(r8a66597, ~DTCH, get_intsts_reg(port)); |
1010 | r8a66597_bset(r8a66597, HSE, get_syscfg_reg(port)); | 1013 | r8a66597_bset(r8a66597, DTCHE, get_intenb_reg(port)); |
1011 | else if (syssts == LS_JSTS) | ||
1012 | r8a66597_bclr(r8a66597, HSE, get_syscfg_reg(port)); | ||
1013 | 1014 | ||
1014 | r8a66597_write(r8a66597, ~DTCH, get_intsts_reg(port)); | 1015 | if (r8a66597->bus_suspended) |
1015 | r8a66597_bset(r8a66597, DTCHE, get_intenb_reg(port)); | 1016 | usb_hcd_resume_root_hub(r8a66597_to_hcd(r8a66597)); |
1017 | } | ||
1016 | 1018 | ||
1017 | if (r8a66597->bus_suspended) | 1019 | usb_hcd_poll_rh_status(r8a66597_to_hcd(r8a66597)); |
1018 | usb_hcd_resume_root_hub(r8a66597_to_hcd(r8a66597)); | ||
1019 | } | 1020 | } |
1020 | 1021 | ||
1021 | /* this function must be called with interrupt disabled */ | 1022 | /* this function must be called with interrupt disabled */ |
@@ -1024,6 +1025,8 @@ static void r8a66597_usb_connect(struct r8a66597 *r8a66597, int port) | |||
1024 | u16 speed = get_rh_usb_speed(r8a66597, port); | 1025 | u16 speed = get_rh_usb_speed(r8a66597, port); |
1025 | struct r8a66597_root_hub *rh = &r8a66597->root_hub[port]; | 1026 | struct r8a66597_root_hub *rh = &r8a66597->root_hub[port]; |
1026 | 1027 | ||
1028 | rh->port &= ~((1 << USB_PORT_FEAT_HIGHSPEED) | | ||
1029 | (1 << USB_PORT_FEAT_LOWSPEED)); | ||
1027 | if (speed == HSMODE) | 1030 | if (speed == HSMODE) |
1028 | rh->port |= (1 << USB_PORT_FEAT_HIGHSPEED); | 1031 | rh->port |= (1 << USB_PORT_FEAT_HIGHSPEED); |
1029 | else if (speed == LSMODE) | 1032 | else if (speed == LSMODE) |