skip check for "adapNr == busnr" to support symbolic links to bus numbers
## it's possible to create a symlink i2c-42 to the bus our i2c components are connected to
echo 'SUBSYSTEM=="i2c-dev",DRIVERS=="i801_smbus",ATTR{name}=="*801*",SYMLINK+="i2c-42"' > /etc/udev/rules.d/i2c.rules
echo 'SUBSYSTEM=="i2c-dev",DRIVERS=="isch_smbus",ATTR{name}=="*SCH*",SYMLINK+="i2c-42"' >> /etc/udev/rules.d/i2c.rules
#echo 'SUBSYSTEM=="i2c-dev",DRIVERS=="piix4_smbus",ATTR{name}=="*PIIX4 adapter port 3 at 0b00",SYMLINK+="i2c-42"' >> /etc/udev/rules.d/i2c.rules
echo 'SUBSYSTEM=="i2c-dev",DRIVERS=="piix4_smbus",ATTR{name}=="*PIIX4 adapter port 0 at 0b00",SYMLINK+="i2c-42"' >> /etc/udev/rules.d/i2c.rules
echo 'SUBSYSTEM=="i2c-dev",DRIVERS=="piix4_smbus",ATTR{name}=="*PIIX4 adapter at 0b00",SYMLINK+="i2c-42"' >> /etc/udev/rules.d/i2c.rules
echo 'SUBSYSTEM=="i2c-dev",DRIVERS=="piix4_smbus",ATTR{name}=="*PIIX4*0b20",SYMLINK+="i2c-43"' >> /etc/udev/rules.d/i2c.rules
### MDIS Patch for i2c-42
// if ((cl->addr == shifted_addr) && (ent->adapNr == busnr))
if (cl->addr == shifted_addr)
this way the i2c drivers can be loaded in a different order and i2cdetect -y 42 is always correct
MDIS works with the bus 42 after this change.
smb2_eeprod2 smb_42
Edited by Jose Javier Rodriguez Barbarin