]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: endpoint: Clear BAR before freeing its space
authorAlan Mikhak <alan.mikhak@sifive.com>
Thu, 23 May 2019 21:57:27 +0000 (14:57 -0700)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 11 Jun 2019 09:57:54 +0000 (10:57 +0100)
commitebf05f2d2a7c2df5206248ae4778dcb4b884564b
tree897ba4e75074e961113d697d4e21676705403862
parentfebf34a0cdde7995e5878168d63acd4c4cbf4573
PCI: endpoint: Clear BAR before freeing its space

Associated pci_epf_bar structure is needed in pci_epc_clear_bar() to
clear a BAR correctly but it is reset in pci_epf_free_space() (that
is called first) which results in pci_epc_clear_bar() failure.

Reorder the pci_epc_clear_bar()/pci_epf_free_space() calls execution
to fix the issue.

Signed-off-by: Alan Mikhak <alan.mikhak@sifive.com>
[lorenzo.pieralisi@arm.com: reworded the commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/pci/endpoint/functions/pci-epf-test.c