Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2100191rwb; Fri, 12 Aug 2022 12:03:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Xhc3NCGfeEcjS1Uit1PUNStbjf3l0znb+8dIdGXVPwjPwjJa9GZRiyT41CE6tYb/DS8SL X-Received: by 2002:aa7:cd84:0:b0:43c:532b:65e9 with SMTP id x4-20020aa7cd84000000b0043c532b65e9mr4848936edv.330.1660331001716; Fri, 12 Aug 2022 12:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660331001; cv=none; d=google.com; s=arc-20160816; b=clhYgA6ROawx9HZdkCnGIp11YF+m3vH5oiPbLAhVy07m+TpZoGckAE+Edp8tcgUDox imN7Udv5e0CogYdv7JcRsJmYIBDLF+mOE8swcmx3iiQd0vHSfOjuALLbliFJcnOR5EF5 AHf2U4p+VvNkRmfmVFNHlMC0fUnpwV7/WJ5cMM4IMKtCkivremH4o+fYcIEXeGv6E8sS kcUVi3aVJD+0o585aS+UxvdYh7dh7QeeQmh2QzZVNIn5Rke2GmJ0ynzTAkF84wR1cDtf SIzlLkXMhHSKuW9IH3hAl7LtP8equS0CexVt2my2b/fYFvuhphJIEH8vMU5opZxnC+wE AZAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature :wdcironportexception:ironport-sdr:ironport-sdr:dkim-signature; bh=UT5ATbo8x4RWCgC3TeaNJnMcezDktOTeEPakVEslV34=; b=Yv0NVskjeL+TbYuCHzRAmwXQMyQX3tFxjItkHh4Cp6tjVrUnc75zGpJu9YVpEAGJ1R 07JIs3cJchoJUnOViJh9FecJ2uESNL4Rnd1sPuH+9oOPkPCnpu3+HQoRhi85b0T8TUnM CfEQJLw87saqT8f+QQWCuXOPGZYm1tBBw9HwGmHsRSHMcPmruAAIJAkj+t3cotL/YiNs +tFaCwS/1q+Iq5/5II2MaL4UMkNIpwLGEApZgqt2Z0kk9eJlEIS6AsQCJn7KVOly/4/+ osnBybWAxpD1IB83Banq9xnaEKpUX/VvmUapv48jNLweKz8miYu5ZtZFA10sMaSCaF/z Xd4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=XR2BA6YI; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b="iP/Efqdd"; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g3-20020a1709065d0300b00732faab2567si2809698ejt.290.2022.08.12.12.02.49; Fri, 12 Aug 2022 12:03:21 -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; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=XR2BA6YI; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b="iP/Efqdd"; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238927AbiHLSYf (ORCPT + 99 others); Fri, 12 Aug 2022 14:24:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230105AbiHLSYc (ORCPT ); Fri, 12 Aug 2022 14:24:32 -0400 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F4151B2DA7 for ; Fri, 12 Aug 2022 11:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1660328669; x=1691864669; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=mEcxvF4PsnkvmosCiuHJl4/pNrL0uzzasoDTrheGJ/k=; b=XR2BA6YILmYFSbsV76qrG/z91ZvcecLAogLd188ZaMNtt6WxIv44tnBa X0yL42tdLPsf1qpJH7QRsBQlB/l496OQ5JoMVjZ5BLWvR/5amx5uAVbVp VWFJwU6X9m637i9p4jYjONc/K8HIkZB5C2Yp7FIT7vFbVAyUR59pMRV5i kiznIVmhGQ7DGicXQrdvLcGLDkXYDU+kYQ3Tn7VANqCaAIBS4yuyZVreH uwsFOfjcLOSH9r4JuSQCyEisylgGycb4Gc2DXc04S9WG+o19dkh6UYanh PxLelkPalE5HkBq+LKwXmaVaYnMbm5AtaJgSL8xSpyCFcM+/b+U+xoZ/f w==; X-IronPort-AV: E=Sophos;i="5.93,233,1654531200"; d="scan'208";a="213615035" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 13 Aug 2022 02:24:28 +0800 IronPort-SDR: PGlkCOeqdsEV8eTKuZm6nJsrEdlrWyEdQo+rhd01GI4X6HrJqu4d/sVIPlhSYrL9xMoJVR3vl9 MiiMOHBnPLjjw4fVMPY/AtTyxLjkPqshwvhXzorTZD7em72sM1Y6OEnx5T5GNowxbxo3rzq4HT K2DPXP6EALWtkOX/0B8xPaGCiVgNZk4nCewPXeMVDDkJTMG6rf/QPWLldx9vT7rOZt87/vX2Gw E15Jlu5KzPXoqfb+P5RLZf0zO2uQf2uRhl6Fld6VBSCCXWZC/lgWl3o78k1jRZfcGmKAFGctCj npppuSIkPe/hChN++SHvcQkI Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 12 Aug 2022 10:45:21 -0700 IronPort-SDR: ijtl1BG7mi4g/osYBxkWCrdopBJ1syjXQjO/3TwnreFETBbzzjdW050z1AVatiSdqFqJ2GT78O Lbid/LBive523M8dqRFN74JqB96BbMkdBYNOpsViXSTOOSb6y3FSW0zJiWHWzQPVZFVHcmOPjz aPyEKRbFj5DPmc5GQcRhlsngUXXVWnqWcrgHvCvBgGHNHtNEHXyXt3pM4ejKYSPve5scBJ9DzU k4a5FljQhodTIR6CIvolu3kgKql7Ip3I6/FJBu/ycUPL6HRCFofF8o3aFhQqL1EnaBRvtpmaAZ n7c= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 12 Aug 2022 11:24:29 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4M4BsS5MKtz1Rwnx for ; Fri, 12 Aug 2022 11:24:28 -0700 (PDT) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1660328668; x=1662920669; bh=mEcxvF4PsnkvmosCiuHJl4/pNrL0uzzasoD TrheGJ/k=; b=iP/EfqddkoWeEahQTsLpHPlzd+/jopWhRUQrhVcvSfdkGEZkjZv p8W5DE5SEr5Sc9CDw6F5JzwqeE1ZRgcTRkL5lmAgBf1ueU1BqD5YSIYIaVgHiy1g 41QpId638ZpOgD25N9pyAssz+lbo0k6plOW9qcIwJ6poTGSqlx+icb6LqKP/KeMa MLgL8GL0wZ6SlidrjZP7jQOJBKZhozz7f1LdLeYN/QoXgOvjHnCygL/jsvX8lxiz OvSrFacww4a53apercLfEqTT1nSMa9erpw2CEqzsT+y1d/2HiTKmFX+GjxEMSi06 w3autX2M8m9ypNuPBny8vcUkbQlEQdKaDDw== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fabyOcYwwmsD for ; Fri, 12 Aug 2022 11:24:28 -0700 (PDT) Received: from [10.225.89.57] (cnd1221sqt.ad.shared [10.225.89.57]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4M4BsR2yDxz1RtVk; Fri, 12 Aug 2022 11:24:27 -0700 (PDT) Message-ID: Date: Fri, 12 Aug 2022 11:24:26 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 0/6] libsas and drivers: NCQ error handling Content-Language: en-US To: John Garry , jejb@linux.ibm.com, martin.petersen@oracle.com, jinpu.wang@cloud.ionos.com, yangxingui@huawei.com, chenxiang66@hisilicon.com, hare@suse.de Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <1658489049-232850-1-git-send-email-john.garry@huawei.com> <437abe43-7ddd-6f49-9386-d8ed04c659bf@huawei.com> <15bfd5e0-7fcd-fdee-a546-7720b55eb108@opensource.wdc.com> <34bdd9a8-26bf-95b0-ed62-a6af5db05654@huawei.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <34bdd9a8-26bf-95b0-ed62-a6af5db05654@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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/08/12 9:33, John Garry wrote: > On 12/08/2022 16:39, Damien Le Moal wrote: >>> For this specific test we don't seem to run a hardreset after the >>> autopsy, but we do seem to be getting an NCQ error. That's interesting. >>> >>> We have noticed this scenario for hisi_sas NCQ error, whereby the >>> autopsy decided a reset is not required or useful, such as a medium >>> error. Anyway the pm8001 driver relies on the reset being run always for >>> the NCQ error. So I am thinking of tweaking sas_ata_link_abort() as follows: >>> >>> void sas_ata_link_abort(struct domain_device *device) >>> { >>> struct ata_port *ap = device->sata_dev.ap; >>> struct ata_link *link = &ap->link; >>> >>> link->eh_info.err_mask |= AC_ERR_DEV; >>> + link->eh_info.action |= ATA_EH_RESET; >>> ata_link_abort(link); >>> } >>> >>> This should force a reset. >> This is an unaligned write to a sequential write required zone on SMR. So >> definitely not worth a reset. Forcing hard resetting the link for such error is >> an overkill. I think it is better to let ata_link_abort() -> ... -> scsi & ata >> EH decide on the disposition. > > Do you know if this triggered the pm8001 IO_XFER_ERROR_ABORTED_NCQ_MODE > error? > > If I do not set ATA_EH_RESET then I need to trust that libata will > always decide to do the reset for pm8001 IO_XFER_ERROR_ABORTED_NCQ_MODE > error. That is because it is in the reset that I send the pm8001 "abort > all" command - I could not find a better place for it. Not sure what error it was. Will need to add a print of it to check. Easy to do. > >> >> Note that patch 3 did not apply cleanly to the current Linus tree. So a rebase >> for the series is needed. >> > > That might be just git am, which always seems temperamental. The patches > still apply from cherry-pick'ing for me. Anyway, I'll send a new version > next week. Yes, it was a "bad ancestor" thing. Direct patching worked just fine. > > Thanks, > John > -- Damien Le Moal Western Digital Research