Fix a deadlock in the request completion code when the timeout timed out.
The cause was not unlocking the done spinlock before calling ata_completed,
resulting in ata_completed waiting forever because it needs to acquire the
lock as well.
The solution introduces a new request flag, ATA_R_COMPLETED to signal
sleepers that a request has or has not been completed. In theory, we could
just check the return value of msleep(), but this is quite elegant, and
corecode convinced me ;).
Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
Reviewed-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>