Re: [PATCH 00/21] USB: serial: refactor endpoint sanity checks

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

 



Am Montag, den 06.03.2017, 10:23 +0100 schrieb Johan Hovold:
> [ +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.

Yes, it would be wrong to see this as an attribute per driver.
It needs to apply when you match. AFAICS every serial subdriver
has a device table. Requirements need to go there.

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

Yes, but could you explain how this is connected to filtering at probe
time other than happening at probe time?

> 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.

True, but again not specific to serial drivers. DVB-T will face
the same issues.

> 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.

It looks like a duplicated effort to me and your code can already do
most of the job. Just add a flag to check the requirements after
probe()

	Regards
		Oliver

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