]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: Fix PCI module removal leak
authorJose Abreu <jose.abreu@synopsys.com>
Wed, 9 Jan 2019 09:05:56 +0000 (10:05 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Jan 2019 23:35:06 +0000 (15:35 -0800)
commitb735ebcffc02853496fe1924c44a97296e84e426
tree73ca61cfe62d08b6033eee71dfe6757ef080d698
parenta442ae074571565151bbb4770fe7729944f32bd1
net: stmmac: Fix PCI module removal leak

Since commit a48a5f58a8c9, the enable / disable of PCI device is not
managed which will result in IO regions not being automatically unmapped.
As regions continue mapped it is currently not possible to remove and
then probe again the PCI module of stmmac.

Fix this by manually unmapping regions on remove callback.

Changes from v1:
- Fix build error

Cc: Joao Pinto <jpinto@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Fixes: a48a5f58a8c9 ("net: stmmac: Fix WoL for PCI-based setups")
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c