Complete the bus tracking implementation with fixes

This commit is contained in:
Cacodemon345
2022-01-10 01:12:23 +06:00
parent 42b3b5623a
commit df3a11b11b
4 changed files with 34 additions and 7 deletions

View File

@@ -74,7 +74,7 @@ SettingsBusTracking::next_free_ide_channel()
element = ((i << 3) >> 6);
mask = 0xffULL << ((uint64_t) ((i << 3) & 0x3f));
if (ide_tracking[element] & mask) {
if (!(ide_tracking[element] & mask)) {
ret = (uint8_t) i;
break;
}
@@ -95,7 +95,7 @@ SettingsBusTracking::next_free_scsi_id()
element = ((i << 3) >> 6);
mask = 0xffULL << ((uint64_t) ((i << 3) & 0x3f));
if (scsi_tracking[element] & mask) {
if (!(scsi_tracking[element] & mask)) {
ret = (uint8_t) i;
break;
}