diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2010-08-06 04:02:38 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-09-05 12:45:25 -0400 |
commit | a74bdf4661441d79a700f7ab3fc6d225ea2cf409 (patch) | |
tree | 83ae2095b742ec047ae5792212f047a68908e477 /drivers/scsi | |
parent | b8ef3204f460912a46659cdc74d237adbe705053 (diff) |
[SCSI] qla2xxx: do not reset dev_loss_tmo in slave callout
This fixes a bug where the driver was resetting the
rport dev_loss_tmo when devices were added by adding
support for the get_host_def_dev_loss_tmo callout.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 11 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 5 |
2 files changed, 11 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 420238cc794e..679a4326811c 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -1530,6 +1530,15 @@ qla2x00_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout) | |||
1530 | } | 1530 | } |
1531 | 1531 | ||
1532 | static void | 1532 | static void |
1533 | qla2x00_get_host_def_loss_tmo(struct Scsi_Host *shost) | ||
1534 | { | ||
1535 | scsi_qla_host_t *vha = shost_priv(shost); | ||
1536 | struct qla_hw_data *ha = vha->hw; | ||
1537 | |||
1538 | fc_host_def_dev_loss_tmo(shost) = ha->port_down_retry_count; | ||
1539 | } | ||
1540 | |||
1541 | static void | ||
1533 | qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport) | 1542 | qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport) |
1534 | { | 1543 | { |
1535 | struct Scsi_Host *host = rport_to_shost(rport); | 1544 | struct Scsi_Host *host = rport_to_shost(rport); |
@@ -1903,6 +1912,7 @@ struct fc_function_template qla2xxx_transport_functions = { | |||
1903 | .show_host_fabric_name = 1, | 1912 | .show_host_fabric_name = 1, |
1904 | .get_host_port_state = qla2x00_get_host_port_state, | 1913 | .get_host_port_state = qla2x00_get_host_port_state, |
1905 | .show_host_port_state = 1, | 1914 | .show_host_port_state = 1, |
1915 | .get_host_def_dev_loss_tmo = qla2x00_get_host_def_loss_tmo, | ||
1906 | 1916 | ||
1907 | .dd_fcrport_size = sizeof(struct fc_port *), | 1917 | .dd_fcrport_size = sizeof(struct fc_port *), |
1908 | .show_rport_supported_classes = 1, | 1918 | .show_rport_supported_classes = 1, |
@@ -1949,6 +1959,7 @@ struct fc_function_template qla2xxx_transport_vport_functions = { | |||
1949 | .show_host_fabric_name = 1, | 1959 | .show_host_fabric_name = 1, |
1950 | .get_host_port_state = qla2x00_get_host_port_state, | 1960 | .get_host_port_state = qla2x00_get_host_port_state, |
1951 | .show_host_port_state = 1, | 1961 | .show_host_port_state = 1, |
1962 | .get_host_def_dev_loss_tmo = qla2x00_get_host_def_loss_tmo, | ||
1952 | 1963 | ||
1953 | .dd_fcrport_size = sizeof(struct fc_port *), | 1964 | .dd_fcrport_size = sizeof(struct fc_port *), |
1954 | .show_rport_supported_classes = 1, | 1965 | .show_rport_supported_classes = 1, |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 8c80b49ac1c4..30b05229af26 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1295,17 +1295,12 @@ static int | |||
1295 | qla2xxx_slave_configure(struct scsi_device *sdev) | 1295 | qla2xxx_slave_configure(struct scsi_device *sdev) |
1296 | { | 1296 | { |
1297 | scsi_qla_host_t *vha = shost_priv(sdev->host); | 1297 | scsi_qla_host_t *vha = shost_priv(sdev->host); |
1298 | struct qla_hw_data *ha = vha->hw; | ||
1299 | struct fc_rport *rport = starget_to_rport(sdev->sdev_target); | ||
1300 | struct req_que *req = vha->req; | 1298 | struct req_que *req = vha->req; |
1301 | 1299 | ||
1302 | if (sdev->tagged_supported) | 1300 | if (sdev->tagged_supported) |
1303 | scsi_activate_tcq(sdev, req->max_q_depth); | 1301 | scsi_activate_tcq(sdev, req->max_q_depth); |
1304 | else | 1302 | else |
1305 | scsi_deactivate_tcq(sdev, req->max_q_depth); | 1303 | scsi_deactivate_tcq(sdev, req->max_q_depth); |
1306 | |||
1307 | rport->dev_loss_tmo = ha->port_down_retry_count; | ||
1308 | |||
1309 | return 0; | 1304 | return 0; |
1310 | } | 1305 | } |
1311 | 1306 | ||