All of lore.kernel.org
 help / color / mirror / Atom feed
* I2C bus locked: marvell mv64xxx i2c controller driver
@ 2019-02-05 10:18 Roman Rozman
  2019-02-05 19:58   ` Uwe Kleine-König
  0 siblings, 1 reply; 3+ messages in thread
From: Roman Rozman @ 2019-02-05 10:18 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

Having an issue that i know was found many years ago, and there were
patches along the way for it, but i'm still having an issue.

I have a SFP connector connected to the switch, the EEprom is fine & readable
,the connector is working.
But after i reboot the device from user space,on startup an I2C bus
locked issue is happening.
And the EEprom of the i2c device is no longer readable.

see screen capture during the reboot:

[ 5.663823] i2c /dev entries driver
[ 5.852006] usb 1-1: new high-speed USB device number 2 using orion-ehci
[ 6.058964] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 6.065221] scsi host0: usb-storage 1-1:1.0
[ 7.112857] scsi 0:0:0:0: Direct-Access Generic Ultra HS-COMBO 1.98
PQ: 0 ANSI: 0
[ 7.122702] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 7.752006] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0
[ 9.832006] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0
[ 11.912005] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0
[ 11.918603] lm75: probe of 1-0048 failed with error -110
[ 11.925496] orion_wdt: Initial timeout 171 sec

[ 14.472004] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0
[ 14.478563] sfp sfp: failed to read EEPROM: -110


I read regarding the known "possible solution" that the master should
send nine clock pulses((SDA) is stuck LOW). And the device that held
the bus LOW should release it sometime within those nine clocks.

My question is there any GENERIC way to do that for the mv64xxx driver?
Or maybe there is some other solution for this.

Thanks in advance.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: I2C bus locked: marvell mv64xxx i2c controller driver
  2019-02-05 10:18 I2C bus locked: marvell mv64xxx i2c controller driver Roman Rozman
@ 2019-02-05 19:58   ` Uwe Kleine-König
  0 siblings, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2019-02-05 19:58 UTC (permalink / raw)
  To: Roman Rozman; +Cc: linux-i2c, linux-arm-kernel

Cc += linux-i2c

Hello,

On Tue, Feb 05, 2019 at 12:18:05PM +0200, Roman Rozman wrote:
> Having an issue that i know was found many years ago, and there were
> patches along the way for it, but i'm still having an issue.
> 
> I have a SFP connector connected to the switch, the EEprom is fine & readable
> ,the connector is working.
> But after i reboot the device from user space,on startup an I2C bus
> locked issue is happening.
> And the EEprom of the i2c device is no longer readable.
> 
> see screen capture during the reboot:
> 
> [ 5.663823] i2c /dev entries driver
> [ 5.852006] usb 1-1: new high-speed USB device number 2 using orion-ehci
> [ 6.058964] usb-storage 1-1:1.0: USB Mass Storage device detected
> [ 6.065221] scsi host0: usb-storage 1-1:1.0
> [ 7.112857] scsi 0:0:0:0: Direct-Access Generic Ultra HS-COMBO 1.98 PQ: 0 ANSI: 0
> [ 7.122702] sd 0:0:0:0: [sda] Attached SCSI removable disk
> [ 7.752006] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0
> [ 9.832006] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0
> [ 11.912005] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0
> [ 11.918603] lm75: probe of 1-0048 failed with error -110
> [ 11.925496] orion_wdt: Initial timeout 171 sec
> 
> [ 14.472004] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0
> [ 14.478563] sfp sfp: failed to read EEPROM: -110
> 
> I read regarding the known "possible solution" that the master should
> send nine clock pulses((SDA) is stuck LOW). And the device that held
> the bus LOW should release it sometime within those nine clocks.
> 
> My question is there any GENERIC way to do that for the mv64xxx driver?
> Or maybe there is some other solution for this.

The relevant keyword here is "recovery". The i2c core has some helper
functions that make it easy to reset the bus if your pins can be driven
using a gpio functionality. See i2c_generic_scl_recovery() in
drivers/i2c/i2c-core-base.c.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* Re: I2C bus locked: marvell mv64xxx i2c controller driver
@ 2019-02-05 19:58   ` Uwe Kleine-König
  0 siblings, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2019-02-05 19:58 UTC (permalink / raw)
  To: Roman Rozman; +Cc: linux-i2c, linux-arm-kernel

Cc += linux-i2c

Hello,

On Tue, Feb 05, 2019 at 12:18:05PM +0200, Roman Rozman wrote:
> Having an issue that i know was found many years ago, and there were
> patches along the way for it, but i'm still having an issue.
> 
> I have a SFP connector connected to the switch, the EEprom is fine & readable
> ,the connector is working.
> But after i reboot the device from user space,on startup an I2C bus
> locked issue is happening.
> And the EEprom of the i2c device is no longer readable.
> 
> see screen capture during the reboot:
> 
> [ 5.663823] i2c /dev entries driver
> [ 5.852006] usb 1-1: new high-speed USB device number 2 using orion-ehci
> [ 6.058964] usb-storage 1-1:1.0: USB Mass Storage device detected
> [ 6.065221] scsi host0: usb-storage 1-1:1.0
> [ 7.112857] scsi 0:0:0:0: Direct-Access Generic Ultra HS-COMBO 1.98 PQ: 0 ANSI: 0
> [ 7.122702] sd 0:0:0:0: [sda] Attached SCSI removable disk
> [ 7.752006] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0
> [ 9.832006] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0
> [ 11.912005] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0
> [ 11.918603] lm75: probe of 1-0048 failed with error -110
> [ 11.925496] orion_wdt: Initial timeout 171 sec
> 
> [ 14.472004] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0
> [ 14.478563] sfp sfp: failed to read EEPROM: -110
> 
> I read regarding the known "possible solution" that the master should
> send nine clock pulses((SDA) is stuck LOW). And the device that held
> the bus LOW should release it sometime within those nine clocks.
> 
> My question is there any GENERIC way to do that for the mv64xxx driver?
> Or maybe there is some other solution for this.

The relevant keyword here is "recovery". The i2c core has some helper
functions that make it easy to reset the bus if your pins can be driven
using a gpio functionality. See i2c_generic_scl_recovery() in
drivers/i2c/i2c-core-base.c.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-02-05 19:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-05 10:18 I2C bus locked: marvell mv64xxx i2c controller driver Roman Rozman
2019-02-05 19:58 ` Uwe Kleine-König
2019-02-05 19:58   ` Uwe Kleine-König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.