Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp477164lqp; Wed, 12 Jun 2024 07:19:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCURBqk0vzXbnCf1gLFic2f3DNcquagRq3Vf41Hrjab5a1NGZEs8F+jmXYqlzpY3wLu2Axe2oaRc4mdrfCvm6G6DK9fb3UeBKLcT7XHHiQ== X-Google-Smtp-Source: AGHT+IHdxXq4PCE/XGpwFs3mlkhk/oiJznGnvz9NlVpxVCfwDiar4B1Jx/78XL9167uqQUQsml4m X-Received: by 2002:a05:6a00:c94:b0:705:951e:ed74 with SMTP id d2e1a72fcca58-705bce2b501mr2330146b3a.19.1718201978505; Wed, 12 Jun 2024 07:19:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718201978; cv=pass; d=google.com; s=arc-20160816; b=N4x3TPqUbArIhJHJM7luTbpu8ji2PcPzBmUzUKJ11RC7iRD18Akwp+N+5V75dHtKHd I54RmH1JvGDWDGTy62q+zRU6oEtlXd19Pezz6MX5+/96z/xnpoXb4pdDDHm05g2cpCWz pXsdRhXFgPtRwBTBco9LpcJGFuUtQNdMTnCugbliwO+yucbtsWXUAC/uISlA468XCBxa o4tVEzfSAchLta2RSuQUl61Qcg+CHAlOaudmXDJdBmpb8yVxtjhp/hIVeLqwi5TQmlS3 gVfEX7BltGPa/LkSEd4a8x+JF1tnx3t73p2G4G3/QexOYmYrxpAjL5lrPnjfwPfMKbdC OspQ== 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:dkim-signature; bh=AOiiCfqxJl3ela2rnUbIDu7M7Owloxg8mRgKwY4S0uQ=; fh=8Yv6aHvzEx8g1phSknruhlUAZzTKcn+tOClxK3aESJk=; b=hwqu93ukmfRVi9oBGS9s98NsNbhz0PQNtlVYeEnW8xNqAyOf5ZMCH/+C+UyAr+Lup5 zuz0f7x2iWHqoEMBZtY2dKfbHPorszNBSh+tGR4vGPHUI5rwBwvagkSrJyO4rhHHWhZp NtRyS0/9XtwTq0pC4uhCIWqf9T6gUTcpePadrdPNXh+Os8eCLj+nh9aLuJ0RQUxEkhkb W78vmDEYttYyiwUuj4S5pWKbkTKRws9UMVi9LdBbchleP/RRuX3TaNQlaGlZcakFGyH1 rt8YF/oo+7tZL1ivGPZlL7Bj3ZczgMf2dOuTXGnfvjxqEtmxwuBl4a4GHmFjrVSMb/Zi wuig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=arUpZQm8; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-211658-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211658-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-705bf98e483si1239097b3a.89.2024.06.12.07.19.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 07:19:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211658-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=arUpZQm8; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-211658-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211658-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 1B88528285F for ; Wed, 12 Jun 2024 14:19:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2CF7A17E463; Wed, 12 Jun 2024 14:19:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="arUpZQm8" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 0AC5517C221; Wed, 12 Jun 2024 14:19:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718201969; cv=none; b=e06uuuoNA90KOkiLSNaNH0leRMwp0gAWgjQDroNaklLL3znNBQUVUybgRJOJPvZiQfMI1LqJexmp4Wxt3g0A2iRNWwcazwVu2AFuUzVCmX64XLy5fuGfwgYPh/2kXS0fZGYVMKI/0Jy5oorD9uyi+tBXfViFvVf5K/neWAogfis= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718201969; c=relaxed/simple; bh=m/1UUdkM/F8U6/9ty+rzPaHzO2Qrr8eAVhVF50RZiYU=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=Sn0QbaVGJq03LlR/MDQgwCB2l7gMJkmcBrAvtGeskCFcujUoXTX+fDLZGrVa2qsJz/GMmu4b4dAaVQ+M23t9IgtFJuy/C5mKj5mUmWouNzKJCBhb1p14eDAjgAvkh29ArSlNfp7bIQEDheRu8EcY+m/VlF+d4XKsIRuupiZ2vX8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=arUpZQm8; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45CCqoJF018660; Wed, 12 Jun 2024 14:19:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= AOiiCfqxJl3ela2rnUbIDu7M7Owloxg8mRgKwY4S0uQ=; b=arUpZQm84guwoexo NTu8/KVpViP1bOn3Vyk7UNGdIoOTbtC5OKjcayqy5zNOWm19urQmMW/2ZThU4G0y Srafme9lY5ZbxcELo3fGITxGZnAgLuet5NE8sfXdQ7r5idwGjjgrOmxEb8x4RCvS MaMjRo0ItA0cE5Et13X8uGSspd54TwlgcA/U+dvIfEdREpKleoN26iMAPbnup8O/ A2+VlTZUwdHcMZPdB03eQMPsXQku499Tcxp5vvu5KY6fYzimix8rZLKGqqieTSUP kFfPUziq5BqELhp8049u+JpbopygwvK8FuwZ5XAvJzWgV4wQ2Rm5LNgqw/Zq+Ad1 MT7rzA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yq4s8hc4e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jun 2024 14:19:15 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 45CEJENw031149 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jun 2024 14:19:14 GMT Received: from [10.226.59.182] (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.1544.9; Wed, 12 Jun 2024 07:19:14 -0700 Message-ID: <87aecf24-cdbb-70d2-a3d1-8d1cacf18401@quicinc.com> Date: Wed, 12 Jun 2024 08:19:13 -0600 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.6.0 Subject: Re: [PATCH v2 1/2] bus: mhi: host: Import mux_id item Content-Language: en-US To: Manivannan Sadhasivam , Slark Xiao CC: , , , , , , References: <20240612093842.359805-1-slark_xiao@163.com> <20240612094609.GA58302@thinkpad> From: Jeffrey Hugo In-Reply-To: <20240612094609.GA58302@thinkpad> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit 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: u8DihMomhUAk3P4xj0tSZnqG-fwtbN7y X-Proofpoint-ORIG-GUID: u8DihMomhUAk3P4xj0tSZnqG-fwtbN7y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-12_08,2024-06-12_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 bulkscore=0 spamscore=0 mlxscore=0 malwarescore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1011 mlxlogscore=999 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406120102 On 6/12/2024 3:46 AM, Manivannan Sadhasivam wrote: > On Wed, Jun 12, 2024 at 05:38:42PM +0800, Slark Xiao wrote: > > Subject could be improved: > > bus: mhi: host: Add configurable mux_id for MBIM mode > >> For SDX72 MBIM mode, it starts data mux id from 112 instead of 0. >> This would lead to device can't ping outside successfully. >> Also MBIM side would report "bad packet session (112)". >> So we add a default mux_id value for SDX72. And this value >> would be transferred to wwan mbim side. >> >> Signed-off-by: Slark Xiao >> --- >> drivers/bus/mhi/host/pci_generic.c | 3 +++ >> include/linux/mhi.h | 2 ++ >> 2 files changed, 5 insertions(+) >> >> diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c >> index 0b483c7c76a1..9e9adf8320d2 100644 >> --- a/drivers/bus/mhi/host/pci_generic.c >> +++ b/drivers/bus/mhi/host/pci_generic.c >> @@ -53,6 +53,7 @@ struct mhi_pci_dev_info { >> unsigned int dma_data_width; >> unsigned int mru_default; >> bool sideband_wake; >> + unsigned int mux_id; >> }; >> >> #define MHI_CHANNEL_CONFIG_UL(ch_num, ch_name, el_count, ev_ring) \ >> @@ -469,6 +470,7 @@ static const struct mhi_pci_dev_info mhi_foxconn_sdx72_info = { >> .dma_data_width = 32, >> .mru_default = 32768, >> .sideband_wake = false, >> + .mux_id = 112, >> }; >> >> static const struct mhi_channel_config mhi_mv3x_channels[] = { >> @@ -1035,6 +1037,7 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) >> mhi_cntrl->runtime_get = mhi_pci_runtime_get; >> mhi_cntrl->runtime_put = mhi_pci_runtime_put; >> mhi_cntrl->mru = info->mru_default; >> + mhi_cntrl->link_id = info->mux_id; > > Again, 'link_id' is just a WWAN term. Use 'mux_id' here also. Does this really belong in MHI? If this was DT, I don't think we would put this value in DT, but rather have the driver (MBIM) detect the device and code in the required value. Furthermore, if this is included in MHI, it seems to be a property of the channel, and not the controller. -Jeff