Skip to content

Commit

Permalink
[SCSI] mpt2sas: Corrected conditional checks for Internal device Reset
Browse files Browse the repository at this point in the history
bug fix in the handling of the internal device reset event
The reason code check in scsih_sas_device_status_change_event never
evaluates as true for internal device reset, hence driver never quiesce s IO
when firmware is sending a device reset. The fix is to change the
evaluate to:
if (event_data->ReasonCode !=
    MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET &&
   event_data->ReasonCode !=
    MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET)
        return;

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Kashyap, Desai authored and James Bottomley committed Apr 11, 2010
1 parent 7921b35 commit f891dcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/scsi/mpt2sas/mpt2sas_scsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -4435,10 +4435,10 @@ _scsih_sas_device_status_change_event(struct MPT2SAS_ADAPTER *ioc,
event_data);
#endif

if (!(event_data->ReasonCode ==
if (event_data->ReasonCode !=
MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET &&
event_data->ReasonCode ==
MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET))
event_data->ReasonCode !=
MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET)
return;

spin_lock_irqsave(&ioc->sas_device_lock, flags);
Expand Down

0 comments on commit f891dcf

Please sign in to comment.