[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXE3d9tTr6hyOjh==Mn5tNQSy-hMBhxtmsWNY_tLgJqE=B38A@mail.gmail.com>
Date: Mon, 4 Jan 2016 17:50:36 +0100
From: Helmut Schaa <helmut.schaa@...glemail.com>
To: Jia-Ju Bai <baijiaju1990@....com>
Cc: Stanislaw Gruszka <sgruszka@...hat.com>, kvalo@...eaurora.org,
linux-wireless <linux-wireless@...r.kernel.org>,
netdev <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rt2x00pci: Disable memory-write-invalidate when the
driver exits
On Mon, Jan 4, 2016 at 8:55 AM, Jia-Ju Bai <baijiaju1990@....com> wrote:
> The driver calls pci_set_mwi to enable memory-write-invalidate when it
> is initialized, but does not call pci_clear_mwi when it is removed. Many
> other drivers calls pci_clear_mwi when pci_set_mwi is called, such as
> r8169, 8139cp and e1000.
>
> This patch adds pci_clear_mwi in error handling and removal procedure,
> which can fix the problem.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@....com>
Looks good to me.
Does this fix any actual issue?
If yes it might we worth to mention it in the commit message.
Helmut
> ---
> drivers/net/wireless/rt2x00/rt2x00pci.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
> index d93db4b..eb6dbcd 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
> @@ -149,6 +149,7 @@ exit_free_device:
> ieee80211_free_hw(hw);
>
> exit_release_regions:
> + pci_clear_mwi(pci_dev);
> pci_release_regions(pci_dev);
>
> exit_disable_device:
> @@ -173,6 +174,7 @@ void rt2x00pci_remove(struct pci_dev *pci_dev)
> /*
> * Free the PCI device data.
> */
> + pci_clear_mwi(pci_dev);
> pci_disable_device(pci_dev);
> pci_release_regions(pci_dev);
> }
> --
> 1.7.9.5
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists