linux/drivers/pci/endpoint
Kunihiko Hayashi f58d5f53c8 PCI: endpoint: Fix clearing start entry in configfs
After an endpoint is started through configfs, if 0 is written to the
configfs entry 'start', the controller stops but the epc_group->start
value remains 1.

A subsequent unlinking of the function from the controller would trigger
a spurious WARN_ON_ONCE() in pci_epc_epf_unlink() despite right
behavior.

Fix it by setting epc_group->start = 0 when a controller is stopped
using configfs.

Fixes: d746799116 ("PCI: endpoint: Introduce configfs entry for configuring EP functions")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
2020-03-31 09:13:27 +01:00
..
functions PCI: pci-epf-test: Add support to defer core initialization 2020-02-26 09:58:41 +00:00
Kconfig PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
Makefile PCI: Add SPDX GPL-2.0 when no license was specified 2018-01-26 11:45:16 -06:00
pci-ep-cfs.c PCI: endpoint: Fix clearing start entry in configfs 2020-03-31 09:13:27 +01:00
pci-epc-core.c PCI: endpoint: Add notification for core init completion 2020-02-25 12:02:25 +00:00
pci-epc-mem.c PCI: endpoint: Fix for concurrent memory allocation in OB address region 2020-02-24 10:13:48 +00:00
pci-epf-core.c PCI: endpoint: Protect concurrent access to pci_epf_ops with mutex 2020-02-24 10:15:33 +00:00