Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1979218imm; Thu, 24 May 2018 03:58:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqKvA1GYfsiA4ntp9tqKTKpKFdrJ/3ak4X+VgjBsZsIxY3tbapCYy1q66w72XtI/6Ry4hGA X-Received: by 2002:a17:902:600a:: with SMTP id r10-v6mr3132520plj.70.1527159496798; Thu, 24 May 2018 03:58:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527159496; cv=none; d=google.com; s=arc-20160816; b=rtn2buwgsgzzu0dIwh160EbJVacSPgkxEwxxF8bUbPy31fW8FB8a0fnUMzOXw16SZx ZA/Ty83Y/v9NMuY53C+7dc9J42SHE6W8ZEHsOCNfzi4bo/kfElI4k9hkjuJE0E5F42to tApd0RUXW71tW1kieLzs03qLT9fAlJswgwBr8u8QUl8q+nGd9Z12MxCPuKziH4ntksD3 p/p03HS2iNI4BHda20PbZpjXqJD4+GA3MCirp8VHTtyxDwUWABbxPLWoQaGXbg137+Ni XsFeSj5eZTJo0cKm495FeeN0yYO1uKBkuP4JMKDzI1cNOirHU/T2C1ALbseQP3rlbRwZ fkAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=IU20MvH1XxGyB8WR4NUneHSQqJP9+FbOj/hiBKDRA0I=; b=P39qBqe9VQMm4YIzb0bZkhe+0TqUu6qZiP3yJKdWZo7veRS2gmf6DctS5jz5AW8QuV tzugDvAJ6aBqiWtr3NIqimdienRv/PUxsZCRXl5flAE+B9ABLv+ngQfrdHhkg3tO7Z25 CphkkZf/XVsvODs4BBDiKV++vZOKmSAuo0a4psf8bSVoZ8WP3ThmyJsmmuAST52H1jW1 S6mW9IrKhLhXMHfGIH4DgsFvVKm3AnOAzqhFtJMT/myWXHfBo0JfQrIzSX159tbXdSbr eoDv2Hn5b143PEZDUWQi2wAL0G0jjp/icPOYMsZQteqdu4E5VsGCV0EqLglaya1DOyY6 n/GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SsJnfVsY; 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 p23-v6si16444916pgv.153.2018.05.24.03.58.02; Thu, 24 May 2018 03:58:16 -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; dkim=pass header.i=@kernel.org header.s=default header.b=SsJnfVsY; 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 S1032678AbeEXK5V (ORCPT + 99 others); Thu, 24 May 2018 06:57:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:36158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030270AbeEXJ4O (ORCPT ); Thu, 24 May 2018 05:56:14 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 04BC92089F; Thu, 24 May 2018 09:56:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155773; bh=1LCzv9vsPPvMtXFtENNyMOS1IdlUWG4jh4JXJX6FUJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SsJnfVsYEwrotg6Nt2ybeqNQVaKSO+T4L0DUFhhrEpxDKyskW/J/+EUzgvfYMIeri fma25y/Hdfvo69gb18dPrwvLSTiTjnmyIKHUBqB0R6R74REg0tU5ogsrAd1WlS0K+r bATdviiGj7Iq8vtUJfp+CC0C0gSkO9fNu+DgKcwI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Doug Gilbert , Hannes Reinecke , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.14 110/165] scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte() Date: Thu, 24 May 2018 11:38:36 +0200 Message-Id: <20180524093626.469402002@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hannes Reinecke [ Upstream commit e39a97353e5378eb46bf01679799c5704d397f32 ] When converting __scsi_error_from_host_byte() to BLK_STS error codes the case DID_OK was forgotten, resulting in it always returning an error. Fixes: 2a842acab109 ("block: introduce new block status code type") Cc: Doug Gilbert Signed-off-by: Hannes Reinecke Reviewed-by: Douglas Gilbert Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/scsi_lib.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -720,6 +720,8 @@ static blk_status_t __scsi_error_from_ho int result) { switch (host_byte(result)) { + case DID_OK: + return BLK_STS_OK; case DID_TRANSPORT_FAILFAST: return BLK_STS_TRANSPORT; case DID_TARGET_FAILURE: