]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Edward Goggin <egoggin@vmware.com> |
2 | Date: Thu Apr 9 10:02:22 2009 -0700 | |
3 | Subject: initialize max_target_blocked in scsi_alloc_target | |
4 | Patch-Mainline: Yes | |
5 | References: bnc#524347 | |
6 | ||
7 | This patch initializes the max_target_blocked field of a scsi target | |
8 | structure so that a queuecommand return value of | |
9 | SCSI_MLQUEUE_TARGET_BUSY will actually result in having the | |
10 | scsi_queue_insert blocking the device queue before requeuing the | |
11 | command and running the queue. Otherwise, can and does cause livelock | |
12 | on single CPU configurations if/when open-iSCSI software initiator's | |
13 | command PDU window fills. | |
14 | ||
15 | Signed-off-by: Ed Goggin <egoggin@vmware.com> | |
16 | Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> | |
17 | Acked-by: Hannes Reinecke <hare@suse.de> | |
18 | ||
19 | diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c | |
20 | index 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 |