提交 43ba6b9f 编写于 作者: A Amitkumar Karwar 提交者: John W. Linville

mwifiex: add PCIe shutdown handler to avoid system hang on reboot

If reboot command is issued when device is in connected state,
system hangs while booting. This issue is fixed by doing cleanup
in shutdown handler.
Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: NBing Zhao <bzhao@marvell.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 8795ca61
......@@ -235,6 +235,14 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev)
kfree(card);
}
static void mwifiex_pcie_shutdown(struct pci_dev *pdev)
{
user_rmmod = 1;
mwifiex_pcie_remove(pdev);
return;
}
static DEFINE_PCI_DEVICE_TABLE(mwifiex_ids) = {
{
PCIE_VENDOR_ID_MARVELL, PCIE_DEVICE_ID_MARVELL_88W8766P,
......@@ -268,6 +276,7 @@ static struct pci_driver __refdata mwifiex_pcie = {
.pm = &mwifiex_pcie_pm_ops,
},
#endif
.shutdown = mwifiex_pcie_shutdown,
};
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册