Re: Spurious timeouts in mvmdio

2013-12-17 Thread Nicolas Schichan
On 12/16/2013 07:28 PM, Leigh Brown wrote: I prefer this patch (which I think you originally proposed) because it is just as correct and the code size is a bit smaller in arm mode, and the same size in thumb mode (on my compiler gcc 4.7.2, at least). I coded the loop in that way to make it

Re: Spurious timeouts in mvmdio

2013-12-17 Thread Nicolas Schichan
On 12/16/2013 07:28 PM, Leigh Brown wrote: I prefer this patch (which I think you originally proposed) because it is just as correct and the code size is a bit smaller in arm mode, and the same size in thumb mode (on my compiler gcc 4.7.2, at least). I coded the loop in that way to make it

Re: Spurious timeouts in mvmdio

2013-12-16 Thread Russell King - ARM Linux
On Mon, Dec 16, 2013 at 07:07:28PM +0100, Nicolas Schichan wrote: > I did not find any commit for this in 3.13-rc4. > > Would you prefer I submit my attempt at refactoring the > orion_mdio_wait_ready() code ? It's up to Jason. -- To unsubscribe from this list: send the line "unsubscribe

Re: Spurious timeouts in mvmdio

2013-12-16 Thread Leigh Brown
On 2013-12-16 18:07, Nicolas Schichan wrote: On 12/04/2013 12:42 AM, Russell King - ARM Linux wrote: Alternatively, code it like this instead. drivers/net/ethernet/marvell/mvmdio.c | 32 +++- 1 files changed, 15 insertions(+), 17 deletions(-) diff --git

Re: Spurious timeouts in mvmdio

2013-12-16 Thread Nicolas Schichan
On 12/04/2013 12:42 AM, Russell King - ARM Linux wrote: Alternatively, code it like this instead. drivers/net/ethernet/marvell/mvmdio.c | 32 +++- 1 files changed, 15 insertions(+), 17 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvmdio.c

Re: Spurious timeouts in mvmdio

2013-12-16 Thread Nicolas Schichan
On 12/04/2013 12:42 AM, Russell King - ARM Linux wrote: Alternatively, code it like this instead. drivers/net/ethernet/marvell/mvmdio.c | 32 +++- 1 files changed, 15 insertions(+), 17 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvmdio.c

Re: Spurious timeouts in mvmdio

2013-12-16 Thread Leigh Brown
On 2013-12-16 18:07, Nicolas Schichan wrote: On 12/04/2013 12:42 AM, Russell King - ARM Linux wrote: Alternatively, code it like this instead. drivers/net/ethernet/marvell/mvmdio.c | 32 +++- 1 files changed, 15 insertions(+), 17 deletions(-) diff --git

Re: Spurious timeouts in mvmdio

2013-12-16 Thread Russell King - ARM Linux
On Mon, Dec 16, 2013 at 07:07:28PM +0100, Nicolas Schichan wrote: I did not find any commit for this in 3.13-rc4. Would you prefer I submit my attempt at refactoring the orion_mdio_wait_ready() code ? It's up to Jason. -- To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: Spurious timeouts in mvmdio

2013-12-04 Thread Nicolas Schichan
On 12/04/2013 12:42 AM, Russell King - ARM Linux wrote: This will make it correct when using interrupts but it will make the loop wait one jiffie longer than it should when polling. Alternatively, code it like this instead. drivers/net/ethernet/marvell/mvmdio.c | 32

Re: Spurious timeouts in mvmdio

2013-12-04 Thread Nicolas Schichan
On 12/04/2013 12:42 AM, Russell King - ARM Linux wrote: This will make it correct when using interrupts but it will make the loop wait one jiffie longer than it should when polling. Alternatively, code it like this instead. drivers/net/ethernet/marvell/mvmdio.c | 32

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Sebastian Hesselbarth
On 12/04/2013 12:38 AM, Leigh Brown wrote: On 2013-12-03 23:17, Sebastian Hesselbarth wrote: On 12/04/2013 12:20 AM, Leigh Brown wrote: On 2013-12-03 22:45, Sebastian Hesselbarth wrote: On 12/03/2013 09:57 PM, Leigh Brown wrote: [...] Nicolas' patch should fix the issue, but I prefer the

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Russell King - ARM Linux
On Tue, Dec 03, 2013 at 11:38:23PM +, Leigh Brown wrote: > On 2013-12-03 23:17, Sebastian Hesselbarth wrote: >> If you want to ensure timeout > 2, why not then just use: >> >> -unsigned long timeout = usecs_to_jiffies(MVMDIO_SMI_TIMEOUT); >> +unsigned long timeout = 1 +

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Leigh Brown
On 2013-12-03 23:17, Sebastian Hesselbarth wrote: On 12/04/2013 12:20 AM, Leigh Brown wrote: On 2013-12-03 22:45, Sebastian Hesselbarth wrote: On 12/03/2013 09:57 PM, Leigh Brown wrote: [...] Nicolas' patch should fix the issue, but I prefer the following as it is more correct, as it only

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Sebastian Hesselbarth
On 12/04/2013 12:20 AM, Leigh Brown wrote: On 2013-12-03 22:45, Sebastian Hesselbarth wrote: On 12/03/2013 09:57 PM, Leigh Brown wrote: [...] Nicolas' patch should fix the issue, but I prefer the following as it is more correct, as it only adjusts the timeout when calling

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Leigh Brown
On 2013-12-03 22:45, Sebastian Hesselbarth wrote: On 12/03/2013 09:57 PM, Leigh Brown wrote: [...] Nicolas' patch should fix the issue, but I prefer the following as it is more correct, as it only adjusts the timeout when calling wait_event_timeout(). As I said above,I believe the polling

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Sebastian Hesselbarth
On 12/03/2013 09:57 PM, Leigh Brown wrote: Hi Russell and Nicolas, Apologies for taking so long to respond to this thread. On 2013-12-03 12:40, Russell King - ARM Linux wrote: On Tue, Dec 03, 2013 at 07:23:46AM -0500, Jason Cooper wrote: On Mon, Dec 02, 2013 at 04:15:54PM +0100, Nicolas

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Leigh Brown
Hi Russell and Nicolas, Apologies for taking so long to respond to this thread. On 2013-12-03 12:40, Russell King - ARM Linux wrote: On Tue, Dec 03, 2013 at 07:23:46AM -0500, Jason Cooper wrote: On Mon, Dec 02, 2013 at 04:15:54PM +0100, Nicolas Schichan wrote: [...] 11:31 < shesselba>

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Nicolas Schichan
On 12/03/2013 02:43 PM, Jason Cooper wrote: On Tue, Dec 03, 2013 at 12:40:34PM +, Russell King - ARM Linux wrote: On Tue, Dec 03, 2013 at 07:23:46AM -0500, Jason Cooper wrote: On Mon, Dec 02, 2013 at 04:15:54PM +0100, Nicolas Schichan wrote: During 3.13-rc1 testing, I have found out that

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Jason Cooper
On Tue, Dec 03, 2013 at 12:40:34PM +, Russell King - ARM Linux wrote: > On Tue, Dec 03, 2013 at 07:23:46AM -0500, Jason Cooper wrote: > > On Mon, Dec 02, 2013 at 04:15:54PM +0100, Nicolas Schichan wrote: > > > During 3.13-rc1 testing, I have found out that the mvmdio driver > > > would report

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Russell King - ARM Linux
On Tue, Dec 03, 2013 at 07:23:46AM -0500, Jason Cooper wrote: > On Mon, Dec 02, 2013 at 04:15:54PM +0100, Nicolas Schichan wrote: > > During 3.13-rc1 testing, I have found out that the mvmdio driver > > would report timeouts on the kernel console: > > > > [ 11.011334] orion-mdio orion-mdio:

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Jason Cooper
Nicolas, Sorry for the delay, we spoke about this yesterday on irc, and apparently we all thought the other person was going to respond. oops :( On Mon, Dec 02, 2013 at 04:15:54PM +0100, Nicolas Schichan wrote: > During 3.13-rc1 testing, I have found out that the mvmdio driver > would report

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Jason Cooper
Nicolas, Sorry for the delay, we spoke about this yesterday on irc, and apparently we all thought the other person was going to respond. oops :( On Mon, Dec 02, 2013 at 04:15:54PM +0100, Nicolas Schichan wrote: During 3.13-rc1 testing, I have found out that the mvmdio driver would report

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Russell King - ARM Linux
On Tue, Dec 03, 2013 at 07:23:46AM -0500, Jason Cooper wrote: On Mon, Dec 02, 2013 at 04:15:54PM +0100, Nicolas Schichan wrote: During 3.13-rc1 testing, I have found out that the mvmdio driver would report timeouts on the kernel console: [ 11.011334] orion-mdio orion-mdio: Timeout: SMI

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Jason Cooper
On Tue, Dec 03, 2013 at 12:40:34PM +, Russell King - ARM Linux wrote: On Tue, Dec 03, 2013 at 07:23:46AM -0500, Jason Cooper wrote: On Mon, Dec 02, 2013 at 04:15:54PM +0100, Nicolas Schichan wrote: During 3.13-rc1 testing, I have found out that the mvmdio driver would report timeouts

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Nicolas Schichan
On 12/03/2013 02:43 PM, Jason Cooper wrote: On Tue, Dec 03, 2013 at 12:40:34PM +, Russell King - ARM Linux wrote: On Tue, Dec 03, 2013 at 07:23:46AM -0500, Jason Cooper wrote: On Mon, Dec 02, 2013 at 04:15:54PM +0100, Nicolas Schichan wrote: During 3.13-rc1 testing, I have found out that

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Leigh Brown
Hi Russell and Nicolas, Apologies for taking so long to respond to this thread. On 2013-12-03 12:40, Russell King - ARM Linux wrote: On Tue, Dec 03, 2013 at 07:23:46AM -0500, Jason Cooper wrote: On Mon, Dec 02, 2013 at 04:15:54PM +0100, Nicolas Schichan wrote: [...] 11:31 shesselba

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Sebastian Hesselbarth
On 12/03/2013 09:57 PM, Leigh Brown wrote: Hi Russell and Nicolas, Apologies for taking so long to respond to this thread. On 2013-12-03 12:40, Russell King - ARM Linux wrote: On Tue, Dec 03, 2013 at 07:23:46AM -0500, Jason Cooper wrote: On Mon, Dec 02, 2013 at 04:15:54PM +0100, Nicolas

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Leigh Brown
On 2013-12-03 22:45, Sebastian Hesselbarth wrote: On 12/03/2013 09:57 PM, Leigh Brown wrote: [...] Nicolas' patch should fix the issue, but I prefer the following as it is more correct, as it only adjusts the timeout when calling wait_event_timeout(). As I said above,I believe the polling

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Sebastian Hesselbarth
On 12/04/2013 12:20 AM, Leigh Brown wrote: On 2013-12-03 22:45, Sebastian Hesselbarth wrote: On 12/03/2013 09:57 PM, Leigh Brown wrote: [...] Nicolas' patch should fix the issue, but I prefer the following as it is more correct, as it only adjusts the timeout when calling

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Leigh Brown
On 2013-12-03 23:17, Sebastian Hesselbarth wrote: On 12/04/2013 12:20 AM, Leigh Brown wrote: On 2013-12-03 22:45, Sebastian Hesselbarth wrote: On 12/03/2013 09:57 PM, Leigh Brown wrote: [...] Nicolas' patch should fix the issue, but I prefer the following as it is more correct, as it only

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Russell King - ARM Linux
On Tue, Dec 03, 2013 at 11:38:23PM +, Leigh Brown wrote: On 2013-12-03 23:17, Sebastian Hesselbarth wrote: If you want to ensure timeout 2, why not then just use: -unsigned long timeout = usecs_to_jiffies(MVMDIO_SMI_TIMEOUT); +unsigned long timeout = 1 +

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Sebastian Hesselbarth
On 12/04/2013 12:38 AM, Leigh Brown wrote: On 2013-12-03 23:17, Sebastian Hesselbarth wrote: On 12/04/2013 12:20 AM, Leigh Brown wrote: On 2013-12-03 22:45, Sebastian Hesselbarth wrote: On 12/03/2013 09:57 PM, Leigh Brown wrote: [...] Nicolas' patch should fix the issue, but I prefer the

Spurious timeouts in mvmdio

2013-12-02 Thread Nicolas Schichan
Hi, During 3.13-rc1 testing, I have found out that the mvmdio driver would report timeouts on the kernel console: [ 11.011334] orion-mdio orion-mdio: Timeout: SMI busy for too long The hardware is a MV88F6281 Kirkwood CPU. The mvmdio driver is using the irq line 46 (ge00_err). I am

Spurious timeouts in mvmdio

2013-12-02 Thread Nicolas Schichan
Hi, During 3.13-rc1 testing, I have found out that the mvmdio driver would report timeouts on the kernel console: [ 11.011334] orion-mdio orion-mdio: Timeout: SMI busy for too long The hardware is a MV88F6281 Kirkwood CPU. The mvmdio driver is using the irq line 46 (ge00_err). I am