Re: [PATCH 2/4] target/pscsi: Fix pscsi_req_done() TCM_UNSUPPORTED_SCSI_OPCODE regression

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

 



On Wed, 2012-11-07 at 00:18 +0000, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> 
> This patch fixes a regression bug in pSCSI in for-v3.8 code after patch:
> 
>   "target: pass sense_reason as a return value"
> 
> to use transport_generic_request_failure() when not being able to return
> TCM_UNSUPPORTED_SCSI_OPCODE from pscsi_req_done in order to specify an
> explict ASC code.
> 
> Cc: Christoph Hellwig <hch@xxxxxx>
> Cc: Roland Dreier <roland@xxxxxxxxxxxxxxx>
> Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> ---
>  drivers/target/target_core_pscsi.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
> index b5c722b..1a040c7 100644
> --- a/drivers/target/target_core_pscsi.c
> +++ b/drivers/target/target_core_pscsi.c
> @@ -1150,7 +1150,8 @@ static void pscsi_req_done(struct request *req, int uptodate)
>  		pr_debug("PSCSI Host Byte exception at cmd: %p CDB:"
>  			" 0x%02x Result: 0x%08x\n", cmd, pt->pscsi_cdb[0],
>  			pt->pscsi_result);
> -		target_complete_cmd(cmd, SAM_STAT_CHECK_CONDITION);
> +		transport_generic_request_failure(cmd,
> +				TCM_UNSUPPORTED_SCSI_OPCODE);
>  		break;
>  	}
>  

Actually sorry, target_complete_cmd(cmd, SAM_STAT_CHECK_CONDITION) is
already going to call target_complete_failure_work() ->
transport_generic_request_failure(cmd, TCM_UNSUPPORTED_SCSI_OPCODE) in
workqueue context for this special failure case with pSCSI.

Dropping this patch now..

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


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux