Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e6159f8 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Greg Kroah-Hartman
Browse files

USB: r8a66597-hcd: fix cannot detect a device when uses_new_polling is set

parent b64dc0a5
Loading
Loading
Loading
Loading
+13 −10
Original line number Diff line number Diff line
@@ -1003,9 +1003,7 @@ 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)
@@ -1018,12 +1016,17 @@ static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port,
			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 */
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)