aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohank@serverengines.com>2010-02-19 21:33:24 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-03-03 07:10:04 -0500
commit944b2fbce26ce39555363fd092386807fa5ea08c (patch)
tree3eda716216ed53af6f2a47ba5e33afce9e7d89a5 /drivers/scsi/be2iscsi
parent4183122dbc7c489f11971c5afa8e42011bca7fa2 (diff)
[SCSI] be2iscsi: Fix for a possible udelay while holding lock
This patch fixes a situation where we could call udelay while holding spin_lock Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/be2iscsi')
-rw-r--r--drivers/scsi/be2iscsi/be_cmds.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c
index 67098578fba4..cda6642c7368 100644
--- a/drivers/scsi/be2iscsi/be_cmds.c
+++ b/drivers/scsi/be2iscsi/be_cmds.c
@@ -32,18 +32,11 @@ void be_mcc_notify(struct beiscsi_hba *phba)
32unsigned int alloc_mcc_tag(struct beiscsi_hba *phba) 32unsigned int alloc_mcc_tag(struct beiscsi_hba *phba)
33{ 33{
34 unsigned int tag = 0; 34 unsigned int tag = 0;
35 unsigned int num = 0;
36 35
37mcc_tag_rdy:
38 if (phba->ctrl.mcc_tag_available) { 36 if (phba->ctrl.mcc_tag_available) {
39 tag = phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index]; 37 tag = phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index];
40 phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index] = 0; 38 phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index] = 0;
41 phba->ctrl.mcc_numtag[tag] = 0; 39 phba->ctrl.mcc_numtag[tag] = 0;
42 } else {
43 udelay(100);
44 num++;
45 if (num < mcc_timeout)
46 goto mcc_tag_rdy;
47 } 40 }
48 if (tag) { 41 if (tag) {
49 phba->ctrl.mcc_tag_available--; 42 phba->ctrl.mcc_tag_available--;