Re: [PATCH v3 3/6] usb: interface authorization: Control interface probing and claiming

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

 



Am Mittwoch, den 17.06.2015, 07:05 -0700 schrieb Greg KH:
> On Wed, Jun 17, 2015 at 03:44:43PM +0200, Stefan Koch wrote:
> > Driver probings and interface claims get rejected
> > if an interface is not authorized.
> > 
> > Signed-off-by: Stefan Koch <skoch@xxxxxxx>
> > ---
> >  drivers/base/base.h       |  1 -
> >  drivers/usb/core/driver.c | 11 +++++++++++
> >  include/linux/device.h    |  1 +
> >  3 files changed, 12 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/base/base.h b/drivers/base/base.h
> > index 251c5d3..4b304a8 100644
> > --- a/drivers/base/base.h
> > +++ b/drivers/base/base.h
> > @@ -102,7 +102,6 @@ extern void container_dev_init(void);
> >  struct kobject *virtual_device_parent(struct device *dev);
> >  
> >  extern int bus_add_device(struct device *dev);
> > -extern void bus_probe_device(struct device *dev);
> >  extern void bus_remove_device(struct device *dev);
> 
> Why are you making this bus_probe_device() change in this patch?
> 
Because bus_probe_device() is used in usb_authorize_device().
Using device_attach() works without header change.
But bus_probe_device() is needed for check the autoprobe status.

Example:
User disables Autoprobing
The default interace authorization is off
The user enables an interface
Without bus_probe_device() and with device_attach() alone the driver
will get probed. With bus_probe_device() this is not done.
The user can manually do with probe_device from sysfs.

> thanks,
> 
> greg k-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