Skip to content

Commit 6d30609

Browse files
committed
Merge tag 'mhi-fixes-for-v6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-linus
Manivannan writes: MHI Host ======== - Use pci_try_reset_function() to reset the MHI function during recovery process to avoid the deadlock reported on the X1E80100 CRD device. The deadlock can happen if the caller has already acquired the 'device_lock()' while calling the recovery function. So using pci_try_reset_function() avoids the deadlock by returning -EAGAIN if the lock was already acquired. * tag 'mhi-fixes-for-v6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: pci_generic: Use pci_try_reset_function() to avoid deadlock
2 parents 954b891 + a321d16 commit 6d30609

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/bus/mhi/host/pci_generic.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,8 +1095,9 @@ static void mhi_pci_recovery_work(struct work_struct *work)
10951095
err_unprepare:
10961096
mhi_unprepare_after_power_down(mhi_cntrl);
10971097
err_try_reset:
1098-
if (pci_reset_function(pdev))
1099-
dev_err(&pdev->dev, "Recovery failed\n");
1098+
err = pci_try_reset_function(pdev);
1099+
if (err)
1100+
dev_err(&pdev->dev, "Recovery failed: %d\n", err);
11001101
}
11011102

11021103
static void health_check(struct timer_list *t)

0 commit comments

Comments
 (0)