On Mon, Nov 21, 2022 at 11:06:14AM +0000, Uminski, Piotr wrote:
> Instead of a bit-coded list of supported commands, can we just use an array 
> of supported command values? It allows us to use non-contiguous command 
> coding and checking how big  is an array:       le32 device_admin_cmds[];

Interesting, what's the usecase exactly?
I don't really expect more than order or 200 commands - about 8 dwords.
And the operation we normally need is checking whether a given command
is supported, with a list that will be a slow lookup.

Besides with your idea driver first needs to check how many commands
are supported, then do the query - two roundtrips to device.
With the proposed interface, driver just allocates a buffer
for commands it knows about. Device truncates the buffer
to the length supplied by driver, so any commands outside
the buffer are ignored.

-- 
MST


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to