Skip to content

Commit

Permalink
[SCSI] megaraid: replace yield() with cond_resched()
Browse files Browse the repository at this point in the history
For this driver cond_resched() seems to be a better alternative

Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Amol Lad authored and James Bottomley committed May 8, 2007
1 parent 84a3c97 commit e1fa0ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/megaraid.c
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,8 @@ __mega_busywait_mbox (adapter_t *adapter)
for (counter = 0; counter < 10000; counter++) {
if (!mbox->m_in.busy)
return 0;
udelay(100); yield();
udelay(100);
cond_resched();
}
return -1; /* give up after 1 second */
}
Expand Down

0 comments on commit e1fa0ce

Please sign in to comment.