Re: [PATCH 1/1] megaraid_{mm,mbox}: fix a bug in reset handler

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

 



Andrew Morton <akpm@xxxxxxxx> wrote:
>
>  > @@ -2918,12 +2933,12 @@
>  >  	wmb();
>  >  	WRINDOOR(raid_dev, raid_dev->mbox_dma | 0x1);
>  >  
>  > -	for (i = 0; i < 0xFFFFF; i++) {
>  > +	for (i = 0; i < 0xFFFFFF; i++) {
>  >  		if (mbox->numstatus != 0xFF) break;
>  >  		rmb();
>  >  	}
> 
>  Oh my.  That's an awfully long interrupts-off spin.

And if that mbox is in main memory, the duration of this spin will vary by
a factor of many tens across all the different machines on which this
driver must operate.

Careful use of ndelay() or udelay() would fix that.
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux