Re: [PATCH 0/3] usb: cdc-wdm: subdriver support

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

 



On Wed, 2012-01-25 at 14:31 +0100, Bjørn Mork wrote:
> Encouraged by all the nice comments and feedback I got on the first
> series with demo-quality code, I have now cleaned up the mess and
> am hopefully closer to something that can be accepted.

So I have to admit I got a bit side-tracked with something else.  Could
you give me a quick summary of where things are at WRT to these devices?
And then given the fun layout of the Qualcomm devices that I've talked
about before, what's the path forward with those?

IIRC the problem was with cdc-wdm and USB interface matching since the
Gobi devices use the same class/subclass/protocols numbers for multiple
ports.  Oliver wasn't so keen on stuffing the interface number into the
driver_data field, which is what we do to option.c for blacklisting
specific interfaces.

Dan

> The changes are
> 
>  a) merged all the small changes and split them out again in only three 
>     patches, each containing just one distinct change 
>  b) included all suggested changes in comments from
>     * Oliver Neukum:
>       - use full "usb_cdc_wdm_" prefix for all exported functions
>       - pass the endpoint as a parameter
>       - rename wdm_get_device to wdm_find_device as get/put usually
>         implies a reference count
>       - always use the driver maintained device list instead of
>         intfdata
>       - remove unnecessary NULL checking in disconnect and suspend
>       - public headers belong in include/linux/usb
>     * Alan Stern:
>       - remove unnecessary NULL checking on endpoint pointer
>  c) a few fixes on my own account:
>     - initialize device list to avoid crashing in the error path    
>     - removed "deregister" as it ended up identical to disconnect
>       and the main driver can just as well call disconnect
> 
> In total, this makes the code much simpler.  Always using the device
> list made it possible to remove all calls to usb_set_intfdata, which
> again made it possible to move the call to usb_register_dev into the
> common wdm_create function.  Letting the main driver deregister the
> subdriver by calling its disconnect reduces the number of exported
> functions to one, and makes the exit path identical in both driver
> and subdriver mode!
> 
> There are probably a few more issues to fix, but all-in-all I believe
> this is in a state where it deserves to be put into use.
> 
> Note that I have not included any usbnet based main driver example in
> this patch set.  There are two reasons for that:  I am still not sure
> whether that should make use of the subdriver mode for two-interface
> devices as well, and it is to be reviewed by netdev so I would like
> to have the subdriver interface in place before submitting anything
> using it to another subsystem.
> 
> The patches are based on current (20120125) linux-next, i.e. on top of
> the so far acked changes to cdc-wdm.
> 
> 
> Bjørn Mork (3):
>   usb: cdc-wdm: split out reusable parts of probe
>   usb: cdc-wdm: adding list lookup indirection
>   usb: cdc-wdm: adding usb_cdc_wdm_register subdriver support
> 
>  drivers/usb/class/cdc-wdm.c |  197 +++++++++++++++++++++++++++++--------------
>  include/linux/usb/cdc-wdm.h |   18 ++++
>  2 files changed, 152 insertions(+), 63 deletions(-)
>  create mode 100644 include/linux/usb/cdc-wdm.h
> 


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