Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp587032lqi; Thu, 7 Mar 2024 06:17:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVyw/eiunw+0uMAIs2SYhV3ApVC+KF7CL/QioGwCW9duxOqit4D1jhpPWx1SfcwifCX92kmYLFi5YKrnJMtDjmbptqKXUCOpkYkJdVdZw== X-Google-Smtp-Source: AGHT+IH7uHaJ3vUdPhRgNEdNdwNGEV06Hx2vIugryvupipzdztACtaoMmNhDdtcSUouaX0UlDnVb X-Received: by 2002:ac8:574d:0:b0:42f:2066:ef53 with SMTP id 13-20020ac8574d000000b0042f2066ef53mr913872qtx.0.1709821061354; Thu, 07 Mar 2024 06:17:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709821061; cv=pass; d=google.com; s=arc-20160816; b=FknEV3MazAkgXqwOi2UtZSJjhLlX7x83INIuMVtMEHs+bjiVUX7DMXxa8qq/2cOZzj 8ejnE8V4S4Cdcf6XDf6DxVyADKr/Yre5NlPQFv0n84/jIxUsePOq9jcoyXwdJOL/Hm41 T6XECAwcaXoGDTS954AVcpVRMZNzCggN5geDs85RzZCqjk285c5b78Jf8uF6yCNlvJWt wvbfibA3eYM3mL2vpusRLYvdGKkFfZggwYslG97ZJeC35i4EGYnsuRT6actgVtG+adkr 7F0ilLby5zFs2WgTP7WA7/5ArKhcPE7x7RVSUhsKHSAmoJmmR72/EUSQsqzJF/c6t3Vo 2leg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=FThogVOHuZKVK1wXx/xZ3OODzk5pnQZ/5s0UfI3eJ1U=; fh=bL8G/t/fAy0O+IRRnRyEuNf+4P0AsaEYRJUOguDAI5g=; b=Yge8uXGvz3VI49SjXUAmpTCeo1A8DfUIuzA5FjPChI9S12bbjJuE+nnfsOejAg9L4N h2HRpn8XSzBI3axxJdT8k7hqlykuYsEIuCGmuGjhtW/DyFboFNzlLJsuFXIuk2X1KtVL 3zmjGT/iRqEN2wDKoqU/RNOZBIAaRVaa5U8shMRg3wbOQQVH8MXGUhVxL9oxfxeGxxE6 w/I7YuWm50RGICmTk9LnHitAsDWlnR/jOMgLQTUx9D9G+jhTRHOyWvYojCLoMlvjF2uo R0YoUKKrnAzkl5JSJHQ9B6Ekd+WgotczITKTCWtSttPd7XBeUPMa2UWirnE0+fuizE82 ylig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-95713-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95713-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id fv23-20020a05622a4a1700b0042ef542225esi9659396qtb.504.2024.03.07.06.17.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 06:17:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95713-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-95713-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95713-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1AEB21C23EC9 for ; Thu, 7 Mar 2024 14:17:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE43212DD9D; Thu, 7 Mar 2024 14:17:34 +0000 (UTC) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A68351D699; Thu, 7 Mar 2024 14:17:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709821054; cv=none; b=L1bo+EfCTH/joU8jlCf5KbOtAMQECHxTPYtUtpKEqd6/sMD06vTqa7BB3XMSQlp6LEPYK5XKOBlm8BgozypFdznDkr/E9rmekUvdDUADt9OJxuEnqT8TlArF7GP8xgtwGZ33JXEixNRi3m7CvR75+T79RERUi+uABk9BIfORg+g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709821054; c=relaxed/simple; bh=S+Lk8cgQNJ1J514ZKuPD0P9IeeMhDUgmPT9fj7UAJDQ=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=AcYRNd4PjZ5EOEr0+/Z0dSgh41qmPbuIjzjgqVbZYvDv4Kt8lHWHBY3D/BWv5XQOR+F9ShPQmmalSPCsNcKGb3ZFcMz2c0jnNkbMtN9oIHEGZVrbLy0r9WFSEwhzJJn99G2Pi8MTLb1Ht9Aozi1J8I8275P0t1SGR9osPaPI3zY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4TrBD72hn8z1xnfc; Thu, 7 Mar 2024 22:15:51 +0800 (CST) Received: from dggpemd100001.china.huawei.com (unknown [7.185.36.94]) by mail.maildlp.com (Postfix) with ESMTPS id 564E5140336; Thu, 7 Mar 2024 22:17:30 +0800 (CST) Received: from [10.67.120.108] (10.67.120.108) by dggpemd100001.china.huawei.com (7.185.36.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Thu, 7 Mar 2024 22:17:30 +0800 Message-ID: <20979c45-fd36-cc52-8ed1-33750ce68333@huawei.com> Date: Thu, 7 Mar 2024 22:17:29 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH v3 3/3] scsi: libsas: Fix disk not being scanned in after being removed Content-Language: en-CA To: John Garry , , , , CC: , , , , , References: <20240307093733.41222-1-yangxingui@huawei.com> <20240307093733.41222-4-yangxingui@huawei.com> From: yangxingui In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggpemm100005.china.huawei.com (7.185.36.231) To dggpemd100001.china.huawei.com (7.185.36.94) Hi John, On 2024/3/7 18:08, John Garry wrote: > On 07/03/2024 09:37, Xingui Yang wrote: >> As of commit d8649fc1c5e4 ("scsi: libsas: Do discovery on empty PHY to >> update PHY info"), do discovery will send a new SMP_DISCOVER and update >> phy->phy_change_count. We found that if the disk is reconnected and phy >> change_count changes at this time, the disk scanning process will not be >> triggered. >> >> Therefore, call sas_set_ex_phy() to update the PHY info with the >> results of >> the last query. And because the previous phy info will be used when >> calling >> sas_unregister_devs_sas_addr(), sas_unregister_devs_sas_addr() should be >> called before sas_set_ex_phy(). >> >> Fixes: d8649fc1c5e4 ("scsi: libsas: Do discovery on empty PHY to >> update PHY info") >> Signed-off-by: Xingui Yang > > I am also ok with a change to revert to allocating the resp memory with > alloc_smp_resp(), but make the changes neat please: > Reviewed-by: John Garry > . Thanks for your review, I have updated the version. Thanks, Xingui