Re: Errant readings on LM81 with T2080 SoC

2021-03-17 Thread Wolfram Sang
> Probably depends on the device implementation. I've got multiple other > I2C/SMBUS devices and the LM81 seems to be the one that objects. For the recored, there was just a similar case with a DA9063, but that one luckily had a bit to switch from SMBus to I2C mode, i.e. no timeout handling:

Re: Errant readings on LM81 with T2080 SoC

2021-03-17 Thread Wolfram Sang
> The polling code is from pre-git times. Like 2005 and earlier. > I'd say it is about time to get rid of it. Any out-of-tree users > had more than 15 years to upstream their code, after all. Parts of the polling mode might be interesting for the atomic_xfer mode maybe? Which is not implemented

Re: Errant readings on LM81 with T2080 SoC

2021-03-17 Thread Guenter Roeck
On 3/17/21 8:46 PM, Chris Packham wrote: > > On 12/03/21 10:34 am, Guenter Roeck wrote: >> On 3/11/21 1:17 PM, Chris Packham wrote: >>> On 11/03/21 9:18 pm, Wolfram Sang wrote: > Bummer. What is really weird is that you see clock stretching under > CPU load. Normally clock stretching is

Re: Errant readings on LM81 with T2080 SoC

2021-03-17 Thread Chris Packham
On 12/03/21 10:34 am, Guenter Roeck wrote: > On 3/11/21 1:17 PM, Chris Packham wrote: >> On 11/03/21 9:18 pm, Wolfram Sang wrote: Bummer. What is really weird is that you see clock stretching under CPU load. Normally clock stretching is triggered by the device, not by the host.

RE: Errant readings on LM81 with T2080 SoC

2021-03-15 Thread David Laight
From: Chris Packham > Sent: 14 March 2021 21:26 > > On 12/03/21 10:25 pm, David Laight wrote: > > From: Linuxppc-dev Guenter Roeck > >> Sent: 11 March 2021 21:35 > >> > >> On 3/11/21 1:17 PM, Chris Packham wrote: > >>> On 11/03/21 9:18 pm, Wolfram Sang wrote: > > Bummer. What is really weird

Re: Errant readings on LM81 with T2080 SoC

2021-03-14 Thread Chris Packham
On 12/03/21 10:25 pm, David Laight wrote: > From: Linuxppc-dev Guenter Roeck >> Sent: 11 March 2021 21:35 >> >> On 3/11/21 1:17 PM, Chris Packham wrote: >>> On 11/03/21 9:18 pm, Wolfram Sang wrote: > Bummer. What is really weird is that you see clock stretching under > CPU load. Normally

RE: Errant readings on LM81 with T2080 SoC

2021-03-12 Thread David Laight
From: Linuxppc-dev Guenter Roeck > Sent: 11 March 2021 21:35 > > On 3/11/21 1:17 PM, Chris Packham wrote: > > > > On 11/03/21 9:18 pm, Wolfram Sang wrote: > >>> Bummer. What is really weird is that you see clock stretching under > >>> CPU load. Normally clock stretching is triggered by the

Re: Errant readings on LM81 with T2080 SoC

2021-03-11 Thread Chris Packham
On 12/03/21 1:07 pm, Guenter Roeck wrote: > On 3/11/21 3:47 PM, Chris Packham wrote: >> On 12/03/21 10:34 am, Guenter Roeck wrote: >>> On 3/11/21 1:17 PM, Chris Packham wrote: On 11/03/21 9:18 pm, Wolfram Sang wrote: >> Bummer. What is really weird is that you see clock stretching under

Re: Errant readings on LM81 with T2080 SoC

2021-03-11 Thread Guenter Roeck
On 3/11/21 3:47 PM, Chris Packham wrote: > > On 12/03/21 10:34 am, Guenter Roeck wrote: >> On 3/11/21 1:17 PM, Chris Packham wrote: >>> On 11/03/21 9:18 pm, Wolfram Sang wrote: > Bummer. What is really weird is that you see clock stretching under > CPU load. Normally clock stretching is

Re: Errant readings on LM81 with T2080 SoC

2021-03-11 Thread Chris Packham
On 12/03/21 10:34 am, Guenter Roeck wrote: > On 3/11/21 1:17 PM, Chris Packham wrote: >> On 11/03/21 9:18 pm, Wolfram Sang wrote: Bummer. What is really weird is that you see clock stretching under CPU load. Normally clock stretching is triggered by the device, not by the host.

Re: Errant readings on LM81 with T2080 SoC

2021-03-11 Thread Guenter Roeck
On 3/11/21 1:17 PM, Chris Packham wrote: > > On 11/03/21 9:18 pm, Wolfram Sang wrote: >>> Bummer. What is really weird is that you see clock stretching under >>> CPU load. Normally clock stretching is triggered by the device, not >>> by the host. >> One example: Some hosts need an interrupt per

Re: Errant readings on LM81 with T2080 SoC

2021-03-11 Thread Chris Packham
On 11/03/21 9:18 pm, Wolfram Sang wrote: >> Bummer. What is really weird is that you see clock stretching under >> CPU load. Normally clock stretching is triggered by the device, not >> by the host. > One example: Some hosts need an interrupt per byte to know if they > should send ACK or NACK.

Re: Errant readings on LM81 with T2080 SoC

2021-03-11 Thread Guenter Roeck
On 3/11/21 12:18 AM, Wolfram Sang wrote: > >> Bummer. What is really weird is that you see clock stretching under >> CPU load. Normally clock stretching is triggered by the device, not >> by the host. > > One example: Some hosts need an interrupt per byte to know if they > should send ACK or

Re: Errant readings on LM81 with T2080 SoC

2021-03-11 Thread Wolfram Sang
> Bummer. What is really weird is that you see clock stretching under > CPU load. Normally clock stretching is triggered by the device, not > by the host. One example: Some hosts need an interrupt per byte to know if they should send ACK or NACK. If that interrupt is delayed, they stretch the

Re: Errant readings on LM81 with T2080 SoC

2021-03-10 Thread Guenter Roeck
On 3/10/21 1:48 PM, Chris Packham wrote: > > On 10/03/21 6:06 pm, Guenter Roeck wrote: >> On 3/9/21 6:19 PM, Chris Packham wrote: >>> On 9/03/21 9:27 am, Chris Packham wrote: On 8/03/21 5:59 pm, Guenter Roeck wrote: > Other than that, the only other real idea I have would be to monitor

Re: Errant readings on LM81 with T2080 SoC

2021-03-10 Thread Chris Packham
On 10/03/21 6:06 pm, Guenter Roeck wrote: > On 3/9/21 6:19 PM, Chris Packham wrote: >> On 9/03/21 9:27 am, Chris Packham wrote: >>> On 8/03/21 5:59 pm, Guenter Roeck wrote: Other than that, the only other real idea I have would be to monitor the i2c bus. >>> I am in the fortunate

Re: Errant readings on LM81 with T2080 SoC

2021-03-09 Thread Guenter Roeck
On 3/9/21 6:19 PM, Chris Packham wrote: > On 9/03/21 9:27 am, Chris Packham wrote: >> On 8/03/21 5:59 pm, Guenter Roeck wrote: >>> Other than that, the only other real idea I have would be to monitor >>> the i2c bus. >> I am in the fortunate position of being able to go into the office and >>

Re: Errant readings on LM81 with T2080 SoC

2021-03-09 Thread Guenter Roeck
On 3/9/21 3:35 PM, Chris Packham wrote: > > On 8/03/21 1:31 pm, Guenter Roeck wrote: >> On 3/7/21 2:52 PM, Chris Packham wrote: >>> Fundamentally I think this is a problem with the fact that the LM81 is >>> an SMBus device but the T2080 (and other Freescale SoCs) uses i2c and we >>> emulate

Re: Errant readings on LM81 with T2080 SoC

2021-03-09 Thread Chris Packham
On 9/03/21 9:27 am, Chris Packham wrote: > On 8/03/21 5:59 pm, Guenter Roeck wrote: >> Other than that, the only other real idea I have would be to monitor >> the i2c bus. > I am in the fortunate position of being able to go into the office and > even happen to have the expensive scope at the

Re: Errant readings on LM81 with T2080 SoC

2021-03-09 Thread Chris Packham
On 8/03/21 1:31 pm, Guenter Roeck wrote: > On 3/7/21 2:52 PM, Chris Packham wrote: >> Fundamentally I think this is a problem with the fact that the LM81 is >> an SMBus device but the T2080 (and other Freescale SoCs) uses i2c and we >> emulate SMBus. I suspect the errant readings are when we

Re: Errant readings on LM81 with T2080 SoC

2021-03-08 Thread Guenter Roeck
On 3/8/21 8:36 PM, Chris Packham wrote: > > On 9/03/21 11:10 am, Chris Packham wrote: >> >> On 8/03/21 5:59 pm, Guenter Roeck wrote: >>> On 3/7/21 8:37 PM, Chris Packham wrote: >>> [ ... ] > That's from -ENXIO which is used in only one place in i2c-mpc.c. I'll > enable some debug and see

Re: Errant readings on LM81 with T2080 SoC

2021-03-08 Thread Chris Packham
On 9/03/21 11:10 am, Chris Packham wrote: > > On 8/03/21 5:59 pm, Guenter Roeck wrote: >> On 3/7/21 8:37 PM, Chris Packham wrote: >> [ ... ] That's from -ENXIO which is used in only one place in i2c-mpc.c. I'll enable some debug and see what we get. >>> For the errant readings there was

Re: Errant readings on LM81 with T2080 SoC

2021-03-08 Thread Guenter Roeck
On Mon, Mar 08, 2021 at 08:27:30PM +, Chris Packham wrote: [ ... ] > > Other than that, the only other real idea I have would be to monitor > > the i2c bus. > I am in the fortunate position of being able to go into the office and > even happen to have the expensive scope at the moment. Now I

Re: Errant readings on LM81 with T2080 SoC

2021-03-08 Thread Chris Packham
On 8/03/21 5:59 pm, Guenter Roeck wrote: > On 3/7/21 8:37 PM, Chris Packham wrote: > [ ... ] >>> That's from -ENXIO which is used in only one place in i2c-mpc.c. I'll >>> enable some debug and see what we get. >> For the errant readings there was nothing abnormal reported by the driver. >> >> For

Re: Errant readings on LM81 with T2080 SoC

2021-03-08 Thread Chris Packham
On 8/03/21 5:59 pm, Guenter Roeck wrote: > On 3/7/21 8:37 PM, Chris Packham wrote: > [ ... ] >>> That's from -ENXIO which is used in only one place in i2c-mpc.c. I'll >>> enable some debug and see what we get. >> For the errant readings there was nothing abnormal reported by the driver. >> >> For

Re: Errant readings on LM81 with T2080 SoC

2021-03-07 Thread Guenter Roeck
On 3/7/21 8:37 PM, Chris Packham wrote: [ ... ] >> That's from -ENXIO which is used in only one place in i2c-mpc.c. I'll >> enable some debug and see what we get. > > For the errant readings there was nothing abnormal reported by the driver. > > For the "No such device or address" I saw

Re: Errant readings on LM81 with T2080 SoC

2021-03-07 Thread Chris Packham
On 8/03/21 3:27 pm, Chris Packham wrote: > > On 8/03/21 1:31 pm, Guenter Roeck wrote: >> On 3/7/21 2:52 PM, Chris Packham wrote: >>> Hi, >>> >>> I've got a system using a PowerPC T2080 SoC and among other things has >>> an LM81 hwmon chip. >>> >>> Under a high CPU load we see errant readings from

Re: Errant readings on LM81 with T2080 SoC

2021-03-07 Thread Chris Packham
On 8/03/21 1:31 pm, Guenter Roeck wrote: > On 3/7/21 2:52 PM, Chris Packham wrote: >> Hi, >> >> I've got a system using a PowerPC T2080 SoC and among other things has >> an LM81 hwmon chip. >> >> Under a high CPU load we see errant readings from the LM81 as well as >> actual failures. It's the

Re: Errant readings on LM81 with T2080 SoC

2021-03-07 Thread Guenter Roeck
On 3/7/21 2:52 PM, Chris Packham wrote: > Hi, > > I've got a system using a PowerPC T2080 SoC and among other things has > an LM81 hwmon chip. > > Under a high CPU load we see errant readings from the LM81 as well as > actual failures. It's the errant readings that cause the most concern >

Errant readings on LM81 with T2080 SoC

2021-03-07 Thread Chris Packham
Hi, I've got a system using a PowerPC T2080 SoC and among other things has an LM81 hwmon chip. Under a high CPU load we see errant readings from the LM81 as well as actual failures. It's the errant readings that cause the most concern since we can easily ignore the read errors in our