Re: tp_smapi conflict with IDE, hdaps

From: Alan Cox
Date: Tue Dec 13 2005 - 10:02:53 EST


On Maw, 2005-12-13 at 16:35 +0200, Shem Multinymous wrote:
> Evidently, the SMAPI BIOS sends some ATA command to the drive. If the
> kernel is accessing the drive at the same time (e.g., an ongoing "cat
> /dev/scd0"), the machine hangs. The ideal solution would be to figure
> out the relevant ATA commands and add them to libata/ata_piix/ide, but
> it's not clear how to do that. So tp_smapi needs to obtain some lock
> guaranteeing there is no access (or ongoing transaction) to that ATA
> device.

You will need to find out the command. Trying to arbitrate libata access
with unknown bios behaviour isn't going to have a sane resolution. There
are standard commands for this so they ought to work. If not we need to
know why, who makes the drive used etc

> with the recently added HDAPS accelerometer driver. Both drivers read
> their data from the same ports (0x1604-0x161F), which implement a
> query-reponse transaction interface, so both drivers talking to the
> hardware simultaneously will wreak havoc. Some synchronization is
> needed, and a way to address the request_region conflict.
>
> What is standard procedure for resolving such conflicts?

You probably want a low level driver that just arbitrates the interface
and implements the basic query/response transaction interface and
locking and then is called by both HDAPS and your driver (and no doubt
other future drivers talking to that controller). It can thene export
the interface to both drivers.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/