mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
pci-v5.16-fixes-1
-----BEGIN PGP SIGNATURE----- iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAmGNcPYUHGJoZWxnYWFz QGdvb2dsZS5jb20ACgkQWYigwDrT+vxTvQ//Wl8O7D+ckdw/4xMVi2N2uc6vCbB6 or5wmW1jfE6H7YvXbUrSMEBFoRfaz9nhuT3w9i60hzYmc9uqbsMCONBHLFAaILCP By/qkNgMFuskZGHTziqsf2Qfza04KQDv4quUl8SvlUfQeOtzUXe0vtXCrFmMTDGs QQ/bbVbI6WazTwzC11NALU3Kc8AZQXQMkd5Nt4fBfuZwFhBfnEckJgF3PmSZ7PpO N/29wJDsdkHSBNqTO1eeqdVIN8GQ6aycUYEQp3gvDCvwQ3CXtPP6SScTnqibbzjO 3wuBk+FFH8Zdq8e7CEYoj0mL2RMKhLrY1MLV8IGI1YiPy8pH1EujOiDG0uNk7YSg Zqo3NMq9L2IR28odTMc8W8oknz6CTO+rhoW22CbyImtrPT5RnWsyj1xH+k2lMxt/ 3viTV5lDzKr6V6c5xdhCP26eNzt06mlrduvQ5EvsfGu6whckyrgd6XOppExdWA/S 24N9GCJuZRCp5wgETq+Vxl48ZWLzkJ3IwoVrIhx4UTChvXPIgYrviGnEFp64ZCuc FbrINeeddxWdXkkuJ44FhmSkv7Gcl87w0cofy9tnArxZza5v3wGATFp7G1z8WO+0 HWoBhdeGGQ3+ClJUo9ihO2r9hABUbveJqxgjQbCs8P/7bR0acCoeGJCoZVj7KUUe a6GDw16Lfu87QuQ= =0aFC -----END PGP SIGNATURE----- Merge tag 'pci-v5.16-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "Revert conversion to struct device.driver instead of struct pci_dev.driver. The device.driver is set earlier, and using it caused the PCI core to call driver PM entry points before .probe() and after .remove(), when the driver isn't prepared. This caused NULL pointer dereferences in i2c_designware_pci and probably other driver issues" * tag 'pci-v5.16-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: Revert "PCI: Use to_pci_driver() instead of pci_dev->driver" Revert "PCI: Remove struct pci_dev->driver"
This commit is contained in:
commit
5833291ab6
5 changed files with 42 additions and 45 deletions
|
@ -5135,14 +5135,13 @@ EXPORT_SYMBOL_GPL(pci_dev_unlock);
|
|||
|
||||
static void pci_dev_save_and_disable(struct pci_dev *dev)
|
||||
{
|
||||
struct pci_driver *drv = to_pci_driver(dev->dev.driver);
|
||||
const struct pci_error_handlers *err_handler =
|
||||
drv ? drv->err_handler : NULL;
|
||||
dev->driver ? dev->driver->err_handler : NULL;
|
||||
|
||||
/*
|
||||
* drv->err_handler->reset_prepare() is protected against races
|
||||
* with ->remove() by the device lock, which must be held by the
|
||||
* caller.
|
||||
* dev->driver->err_handler->reset_prepare() is protected against
|
||||
* races with ->remove() by the device lock, which must be held by
|
||||
* the caller.
|
||||
*/
|
||||
if (err_handler && err_handler->reset_prepare)
|
||||
err_handler->reset_prepare(dev);
|
||||
|
@ -5167,15 +5166,15 @@ static void pci_dev_save_and_disable(struct pci_dev *dev)
|
|||
|
||||
static void pci_dev_restore(struct pci_dev *dev)
|
||||
{
|
||||
struct pci_driver *drv = to_pci_driver(dev->dev.driver);
|
||||
const struct pci_error_handlers *err_handler =
|
||||
drv ? drv->err_handler : NULL;
|
||||
dev->driver ? dev->driver->err_handler : NULL;
|
||||
|
||||
pci_restore_state(dev);
|
||||
|
||||
/*
|
||||
* drv->err_handler->reset_done() is protected against races with
|
||||
* ->remove() by the device lock, which must be held by the caller.
|
||||
* dev->driver->err_handler->reset_done() is protected against
|
||||
* races with ->remove() by the device lock, which must be held by
|
||||
* the caller.
|
||||
*/
|
||||
if (err_handler && err_handler->reset_done)
|
||||
err_handler->reset_done(dev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue