lkml.org 
[lkml]   [2006]   [Apr]   [13]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 12 Apr 2006 22:05:34 -0700
FromAndrew Morton <>
SubjectRe: [PATCH 1/1] megaraid_{mm,mbox}: fix a bug in reset handler
Andrew Morton <akpm@osdl.org> 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-13 05:08    [from the cache]
©2003-2008