UDC driver bug related to max_speed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michal:

I just came across a bug in the net2280 driver.  A quick check shows
it's present in many of the other UDC drivers as well.  The bug is
related to the switch from usb_gadget_driver:speed to max_speed, and
it's also related to the increasing support for USB_SPEED_SUPER.

In Felipe's tree, net2280_start() has code like this:

	if (!driver || driver->max_speed != USB_SPEED_HIGH
			|| !driver->setup)
		return -EINVAL;

The test should be: driver->max_speed < USB_SPEED_HIGH.  As it is, the 
UDC driver won't accept gadget drivers that support SuperSpeed.

A similar problem is present in Greg's tree, but fixing it there will 
be more difficult.  The easiest approach might be to get commit 
d93bb846f5 (usb: gadget: rename usb_gadget_driver::speed to max_speed)
into Greg's tree and then add a fix on top of it.  What do you think?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux