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>
This commit is contained in:
parent
b64dc0a597
commit
1e6159f858
|
@ -1003,19 +1003,20 @@ static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port,
|
|||
if (syssts == SE0) {
|
||||
r8a66597_write(r8a66597, ~ATTCH, get_intsts_reg(port));
|
||||
r8a66597_bset(r8a66597, ATTCHE, get_intenb_reg(port));
|
||||
return;
|
||||
} else {
|
||||
if (syssts == FS_JSTS)
|
||||
r8a66597_bset(r8a66597, HSE, get_syscfg_reg(port));
|
||||
else if (syssts == LS_JSTS)
|
||||
r8a66597_bclr(r8a66597, HSE, get_syscfg_reg(port));
|
||||
|
||||
r8a66597_write(r8a66597, ~DTCH, get_intsts_reg(port));
|
||||
r8a66597_bset(r8a66597, DTCHE, get_intenb_reg(port));
|
||||
|
||||
if (r8a66597->bus_suspended)
|
||||
usb_hcd_resume_root_hub(r8a66597_to_hcd(r8a66597));
|
||||
}
|
||||
|
||||
if (syssts == FS_JSTS)
|
||||
r8a66597_bset(r8a66597, HSE, get_syscfg_reg(port));
|
||||
else if (syssts == LS_JSTS)
|
||||
r8a66597_bclr(r8a66597, HSE, get_syscfg_reg(port));
|
||||
|
||||
r8a66597_write(r8a66597, ~DTCH, get_intsts_reg(port));
|
||||
r8a66597_bset(r8a66597, DTCHE, get_intenb_reg(port));
|
||||
|
||||
if (r8a66597->bus_suspended)
|
||||
usb_hcd_resume_root_hub(r8a66597_to_hcd(r8a66597));
|
||||
usb_hcd_poll_rh_status(r8a66597_to_hcd(r8a66597));
|
||||
}
|
||||
|
||||
/* this function must be called with interrupt disabled */
|
||||
|
@ -1024,6 +1025,8 @@ static void r8a66597_usb_connect(struct r8a66597 *r8a66597, int port)
|
|||
u16 speed = get_rh_usb_speed(r8a66597, port);
|
||||
struct r8a66597_root_hub *rh = &r8a66597->root_hub[port];
|
||||
|
||||
rh->port &= ~((1 << USB_PORT_FEAT_HIGHSPEED) |
|
||||
(1 << USB_PORT_FEAT_LOWSPEED));
|
||||
if (speed == HSMODE)
|
||||
rh->port |= (1 << USB_PORT_FEAT_HIGHSPEED);
|
||||
else if (speed == LSMODE)
|
||||
|
|
Loading…
Reference in New Issue