mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-20 16:31:47 +00:00
atahd: fix RECALIBRATE command.
Although being optional in ATA-3 and absent in >= ATA-4, RECALIBRATE is issued by Open Firmware 3.1.1 during device initialization. If it fails, the drive is considered non-bootable.
This commit is contained in:
parent
bd16b7c69e
commit
3bf088f2c8
@ -85,10 +85,14 @@ int AtaHardDisk::perform_command() {
|
||||
switch (this->r_command) {
|
||||
case NOP:
|
||||
break;
|
||||
case RECALIBRATE:
|
||||
this->r_error = 0;
|
||||
this->r_cylinder_lo = 0;
|
||||
case RECALIBRATE: // is optional in ATA-3; disappeared in >= ATA-4
|
||||
// OF 3.1.1 won't boot off the drive that reports error for this command
|
||||
this->r_cylinder_hi = 0;
|
||||
this->r_cylinder_lo = 0;
|
||||
this->r_dev_head &= 0xF0;
|
||||
this->r_sect_num = (this->r_dev_head & ATA_Dev_Head::LBA) ? 0 : 1;
|
||||
this->r_status &= ~BSY;
|
||||
this->update_intrq(1);
|
||||
break;
|
||||
case READ_SECTOR:
|
||||
case READ_SECTOR_NR: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user