[PATCH 37/72] rt2x00: rt2x00pci_regbusy_read() - only print register access failure once

Luis Henriques luis.henriques at canonical.com
Thu Apr 18 09:16:22 UTC 2013 -stable review patch.  If anyone has any objections, please let me know.


From: Tim Gardner <tim.gardner at canonical.com>

commit 83589b30f1e1dc9898986293c9336b8ce1705dec upstream.

BugLink: http://bugs.launchpad.net/bugs/1128840

It appears that when this register read fails it never recovers, so
I think there is no need to repeat the same error message ad infinitum.

Cc: Ivo van Doorn <IvDoorn at gmail.com>
Cc: Gertjan van Wingerde <gwingerde at gmail.com>
Cc: Helmut Schaa <helmut.schaa at googlemail.com>
Cc: "John W. Linville" <linville at tuxdriver.com>
Cc: linux-wireless at vger.kernel.org
Cc: users at rt2x00.serialmonkey.com
Cc: netdev at vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
Signed-off-by: John W. Linville <linville at tuxdriver.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
 drivers/net/wireless/rt2x00/rt2x00pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index 0a4653a..1ea98a8 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -52,8 +52,8 @@ int rt2x00pci_regbusy_read(struct rt2x00_dev *rt2x00dev,
-	ERROR(rt2x00dev, "Indirect register access failed: "
-	      "offset=0x%.08x, value=0x%.08x\n", offset, *reg);
+	printk_once(KERN_ERR "%s() Indirect register access failed: "
+	      "offset=0x%.08x, value=0x%.08x\n", __func__, offset, *reg);
 	*reg = ~0;
 	return 0;

More information about the kernel-team mailing list