The pci_epc_ops is not intended to be invoked from interrupt context. Hence replace spin_lock_irqsave and spin_unlock_irqrestore with mutex_lock and mutex_unlock respectively.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -88,7 +88,7 @@ struct pci_epc_mem { · 87 unmodified lines | ||
| 88 | 88 | * @mem: address space of the endpoint controller |
| 89 | 89 | * @max_functions: max number of functions that can be configured in this EPC |
| 90 | 90 | * @group: configfs group representing the PCI EPC device |
| 91 | − * @lock: spinlock to protect pci_epc ops | |
| 91 | + * @lock: mutex to protect pci_epc ops | |
| 92 | 92 | * @notifier: used to notify EPF of any EPC events (like linkup) |
| 93 | 93 | */ |
| 94 | 94 | struct pci_epc { |
| @@ -98,8 +98,8 @@ struct pci_epc { · 3 unmodified lines | ||
| 98 | 98 | struct pci_epc_mem *mem; |
| 99 | 99 | u8 max_functions; |
| 100 | 100 | struct config_group *group; |
| 101 | − /* spinlock to protect against concurrent access of EP controller */ | |
| 102 | − spinlock_t lock; | |
| 101 | + /* mutex to protect against concurrent access of EP controller */ | |
| 102 | + struct mutex lock; | |
| 103 | 103 | struct atomic_notifier_head notifier; |
| 104 | 104 | }; |
| 105 | 105 | |