Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4553004rdh; Wed, 29 Nov 2023 04:55:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmgvEbU9tDaX8P5nD+oFUTkLBFzPWpYZonUS7NARSsZqsUTk8VJ0dcvWDlvWZKLf/pZMTt X-Received: by 2002:a05:6808:17a6:b0:3b8:33e2:1745 with SMTP id bg38-20020a05680817a600b003b833e21745mr18025132oib.7.1701262513979; Wed, 29 Nov 2023 04:55:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701262513; cv=pass; d=google.com; s=arc-20160816; b=HczfLWwuRKr43JbT7jdwB7pHclJHYesjdJxI6cMRSPeeR2rVyACdTjg8wZkKdLjcUh prMdt+hxuqnXbVl4FsLE7Xf5XEa3lrGOkZCpOCLYoJ/Lrbzk7fprEWPnHvXmzkAAHGoP gAIkq+E1kom649Xl6eyW9vcFNEpZKdTMmSTbtZV4bYpYC6A6qdW0DxS48dszNYOYEtIw Qs6j/GUOcKQxPKJhlgQ/NmCbjHS8CxRUPAT5cnzv97QCcD0rbgHk6bZ97TihXdDl07l6 PlWMauhQk0F8cYOfYqMn7WFqfVRiVi/fd3UtXWL5CgGsnb6JVcJQp61JmfhdMVGLAV+i 0n8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:organization:from:content-language:references:cc:to :subject:user-agent:date:message-id:dkim-signature:dkim-signature; bh=BiMqrwaN1L/MpFqQ86i3RfCnOsiXyhvsXsGMoXEHn4Y=; fh=x1+Olls3EYNWgqETpD9ZVeno/9pTEeqknrf+dYzxXBY=; b=HrEeJ26AeVhssj4zCAZRHo5Isjxg9HcWwalQ++aLTOwO0+FpjEbTFURkiMetebGwAf SkAVKuIIEhUdGA3nUlnEUEy77/Plry8KiV1ILJ45X6WsDuVlai41d7xQzNMghNT2EUyK HXzYScImRFD/5q8GV/Wvs8MCJxhj3V/vkT2Zv7HzH62QhRzedPFXhDCCg6KX32/PuXYJ DhLg6aiqtBz0ggn9Mo5M1/cmQJEx6xDTNtcmiL6D+du/IG86udkICNUrOilxWq5Cv9kD w0O9oFiQ/tA/81bLibRyOfl1eBz++kXMFd8KUvFZZNeq/a/qXizycXNcexCjlqnOqQSL mN6A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=eJyFIXJq; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=piZ8dQcT; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e14-20020a056a001a8e00b006cbe6618e79si14958151pfv.297.2023.11.29.04.55.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 04:55:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=eJyFIXJq; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=piZ8dQcT; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E4F418031AF9; Wed, 29 Nov 2023 04:55:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231883AbjK2My4 (ORCPT + 99 others); Wed, 29 Nov 2023 07:54:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233332AbjK2Myy (ORCPT ); Wed, 29 Nov 2023 07:54:54 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1B3810D4; Wed, 29 Nov 2023 04:55:00 -0800 (PST) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3ATCi7Vu014718; Wed, 29 Nov 2023 12:54:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=BiMqrwaN1L/MpFqQ86i3RfCnOsiXyhvsXsGMoXEHn4Y=; b=eJyFIXJqipNE+2knII4hLqvNvPClRrTjvy1/HZxxypWg4opjeqyNPKWK8jxOJzP/Z+4E S9T2VgPr5XJxNW95etw6hR5PvrnO0XJyLdQ1lv5VrYzikB7D7HoHRIrjvIfTZ17XrT/h kXU54s6d6R4a7DEWtp6xhByJkN2e3KRVWbXnqM2r2pJ9SwbCm5yac14gr99RaNE6Lnty Lpbd1y/TZHpgLZiYRGEiN9IWk2PFSmwEJ0PJWQXmXkVSoXo7JYCBWKCK5QsVtw+roIro B9YPmgh//OTnoLo8C0JZHK3vxLZUSFl6K78cuRt3ZUP6edLfShgN/sYyzbClkaXKGYmT Lg== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3unv9499rj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 Nov 2023 12:54:40 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3ATBHQK6012787; Wed, 29 Nov 2023 12:54:39 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uk7c8t0cn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 Nov 2023 12:54:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YQlPVOT9A6joAlJoCiV9nWaKEj323dFiXTIC/lhm/f6KIvcyFE9ENOCDaUV4KhTI4PAagXOIjvIv+X/EU5Nxz0gWWtEeCvA2Gu08Beb5/zexBOOrScKwqW+TpcjGWYrEO6jFoZLQMhycVY/LCmKQ9W0Rk6f7tTirQp+qRa3nUOkwPX16kLtxqHuh0UhuGxr9tkaPPWIAFITtgYjslwQ4bkIFKzGC9+o6wEjBoa/V1jhJYTW4pwCb9zBfyd2OWG3mchNbDaUH8vvP5Ryfl1AMaCqZ3BIVW2DOcglHEZB160Q4+wilNIuf6s6g8G7e/y20Y0U9NaRB0Theahz1g+K0Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BiMqrwaN1L/MpFqQ86i3RfCnOsiXyhvsXsGMoXEHn4Y=; b=CKnGYOH6MxhNsUe74iHK3avlDTz/rBmJbvDB4SAyVl9eYRu343G4NNA4WWSlSbGRZSkwsJEdtrI5/wVNvpXfiFm9yjfSudjOtZ6MQ/PiRLhY4DoBVp7IjIsxB5KdH8i7Q72XFC3sBJq4xaGPzuqCtGz4vHY0OOW59komw0vaArYjpKdl1hrVhsEfvJip4xGaUo3lcl+vNBhAsvvh0Cm/J23M0DCQEVZoALlnhz6NQgj7fR86IrQb1OUiHGnyfkFZ73inErK9iCRSby/vuIvdBDtWMeSMqq8l/78qXbP/puqCR3+7NVfRhqBBXxACkP/vRCQFQFJfRc24FSRIlfVLfQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BiMqrwaN1L/MpFqQ86i3RfCnOsiXyhvsXsGMoXEHn4Y=; b=piZ8dQcT4zE5mOpD04bOYFGicitl2OwalSzjL8G0jldCUH+N6Ls7Tg5GwgSiIIWfNjVsEN0p+o2GrgxEruqt7JlVm/FOVlWfSEjP+ZHbRBcGLbAdgU80km7aTV7wjRY/YZyk4ONip1RuLgKG3YNiQ4ofZkB/Mf5Wp8lrSOk6Bvg= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by BN0PR10MB4997.namprd10.prod.outlook.com (2603:10b6:408:12b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.23; Wed, 29 Nov 2023 12:54:37 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::102a:f31:30c6:3187]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::102a:f31:30c6:3187%4]) with mapi id 15.20.7046.023; Wed, 29 Nov 2023 12:54:37 +0000 Message-ID: Date: Wed, 29 Nov 2023 12:54:33 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4] scsi: libsas: Fix the failure of adding phy with zero-address to port To: yangxingui , yanaijie@huawei.com, jejb@linux.ibm.com, martin.petersen@oracle.com, damien.lemoal@opensource.wdc.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, prime.zeng@hisilicon.com, kangfenglong@huawei.com, chenxiang66@hisilicon.com References: <20231117090001.35840-1-yangxingui@huawei.com> <32c42e1e-0399-4af4-a5ed-6a257e300fe8@oracle.com> <307d251f-ff49-5d8f-1f8e-aed314256732@huawei.com> Content-Language: en-US From: John Garry Organization: Oracle Corporation In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: AM0PR07CA0009.eurprd07.prod.outlook.com (2603:10a6:208:ac::22) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|BN0PR10MB4997:EE_ X-MS-Office365-Filtering-Correlation-Id: 45b2ae20-7b6a-4604-6181-08dbf0da57f0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rj3mG3HhZmmmuRZAOb46oQA09vPrLILemCEJfziBEZBfUurbse2zs1iwE1oDByMWxd5bYPJy8c8aViA43elN87auR5u/miXM14LZsnx//NG/lAJ/8bpwICzyN8pvuMKU4c3F1sORsfV8z5raLGeeKmO9sJae4eSO+75uNxjOxkTXhUf5gpLz3jLgRwcsSvfObieZ9nF0t3PENX38aa891PwKCbizUxofuGkqM17VYbfa5v9AvoBXwLkI03rCu55ExgkYz5UIkHo+wjeJAtaLiHg1J943ydEcZvIHOq84cx14L4ystAHkH7N+V6+nfTzJDKrarPCkxAnJTru5Z0+0cLlxC6U7PrairgQfUkflOCgYC3JuBtGqcpERvAYsROKVBTCRjaUI8jOYr/HPx9G++q4yXhIkfV5Yyd6KTMMmEgk94oaXo40Tg4jZnAOmo0N5GcechpbjRvdypl3Wmhe2TxERtpcOV5KAjIfkb9QAkheSGFuG1pkA+61JmUM/VJgOD/Rx+59K8NbO+IphvkkcUdrs0WlvMgNzHxIfgeL1Gmzh43idsHkOy53WGe0ia0oVmDy/Yb/FVkDPBqCnpKpxordAH1VWLGkpN2pWoffJdAQTMpb6I/hRSTovxiEOMmZ6OhKDDFrv5ebz27Gw/AnWDw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4313.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(39860400002)(366004)(376002)(346002)(396003)(230922051799003)(186009)(1800799012)(451199024)(64100799003)(36756003)(31686004)(38100700002)(2906002)(86362001)(5660300002)(31696002)(8676002)(4326008)(8936002)(7416002)(66946007)(316002)(66556008)(66476007)(6486002)(41300700001)(478600001)(6666004)(53546011)(6506007)(36916002)(6512007)(26005)(2616005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MVFLeUtlY2JNNmtFek5vUmRiSGw1WkNiRFRyTm12OHY3MkRZekxGRDVIVU5Y?= =?utf-8?B?eTdyQzd5cUk5UG8zMmFnNjRPRko5NlcvVTByS1JxcWpwSVZPUHBaemRxc2tn?= =?utf-8?B?Qk1FMlFidHhKbHUzOTZBL3p0TlUwaGloZi9I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sZ1gLca+s1p9u7x223dO3h5/yH5UYnUuj/GwFyBzmdpKV5hRWrvCK5hhDvaDUw6Y6OcOH9OmIJ3fQr4jSqqb6zruxJOAkdyfr36QbnZsRAwVxC+VktmtCQWqIFZUe65tI4UX0Ni7HFo6c3L8PJ6Xy5jlk9uNxWaQwbQ8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45b2ae20-7b6a-4604-6181-08dbf0da57f0 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2023 12:54:37.4229 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: b91NT0O5lr5TjX1mazRVM8b13zZNekidhwUPCyGazB/069KFJI4nHO/LMdp7NloJgn3SR6u6dN+c5mbSouHdbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB4997 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-29_09,2023-11-29_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 suspectscore=0 mlxscore=0 spamscore=0 adultscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311290097 X-Proofpoint-GUID: ffZzoPO3XdhWwlAr0GS40EhFBUz7K72K X-Proofpoint-ORIG-GUID: ffZzoPO3XdhWwlAr0GS40EhFBUz7K72K X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 04:55:13 -0800 (PST) On 28/11/2023 03:45, yangxingui wrote: > > On 2023/11/28 3:28, John Garry wrote: >> On 24/11/2023 02:27, yangxingui wrote: >>>> We already do this in sas_ex_join_wide_port(), right? >>> No, If the addr of ex_phy matches dev->parent, >>> sas_ex_join_wide_port() will not be called, but sas_add_parent_port() >>> will be called  as follows: >>> static int sas_ex_discover_dev(struct domain_device *dev, int phy_id) >>> { >>>          struct expander_device *ex = &dev->ex_dev; >>>          struct ex_phy *ex_phy = &ex->ex_phy[phy_id]; >>>          struct domain_device *child = NULL; >>>          int res = 0; >>> >>>      <...> >>>          /* Parent and domain coherency */ >>>          if (!dev->parent && sas_phy_match_port_addr(dev->port, >>> ex_phy)) { >>>                  sas_add_parent_port(dev, phy_id); >>>                  return 0; >>>          } >>>          if (dev->parent && sas_phy_match_dev_addr(dev->parent, >>> ex_phy)) { >>>                  sas_add_parent_port(dev, phy_id); >>>                  if (ex_phy->routing_attr == TABLE_ROUTING) >>>                          sas_configure_phy(dev, phy_id, >>> dev->port->sas_addr, 1); >>>                  return 0; >>>          } >>>      <...> >>> } >>> >>>> >>>> I am not saying that what we do now does not have a problem - I am >>>> just trying to understand what currently happens >>> >>> ok, because ex_phy->port is not set when calling >>> sas_add_parent_port(), when deleting phy from the parent wide port, >>> it is not removed from the phy_list of the parent wide port as follows: >>> static void sas_unregister_devs_sas_addr(struct domain_device *parent, >>>                                           int phy_id, bool last) >>> { >>>      <...> >>>      // Since ex_phy->port is not set, this branch will not be enter >> >> But then how does this ever work? It is because we follow path >> sas_rediscover_dev() -> sas_discover_new() -> >> sas_ex_discover_devices() -> sas_ex_discover_dev() -> >> sas_add_parent_port(), and not sas_rediscover_dev() -> >> sas_discover_new() -> sas_ex_join_wide_port()? If so, is that because >> ephy->sas_attached_phy == 0 in sas_discover_new() -> >> sas_ex_join_wide_port() and it fails? >> >> BTW, about something mentioned earlier - adding the phy19 with SAS_ADDR > > Yes, > For phy19, when the phy is attached and added to the parent wide port, > the path is: > sas_rediscover() >     ->sas_discover_new() >         ->sas_ex_discover_devices() >             ->sas_ex_discover_dev() >                 -> sas_add_parent_port(). ok, so then the change to set ex_phy->port = ex->parent_port looks ok. Maybe we can put this in a helper with the sas_port_add_phy() call, as it is duplicated in sas_ex_join_wide_port() Do we also need to set ex_phy->phy_state (like sas_ex_join_wide_port())? > And the path called when it is removed from parent wide port is: > sas_rediscover() >     ->sas_unregister_devs_sas_addr() // The sas address of phy19 > becomes 0. Since ex_phy->port is NULL, phy19 is not removed from the > parent wide port's phy_list. > > For phy0, it is connected to a new sata device. > sas_rediscover() >     ->sas_discover_new()->sas_ex_phy_discover() >                             ->sas_ex_phy_discover_helper() >                                 ->sas_set_ex_phy() // The device type > is stp. Since the linkrate is 5 and less than 1.5G, sas_address is set > to 0. Then when we get the proper linkrate later, will we then rediscover and set the proper SAS address? I am just wondering if this change is really required? BTW, Even with the change to set ex_phy->port = ex->parent_port, are we still joining the host-attached expander phy (19) to a port with SAS address == 0? >                         ->sas_ex_discover_devices() >                             ->sas_ex_discover_dev() >                                 ->sas_ex_discover_end_dev() >                                     ->sas_port_alloc() // Create > port-7:7:0 >                                     ->sas_ex_get_linkrate() >                                         ->sas_port_add_phy() // Try > adding phy19 to port->7:7:0, triggering BUG() Thanks, John