--- ata.c.orig 2008-02-15 16:19:25.340069000 +0100 +++ ata.c 2008-02-15 17:00:34.872327138 +0100 @@ -766,7 +766,7 @@ static int ata_perform_sleep(void) { int ret = 0; - +/* mutex_lock(&ata_mtx); SET_REG(ATA_SELECT, ata_device); @@ -787,6 +787,7 @@ sleeping = true; mutex_unlock(&ata_mtx); +*/ return ret; } @@ -1048,7 +1049,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 +1065,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 +1088,8 @@ if(ATA_ALT_STATUS & STATUS_ERR) { if(ATA_ERROR & ERROR_ABRT) { - return -20 - i; +// return -20 - i; + return -21 - i; } } }