Patchwork [Oneiric/Precise/Quantal/raring,SRU] UBUNTU: SAUCE: rt2x00: rt2x00pci_regbusy_read() - only print register access failure once

login
register
mail settings
Submitter Tim Gardner
Date Feb. 18, 2013, 8:05 p.m.
Message ID <1361217922-111354-1-git-send-email-tim.gardner@canonical.com>
Download mbox | patch
Permalink /patch/221464/
State New
Headers show

Comments

Tim Gardner - Feb. 18, 2013, 8:05 p.m.
(upstreamed to stable as well)
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.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---

This doesn't really fix the register read failure, but at least it stops clogging
dmesg.

 drivers/net/wireless/rt2x00/rt2x00pci.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Brad Figg - Feb. 18, 2013, 8:36 p.m.
On 02/18/2013 12:05 PM, Tim Gardner wrote:
> (upstreamed to stable as well)
> 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.
> 
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
> 
> This doesn't really fix the register read failure, but at least it stops clogging
> dmesg.
> 
>  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 a0c8cae..b1c673e 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,
>  		udelay(REGISTER_BUSY_DELAY);
>  	}
>  
> -	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;
>
Stefan Bader - Feb. 19, 2013, 8:07 a.m.

Tim Gardner - Feb. 19, 2013, 3:55 p.m.

Patch

diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index a0c8cae..b1c673e 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,
 		udelay(REGISTER_BUSY_DELAY);
 	}
 
-	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;