Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1768943pxb; Wed, 9 Feb 2022 04:12:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxr7HrglPgy0wT8F68T81lUzDcXTN6WCfT1s8Lq+9AuUZT3UtTUEDaMeW6YMUqmzNdjFWBH X-Received: by 2002:a17:902:6502:: with SMTP id b2mr2073960plk.43.1644408737668; Wed, 09 Feb 2022 04:12:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644408737; cv=none; d=google.com; s=arc-20160816; b=HPAgbrxyO4kXLxlvmpvJ/XJMrthu+4J0K88kQBp7b1UDhVcPBd1eV+Evy+lJUo7Hwd Xp0K0MlHZK+vx1sO8RFuwj5LlYlmOfgYLzGjSzrkICmJjDPjMNl1jehzUYlsjoypouYf xQpz8k8b1AFIJyvHHiJVMRavElGkNWVXoD05UPyrNE/kViLRJ+wlsnfC1tm5gHG6+C2w 6yp9xJHLIlXg75FA0RjEMkrbEN0WnFaQS7L+hJxJ7caBbdKqZAF4aqR/NQ1HbW14sF7t rFnuNBSl0VmBGotRgbEYYAaLWOUqO1ZhItg+y4EDFqvuWkdffAVuxVSx0HOabNVSBWPo 9O2Q== 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:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=35GoNXlW425DLhyVXQtwJ+Um+ux/Ykq6BIiBxu8vPzg=; b=mE5inpXrEQvSfyGGPfG6oIfKTBICjKsLz3dae6/7TLh+iRJV8o/ZovKqvV7Fx4Cawg mFcfszSRPjRRFceetEmCmDCID5Q6ddK8aj7RX4c5Z+iKZwgyd6TQpWfLzEEIVEGENDL9 uC+7ha2C7EPBwxo/9/+kn7WvpiszQEL1578aSpZ6vAB6Vyb8KE7zXIbGic63sXVTQKb9 xW58oJpuf4se26xpgBtgqMq/PywU/DRns1PbSmf4bogwUCxlsNTftI5d3+hcTSjEx8Vk j+oJF+xBGI1JYyn6FytfV1nuVJcK/BJaLcfrE9RzWkmlVUfTywgMhnHtliPaK8fp+Hbo 1gRg== 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:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 16si6416048pfm.155.2022.02.09.04.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 04:12:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 99641E08711E; Wed, 9 Feb 2022 02:09:48 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377992AbiBGNNM (ORCPT + 99 others); Mon, 7 Feb 2022 08:13:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444387AbiBGNJ7 (ORCPT ); Mon, 7 Feb 2022 08:09:59 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFD8DC043181 for ; Mon, 7 Feb 2022 05:09:57 -0800 (PST) Received: from fraeml702-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Jsmbj5fqSz6GCbt; Mon, 7 Feb 2022 21:05:53 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml702-chm.china.huawei.com (10.206.15.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.21; Mon, 7 Feb 2022 14:09:55 +0100 Received: from [10.47.86.164] (10.47.86.164) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Mon, 7 Feb 2022 13:09:48 +0000 Message-ID: <1114e27f-e6b3-e9b9-a892-f543f4636c4e@huawei.com> Date: Mon, 7 Feb 2022 13:09:43 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH 00/16] scsi: libsas and users: Factor out LLDD TMF code To: Damien Le Moal , , , , , , CC: , , , , , , References: <1643110372-85470-1-git-send-email-john.garry@huawei.com> <1893d9ef-042b-af3b-74ea-dd4d0210c493@opensource.wdc.com> <14df160f-c0f2-cc9f-56d4-8eda67969e0b@huawei.com> <49da4d80-5cc3-35c3-ccaa-6def8165eb65@huawei.com> <59a198a8-1d87-bc09-d2d8-2d495ed74c16@opensource.wdc.com> <098f988e-1f12-c412-3111-60393dfe0f0b@huawei.com> <62e56609-7026-93a1-a446-a6fd68328653@opensource.wdc.com> From: John Garry In-Reply-To: <62e56609-7026-93a1-a446-a6fd68328653@opensource.wdc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.86.164] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Damien, On 04/02/2022 03:02, Damien Le Moal wrote: > This is the submission path, not completion. The code is: > > (gdb) list *(pm8001_queue_command+0x842) > 0x3d42 is in pm8001_queue_command (drivers/scsi/pm8001/pm8001_sas.c:491). > 486 atomic_dec(&pm8001_dev->running_req); > 487 goto err_out_tag; > 488 } > 489 /* TODO: select normal or high priority */ > 490 spin_lock(&t->task_state_lock); > 491 t->task_state_flags |= SAS_TASK_AT_INITIATOR; > 492 spin_unlock(&t->task_state_lock); > 493 } while (0); > 494 rc = 0; > 495 goto out_done; > > So the task is already completed when the submission path tries to set > the state flag ? Debugging... JFYI, I am putting together a patch to drop SAS_TASK_AT_INITIATOR altogether. I just need to ensure that the logic in the isci code is correct. Thanks, John