Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2146883pxb; Sun, 30 Jan 2022 06:34:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzWriwjABiaf/0vTI4L9EWa7guWFqSQJ+xpvuBlUY+cbWclKJHYRgdHYkooJE8BxLjCy6l/ X-Received: by 2002:a17:90a:f89:: with SMTP id 9mr29464932pjz.138.1643553272096; Sun, 30 Jan 2022 06:34:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643553272; cv=none; d=google.com; s=arc-20160816; b=CzkZPh6t2520PyP1l/jLmFya8BQpkXVtfcSq6cb7O5lnGsZwnPMbtEw+xHOJT4HSK0 wPb0gg69zdxGEH1hxo6t63bSWm27Mtkqiq+i5+qulfvcLfubcUIIqM/qhy0M4q+WD/Ui tiTLdF21TPVVMFI9CT27EMCtL9gPhvrStJSdI9f9cK5h8NFulp5bngafbbuaM/PxunnZ i3qtfZr1U3ZbMbaNELm89i0mu/jARzSCjAy6uFOHmolHPIjt9qMdfGaZZNyNjxGJaFMI 5nsw59/I4rniqOoZJzXGG3vfxgkr3c4CiF+bUgNGfvs3iT3q25ZNgkWepqOXwAUNYLe6 5S4g== 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 :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=yrDjt4UDaGWXV9rdfztURGBtuUQWkoa0goAKICwtJ6w=; b=tGDzUXd150c99XsyCuyJouSOYRLch4cNg4woiC0mgLVh32KEtIW5bV6lOyRiXJQI6d ENO0q7orSd5l7gscPh8+nQyft7kPo46L4678gD3UTk5kmcJJlRS1vOGfVyRrvem/PpkY 7UHcCQsA8ZnIzh+KfBdg68wpo3FU4MfJ1sKetmRKnRnEbPWzbcNow5HA3Kh5vFxvUkSa jmhF6kTGUv0uafxwX4bBgQnkRjZtgi1n4U/V3uHPgrFgUfAwxeFtMU9EuI98K7CdEYQf tKawWkR7C8XS2uk2ynpRxWjt1u8tviUUGj1geaQJGDPxBamZmaqqN8ZFzG5tqn6vuMPs 1Kiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g191si11152346pgc.494.2022.01.30.06.33.54; Sun, 30 Jan 2022 06:34:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347158AbiA1IG1 (ORCPT + 99 others); Fri, 28 Jan 2022 03:06:27 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:30317 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237542AbiA1IGZ (ORCPT ); Fri, 28 Jan 2022 03:06:25 -0500 Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4JlVPl04PVzbk7m; Fri, 28 Jan 2022 16:05:31 +0800 (CST) Received: from [10.40.193.166] (10.40.193.166) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.21; Fri, 28 Jan 2022 16:06:22 +0800 Subject: Re: [PATCH 06/16] scsi: libsas: Add sas_task.tmf To: John Garry , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "artur.paszkiewicz@intel.com" , "jinpu.wang@cloud.ionos.com" , "Ajish.Koshy@microchip.com" References: <1643110372-85470-1-git-send-email-john.garry@huawei.com> <1643110372-85470-7-git-send-email-john.garry@huawei.com> <6b31c696-9808-764b-489b-4d2de91051b9@huawei.com> CC: yanaijie , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-scsi@vger.kernel.org" , Linuxarm , "liuqi (BA)" , "Viswas.G@microchip.com" , "damien.lemoal@opensource.wdc.com" From: "chenxiang (M)" Message-ID: Date: Fri, 28 Jan 2022 16:06:22 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <6b31c696-9808-764b-489b-4d2de91051b9@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.40.193.166] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2022/1/28 0:01, John Garry 写道: > On 27/01/2022 12:55, chenxiang (M) wrote: >>> - slot->tmf = tmf; >>> - slot->is_internal = tmf; >> In kernel 5.17-rc1(with above two lines on), it seems there is a issue >> for ata disk reset command as tmf = null while it is internal command. > > ok, thanks for the notice. Would this fix it: Yes, it should fix it, and i just notice that it seems solve the issue in the last patch of this patchset (including this fix in the last patch). > > diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c > b/drivers/scsi/hisi_sas/hisi_sas_main.c > index a05ec7aece5a..0e12c9329ee5 100644 > --- a/drivers/scsi/hisi_sas/hisi_sas_main.c > +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c > @@ -427,8 +427,6 @@ void hisi_sas_task_deliver(struct hisi_hba *hisi_hba, > cmd_hdr_base = hisi_hba->cmd_hdr[dlvry_queue]; > slot->cmd_hdr = &cmd_hdr_base[dlvry_queue_slot]; > > - slot->tmf = tmf; > - slot->is_internal = tmf; > task->lldd_task = slot; > > memset(slot->cmd_hdr, 0, sizeof(struct hisi_sas_cmd_hdr)); > @@ -1380,12 +1378,13 @@ static int hisi_sas_softreset_ata_disk(struct > domain_device *device) > struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); > struct device *dev = hisi_hba->dev; > int s = sizeof(struct host_to_dev_fis); > + struct hisi_sas_tmf_task tmf = {}; > > ata_for_each_link(link, ap, EDGE) { > int pmp = sata_srst_pmp(link); > > hisi_sas_fill_ata_reset_cmd(link->device, 1, pmp, fis); > - rc = hisi_sas_exec_internal_tmf_task(device, fis, s, NULL); > + rc = hisi_sas_exec_internal_tmf_task(device, fis, s, &tmf); > if (rc != TMF_RESP_FUNC_COMPLETE) > break; > } > @@ -1396,7 +1395,7 @@ static int hisi_sas_softreset_ata_disk(struct > domain_device *device) > > hisi_sas_fill_ata_reset_cmd(link->device, 0, pmp, fis); > rc = hisi_sas_exec_internal_tmf_task(device, fis, > - s, NULL); > + s, &tmf); > if (rc != TMF_RESP_FUNC_COMPLETE) > dev_err(dev, "ata disk %016llx de-reset failed\n", > SAS_ADDR(device->sas_addr)); > >> >>> task->lldd_task = slot; > > > > . >