Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp585982lqi; Thu, 7 Mar 2024 06:16:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVa8xvo079NTlB+cg488Ur1DToTJTe5wGlkZVfoprt/qGypyjDcl4y9PfxHVGRt6AFwR7pgUv3VGrNdAAQKIsyk04m7mCKo0JPkiYcMzQ== X-Google-Smtp-Source: AGHT+IE+HLxKIPYfnr3eX9f/+lMae8R0mWLGFL5j/NNjG9a0TG5Ufb75aGaFlSWmBrmRD90wTzq8 X-Received: by 2002:a05:6e02:1ca5:b0:365:b8f9:6a36 with SMTP id x5-20020a056e021ca500b00365b8f96a36mr19747120ill.32.1709820972775; Thu, 07 Mar 2024 06:16:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709820972; cv=pass; d=google.com; s=arc-20160816; b=DDB+i2jiqArSvpASV+ZT5yeFdAJ4DSfFCzrysxxkE1HsAhcrsUIUJP9rL1SAszvUfp 4qRjI5YSBjN/J0pO/2TVvXS1nO9DlJcXheM98/bRYxVdkqXs472izMbbtPJLsr2SrcgQ nqDzcCBNDIv0Qi5mdv6wCAxi1hg0d+2AGhIjB0zxJVxtLjo5iidU1nP3ZcskT13h6jB1 JqfjEhYHgTY4brmmiMkMBtY0ZG+/gihF32SYhuwaSZ+tc+rDrV4JzjzEDYJ4CGGvTzQP 4ayA00P9D0BX8hOikdI9HjgG4Jt+N29lMu/GRRk94+y+DoPzSBikd8HXysxr4QHKX1xi Xung== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from; bh=3SfUod7NJkmELAjbIKu7mrY+jw1FvWSHZ/PMRdmzLbE=; fh=PKov2v7mtZqWrG2ToL14QCqscLF6oofVifdomTnOWI8=; b=cfIiIzGhRtkxHiFiDZHaiSjoaPrwiH4y7J6VF9jiVhxa6JQn6+s5bLGDu/B42nAwP+ X9Es1q06eRov+/ubwpkxXbMuId6RyNV9QzHKDYQVRmMTIEjg1mH4ZWmqEMN5kvF8wp4e FAzBGMBZWkKqucJfj0hFmAe3gY20zOH/42cYr5tRp5XlDpAuHSBSoHqsFB3DmhSnPLGy xl5MQ20k74ZlI4H8am2Eevx5dDHlMwdTMMM14Rotwmzi6geP+r/XvkB2BCDpsQFjGvqH CdSTaeqkKakwktyXYzuUAEL4dyiNobnPAb6BEPxd7BP6Rs1m5Q9mW6gUGbJMacF01zJf iBNQ==; 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-95710-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95710-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s16-20020a92cbd0000000b0036577000483si5382094ilq.166.2024.03.07.06.16.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 06:16:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95710-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; 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-95710-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95710-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id F2D7B283DF8 for ; Thu, 7 Mar 2024 14:16:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C1C0F12E1EC; Thu, 7 Mar 2024 14:15:54 +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 7282E12D773; Thu, 7 Mar 2024 14:15:52 +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=1709820954; cv=none; b=J4LR3/LAXjzj/OTjN+uFvBubnGWLCHEjD+0wh3zLIk1BhFZJdsNq4DRCgGXxvJUDVZ50OSme6fty42QZhxNgn852C/BK4ZOSr1+Y7T2NH2POqsfUIGa69KAyYB+n3Lu849PAgfpFEeYEVIWqNicz1Isb6z+oGQ8HyVz+R5tQb4k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709820954; c=relaxed/simple; bh=iGKpp0d8z1mVCzIfV5+9TMt2PLt5T167/2ptn0oeSbo=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=PJi0WzOBcT4UZVVbmLtRagrLGox4KpIAQI/jvoccfC8Ut9qHEJb4wwZC4BrcdISI7ovF2cnGJObZrf5Wd8wF0F+nlkgAC1Uw9ghUy6vB30fCBuHgyezu35bkgDDuogDIdHc8SAi/QK5rH3LomTsswktMi7DBsVtAGhbJdjYYAxs= 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.214]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4TrB9L2Qtpz2BfYp; Thu, 7 Mar 2024 22:13:26 +0800 (CST) Received: from dggpemd100001.china.huawei.com (unknown [7.185.36.94]) by mail.maildlp.com (Postfix) with ESMTPS id 7B2EC1A016C; Thu, 7 Mar 2024 22:15:48 +0800 (CST) Received: from localhost.localdomain (10.50.165.33) 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:15:48 +0800 From: Xingui Yang To: , , , , CC: , , , , , Subject: [PATCH v4 0/2] scsi: libsas: Fix disk not being scanned in after being removed Date: Thu, 7 Mar 2024 14:14:11 +0000 Message-ID: <20240307141413.48049-1-yangxingui@huawei.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemd100001.china.huawei.com (7.185.36.94) This patch series fixes an issue when do discovery on an empty PHY to update PHY info after device unregister could cause newly connected device to not be scanned. Changes since v3: - Revert to allocating the resp memory with alloc_smp_resp(). - Optimize goto statement. Changes since v2: - Based on John's suggestion, allow smp_execute_task() arguments to be on the stack. - Based on John's suggestion, add a helper sas_get_sas_addr_and_dev_type. - Updated comments. Changes since v1: - Use sas_get_phy_discover() instead of sas_get_phy_attached_dev() in sas_rediscover_dev() and use disc_resp to update phy info. Xingui Yang (2): scsi: libsas: Add a helper sas_get_sas_addr_and_dev_type() scsi: libsas: Fix disk not being scanned in after being removed drivers/scsi/libsas/sas_expander.c | 51 ++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 17 deletions(-) -- 2.17.1