Return-path: Received: from m12-14.163.com ([220.181.12.14]:47350 "EHLO m12-14.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753681AbcAEB2P (ORCPT ); Mon, 4 Jan 2016 20:28:15 -0500 Message-ID: <568B1C13.9050900@163.com> (sfid-20160105_022819_014986_48EF5983) Date: Tue, 05 Jan 2016 09:27:47 +0800 From: Jia-Ju Bai MIME-Version: 1.0 To: Helmut Schaa CC: Stanislaw Gruszka , kvalo@codeaurora.org, linux-wireless , netdev , LKML Subject: Re: [PATCH] rt2x00pci: Disable memory-write-invalidate when the driver exits References: <1451894138-3482-1-git-send-email-baijiaju1990@163.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: On 01/05/2016 12:50 AM, Helmut Schaa wrote: > On Mon, Jan 4, 2016 at 8:55 AM, Jia-Ju Bai 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 > Looks good to me. > Does this fix any actual issue? > If yes it might we worth to mention it in the commit message. > Helmut > Lacking pci_clear_mwi may cause a resource-release omission, but this omission may not cause obvious issues. For reliability, it is better to add pci_clear_mwi in the driver. Many other drivers do so, such as r8169, 8139cp and e1000. Jia-Ju Bai