Re: [PATCH] USB: Add LVS Test device driver

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

 



Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> writes:

> The biggest bug may not be an obvious one.  Suppose the lvstest driver 
> has been built into the kernel.  When the kernel boots and the root 
> hubs are registered, what will prevent them all from binding to lvstest 
> instead of the normal hub driver?

I don't know if this is possible to implement in any sane way, but I
believe it would be useful for the driver's probe to know that it is
called as a result of a write to 'bind'.

Similar issues will apply to all cases where multiple drivers are
matching and where the driver selection is a question about policy.  The
system should then have a well defined default, but still allow the user
to override this default on a device-by-device basis by e.g. manually
binding a device to the non-default driver.

NCM 1.0 backwards compatible functions (aka "NCM/MBIM functions") are an
example that is on my mind (naturally :-).  We currently let the user
select NCM or MBIM using a module parameter, but we should ideally let
the user override this system wide default per device by writing to
'bind'.  Not because I see any use case for mixed NCM/MBIM priorities,
but because it doesn't seem logical that e.g. the cdc_ncm driver returns
-ENODEV when you try to manually bind a perfectly fine NCM/MBIM function
to it with the system default set to MBIM.

I am sure there are other similar cases, where the exact choice of
driver really is a policy question for the user.


Bjørn
--
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