On Sat, Apr 7, 2018 at 4:32 AM, Jean Delvare <jdelvare@xxxxxxx> wrote: > Hi Jason, > > On Fri, 6 Apr 2018 11:18:02 -0400, Jason Andryuk wrote: >> 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 > > I guess the PCI device is not enabled at that point, so I/O resources > are not mapped. Should the PCI device be disabled when the module is removed? >> --- >> > 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 > > Only difference is bit 6 of register 0x00, INUSE_STS. That's expected > and not specifically related to the Host Notify feature. > >> [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 > > Hmm. I expected differences in the device specific configuration > registers (0x40 and above.) > > Bits 0 and 1 of PCI Command Register get set: I/O space enabled, memory > space enabled. This must be the result of pcim_enable_device(). Dmesg says "i801_smbus 0000:00:1f.4: enabling device (0000 -> 0003)" which is pci_enable_resources writing to the command register. > Bit 11 of PCI Status Register gets cleared: Signaled Target Abort > (STA). No idea what this is all about, my datasheet says it should > always be 0. Should this be bit 3 of the PCI Status Register (Little Endian)? Which datasheet are you using, and where can I find it? >> [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. > > Not really, I'm afraid. I hopped for something more obviously related > to what you observe. > > For clarity, were the tests above done with or without > disable_features=0x20? Does it make any difference if you change? The previous data was from running without disable_features, so Host Notify was active. Below is the diff of data from a run with disable_features=0x20. The isadump changed part of 0xefa2-0xefa4 and 0xefb0-0xefbf to 0s. [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 00 00 00 00 00 00 00 44 00 00 1c 00 07 07 > efb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [root@localhost ~]# diff isadump.during isadump.after 2c2 < efa0: 00 00 00 00 00 00 00 00 00 44 00 00 1c 00 07 07 --- > efa0: 40 00 00 00 00 00 00 00 00 44 00 00 1c 00 07 07 The PCI config space not displayed in the diff output is identical to the Host Notify run. [root@localhost ~]# diff lspci.before lspci.during 2c2 < 00: 86 80 23 9d 00 00 80 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 Regards, Jason