[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8d83145d-7eb4-4c12-97b7-799a0236f7bd@nvidia.com>
Date: Tue, 25 Jun 2024 20:41:55 +0300
From: Shay Drori <shayd@...dia.com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: <netdev@...r.kernel.org>, <pabeni@...hat.com>, <davem@...emloft.net>,
<kuba@...nel.org>, <edumazet@...gle.com>, <david.m.ertman@...el.com>,
<rafael@...nel.org>, <ira.weiny@...el.com>, <linux-rdma@...r.kernel.org>,
<leon@...nel.org>, <tariqt@...dia.com>, Parav Pandit <parav@...dia.com>
Subject: Re: [PATCH net-next v7 1/2] driver core: auxiliary bus: show
auxiliary device IRQs
Hi Greg
On 20/06/2024 8:47, Shay Drori wrote:
>>>>> u32 id;
>>>>> + u8 dir_exists:1;
>>>>
>>>> I don't think this is needed, but if it really is, just use a bool.
>>>
>>>
>>> If you know of an API that query whether a specific group is exists on
>>> some device, can you please share it with me?
>>> I came out empty when I looked for one 🙁
>>
>> Normally sysfs groups are NOT created this way at all. Oh wait, they
>> can be now, why not use the new feature where a group is created by the
>> core but only exposed if an attribute is added there?
>>
>> Will that work here? See commit d87c295f599c ("sysfs: Introduce a
>> mechanism to hide static attribute_groups") for details. That should
>> solve the issue of trying to figure out if the directory is present or
>> not logic.
>
>
> thank for the suggestion:)
> will give it a shoot
I tried using the commit you mentioned.
the commit introduce is_visible callback, which being called when a
group is added to the system.
Hence, auxiliary driver needs to know early when using the static group.
To know if to use this static group, the mlx5 driver needs to pass the flag.
But the whole point was to avoid passing that flag.
Do you suggest passing the flag in __auxiliary_device_add() and use it
to is_visible trick?
thanks
Powered by blists - more mailing lists