Re: [PATCH v2 5/5] usb: Add usb interface authorization: SysFS part of usb interface authorization.

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

 





On 06/12/2015 03:10 PM, Oliver Neukum wrote:
On Fri, 2015-06-12 at 14:57 +0200, Krzysztof Opasiak wrote:

+/*
+ * show authorization status of usb interface as bitmask
+ * 1 is authorized, 0 is not authorized
+ *
+ * example: 0b00000101 interfaces 0 and 2 are authorized
+ *          the others are not authorized
+ */

Why do you need so complicated bit mask attribute in device dir instead
of just a simple "authorized" attribute in interface directory?

Some drivers (BT, CDC ACM, ...) require multiple interfaces
The authorization must be given atomically or probing will
fail.


Please correct me if I'm wrong but this:

echo 1 > $(DATA_INTF)/authorized
echo 1 > $(CONTROL_INTF)/authorized

should also work fine even if driver needs more than one interface. The only issue is that you should authorize interface for which driver is probing as last one.

Best regards,

--
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics
--
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