Linux wireless drivers development
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>,
	linux-wireless@vger.kernel.org, sgruszka@redhat.com,
	roychl666@gmail.com, ryder.lee@mediatek.com
Subject: Re: [PATCH 4/5] mt76: introduce mt76_sw_queue data structure
Date: Wed, 13 Mar 2019 13:14:08 +0100	[thread overview]
Message-ID: <20190313121407.GB4389@localhost.localdomain> (raw)
In-Reply-To: <425244db-1638-1175-fa79-f4bda4cd7150@nbd.name>

[-- Attachment #1: Type: text/plain, Size: 2084 bytes --]

> On 2019-03-02 14:47, Lorenzo Bianconi wrote:
> > Introduce mt76_sw_queue data structure in order to support new
> > chipsets (e.g. mt7615) that have a shared hardware queue for all traffic
> > identifiers. mt76_sw_queue will be used to track outstanding packets
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >  drivers/net/wireless/mediatek/mt76/debugfs.c  |  7 ++-
> >  drivers/net/wireless/mediatek/mt76/dma.c      | 12 ++--
> >  drivers/net/wireless/mediatek/mt76/mac80211.c |  4 +-
> >  drivers/net/wireless/mediatek/mt76/mt76.h     | 16 ++++--
> >  .../wireless/mediatek/mt76/mt7603/beacon.c    |  8 +--
> >  .../net/wireless/mediatek/mt76/mt7603/dma.c   | 13 ++++-
> >  .../net/wireless/mediatek/mt76/mt7603/mac.c   |  4 +-
> >  .../net/wireless/mediatek/mt76/mt7603/main.c  |  2 +-
> >  .../net/wireless/mediatek/mt76/mt76x02_mmio.c | 19 +++++--
> >  .../wireless/mediatek/mt76/mt76x02_usb_core.c |  2 +-
> >  .../net/wireless/mediatek/mt76/mt76x02_util.c |  2 +-
> >  drivers/net/wireless/mediatek/mt76/tx.c       | 55 ++++++++++---------
> >  drivers/net/wireless/mediatek/mt76/usb.c      | 23 +++++---
> >  13 files changed, 100 insertions(+), 67 deletions(-)
> > 
> Turns out this causes a crash on cleanup if not all queues are
> initialized. I will fold in the following fix:
> ---
> --- a/drivers/net/wireless/mediatek/mt76/debugfs.c
> +++ b/drivers/net/wireless/mediatek/mt76/debugfs.c
> @@ -45,7 +45,7 @@ mt76_queues_read(struct seq_file *s, void *data)
>  	for (i = 0; i < ARRAY_SIZE(dev->q_tx); i++) {
>  		struct mt76_sw_queue *q = &dev->q_tx[i];
>  
> -		if (!q->q->ndesc)
> +		if (!q->q)
>  			continue;
>  
>  		seq_printf(s,
> --- a/drivers/net/wireless/mediatek/mt76/dma.c
> +++ b/drivers/net/wireless/mediatek/mt76/dma.c
> @@ -152,7 +152,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
>  	bool wake = false;
>  	int last;
>  
> -	if (!q->ndesc)
> +	if (!q)
>  		return;
>  
>  	spin_lock_bh(&q->lock);

ack, thx for fixing it.

Regards,
Lorenzo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2019-03-13 12:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-02 13:47 [PATCH 0/5] introduce mt76_sw_queue data structure Lorenzo Bianconi
2019-03-02 13:47 ` [PATCH 1/5] mt76: remove mt76_queue dependency from tx_queue_skb function pointer Lorenzo Bianconi
2019-03-02 13:47 ` [PATCH 2/5] mt76: remove mt76_queue dependency from tx_prepare_skb " Lorenzo Bianconi
2019-03-02 13:47 ` [PATCH 3/5] mt76: remove mt76_queue dependency from tx_complete_skb " Lorenzo Bianconi
2019-03-02 13:47 ` [PATCH 4/5] mt76: introduce mt76_sw_queue data structure Lorenzo Bianconi
2019-03-13 11:31   ` Felix Fietkau
2019-03-13 12:14     ` Lorenzo Bianconi [this message]
2019-03-02 13:47 ` [PATCH 5/5] mt76: introduce mt76_txq_id field in mt76_queue_entry Lorenzo Bianconi
2019-03-12 15:59 ` [PATCH 0/5] introduce mt76_sw_queue data structure Felix Fietkau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190313121407.GB4389@localhost.localdomain \
    --to=lorenzo.bianconi@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=roychl666@gmail.com \
    --cc=ryder.lee@mediatek.com \
    --cc=sgruszka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox