From patchwork Wed Dec 28 09:36:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Bo X-Patchwork-Id: 37147 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1792340wrt; Wed, 28 Dec 2022 01:08:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXs0iuIhRQmfgvJNS/GBf+1wbIZDW9hb1q0hOsYOqsLyDXczNiQvPApvgrzX0qBGZbzWeNnl X-Received: by 2002:a05:6402:2296:b0:46a:96b3:22bf with SMTP id cw22-20020a056402229600b0046a96b322bfmr27225213edb.17.1672218512664; Wed, 28 Dec 2022 01:08:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672218512; cv=none; d=google.com; s=arc-20160816; b=NOSFjaiJRX1fWsDF1uNdR11eQxN7vgMDt5eOgaPv1lP0GCnwN/SJteV/OE0uC6tcUj G/4jQoLaYlVQ2bAr9WT+9KsvMKpkoiuKqJeIq7vAJIF7PJZV7a9ZcXUUhAoNhlZi8I/v FBckE7kwmCDByrGlRSqW/s44k5J3R5UO3S4ZXhUAwvnjAlEv0zKB+3eugsE4pAYAtyly Zk1zXEL+OPiO1oa7pAPmnue/pyzWvsH+xYZndhOAeIjq0t68A41TFdh1f1jkkw82bV5j eqwtQekshUJZvPx8VBopO3RTdpfQ5+VFetVQVKJ91Ot5dALDqO1xeSEvxyK1bk781g2X G0uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=6OXbryU3GaRMN/PPFWT0jIsnWFfceVLqW3cvU5I7iIk=; b=Kag4eaSCtZ6V/M0vd5CnS4hccVA+sGbf7btOuK+m9HHEfad1QDMsuiOHL3h0rpl/ds wwdBFZZZyQ7NGdS+Eb5cCilQiMusdzfpKPpSKbZI6ycqTypzYEy3vHOQjI3mOW2Ybd1+ Pbhq12/VO8UYISrV40Iu50lVTV4n3V/ZTYSbsflfh8F+eGwVbZeuW9bBup6il56zWgkY nd2W2L2PSGZh0pDaHrFJiU+j6XDhjGHdqWfN/cuxCuXp6aNJEzp6vKqDSAzHstFunVFw XJbtpv5SxV7kce++3afylpLw0Dpds9vyZcVpswgV6gjavXir8CnHGG91yHyCmFy843xs lkmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn12-20020a1709070d0c00b007ae26c753edsi14395133ejc.52.2022.12.28.01.08.09; Wed, 28 Dec 2022 01:08:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229587AbiL1I4t (ORCPT + 99 others); Wed, 28 Dec 2022 03:56:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230080AbiL1I4s (ORCPT ); Wed, 28 Dec 2022 03:56:48 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB3DDBCB8; Wed, 28 Dec 2022 00:56:47 -0800 (PST) Received: from dggpeml500019.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NhljF1P8vzmWr7; Wed, 28 Dec 2022 16:55:29 +0800 (CST) Received: from huawei.com (10.175.124.27) by dggpeml500019.china.huawei.com (7.185.36.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 28 Dec 2022 16:56:46 +0800 From: Wu Bo To: Damien Le Moal , , CC: , Subject: [RFC PATCH] ata: libata-eh: Retry the cmnd when normal complete occurrd after scsi timeout Date: Wed, 28 Dec 2022 17:36:56 +0800 Message-ID: <1672220216-46938-1-git-send-email-wubo40@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500019.china.huawei.com (7.185.36.137) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753448199335546835?= X-GMAIL-MSGID: =?utf-8?q?1753448199335546835?= From: wubo Hi, Now SCSI middle layer EH and normal IO handler can only choose one of them, after the SCSI command is completed normally after scsi timeout period, Should this scenario be given a chance to retry? Signed-off-by: wubo --- drivers/ata/libata-eh.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 34303ce..8d1856f 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -617,14 +617,8 @@ void ata_scsi_cmd_error_handler(struct Scsi_Host *host, struct ata_port *ap, qc->flags |= ATA_QCFLAG_FAILED; nr_timedout++; } - } else { - /* Normal completion occurred after - * SCSI timeout but before this point. - * Successfully complete it. - */ - scmd->retries = scmd->allowed; + } else scsi_eh_finish_cmd(scmd, &ap->eh_done_q); - } } /* If we have timed out qcs. They belong to EH from