diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2010-08-06 04:02:41 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-09-05 12:45:29 -0400 |
commit | da99e307aa508fba6fbedc3699e7df64e284d2c5 (patch) | |
tree | 60b764663ec6133639c5e4f9fffb6d80b3a797bb /drivers/scsi/ibmvscsi | |
parent | 8196a934eea3810be6243b307b336136d63bbc48 (diff) |
[SCSI] ibmvfc: 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.
Patch has only been compile tested.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/ibmvscsi')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvfc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 9f75a6d519a2..a5dd9b4a0ae8 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
@@ -1030,6 +1030,11 @@ static void ibmvfc_get_host_port_state(struct Scsi_Host *shost) | |||
1030 | spin_unlock_irqrestore(shost->host_lock, flags); | 1030 | spin_unlock_irqrestore(shost->host_lock, flags); |
1031 | } | 1031 | } |
1032 | 1032 | ||
1033 | static void ibmvfc_set_host_def_dev_loss_tmo(struct Scsi_Host *shost) | ||
1034 | { | ||
1035 | fc_host_def_dev_loss_tmo(shost) = dev_loss_tmo; | ||
1036 | } | ||
1037 | |||
1033 | /** | 1038 | /** |
1034 | * ibmvfc_set_rport_dev_loss_tmo - Set rport's device loss timeout | 1039 | * ibmvfc_set_rport_dev_loss_tmo - Set rport's device loss timeout |
1035 | * @rport: rport struct | 1040 | * @rport: rport struct |
@@ -2788,7 +2793,6 @@ static int ibmvfc_target_alloc(struct scsi_target *starget) | |||
2788 | static int ibmvfc_slave_configure(struct scsi_device *sdev) | 2793 | static int ibmvfc_slave_configure(struct scsi_device *sdev) |
2789 | { | 2794 | { |
2790 | struct Scsi_Host *shost = sdev->host; | 2795 | struct Scsi_Host *shost = sdev->host; |
2791 | struct fc_rport *rport = starget_to_rport(sdev->sdev_target); | ||
2792 | unsigned long flags = 0; | 2796 | unsigned long flags = 0; |
2793 | 2797 | ||
2794 | spin_lock_irqsave(shost->host_lock, flags); | 2798 | spin_lock_irqsave(shost->host_lock, flags); |
@@ -2800,8 +2804,6 @@ static int ibmvfc_slave_configure(struct scsi_device *sdev) | |||
2800 | scsi_activate_tcq(sdev, sdev->queue_depth); | 2804 | scsi_activate_tcq(sdev, sdev->queue_depth); |
2801 | } else | 2805 | } else |
2802 | scsi_deactivate_tcq(sdev, sdev->queue_depth); | 2806 | scsi_deactivate_tcq(sdev, sdev->queue_depth); |
2803 | |||
2804 | rport->dev_loss_tmo = dev_loss_tmo; | ||
2805 | spin_unlock_irqrestore(shost->host_lock, flags); | 2807 | spin_unlock_irqrestore(shost->host_lock, flags); |
2806 | return 0; | 2808 | return 0; |
2807 | } | 2809 | } |
@@ -4889,6 +4891,8 @@ static struct fc_function_template ibmvfc_transport_functions = { | |||
4889 | .get_host_speed = ibmvfc_get_host_speed, | 4891 | .get_host_speed = ibmvfc_get_host_speed, |
4890 | .show_host_speed = 1, | 4892 | .show_host_speed = 1, |
4891 | 4893 | ||
4894 | .get_host_def_dev_loss_tmo = ibmvfc_set_host_def_dev_loss_tmo, | ||
4895 | |||
4892 | .issue_fc_host_lip = ibmvfc_issue_fc_host_lip, | 4896 | .issue_fc_host_lip = ibmvfc_issue_fc_host_lip, |
4893 | .terminate_rport_io = ibmvfc_terminate_rport_io, | 4897 | .terminate_rport_io = ibmvfc_terminate_rport_io, |
4894 | 4898 | ||