Skip to content

Commit

Permalink
USB: r8a66597-hcd: fix cannot detect a device when uses_new_polling i…
Browse files Browse the repository at this point in the history
…s set

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Yoshihiro Shimoda authored and Greg Kroah-Hartman committed Oct 30, 2009
1 parent b64dc0a commit 1e6159f
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions drivers/usb/host/r8a66597-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

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));

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 (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 */
Expand All @@ -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)
Expand Down

0 comments on commit 1e6159f

Please sign in to comment.