From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH] i2c: mv64xxx: Fix locked bus when offload is selected but not used on a message Date: Fri, 07 Feb 2014 10:09:53 -0800 Message-ID: <7h7g96bxqm.fsf@paris.lan> References: <1391770588-1344-1-git-send-email-gregory.clement@free-electrons.com> <20140207150958.GY8533@titan.lakedaemon.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20140207150958.GY8533-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org> (Jason Cooper's message of "Fri, 7 Feb 2014 10:09:58 -0500") Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jason Cooper Cc: Gregory CLEMENT , Wolfram Sang , linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Lunn , Thomas Petazzoni , Ezequiel Garcia , Sebastian Hesselbarth , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-i2c@vger.kernel.org Jason Cooper writes: > On Fri, Feb 07, 2014 at 11:55:54AM +0100, Gregory CLEMENT wrote: >> Offload can be used only on regular transactions and for 1 to byte >> transfers. In the other cases we switch back to usual work flow. >> >> In this case we need to call mv64xxx_i2c_prepare_for_io() as this >> function is not used when we try to use offloading. >> >> This commit adds this missing call when offloading have failed in the >> MV64XXX_I2C_ACTION_OFFLOAD_SEND_START case. >> >> This fix the timeout seen when the the i2c driver try to access an >> address where the device is absent on the Armada XP bases board. >> >> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org # v3.12+ >> Fixes: 930ab3d403ae (i2c: mv64xxx: Add I2C Transaction Generator support) >> >> Signed-off-by: Gregory CLEMENT >> --- >> drivers/i2c/busses/i2c-mv64xxx.c | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) > > I'd like to get a few tested-by's on this before this is pushed. We've > had quite a bit of fixes this round :( Please test both multi_v7 and > mvebu defconfigs. > > Kevin, I know you're busy with a lot more than us, but if you could > confirm that this fixes the bus hangs you reported, that would be great. I applied this patch on top of next-20140207 and tested this on the armada-xp openblocks ax3, which is where I was seeing the I2C timeouts. I confirm it fixes the timeouts I was seeing. Tested-by: Kevin Hilman Kevin From mboxrd@z Thu Jan 1 00:00:00 1970 From: khilman@linaro.org (Kevin Hilman) Date: Fri, 07 Feb 2014 10:09:53 -0800 Subject: [PATCH] i2c: mv64xxx: Fix locked bus when offload is selected but not used on a message In-Reply-To: <20140207150958.GY8533@titan.lakedaemon.net> (Jason Cooper's message of "Fri, 7 Feb 2014 10:09:58 -0500") References: <1391770588-1344-1-git-send-email-gregory.clement@free-electrons.com> <20140207150958.GY8533@titan.lakedaemon.net> Message-ID: <7h7g96bxqm.fsf@paris.lan> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Jason Cooper writes: > On Fri, Feb 07, 2014 at 11:55:54AM +0100, Gregory CLEMENT wrote: >> Offload can be used only on regular transactions and for 1 to byte >> transfers. In the other cases we switch back to usual work flow. >> >> In this case we need to call mv64xxx_i2c_prepare_for_io() as this >> function is not used when we try to use offloading. >> >> This commit adds this missing call when offloading have failed in the >> MV64XXX_I2C_ACTION_OFFLOAD_SEND_START case. >> >> This fix the timeout seen when the the i2c driver try to access an >> address where the device is absent on the Armada XP bases board. >> >> Cc: stable at vger.kernel.org # v3.12+ >> Fixes: 930ab3d403ae (i2c: mv64xxx: Add I2C Transaction Generator support) >> >> Signed-off-by: Gregory CLEMENT >> --- >> drivers/i2c/busses/i2c-mv64xxx.c | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) > > I'd like to get a few tested-by's on this before this is pushed. We've > had quite a bit of fixes this round :( Please test both multi_v7 and > mvebu defconfigs. > > Kevin, I know you're busy with a lot more than us, but if you could > confirm that this fixes the bus hangs you reported, that would be great. I applied this patch on top of next-20140207 and tested this on the armada-xp openblocks ax3, which is where I was seeing the I2C timeouts. I confirm it fixes the timeouts I was seeing. Tested-by: Kevin Hilman Kevin