diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/device/device_util.c | 5 | ||||
-rw-r--r-- | src/include/device/path.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c index 837dfb593f..b538212a83 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -202,7 +202,7 @@ u32 dev_path_encode(device_t dev) ret |= dev->path.pnp.port << 8 | dev->path.pnp.device; break; case DEVICE_PATH_I2C: - ret |= dev->bus->secondary << 8 | dev->path.pnp.device; + ret |= dev->path.i2c.mode_10bit << 8 | dev->path.i2c.device; break; case DEVICE_PATH_APIC: ret |= dev->path.apic.apic_id; @@ -334,7 +334,8 @@ int path_eq(struct device_path *path1, struct device_path *path2) (path1->pnp.device == path2->pnp.device); break; case DEVICE_PATH_I2C: - equal = (path1->i2c.device == path2->i2c.device); + equal = (path1->i2c.device == path2->i2c.device) && + (path1->i2c.mode_10bit == path2->i2c.mode_10bit); break; case DEVICE_PATH_APIC: equal = (path1->apic.apic_id == path2->apic.apic_id); diff --git a/src/include/device/path.h b/src/include/device/path.h index ba7661d6c4..8421a38473 100644 --- a/src/include/device/path.h +++ b/src/include/device/path.h @@ -53,6 +53,7 @@ struct pnp_path struct i2c_path { unsigned device; + unsigned mode_10bit; }; struct apic_path |