[ +CC: Greg ] On Fri, Mar 03, 2017 at 07:29:02PM +0100, Oliver Neukum wrote: > Am Donnerstag, den 02.03.2017, 12:51 +0100 schrieb Johan Hovold: > > This series refactors the endpoint sanity checks by allowing > > subdrivers > > to specify a minimum number of endpoints required per type and > > letting > > core verify this during probe. > > Hi, > > this is very good, but is it at the right place? I see nothing > specific to serial drivers here. There are some usb-serial specifics here, most notably that the constraints are specified per usb-serial type (driver) of which there can be several per usb driver, and all with different ports counts and varying endpoint requirements. As mentioned in the cover letter, a follow-on series will also use the descriptor arrays to allow subdrivers to manipulate the port-endpoint mapping. We have a couple of driver for which a single endpoint pair is shared, but bulk-out resources are allocated per port anyway. To be able to get rid of some related hacks, the array sizes are therefore large enough to express such mappings rather than having 15 elements each (i.e. the maximum number of in or out endpoints). Also note that the constraints are verified only after the subdriver probe callback returns (but before calc_num_ports and attach) allowing the drivers to change altsettings, download firmware, etc, before verifying that the endpoints required for normal operation are present. Now, something similar to this could be added to USB core as well, and I believe Greg have been looking into that lately (as time permitted). But given the varying subdriver constraints, and the need for port-endpoint remapping, we'd still need these checks and features in USB serial. Thanks, Johan -- 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