lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 26 Feb 2021 15:40:23 +0200
From:   Kalle Valo <kvalo@...eaurora.org>
To:     Heiner Kallweit <hkallweit1@...il.com>
Cc:     Kai-Heng Feng <kai.heng.feng@...onical.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Yan-Hsuan Chuang <tony0620emma@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        linux-wireless <linux-wireless@...r.kernel.org>,
        Linux Netdev List <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        Linux PCI <linux-pci@...r.kernel.org>
Subject: Re: [PATCH 3/3] PCI: Convert rtw88 power cycle quirk to shutdown quirk

Heiner Kallweit <hkallweit1@...il.com> writes:

> On 26.02.2021 13:18, Kai-Heng Feng wrote:
>> On Fri, Feb 26, 2021 at 8:10 PM Heiner Kallweit <hkallweit1@...il.com> wrote:
>>>
>>> On 26.02.2021 08:12, Kalle Valo wrote:
>>>> Kai-Heng Feng <kai.heng.feng@...onical.com> writes:
>>>>
>>>>> Now we have a generic D3 shutdown quirk, so convert the original
>>>>> approach to a PCI quirk.
>>>>>
>>>>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>
>>>>> ---
>>>>>  drivers/net/wireless/realtek/rtw88/pci.c | 2 --
>>>>>  drivers/pci/quirks.c                     | 6 ++++++
>>>>>  2 files changed, 6 insertions(+), 2 deletions(-)
>>>>
>>>> It would have been nice to CC linux-wireless also on patches 1-2. I only
>>>> saw patch 3 and had to search the rest of patches from lkml.
>>>>
>>>> I assume this goes via the PCI tree so:
>>>>
>>>> Acked-by: Kalle Valo <kvalo@...eaurora.org>
>>>>
>>>
>>> To me it looks odd to (mis-)use the quirk mechanism to set a device
>>> to D3cold on shutdown. As I see it the quirk mechanism is used to work
>>> around certain device misbehavior. And setting a device to a D3
>>> state on shutdown is a normal activity, and the shutdown() callback
>>> seems to be a good place for it.
>>> I miss an explanation what the actual benefit of the change is.
>> 
>> To make putting device to D3 more generic, as there are more than one
>> device need the quirk.
>> 
>> Here's the discussion:
>> https://lore.kernel.org/linux-usb/00de6927-3fa6-a9a3-2d65-2b4d4e8f0012@linux.intel.com/
>> 
>
> Thanks for the link. For the AMD USB use case I don't have a strong opinion,
> what's considered the better option may be a question of personal taste.
> For rtw88 however I'd still consider it over-engineering to replace a simple
> call to pci_set_power_state() with a PCI quirk.
> I may be biased here because I find it sometimes bothering if I want to
> look up how a device is handled and in addition to checking the respective
> driver I also have to grep through quirks.c whether there's any special
> handling.

Good point about rtw88. And if there's a new PCI id for rtw88 we need to
also update the quirk in the PCI subsystem, which will be most likely
forgotten.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ