Re: usbfs, claiming entire usb devices

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

 



>> We are in 100% agreement regarding where the problems are :)
>
> Are we?  Steve's email seemed to indicate that he may have some
> different ideas.

Well, It looked to me that even Steve agreed on the problems, he
just wanted different solutions perhaps :)

>
>> > The API for claiming and releasing ports needs to be determined;
>> > everything else seems fairly straightforward.  I'm open to suggestions;
>> > the biggest requirement is that when a program ends, all its ports have
>> > to be released automatically.  This suggests using some sort of control
>> > file for the API.
>>
>> Yep, we don't want a buggy program taking our ports with it to its doom :)
>
> Taking the ports to its doom would be okay.  I don't want a program
> taking the ports _beyond_ its doom, thereby removing any possibility
> of ever releasing them.
>

Heh, exactly, apologies for wrong choice of words :) If the ports are released
when their userspace owner dies, all is ok.

>> So, it seems to me that we are all on the same page about what needs
>> to be done and also agree about the overview of how (new driver probed
>> before generic, some sort of file-based grabbing, etc).
>
> I'm open to suggestions for how the file-based grabbing should be
> implemented.

I haven't yet given serious thought to the API, sorry (probably this will
happen next week)

> Not to mention some unsettled issues, like what should
> happen if a program grabs a port and another program has already
> claimed an interface on the device attached to that port.  Or if
> another program simply has the device file open.

The grab should fail most likely, in both the above cases. It is unlikely
that the user really wanted it if they are actively using the device in
some other way. So, just return an error code?

It looks though that detecting these cases might be a bit tricky.
Claiming any interface should propagate upwards (to device and port)
to disallow any grabs imho.

Thanks,
Pantelis
--
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