Received: by 10.213.65.68 with SMTP id h4csp2656906imn; Mon, 9 Apr 2018 07:04:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx48gw6ROUJ0hKR9doweAXLcvHkSzHA/TTVDe8s1qmNt3uLMwUmlKsbADY8JBGaRU36+4x8dw X-Received: by 10.101.98.145 with SMTP id f17mr24449645pgv.398.1523282684981; Mon, 09 Apr 2018 07:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523282684; cv=none; d=google.com; s=arc-20160816; b=WiwjXKfZism+WnSql8iiejRRE9vZraTgCLEtLABKd0+RD7NWmj3/u/BXbVWHrF6UxZ ezgwNjfqCDA3LyzMmihjPqygA7m0b7Y2hGaA3u33/CkLP+Xz9gmJsgtY/XwDKjZyilMx sixKGb5n/RPMv2nb4fC49tE7pW+REkbtw5V7RN5eWbWxDwBTtkqGCM3Ni7ULRpRm85bF NAD7AWdKoXa4fuQ1Um8wV5MgdvHXCA5UbNwnEpWSZk8ol40sdP1odIVCwxh3Juv61st1 ZjE1BOoAeoLTecPAzjaFbdCUyYk+fFgRFPAj98rn8kg3W3cy3eKqUgpOnPehrF/ehYRS BJ4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=CzsKwjht2HaI7PJZDcfr5ZbkZNRnDtNl5yFPlbr1ndU=; b=Uwj1u3oBgz3FByngVTEtAURBvVUPal+H7t9oJF7lfRG0Clrw2UUj1GlZz+sJVyQ60n uWxpucKrY+JCrOKbjW3kx/gS2V73lmt+yiqQgyZ7x1b3/rsV35SUt6v+DPkFTE1Xw8Rr 2rGpxcuMczN/v/KjZwULPXcPX1Alt8v1KE8qAaUx+IWmWzc217dCc7fVRb7sSv2iYdVP 2wNq6tmcwhQlbxltcnkBva/9r/PX2JioayhN3Tjm6aOiP9E3x99FUyyMURUYZMebseut g3RaV3PBRJX+43OXA1U+22At1qqqLtMNUUN98JD3HfSKV9uKBRz9RugRzd1Q9PQF39nO NwWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si372046plo.475.2018.04.09.07.04.05; Mon, 09 Apr 2018 07:04:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752759AbeDIN4v (ORCPT + 99 others); Mon, 9 Apr 2018 09:56:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:47129 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751507AbeDIN4u (ORCPT ); Mon, 9 Apr 2018 09:56:50 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0112FAE04; Mon, 9 Apr 2018 13:56:48 +0000 (UTC) Subject: Re: [PATCH] scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION To: Johannes Thumshirn , "Martin K . Petersen" Cc: Linux Kernel Mailinglist , Linux SCSI Mailinglist , Bart Van Assche , Himanshu Madhani References: <20180409123922.854-1-jthumshirn@suse.de> From: Hannes Reinecke Organization: SUSE Linux GmbH Message-ID: Date: Mon, 9 Apr 2018 15:56:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180409123922.854-1-jthumshirn@suse.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/09/2018 02:39 PM, Johannes Thumshirn wrote: > Bart reports that in qla_isr.c's qla2x00_handle_dif_error we're > wrongly shifting the SAM_STAT_CHECK_CONDITION by one instead of > directly ORing it onto the SCSI command's result. > > Signed-off-by: Johannes Thumshirn > Reported-by: Bart Van Assche > Cc: Himanshu Madhani > --- > drivers/scsi/qla2xxx/qla_isr.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c > index 49d67e1d571f..ed6cdfea00b4 100644 > --- a/drivers/scsi/qla2xxx/qla_isr.c > +++ b/drivers/scsi/qla2xxx/qla_isr.c > @@ -2195,7 +2195,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24) > 0x10, 0x1); > set_driver_byte(cmd, DRIVER_SENSE); > set_host_byte(cmd, DID_ABORT); > - cmd->result |= SAM_STAT_CHECK_CONDITION << 1; > + cmd->result |= SAM_STAT_CHECK_CONDITION; > return 1; > } > > @@ -2205,7 +2205,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24) > 0x10, 0x3); > set_driver_byte(cmd, DRIVER_SENSE); > set_host_byte(cmd, DID_ABORT); > - cmd->result |= SAM_STAT_CHECK_CONDITION << 1; > + cmd->result |= SAM_STAT_CHECK_CONDITION; > return 1; > } > > @@ -2215,7 +2215,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24) > 0x10, 0x2); > set_driver_byte(cmd, DRIVER_SENSE); > set_host_byte(cmd, DID_ABORT); > - cmd->result |= SAM_STAT_CHECK_CONDITION << 1; > + cmd->result |= SAM_STAT_CHECK_CONDITION; > return 1; > } > > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)