]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/scsi-initialize-max_targets_blocked
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / scsi-initialize-max_targets_blocked
CommitLineData
2cb7cef9
BS
1From: Edward Goggin <egoggin@vmware.com>
2Date: Thu Apr 9 10:02:22 2009 -0700
3Subject: initialize max_target_blocked in scsi_alloc_target
4Patch-Mainline: Yes
5References: bnc#524347
6
7This patch initializes the max_target_blocked field of a scsi target
8structure so that a queuecommand return value of
9SCSI_MLQUEUE_TARGET_BUSY will actually result in having the
10scsi_queue_insert blocking the device queue before requeuing the
11command and running the queue. Otherwise, can and does cause livelock
12on single CPU configurations if/when open-iSCSI software initiator's
13command PDU window fills.
14
15Signed-off-by: Ed Goggin <egoggin@vmware.com>
16Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17Acked-by: Hannes Reinecke <hare@suse.de>
18
19diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
20index 6f51ca4..e2b50d8 100644
21--- a/drivers/scsi/scsi_scan.c
22+++ b/drivers/scsi/scsi_scan.c
23@@ -425,6 +425,7 @@ static struct scsi_target *scsi_alloc_target(struct device *parent,
24 INIT_LIST_HEAD(&starget->devices);
25 starget->state = STARGET_CREATED;
26 starget->scsi_level = SCSI_2;
27+ starget->max_target_blocked = SCSI_DEFAULT_TARGET_BLOCKED;
28 retry:
29 spin_lock_irqsave(shost->host_lock, flags);
30