Skip to content

Commit

Permalink
Disable SMBus mux for Hudson2 cpus
Browse files Browse the repository at this point in the history
  • Loading branch information
Staphylo authored and lguohan committed Mar 19, 2018
1 parent 10c57cf commit a82619e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
37 changes: 37 additions & 0 deletions patch/driver-arista-disable-smbus-mux-for-hudson2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Disable the SMBus mux on the Hudson2 cpu

Support for multiplexed SMBus adapter was added in linux-4.5 (2fee61d2),
Unfortunately it enables mux support on the 7050QX-32S, where it wasn't enabled
previously. It changes bus numbers and i2c-1 (in 3.18) becomes i2c-4 (in 4.9).
It isn't expected by EOS, since bus number is hardcoded in many places.

Fix it by disabling mux support for the CPU used by the 7050QX-32S.

Signed-off-by: Vasiliy Khoruzhick <vasilykh@arista.com>
Signed-off-by: Samuel Angebault <staphylo@arista.com>
---
drivers/i2c/busses/i2c-piix4.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index e34d82e..563a63c 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -731,8 +731,16 @@ static int piix4_add_adapters_sb800(struct pci_dev *dev, unsigned short smba)
struct i2c_piix4_adapdata *adapdata;
int port;
int retval;
+ int adapters = PIIX4_MAX_ADAPTERS;

- for (port = 0; port < PIIX4_MAX_ADAPTERS; port++) {
+ /* Arista BUG204903: don't use muxed adapters on Hudson 2
+ * because we want AUX bus to be i2c-1
+ */
+ if (dev->vendor == PCI_VENDOR_ID_AMD &&
+ dev->device == PCI_DEVICE_ID_AMD_HUDSON2_SMBUS)
+ adapters = 1;
+
+ for (port = 0; port < adapters; port++) {
retval = piix4_add_adapter(dev, smba, true, port,
piix4_main_port_names_sb800[port],
&piix4_main_adapters[port]);
1 change: 1 addition & 0 deletions patch/series
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
driver-arista-net-tg3-dma-mask-4g-sb800.patch
driver-arista-net-tg3-disallow-broadcom-default-mac.patch
driver-arista-net-tg3-access-regs-indirectly.patch
driver-arista-disable-smbus-mux-for-hudson2.patch
driver-support-sff-8436-eeprom.patch
driver-support-sff-8436-eeprom-update.patch
driver-sff-8436-use-nvmem-framework.patch
Expand Down

0 comments on commit a82619e

Please sign in to comment.