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

Commit eae5820b authored by John Youn's avatar John Youn Committed by Felipe Balbi
Browse files

usb: gadget: composite: Write SuperSpeedPlus config descriptors



Enable writing of SuperSpeedPlus descriptors for any SuperSpeedPlus
capable configuration when connected in SuperSpeedPlus.

Signed-off-by: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent f3bdbe36
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -473,7 +473,7 @@ static int config_desc(struct usb_composite_dev *cdev, unsigned w_value)
	u8				type = w_value >> 8;
	enum usb_device_speed		speed = USB_SPEED_UNKNOWN;

	if (gadget->speed == USB_SPEED_SUPER)
	if (gadget->speed >= USB_SPEED_SUPER)
		speed = gadget->speed;
	else if (gadget_is_dualspeed(gadget)) {
		int	hs = 0;
@@ -504,6 +504,10 @@ static int config_desc(struct usb_composite_dev *cdev, unsigned w_value)
check_config:
		/* ignore configs that won't work at this speed */
		switch (speed) {
		case USB_SPEED_SUPER_PLUS:
			if (!c->superspeed_plus)
				continue;
			break;
		case USB_SPEED_SUPER:
			if (!c->superspeed)
				continue;