Re: [PATCH 5/5] staging: hv: Gracefully handle SCSI resets - RESEND

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

 



On Wed, Sep 01, 2010 at 09:28:53AM -0700, Joe Perches wrote:
> On Tue, 2010-08-31 at 11:22 -0700, Hank Janssen wrote:
> > If we get a SCSI host bus reset we now gracefully handle it, and we 
> > take the device offline. This before sometimes caused hangs.
> > ---
> >  drivers/staging/hv/storvsc.c |   36 +++++++++++++++++++++++++++++++++++-
> []
> > +	/*
> > +	 * Wait for traffic in transit to complete
> > +	 */
> > +	while (atomic_read(&storDevice->NumOutstandingRequests))
> > +		udelay(1000);
> > +
> 
> Is it useful to have a maximum check or timeout?
> Maybe use usleep_range?

Yeah, that's not good, you need to have some way to get out of here in
case something bad happens and that number never goes down.

Why not just use a completion function instead of a busy loop?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux