Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "mwifiex: fix sleep in atomic context bugs caused by dev_coredumpv"

This reverts commit a52ed4866d2b90dd5e4ae9dabd453f3ed8fa3cbc as it
causes build problems in linux-next. It needs to be reintroduced in a
way that can allow the api to evolve and not require a "flag day" to
catch all users.

Link: https://lore.kernel.org/r/20220623160723.7a44b573@canb.auug.org.au
Cc: Duoming Zhou <duoming@zju.edu.cn>
Cc: Brian Norris <briannorris@chromium.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+8 -10
+4 -5
drivers/net/wireless/marvell/mwifiex/init.c
··· 63 63 adapter->if_ops.card_reset(adapter); 64 64 } 65 65 66 - static void fw_dump_work(struct work_struct *work) 66 + static void fw_dump_timer_fn(struct timer_list *t) 67 67 { 68 - struct mwifiex_adapter *adapter = 69 - container_of(work, struct mwifiex_adapter, devdump_work.work); 68 + struct mwifiex_adapter *adapter = from_timer(adapter, t, devdump_timer); 70 69 71 70 mwifiex_upload_device_dump(adapter); 72 71 } ··· 321 322 adapter->active_scan_triggered = false; 322 323 timer_setup(&adapter->wakeup_timer, wakeup_timer_fn, 0); 323 324 adapter->devdump_len = 0; 324 - INIT_DELAYED_WORK(&adapter->devdump_work, fw_dump_work); 325 + timer_setup(&adapter->devdump_timer, fw_dump_timer_fn, 0); 325 326 } 326 327 327 328 /* ··· 400 401 mwifiex_adapter_cleanup(struct mwifiex_adapter *adapter) 401 402 { 402 403 del_timer(&adapter->wakeup_timer); 403 - cancel_delayed_work_sync(&adapter->devdump_work); 404 + del_timer_sync(&adapter->devdump_timer); 404 405 mwifiex_cancel_all_pending_cmd(adapter); 405 406 wake_up_interruptible(&adapter->cmd_wait_q.wait); 406 407 wake_up_interruptible(&adapter->hs_activate_wait_q);
+1 -2
drivers/net/wireless/marvell/mwifiex/main.h
··· 49 49 #include <linux/pm_runtime.h> 50 50 #include <linux/slab.h> 51 51 #include <linux/of_irq.h> 52 - #include <linux/workqueue.h> 53 52 54 53 #include "decl.h" 55 54 #include "ioctl.h" ··· 1055 1056 /* Device dump data/length */ 1056 1057 void *devdump_data; 1057 1058 int devdump_len; 1058 - struct delayed_work devdump_work; 1059 + struct timer_list devdump_timer; 1059 1060 1060 1061 bool ignore_btcoex_events; 1061 1062 };
+3 -3
drivers/net/wireless/marvell/mwifiex/sta_event.c
··· 623 623 * transmission event get lost, in this cornel case, 624 624 * user would still get partial of the dump. 625 625 */ 626 - schedule_delayed_work(&adapter->devdump_work, 627 - msecs_to_jiffies(MWIFIEX_TIMER_10S)); 626 + mod_timer(&adapter->devdump_timer, 627 + jiffies + msecs_to_jiffies(MWIFIEX_TIMER_10S)); 628 628 } 629 629 630 630 /* Overflow check */ ··· 643 643 return; 644 644 645 645 upload_dump: 646 - cancel_delayed_work_sync(&adapter->devdump_work); 646 + del_timer_sync(&adapter->devdump_timer); 647 647 mwifiex_upload_device_dump(adapter); 648 648 } 649 649