Do not retry on requests that has lost thier device during reinit.

Should fix hangs on IBM's etc with the fake slave problem.

MFC:
	asap
This commit is contained in:
sos 2004-10-20 10:11:05 +00:00
parent a9c52a00bc
commit 367f370c3a

View File

@ -238,14 +238,11 @@ ata_completed(void *context, int dummy)
/* if we had a timeout, reinit channel and deal with the falldown */
if (request->flags & ATA_R_TIMEOUT) {
int error = ata_reinit(ch);
/* if our device disappeared return as cleanup was done already */
if (!request->device->param)
return;
/* if reinit succeeded and retries still permit, reinject request */
if (!error && request->retries-- > 0) {
/*
* if reinit succeeds, retries still permit and device didn't
* get removed by the reinit, reinject request
*/
if (ata_reinit(ch) && request->retries-- > 0 && request->device->param){
request->flags &= ~(ATA_R_TIMEOUT | ATA_R_DEBUG);
request->flags |= (ATA_R_IMMEDIATE | ATA_R_REQUEUE);
ATA_DEBUG_RQ(request, "completed reinject");