Re: ide: Requeue request after DMA timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 01, 2010 at 12:04:44PM +0900, Tejun Heo wrote:
>
> > diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
> > index ee58c88..62a257f 100644
> > --- a/drivers/ide/ide-dma.c
> > +++ b/drivers/ide/ide-dma.c
> > @@ -492,6 +492,7 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
> >  	if (rq) {
> >  		hwif->rq = NULL;
> >  		rq->errors = 0;
> > +		ide_requeue_request(drive, rq);
> >  	}
> >  	return ret;
> >  }
> 
> Hmmm... ide_dma_timeout_retry() is called from ide_timer_expiry() if
> !hwif->polling.  The former returns ide_stopped if the current request
> processing should be stopped, in which case ide_timer_expiry() calls
> plug_device to 1 which makes it call ide_requeue_and_plug() at the end
> of the function.  Does the above change make the request to be
> requeued twice?

No, we clear hwif->rq in ide_dma_timeout_retry so ide_timer_expiry
will have nothing to requeue.

Besides, we want to requeue here regardless of whether we return
ide_stopped.  For example, we may return ide_started in case of
a pending reset, but as the original request hasn't been completed
it must still be requeued.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux