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:
Søren Schmidt 2004-10-20 10:11:05 +00:00
parent 60c9762920
commit 208a8dc227
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136722

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");