From patchwork Thu Feb 23 06:13:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Yiwei X-Patchwork-Id: 60799 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp157752wrd; Wed, 22 Feb 2023 22:20:57 -0800 (PST) X-Google-Smtp-Source: AK7set9IYvknOw4dEbkI6MuC/boiOA1Mq8ExlMMZzpUZ193sHBtS8oORHhSvdIZUz10O3goSVR3H X-Received: by 2002:a05:6402:35d0:b0:4ad:6f56:a362 with SMTP id z16-20020a05640235d000b004ad6f56a362mr12478593edc.4.1677133256864; Wed, 22 Feb 2023 22:20:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677133256; cv=none; d=google.com; s=arc-20160816; b=kR36nr+X58sUaQuovgyW/bLHPoBH0m2OSCOkBFq1g9rt6ZAUcvtlgPCryHS56FgrDc 4XmhZFdjKO0iqLJAVSQp52d138RZ5gm5t+MUplOc+cltBSpQtb+Fzq4sjkfYamONo7ej 9s0GfIwOtjEQLVWAwaurQzTJKhJchcMjUTDeqIUTxkVHckxDQ6+lp5rdyI97rZs1HGey EpeW65c9hlTmKpcSi6Xs7EqLiR8qw9pwWUln7Xp+EC52kBGCkzVya/ZYQnRSZigDIDGF 6Z8H+xt7gwQclSXFqah5+R8NBNfYzc6U5iMy+ekMgDEj5jJBf1U1rZAaEcWr1Y698vzq XnyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=itMCcoMGHXoMQVi/aVCtN40n9UEt67oMQzhzDLbvy84=; b=OqV3cEg0Z6Wv2TPZ94hc5RWAOfM6ah78b+lVzEky4pMQ9cK8k1XxZj5atzC8CokvDb YpV/WsCbbiH1ileGaA2VYh0odSQ6lGGdNGXPzcNSsBdXTtbZ7g1I0SXdjhLtvdhbQXq5 EBFAMpkMcvvIpolPsAx+F58FJCZ785BfOs0b8vn8BQSMqZSkh7f7sXvFgTI/1R52PZoO QnW5zGMbqra15NSEn9srFPkkrb73UW9w2Bt3IjHhJ/6MwHxn+z04tB41GnuxMwKFZd7S Uwux3nduEdRil1n3ZSytXGs8Y1tbE8tIMGrI1mWbkdS6msGfenKF+V0kZ6aFX65YfynG cm8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="bFVSo/7s"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h23-20020aa7c617000000b004ad7bd9dad2si11063946edq.493.2023.02.22.22.20.29; Wed, 22 Feb 2023 22:20:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="bFVSo/7s"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232846AbjBWGOC (ORCPT + 99 others); Thu, 23 Feb 2023 01:14:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbjBWGOB (ORCPT ); Thu, 23 Feb 2023 01:14:01 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF6851EBCF; Wed, 22 Feb 2023 22:13:59 -0800 (PST) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31N49Ddh004525; Thu, 23 Feb 2023 06:13:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=qcppdkim1; bh=itMCcoMGHXoMQVi/aVCtN40n9UEt67oMQzhzDLbvy84=; b=bFVSo/7sOHx8DQoT8gOOFGmrLRXCJxUES14zAvEMZhV+hxW9VHoy9NX5m7qIbkdEDTz0 7fBlCS6ERvnMdGReL59fO2U+tqTwKlGSohSSJSQNNqN8fkgCSKSCgF4O1Xm8FkV5W/eQ InalrN4Ejz8MvQKFeaFOljhozFq+ZaYKUfxi7nuHGSfERQXqaqmGkNkJemCosQNdy69a 1GsxX8TXlynsFQQLl/9Zl9WdqbFXuxOh32nZ1JQpwmEBWYBqV0uiUW3eOT95VMiVFpX4 /bggUqQxhrXzhFpMaVlZAXr4qCN+eVoSlxr0i4pg8ZAEclbbOo3FA41UFDWlEumRtGSR OQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nwywd0c1j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Feb 2023 06:13:56 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 31N6DtKB022001 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Feb 2023 06:13:55 GMT Received: from hyiwei-gv.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 22 Feb 2023 22:13:52 -0800 From: Huang Yiwei To: , , , , CC: Huang Yiwei , , , , , Subject: [PATCH] mailbox: qcom-ipcc: Support multiple channels for a given client Date: Thu, 23 Feb 2023 14:13:18 +0800 Message-ID: <20230223061318.1793-1-quic_hyiwei@quicinc.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 4cWtDjFRIY_Ft_6VATCQ9SSs1DNfE43A X-Proofpoint-ORIG-GUID: 4cWtDjFRIY_Ft_6VATCQ9SSs1DNfE43A X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-23_02,2023-02-22_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 clxscore=1011 impostorscore=0 mlxscore=0 bulkscore=0 suspectscore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 mlxlogscore=747 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302230052 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758601682103901071?= X-GMAIL-MSGID: =?utf-8?q?1758601682103901071?= Recently a new use case where two signals for the same protocol and client is needed, that means there will be more than one channel for a mbox node. Current driver only supports one channel, so need to remove the limitation and let the driver find every channel correctly. Signed-off-by: Huang Yiwei --- drivers/mailbox/qcom-ipcc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c index 7e27acf6c0cc..367658af089e 100644 --- a/drivers/mailbox/qcom-ipcc.c +++ b/drivers/mailbox/qcom-ipcc.c @@ -226,11 +226,9 @@ static int qcom_ipcc_setup_mbox(struct qcom_ipcc *ipcc, for (j = 0; j < i; j++) { ret = of_parse_phandle_with_args(client_dn, "mboxes", "#mbox-cells", j, &curr_ph); - of_node_put(curr_ph.np); - if (!ret && curr_ph.np == controller_dn) { + if (!ret && curr_ph.np == controller_dn) ipcc->num_chans++; - break; - } + of_node_put(curr_ph.np); } }