scsi_transport_fc: Implement I_T nexus reset
Subsystems (4)
RFC PATCH 1/1 scsi_transport_fc: Implement I_T nexus reset
'Bus reset' is not really applicable to FibreChannel, as the concept of a bus doesn't apply. Hence all FC LLDD simulate a 'bus reset' by sending a target reset to each attached remote port, causing error handling to spill over to unaffected devices.
This patch implements a 'I_T nexus reset' handler, which attempts to reset the I_T nexus to the remote port. This way only the affected remote ports are reset; other ports are left untouched.
I_T nexus reset is done by invoking the dev_loss_tmo mechanism with a '0' fast fail timeout. This causes any outstanding I/O to be aborted immediately. The port is then set to 'blocked' to indicate that no further I/O should be issued to this port. The standard dev_loss_tmo mechanism is then invoked to clear up any outstanding resources.
In my test this patch cuts down the total time for recovery from 100 secs to 60 secs. And, of course, with no interruption to the other remote ports.
--- drivers/scsi/bfa/bfad_im.c | 4 +- drivers/scsi/lpfc/lpfc_scsi.c | 4 +- drivers/scsi/qla2xxx/qla_os.c | 2 +- drivers/scsi/scsi_transport_fc.c | 146 ++++++++++++++++++++++++-------------- include/scsi/scsi_transport_fc.h | 1 + 5 files changed, 99 insertions(+), 58 deletions(-)
drivers/scsi/bfa/bfad_im.c +2 -2
@@ -793,7 +793,7 @@ struct scsi_host_template bfad_im_scsi_host_template = { .queuecommand = bfad_im_queuecommand, .eh_abort_handler = bfad_im_abort_handler, .eh_device_reset_handler = bfad_im_reset_lun_handler, - .eh_bus_reset_handler = bfad_im_reset_bus_handler, + .eh_bus_reset_handler = fc_eh_reset_it_nexus_handler, .slave_alloc = bfad_im_slave_alloc, .slave_configure = bfad_im_slave_configure,
@@ -815,7 +815,7 @@ struct scsi_host_template bfad_im_vport_template = { .queuecommand = bfad_im_queuecommand, .eh_abort_handler = bfad_im_abort_handler, .eh_device_reset_handler = bfad_im_reset_lun_handler, - .eh_bus_reset_handler = bfad_im_reset_bus_handler, + .eh_bus_reset_handler = fc_eh_reset_it_nexus_handler, .slave_alloc = bfad_im_slave_alloc, .slave_configure = bfad_im_slave_configure,
drivers/scsi/lpfc/lpfc_scsi.c +2 -2
@@ -5136,7 +5136,7 @@ struct scsi_host_template lpfc_template = { .eh_abort_handler = lpfc_abort_handler, .eh_device_reset_handler = lpfc_device_reset_handler, .eh_target_reset_handler = lpfc_target_reset_handler, - .eh_bus_reset_handler = lpfc_bus_reset_handler, + .eh_bus_reset_handler = fc_eh_reset_it_nexus_handler, .eh_host_reset_handler = lpfc_host_reset_handler, .slave_alloc = lpfc_slave_alloc, .slave_configure = lpfc_slave_configure,
@@ -5160,7 +5160,7 @@ struct scsi_host_template lpfc_vport_template = { .eh_abort_handler = lpfc_abort_handler, .eh_device_reset_handler = lpfc_device_reset_handler, .eh_target_reset_handler = lpfc_target_reset_handler, - .eh_bus_reset_handler = lpfc_bus_reset_handler, + .eh_bus_reset_handler = fc_eh_reset_it_nexus_handler, .slave_alloc = lpfc_slave_alloc, .slave_configure = lpfc_slave_configure, .slave_destroy = lpfc_slave_destroy,
drivers/scsi/qla2xxx/qla_os.c +1 -1
@@ -246,7 +246,7 @@ struct scsi_host_template qla2xxx_driver_template = { .eh_abort_handler = qla2xxx_eh_abort, .eh_device_reset_handler = qla2xxx_eh_device_reset, .eh_target_reset_handler = qla2xxx_eh_target_reset, - .eh_bus_reset_handler = qla2xxx_eh_bus_reset, + .eh_bus_reset_handler = fc_eh_reset_it_nexus_handler, .eh_host_reset_handler = qla2xxx_eh_host_reset, .slave_configure = qla2xxx_slave_configure,
drivers/scsi/scsi_transport_fc.c +93 -53
171 lines not on this page · raw message
include/scsi/scsi_transport_fc.h +1 -0
@@ -851,5 +851,6 @@ struct fc_vport *fc_vport_create(struct Scsi_Host *shost, int channel, struct fc_vport_identifiers *);int fc_vport_terminate (struct fc_vport *vport);int fc_block_scsi_eh (struct scsi_cmnd *cmnd); +int fc_eh_reset_it_nexus_handler (struct scsi_cmnd *cmnd);#endif /* SCSI_TRANSPORT_FC_H */
Signature · 1 line
1.7.4.2
Quoted 10 lines · Hannes Reinecke
'Bus reset' is not really applicable to FibreChannel, as the concept of a bus doesn't apply. Hence all FC LLDD simulate a 'bus reset' by sending a target reset to each attached remote port, causing error handling to spill over to unaffected devices.
This patch implements a '
I_Tnexus reset' handler, which attempts to reset theI_Tnexus to the remote port. This way only the affected remote ports are reset; other ports are left untouched.
Is the I_T nexus reset we are doing in this patch supposed to be the same one defined in SAM? Was the I_T nexus reset TMF added to SAM at the same time the target reset one was removed? In SAM 4 and 5 there is no target reset anymore is there?
I think we should just kill the bus reset use from the FC drivers. Add a new I_T nexus reset callout to the scsi_host_template or to the scsi_transport_template. Then have scsi-ml call just either target reset eh callout or I_T nexus eh reset callout depending on what the target supports.
To figure out what the target supports could we do a REPORTED SUPPORTED TASK MANAGEMENT FUNCTION command. If the target supports that command and reports that the target supports the I_T nexus reset TMF then call that eh callback, else drop down to older target reset eh callback.
It seems that if we do I_T nexus reset we do not need to also do a target reset do we?
drivers/scsi/scsi_transport_fc.c fc_timeout_fail_rport_io(struct work_struct *work) · line 3277
Quoted 9 lines
drivers/scsi/scsi_transport_fc.c +1
-1@@ -3266,8 +3271,8 @@ fc_timeout_fail_rport_io(struct work_struct *work)if (rport->port_state !=FC_PORTSTATE_BLOCKED )return ; - rport->flags |=FC_RPORT_FAST_FAIL_TIMEDOUT ;fc_terminate_rport_io (rport); + rport->flags |=FC_RPORT_FAST_FAIL_TIMEDOUT ; }
What was the reason for moving this? For the eh case in this patch was it causing IO to be failed with DID_TRANSPORT_FAILFAST when we wanted it failed with some other error.
Quoted 23 lines · Mike Christie
Quoted 10 lines · Hannes Reinecke
'Bus reset' is not really applicable to FibreChannel, as the concept of a bus doesn't apply. Hence all FC LLDD simulate a 'bus reset' by sending a target reset to each attached remote port, causing error handling to spill over to unaffected devices.
This patch implements a '
I_Tnexus reset' handler, which attempts to reset theI_Tnexus to the remote port. This way only the affected remote ports are reset; other ports are left untouched.Is the
I_Tnexus reset we are doing in this patch supposed to be the same one defined in SAM? Was theI_Tnexus reset TMF added to SAM at the same time the target reset one was removed? In SAM 4 and 5 there is no target reset anymore is there?I think we should just kill the bus reset use from the FC drivers. Add a new
I_Tnexus reset callout to thescsi_host_templateor to thescsi_transport_template. Then have scsi-ml call just either target reset eh callout orI_Tnexus eh reset callout depending on what the target supports.
Quoted 8 lines
To figure out what the target supports could we do a REPORTED SUPPORTED TASK MANAGEMENT FUNCTION command. If the target supports that command and reports that the target supports the
I_Tnexus reset TMF then call that eh callback, else drop down to older target reset eh callback.It seems that if we do
I_Tnexus reset we do not need to also do a target reset do we?
It would be good to have a specific I_T nexus reset callout in either the host or transport so we can clean things up.
Currently in the bus reset handler after we perform all the target resets we wait for all the associated DMA activity to clear up before we return from the bus_reset handler. It would be good to have the same capability in a new I_T nexus reset handler as well.
Also, are there certain port types we wouldn't want to send this reset to such as tape?
Quoted 6 lines
Quoted 6 lines
drivers/scsi/scsi_transport_fc.c +0
-0@@ -3266,8 +3271,8 @@ fc_timeout_fail_rport_io(struct work_struct *work)if (rport->port_state !=FC_PORTSTATE_BLOCKED )return ;
Quoted 12 lines
drivers/scsi/scsi_transport_fc.c fc_timeout_fail_rport_io(struct work_struct *work) · line 3277
Quoted 5 lines
drivers/scsi/scsi_transport_fc.c +1
-1- rport->flags |=FC_RPORT_FAST_FAIL_TIMEDOUT ;fc_terminate_rport_io (rport); + rport->flags |=FC_RPORT_FAST_FAIL_TIMEDOUT ; }What was the reason for moving this? For the eh case in this patch was it causing IO to be failed with
DID_TRANSPORT_FAILFASTwhen we wanted it failed with some other error.
________________________________
This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
Quoted 2 lines · Chad Dupuis
Also, are there certain port types we wouldn't want to send this reset to such as tape?
AFAIK, for tape it shouldn't cause any more harm than the target reset which
happens immediately before it. This patch is infinitely better than the previous "bus" reset behavior.
That said, its far from perfect. The code (as I understand it) isn't
differentiating between isolating the failure, or bringing out the big hammer in an attempt to correct problems on a specific I_T_L. If you drop/reset the I_T because one of the LUN's is misbehaving before verifying the status of other LUN's on the target, you risk interrupting operations to functional devices.
Quoted 8 lines · Jeremy Linton
Quoted 2 lines · Chad Dupuis
Also, are there certain port types we wouldn't want to send this reset to such as tape?
AFAIK, for tape it shouldn't cause any more harm than the target reset which
happens immediately before it. This patch is infinitely better than the previous "bus" reset behavior.
Quoted 7 lines
That said, its far from perfect. The code (as I understand it) isn't
differentiating between isolating the failure, or bringing out the big hammer in an attempt to correct problems on a specificI_T_L. If you drop/reset theI_Tbecause one of the LUN's is misbehaving before verifying the status of other LUN's on the target, you risk interrupting operations to functional devices.
When this code is called the scsi eh has run the abort handler for each outstanding command and that has failed, and it has run the lun/device reset handler and that has failed (or the eh operations succeeded but the TUR checkup the scsi eh does failed).
Quoted 8 lines · Mike Christie
Quoted 6 lines · Jeremy Linton
That said, its far from perfect. The code (as I understand it) isn't differentiating between isolating the failure, or bringing out the big hammer in an attempt to correct problems on a specific
I_T_L. If you drop/reset theI_Tbecause one of the LUN's is misbehaving before verifying the status of other LUN's on the target, you risk interrupting operations to functional devices.
Quoted 4 lines
When this code is called the scsi eh has run the abort handler for each outstanding command and that has failed, and it has run the lun/device reset handler and that has failed (or the eh operations succeeded but the TUR checkup the scsi eh does failed).
I think my issue with the error handler (rather than this patch in
particular) surrounds the fact that when scsi_eh_bus_device_reset (which maps to lun reset) fails, it falls to scsi_eh_target_reset which issues a TARGET RESET which then broadens the problem to devices which may be working fine, and just happen to be on the same I_T.
I think there should be some attempt to determine if there are other devices on
the I_T, and whether they have failed before going into target_reset. It looks like there may have been a plan to do that in bus_device_reset, but it doesn't appear to be complete.
Now, all that said, I have a few things I wonder about in theeh_bus_device_reset code. For one the use of TUR rather than a command with a more straightforward return status like INQUIRY which also preserves the check conditions.
Am 12/07/2012 08:58 PM, schrieb Chad Dupuis:
Quoted 36 lines · Mike Christie
Quoted 24 lines · Hannes Reinecke
Quoted 10 lines
'Bus reset' is not really applicable to FibreChannel, as the concept of a bus doesn't apply. Hence all FC LLDD simulate a 'bus reset' by sending a target reset to each attached remote port, causing error handling to spill over to unaffected devices.
This patch implements a '
I_Tnexus reset' handler, which attempts to reset theI_Tnexus to the remote port. This way only the affected remote ports are reset; other ports are left untouched.Is the
I_Tnexus reset we are doing in this patch supposed to be the same one defined in SAM? Was theI_Tnexus reset TMF added to SAM at the same time the target reset one was removed? In SAM 4 and 5 there is no target reset anymore is there?I think we should just kill the bus reset use from the FC drivers. Add a new
I_Tnexus reset callout to thescsi_host_templateor to thescsi_transport_template. Then have scsi-ml call just either target reset eh callout orI_Tnexus eh reset callout depending on what the target supports.Quoted 8 lines
To figure out what the target supports could we do a REPORTED SUPPORTED TASK MANAGEMENT FUNCTION command. If the target supports that command and reports that the target supports the
I_Tnexus reset TMF then call that eh callback, else drop down to older target reset eh callback.It seems that if we do
I_Tnexus reset we do not need to also do a target reset do we?
Quoted 8 lines
It would be good to have a specific
I_Tnexus reset callout in either the host or transport so we can clean things up.Currently in the bus reset handler after we perform all the target resets we wait for all the associated DMA activity to clear up before we return from the
bus_resethandler. It would be good to have the same capability in a newI_Tnexus reset handler as well.
Hmm. Thanks for bringing this up, as this is exactly one of the issues I wanted to get feedback from the hardware guys.
When doing an I_T Nexus reset I'd need:
- Set the port type to BLOCKED
- Abort all outstanding I/O
- invoke dev_loss_tmo to reset the port
- Return status 'GOOD' if we could abort all I/O or FAILED if not
I'm not sure about the third item; I _think_ we might be okay by just setting the port state to 'BLOCKED' and invoke the dev_loss_tmo mechanism here. That should be resetting the port eventually.
However, the tricky bit is the second item. fc_terminate_rport_io() is more often than not invoked asynchronously, so the only thing I can be sure of is that we have _started_ to abort all I/O, not neccessarily that all I/O is actually aborted.
So hooking up eh_target_reset there instead of fc_terminate_rport_io() would not only clear up any outstanding I/O but also give me a nice status back.
Hmm. That actually makes sense.
I think I'll be drafting out a new version of the patch.
Cheers,
Hannes
Signature · 9 lines
Dr. Hannes Reinecke zSeries & Storage [email protected] +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Am 12/07/2012 07:58 PM, schrieb Mike Christie:
Quoted 23 lines · Hannes Reinecke
Quoted 10 lines
'Bus reset' is not really applicable to FibreChannel, as the concept of a bus doesn't apply. Hence all FC LLDD simulate a 'bus reset' by sending a target reset to each attached remote port, causing error handling to spill over to unaffected devices.
This patch implements a '
I_Tnexus reset' handler, which attempts to reset theI_Tnexus to the remote port. This way only the affected remote ports are reset; other ports are left untouched.Is the
I_Tnexus reset we are doing in this patch supposed to be the same one defined in SAM? Was theI_Tnexus reset TMF added to SAM at the same time the target reset one was removed? In SAM 4 and 5 there is no target reset anymore is there?I think we should just kill the bus reset use from the FC drivers. Add a new
I_Tnexus reset callout to thescsi_host_templateor to thescsi_transport_template. Then have scsi-ml call just either target reset eh callout orI_Tnexus eh reset callout depending on what the target supports.
Quoted 8 lines
To figure out what the target supports could we do a REPORTED SUPPORTED TASK MANAGEMENT FUNCTION command. If the target supports that command and reports that the target supports the
I_Tnexus reset TMF then call that eh callback, else drop down to older target reset eh callback.It seems that if we do
I_Tnexus reset we do not need to also do a target reset do we?
Hmm. I would rather check the actual LLDDs if they do anything sensible for target reset. If not we sure can remove it.
Quoted 6 lines
Quoted 6 lines
drivers/scsi/scsi_transport_fc.c +0
-0@@ -3266,8 +3271,8 @@ fc_timeout_fail_rport_io(struct work_struct *work)if (rport->port_state !=FC_PORTSTATE_BLOCKED )return ;
Quoted 10 lines
drivers/scsi/scsi_transport_fc.c fc_timeout_fail_rport_io(struct work_struct *work) · line 3277
Quoted 5 lines
drivers/scsi/scsi_transport_fc.c +1
-1- rport->flags |=FC_RPORT_FAST_FAIL_TIMEDOUT ;fc_terminate_rport_io (rport); + rport->flags |=FC_RPORT_FAST_FAIL_TIMEDOUT ; }What was the reason for moving this? For the eh case in this patch was it causing IO to be failed with
DID_TRANSPORT_FAILFASTwhen we wanted it failed with some other error.
I wanted to ensure that fc_terminate_rport_io() was run when checking FC_RPORT_FAST_FAIL_TIMEOUT. Without the move there is a race window between clearing the flag and
calling fc_terminate_rport_io(), which one might trigger by just checking the flag.
Cheers,
Hannes
Signature · 9 lines
Dr. Hannes Reinecke zSeries & Storage [email protected] +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 29 lines · Hannes Reinecke
Am 12/07/2012 07:58 PM, schrieb Mike Christie:
Quoted 28 lines · Hannes Reinecke
Quoted 10 lines
'Bus reset' is not really applicable to FibreChannel, as the concept of a bus doesn't apply. Hence all FC LLDD simulate a 'bus reset' by sending a target reset to each attached remote port, causing error handling to spill over to unaffected devices.
This patch implements a '
I_Tnexus reset' handler, which attempts to reset theI_Tnexus to the remote port. This way only the affected remote ports are reset; other ports are left untouched.Is the
I_Tnexus reset we are doing in this patch supposed to be the same one defined in SAM? Was theI_Tnexus reset TMF added to SAM at the same time the target reset one was removed? In SAM 4 and 5 there is no target reset anymore is there?I think we should just kill the bus reset use from the FC drivers. Add a new
I_Tnexus reset callout to thescsi_host_templateor to thescsi_transport_template. Then have scsi-ml call just either target reset eh callout orI_Tnexus eh reset callout depending on what the target supports.To figure out what the target supports could we do a REPORTED SUPPORTED TASK MANAGEMENT FUNCTION command. If the target supports that command and reports that the target supports the
I_Tnexus reset TMF then call that eh callback, else drop down to older target reset eh callback.
Quoted 6 lines
Quoted 3 lines
It seems that if we do
I_Tnexus reset we do not need to also do a target reset do we?Hmm. I would rather check the actual LLDDs if they do anything sensible for target reset.
If not we sure can remove it.
I am not suggesting to remove the target reset support completely. I am just asking if we want to only do one or the other depending on what the target supports. I was saying it is not clear to me why we need to do both when in SAM 4 and 5 target reset TMF support looks like it is removed.
Quoted 17 lines
Quoted 7 lines
Quoted 7 lines
drivers/scsi/scsi_transport_fc.c +0
-0@@ -3266,8 +3271,8 @@ fc_timeout_fail_rport_io(struct work_struct *work)if (rport->port_state !=FC_PORTSTATE_BLOCKED )return ;Quoted 10 lines
drivers/scsi/scsi_transport_fc.c fc_timeout_fail_rport_io(struct work_struct *work) · line 3277
Quoted 5 lines
drivers/scsi/scsi_transport_fc.c +1
-1- rport->flags |=FC_RPORT_FAST_FAIL_TIMEDOUT ;fc_terminate_rport_io (rport); + rport->flags |=FC_RPORT_FAST_FAIL_TIMEDOUT ; }What was the reason for moving this? For the eh case in this patch was it causing IO to be failed with
DID_TRANSPORT_FAILFASTwhen we wanted it failed with some other error.
Quoted 6 lines
I wanted to ensure that
fc_terminate_rport_io()was run when checkingFC_RPORT_FAST_FAIL_TIMEOUT.
Without the move there is a race window between clearing the flag and callingfc_terminate_rport_io(), which one might trigger by just checking the flag.
What code is this? I am not sure what you mean. fc_terminate_rport_io is always going to get run. There does not seem to be checks in it for FC_RPORT_FAST_FAIL_TIMEOUT.
Quoted 24 lines · Mike Christie
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 8 lines
Quoted 8 lines
drivers/scsi/scsi_transport_fc.c +0
-0@@ -3266,8 +3271,8 @@ fc_timeout_fail_rport_io(struct work_struct *work)if (rport->port_state !=FC_PORTSTATE_BLOCKED )return ;Quoted 5 lines
drivers/scsi/scsi_transport_fc.c fc_timeout_fail_rport_io(struct work_struct *work) · line 3277
Quoted 5 lines
drivers/scsi/scsi_transport_fc.c +1
-1- rport->flags |=FC_RPORT_FAST_FAIL_TIMEDOUT ;fc_terminate_rport_io (rport); + rport->flags |=FC_RPORT_FAST_FAIL_TIMEDOUT ; }What was the reason for moving this? For the eh case in this patch was it causing IO to be failed with
DID_TRANSPORT_FAILFASTwhen we wanted it failed with some other error.Quoted 6 lines
Quoted 6 lines
I wanted to ensure that
fc_terminate_rport_io()was run when checkingFC_RPORT_FAST_FAIL_TIMEOUT.
Without the move there is a race window between clearing the flag and callingfc_terminate_rport_io(), which one might trigger by just checking the flag.
Quoted 3 lines
What code is this? I am not sure what you mean.
fc_terminate_rport_iois always going to get run. There does not seem to be checks in it forFC_RPORT_FAST_FAIL_TIMEOUT.
Ignore this. I misread your mail. I see what you meant.
Quoted 50 lines · Hannes Reinecke
drivers/scsi/bfa/bfad_im.c +2
-2@@ -793,7 +793,7 @@ struct scsi_host_template bfad_im_scsi_host_template = { .queuecommand = bfad_im_queuecommand, .eh_abort_handler = bfad_im_abort_handler, .eh_device_reset_handler = bfad_im_reset_lun_handler, - .eh_bus_reset_handler = bfad_im_reset_bus_handler, + .eh_bus_reset_handler = fc_eh_reset_it_nexus_handler, .slave_alloc = bfad_im_slave_alloc, .slave_configure = bfad_im_slave_configure,@@ -815,7 +815,7 @@ struct scsi_host_template bfad_im_vport_template = { .queuecommand = bfad_im_queuecommand, .eh_abort_handler = bfad_im_abort_handler, .eh_device_reset_handler = bfad_im_reset_lun_handler, - .eh_bus_reset_handler = bfad_im_reset_bus_handler, + .eh_bus_reset_handler = fc_eh_reset_it_nexus_handler, .slave_alloc = bfad_im_slave_alloc, .slave_configure = bfad_im_slave_configure,drivers/scsi/lpfc/lpfc_scsi.c +2
-2@@ -5136,7 +5136,7 @@ struct scsi_host_template lpfc_template = { .eh_abort_handler = lpfc_abort_handler, .eh_device_reset_handler = lpfc_device_reset_handler, .eh_target_reset_handler = lpfc_target_reset_handler, - .eh_bus_reset_handler = lpfc_bus_reset_handler, + .eh_bus_reset_handler = fc_eh_reset_it_nexus_handler, .eh_host_reset_handler = lpfc_host_reset_handler, .slave_alloc = lpfc_slave_alloc, .slave_configure = lpfc_slave_configure,@@ -5160,7 +5160,7 @@ struct scsi_host_template lpfc_vport_template = { .eh_abort_handler = lpfc_abort_handler, .eh_device_reset_handler = lpfc_device_reset_handler, .eh_target_reset_handler = lpfc_target_reset_handler, - .eh_bus_reset_handler = lpfc_bus_reset_handler, + .eh_bus_reset_handler = fc_eh_reset_it_nexus_handler, .slave_alloc = lpfc_slave_alloc, .slave_configure = lpfc_slave_configure, .slave_destroy = lpfc_slave_destroy,drivers/scsi/qla2xxx/qla_os.c +0
-0
drivers/scsi/qla2xxx/qla_os.c struct scsi_host_template qla2xxx_driver_template = { · line 250
Quoted 6 lines
drivers/scsi/qla2xxx/qla_os.c +1
-1@@ -246,7 +246,7 @@ struct scsi_host_template qla2xxx_driver_template = { .eh_abort_handler = qla2xxx_eh_abort, .eh_device_reset_handler = qla2xxx_eh_device_reset, .eh_target_reset_handler = qla2xxx_eh_target_reset, - .eh_bus_reset_handler = qla2xxx_eh_bus_reset, + .eh_bus_reset_handler = fc_eh_reset_it_nexus_handler, .eh_host_reset_handler = qla2xxx_eh_host_reset,
Hey,
One other comment. I do not think we can use the bus reset callout as is. I think for all fc drivers but mptfc, the channel is always 0. All targets on those hosts have the same channel value, and it seems this code in scsi_error.c:scsi_eh_bus_reset():
rtn = scsi_try_bus_reset(chan_scmd);
if (rtn == SUCCESS || rtn == FAST_IO_FAIL) {
list_for_each_entry_safe(scmd, next, work_q, eh_entry) {
if (channel == scmd_channel(scmd)) {would end up matching all the commands on the host instead of just the commands on the specific target that was passed into scsi_try_bus_reset if SUCCESS or FAST_IO_FAIL was returned by scsi_try_bus_reset. If there were 2 faulty targets on a host, you would end up calling fc_eh_reset_it_nexus_handler on only 1.