diff options
author | Takashi Iwai <tiwai@suse.de> | 2023-02-16 16:18:54 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-02-16 16:18:54 +0300 |
commit | 5661706efa200252d0e9fea02421b0a5857808c3 (patch) | |
tree | b6943001feff0af67c206a850be9c536fe3990b4 /drivers/net/wwan/t7xx/t7xx_netdev.c | |
parent | 5791c7699ff1b8be24e1e3b2c08b180598d3ba28 (diff) | |
parent | 5beb5627a2481aade9aa630b7ebb7f99442321b6 (diff) | |
download | linux-5661706efa200252d0e9fea02421b0a5857808c3.tar.xz |
Merge branch 'topic/apple-gmux' into for-next
Pull vga_switcheroo fix for Macs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/net/wwan/t7xx/t7xx_netdev.c')
-rw-r--r-- | drivers/net/wwan/t7xx/t7xx_netdev.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/wwan/t7xx/t7xx_netdev.c b/drivers/net/wwan/t7xx/t7xx_netdev.c index 494a28e386a3..3ef4a8a4f8fd 100644 --- a/drivers/net/wwan/t7xx/t7xx_netdev.c +++ b/drivers/net/wwan/t7xx/t7xx_netdev.c @@ -27,6 +27,7 @@ #include <linux/list.h> #include <linux/netdev_features.h> #include <linux/netdevice.h> +#include <linux/pm_runtime.h> #include <linux/skbuff.h> #include <linux/types.h> #include <linux/wwan.h> @@ -45,12 +46,25 @@ static void t7xx_ccmni_enable_napi(struct t7xx_ccmni_ctrl *ctlb) { - int i; + struct dpmaif_ctrl *ctrl; + int i, ret; + + ctrl = ctlb->hif_ctrl; if (ctlb->is_napi_en) return; for (i = 0; i < RXQ_NUM; i++) { + /* The usage count has to be bumped every time before calling + * napi_schedule. It will be decresed in the poll routine, + * right after napi_complete_done is called. + */ + ret = pm_runtime_resume_and_get(ctrl->dev); + if (ret < 0) { + dev_err(ctrl->dev, "Failed to resume device: %d\n", + ret); + return; + } napi_enable(ctlb->napi[i]); napi_schedule(ctlb->napi[i]); } |