Message ID | 20240814092946.1371750-1-yiyang13@huawei.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [-next] sfc: Add missing pci_disable_device() for efx_pm_resume() | expand |
On 14/08/2024 10:29, Yi Yang wrote: > Add missing pci_disable_device() in error path of efx_pm_resume(). > > Fixes: 6e173d3b4af9 ("sfc: Copy shared files needed for Siena (part 1)") > Signed-off-by: Yi Yang <yiyang13@huawei.com> Hi Yi, a couple of questions. 1) Could you explain in more detail in the commit message why this is needed? It's far from clear to me, though that could just be due to my limited knowledge about PM. 2) Is there any reason to only do this for Siena? AFAICT the ef10/ ef100 driver has the same code (drivers/net/ethernet/sfc/efx.c), so would this change also be needed there? Same goes for Falcon (drivers/net/ethernet/sfc/falcon/efx.c:ef4_pm_resume). -ed
diff --git a/drivers/net/ethernet/sfc/siena/efx.c b/drivers/net/ethernet/sfc/siena/efx.c index 59d3a6043379..dce9a5174e4a 100644 --- a/drivers/net/ethernet/sfc/siena/efx.c +++ b/drivers/net/ethernet/sfc/siena/efx.c @@ -1240,13 +1240,15 @@ static int efx_pm_resume(struct device *dev) pci_set_master(efx->pci_dev); rc = efx->type->reset(efx, RESET_TYPE_ALL); if (rc) - return rc; + goto fail; down_write(&efx->filter_sem); rc = efx->type->init(efx); up_write(&efx->filter_sem); if (rc) - return rc; + goto fail; rc = efx_pm_thaw(dev); +fail: + pci_disable_device(pci_dev); return rc; }
Add missing pci_disable_device() in error path of efx_pm_resume(). Fixes: 6e173d3b4af9 ("sfc: Copy shared files needed for Siena (part 1)") Signed-off-by: Yi Yang <yiyang13@huawei.com> --- drivers/net/ethernet/sfc/siena/efx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)