linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Chiu <chiu@endlessm.com>
To: Tony Chuang <yhchuang@realtek.com>
Cc: Kalle Valo <kvalo@codeaurora.org>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Brian Norris <briannorris@chromium.org>
Subject: Re: [PATCH 2/6] rtw88: pci: reset dma when reset pci trx ring
Date: Fri, 29 Nov 2019 11:33:29 +0800	[thread overview]
Message-ID: <CAB4CAwfoGxxZfuDJnbrxBNGXgxfsJzFNtqCXv4ZpEQx23eZRmQ@mail.gmail.com> (raw)
In-Reply-To: <20191128121907.6178-3-yhchuang@realtek.com>

On Thu, Nov 28, 2019 at 8:19 PM <yhchuang@realtek.com> wrote:
>
> From: Chin-Yen Lee <timlee@realtek.com>
>
> When pci trx ring is reset, hw dma setting should be reset together.
> Otherswise, the rx_tag of rx flow is not synchronous to hw.
>
> Signed-off-by: Chin-Yen Lee <timlee@realtek.com>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
> ---
>  drivers/net/wireless/realtek/rtw88/pci.c | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c
> index 068f1bec88e6..78971cefb948 100644
> --- a/drivers/net/wireless/realtek/rtw88/pci.c
> +++ b/drivers/net/wireless/realtek/rtw88/pci.c
> @@ -486,13 +486,6 @@ static void rtw_pci_disable_interrupt(struct rtw_dev *rtwdev,
>         rtwpci->irq_enabled = false;
>  }
>
> -static int rtw_pci_setup(struct rtw_dev *rtwdev)
> -{
> -       rtw_pci_reset_trx_ring(rtwdev);
> -
> -       return 0;
> -}
> -
>  static void rtw_pci_dma_reset(struct rtw_dev *rtwdev, struct rtw_pci *rtwpci)
>  {
>         /* reset dma and rx tag */
> @@ -501,6 +494,16 @@ static void rtw_pci_dma_reset(struct rtw_dev *rtwdev, struct rtw_pci *rtwpci)
>         rtwpci->rx_tag = 0;
>  }
>
> +static int rtw_pci_setup(struct rtw_dev *rtwdev)
> +{
> +       struct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv;
> +
> +       rtw_pci_reset_trx_ring(rtwdev);
> +       rtw_pci_dma_reset(rtwdev, rtwpci);
> +
> +       return 0;
> +}
> +
Just a little curious about that the rtw_pci_dma_reset() is already in
rtw_pci_start(), then is it really necessary to do it in _setup? Or
maybe the rtw_pci_dma_reset() in rtw_pci_start should be removed?

Chris

>  static void rtw_pci_dma_release(struct rtw_dev *rtwdev, struct rtw_pci *rtwpci)
>  {
>         struct rtw_pci_tx_ring *tx_ring;
> --
> 2.17.1
>

  reply	other threads:[~2019-11-29  3:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28 12:19 [PATCH 0/6] rtw88: add wowlan support for 8822c yhchuang
2019-11-28 12:19 ` [PATCH 1/6] rtw88: pci: reset ring index when release skbs in tx ring yhchuang
2019-11-28 12:19 ` [PATCH 2/6] rtw88: pci: reset dma when reset pci trx ring yhchuang
2019-11-29  3:33   ` Chris Chiu [this message]
2019-11-29  5:27     ` Tony Chuang
2019-11-28 12:19 ` [PATCH 3/6] rtw88: load wowlan firmware if wowlan is supported yhchuang
2019-11-28 12:19 ` [PATCH 4/6] rtw88: support wowlan feature for 8822c yhchuang
2019-11-28 12:19 ` [PATCH 5/6] rtw88: Add wowlan pattern match support yhchuang
2019-11-28 12:19 ` [PATCH 6/6] rtw88: add wowlan net-detect support yhchuang

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=CAB4CAwfoGxxZfuDJnbrxBNGXgxfsJzFNtqCXv4ZpEQx23eZRmQ@mail.gmail.com \
    --to=chiu@endlessm.com \
    --cc=briannorris@chromium.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=yhchuang@realtek.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;
as well as URLs for NNTP newsgroup(s).