[.....]
> @@ -879,8 +906,12 @@ static int aac_eh_dev_reset(struct scsi_cmnd *cmd)
[......]
>         bus = aac_logical_to_phys(scmd_channel(cmd));
>         cid = scmd_id(cmd);
> +       info = &aac->hba_map[bus][cid];
>         if (bus >= AAC_MAX_BUSES || cid >= AAC_MAX_TARGETS ||
> -           aac->hba_map[bus][cid].devtype != AAC_DEVTYPE_NATIVE_RAW)
> +           info->devtype != AAC_DEVTYPE_NATIVE_RAW)
> +               return FAILED;
> +
> +       if (info->reset_state > 0)
>                 return FAILED;
[......]
 
> @@ -932,8 +962,9 @@ static int aac_eh_target_reset(struct scsi_cmnd
> *cmd)
> 
>         bus = aac_logical_to_phys(scmd_channel(cmd));
>         cid = scmd_id(cmd);
> +       info = &aac->hba_map[bus][cid];
>         if (bus >= AAC_MAX_BUSES || cid >= AAC_MAX_TARGETS ||
> -           aac->hba_map[bus][cid].devtype != AAC_DEVTYPE_NATIVE_RAW)
> +           info->devtype != AAC_DEVTYPE_NATIVE_RAW)
>                 return FAILED;

Can we have a 
        If (info->reset_state > 0
                Return FAILED;
here as well?

>         pr_err("%s: Host adapter reset request. SCSI hang ?\n",
> @@ -945,18 +976,18 @@ static int aac_eh_target_reset(struct scsi_cmnd
> *cmd)
> 
[.....]

Reply via email to