From patchwork Wed Apr 12 11:44:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Slark Xiao X-Patchwork-Id: 82434 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp282193vqo; Wed, 12 Apr 2023 05:23:30 -0700 (PDT) X-Google-Smtp-Source: AKy350Z76oI9sx87MlVZYmIXr2g5+ZhXK3AEaj00AENYDgL7ZEfgWBr1tP6/lWiZiE4Id2lcY95S X-Received: by 2002:a17:902:d50a:b0:1a2:749:5f1a with SMTP id b10-20020a170902d50a00b001a207495f1amr3048091plg.26.1681302209921; Wed, 12 Apr 2023 05:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681302209; cv=none; d=google.com; s=arc-20160816; b=JNnxDlw5fglVn7/ghq8SYJcNP6ygQJBw5S7Ed/kBnswwsfcDxDkQcgYLWonUjyzmsx ZQLjRLTrZcku2dp7+XG9nWP2E6C+PocYQgdcDFkfJn9UPqog8JcVhF9sZ4q3G/bIExQf 03VkEmxMbj2DZgRg6ibFH6tm/P2DhBjB0vAiAgJb25bE3y0anbiwBwTuM7/6NyaGmI/9 wfM0ojL4SM59+P2yDDLs48x+rJt1msSZf+judYQZMtGq4ffkaAu3p5fxxagWyr/FeNV2 5rz3nTb3QiZB3gHTKMN7UKyiLLE51F+tPmaQx9ZRKT/D/ylrhTyVj+5Jl8LFvgGVK+HC e31Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=TGkvq8vP47zhOGd0OAIzfEiajGPLc3JGihR2TortqD0=; b=NyYpDIb6PIrt1zv8kuxQZQzZ4T/eVt75WwDLSW/uY5UktjiJ8GfK0QDBXVF27vbflF EjFQ/RRMjYQtUtPtyL2Ffn36upo5qa06Z45NeluwUlpRxDX0TNZZuEk19f+kSfeIuAB0 iBwaCUVM5qEwf3Jnv4J1GYjGPlKwisAjxQHwF2LCN8lDTzbYY1e850pZftRcPJqbI8yC o/PfRAy2MAQlpuDeMhbws4/OQ31YrBBAKNLmto5ikzKosQFzniXa2VWZniOqFPjAqC3F rw2zV3ryrvEsdTjNunp6J0DgsTVrvLEnfbVoKLKt05O534GhuQYWTPFvdUDBZJlNOCOh HUnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=BUp0DsFh; 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=163.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jy14-20020a17090342ce00b001a652580118si5119987plb.237.2023.04.12.05.23.17; Wed, 12 Apr 2023 05:23:29 -0700 (PDT) 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=@163.com header.s=s110527 header.b=BUp0DsFh; 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=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229894AbjDLLpk (ORCPT + 99 others); Wed, 12 Apr 2023 07:45:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbjDLLpi (ORCPT ); Wed, 12 Apr 2023 07:45:38 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.216]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CA3589C; Wed, 12 Apr 2023 04:45:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=TGkvq 8vP47zhOGd0OAIzfEiajGPLc3JGihR2TortqD0=; b=BUp0DsFhPg2iBN8toXe1s SSEcW3YfODlm+dZzQCHC973cT0VCTBJuXN3kRhs5Hd8cvDEz/RRMFs9Bv9weUXGP P897N5Rxl5a9lCWLITAR1HYsonEn7bB1EkjM4MIu+moQ4c7D9PLfbxsQsQJfGfGC Pic8M9T2hI5A1b/ZPOEC+M= Received: from VM-0-27-ubuntu.. (unknown [43.134.191.38]) by zwqz-smtp-mta-g2-2 (Coremail) with SMTP id _____wA3K8mKmTZkyjvwBA--.16313S2; Wed, 12 Apr 2023 19:44:12 +0800 (CST) From: Slark Xiao To: loic.poulain@linaro.org, ryazanov.s.a@gmail.com, johannes@sipsolutions.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Slark Xiao Subject: [PATCH net] wwan: core: add print for wwan port attach/disconnect Date: Wed, 12 Apr 2023 19:44:02 +0800 Message-Id: <20230412114402.1119956-1-slark_xiao@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CM-TRANSID: _____wA3K8mKmTZkyjvwBA--.16313S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrtrWrGFyUXw4DZF1ktw48tFb_yoWkKrgE9w n8ZaykWw4UGFWxtryaqF13ArWS9w4IqFWkJr4FqFZ3Zr98XryfW34fZanrKw1vva15Zry7 Wr1DKF4vv34rGjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRKPfHUUUUUU== X-Originating-IP: [43.134.191.38] X-CM-SenderInfo: xvod2y5b0lt0i6rwjhhfrp/1tbiNQ9PZGI0cwvb6QAAsN X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_MSPIKE_H2, 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?1762973145698641487?= X-GMAIL-MSGID: =?utf-8?q?1762973145698641487?= Refer to USB serial device or net device, there is notice to let end user know the status of device, like attached or disconnected. Add attach/disconnect print for wwan device as well. This change works for MHI device and USB device. Signed-off-by: Slark Xiao --- drivers/net/wwan/wwan_core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c index 2e1c01cf00a9..d3ac6c5b0b26 100644 --- a/drivers/net/wwan/wwan_core.c +++ b/drivers/net/wwan/wwan_core.c @@ -492,6 +492,8 @@ struct wwan_port *wwan_create_port(struct device *parent, if (err) goto error_put_device; + dev_info(&wwandev->dev, "%s converter now attached to %s\n", + wwan_port_dev_type.name, port->dev.kobj.name); return port; error_put_device: @@ -517,6 +519,9 @@ void wwan_remove_port(struct wwan_port *port) skb_queue_purge(&port->rxq); dev_set_drvdata(&port->dev, NULL); + + dev_info(&wwandev->dev, "%s converter now disconnected from %s\n", + wwan_port_dev_type.name, port->dev.kobj.name); device_unregister(&port->dev); /* Release related wwan device */