pxa2xx-ac97: fix displaying GSR after reset timeout
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH RESEND 1/1 pxa2xx-ac97: fix displaying GSR after reset timeout
the variable gsr_bit is set in isr. It is however set to 0 and interrupts are disabled prior to reset on pxa27x and pxa3xx. Hence it doesn't make a lot of sense to show the content of gsr_bit in case of a reset timeout.
--- sound/arm/pxa2xx-ac97-lib.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
sound/arm/pxa2xx-ac97-lib.c +2 -2
@@ -218,7 +218,7 @@ bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97)if (!((GSR | gsr_bits) & (GSR_PCR |GSR_SCR ))) {printk (KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n" , - __func__, gsr_bits); + __func__,GSR | gsr_bits);return false; }
@@ -248,7 +248,7 @@ bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97)if (!((GSR | gsr_bits) & (GSR_PCR |GSR_SCR ))) {printk (KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n" , - __func__, gsr_bits); + __func__,GSR | gsr_bits);return false; }
Signature · 1 line
1.5.6.5
Quoted 3 lines · Luotao Fu
the variable
gsr_bitis set in isr. It is however set to 0 and interrupts are disabled prior to reset on pxa27x and pxa3xx. Hence it doesn't make a lot of sense to show the content ofgsr_bitin case of a reset timeout.
It would make more sense to put "GSR | gsr_bits" into a temporary variable for testing, and then printing so that the value printed is the exact value which was tested, not somehting that may have changed.
Also, you've resent your patch but omitted the ALSA mailing list.
Quoted 3 lines · Russell King - ARM Linux
It would make more sense to put "GSR |
gsr_bits" into a temporary variable for testing, and then printing so that the value printed is the exact value which was tested, not somehting that may have changed.
Indeed - Luotao, please make this change.
Quoted 1 line
Also, you've resent your patch but omitted the ALSA mailing list.
Looks like it's there on the copies that reached here.
PATCH 1/1 pxa2xx-ac97: fix displaying GSR after reset timeout
the variable gsr_bit is set in isr. It is however set to 0 and interrupts are disabled prior to reset. Hence it doesn't make a lot of sense to show the content of gsr_bit in case of a reset timeout.
--- sound/arm/pxa2xx-ac97-lib.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-)
sound/arm/pxa2xx-ac97-lib.c +10 -5
@@ -199,6 +199,8 @@ static inline void pxa_ac97_cold_pxa3xx(void)bool pxa2xx_ac97_try_warm_reset (struct snd_ac97 *ac97) { +unsigned long gsr; +#ifdef CONFIG_PXA25xif (cpu_is_pxa25x ())pxa_ac97_warm_pxa25x ();
@@ -215,10 +217,10 @@ bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97) else#endif BUG (); - -if (!((GSR | gsr_bits) & (GSR_PCR |GSR_SCR ))) { + gsr =GSR | gsr_bits; +if (!(gsr & (GSR_PCR |GSR_SCR ))) {printk (KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n" , - __func__, gsr_bits); + __func__, gsr);return false; }
@@ -229,6 +231,8 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_try_warm_reset);bool pxa2xx_ac97_try_cold_reset (struct snd_ac97 *ac97) { +unsigned long gsr; +#ifdef CONFIG_PXA25xif (cpu_is_pxa25x ())pxa_ac97_cold_pxa25x ();
@@ -246,9 +250,10 @@ bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97)#endif BUG (); -if (!((GSR | gsr_bits) & (GSR_PCR |GSR_SCR ))) { + gsr =GSR | gsr_bits; +if (!(gsr & (GSR_PCR |GSR_SCR ))) {printk (KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n" , - __func__, gsr_bits); + __func__, gsr);return false; }
Signature · 1 line
1.6.2
Mark Brown
AppliedQuoted 5 lines · Luotao Fu
the variable
gsr_bitis set in isr. It is however set to 0 and interrupts are disabled prior to reset. Hence it doesn't make a lot of sense to show the content ofgsr_bitin case of a reset timeout.Signed-off-by Luotao Fu <[email protected]>
Applied, thanks!