Fix to properly shadow the DEV bit in the Drive/Head register so other
disks are properly detected and handled --HG-- extra : convert_revision : ffc3046deb68458ee2ef6fa5263dc471488abc45
This commit is contained in:
@@ -192,6 +192,22 @@ IdeController::getDisk(IdeDisk *diskPtr)
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool
|
||||
IdeController::isDiskSelected(IdeDisk *diskPtr)
|
||||
{
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if ((long)diskPtr == (long)disks[i]) {
|
||||
// is disk is on primary or secondary channel
|
||||
int channel = i/2;
|
||||
// is disk the master or slave
|
||||
int devID = i%2;
|
||||
|
||||
return (dev[channel] == devID);
|
||||
}
|
||||
}
|
||||
panic("Unable to find disk by pointer!!\n");
|
||||
}
|
||||
|
||||
////
|
||||
// Command completion
|
||||
////
|
||||
|
||||
Reference in New Issue
Block a user