aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2007-12-13 13:43:38 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 19:28:46 -0500
commit4cd49ea1330c946db00a28819b766062716aa857 (patch)
treef053941849677858a2280fe676edf199d811648d /drivers/scsi
parent7a53dc52a5f218bf306b875bf0610e851d5a8268 (diff)
[SCSI] libiscsi, iscsi class: set tmf to a safe default and export in sysfs
Older tools will not be setting the tmf time outs since they did not exists, so set them to a safe default. And export abort and lu reset timeout values in sysfs. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libiscsi.c2
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index f15df8d75fd8..6573223cb346 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1732,6 +1732,8 @@ iscsi_session_setup(struct iscsi_transport *iscsit,
1732 session->host = shost; 1732 session->host = shost;
1733 session->state = ISCSI_STATE_FREE; 1733 session->state = ISCSI_STATE_FREE;
1734 session->fast_abort = 1; 1734 session->fast_abort = 1;
1735 session->lu_reset_timeout = 15;
1736 session->abort_timeout = 10;
1735 session->mgmtpool_max = ISCSI_MGMT_CMDS_MAX; 1737 session->mgmtpool_max = ISCSI_MGMT_CMDS_MAX;
1736 session->cmds_max = cmds_max; 1738 session->cmds_max = cmds_max;
1737 session->queued_cmdsn = session->cmdsn = initial_cmdsn; 1739 session->queued_cmdsn = session->cmdsn = initial_cmdsn;
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 36aa50e45ec7..358559991f4f 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -30,7 +30,7 @@
30#include <scsi/scsi_transport_iscsi.h> 30#include <scsi/scsi_transport_iscsi.h>
31#include <scsi/iscsi_if.h> 31#include <scsi/iscsi_if.h>
32 32
33#define ISCSI_SESSION_ATTRS 16 33#define ISCSI_SESSION_ATTRS 18
34#define ISCSI_CONN_ATTRS 11 34#define ISCSI_CONN_ATTRS 11
35#define ISCSI_HOST_ATTRS 4 35#define ISCSI_HOST_ATTRS 4
36#define ISCSI_TRANSPORT_VERSION "2.0-724" 36#define ISCSI_TRANSPORT_VERSION "2.0-724"
@@ -1242,7 +1242,9 @@ iscsi_session_attr(username, ISCSI_PARAM_USERNAME, 1);
1242iscsi_session_attr(username_in, ISCSI_PARAM_USERNAME_IN, 1); 1242iscsi_session_attr(username_in, ISCSI_PARAM_USERNAME_IN, 1);
1243iscsi_session_attr(password, ISCSI_PARAM_PASSWORD, 1); 1243iscsi_session_attr(password, ISCSI_PARAM_PASSWORD, 1);
1244iscsi_session_attr(password_in, ISCSI_PARAM_PASSWORD_IN, 1); 1244iscsi_session_attr(password_in, ISCSI_PARAM_PASSWORD_IN, 1);
1245iscsi_session_attr(fast_abort, ISCSI_PARAM_FAST_ABORT, 1); 1245iscsi_session_attr(fast_abort, ISCSI_PARAM_FAST_ABORT, 0);
1246iscsi_session_attr(abort_tmo, ISCSI_PARAM_ABORT_TMO, 0);
1247iscsi_session_attr(lu_reset_tmo, ISCSI_PARAM_LU_RESET_TMO, 0);
1246 1248
1247#define iscsi_priv_session_attr_show(field, format) \ 1249#define iscsi_priv_session_attr_show(field, format) \
1248static ssize_t \ 1250static ssize_t \
@@ -1467,6 +1469,8 @@ iscsi_register_transport(struct iscsi_transport *tt)
1467 SETUP_SESSION_RD_ATTR(username, ISCSI_PASSWORD); 1469 SETUP_SESSION_RD_ATTR(username, ISCSI_PASSWORD);
1468 SETUP_SESSION_RD_ATTR(username_in, ISCSI_PASSWORD_IN); 1470 SETUP_SESSION_RD_ATTR(username_in, ISCSI_PASSWORD_IN);
1469 SETUP_SESSION_RD_ATTR(fast_abort, ISCSI_FAST_ABORT); 1471 SETUP_SESSION_RD_ATTR(fast_abort, ISCSI_FAST_ABORT);
1472 SETUP_SESSION_RD_ATTR(abort_tmo, ISCSI_ABORT_TMO);
1473 SETUP_SESSION_RD_ATTR(lu_reset_tmo,ISCSI_LU_RESET_TMO);
1470 SETUP_PRIV_SESSION_RD_ATTR(recovery_tmo); 1474 SETUP_PRIV_SESSION_RD_ATTR(recovery_tmo);
1471 1475
1472 BUG_ON(count > ISCSI_SESSION_ATTRS); 1476 BUG_ON(count > ISCSI_SESSION_ATTRS);