Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp838666rwb; Thu, 22 Sep 2022 07:05:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM59Lu/2pglIGdPwG7reaTx1sFZjBP+u+J/1kkoj/fO+wIT0jSZ/0/iv1iidtHrdFFEwJQ8f X-Received: by 2002:a17:902:cecf:b0:178:3fa3:1583 with SMTP id d15-20020a170902cecf00b001783fa31583mr3576486plg.141.1663855510393; Thu, 22 Sep 2022 07:05:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663855510; cv=none; d=google.com; s=arc-20160816; b=YjwctCBap2IK1UbV2RxapWMR7ZH8OYzzmGYlCyL1FMou1NBhGEO5WdUfwvQZLsWrIr 4uhBizMEFq4F8eAAkDgY12NyYX8cE2nSKXy1N6dKO+FjdHKRXXuWHrgP9DrTRLNaSUN+ +H7GjGTl7gjtuf/A7uktB/OV+IwcPtQTc/fhcGFSi5z86dfml4lxQMnByCWejtHAPuWc gConOhJwlyvD0US51vJoLU0W4LEPa8WAvVA4ukJ9J7r3MKMaZ67wOq1tn+2WWuAL4NQH IZOah+ApCSl7I9XyZs5KGR4ZKX95VGN26SfY4qjgpN+zaPBxhnSQnRVxUQWrYqWNcA5L WrSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=pdz2ZYKnAZWF5ZW8btru9qSfUo6ySOaDz/tpBOmsGEg=; b=JNT0XNtlTiTLeXkDe1IiSOrph8sFHYXXaBokwjjbNqDUhfdIKPZrB5L/kYDsvsK+fb VKY0nyLBo+KithnSZQG0/Dz977R5yrejSf/mV+Bxw2ZU1WbZCHbPZ+b/Wszy0NiqBZpI zYUFAcEmvlu2GrQPaOJyOslMCNc45WJLUJ2+zk1v+sPEl8Xj5aG82lYodtdhtPxTgjqV hbX8dQhtZ4zkDPYoitxAvtKKYBhSh/0j84tR6z3rtSg/7NdIvLMwOrqs2nDODOrXIaAj QWqF4v02Kz1i5wL6kGhTNenE48OcNpBYdyfeqBumZIs1ly6DaX520N8I+SojggczFfy9 jtfA== 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 f131-20020a636a89000000b0043a345c65f3si6024125pgc.755.2022.09.22.07.04.35; Thu, 22 Sep 2022 07:05:10 -0700 (PDT) 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 S231689AbiIVNvp (ORCPT + 99 others); Thu, 22 Sep 2022 09:51:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231655AbiIVNvk (ORCPT ); Thu, 22 Sep 2022 09:51:40 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B187EBBFE; Thu, 22 Sep 2022 06:51:25 -0700 (PDT) Received: from canpemm500004.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MYGpB0jFDzpV1c; Thu, 22 Sep 2022 21:48:34 +0800 (CST) Received: from [10.174.179.14] (10.174.179.14) by canpemm500004.china.huawei.com (7.192.104.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 21:51:23 +0800 Subject: Re: [PATCH v4 1/7] scsi: libsas: Add sas_ata_device_link_abort() To: John Garry , , , , CC: , , , References: <1663840018-50161-1-git-send-email-john.garry@huawei.com> <1663840018-50161-2-git-send-email-john.garry@huawei.com> From: Jason Yan Message-ID: <8f336809-d594-8ee5-f3bd-4393730cd01a@huawei.com> Date: Thu, 22 Sep 2022 21:51:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <1663840018-50161-2-git-send-email-john.garry@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.14] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500004.china.huawei.com (7.192.104.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 On 2022/9/22 17:46, John Garry wrote: > Similar to how AHCI handles NCQ errors in ahci_error_intr() -> > ata_port_abort() -> ata_do_link_abort(), add an NCQ error handler for LLDDs > to call to initiate a link abort. > > This will mark all outstanding QCs as failed and kick-off EH. > > Note: > A "force reset" argument is added for drivers which require the ATA error > handling to always reset the device. > > A driver may require this feature for when SATA device per-SCSI cmnd > resources are only released during reset for ATA EH. As such, we need an > option to force reset to be done, regardless of what any EH autopsy > decides. > > Suggested-by: Damien Le Moal > Signed-off-by: John Garry > Tested-by: Damien Le Moal > --- > drivers/scsi/libsas/sas_ata.c | 12 ++++++++++++ > include/scsi/sas_ata.h | 6 ++++++ > 2 files changed, 18 insertions(+) Reviewed-by: Jason Yan