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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun,  2 Aug 2020 15:14:14 +0000 (UTC)
From:   Kalle Valo <>
To:     Vaibhav Gupta <>
Cc:     Bjorn Helgaas <>,
        Bjorn Helgaas <>,
        Bjorn Helgaas <>,
        Vaibhav Gupta <>,
        "David S. Miller" <>,
        Jakub Kicinski <>,
        Stanislaw Gruszka <>,
        Helmut Schaa <>,
        Vaibhav Gupta <>,,,,,
        Shuah Khan <>
Subject: Re: [PATCH v1] rt2x00: pci: use generic power management

Vaibhav Gupta <> wrote:

> Drivers using legacy PM have to manage PCI states and device's PM states
> themselves. They also need to take care of configuration registers.
> With improved and powerful support of generic PM, PCI Core takes care of
> above mentioned, device-independent, jobs.
> The callbacks make use of PCI helper functions like
> pci_save/restore_state(), pci_enable/disable_device() and
> pci_set_power_state() to do required operations. In generic mode, they are
> no longer needed.
> Change function parameter in both .suspend() and .resume() to
> "struct device*" type. Use dev_get_drvdata() to get drv data.
> The .suspend() callback is invoking rt2x00lib_suspend() which needs to be
> modified as generic rt2x00pci_suspend() has no pm_message_t type argument,
> passed to it, which is required by it according to its declaration.
> Although this variable remained unused in the function body. Hence, remove
> it from the function definition & declaration.
> rt2x00lib_suspend() is also invoked by rt2x00usb_suspend() and
> rt2x00soc_suspend(). Thus, modify the functional call accordingly in their
> function body.
> Earlier, .suspend() & .resume() were exported and were used by the
> following drivers:
>     - drivers/net/wireless/ralink/rt2x00/rt2400pci.c
>     - drivers/net/wireless/ralink/rt2x00/rt2500pci.c
>     - drivers/net/wireless/ralink/rt2x00/rt2800pci.c
>     - drivers/net/wireless/ralink/rt2x00/rt61pci.c
> Now, we only need to bind "struct dev_pm_ops" variable to
> "struct pci_driver". Thus, make the callbacks static. Declare an
> "extern const struct dev_pm_ops" variable and bind PM callbacks to it. Now,
> export the variable instead and use it in respective drivers.
> Compile-tested only.
> Signed-off-by: Vaibhav Gupta <>

Patch applied to wireless-drivers-next.git, thanks.

560a218d1ce6 rt2x00: pci: use generic power management


Powered by blists - more mailing lists