Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2336351imm; Mon, 28 May 2018 06:17:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr8uPWGBMlQK0cvdif5YqrrVgI5w5uv1DT1nrIxYK/rpTUATh7UvWRGRoqBPDiETBGQEJFK X-Received: by 2002:a62:860b:: with SMTP id x11-v6mr13471407pfd.92.1527513448509; Mon, 28 May 2018 06:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527513448; cv=none; d=google.com; s=arc-20160816; b=ZLTevZjBQAmyiR2sz5Ehih1q3revAIowlC5248zJbM8XU/IDXGQB9dyYlsqiNWDAig sOQfD/Nvz7OgtVvX/bNiGFyzX7x5WeTt13fhZJwOi/1H9FXwR2P/P5IMf1U0F+136Z5x lhzr6PfP97gKcGhaVRwGJg1XbK2OFyH7T1kH0+zaIGjfmOX5Mng2KwTzKb2VqRdGJwQW Lfw0QZ3Nue4RaPQ+TO+b4i3VFKKQ38eNk+McCmuE9qXsC+pgpbV2HSKB6FuxWkmzHn5p 28fgKyk6Vkrj0WKhLuOigmHXtxm+2Oou4H07brNZsdYUcyZZ4ItNRYv6jfTHc2zU8iQM sjqA== 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=jsB13KLa8g3p59dOxNqhcDpeAhGzbjkzgEh9RCoC2UuXBmNBIof15L+fMDXoCW/dIz danivWCEW3B2WVmv7YFKZ5EnrCerISjhYveLj487SE6T5/naY2hXJMY+D1IWTbfpVhC3 f8Cb5gVFqe27KDDUlkD2O84dPAdviXaH53PJ6G3aWPo1I1zvz3yTfb2xsJQpa0QkbgPb 1lZq3OszjM9FnetK5npSvPNnQ7rSZGAr9SFNF7lqFKZt82soCXSo956OusxLwhCdzmGP MT4O+l+K2B5e0yFeGvYB3B8N82YDYRSSuMVYrw89uZ1h9xU5GIgePTnrmgltM0k8aVzJ luRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fjip8yNw; 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 b59-v6si30180520plc.335.2018.05.28.06.17.13; Mon, 28 May 2018 06:17:28 -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=fjip8yNw; 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 S1165266AbeE1NQi (ORCPT + 99 others); Mon, 28 May 2018 09:16:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:39680 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163630AbeE1KuH (ORCPT ); Mon, 28 May 2018 06:50:07 -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 1C29E2088E; Mon, 28 May 2018 10:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504606; bh=1LCzv9vsPPvMtXFtENNyMOS1IdlUWG4jh4JXJX6FUJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fjip8yNw/FXaHZs7/ZpvyH/mPWe51Yf41Gi5B90oebkruJqYxXl3klLy+XMCOWtHo g0VcDA7b3B0DOQyU066ayj8F+NMUnAaNx8zzjKVfqTd2f+UBCFGOJXjyBVpRmZAwpk FoBiZf3Wol7SjorbeMqnvBU60NiD4dNIMmAmn5cQ= 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 199/496] scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte() Date: Mon, 28 May 2018 11:59:44 +0200 Message-Id: <20180528100328.325324152@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@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: