Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2524636ybi; Sat, 1 Jun 2019 18:32:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxd6SzZSLxbUHSyeSe2zIAqbDlry22xHg47MxhftuygcI5Jqn3JBiDW1nqTh1r73lZsyNZP X-Received: by 2002:a63:6e0d:: with SMTP id j13mr19483365pgc.364.1559439149417; Sat, 01 Jun 2019 18:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559439149; cv=none; d=google.com; s=arc-20160816; b=rzoabbjaEc15HQnSbHNA7itMVYJisbaaDWj3Vq5wbH/LjpD4vUJNaGt1uvLIZ+dIGe 74nc8GfsCbBUQFpj7qJXBh09E4Yt+w+yjuxsOMDYmt0XdCkSKwiCeu+ye3OBWwolm2Cp 5nLGNQZ8sSY6jvb33F98Vq9NS7mhXKMD/xDeW6ESnKAKIMyui+oUMJycw42oG/aDcvYk wyYgIkC2SPkFeY19vNydUN0eqieorwgWgZsJ+BS4blvmy55IeHCvFQ42zxHT57Uyqb9d tcx4WocZhHiP1NmudLm46FtBYehEMtte9q4XYxCYpWY+xHEAamKU3zrYfKmjqUpWCKoT JHAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:from:references:in-reply-to :message-id:cc:to; bh=8XSQw3ClC1fwzYsTeq5uWNvkzOj2h3+bGX2+zS0Xfag=; b=RnYq7TDRyCl9DsHEtwI1n6UOAKq6LxZ1BS0wZIIafLqWX6PUjClkpc+5ozapAKdZCd IzgkFA5KtO1PzpF0g2GZkVeeF1m1AObpPgTQoPM2iNaw+Qv7LAnEg9sWbrLkq5N5Bjtp CcnHK/oGhHsPEshxwGRFj/0fiDkWQvNBZTClm5VzxHkUkvS1Dkz8POIQFtqtEdLTCetb 5Tw7sOXKKWDNawyJQfxSd1+Dkc23H3/pA3RUI/pRv9b+HmCkJ8YI4nTUjXmgsjTySRIL DGKSwxAU8Su7aVPWN83z7pgtDPReTgJW3BHnADYDJk2xg98giqWF+S2QN+9dWnTudZT8 q35w== 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 z19si14009603pfa.260.2019.06.01.18.32.14; Sat, 01 Jun 2019 18:32:29 -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 S1726826AbfFBB3K (ORCPT + 99 others); Sat, 1 Jun 2019 21:29:10 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:34616 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbfFBB3J (ORCPT ); Sat, 1 Jun 2019 21:29:09 -0400 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id E546427E6E; Sat, 1 Jun 2019 21:29:06 -0400 (EDT) To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: "Michael Schmitz" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Message-Id: <19811f876a9427adacc8f19606f21b754fd0b5bc.1559438652.git.fthain@telegraphics.com.au> In-Reply-To: References: From: Finn Thain Subject: [PATCH 3/7] scsi: NCR5380: Handle PDMA failure reliably Date: Sun, 02 Jun 2019 11:24:12 +1000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A PDMA error is handled in the core driver by setting the device's 'borken' flag and aborting the command. Unfortunately, do_abort() is not dependable. Perform a SCSI bus reset instead, to make sure that the command fails and gets retried. Cc: Michael Schmitz Cc: stable@vger.kernel.org # v4.20+ Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/scsi/NCR5380.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 08e3ea8159b3..d9fa9cf2fd8b 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c @@ -1761,10 +1761,8 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) scmd_printk(KERN_INFO, cmd, "switching to slow handshake\n"); cmd->device->borken = 1; - sink = 1; - do_abort(instance); - cmd->result = DID_ERROR << 16; - /* XXX - need to source or sink data here, as appropriate */ + do_reset(instance); + bus_reset_cleanup(instance); } } else { /* Transfer a small chunk so that the -- 2.21.0