Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-10 Thread Guenter Roeck
On Tue, Nov 10, 2020 at 04:40:23PM +1100, Brad Campbell wrote: > On 10/11/20 3:55 pm, Guenter Roeck wrote: > > On Tue, Nov 10, 2020 at 01:04:04PM +1100, Brad Campbell wrote: > >> On 9/11/20 3:06 am, Guenter Roeck wrote: > >>> On 11/8/20 2:14 AM, Henrik Rydberg wrote: > On Sun, Nov 08, 2020 at

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-09 Thread Brad Campbell
On 10/11/20 3:55 pm, Guenter Roeck wrote: > On Tue, Nov 10, 2020 at 01:04:04PM +1100, Brad Campbell wrote: >> On 9/11/20 3:06 am, Guenter Roeck wrote: >>> On 11/8/20 2:14 AM, Henrik Rydberg wrote: On Sun, Nov 08, 2020 at 09:35:28AM +0100, Henrik Rydberg wrote: > Hi Brad, > > On

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-09 Thread Guenter Roeck
On Tue, Nov 10, 2020 at 01:04:04PM +1100, Brad Campbell wrote: > On 9/11/20 3:06 am, Guenter Roeck wrote: > > On 11/8/20 2:14 AM, Henrik Rydberg wrote: > >> On Sun, Nov 08, 2020 at 09:35:28AM +0100, Henrik Rydberg wrote: > >>> Hi Brad, > >>> > >>> On 2020-11-08 02:00, Brad Campbell wrote: >

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-09 Thread Brad Campbell
On 9/11/20 3:06 am, Guenter Roeck wrote: > On 11/8/20 2:14 AM, Henrik Rydberg wrote: >> On Sun, Nov 08, 2020 at 09:35:28AM +0100, Henrik Rydberg wrote: >>> Hi Brad, >>> >>> On 2020-11-08 02:00, Brad Campbell wrote: G'day Henrik, I noticed you'd also loosened up the requirement for

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-09 Thread Brad Campbell
On 10/11/20 4:08 am, Henrik Rydberg wrote: > Hi Brad, > >> Out of morbid curiosity I grabbed an older MacOS AppleSMC.kext (10.7) and >> ran it through the disassembler. >> >> Every read/write to the SMC starts the same way with a check to make sure >> the SMC is in a sane state. If it's not, a

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-09 Thread Henrik Rydberg
Hi Brad, Out of morbid curiosity I grabbed an older MacOS AppleSMC.kext (10.7) and ran it through the disassembler. Every read/write to the SMC starts the same way with a check to make sure the SMC is in a sane state. If it's not, a read command is sent to try and kick it back into line :

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-09 Thread Brad Campbell
On 8/11/20 11:04 pm, Henrik Rydberg wrote: > On 2020-11-08 12:57, Brad Campbell wrote: >> On 8/11/20 9:14 pm, Henrik Rydberg wrote: >>> On Sun, Nov 08, 2020 at 09:35:28AM +0100, Henrik Rydberg wrote: Hi Brad, On 2020-11-08 02:00, Brad Campbell wrote: > G'day Henrik, > >

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-09 Thread Brad Campbell
On 9/11/20 7:44 pm, Andreas Kemnade wrote: > On Sun, 8 Nov 2020 11:14:29 +0100 > Henrik Rydberg wrote: > >> On Sun, Nov 08, 2020 at 09:35:28AM +0100, Henrik Rydberg wrote: >>> Hi Brad, >>> >>> On 2020-11-08 02:00, Brad Campbell wrote: G'day Henrik, I noticed you'd also loosened

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-09 Thread Andreas Kemnade
On Sun, 8 Nov 2020 11:14:29 +0100 Henrik Rydberg wrote: > On Sun, Nov 08, 2020 at 09:35:28AM +0100, Henrik Rydberg wrote: > > Hi Brad, > > > > On 2020-11-08 02:00, Brad Campbell wrote: > > > G'day Henrik, > > > > > > I noticed you'd also loosened up the requirement for SMC_STATUS_BUSY in >

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-08 Thread Brad Campbell
On 9/11/20 3:06 am, Guenter Roeck wrote: > On 11/8/20 2:14 AM, Henrik Rydberg wrote: >> On Sun, Nov 08, 2020 at 09:35:28AM +0100, Henrik Rydberg wrote: >>> Hi Brad, >>> >>> On 2020-11-08 02:00, Brad Campbell wrote: G'day Henrik, I noticed you'd also loosened up the requirement for

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-08 Thread Guenter Roeck
On 11/8/20 2:14 AM, Henrik Rydberg wrote: > On Sun, Nov 08, 2020 at 09:35:28AM +0100, Henrik Rydberg wrote: >> Hi Brad, >> >> On 2020-11-08 02:00, Brad Campbell wrote: >>> G'day Henrik, >>> >>> I noticed you'd also loosened up the requirement for SMC_STATUS_BUSY in >>> read_smc(). I assume >>>

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-08 Thread Henrik Rydberg
On 2020-11-08 12:57, Brad Campbell wrote: On 8/11/20 9:14 pm, Henrik Rydberg wrote: On Sun, Nov 08, 2020 at 09:35:28AM +0100, Henrik Rydberg wrote: Hi Brad, On 2020-11-08 02:00, Brad Campbell wrote: G'day Henrik, I noticed you'd also loosened up the requirement for SMC_STATUS_BUSY in

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-08 Thread Brad Campbell
On 8/11/20 9:14 pm, Henrik Rydberg wrote: > On Sun, Nov 08, 2020 at 09:35:28AM +0100, Henrik Rydberg wrote: >> Hi Brad, >> >> On 2020-11-08 02:00, Brad Campbell wrote: >>> G'day Henrik, >>> >>> I noticed you'd also loosened up the requirement for SMC_STATUS_BUSY in >>> read_smc(). I assume >>>

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-08 Thread Henrik Rydberg
On Sun, Nov 08, 2020 at 09:35:28AM +0100, Henrik Rydberg wrote: > Hi Brad, > > On 2020-11-08 02:00, Brad Campbell wrote: > > G'day Henrik, > > > > I noticed you'd also loosened up the requirement for SMC_STATUS_BUSY in > > read_smc(). I assume > > that causes problems on the early Macbook. This

Re: [PATCH v3] applesmc: Re-work SMC comms

2020-11-08 Thread Henrik Rydberg
Hi Brad, On 2020-11-08 02:00, Brad Campbell wrote: G'day Henrik, I noticed you'd also loosened up the requirement for SMC_STATUS_BUSY in read_smc(). I assume that causes problems on the early Macbook. This is revised on the one sent earlier. If you could test this on your Air1,1 it'd be

[PATCH v3] applesmc: Re-work SMC comms

2020-11-07 Thread Brad Campbell
G'day Henrik, I noticed you'd also loosened up the requirement for SMC_STATUS_BUSY in read_smc(). I assume that causes problems on the early Macbook. This is revised on the one sent earlier. If you could test this on your Air1,1 it'd be appreciated. Commit fff2d0f701e6 ("hwmon: (applesmc)