Hi Brian, > > + > > static int > > mwifiex_map_pci_memory(struct mwifiex_adapter *adapter, struct > sk_buff *skb, > > size_t size, int flags) > > @@ -249,6 +252,8 @@ static void mwifiex_pcie_remove(struct pci_dev > *pdev) > > if (!adapter || !adapter->priv_num) > > return; > > > > + cancel_work_sync(&pcie_work); > > Hmm, actually what happens if we have !adapter? Then that means we've > already torn down the device (e.g., unregister_dev() -- except we > haven't quite fixed that bug, see the other patch series you sent out), > and so we'll never reach this. But that also means we haven't > synchronized any outstanding work. There won't be any outstanding work in that case where init failure thread has already cleared "adapter" Pcie/sdio Work(firmware dump + card reset) is scheduled in below two scenarios 1) Command timeout -- We have a check to skip triggering work when hw_status shows it's INITIALIZING. 2) Tx data timeout -- Tx data is applicable only when wifi connection is alive. In above mentioned case, device itself has failed to initialize. > > So this really belongs in one of the earlier mwifiex callbacks > (unregister_dev()?), and not in the device remove() callback. > Regards, Amitkumar