summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2009-02-07 00:34:11 -0600
committerMike Christie <michaelc@cs.wisc.edu>2009-02-07 00:38:26 -0600
commitaf84f6c1760d85bdbec1e9af7e6207493a1b6fe7 (patch)
treeb1339a04cd95d798b757c218321e1f52989d79f3 /kernel
parent222947129ca97998aa69ecafcaefb48cb9328c6a (diff)
downloadopen-iscsi-af84f6c1760d85bdbec1e9af7e6207493a1b6fe7.tar.gz
2.6.29-rc libiscsi: Fix scsi command timeout oops in iscsi_eh_timed_out
Merge upstream fix for command timeout oops (iscsi command does not oops, but if a command from another driver timesout that will oops, because iscsi was missetting the default transportt to its time out handler).
Diffstat (limited to 'kernel')
-rw-r--r--kernel/libiscsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/libiscsi.c b/kernel/libiscsi.c
index 5ac73fb..457ecfe 100644
--- a/kernel/libiscsi.c
+++ b/kernel/libiscsi.c
@@ -1998,6 +1998,8 @@ int iscsi_host_add(struct Scsi_Host *shost, struct device *pdev)
if (!shost->can_queue)
shost->can_queue = ISCSI_DEF_XMIT_CMDS_MAX;
+ if (!shost->transportt->eh_timed_out)
+ shost->transportt->eh_timed_out = iscsi_eh_cmd_timed_out;
return scsi_add_host(shost, pdev);
}
EXPORT_SYMBOL_GPL(iscsi_host_add);
@@ -2020,7 +2022,6 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
shost = scsi_host_alloc(sht, sizeof(struct iscsi_host) + dd_data_size);
if (!shost)
return NULL;
- shost->transportt->eh_timed_out = iscsi_eh_cmd_timed_out;
if (qdepth > ISCSI_MAX_CMD_PER_LUN || qdepth < 1) {
if (qdepth != 0)