LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] bus: ti-sysc: Fix error handling for sysc_check_active_timer()
@ 2021-08-11  6:10 Tony Lindgren
  2021-08-11  6:22 ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2021-08-11  6:10 UTC (permalink / raw)
  To: linux-omap
  Cc: Dave Gerlach, Faiz Abbas, Greg Kroah-Hartman, Grygorii Strashko,
	Keerthy, Nishanth Menon, Suman Anna, linux-kernel,
	linux-arm-kernel, Pavel Machek, Jarkko Nikula

We have changed the return type for sysc_check_active_timer() from -EBUSY
to -ENXIO, but the gpt12 system timer fix still checks for -EBUSY. We are
also not returning on other errors like we did earlier as noted by
Pavel Machek <pavel@denx.de>.

Commit 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with
reserved status") should have been updated for commit 65fb73676112
("bus: ti-sysc: suppress err msg for timers used as clockevent/source").

Let's fix the issue by checking for -ENXIO and returning on any other
errors as suggested by Pavel Machek <pavel@denx.de>.

Fixes: 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status")
Depends-on: 65fb73676112 ("bus: ti-sysc: suppress err msg for timers used as clockevent/source")
Reported-by: Pavel Machek <pavel@denx.de>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/bus/ti-sysc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -3097,8 +3097,10 @@ static int sysc_probe(struct platform_device *pdev)
 		return error;
 
 	error = sysc_check_active_timer(ddata);
-	if (error == -EBUSY)
+	if (error == -ENXIO)
 		ddata->reserved = true;
+	else if (error)
+		return error;
 
 	error = sysc_get_clocks(ddata);
 	if (error)
-- 
2.32.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bus: ti-sysc: Fix error handling for sysc_check_active_timer()
  2021-08-11  6:10 [PATCH] bus: ti-sysc: Fix error handling for sysc_check_active_timer() Tony Lindgren
@ 2021-08-11  6:22 ` Pavel Machek
  2021-08-15 18:05   ` Jarkko Nikula
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2021-08-11  6:22 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-omap, Dave Gerlach, Faiz Abbas, Greg Kroah-Hartman,
	Grygorii Strashko, Keerthy, Nishanth Menon, Suman Anna,
	linux-kernel, linux-arm-kernel, Pavel Machek, Jarkko Nikula

[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]

On Wed 2021-08-11 09:10:53, Tony Lindgren wrote:
> We have changed the return type for sysc_check_active_timer() from -EBUSY
> to -ENXIO, but the gpt12 system timer fix still checks for -EBUSY. We are
> also not returning on other errors like we did earlier as noted by
> Pavel Machek <pavel@denx.de>.
> 
> Commit 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with
> reserved status") should have been updated for commit 65fb73676112
> ("bus: ti-sysc: suppress err msg for timers used as clockevent/source").
> 
> Let's fix the issue by checking for -ENXIO and returning on any other
> errors as suggested by Pavel Machek <pavel@denx.de>.
> 
> Fixes: 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status")
> Depends-on: 65fb73676112 ("bus: ti-sysc: suppress err msg for timers used as clockevent/source")
> Reported-by: Pavel Machek <pavel@denx.de>
> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Reviewed-by: Pavel Machek (CIP) <pavel@denx.de>

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bus: ti-sysc: Fix error handling for sysc_check_active_timer()
  2021-08-11  6:22 ` Pavel Machek
@ 2021-08-15 18:05   ` Jarkko Nikula
  2021-08-19  6:36     ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Jarkko Nikula @ 2021-08-15 18:05 UTC (permalink / raw)
  To: Pavel Machek, Tony Lindgren
  Cc: linux-omap, Dave Gerlach, Faiz Abbas, Greg Kroah-Hartman,
	Grygorii Strashko, Keerthy, Nishanth Menon, Suman Anna,
	linux-kernel, linux-arm-kernel

Hi

On 8/11/21 9:22 AM, Pavel Machek wrote:
> On Wed 2021-08-11 09:10:53, Tony Lindgren wrote:
>> We have changed the return type for sysc_check_active_timer() from -EBUSY
>> to -ENXIO, but the gpt12 system timer fix still checks for -EBUSY. We are
>> also not returning on other errors like we did earlier as noted by
>> Pavel Machek <pavel@denx.de>.
>>
>> Commit 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with
>> reserved status") should have been updated for commit 65fb73676112
>> ("bus: ti-sysc: suppress err msg for timers used as clockevent/source").
>>
>> Let's fix the issue by checking for -ENXIO and returning on any other
>> errors as suggested by Pavel Machek <pavel@denx.de>.
>>
>> Fixes: 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status")
>> Depends-on: 65fb73676112 ("bus: ti-sysc: suppress err msg for timers used as clockevent/source")
>> Reported-by: Pavel Machek <pavel@denx.de>
>> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
>> Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
>> Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> Reviewed-by: Pavel Machek (CIP) <pavel@denx.de>
> 
I double checked but actually both plain 0aa78d17099b ("Merge tag
'scsi-fixes' of
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi") and with this
patch boot fine on my Beagle C2.

Anyway,

Tested-by: jarkko.nikula@bitmer.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bus: ti-sysc: Fix error handling for sysc_check_active_timer()
  2021-08-15 18:05   ` Jarkko Nikula
@ 2021-08-19  6:36     ` Tony Lindgren
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2021-08-19  6:36 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: Pavel Machek, Nishanth Menon, Grygorii Strashko, Dave Gerlach,
	Keerthy, linux-kernel, Faiz Abbas, Greg Kroah-Hartman,
	linux-omap, linux-arm-kernel

* Jarkko Nikula <jarkko.nikula@bitmer.com> [210815 18:13]:
> I double checked but actually both plain 0aa78d17099b ("Merge tag
> 'scsi-fixes' of
> git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi") and with this
> patch boot fine on my Beagle C2.
> 
> Anyway,
> 
> Tested-by: jarkko.nikula@bitmer.com

OK thanks for testing. I had already pushed out my fixes branch so
I did not want to go back to add the Tested-by. Anyways, a pull
request for this has been sent now.

Regards,

Tony

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-19  6:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11  6:10 [PATCH] bus: ti-sysc: Fix error handling for sysc_check_active_timer() Tony Lindgren
2021-08-11  6:22 ` Pavel Machek
2021-08-15 18:05   ` Jarkko Nikula
2021-08-19  6:36     ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).