From patchwork Mon Mar 15 15:21:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 400488 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3517877jai; Mon, 15 Mar 2021 08:22:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNvHjPRAI+5gII0zFBIPwkTqaJVkfBghKk3VXd1PJjjZljVUnhqDP759pZUup2flDeSBZm X-Received: by 2002:a17:906:d790:: with SMTP id pj16mr23837550ejb.255.1615821734336; Mon, 15 Mar 2021 08:22:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615821734; cv=none; d=google.com; s=arc-20160816; b=FxEG/eODrZ6GltIvfcSq4MbB3kx7hqD+pGKcK6kyrijWJq3yUtjWNh1Xr8UKB75LBO UjD056j5WqdqJSConkjslY1KNRQ8UdnQrXOn9O3QzxkvaOB8nGlGRZVfp0I7bjawty9o pZCkyr+xA0DuC2p1EtbLFBtsaZGNNV6qBGByZskD6zP1VFIDNx8yDTpWBDePdGWy4qOG 8VDgRyKV3L3dfPXNjyp4x9zYF2oZKnHBFrCcqjBgp7CwXgR1RpgTfEnMHpJApXVjp2GM ZrLjoBdlMhfVgFJntrhmWqGH+wZnO1Po/sHs3GYV+U++Ydm3N1//yw2ovUjXSLaGAnmk BU3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HrzQhsRc599ph2zuSB7VP6Fml8kkJcZ8OjvvN5VFwSM=; b=vRRwwShcWz+QZOpltUKzKSCrpwlB91OnZDixXkQQKKgeWY0LwWLNKZHVcfaPulWico UPFOuacnYRQs72c4x0mEiIMpb8nv2KtmdZVelHqLJiR4vNtMeUTffvJXpzZkXnGK0YmS CxwAPRr8435XCDfm6Gg1jlVeekeE5wFwfE/CxLsmUr6prpz6JnMf1AKPRFqQ6cKkQXxW W/M0CBMep4AEvoG2Yj2SgardotoJv0LDKyevdiOk+IiPz8C9gyDfbyaAUiwcNGkT6CRt rmnB532VyjBs805f0OFR82MPeS1XAAXb9wGJXwze/7ZjRrBfhwBD+UwtYOgGfFu15koL woiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mOx3t/LV"; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jl2si11312305ejc.488.2021.03.15.08.22.14; Mon, 15 Mar 2021 08:22:14 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mOx3t/LV"; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232146AbhCOPVk (ORCPT + 8 others); Mon, 15 Mar 2021 11:21:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231268AbhCOPVS (ORCPT ); Mon, 15 Mar 2021 11:21:18 -0400 Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDC49C061762 for ; Mon, 15 Mar 2021 08:21:16 -0700 (PDT) Received: by mail-il1-x132.google.com with SMTP id h18so9709951ils.2 for ; Mon, 15 Mar 2021 08:21:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HrzQhsRc599ph2zuSB7VP6Fml8kkJcZ8OjvvN5VFwSM=; b=mOx3t/LV8m8lw+fAqMgEDSFeYFjtJ80xNdotUsL8CQKcHlLxMSHfn1+yiEAQaPC3/d y2AKFpPjZqZ/sW0l9sMIX/U7lM2vIobiKYQc3XXFSGWLMpxGJI+Z3Jo56DcY0Ge7q2Hb 59eMuvail70J81AhVO2qs7ydvFHa4N7tLWSBoX4gsv+aypnJtkDt1vLNkpEyBJl714lp g36os3gs9PQ7ElPtSi5hvdC0Ne4IpmKQyzjOcpiOFZ65dIs9DI4FOR1qdxHa43HyDPEp /ipPoj4l6Bhrp626PBZ7E0DV/zuyap1AREfNe5+SgX4VljXrIoqe8rJ5ii3ntEK4XVp2 pULg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HrzQhsRc599ph2zuSB7VP6Fml8kkJcZ8OjvvN5VFwSM=; b=J89bkpXeZ9fYYiGkJWqc4Dyn9NxdodiMCFtlEFcRY/l4tfOxc3vPQIC6sPlT0jfLOQ ovp1E1XoZBT3a1E0Ia2YkC8cMAwW+utr6WV5CdhkS1028V5stRq1KsvvHGH632U6zZPF CjtRVvWjDHFgX5DnkNhNUMl/WoPg7ZZ9VCJ7dc1Ln7F32nuWkyEJEY/D2irbNS5X2JLZ ZRTpBF4FTu7f+CFs8HUFgNTiZFaCTMk6lDpxJNTGkPhv/BMSdWs3xlzWzWV83iLX5gYY /f/DjywL/y0/fYDjLHrv8WTth84mYXFXgikJCr3nKzlUOOPp9WU24cKLwZLmcoH3q97y KpSw== X-Gm-Message-State: AOAM530YxcSfHhpR0AXuW/NH4mA4/xAC8bxpNk0BKlNRF5VAVS9A9Nm+ qMTbfzN92vDbYqVm1LHmtU13bQ== X-Received: by 2002:a05:6e02:2192:: with SMTP id j18mr99575ila.196.1615821676373; Mon, 15 Mar 2021 08:21:16 -0700 (PDT) Received: from localhost.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id l17sm8194275ilt.27.2021.03.15.08.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 08:21:16 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: manivannan.sadhasivam@linaro.org, bjorn.andersson@linaro.org, evgreen@chromium.org, cpratapa@codeaurora.org, elder@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 1/3] net: ipa: fix a duplicated tlv_type value Date: Mon, 15 Mar 2021 10:21:10 -0500 Message-Id: <20210315152112.1907968-2-elder@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210315152112.1907968-1-elder@linaro.org> References: <20210315152112.1907968-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In the ipa_indication_register_req_ei[] encoding array, the tlv_type associated with the ipa_mhi_ready_ind field is wrong. It duplicates the value used for the data_usage_quota_reached field (0x11) and should use value 0x12 instead. Fix this bug. Reported-by: Manivannan Sadhasivam Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_qmi_msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.27.0 Acked-by: Manivannan Sadhasivam diff --git a/drivers/net/ipa/ipa_qmi_msg.c b/drivers/net/ipa/ipa_qmi_msg.c index 73413371e3d3e..e00f829a783f6 100644 --- a/drivers/net/ipa/ipa_qmi_msg.c +++ b/drivers/net/ipa/ipa_qmi_msg.c @@ -56,7 +56,7 @@ struct qmi_elem_info ipa_indication_register_req_ei[] = { .elem_size = sizeof_field(struct ipa_indication_register_req, ipa_mhi_ready_ind_valid), - .tlv_type = 0x11, + .tlv_type = 0x12, .offset = offsetof(struct ipa_indication_register_req, ipa_mhi_ready_ind_valid), }, @@ -66,7 +66,7 @@ struct qmi_elem_info ipa_indication_register_req_ei[] = { .elem_size = sizeof_field(struct ipa_indication_register_req, ipa_mhi_ready_ind), - .tlv_type = 0x11, + .tlv_type = 0x12, .offset = offsetof(struct ipa_indication_register_req, ipa_mhi_ready_ind), }, From patchwork Mon Mar 15 15:21:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 400486 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3517844jai; Mon, 15 Mar 2021 08:22:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweuAeOEBftq6VtlBc35RrTdqDW/UJN5ZCk1w4fcN2X8A+dQjVralj4GGF5xPy/AocIGRbr X-Received: by 2002:a17:906:1113:: with SMTP id h19mr23861979eja.478.1615821731965; Mon, 15 Mar 2021 08:22:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615821731; cv=none; d=google.com; s=arc-20160816; b=RsnpEAddIwcc8ZOuLpmrKuDoVEj529DjeHbtwFPZ8zPeEpaCqH9nZK7UJA4vJ3VGOa qWjqJy33KQoZYJs7bAo7MDHDO+zkW38Vvjpf8ZmGg+l03KjieMu3+joGbUQZpokJRUUN Clyx0PmPzQLzjFTMN2R9P8MRmh3allrJ7/LWzpNK3SGemHfg1vOUFamfF96BFQNeRjO1 Yb3543rqd3BhfQkVbnMTx/Xr14k5xUemuKmo3kKc4Ok9UK9AZ9XQWqJODyiAyWPiHAsV of7SojsxF//+OL7dwIhHTVBZ15k/F1Kli/CWV0iX3zJyvtNV4NfZQZzf+zzpySKg40tI 4krw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cdjWAvcEPqqoxOkQ5Yghff2TWeEJIKckZ0LUeD8YodY=; b=gBWuiV7h+k3xmFo4LQs0Z0r/idL1/NzAVEyYmw8vcfR0J0VEETnLmvYlGcnacH4h5a 5DaG+u03mtDBoD2x9VBZC0wTsPooXiCe5ZQGvtbql5tDljPWIinJbb9dEk4ae9C6vtw2 fE3/LRwuFWB2HAp1+5RQr3hf3Zp4ReWAJYosDNgJkghKPMQmSViiKvqaW1GMF/K/cm59 zwlaYj5AQ6xAmQufuOR6CGXP4bqfaHCHpienuLMm0f9ybt0CGcunYihYYqrIioT2yAOu CJ8qbvUyClUWa0zDOAYRy0DGUI+S7N5JDc9k5OdCxRbn25IhMuZ2A7ViS458k8HQrvo+ Jgag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SurpKAYo; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jl2si11312305ejc.488.2021.03.15.08.22.11; Mon, 15 Mar 2021 08:22:11 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SurpKAYo; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231555AbhCOPVh (ORCPT + 8 others); Mon, 15 Mar 2021 11:21:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231252AbhCOPVS (ORCPT ); Mon, 15 Mar 2021 11:21:18 -0400 Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B70E4C061764 for ; Mon, 15 Mar 2021 08:21:17 -0700 (PDT) Received: by mail-il1-x134.google.com with SMTP id e7so9682192ile.7 for ; Mon, 15 Mar 2021 08:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cdjWAvcEPqqoxOkQ5Yghff2TWeEJIKckZ0LUeD8YodY=; b=SurpKAYomkVRJ20/mN9GqMSiw+B44DXbzIUGWYPcvOsSjgA3N6qN2NTJfO7MaQ7MoB +LGP71XKF2EZOTuEHOj1pxxnEj+t2lxhjBeB3vDPHVyAFh3QAxSBn0aRHhCSkwhze/j5 TcQuKoJxBnCF3+KOAu5gca7qRnktHtxShGD4OqdLYvwyDDakO6A8d7agAvszOg6VgbQ8 wHoEYZMrQH7pTk/NlsPX9OX0eUtEsfxPXp7J+OwJYZZSkszYD09seU++nTwR87krEUFb LTmvSYgMHSFVEC2wM/e3R0hjP85rbUY6NafS/IybZ/ivfCt1MLvcDaQAkzXus1QyURNF Taow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cdjWAvcEPqqoxOkQ5Yghff2TWeEJIKckZ0LUeD8YodY=; b=H5D9SYkH0Qgu/x77EfEtvCbdIbKVVyf+gOmse4kMTd2Ji6IieZ2fT+Sfs/dw3FACGn ojCLm7CZwBjz2i6kD8WWKUIng8SLNi3FbPS6tGu9URCYqYoSFl8jM/72eeoVaeWoaav6 TS2MlFCEJ6N7nxR/jJ/uDWl9LKAke5pI1p+OhvepsHupWWg/Gd5jhDDB/bfvtRKqD1jF +dbVC1eBV2TiRodFCDIGT9TyhrVkFMx9FsmueJSx7T3Bzq+kevAPkSgiEqyYJDU6xjjt QBMtVrXDNuVAJWQISVJO1L4ivRaupY8GAKL8h0DBL93/PI67D16ji2awsBSZ8otCkRAT 0ZkA== X-Gm-Message-State: AOAM530Wzya71L1162AszeRB3CWAU0MIWkhcy6+tBCYGJldpk4R+GFOI 7wqcKbZvscrugdra4rE+Kik0MQ== X-Received: by 2002:a05:6e02:13cb:: with SMTP id v11mr72539ilj.105.1615821677254; Mon, 15 Mar 2021 08:21:17 -0700 (PDT) Received: from localhost.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id l17sm8194275ilt.27.2021.03.15.08.21.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 08:21:16 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: manivannan.sadhasivam@linaro.org, bjorn.andersson@linaro.org, evgreen@chromium.org, cpratapa@codeaurora.org, elder@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 2/3] net: ipa: fix another QMI message definition Date: Mon, 15 Mar 2021 10:21:11 -0500 Message-Id: <20210315152112.1907968-3-elder@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210315152112.1907968-1-elder@linaro.org> References: <20210315152112.1907968-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The ipa_init_modem_driver_req_ei[] encoding array for the INIT_MODEM_DRIVER request message has some errors in it. First, the tlv_type associated with the hw_stats_quota_size field is wrong; it duplicates the valiue used for the hw_stats_quota_base_addr field (0x1f) and should use 0x20 instead. The tlv_type value for the hw_stats_drop_size field also uses the same duplicate value; it should use 0x22 instead. Second, there is no definition for the hw_stats_drop_base_addr field. It is an optional 32-bit enumerated type value. Finally, the hw_stats_quota_base_addr, hw_stats_quota_size, and hw_stats_drop_size fields are defined as enumerated types; they should be unsigned 4-byte values. Reported-by: Manivannan Sadhasivam Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_qmi_msg.c | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) -- 2.27.0 Acked-by: Manivannan Sadhasivam diff --git a/drivers/net/ipa/ipa_qmi_msg.c b/drivers/net/ipa/ipa_qmi_msg.c index e00f829a783f6..e4a6efbe9bd00 100644 --- a/drivers/net/ipa/ipa_qmi_msg.c +++ b/drivers/net/ipa/ipa_qmi_msg.c @@ -530,7 +530,7 @@ struct qmi_elem_info ipa_init_modem_driver_req_ei[] = { hw_stats_quota_base_addr_valid), }, { - .data_type = QMI_SIGNED_4_BYTE_ENUM, + .data_type = QMI_UNSIGNED_4_BYTE, .elem_len = 1, .elem_size = sizeof_field(struct ipa_init_modem_driver_req, @@ -545,37 +545,57 @@ struct qmi_elem_info ipa_init_modem_driver_req_ei[] = { .elem_size = sizeof_field(struct ipa_init_modem_driver_req, hw_stats_quota_size_valid), - .tlv_type = 0x1f, + .tlv_type = 0x20, .offset = offsetof(struct ipa_init_modem_driver_req, hw_stats_quota_size_valid), }, { - .data_type = QMI_SIGNED_4_BYTE_ENUM, + .data_type = QMI_UNSIGNED_4_BYTE, .elem_len = 1, .elem_size = sizeof_field(struct ipa_init_modem_driver_req, hw_stats_quota_size), - .tlv_type = 0x1f, + .tlv_type = 0x20, .offset = offsetof(struct ipa_init_modem_driver_req, hw_stats_quota_size), }, + { + .data_type = QMI_OPT_FLAG, + .elem_len = 1, + .elem_size = + sizeof_field(struct ipa_init_modem_driver_req, + hw_stats_drop_base_addr_valid), + .tlv_type = 0x21, + .offset = offsetof(struct ipa_init_modem_driver_req, + hw_stats_drop_base_addr_valid), + }, + { + .data_type = QMI_UNSIGNED_4_BYTE, + .elem_len = 1, + .elem_size = + sizeof_field(struct ipa_init_modem_driver_req, + hw_stats_drop_base_addr), + .tlv_type = 0x21, + .offset = offsetof(struct ipa_init_modem_driver_req, + hw_stats_drop_base_addr), + }, { .data_type = QMI_OPT_FLAG, .elem_len = 1, .elem_size = sizeof_field(struct ipa_init_modem_driver_req, hw_stats_drop_size_valid), - .tlv_type = 0x1f, + .tlv_type = 0x22, .offset = offsetof(struct ipa_init_modem_driver_req, hw_stats_drop_size_valid), }, { - .data_type = QMI_SIGNED_4_BYTE_ENUM, + .data_type = QMI_UNSIGNED_4_BYTE, .elem_len = 1, .elem_size = sizeof_field(struct ipa_init_modem_driver_req, hw_stats_drop_size), - .tlv_type = 0x1f, + .tlv_type = 0x22, .offset = offsetof(struct ipa_init_modem_driver_req, hw_stats_drop_size), }, From patchwork Mon Mar 15 15:21:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 400485 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3517813jai; Mon, 15 Mar 2021 08:22:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPTqefIWl7GD4UU5yPdRAX5scXekOi7otvXcWaJvaTwhBX/OT3GkiHxY2QIwInPKpJgDJa X-Received: by 2002:a50:ee05:: with SMTP id g5mr30512453eds.164.1615821729806; Mon, 15 Mar 2021 08:22:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615821729; cv=none; d=google.com; s=arc-20160816; b=qrP1RSWge5wo8StkZiImyb/cCZLMMJH2IliqcD7p5nh8EVSCkIzFugfnlrF3FNxOMb 86vP8WHOMh5yZRuphKdK1s5l5u0PtU1aJ8K5URkbK763r/1RqmigxUTMA/j9SVxme/UW 3HchnJ9jb/ddUS2A6mSlusxDL6+JdDlaG5TGqYSDi5b8gK35288wbACC19F5qCdk5rDU p1xoeZAKMUoAuqbwmfbQ2GdgajQQu4HTRp0/Uo2SBEmDh+DHwaXtJzXc8SQcsi+iI6rw u6IPKReYbwts/BlCg7vWelrUaIe7nLZW9Rl6C16ZbmFbP+VnS4sWoQiShsF83vGXjW9U L5LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NHDh7IWLJWaZZsRGFN04TQU8QhIXh09TVomddsIt/Gc=; b=kx6kF6tWULFMWfMgiB84solf6dDKtBwDt5jMY8d2rGbx8kVkoxygers4ZToCw+sgbT g+1b77eZrlwfSkqgxs99WTBItwlDNR+WNstAh4lMdw+TBGVXIZ4dgtgub5Xg/zHfc9rX /XmAj0n0XeKF/YGIlCrNQNeeRCyWmLt0oFlRBX/BxjjyWM/Dqkfj/Pjz67ZNEyIKVH7a cOghQLDmX4Gvc7Oe9V9TRYL7Ego4Y5cys/qYM7xxwFcfIHZqNpCWRP2E9NdpE9Wuz71h onZ23xmN4JyOf8MtGeyfcQPPC0u24GaxuAjLbJtusq39N00jmIAZhEKZgKGM2oPukAdQ Dbag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FfxK4VaH; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jl2si11312305ejc.488.2021.03.15.08.22.09; Mon, 15 Mar 2021 08:22:09 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FfxK4VaH; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231325AbhCOPVg (ORCPT + 8 others); Mon, 15 Mar 2021 11:21:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231297AbhCOPVS (ORCPT ); Mon, 15 Mar 2021 11:21:18 -0400 Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F22CC06174A for ; Mon, 15 Mar 2021 08:21:18 -0700 (PDT) Received: by mail-il1-x129.google.com with SMTP id e7so9682247ile.7 for ; Mon, 15 Mar 2021 08:21:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NHDh7IWLJWaZZsRGFN04TQU8QhIXh09TVomddsIt/Gc=; b=FfxK4VaHeulHqq6yZryVxuj8xTvFRaKGblZvb/9WohyPVggLhVDf4PBee1U30xUxHT 2nCre5+gdb7zJSskvFcr5/oSj7vB/E5qamqQSABanotlHE9C0JJiIzJMHZ4ztFoNF52J 9GjcFcYFZQMmZFrGGDfBhlZ48iwTWSCXNrnFFDKvNK588tRqpxWH/urxY6QmbCAqjOFp VPuwu2RlFFXvgAvQR2mYw1Cw6MBV7UhpzeV7E5Wfnw5BB/AmZjHx3NHrxXzdmx/6Z6hr hYiUIHJpNmTfylbzdnc1DTJNkTH6JVKnyQ6MVoU+Vt4D6RnvcgcE0QEtU813ksJtCEwJ Gowg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NHDh7IWLJWaZZsRGFN04TQU8QhIXh09TVomddsIt/Gc=; b=FYRvwMQh3lJiDF/RIVsv5JvIuPA4xM2TOhwisPIy/lubv+If2cf3bGNZ4INiiN/dE2 75UqNE4Zhu67gzmJboCVuGr4IwBn+HONBAyVl4BXj2hxuYGgnbQwk2X2CD+aiqFovRXw y+uc9O20yAhnRZuW6oJGx6sAmGRGv9QzuaYxEHonztAjFnaee6i5A7iYwEPlF07iNg3t cIqI7IuKbe2DC+99GL/wY3S/ixUCXrmOdmEcV6R306DzQzWsdfN7wRBoMs6CUX8+BzaB HC+YWmnwKtEBMnv7nNo9YEvFzgXOWo6BjvkLL08TIZctRu+fjpxG7UJoM8pNgAJ9VcaW gDNg== X-Gm-Message-State: AOAM530mzBmaT/O9aNejzYf0XxhlVhWVlfIuaGQNuzxtK09fFv+wWPHU 7XICaXjP/Tzb70YZ3c/OO9ru/g== X-Received: by 2002:a92:90f:: with SMTP id y15mr69688ilg.143.1615821678138; Mon, 15 Mar 2021 08:21:18 -0700 (PDT) Received: from localhost.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id l17sm8194275ilt.27.2021.03.15.08.21.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 08:21:17 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: manivannan.sadhasivam@linaro.org, bjorn.andersson@linaro.org, evgreen@chromium.org, cpratapa@codeaurora.org, elder@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 3/3] net: ipa: extend the INDICATION_REGISTER request Date: Mon, 15 Mar 2021 10:21:12 -0500 Message-Id: <20210315152112.1907968-4-elder@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210315152112.1907968-1-elder@linaro.org> References: <20210315152112.1907968-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The specified format of the INDICATION_REGISTER QMI request message has been extended to support two more optional fields: endpoint_desc_ind: sender wishes to receive endpoint descriptor information via an IPA ENDP_DESC indication QMI message bw_change_ind: sender wishes to receive bandwidth change information via an IPA BW_CHANGE indication QMI message Add definitions that permit these fields to be formatted and parsed by the QMI library code. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_qmi_msg.c | 40 +++++++++++++++++++++++++++++++++++ drivers/net/ipa/ipa_qmi_msg.h | 6 +++++- 2 files changed, 45 insertions(+), 1 deletion(-) -- 2.27.0 Acked-by: Manivannan Sadhasivam diff --git a/drivers/net/ipa/ipa_qmi_msg.c b/drivers/net/ipa/ipa_qmi_msg.c index e4a6efbe9bd00..6838e8065072b 100644 --- a/drivers/net/ipa/ipa_qmi_msg.c +++ b/drivers/net/ipa/ipa_qmi_msg.c @@ -70,6 +70,46 @@ struct qmi_elem_info ipa_indication_register_req_ei[] = { .offset = offsetof(struct ipa_indication_register_req, ipa_mhi_ready_ind), }, + { + .data_type = QMI_OPT_FLAG, + .elem_len = 1, + .elem_size = + sizeof_field(struct ipa_indication_register_req, + endpoint_desc_ind_valid), + .tlv_type = 0x13, + .offset = offsetof(struct ipa_indication_register_req, + endpoint_desc_ind_valid), + }, + { + .data_type = QMI_UNSIGNED_1_BYTE, + .elem_len = 1, + .elem_size = + sizeof_field(struct ipa_indication_register_req, + endpoint_desc_ind), + .tlv_type = 0x13, + .offset = offsetof(struct ipa_indication_register_req, + endpoint_desc_ind), + }, + { + .data_type = QMI_OPT_FLAG, + .elem_len = 1, + .elem_size = + sizeof_field(struct ipa_indication_register_req, + bw_change_ind_valid), + .tlv_type = 0x14, + .offset = offsetof(struct ipa_indication_register_req, + bw_change_ind_valid), + }, + { + .data_type = QMI_UNSIGNED_1_BYTE, + .elem_len = 1, + .elem_size = + sizeof_field(struct ipa_indication_register_req, + bw_change_ind), + .tlv_type = 0x14, + .offset = offsetof(struct ipa_indication_register_req, + bw_change_ind), + }, { .data_type = QMI_EOTI, }, diff --git a/drivers/net/ipa/ipa_qmi_msg.h b/drivers/net/ipa/ipa_qmi_msg.h index 12b6621f4b0e6..3233d145fd87c 100644 --- a/drivers/net/ipa/ipa_qmi_msg.h +++ b/drivers/net/ipa/ipa_qmi_msg.h @@ -24,7 +24,7 @@ * information for each field. The qmi_send_*() interfaces require * the message size to be provided. */ -#define IPA_QMI_INDICATION_REGISTER_REQ_SZ 12 /* -> server handle */ +#define IPA_QMI_INDICATION_REGISTER_REQ_SZ 20 /* -> server handle */ #define IPA_QMI_INDICATION_REGISTER_RSP_SZ 7 /* <- server handle */ #define IPA_QMI_INIT_DRIVER_REQ_SZ 162 /* client handle -> */ #define IPA_QMI_INIT_DRIVER_RSP_SZ 25 /* client handle <- */ @@ -44,6 +44,10 @@ struct ipa_indication_register_req { u8 data_usage_quota_reached; u8 ipa_mhi_ready_ind_valid; u8 ipa_mhi_ready_ind; + u8 endpoint_desc_ind_valid; + u8 endpoint_desc_ind; + u8 bw_change_ind_valid; + u8 bw_change_ind; }; /* The response to a IPA_QMI_INDICATION_REGISTER request consists only of