tech-kern archive

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

Re: i2c and indirect vs. direct config



On Sat, 2 Jun 2018, Jason Thorpe wrote:



On Jun 1, 2018, at 3:45 PM, Paul Goyette <paul%whooppee.com@localhost> wrote:

There is at least one i2c bus controller that explicitly doesn't
handle "quick" transactions - the imc controller built into the Intel
X99 chip-set.  The docs are pretty clear that it implements an
absolute minimum subset of i2c, just barely enough to talk to the SPD
ROMs on memory DIMMs.

Wait, are you sure about that? The X99 data sheet explicitly says is supports the SMBus “quick” command.

Hmmm, I must have mis-read or mis-understood something.

In any case, the current driver code doesn't seem to support "quick".

From src/sys/arch/x86/pci/imcsmb/imcsmb.c in routine imcsmb_exec() we have:

        if ((cmdlen != 1) || (len > 2) || (len < 1))
                return EINVAL;

(If I remember correctly, the quick command has cmdlen == 0 which would fail the first part of this test.)


For changing this, I'd have to defer to msaitoh@ (the author of the driver).




+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+


Home | Main Index | Thread Index | Old Index