Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4255460rwl; Wed, 28 Dec 2022 01:21:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXvGL/pmoOMa0Ej9X6eoyh18R3mtCreraGKA8/EAiHFbbrTRDVxCkSwGvF3kMTEFbB923uJp X-Received: by 2002:a05:6a21:2d8e:b0:af:c871:bf4a with SMTP id ty14-20020a056a212d8e00b000afc871bf4amr29785407pzb.44.1672219274631; Wed, 28 Dec 2022 01:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672219274; cv=none; d=google.com; s=arc-20160816; b=ze2P1P5UxqUD3EI6BVvwum1Zo7JabdB68OUAix/XN/jsmDELuhg9Aksbo+rrm3t3Ft DzTrmt6VA3FeTVA3QfMUijEGe1mdKRdWaDGfCrwow3fehmCJpb2i8i61lgiub774xpCf 4SqothmzAHVqKNWA+56Pz6T6Ieefqfhisg7AQycM9gDj0j+MGu35h/R2TdjYWkNNtZ2W eLA+Qag5Wmnc7XLadN8Ymau3TZYkjeIUEyGXcipXLJuHviUvbPsJDtolJHeBLk5oq1fd 8hCUnFv4SaxOsqwjRzYnc5/R/CD21IKXyPvuW5F8dNpWkSAD+7fwE8nXa12iJjXRQFNm 7b/w== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 186-20020a6300c3000000b0049c1b1e288dsi2560497pga.586.2022.12.28.01.21.06; Wed, 28 Dec 2022 01:21:14 -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 + 64 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 Content-Type: text/plain 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 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 -- 1.8.3.1