Re: [PATCH v4 1/3] cxlflash: Base error recovery support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Aug 10, 2015, at 6:52 PM, Daniel Axtens <dja@xxxxxxxxxx> wrote:
> 
>> @@ -487,11 +515,27 @@ static int cxlflash_eh_host_reset_handler(struct scsi_cmnd *scp)
>> 		 get_unaligned_be32(&((u32 *)scp->cmnd)[2]),
>> 		 get_unaligned_be32(&((u32 *)scp->cmnd)[3]));
>> 
>> -	rcr = cxlflash_afu_reset(cfg);
>> -	if (rcr == 0)
>> -		rc = SUCCESS;
>> -	else
>> +	switch (cfg->state) {
>> +	case STATE_NORMAL:
>> +		cfg->state = STATE_LIMBO;
>> +		scsi_block_requests(cfg->host);
>> +
>> +		rcr = cxlflash_afu_reset(cfg);
>> +		if (!rcr)
>> +			rc = FAILED;
> 
> I think you want:
> 
> 	if (rcr) {
> 		rc = FAILED;
> 		break;
> 	}
> 
> cxlflash_afu_reset returns 0 on success, so I think you want to drop the
> negation, and also I think if it fails you want to break out and not set
> STATE_NORMAL. Is that right?

Good catch!

Both of these were an oversight on my part and are now fixed. They’ll be
included with v5.

> 
> Once you fix that, or explain to me why I'm wrong:
> Reviewed-by: Daniel Axtens <dja@xxxxxxxxxx>

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux