recommended.
The conversion requires the removal of the those function calls and change the
callback definition accordingly.
Vaibhav Gupta (2):
realtek/8139too: Remove Legacy Power Management
realtek/8139cp: Remove Legacy Power Management
drivers/net/ethernet/realtek/8139cp.c | 25
struct net_device*" using "dev_get_drv_data()" to use
it in the callback.
Most of the cleaning part is to remove pci_save_state(),
pci_set_power_state(), etc power management function calls.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/realtek/8139cp.c | 25 +++---
definition to suppress compiler warnings.
Generic callback requires an argument of type "struct device*". Hence,
convert it to "struct net_device*" using "dev_get_drvdata()" to use
it in the callback.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/realtek/8139too.
to tab in "struct pci_driver".
Signed-off-by: Vaibhav Gupta
---
drivers/net/wan/farsync.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index 7916efce7188..15dacfde6b83 100644
--- a/drivers/net/wan/far
device-specific jobs.
Signed-off-by: Vaibhav Gupta
---
drivers/net/can/pch_can.c | 63 +--
1 file changed, 21 insertions(+), 42 deletions(-)
diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index db415771..ca54a6e1c810 100644
--- a/
device-specific jobs.
Signed-off-by: Vaibhav Gupta
---
drivers/net/wireless/cisco/airo.c | 39 +++
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/drivers/net/wireless/cisco/airo.c
b/drivers/net/wireless/cisco/airo.c
index 827bb6d74815..f9627fa360
This patch is compile-tested only.
Thanks
Vaibhav Gupta
This patch is compile-tested only.
Thanks
Vaibhav Gupta
This patch is compile-tested only.
Thanks
Vaibhav Gupta
their job.
The conversion requires the removal of those function calls, change the
callbacks' definition accordingly and make use of dev_pm_ops structure.
All patches are compile-tested only.
Test tools:
- Compiler: gcc (GCC) 10.1.0
- allmodconfig build: make -j$(nproc) W=1 all
Vaibhav
On Tue, Jul 28, 2020 at 03:04:13PM -0500, Bjorn Helgaas wrote:
> On Tue, Jul 28, 2020 at 09:58:10AM +0530, Vaibhav Gupta wrote:
> > The .suspend() and .resume() callbacks are not defined for this driver.
> > Still, their power management structure follows the legacy framework.
On Wed, Jul 29, 2020 at 07:29:54AM -0500, Bjorn Helgaas wrote:
> On Wed, Jul 29, 2020 at 03:47:30PM +0530, Vaibhav Gupta wrote:
> >
> > Agreed. Actually, as their presence only causes PCI core to call
> > pci_legacy_suspend/resume() for them, I thought that after removing
their job.
The conversion requires the removal of those function calls, change the
callbacks' definition accordingly and make use of dev_pm_ops structure.
All patches are compile-tested only.
Test tools:
- Compiler: gcc (GCC) 10.1.0
- allmodconfig build: make -j$(nproc) W=1 all
Vaibhav
device-specific jobs.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/ti/tlan.c | 31 ++-
1 file changed, 6 insertions(+), 25 deletions(-)
diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
index 857709828058..c799945a39ef 100644
--
device-specific jobs.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/silan/sc92031.c | 26 +-
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/silan/sc92031.c
b/drivers/net/ethernet/silan/sc92031.c
index cb043eb1bdc1..f94078f8eb
device-specific jobs.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/sis/sis900.c | 23 +++
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/sis/sis900.c
b/drivers/net/ethernet/sis/sis900.c
index 81ed7589e33c..2af2c9816dfc 100644
--
device-specific jobs.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/silan/sc92031.c | 26 +-
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/silan/sc92031.c
b/drivers/net/ethernet/silan/sc92031.c
index cb043eb1bdc1..f94078f8eb
device-specific jobs.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/sis/sis900.c | 23 +++
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/sis/sis900.c
b/drivers/net/ethernet/sis/sis900.c
index 81ed7589e33c..2af2c9816dfc 100644
--
device-specific jobs.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/ti/tlan.c | 31 ++-
1 file changed, 6 insertions(+), 25 deletions(-)
diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
index 857709828058..c799945a39ef 100644
--
their job.
The conversion requires the removal of those function calls, change the
callbacks' definition accordingly and make use of dev_pm_ops structure.
All patches are compile-tested only.
Test tools:
- Compiler: gcc (GCC) 10.1.0
- allmodconfig build: make -j$(nproc) W=1 all
Vaibhav
o_pci_dev() and dev_get_drvdata() to get
"struct pci_dev*" variable and drv data.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
.../net/ethernet/myricom/myri10ge/myri10ge.c | 37 ---
1 file changed, 8 insertions(+), 29 deletions(-)
diff --git a/drivers/net/ethernet/myric
device-specific jobs.
Signed-off-by: Vaibhav Gupta
---
.../intersil/prism54/islpci_hotplug.c | 34 ++-
1 file changed, 11 insertions(+), 23 deletions(-)
diff --git a/drivers/net/wireless/intersil/prism54/islpci_hotplug.c
b/drivers/net/wireless/intersil/prism54/islpci_
This Patch is Compile-tested only.
device-specific jobs.
Signed-off-by: Vaibhav Gupta
---
.../net/wireless/intersil/hostap/hostap_hw.c | 6 ++--
.../net/wireless/intersil/hostap/hostap_pci.c | 34 ++-
2 files changed, 13 insertions(+), 27 deletions(-)
diff --git a/drivers/net/wireless/intersil/hostap/hostap_hw.c
This patch is compile-tested only.
--Vaibhav Gupta
;. 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
---
.../net/wireless/ralink/rt2x00/rt2400pci.c
state(). This is not recommeneded as PCI core takes care of
that. Hence they became empty-body functions, thus define them NULL.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
.../wireless/realtek/rtl818x/rtl8180/dev.c| 23 ---
1 file changed, 4 insertions(+), 19 dele
On Wed, 20 May 2020 at 04:02, David Miller wrote:
>
> From: Vaibhav Gupta
> Date: Mon, 18 May 2020 20:32:12 +0530
>
> > The purpose of this patch series is to remove legacy power management
> > callbacks
> > from realtek ethernet drivers.
> >
> > The
On Wed, 24 Jun 2020 at 09:01, David Miller wrote:
>
> From: Vaibhav Gupta
> Date: Mon, 22 Jun 2020 16:43:57 +0530
>
> > Linux Kernel Mentee: Remove Legacy Power Management.
> >
> > The purpose of this patch series is to remove legacy power management
> > cal
tions like
pci_save/restore_state(), pci_enable/disable_device(),
pci_set_power_state(), etc. Their tasks are completed by PCI core itself.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
.../intersil/orinoco/orinoco_nortel.c | 3 +-
.../wireless/intersil/orinoco/orinoco_pci.c
lling bnx2x_set_power_state() to set the power state
of the device by changing the device's registers' value. It is no more
needed.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 15 ++-
drivers/net/ethernet/broadcom/bn
after removing PCI helper functions, .suspend()
and .resume() became empty-body functions. Hence, define them NULL and
use dev_pm_ops.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/ptp/ptp_pch.c | 37 +++--
1 file changed, 3 insertions(+), 34 dele
On Sat, 27 Jun 2020 at 00:44, David Miller wrote:
>
> From: Vaibhav Gupta
> Date: Wed, 24 Jun 2020 23:21:17 +0530
>
> > With legacy PM, drivers themselves were responsible for managing the
> > device's power states and takes care of register states.
> >
g PCI helper functions like pci_save/restore_state(),
pci_enable/disable_device() and pci_set_power_state(), which is not
recommended.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/wireless/intel/ipw2x00/ipw2200.c | 30 +---
1 file changed, 7 insertions(+
the power management
themselves, which is not recommended.
The conversion requires the removal of the those function calls and change the
callback definition accordingly and make use of dev_pm_ops structure.
All patches are compile-tested only.
Vaibhav Gupta (2):
ipw2100: use generic power
g PCI helper functions like pci_save/restore_state(),
pci_enable/disable_device() and pci_set_power_state(), which is not
recommended.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/wireless/intel/ipw2x00/ipw2100.c | 31 +---
1 file changed, 7 insertions(+
essentials will be handled by the PCI core. Driver
needs to do only device-specific operations.
The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
device_wakeup_disable() instead.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/staging/rts5208/rtsx.c | 30
the power management
themselves, which is not recommended.
The conversion requires the removal of the those function calls and change the
callback definition accordingly and make use of dev_pm_ops structure.
All patches are compile-tested only.
Vaibhav Gupta (4):
qlge/qlge_main.c: use genric
device accordingly.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 61 +--
1 file changed, 15 insertions(+), 46 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
b/drivers/net/ethernet/intel/ix
On Mon, 29 Jun 2020 at 11:20, Kalle Valo wrote:
>
> Vaibhav Gupta writes:
>
> > Linux Kernel Mentee: Remove Legacy Power Management.
> >
> > The purpose of this patch series is to remove legacy power management
> > callbacks
> > from amd ethernet dr
essentials will be handled by the PCI core. Driver
needs to do only device-specific operations.
The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
device_wakeup_disable() instead.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/staging/rts5208/rtsx.c | 30
ng git tree, kindly drop us a note.
> And when submitting patch, we suggest to use as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url:
> https://github.com/0day-ci/linux/commits/Vaibhav-Gupta/drivers-staging-use-generic-power-management/20200629-163141
> ba
: Vaibhav Gupta
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 ++--
drivers/staging/rtl8192e/rtl8192e/rtl_pm.c | 26 ++--
drivers/staging/rtl8192e/rtl8192e/rtl_pm.h | 4 +--
3 files changed, 12 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e
the power management
themselves, which is not recommended.
The conversion requires the removal of the those function calls and change the
callback definition accordingly and make use of dev_pm_ops structure.
All patches are compile-tested only.
Vaibhav Gupta (2):
ipw2100: use generic power
essentials will be handled by the PCI core. Driver
needs to do only device-specific operations.
The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
device_wakeup_disable() instead.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/staging/vt6655/device_main.c | 25
tions like
pci_save/restore_state(), pci_enable/disable_device(),
pci_set_power_state(), etc. Their tasks are completed by PCI core itself.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/intel/iavf/iavf_main.c | 45 ++---
1 file changed, 12 insertions(+
essentials will be handled by the PCI core. Driver
needs to do only device-specific operations.
The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
device_wakeup_disable() instead.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/staging/qlge/qlge_main.c | 36
. Thus, it does not affect the normal functioning of the
driver.
__maybe_unused attribute is used with .resume() but not with .suspend(), as
.suspend() is calleb by .shutdown().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/intel/igbvf/netdev.c | 37
ested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/intel/e100.c | 31 +--
1 file changed, 13 insertions(+), 18 deletions(-)
diff --git a/drivers/net/ethernet/intel/e100.c
b/drivers/net/ethernet/intel/e100.c
index 1b8d015ebfb0..7506fb5eca8f 100644
--- a/dr
g PCI helper functions like pci_save/restore_state(),
pci_enable/disable_device() and pci_set_power_state(), which is not
recommended.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/wireless/intel/ipw2x00/ipw2200.c | 30 +---
1 file changed, 7 insertions(+
after removing PCI helper functions, .suspend()
and .resume() became empty-body functions. Hence, define them NULL and
use dev_pm_ops.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/wireless/admtek/adm8211.c | 25 +
1 file changed, 5 insertions(+
g PCI helper functions like pci_save/restore_state(),
pci_enable/disable_device() and pci_set_power_state(), which is not
recommended.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/wireless/intel/ipw2x00/ipw2100.c | 31 +---
1 file changed, 7 insertions(+
g PCI helper functions like pci_save/restore_state(),
and pci_enable/disable_device(), which is not recommended.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
.../net/ethernet/intel/ixgbevf/ixgbevf_main.c | 44 +--
1 file changed, 10 insertions(+), 34 deletions(-)
diff --
the power management
themselves, which is not recommended.
The conversion requires the removal of the those function calls and change the
callback definition accordingly and make use of dev_pm_ops structure.
All patches are compile-tested only.
Vaibhav Gupta (5):
iavf: use generic power
: Vaibhav Gupta
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 ++--
drivers/staging/rtl8192e/rtl8192e/rtl_pm.c | 26 ++--
drivers/staging/rtl8192e/rtl8192e/rtl_pm.h | 4 +--
3 files changed, 12 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e
essentials will be handled by the PCI core. Driver
needs to do only device-specific operations.
The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
device_wakeup_disable() instead.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/staging/vt6655/device_main.c | 25
. pci_set_master() function call in
drivers/staging/qlge/qlge_main.c, inside qlge_resume(), was passing argument
which got deprecated after upgrade to generic PM. The error is fixed in v2.
Vaibhav Gupta (4):
qlge/qlge_main.c: use generic power management
staging/rtl8192e: use generic power management
essentials will be handled by the PCI core. Driver
needs to do only device-specific operations.
The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
device_wakeup_disable() instead.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/staging/qlge/qlge_main.c | 38
e
which is unknown to PCI core. To utilise its
need, call device_set_wakeup_enable().
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/realtek/8139cp.c | 25 -
1 file changed, 8 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/realtek/8139cp.c
b/dr
backs. As
these callabcks work with "struct net_device*",
extract it from "struct device*" using
dev_get_drv_data().
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/realtek/8139too.c | 26 +++---
1 file changed, 7 insertions(+), 19 deletions(-)
diff -
recommended.
The conversion requires the removal of the those function calls and change the
callback definition accordingly.
All Changes are compile-tested only.
Vaibhav Gupta (2):
realtek/8139too: use generic power management
realtek/8139cp: use generic power management
drivers/net/ethernet
akeup-enable the device accordingly.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/intel/e1000/e1000_main.c | 49 +--
1 file changed, 13 insertions(+), 36 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c
b/drivers/net/ethernet/intel/e1
the power management
themselves, which is not recommended.
The conversion requires the removal of the those function calls and change the
callback definition accordingly and make use of dev_pm_ops structure.
All patches are compile-tested only.
Vaibhav Gupta (3):
pcnet32: Convert to generic
compile-tested only
Drivers should not save device registers and/or change the power state of
the device. As per the generic PM approach, these are handled by PCI core.
The driver should support dev_pm_ops callbacks and bind them to pci_driver.
Signed-off-by: Vaibhav Gupta
---
drivers/net
e called at the same point the
legacy ones were called. Thus, it does not affect the normal functioning of
the driver.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/amd/pcnet32.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/etherne
compile-tested only
Use dev_pm_ops structure to call generic suspend() and resume() callbacks.
Drivers should avoid saving device register and/or change power states
using PCI helper functions. With generic approach, all these are handled by
PCI core.
Signed-off-by: Vaibhav Gupta
---
drivers
On Tue, 28 Apr 2020 at 23:24, Heiner Kallweit wrote:
>
> On 28.04.2020 16:43, Vaibhav Gupta wrote:
> > The purpose of this patch series is to remove legacy power management
> > callbacks
> > from realtek ethernet drivers.
> >
> > The callbacks performing s
On Tue, 28 Apr 2020 at 22:59, Bjorn Helgaas wrote:
>
> On Tue, Apr 28, 2020 at 08:13:14PM +0530, Vaibhav Gupta wrote:
> > Upgrade power management from legacy to generic using dev_pm_ops.
> >
> > Add "__maybe_unused" attribute to resume() and susend() callbacks
&
from the get_maintainer.pl script,
yeah.
> > but you can trim it a bit by omitting people who have just made
> > occasional random fixups. These drivers are really unmaintained, so
> > Dave M, netdev, Rafael, linux-pm, linux-pci, and maybe LKML are
> > probably enough.
I wi
On Wed, 24 Jun 2020 at 23:14, Vaibhav Gupta wrote:
>
> With the support of generic PM callbacks, drivers no longer need to use
> legacy .suspend() and .resume() in which they had to maintain PCI states
> changes and device's power state themselves. The required operations are
&
call typhoon_sleep_early() to do
those tasks, hence, the behavior for _open(), _close and _init_one() remain
unchanged. And typhon_suspend() only requires typhoon_sleep_early().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/3com/typhoon.c | 53 +
1
the power management
themselves, which is not recommended.
The conversion requires the removal of the those function calls and change the
callback definition accordingly and make use of dev_pm_ops structure.
All patches are compile-tested only.
Vaibhav Gupta (11):
typhoon: use generic power
igned-off-by: Vaibhav Gupta
---
drivers/net/ethernet/amazon/ena/ena_netdev.c | 21
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c
b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index dda4b8fc9525..92e6d244550c 100644
call the PCI helper functions like
pci_save/restore_sate() and pci_set_power_state().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/adaptec/starfire.c | 23 ++-
1 file changed, 6 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/ad
device-specific operations.
The driver defined empty-body .suspend() and .resume() callbacks earlier.
They can now be define NULL and bind with "struct dev_pm_ops" variable.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
.../net/ethernet/cavium/liquidio/lio_mai
call the PCI helper functions like
pci_enable/disable_device(), pci_save/restore_sate() and
pci_set_power_state().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/dlink/sundance.c | 27 ---
1 file changed, 8 insertions(+), 19 deletions(-)
diff
call the PCI helper functions like
pci_enable_device, which is not recommended. Hence, removed.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/natsemi/natsemi.c | 26 +++---
1 file changed, 7 insertions(+), 19 deletions(-)
diff --git a/driver
dev_pm_ops" variable to bind the callbacks.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/neterion/vxge/vxge-main.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c
b/drivers/net/etherne
call the PCI helper functions like
pci_enable_wake(), pci_save/restore_sate() and
pci_set_power_state().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/micrel/ksz884x.c | 25 +
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/dr
dev_pm_ops" variable to bind the callbacks.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/mellanox/mlx4/main.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c
b/drivers/net/ethernet/mellanox/ml
call the PCI helper functions like
pci_enable/disable_device(), pci_save/restore_sate() and
pci_set_power_state().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/8390/ne2k-pci.c | 29 ++--
1 file changed, 6 insertions(+), 23 deletions(-)
diff
call the PCI helper functions like
pci_enable/disable_device(), pci_save/restore_sate() and
pci_set_power_state().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/emulex/benet/be_main.c | 22 +++--
1 file changed, 7 insertions(+), 15 deletions(-)
diff
On Wed, Jul 1, 2020 at 6:31 PM Vaibhav Gupta wrote:
>
> Linux Kernel Mentee: Remove Legacy Power Management.
>
> The purpose of this patch series is to remove legacy power management
> callbacks
> from amd ethernet drivers.
s/amd/net
--Vaibhav Gupta
>
> The callbacks
On Wed, 1 Jul 2020 at 21:28, Jakub Kicinski wrote:
>
> On Wed, 1 Jul 2020 18:29:31 +0530 Vaibhav Gupta wrote:
> > With legacy PM, drivers themselves were responsible for managing the
> > device's power states and takes care of register states.
> >
> > After
igned-off-by: Vaibhav Gupta
---
drivers/net/ethernet/amazon/ena/ena_netdev.c | 22
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c
b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index dda4b8fc9525..91be3ffa1c5c 100644
call typhoon_sleep_early() to do
those tasks, hence, the behavior for _open(), _close and _init_one() remain
unchanged. And typhon_suspend() only requires typhoon_sleep_early().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/3com/typhoon.c | 53 +
1
call the PCI helper functions like
pci_enable/disable_device(), pci_save/restore_sate() and
pci_set_power_state().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/8390/ne2k-pci.c | 29 ++--
1 file changed, 6 insertions(+), 23 deletions(-)
diff
the power management
themselves, which is not recommended.
The conversion requires the removal of the those function calls and change the
callback definition accordingly and make use of dev_pm_ops structure.
All patches are compile-tested only.
Vaibhav Gupta (11):
typhoon: use generic power
device-specific operations.
The driver defined empty-body .suspend() and .resume() callbacks earlier.
They can now be define NULL and bind with "struct dev_pm_ops" variable.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
.../net/ethernet/cavium/liquidio/lio_mai
call the PCI helper functions like
pci_save/restore_sate() and pci_set_power_state().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/adaptec/starfire.c | 23 ++-
1 file changed, 6 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/ad
call the PCI helper functions like
pci_enable_wake(), pci_save/restore_sate() and
pci_set_power_state().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/micrel/ksz884x.c | 25 +
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/dr
call the PCI helper functions like
pci_enable/disable_device(), pci_save/restore_sate() and
pci_set_power_state().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/dlink/sundance.c | 27 ---
1 file changed, 8 insertions(+), 19 deletions(-)
diff
dev_pm_ops" variable to bind the callbacks.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/mellanox/mlx4/main.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c
b/drivers/net/ethernet/mellanox/ml
dev_pm_ops" variable to bind the callbacks.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/neterion/vxge/vxge-main.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c
b/drivers/net/etherne
call the PCI helper functions like
pci_enable_device, which is not recommended. Hence, removed.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/natsemi/natsemi.c | 26 +++---
1 file changed, 7 insertions(+), 19 deletions(-)
diff --git a/driver
call the PCI helper functions like
pci_enable/disable_device(), pci_save/restore_sate() and
pci_set_power_state().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/emulex/benet/be_main.c | 22 +++--
1 file changed, 7 insertions(+), 15 deletions(-)
diff
handling the power management
themselves, which is not recommended.
The conversion requires the removal of the those function calls and change the
callback definition accordingly and make use of dev_pm_ops structure.
All patches are compile-tested only.
Vaibhav Gupta (2):
atl1e: use generic power
. Thus, it does not affect the normal functioning of the
driver.
__maybe_unused attribute is used with .resume() but not with .suspend(), as
.suspend() is calleb by .shutdown().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
drivers/net/ethernet/atheros/atlx/atl2.c | 64
. Thus, it does not affect the normal functioning of the
driver.
__maybe_unused attribute is used with .resume() but not with .suspend(), as
.suspend() is calleb by .shutdown().
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
.../net/ethernet/atheros/atl1e/atl1e_main.c | 53
have done their job.
Now, netxen_nic_attach_func() invokes netxen_nic_attach_late_func(), thus
netxen_io_slot_reset() behaves normally.
And, netxen_nic_resume() calls netxen_nic_attach_late_func() to avoid PCI
helper functions calls.
Compile-tested only.
Signed-off-by: Vaibhav Gupta
---
.../eth
1 - 100 of 131 matches
Mail list logo