Commit 688d2eb
PCI: endpoint: Clear secondary (not primary) EPC in pci_epc_remove_epf()
In addition to a primary endpoint controller, an endpoint function may be
associated with a secondary endpoint controller, epf->sec_epc, to provide
NTB (non-transparent bridge) functionality.
Previously, pci_epc_remove_epf() incorrectly cleared epf->epc instead of
epf->sec_epc when removing from the secondary endpoint controller.
Extend the epc->list_lock coverage and clear either epf->epc or
epf->sec_epc as indicated.
Link: https://lore.kernel.org/r/[email protected]
Fixes: 63840ff ("PCI: endpoint: Add support to associate secondary EPC with EPF")
Signed-off-by: Zijun Hu <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
[mani: reworded subject and description]
Signed-off-by: Manivannan Sadhasivam <[email protected]>
[bhelgaas: commit log]
Signed-off-by: Bjorn Helgaas <[email protected]>
Signed-off-by: Krzysztof Wilczyński <[email protected]>
Cc: [email protected]1 parent 4acc902 commit 688d2eb
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
746 | 746 | | |
747 | 747 | | |
748 | 748 | | |
| 749 | + | |
749 | 750 | | |
750 | 751 | | |
751 | 752 | | |
| 753 | + | |
752 | 754 | | |
753 | 755 | | |
754 | 756 | | |
| 757 | + | |
755 | 758 | | |
756 | | - | |
757 | | - | |
758 | 759 | | |
759 | 760 | | |
760 | | - | |
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
| |||
0 commit comments