Search Linux Wireless

Re: pull request: mt76 2020-12-04 v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Felix Fietkau <nbd@xxxxxxxx> wrote:
> 
> > Hi Kalle,
> > 
> > sorry about the last one. Here's the updated PR with the missing 
> > S-o-b fixed.
> > 
> > - Felix
> > 
> > The following changes since commit 9eb597c74483ad5c230a884449069adfb68285ea:
> > 
> >   Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git (2020-12-02 21:46:55 +0200)
> > 
> > are available in the Git repository at:
> > 
> >   https://github.com/nbd168/wireless tags/mt76-for-kvalo-2020-12-04
> > 
> > for you to fetch changes up to f12758f6f929dbcd37abdb1d91d245539eca48f8:
> > 
> >   mt76: mt7615: Fix fall-through warnings for Clang (2020-12-04 22:24:54 +0100)
> > 
> > ----------------------------------------------------------------
> > mt76 patches for 5.11
> > 
> > * mt7915 fixes
> > * mt7615 fixes
> > * support for more sta interfaces on mt7615/mt7915
> > * mt7915 encap offload
> > * performance improvements
> > * channel noise report on mt7915
> > * usb/sdio support improvements
> > * mt7915 testmode support
> > * mt7915 DBDC support
> > * warning fixes
> > 
> > ----------------------------------------------------------------
> 
> This conflicted with commit 807982017730 ("mt76: usb: fix crash on device
> removal") from wireless-drivers. I fixed with a diff below and pushed it to the
> pending branch:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=pending&id=f4a243bfdb0d9afc850d35755dc0bae0b980b4ac
> 
> Please double check my resolution. Also I wonder should the usb.status_worker
> have a similar fix as tx_worker had? If yes, someone please send a followup
> patch for that.

Hi Kalle,

the patch seems fine to me, probably we can move
mt76_worker_{disable,enable}(&dev->usb.status_worker) inside the if (!ret)
block as originally done by Stanislaw. Something like:

diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index dc850109de22..18444f26103e 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -1039,8 +1039,6 @@ void mt76u_stop_tx(struct mt76_dev *dev)
 {
 	int ret;
 
-	mt76_worker_disable(&dev->usb.status_worker);
-
 	ret = wait_event_timeout(dev->tx_wait, !mt76_has_tx_pending(&dev->phy),
 				 HZ / 5);
 	if (!ret) {
@@ -1059,6 +1057,7 @@ void mt76u_stop_tx(struct mt76_dev *dev)
 				usb_kill_urb(q->entry[j].urb);
 		}
 
+		mt76_worker_disable(&dev->usb.status_worker);
 		mt76_worker_disable(&dev->tx_worker);
 
 		/* On device removal we maight queue skb's, but mt76u_tx_kick()
@@ -1077,13 +1076,12 @@ void mt76u_stop_tx(struct mt76_dev *dev)
 		}
 
 		mt76_worker_enable(&dev->tx_worker);
+		mt76_worker_enable(&dev->usb.status_worker);
 	}
 
 	cancel_work_sync(&dev->usb.stat_work);
 	clear_bit(MT76_READING_STATS, &dev->phy.state);
 
-	mt76_worker_enable(&dev->usb.status_worker);
-
 	mt76_tx_status_check(dev, NULL, true);
 }
 EXPORT_SYMBOL_GPL(mt76u_stop_tx);

Regards,
Lorenzo

> 
> diff --cc drivers/net/wireless/mediatek/mt76/usb.c
> index f1ae9ff835b2,81393788f98e..000000000000
> --- a/drivers/net/wireless/mediatek/mt76/usb.c
> +++ b/drivers/net/wireless/mediatek/mt76/usb.c
> @@@ -1020,6 -1039,9 +1039,8 @@@ void mt76u_stop_tx(struct mt76_dev *dev
>   {
>         int ret;
>   
>  -      mt76_worker_disable(&dev->tx_worker);
> +       mt76_worker_disable(&dev->usb.status_worker);
> + 
>         ret = wait_event_timeout(dev->tx_wait, !mt76_has_tx_pending(&dev->phy),
>                                  HZ / 5);
>         if (!ret) {
> @@@ -1061,6 -1078,9 +1082,8 @@@
>         cancel_work_sync(&dev->usb.stat_work);
>         clear_bit(MT76_READING_STATS, &dev->phy.state);
>   
>  -      mt76_worker_enable(&dev->tx_worker);
> +       mt76_worker_enable(&dev->usb.status_worker);
> + 
>         mt76_tx_status_check(dev, NULL, true);
>   }
>   EXPORT_SYMBOL_GPL(mt76u_stop_tx);
> 
> 
> 
> -- 
> https://patchwork.kernel.org/project/linux-wireless/patch/f42bcdc1-2cd4-9f44-2889-bbb9e10e038a@xxxxxxxx/
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
> 

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux