-
Guennadi Liakhovetski authored
While reviewing tmscsim, I noticed something, I didn't quite like / understand. The driver takes the host_lock (with irqsave) at the entry to the ISR, and releases it at the exit. And inside the ISR there are potentially long busy-waits... Like int ctr = 6000000; /* only try for about a second */ while( --ctr && !((dstate = DC390_read8 (DMA_Status)) & DMA_XFER_DONE) && pSRB->SGToBeXferLen ); The attached patch is attempting to fix those places. Not sure if this is a proper fix though. In my understanding, after looking through the code, the host_lock is used to protect host-specific data and host-registers. The ->queuecommand is already called with it help, so, one just, basically, have to protect other contexts - interrupt, timer,... So, looks mostly right. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
03339dd1