Re: [OPW] USB subsystem questions

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

 



On Fri, 31 Jan 2014, Sarah Sharp wrote:

> > 2. This question somehow resembles the previous. When a device is
> > shared, I don't want it to be available on the host it is physically
> > attached to anymore.
> 
> What do you mean by this?  Do you mean that when the stub driver on the
> server starts sharing the device to the client, you don't want it to
> appear on the server side anymore?

It's not easy to do this properly.  For example, if you went all the 
way and _really_ made the device disappear from the server system, then 
the server wouldn't be able to communicate with the device any more!  
Obviously this would be bad for the client...

> > Since the stub driver (in [1]) was converted by
> > me to a Core driver, is there any way I could tell udev that this
> > device is no longer available? I'm thinking that since it wouldn't
> > have a /dev entry anymore, it can't be used locally, only remotely.
> > I'm not sure this is "the way to go", it sounds a bit like a hack.

Even if you did this, it still wouldn't completely prevent processes on
the server from accessing the device.  For instance, the
bConfigurationValue attribute would still be available in the device's
sysfs directory on the server.  Also, processes on the server could 
still take control of the device by using usbfs.

> Why exactly do you want the device to not show up in /dev?  I would
> think what you really want is for the device drivers on the server side
> to not bind to the device, since the client side drivers should be bound
> to them instead.
> 
> I believe there is a mechanism for usbfs drivers to mark a port as
> "claimed".  Perhaps the stub driver could do the same?  Alan Stern would
> have deals on that.

That might be good enough.  The stub driver could claim the port that
the device is plugged into by calling usb_hub_claim_port (you would
have to EXPORT this function first).  This would prevent the server
system from automatically binding drivers to the device's interfaces 
whenever the client system changed the device's configuration.

Alan Stern

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