Skip to contentSkip to conversation

libata : ata_dev_set_mode failed

DISCUSSION Matthieu CASTET 1 participant 1 message May 13, 2006 libata

lore
Share & tools
lore
#0 lore raw

Hi,

when using the pata driver for a via vt8235, the ata_dev_set_mode function failed for one my ATAPI drive ( ata4: failed to set xfermode (err_mask=0x4) ). This error doesn't happen if I put the drive on another controller.

Using the old ide stack, there is a similar problem if I change the xfermode with hdparm : there is an interrupt lost.
The interrupt is lost when calling ide_wait_cmd from ide_cmd_ioctl (drivers/ide/ide-taskfile.c).
But there no problem in the ide initialisation, because ide_cmd_ioctl (and ide_wait_cmd) isn't called in this case, but ide_config_drive_speed is directly called.

In drivers/ide/ide-iops.c, ide_config_drive_speed have a comment saying they can't use ide_wait_cmd because it could cause "lost interrupt" [1]. Does the issue described in this comment are solved in libata or it is the problem I am seeing with my drive ?

Matthieu

PS : my drive accept ide_wait_cmd or ata_dev_set_mode after I insert a CD and doesn't wait to much (10-20 seconds).

[1]
/*
* Don't use ide_wait_cmd here - it will
* attempt to set_geometry and recalibrate,
* but for some reason these don't work at
* this point (lost interrupt).
*/