Re: [PATCH] i2c: i801: Save register SMBSLVCMD value only once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 11, 2018 at 10:54 AM, Jean Delvare <jdelvare@xxxxxxx> wrote:
> Hi Jason,
>
> On Wed, 11 Apr 2018 09:09:25 -0400, Jason Andryuk wrote:
>> This shutdown patch on top of the "i2c: i801: Save register SMBSLVCMD
>> value only once" fixes the boot hang bug.
>
> Yeah! \o/

:)

> Thanks for testing, I'll submit a v2 of the patch set later today for
> immediate upstream inclusion.
>
>> I also included the
>> SMBSLVCMD debug print patch to log the values.
>>
>> At power-off, I see:
>> i2c i2c-6: i801_enable_host_notify: SMBSLVCMD value before initialization: 01
>
> My debug patch did not have this message. And it looks wrong to me...
> value before initialization should be 00. And it must be, as that's the
> value to which the register is restored below.

This output is correct. I just didn't output all the i2c-i801
messages.  See below.

>> i2c i2c-6: i801_enable_host_notify: SMBSLVCMD value after initialization: 01
>
> This is from the i801_resume function, which oddly enough is called
> before tearing down the device.

Yes, it is called during shutdown, which I found unexpected.  Also it
is unexpected that i801_remove is not called at shutdown.

>> i801_smbus 0000:00:1f.4: i801_shutdown is called
>> i2c i2c-6: i801_disable_host_notify: SMBSLVCMD value at removal time: 01
>> i2c i2c-6: i801_disable_host_notify: SMBSLVCMD reset to: 00
>
> I'm curious how you managed to capture these... serial console, rsyslog?

I took a video on my phone and transcribed the messages.  My system
runs rsyslog, but that exits before the shutdown initscripts call
halt.  However, at that time we are back in text mode and messages are
printed to the laptop display.  That is why I didn't write down all
the messages from earlier - they were captured by rsyslog.  The full
output of messages is something like:

i801_smbus 0000:00:1f.4: Original SMBSLVCMD value: 00
i801_smbus 0000:00:1f.4: SMBus using PCI interrupt
i2c i2c-6: i801_enable_host_notify: SMBSLVCMD value before initialization: 00
i2c i2c-6: i801_enable_host_notify: SMBSLVCMD value after initialization: 01
<shutdown called>
i2c i2c-6: i801_enable_host_notify: SMBSLVCMD value before initialization: 01
i2c i2c-6: i801_enable_host_notify: SMBSLVCMD value after initialization: 01
i801_smbus 0000:00:1f.4: i801_shutdown is called
i2c i2c-6: i801_disable_host_notify: SMBSLVCMD value at removal time: 01
i2c i2c-6: i801_disable_host_notify: SMBSLVCMD reset to: 00

Thanks again for your help.

Regards,
Jason



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux