Re: i2c i801 Host Notify breaks HP G3 850 booting while plugged in

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

 



On Fri, Apr 6, 2018 at 10:15 AM, Jean Delvare <jdelvare@xxxxxxx> wrote:
> On Fri, 6 Apr 2018 16:10:45 +0200, Jean Delvare wrote:
>> One thing you could do is compare all the register values before and
>> after loading and unloading the i2c-i801 driver, with and without
>> disable_features=0x20. For that purpose, you would have to build
>> i2c-i801 as a module, and blacklist this module so it does not get
>> auto-loaded. You can find the base I/O address of the registers with:
>>
>> # lspci -v -s 00:1f.3
>> 00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04)
>>       Subsystem: Dell Device 05a4
>>       Flags: medium devsel, IRQ 18
>>       Memory at f7f35000 (64-bit, non-prefetchable) [size=256]
>>       I/O ports at f000 [size=32]                     <-- HERE
>>       Kernel driver in use: i801_smbus
>>       Kernel modules: i2c_i801
>>
>> Then the register values can be dumped with:
>>
>> # isadump -f 0xf000 32
>>
>> isadump is part of lm-sensors. Adjust the address for your own system.
>
> Oh, and dumping the PCI device configuration space while you're here
> would be a good idea as well, as some of the device registers are there:
>
> # lspci -s 00:1f.3 -xxx
>
> Maybe the difference is there and not in the I/O space registers.
>
>> Then modprobe i2c-i801, rmmod i2c-i801, and dump again. If there is any
>> difference then that would possibly point us to what the firmware does
>> not like on next boot.

I dumped the data before load, during (while loaded) and after unload.
The ioports are all uninitialized 0xff before loading the module and
do not revert at unload.  PCI config space also does not totally
revert.

[root@localhost ~]# diff isadump.before isadump.during
2,3c2,3
< efa0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
< efb0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
---
> efa0: 00 00 08 75 a7 00 00 00 00 44 00 00 1c 00 07 07
> efb0: 00 01 00 00 58 00 00 00 00 00 00 00 00 00 00 00
[root@localhost ~]# diff isadump.during isadump.after
2c2
< efa0: 00 00 08 75 a7 00 00 00 00 44 00 00 1c 00 07 07
---
> efa0: 40 00 08 75 a7 00 00 00 00 44 00 00 1c 00 07 07
[root@localhost ~]# diff lspci.before lspci.during
3c3
< 00: 86 80 23 9d 00 00 88 02 21 00 05 0c 00 00 00 00
---
> 00: 86 80 23 9d 03 00 80 02 21 00 05 0c 00 00 00 00
[root@localhost ~]# diff lspci.during lspci.after
[root@localhost ~]# #No difference

The full session of commands is below.  I haven't analyzed any of
these values since I am unfamiliar with them.

I hope this helps.

Regards,
Jason

---
[root@localhost ~]$ lsmod | grep i2c
i2c_algo_bit           16384  1 i915
i2c_hid                20480  0
[root@localhost ~]# lspci -v -s 00:1f.4
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
    Subsystem: Hewlett-Packard Company Device 8079
    Flags: medium devsel, IRQ 11
    Memory at e124e000 (64-bit, non-prefetchable) [disabled] [size=256]
    I/O ports at efa0 [disabled] [size=32]
    Kernel modules: i2c_i801

[root@localhost ~]# isadump -f 0xefa0 32
WARNING! Running this program can cause system crashes, data loss and worse!
I will probe address range 0xefa0 to 0xefbf.
Continue? [Y/n] y
       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
efa0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
efb0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[root@localhost ~]# lspci -xxx -s 00:1f.4
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
00: 86 80 23 9d 00 00 88 02 21 00 05 0c 00 00 00 00
10: 04 e0 24 e1 00 00 00 00 00 00 00 00 00 00 00 00
20: a1 ef 00 00 00 00 00 00 00 00 00 00 3c 10 79 80
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00
40: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 04 00 00 00 01 00 00 00 00 00 00 00 00 00 00
60: 04 05 05 00 00 00 0a 0a 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 24 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 b3 0f 30 08 00 00 00 00

[root@localhost ~]# modprobe i2c-i801
[root@localhost ~]# dmesg | grep -i i801
[    0.000000] Command line: BOOT_IMAGE=/images/pxeboot/vmlinuz
root=live:CDLABEL=Fedora-WS-Live-27-1-6 rd.live.image quiet
modprobe.blacklist=i2c_i801,i2c-i801
[    0.000000] Kernel command line: BOOT_IMAGE=/images/pxeboot/vmlinuz
root=live:CDLABEL=Fedora-WS-Live-27-1-6 rd.live.image quiet
modprobe.blacklist=i2c_i801,i2c-i801
[  341.706602] i801_smbus 0000:00:1f.4: enabling device (0000 -> 0003)
[  341.706794] i801_smbus 0000:00:1f.4: An interrupt is pending!
[  341.706801] i801_smbus 0000:00:1f.4: SMBus using PCI interrupt
[root@localhost ~]# isadump -f 0xefa0 32
WARNING! Running this program can cause system crashes, data loss and worse!
I will probe address range 0xefa0 to 0xefbf.
Continue? [Y/n] y
       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
efa0: 00 00 08 75 a7 00 00 00 00 44 00 00 1c 00 07 07
efb0: 00 01 00 00 58 00 00 00 00 00 00 00 00 00 00 00
[root@localhost ~]# lspci -xxx -s 00:1f.4
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
00: 86 80 23 9d 03 00 80 02 21 00 05 0c 00 00 00 00
10: 04 e0 24 e1 00 00 00 00 00 00 00 00 00 00 00 00
20: a1 ef 00 00 00 00 00 00 00 00 00 00 3c 10 79 80
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00
40: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 04 00 00 00 01 00 00 00 00 00 00 00 00 00 00
60: 04 05 05 00 00 00 0a 0a 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 24 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 b3 0f 30 08 00 00 00 00

[root@localhost ~]# rmmod i2c-i801
[root@localhost ~]# lsmod | grep i2c
i2c_algo_bit           16384  1 i915
i2c_hid                20480  0
[root@localhost ~]# isadump -f 0xefa0 32
WARNING! Running this program can cause system crashes, data loss and worse!
I will probe address range 0xefa0 to 0xefbf.
Continue? [Y/n] y
       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
efa0: 40 00 08 75 a7 00 00 00 00 44 00 00 1c 00 07 07
efb0: 00 01 00 00 58 00 00 00 00 00 00 00 00 00 00 00
[root@localhost ~]# lspci -xxx -s 00:1f.4
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
00: 86 80 23 9d 03 00 80 02 21 00 05 0c 00 00 00 00
10: 04 e0 24 e1 00 00 00 00 00 00 00 00 00 00 00 00
20: a1 ef 00 00 00 00 00 00 00 00 00 00 3c 10 79 80
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00
40: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 04 00 00 00 01 00 00 00 00 00 00 00 00 00 00
60: 04 05 05 00 00 00 0a 0a 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 24 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 b3 0f 30 08 00 00 00 00

[root@localhost ~]# diff isadump.before isadump.during
2,3c2,3
< efa0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
< efb0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
---
> efa0: 00 00 08 75 a7 00 00 00 00 44 00 00 1c 00 07 07
> efb0: 00 01 00 00 58 00 00 00 00 00 00 00 00 00 00 00
[root@localhost ~]# diff isadump.during isadump.after
2c2
< efa0: 00 00 08 75 a7 00 00 00 00 44 00 00 1c 00 07 07
---
> efa0: 40 00 08 75 a7 00 00 00 00 44 00 00 1c 00 07 07
[root@localhost ~]# diff lspci.before lspci.during
3c3
< 00: 86 80 23 9d 00 00 88 02 21 00 05 0c 00 00 00 00
---
> 00: 86 80 23 9d 03 00 80 02 21 00 05 0c 00 00 00 00
[root@localhost ~]# diff lspci.during lspci.after
[root@localhost ~]# #No difference



[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