Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp119587lqf; Fri, 26 Apr 2024 01:09:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtpQHA68mwfJjmP+9kTYe5y20pqlV6lovD/eiOgiWK1FGOOCYTuv4Jl2R20jIsIsOnPZGMdtfLbn4wBbTqF4YrEd0Cre23rvgreNE3sQ== X-Google-Smtp-Source: AGHT+IHW9XK0aKdDDp9z1U8AkugyFU2ggdQK+ltwAbxXJpsQGhdW1Ee06JIe5EfNYxFmObHDZxtt X-Received: by 2002:a17:906:414a:b0:a55:4d24:6f9a with SMTP id l10-20020a170906414a00b00a554d246f9amr1363993ejk.6.1714118978246; Fri, 26 Apr 2024 01:09:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714118978; cv=pass; d=google.com; s=arc-20160816; b=eq44GeEGEs0L7PQ1p0G5h7UqxjfzjcxwosWHZQZebX5ukRN84ekIZG6oirz37hlWCj M3nMBqxmzZ/CKfj2t5Mwr8Kmnrgl02yJvR7iJssHCniM1IwpBwLSVvdnyqnK4cfsGYL6 wOy+cqfgaSHmHYtofOyrod6wL7DSFoc4r9BbJ1kJa/QxYUxnoa6A68rIXvAUBKWDzkCH dewxB4qgZh7uKTe6nSuyQAojW3wAxkDrBA3hMeUArwrRKZssmDymqx9zvHSUWlVOwzZV 6S6QEhBEmzk3TiNVW52wmxjmIjYuhC5MC+uoeUajZOoT5tprqB9mm9ejU9CeJyTG+I+F i/VQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=4ZX3C2yV/g45GL3DnetD0/tBcmwuj74la9gUgdxLngs=; fh=n6rkjn7dQjUVz3jcGbp71GRgdBRPCXwtv/SAHmxCdI8=; b=IyjUN2INPHs2rD8ugWl7I0F3ywEGdQuNB32zgEMNWwG4YGfkdRfKVp+aXL79EzYILX PzqJ1XAQVstuaCUg89E811P5d1hHggfaSBe79iq3BMUZYld+dbV/FxXvozhnHN/CrXNn Vuo/41Ow+HVSFfnxNShPr4vW37pDJgfeTsEcYrRi9X3c+o/84Ks9XQPJsluJjnEK1lgX z4SdPzBb82gixd/qvvDaK7HQfRPpbPad72rx3xBsQ8iflWZxvO4/M4oHuFclBxfgv5cu FzT20Nq+UAFeLgBN5gA6f6/s4zcTlLDKLnsl7JnopioLGHPjqrISgVBFhhtE9iiow8BK mIIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b="jze/LJ6Q"; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-kernel+bounces-159677-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159677-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gb41-20020a170907962900b00a55b4327492si7129732ejc.47.2024.04.26.01.09.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 01:09:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159677-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b="jze/LJ6Q"; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-kernel+bounces-159677-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159677-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.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 am.mirrors.kernel.org (Postfix) with ESMTPS id F36261F2293A for ; Fri, 26 Apr 2024 08:09:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F07F13C9A1; Fri, 26 Apr 2024 08:09:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="jze/LJ6Q" Received: from m15.mail.163.com (m15.mail.163.com [45.254.50.220]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B33A13A3E7; Fri, 26 Apr 2024 08:09:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.50.220 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714118968; cv=none; b=QfBfk9D7KzZOUwjD+BsObtvi4RwCihGnEPAmOo0NILkjDI07n6p9Z7cDWQ1aoBJMVzJY04VUKp6BOW33eNAMC0x/7gkUraXjHstGCiq0pEff5Vo2UNnyUJ5orjVqi6x7Q1xXJgCXlQ6mXDDAOBWInRpXLXXufuJPt7g5zlV+Feg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714118968; c=relaxed/simple; bh=dqexjYVG/TRkkiRk3X4lAKrAzhWMuPT98yCFL7d1i0M=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=GwrE+JA1ycyehYPnrErsWDDA4nZ6lLn5I+hvs39ghg2aVKuWAmYVhixynAdCPbg2zSo0xILRiBzfb5hUr3F12C2L9ichZE5cY5fWvmv57VPUUxYNBzfQq00spjIBWpDVU7gAx7PRBLZDbAijOPV3jpKfx8OnQKwFJF6srjQkIzE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=jze/LJ6Q; arc=none smtp.client-ip=45.254.50.220 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=4ZX3C 2yV/g45GL3DnetD0/tBcmwuj74la9gUgdxLngs=; b=jze/LJ6Q9A3vEKrrQxIoU gW/j8DkkC2mduhZzYHZ4zR1iLvOsk4MYU3CHKzTk27uMZU3GQifvRn50T3Hvjirn r8SPUU+89foHJnloA7zNko9HpfMZSWfCUl9ls061xJ+WncdVxhPSuglyrBWJ2Ix6 eWyeiSvEtu3zvEdoIpbtGA= Received: from localhost.localdomain (unknown [112.97.48.208]) by gzga-smtp-mta-g0-4 (Coremail) with SMTP id _____wDnPprJYCtmjTm8CQ--.11148S2; Fri, 26 Apr 2024 16:07:39 +0800 (CST) From: Slark Xiao To: loic.poulain@linaro.org, ryazanov.s.a@gmail.com, johannes@sipsolutions.net Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Slark Xiao Subject: [PATCH net] net: wwan: Add net device name for error message print Date: Fri, 26 Apr 2024 16:07:33 +0800 Message-Id: <20240426080733.819633-1-slark_xiao@163.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:_____wDnPprJYCtmjTm8CQ--.11148S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxXry5KFW7XFyrCr15KF1ftFb_yoW5AF4DpF W7K3sxZr1UJay7X3WUJrWkZFWYywn5ta47Kry2v3WSvF1ayrWUWa4fJF95uw43ta1rAr17 tF4S9anxW3ZrG3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0piH5l8UUUUU= X-CM-SenderInfo: xvod2y5b0lt0i6rwjhhfrp/1tbiowvLZGVODFttogABs1 In my local, I got an error print in dmesg like below: "sequence number glitch prev=487 curr=0" After checking, it belongs to mhi_wwan_mbim.c. Refer to the usage of this API in other files, I think we should add net device name print before message context. Signed-off-by: Slark Xiao --- drivers/net/wwan/mhi_wwan_mbim.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c index 3f72ae943b29..6cefee25efc4 100644 --- a/drivers/net/wwan/mhi_wwan_mbim.c +++ b/drivers/net/wwan/mhi_wwan_mbim.c @@ -186,14 +186,14 @@ static int mbim_rx_verify_nth16(struct mhi_mbim_context *mbim, struct sk_buff *s if (skb->len < sizeof(struct usb_cdc_ncm_nth16) + sizeof(struct usb_cdc_ncm_ndp16)) { - net_err_ratelimited("frame too short\n"); + net_err_ratelimited("mbim: frame too short\n"); return -EINVAL; } nth16 = (struct usb_cdc_ncm_nth16 *)skb->data; if (nth16->dwSignature != cpu_to_le32(USB_CDC_NCM_NTH16_SIGN)) { - net_err_ratelimited("invalid NTH16 signature <%#010x>\n", + net_err_ratelimited("mbim: invalid NTH16 signature <%#010x>\n", le32_to_cpu(nth16->dwSignature)); return -EINVAL; } @@ -201,7 +201,7 @@ static int mbim_rx_verify_nth16(struct mhi_mbim_context *mbim, struct sk_buff *s /* No limit on the block length, except the size of the data pkt */ len = le16_to_cpu(nth16->wBlockLength); if (len > skb->len) { - net_err_ratelimited("NTB does not fit into the skb %u/%u\n", + net_err_ratelimited("mbim: NTB does not fit into the skb %u/%u\n", len, skb->len); return -EINVAL; } @@ -209,7 +209,7 @@ static int mbim_rx_verify_nth16(struct mhi_mbim_context *mbim, struct sk_buff *s if (mbim->rx_seq + 1 != le16_to_cpu(nth16->wSequence) && (mbim->rx_seq || le16_to_cpu(nth16->wSequence)) && !(mbim->rx_seq == 0xffff && !le16_to_cpu(nth16->wSequence))) { - net_err_ratelimited("sequence number glitch prev=%d curr=%d\n", + net_err_ratelimited("mbim: sequence number glitch prev=%d curr=%d\n", mbim->rx_seq, le16_to_cpu(nth16->wSequence)); } mbim->rx_seq = le16_to_cpu(nth16->wSequence); @@ -222,7 +222,7 @@ static int mbim_rx_verify_ndp16(struct sk_buff *skb, struct usb_cdc_ncm_ndp16 *n int ret; if (le16_to_cpu(ndp16->wLength) < USB_CDC_NCM_NDP16_LENGTH_MIN) { - net_err_ratelimited("invalid DPT16 length <%u>\n", + net_err_ratelimited("mbim: invalid DPT16 length <%u>\n", le16_to_cpu(ndp16->wLength)); return -EINVAL; } @@ -233,7 +233,7 @@ static int mbim_rx_verify_ndp16(struct sk_buff *skb, struct usb_cdc_ncm_ndp16 *n if (sizeof(struct usb_cdc_ncm_ndp16) + ret * sizeof(struct usb_cdc_ncm_dpe16) > skb->len) { - net_err_ratelimited("Invalid nframes = %d\n", ret); + net_err_ratelimited("mbim: Invalid nframes = %d\n", ret); return -EINVAL; } -- 2.25.1