freebsd-src/sys
Ruslan Ermilov 1a40739a00 Fix PCI ID of the AMD-8111 System Management controller so it matches
SMBus 1.0 and not SMBus 2.0.

AMD-8111 hub (datasheet is publically available) implements both SMBus
2.0 (a separate PCI device) and SMBus 1.0 (a subfunction of the System
Management Controller device with the base I/O address is accessible
through the CSR 0x58).  This driver only supports AMD-756 SMBus 1.0
compatible devices.

With the patched sysutils/xmbmon port (to also fix PCI ID and to enable
smb(4) support), I now get:

pciconf:
none0@pci0:7:2: class=0x0c0500 card=0x746a1022 chip=0x746a1022 rev=0x02 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'AMD-8111 SMBus 2.0 Controller'
    class    = serial bus
    subclass = SMBus
amdpm0@pci0:7:3:        class=0x068000 card=0x746b1022 chip=0x746b1022 rev=0x05 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'AMD-8111 ACPI System Management Controller'
    class    = bridge

dmesg:
amdpm0: <AMD 756/766/768/8111 Power Management Controller> port 0x10e0-0x10ff at device 7.3 on pci0
smbus0: <System Management Bus> on amdpm0

# mbmon -A -d
Summary of Detection:
 * SMB monitor(s)[ioctl:AMD8111]:
  ** Winbond Chip W83627HF/THF/THF-A found at slave address: 0x50.
  ** Analog Dev. Chip ADM1027 found at slave address: 0x5C.
 * ISA monitor(s):
  ** Winbond Chip W83627HF/THF/THF-A found.

I think the confusion comes from the fact that nobody really tried
SMBus with xmbmon :-), since sysutils/xmbmon port doesn't come with
SMBus support enabled, neither in FreeBSD 4, nor in later versions,
so mbmon(1) was just showing the values from the Winbond sensors
accessible through the ISA I/O method (mbmon -I), for me anyway.

On my test machine, the amdpm(4) didn't even attach due to I/O port
allocation failure (who knows what the hell it read from CSR 0x58
of the SMBus 2.0 device :-), which isn't in the CSR space).

I've also checked that lm_sensors.org uses correct PCI ID for SMBus
1.0 of AMD-8111:

i2c-amd756.c:   {PCI_VENDOR_ID_AMD, 0x746B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AMD8111 },

This driver is analogous to our amdpm.c which supports SMBus 1.0
AMD-756 and compatible devices, including SMBus 1.0 on AMD-8111.

i2c-amd8111.c:  { 0x1022, 0x746a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },

This driver is analogous to nForce-2/3/4, i2c-nforce2.c, which
supports SMBus 2.0, and which our amdpm.c does NOT support
(SMBus 2.0 uses a different, ACPI-unified, API to talk to SMBus).
At least I know for sure it doesn't work with my nForce3.  :-)

(The xmbmon port will be fixed to correct the PCI ID too and to
enable the smb(4) support.)
2005-12-16 15:03:16 +00:00
..
alpha Remove linux_mib_destroy() (which I actually added in between 5.0 and 5.1) 2005-12-15 16:30:41 +00:00
amd64 Don peril sensitive sunglasses and jack up the MAX_BPAGES limit to 8192 2005-12-16 05:57:18 +00:00
arm - Better use of the busdma API. 2005-12-09 23:55:41 +00:00
boot Add kernel module loading option for snd_atiixp(4). 2005-12-01 03:10:12 +00:00
bsm
cam Fix a bug that caused some /dev entries to continue to exist after 2005-11-18 02:43:49 +00:00
coda Fix -Wundef from compiling the amd64 LINT. 2005-12-04 10:06:06 +00:00
compat Remove linux_mib_destroy() (which I actually added in between 5.0 and 5.1) 2005-12-15 16:30:41 +00:00
conf Remove all redundant option file names that don't hurt readability. 2005-12-12 10:15:11 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r153200, 2005-12-07 17:32:13 +00:00
crypto
ddb Fix -Wundef. 2005-12-04 02:12:43 +00:00
dev Add jumbo frame support for architectures with strict alignment. 2005-12-16 08:29:43 +00:00
doc
fs Eradicate caddr_t from the VFS API. 2005-12-14 00:49:52 +00:00
gdb
geom Fix build breakage by fixing typo. 2005-12-09 11:38:02 +00:00
gnu Eradicate caddr_t from the VFS API. 2005-12-14 00:49:52 +00:00
i4b Fix -Wundef warnings found when compiling i386 LINT, GENERIC and 2005-12-05 11:58:35 +00:00
i386 Remove linux_mib_destroy() (which I actually added in between 5.0 and 5.1) 2005-12-15 16:30:41 +00:00
ia64 - Cleanup whitespace and extra ()s in vtophys() macros. 2005-12-06 21:09:01 +00:00
isa MFamd64 rev 1.223: Use the TSC to implement DELAY() if not marked broken 2005-12-13 19:08:55 +00:00
isofs/cd9660 Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
kern Replace selwakeuppri with selwakeup, let scheduler figure out 2005-12-16 15:01:16 +00:00
libkern Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
modules Build xfs before xl. 2005-12-12 01:37:57 +00:00
net It is not safe to use m_copypacket() here as the returned mbuf is readonly, 2005-12-15 19:34:39 +00:00
net80211 make packet bursting configurable (default to on if device is capable) 2005-12-14 19:32:53 +00:00
netatalk - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
netatm - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
netgraph Fix memory leak. 2005-12-09 07:09:44 +00:00
netinet Add descriptions for sysctl -d. 2005-12-16 15:01:44 +00:00
netinet6 fixed a kernel crash at the initialization time of PIM-SM register interface 2005-12-09 04:42:19 +00:00
netipsec Fix -Wundef warnings found when compiling i386 LINT, GENERIC and 2005-12-05 11:58:35 +00:00
netipx Include ip_options.h for IPX-IP encapsulation. 2005-11-20 16:17:12 +00:00
netkey Fix -Wundef from compiling the amd64 LINT. 2005-12-04 10:06:06 +00:00
netnatm Use sparse initializers for "struct domain" and "struct protosw", 2005-11-09 13:29:16 +00:00
netncp Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
netsmb Prevent module unloading if there are active connections. 2005-11-22 02:15:46 +00:00
nfs
nfs4client Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
nfsclient Improve upon rev 1.133 where NFS/TCP would not reconnect. 2005-12-12 23:18:05 +00:00
nfsserver Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
opencrypto
pc98 Switch MACHINE to "pc98" on FreeBSD/pc98. 2005-12-08 12:35:12 +00:00
pccard
pci Fix PCI ID of the AMD-8111 System Management controller so it matches 2005-12-16 15:03:16 +00:00
posix4 mqueue.h has been superceded by sys/mqueue.h thanks to David Xu's work. 2005-11-28 02:58:30 +00:00
powerpc - Cleanup whitespace and extra ()s in vtophys() macros. 2005-12-06 21:09:01 +00:00
rpc Fix -Wundef. 2005-12-04 02:12:43 +00:00
security Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
sparc64 Fix a bug introduced in rev. 1.5; for retrieving the device_t of the 2005-12-12 16:07:11 +00:00
sys Eradicate caddr_t from the VFS API. 2005-12-14 00:49:52 +00:00
tools Eradicate caddr_t from the VFS API. 2005-12-14 00:49:52 +00:00
ufs Eradicate caddr_t from the VFS API. 2005-12-14 00:49:52 +00:00
vm Assert that the page that is given to vm_page_free_toq() does not have any 2005-12-13 19:59:09 +00:00
Makefile