From patchwork Mon Nov 4 09:01:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 11225275 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 05A3815AB for ; Mon, 4 Nov 2019 09:02:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DFE4E2190F for ; Mon, 4 Nov 2019 09:02:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728071AbfKDJCO (ORCPT ); Mon, 4 Nov 2019 04:02:14 -0500 Received: from mx2.suse.de ([195.135.220.15]:57146 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727327AbfKDJCN (ORCPT ); Mon, 4 Nov 2019 04:02:13 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5D9E0B2CB; Mon, 4 Nov 2019 09:02:10 +0000 (UTC) From: Hannes Reinecke To: "Martin K. Petersen" Cc: Christoph Hellwig , Bart van Assche , James Bottomley , linux-scsi@vger.kernel.org, Hannes Reinecke Subject: [PATCH 07/52] 3w-xxxx: use standard SAM status codes Date: Mon, 4 Nov 2019 10:01:06 +0100 Message-Id: <20191104090151.129140-8-hare@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191104090151.129140-1-hare@suse.de> References: <20191104090151.129140-1-hare@suse.de> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Use standard SAM status codes and omit the explicit shift to convert from linux-specific ones. Signed-off-by: Hannes Reinecke Reviewed-by: Bart Van Assche Acked-by: Adam Radford --- drivers/scsi/3w-xxxx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index 2b1e0d503020..79eca8f1fd05 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c @@ -429,7 +429,7 @@ static int tw_decode_sense(TW_Device_Extension *tw_dev, int request_id, int fill /* Additional sense code qualifier */ tw_dev->srb[request_id]->sense_buffer[13] = tw_sense_table[i][3]; - tw_dev->srb[request_id]->result = (DID_OK << 16) | (CHECK_CONDITION << 1); + tw_dev->srb[request_id]->result = (DID_OK << 16) | SAM_STAT_CHECK_CONDITION; return TW_ISR_DONT_RESULT; /* Special case for isr to not over-write result */ } } @@ -2164,7 +2164,7 @@ static irqreturn_t tw_interrupt(int irq, void *dev_instance) /* If error, command failed */ if (error == 1) { /* Ask for a host reset */ - tw_dev->srb[request_id]->result = (DID_OK << 16) | (CHECK_CONDITION << 1); + tw_dev->srb[request_id]->result = (DID_OK << 16) | SAM_STAT_CHECK_CONDITION; } /* Now complete the io */