--- ata.c.orig 2008-02-15 16:19:25.340069000 +0100 +++ ata.c 2008-02-16 23:30:35.605665946 +0100 @@ -848,9 +848,11 @@ if ( !spinup && sleeping && !poweroff && TIME_AFTER( current_tick, last_sleep + ATA_POWER_OFF_TIMEOUT )) { + /* mutex_lock(&ata_mtx); ide_power_enable(false); mutex_unlock(&ata_mtx); + */ poweroff = true; } #endif @@ -1048,7 +1050,7 @@ unsigned char subcommand; unsigned char parameter; } features[] = { - { 83, 3, 0x05, 0x80 }, /* power management: lowest power without standby */ +// { 83, 3, 0x05, 0x80 }, /* power management: lowest power without standby */ { 83, 9, 0x42, 0x80 }, /* acoustic management: lowest noise */ { 82, 6, 0xaa, 0 }, /* enable read look-ahead */ { 83, 14, 0x03, 0 }, /* force PIO mode */ @@ -1064,7 +1066,8 @@ pio_mode = 3; /* Update the table */ - features[3].parameter = 8 + pio_mode; +// features[3].parameter = 8 + pio_mode; + features[2].parameter = 8 + pio_mode; SET_REG(ATA_SELECT, ata_device); @@ -1086,7 +1089,8 @@ if(ATA_ALT_STATUS & STATUS_ERR) { if(ATA_ERROR & ERROR_ABRT) { - return -20 - i; +// return -20 - i; + return -21 - i; } } }