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]

 



On Wed, Jun 17, 2015 at 05:13:51PM +0200, Stefan Koch wrote:
> 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().

Not in this patch it isn't, so it doesn't belong here.

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

Don't mess with the driver core, that's a huge sign something is really
wrong with your patchset.  Nothing is "special" enough in USB to warrant
that.

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