From patchwork Mon Dec 18 23:26:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13497680 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (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 C6FB5760B0; Mon, 18 Dec 2023 23:27:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="K2+wxeA5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1702942017; x=1703546817; i=wahrenst@gmx.net; bh=oTUeFEtg6tccmFigk3+uGgzU7tYf0ybllVSeTx5SFNo=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=K2+wxeA5frExPYSr/1vAhsmczy/GCaREKvT0yKACWnYvP1bEHo99Y0g2qYe7uUki C41ATQwVxkknJ4+JHVVsourWP2Ppa/e43KEiB4TKOQ1ZNo+Le7b28MB4vzk1rd7Gg /OrsS0+mfhFbUToscO5fJ61dcTi2CbmagtoPiha1Pje6UxYHwEDsqnyQBsnU389Zs 3tZuTKh5eAdAhZZI98cyEleZIkq7tlWpIrVHpSVSMdaoJA6tXDv3+V8fT0WLeoi+f vcQhmaX8IlGpRxk+X2tA9he65stFBhVAXfiRNIqUxLeFSJ+z7a6GbzCmQBgU4/NFp C9UuRpwmAZtR8acTpA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mf07E-1qnB8d2L1O-00gZXl; Tue, 19 Dec 2023 00:26:57 +0100 From: Stefan Wahren To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren Subject: [PATCH V2 01/12 net-next] qca_spi: Improve SPI thread creation Date: Tue, 19 Dec 2023 00:26:28 +0100 Message-Id: <20231218232639.33327-2-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218232639.33327-1-wahrenst@gmx.net> References: <20231218232639.33327-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:DQU9sNnFv4pZC4soSAJcOfGeWOmGKJKVUWzlgzNeoF+1Ehucbhj z/Rd8K5lH7Yqyc3Jkv4Z0T7xVC36V7U7w5WLWqZC4JhWAL9eewEQvEtS42Ywl7CnYETCR3L us0h23ZxSQ4gcsN9p8I+JN0Dx5ad6luGIUNW4oBVa+1qCG+JAMV+KIXYvVCG3Wp0m/olTjX 6cBNWTKbdONtpE4rvRlUQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:9IwFr49EgQU=;nXzduPdY/FAM9z/k/RHybYRYGQX VOTUsyS5AwB/+Nsb9ls1Lj3udJhwxXTdaG0AVPrrEdvue5ds8t5AqVI3LgpykF59gZ/eG5IMc ZGIHHwsg50YmmMpaqrvyAgWZwV9jktIbOHUhciCDiOow2CjFswvs1iyMK0Ztpaux7Z0nXNRSH c/X0njAmRn9fYVhzawYqq9vMkPuor1IQ56oILd3XEujacgg+Wf50WrmTGIjx8xni2ssDWzWcy vDedRZ6zcsYh+s6lKts169KHdYmbua4kfL/I3Ljt905TEhh8IZM1kFham1QxcHNpGFSbHDPlp /iiHFHvWOv0BV4DIPhvLKtl4l30vOpN19DCSuafz0/exHC/fNguVYOG7Zgo9P85KdMVRDV8TJ oacbDalWsP2lNqsQa4ROZoMPZGGV44BjU/XQ/l+vEofz2VYF4jEGIe46Seg4EP5+DqPz1Yusx Xt0gOTJQvZexGQdoYjRv4B1mDe8L3SYQ+2OeL+v2pqJxDyRB6BQJK9dndMMbamn3JYS2elXPB yNMFoPH8nJixi7xCv8dTezPr+KqfPP4bftWbyCJ4axdr312s5cKMTV/TCAB5LOJvKSyEIN1Wu UBMdmrzXlyWimYOmBt8A8XczWmnC3hBw4fGel7Zl812ZoKAtBa7cDtZQoqOzbKB8J537cyWGM eQQpDUAV0GLKzTAdjhv+PrDGnwJOTWyWYWEBbSXxKlPI1gHCSG7vG2+FohAM8WrXDjFIjjE3t 5SgozO6yacEMiONomeTXSGxJuuykX4k/9PvT6Irjd8omRWJ58VDS3rtt+9rIy/W8wmq/8TgoD Vwfb8dWzimKgSptiiE3gs7BzPp9kKpgO3lZRFW7TJwxbeK7bezc9oiIFI/4jKlbjtYJRlOMdM 4ijxjO2YocrtfMOLH7Dd44omijbzyj/xU2WcTQh+yKj5ZdGyjGxQb+evP+qEi7T6fTAc+oAsa XscI7KewXUsOS2mmHStqD0o7+RM= X-Patchwork-Delegate: kuba@kernel.org The qca_spi driver create/stop the SPI kernel thread in case of netdev_open/close. This isn't optimal because there is no need for such an expensive operation. So improve this by moving create/stop of the SPI kernel into the init/uninit ops. The open/close ops could just 'park/unpark' the SPI kernel thread. Signed-off-by: Stefan Wahren Reviewed-by: Jacob Keller --- drivers/net/ethernet/qualcomm/qca_spi.c | 33 ++++++++++++++----------- 1 file changed, 18 insertions(+), 15 deletions(-) -- 2.34.1 diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c index 5f3c11fb3fa2..fc272ca7bdca 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.c +++ b/drivers/net/ethernet/qualcomm/qca_spi.c @@ -697,25 +697,17 @@ qcaspi_netdev_open(struct net_device *dev) qca->sync = QCASPI_SYNC_UNKNOWN; qcafrm_fsm_init_spi(&qca->frm_handle); - qca->spi_thread = kthread_run((void *)qcaspi_spi_thread, - qca, "%s", dev->name); - - if (IS_ERR(qca->spi_thread)) { - netdev_err(dev, "%s: unable to start kernel thread.\n", - QCASPI_DRV_NAME); - return PTR_ERR(qca->spi_thread); - } - ret = request_irq(qca->spi_dev->irq, qcaspi_intr_handler, 0, dev->name, qca); if (ret) { netdev_err(dev, "%s: unable to get IRQ %d (irqval=%d).\n", QCASPI_DRV_NAME, qca->spi_dev->irq, ret); - kthread_stop(qca->spi_thread); return ret; } /* SPI thread takes care of TX queue */ + kthread_unpark(qca->spi_thread); + wake_up_process(qca->spi_thread); return 0; } @@ -725,15 +717,11 @@ qcaspi_netdev_close(struct net_device *dev) { struct qcaspi *qca = netdev_priv(dev); - netif_stop_queue(dev); + kthread_park(qca->spi_thread); qcaspi_write_register(qca, SPI_REG_INTR_ENABLE, 0, wr_verify); free_irq(qca->spi_dev->irq, qca); - kthread_stop(qca->spi_thread); - qca->spi_thread = NULL; - qcaspi_flush_tx_ring(qca); - return 0; } @@ -825,6 +813,7 @@ static int qcaspi_netdev_init(struct net_device *dev) { struct qcaspi *qca = netdev_priv(dev); + struct task_struct *thread; dev->mtu = QCAFRM_MAX_MTU; dev->type = ARPHRD_ETHER; @@ -848,6 +837,15 @@ qcaspi_netdev_init(struct net_device *dev) return -ENOBUFS; } + thread = kthread_create(qcaspi_spi_thread, qca, "%s", dev->name); + if (IS_ERR(thread)) { + netdev_err(dev, "%s: unable to start kernel thread.\n", + QCASPI_DRV_NAME); + return PTR_ERR(thread); + } + + qca->spi_thread = thread; + return 0; } @@ -856,6 +854,11 @@ qcaspi_netdev_uninit(struct net_device *dev) { struct qcaspi *qca = netdev_priv(dev); + if (qca->spi_thread) { + kthread_stop(qca->spi_thread); + qca->spi_thread = NULL; + } + kfree(qca->rx_buffer); qca->buffer_size = 0; dev_kfree_skb(qca->rx_skb); From patchwork Mon Dec 18 23:26:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13497688 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (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 80D69760B7; Mon, 18 Dec 2023 23:27:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="CncXJ02A" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1702942018; x=1703546818; i=wahrenst@gmx.net; bh=JLNqr6ZdMiLbFP5ekzjOP/5KpTq0M5KcUbZp0TT8Gm0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=CncXJ02AqqjTOcbeuX8hcRCVsLgrjr8BHyY36POz0LMVvALOt/CPbceU0DjRTUjJ 1XYToLnjKfxDY5ZuH/YYEobjW+W0JwHCS/atyY1JaogfikruLQXAQZaBJNV6EUuHc Jp3okIA2zIpiZLtwQlQQrV0Sp/95tGzhKfNy6ekw/RNBbOFQfBLdRcwz6vliGLfyi dLMn0Fd32JC7vKYxMRNT0PA02qDMJHAN9IVR0MIlkjK5QLu+sAkwXpueSdc5Pi1p5 ammkSvNfqDARZ5HHPPY6CLP24pXJqqqL1cY09knq2516YntVZ7/AeGg7fdksi4F/6 bpflcvTaqRzgUjs0mw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1McYCl-1qjc683n3d-00cz30; Tue, 19 Dec 2023 00:26:58 +0100 From: Stefan Wahren To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren Subject: [PATCH V2 02/12 net-next] qca_spi: Improve SPI IRQ handling Date: Tue, 19 Dec 2023 00:26:29 +0100 Message-Id: <20231218232639.33327-3-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218232639.33327-1-wahrenst@gmx.net> References: <20231218232639.33327-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:YNUq4RcgqvtoejMtRqfuTmRA1/REVm8+95WBp85WCvMxajvRE5p c4wadQTGa6NT6pIotebXk9S4hCOgW4yQLOfh/w3zU3QssxlyPn2T+5EURnDMraUm+1my1WF jUEKS4x3+b/6mPztMfKDfYmoHJvMqHJNvaUr3FWoYRJqE2I8kXERRZZOoVaAsZTn2wS1jbI f67jyqzwjVgvDtDNDfkSg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:GoZU3jbR4jM=;MMz+ggwU67O83DoXEz9YxTGeJv3 r5kdGl+QOD80LMyw03WflIM4bnZODYRh6SLbRyvS3VSQEtuziw5dwICx0FyoN4DNFkS0rfk89 SRtuUwZWAN4bIq4HejFfswbqycHkTUUDTZjb7adP9ns+xwlIMIiBppF2hX7aLQuSrKahTqazZ MEEZI/X0pVBCDqIGxs6P2z+Gotj2UdG/Nb5Fn7+5FvPZNaoEaZ1tzKIT3lmF/QkNuWY9zUIgy QuVmmxb4A6JvgNhMATzhJt8UsAhV88xCgnS38e6US303w4qlsZEU5NJuMG+5RdmyeTls30Bdr JjkdR4ZoOPfkvJvUuIbU1imIPCjxopO3eSda/XaWW55Qx+Rpv7mSp3Tgt3CWHQ2P0DA1M1WB4 2MaDkOC+Sl8AcvNbcyU4z+5hOjirUPdGpNn4HUVShISQ0kMB3ppa40SsfsI0jNqRvgfHovNbp MpHAAVbp6Ps2rHdzK09N/tEUxo5YPv4pOFKVkx85vPS98MOsswe1CopYCzv/bwfd9NJOwBp50 CpN7xJaEZRm1YLbhq4ADBegtR2lEl1IOazryOM+JIcy8hxFcAfBiEYBGxNDHSbAZL2tHXPP5s x+2vcqMrqy8Y2a7fkeFKJY69ycPXRScb/HBZGQfbVYaA/hwEG9ult+M0Xzo3LEL/72RTBnnAE BD1o89Db403zm6Tnmo9aWqOkLiKc3DxS/Pn1qDZfzd9bVvLqXD/IZ1f+YIYSL/+/erG8PJe4i TECOEs6KprVKh6ltB8q8LM1I6fSNwI/Jml2bi+TUYKh3FPgcGhX+jzhsJx3VZngjBSwyFc6oS vR2lvZ559p36kPTgGyQpmwui/wZGabQKrxzsPR1IIQh8zo/r7snXjHD5gQgkP6i3Lr+juM7I2 WpeOwPs9f4LLtn19Vltkm5hb9pjLVqVth8hcXTxouPa6o6jxpHPVP9h4aCW04yzMH7DiwlOjp TdCcXyq4w4/VskjSN90QbzEHn3M= X-Patchwork-Delegate: kuba@kernel.org The functions qcaspi_netdev_open/close are responsible of request & free of the SPI interrupt, which wasn't the best choice because allocation problems are discovered not during probe. So let us split IRQ allocation & enabling, so we can take advantage of a device managed IRQ. Signed-off-by: Stefan Wahren Reviewed-by: Jacob Keller --- drivers/net/ethernet/qualcomm/qca_spi.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) -- 2.34.1 diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c index fc272ca7bdca..294d4ee3b38f 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.c +++ b/drivers/net/ethernet/qualcomm/qca_spi.c @@ -687,7 +687,6 @@ static int qcaspi_netdev_open(struct net_device *dev) { struct qcaspi *qca = netdev_priv(dev); - int ret = 0; if (!qca) return -EINVAL; @@ -697,13 +696,7 @@ qcaspi_netdev_open(struct net_device *dev) qca->sync = QCASPI_SYNC_UNKNOWN; qcafrm_fsm_init_spi(&qca->frm_handle); - ret = request_irq(qca->spi_dev->irq, qcaspi_intr_handler, 0, - dev->name, qca); - if (ret) { - netdev_err(dev, "%s: unable to get IRQ %d (irqval=%d).\n", - QCASPI_DRV_NAME, qca->spi_dev->irq, ret); - return ret; - } + enable_irq(qca->spi_dev->irq); /* SPI thread takes care of TX queue */ kthread_unpark(qca->spi_thread); @@ -720,7 +713,7 @@ qcaspi_netdev_close(struct net_device *dev) kthread_park(qca->spi_thread); qcaspi_write_register(qca, SPI_REG_INTR_ENABLE, 0, wr_verify); - free_irq(qca->spi_dev->irq, qca); + disable_irq(qca->spi_dev->irq); return 0; } @@ -987,6 +980,15 @@ qca_spi_probe(struct spi_device *spi) spi_set_drvdata(spi, qcaspi_devs); + ret = devm_request_irq(&spi->dev, spi->irq, qcaspi_intr_handler, + IRQF_NO_AUTOEN, qca->net_dev->name, qca); + if (ret) { + dev_err(&spi->dev, "Unable to get IRQ %d (irqval=%d).\n", + spi->irq, ret); + free_netdev(qcaspi_devs); + return ret; + } + ret = of_get_ethdev_address(spi->dev.of_node, qca->net_dev); if (ret) { eth_hw_addr_random(qca->net_dev); From patchwork Mon Dec 18 23:26:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13497677 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (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 6398F740AB; Mon, 18 Dec 2023 23:27:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="hXiW6q7l" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1702942018; x=1703546818; i=wahrenst@gmx.net; bh=KNA5Ey5ARW1f17DhRal4nGxTPTGg+Xp1KyKMJRAqqSs=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=hXiW6q7lbfDWKr9QxJAY3ncDDLJzNl1SqLKLiRdnsLUGU953XOCsQsxRNScuCGJ/ ds4DpAxWf5bFUTsXxmxGxyWtEpF53DCKXANuRSjRIjfy+Yf+WG6wuhFY5WVLrOOdy I1g3kJKz+V0JxdhAfGgbYeiWbGgTBGz1cGvdqOEnn2gTmL9EPWQqaFlnPIH7ucIrN hP/rkixXZg0ZgBRmIPH4AAg7aBB5ANWKKY5DjlCT4y1nl4I+NCCA/jEI0TjbdSKN3 D9TjjPmZzjC37LYXzqjAsjxvNTIqPb44kZZnK6Bm7+KNhFsFhRAvOa0vHLwv4aImt 9p2JeHgfRdekTlN2QA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N0oFz-1r3JkF0zOH-00wjsk; Tue, 19 Dec 2023 00:26:58 +0100 From: Stefan Wahren To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren Subject: [PATCH V2 03/12 net-next] qca_spi: Avoid skb_copy_expand in TX path Date: Tue, 19 Dec 2023 00:26:30 +0100 Message-Id: <20231218232639.33327-4-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218232639.33327-1-wahrenst@gmx.net> References: <20231218232639.33327-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:Yzr03lEen1C7q1Gdl24/3jQPKEPo65IOvU8wDQLrXEwlNrWNAcr irbiNlqS8NpoRv6O/ziAx6nTXSxg87/OLSGHh7cxtwKBNiB+Gus7ljRB7+PtKNCyPjaRuto Ul1kZUaQRCR6ApbrIheuLP8YMIleTfHXAzlm98bzHTTaELWHaC3YXcy0AUcv+oyS4mMsa4W CTK5mdkFj7BIf0CC0Q78g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:LG9IO3+MHzM=;MX3gm0H+T9MTYmbGA/EWXT4ZuLY jVTLMpilaxvg2wcLXYtrSZ2H1Vmmmc4eyRdCzJF27Q2PTVL4O/tOCw7fPOYpxEpkBux5udzGI dOt1A80MR2OS/DJ5zl6wsnQpFIUdxApPqPjhdyeeSH9yBosawYlGySx9/b4+gfDNMb3gpS0ne v+yU2pgqq0bWgyAZM1Kr+yMxDhJv916fqklGOD20wKwe0P2MBlomvuRgSvm2t1qZq248UqOtW 3JpD1Zkct3YER7W988DlsxmvMpQJUEEBXPcaBNx/FR3IteyCIPJR3ZBQxsGuqgL6HmuiGJ9S4 Kgd6zBocqlX3foDo99pjPtARndA3o3TywoPxoJUd9e8x4AG4AVx/JtmzpilL86fKMOw7bVqZ2 EGCR98A/jLuNzn9VUs9i6PDYhV0MhTD+oJmERJWbOObIM1Dqr/d2sFCX7kACSp0ia0QtHaz9h g2MW5iRkfOvHTLSvnd/wRUooAbLsv5Vp6TLxAd+yZ8kWYYJ6UNVF64tt7lLgYp7Xn+hXp0Nne 8kAPew3+Odhkhc3P5JQrsiQlSgIk1WUNhgpz2MeHEoxJEkQsFRZCLhSdPjygIVuzaSqy5I9Li OlLDRU2QMdB7kAVzxjuEJOvJG/IkscGAyEvgJljFIbdr/xw3aU2ibQrNUd0Syxta2bSuelPPV uAyCdPV1CEUcJT+krY6CgzcFU2GOIOa0iPFnt0KWdfovZi/IUEo/CUuTDfCCdoyjVmL9UjTzH dkKmesWd2mN4fivjNsAkrZ1f5YoPDzw3wDUnKy9NgAzjUcFII6wXryGhHWlycoON9w5beeSV8 pVmmi2IQWbI0aqvn225YIIBqnoVhwtCt1rUomDi8HtNPQsfe90pqKxs8qBCM1V15QkvweEU7I bkD7918oq2AnwQBRULbWeQLMcIToBV11YfpAMMl3NLFRX/W27Ahhl3zOX4YxKPXGBjLw056Wx TqkdT86nnbV9bJzZwoVOB3vY9dM= X-Patchwork-Delegate: kuba@kernel.org The skb spare room needs to be expanded for SPI header, footer and possible padding within the TX path. So announce the necessary space in order to avoid expensive skb_copy_expand calls. Signed-off-by: Stefan Wahren Reviewed-by: Jacob Keller --- drivers/net/ethernet/qualcomm/qca_spi.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.34.1 diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c index 294d4ee3b38f..919a400412cb 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.c +++ b/drivers/net/ethernet/qualcomm/qca_spi.c @@ -877,6 +877,8 @@ qcaspi_netdev_setup(struct net_device *dev) qcaspi_set_ethtool_ops(dev); dev->watchdog_timeo = QCASPI_TX_TIMEOUT; dev->priv_flags &= ~IFF_TX_SKB_SHARING; + dev->needed_tailroom = ALIGN(QCAFRM_FOOTER_LEN + QCAFRM_MIN_LEN, 4); + dev->needed_headroom = ALIGN(QCAFRM_HEADER_LEN, 4); dev->tx_queue_len = 100; /* MTU range: 46 - 1500 */ From patchwork Mon Dec 18 23:26:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13497678 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (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 4C6F2760AF; Mon, 18 Dec 2023 23:27:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="uBEDHZ4G" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1702942018; x=1703546818; i=wahrenst@gmx.net; bh=rYispb63UqZXzgy62A/1FZAm7a2jT8FXIlaZMoImlD8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=uBEDHZ4GuwcRnxfRfgCQLm6rape1oB2acFX24XOrfWLYRgF7KmW2R2rOsIbI3/Il KNoxyQRNk9riQc0r8kNKUbRTQfYAphQC4SMkDxSkWHWGj8S1tNf3M+lUKHPwgNP9d 6M0S1MuuO2oxao0yYjzD7TZ1hM4lHRsem+fP63O4g+dAdQMBgWrWlvfqqIJwphhD2 FlEc8OBu9bJ/6SMf7o5Ai64eUd9omOzHM2PurkYqvftaCti+08QBTp1V+qbzfZHcJ Nmqsy80czTY+b6ycCoL4BRMV2TbDNr7KLDMKMQ/jlFDc4ZMUdS6B+EJpWK9uRBOZe MSLwW7FqHH/FIC3rHg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MwfWa-1r4hzM2Jly-00y6OX; Tue, 19 Dec 2023 00:26:58 +0100 From: Stefan Wahren To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren Subject: [PATCH V2 04/12 net-next] qca_7k_common: Drop unnecessary function description Date: Tue, 19 Dec 2023 00:26:31 +0100 Message-Id: <20231218232639.33327-5-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218232639.33327-1-wahrenst@gmx.net> References: <20231218232639.33327-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:D6RC2f/kUGVv9viHTbJoT47ji2//MytN2OKS75YmlCv1z3Q2VqE 8ycIVaHgadBzdjOdEDlgG8p1y3X9evJiYcUWxo1k+wGh3D+JXb0MZQZp83aWY45K2alMOj1 3OaYA2NS+QTHNiBFFsMxMkZcs7ROCKHx8ttQ3wzyM3QCJ+PruSgdRURduXUhYnYitikVTY6 dp7kTXWyvovWXN/JSAp4w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:uiX2OlXHdEg=;mLMjz4C3bQ/63Hrk/6nfAhlmsUd 8qtBB/j9vEFV6qUJCNRfcGA0MqydtyHQH5GcoajE7nbHNpF+B6qYh/rHQmI32/unKW1Bx1O/V FLKreI5wueHiBTQXMZXW5VKhqy1kCZ8CwBz6siNlYAT+IysJAlCF78bdw7y9Ky2sX+fjuTZ6N R9l6QSPuMMVO1FdKSkyvkHU314i9U7YjDXpWsSgLuybieC6quz+Fe1k6B1wxjmixAcnwwVv1M CqxiTU3kyzsfZZdPnc6mqa4rXkeqaOEzaWBU87EPb2vtHKFXBDD4u1XMyj6g0OcxOypYwAqrB nnEW1ACjIhgEblFkHy6fb6R/2qEHd7DIk5EAlybd5K5xgpAHLeRT5+I7rfNatR0Ksxk/R7DOc BeZEG3rvEm9YT1zz6NbmTK9f/IHX07xjaaU0TcV/LJHQlM621naH5Z1jB/3Rq14lRckqbacJX rMMPUvInltB9O/+6f0EMZaVsvd7PwoqQLALfMDRnaa6jOrCYB8c5pa94e4Ny9LkFkxKXt6w/O Vp4pj1xzDEUV5PaSINsstpY2+tAoa3vNphn8U0izW6R+DrhOsec3wXOwdXoFf4r97DacvD8xx A4UJMZeh6JXGrpeWSxT0NgOSdZ8sWpMClRUbpkF8nZYy/UawmJoLeWIlYSlXYGW4y4iv04dV5 I2HavE8NGQw61U0jfEYHNp67e92CAH7kbCAjAk5j9MmS2jcOXirOhsEEJrBq5c4BECvSvyd5n OCFIdcUtQZZv2tY/1dz/vEDFmGGL+Ymh/A125F0q4+3dKGDCr0kAtNaAt57POFoC8K3USas6p ZpFBtx5O3GnZc23d6ue2RshNILGgX1T/4W0qIdgB33oo7A8SfesDclf1C58Lb7F5nqMFaJBDM lPr5PE34bIQmgw7bc3YhG+wfA2xEuPhm8pGfVqNZCl2I4A5JRtWNtVpAgpUMrriA36NvGi/cJ hme52g== X-Patchwork-Delegate: kuba@kernel.org qcafrm_fsm_decode has the almost the same function description in qca_7k_common.c. So drop the comment here. Signed-off-by: Stefan Wahren Reviewed-by: Jacob Keller --- drivers/net/ethernet/qualcomm/qca_7k_common.h | 11 ----------- 1 file changed, 11 deletions(-) -- 2.34.1 diff --git a/drivers/net/ethernet/qualcomm/qca_7k_common.h b/drivers/net/ethernet/qualcomm/qca_7k_common.h index 928554f11e35..71bdf5d9f8d7 100644 --- a/drivers/net/ethernet/qualcomm/qca_7k_common.h +++ b/drivers/net/ethernet/qualcomm/qca_7k_common.h @@ -128,17 +128,6 @@ static inline void qcafrm_fsm_init_uart(struct qcafrm_handle *handle) handle->state = handle->init; } -/* Gather received bytes and try to extract a full Ethernet frame - * by following a simple state machine. - * - * Return: QCAFRM_GATHER No Ethernet frame fully received yet. - * QCAFRM_NOHEAD Header expected but not found. - * QCAFRM_INVLEN QCA7K frame length is invalid - * QCAFRM_NOTAIL Footer expected but not found. - * > 0 Number of byte in the fully received - * Ethernet frame - */ - s32 qcafrm_fsm_decode(struct qcafrm_handle *handle, u8 *buf, u16 buf_len, u8 recv_byte); #endif /* _QCA_FRAMING_H */ From patchwork Mon Dec 18 23:26:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13497685 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (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 B5010768E5; Mon, 18 Dec 2023 23:27:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="YK9vvx2O" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1702942019; x=1703546819; i=wahrenst@gmx.net; bh=pMOm0QZ3NBUI5Myevq+RLLh5bsvVZgcSKMIaZJHXflY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=YK9vvx2Ooekz6IUX9Qyh3JQLgppfBNnB1lvACzVPehU3hS9VGVX6ToDxJ04yQ63T kbmsGiwGt+huXuqFLIAQAhwF7IyVD2ge/Ytvb1Atv0BIiHcrS9TJ7F1Wjg/AJqILQ J9ZAIGkS32qdT8pda7bSYEEsLLHZUY+rZKegpJ+Dbpu377bUdfogMP22VFut/ZrQU 9fpRCSCCqpktGJBiqo0JHdhcjcMN0oOnQFqomH6pqaMFlEtBKxSTx8VTjjvr6fofg 9CuMYIzm/5mLVc4K6VRhDMGYTUETXJ+bT7xk/gsgI9yLbK09qxHSvqabWdNeluxrM 4tSkmDj9FLqizE0bOQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MfYLa-1qmcuI3gjY-00g1JT; Tue, 19 Dec 2023 00:26:59 +0100 From: Stefan Wahren To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren Subject: [PATCH V2 05/12 net-next] qca_7k_common: Drop unused len from qcafrm_handle Date: Tue, 19 Dec 2023 00:26:32 +0100 Message-Id: <20231218232639.33327-6-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218232639.33327-1-wahrenst@gmx.net> References: <20231218232639.33327-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:XkLNZ/EhM3P0+pfDc1E+jDqkkHrWUpS8R/cnMD2uXSFhyl+XIsV bB22bq6x6DrwjKCYzlFgV0Sm+Fdsn2Q1QJN+kIy7kvKSOHcWA0Z3dXz+ZmCrshvfkx+DrZ8 5Sx77+OFVKAp5ct35rHY6RVCvo8fqPkQvygqwcjjMMunuD+2CyXd03PBCPW+7oH+GOq4vRy PyrT9txMTKsyS1vi1Zmug== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:xdhFbJiAhNo=;fRP4e0dccJvn7fTRc9DZKT8R23M ig8T7wo99xZGmVV1yPRs3I6ROBOtpNbspQHB3uRHH74BODShqKQJab1q2jH2j3/lIcbZm1Uqk Dw0KZTDCHmMZA1kvFZKEkRGBc0YU8GX2pxY4/IoWAvO9WXfCSIxaDinuNHu9S6/QxicpEvOv+ IIqeVK6ZMKVTChn7dd9lLjMmX52CVogjWX8eySJTx+IrP1H5y7wQHqCyPC59FiZw+1fryVbpu gVYbweHkhpvowUB+2b0L1KLSKf1e4A8Hy0oI/az0qPMkdixwtimMPN9uOzICe0EWJ50wTl9N4 19hAEZry8rijTQeLoLC1rd+tW14T7/k8t2cXTZzI99qQvPq5+AUXebUpZ3xsl1ymHLgrhH4XI jwsON84HnRQAdy3+54e+1ESTOmSL04BQJf7FzIQGFfvw4l3ROE3QViRNc0p0qjsCGLYldBmIT CKgm3T9VsXCLThDydAV7E2kX3B3IOUG0SThTgwohttjvsrLoYBa2qhLrFvLYXkk3tNN/QNZAP d9P3VwsIQGL6Rhyja4fNTusrNPuw70tQOTIc9GRuz4+9zq2WdPfr5bPHoMr9mfCazSPiRXVpb M2Dquun7ezyL6PsVdLp0kLKfenpCvPzSOnrxM+cb6NuQvIDg10o3SObYBLN1TT1lqmxzZ6l4y WgrNIWbD+kIt6Qbr6YXyNDrFy3TTPJVi44vVyuRvatwRhj23jg/jnXHBPMo4IWGRFNZDAnUp9 B2bgSYkBg93bxJKjGaeqriogVNoBucRUHe1b/08rymqQqzeV2KT4tDccwoY2j0xxQG6Y9r8Cp OdT6TkuJsFWlFOQigKqqkJAo29809th5deleILTlIqjwYyXME8+zSYKStbpIrcqe9aR5WxkAU VUkiFbxa+NgT6YLHPnnZbsJeEcCnF0OyMtoz0dJATrapEyQk5R+E2gUzTD2vgIwg1hDPVj/8g GgPOIEmTbHmUc5RbWrffEVwMcNM= X-Patchwork-Delegate: kuba@kernel.org This member is never used. So drop it. Signed-off-by: Stefan Wahren Reviewed-by: Jacob Keller --- drivers/net/ethernet/qualcomm/qca_7k_common.h | 3 --- 1 file changed, 3 deletions(-) -- 2.34.1 diff --git a/drivers/net/ethernet/qualcomm/qca_7k_common.h b/drivers/net/ethernet/qualcomm/qca_7k_common.h index 71bdf5d9f8d7..088cca7f61db 100644 --- a/drivers/net/ethernet/qualcomm/qca_7k_common.h +++ b/drivers/net/ethernet/qualcomm/qca_7k_common.h @@ -107,9 +107,6 @@ struct qcafrm_handle { /* Offset in buffer (borrowed for length too) */ u16 offset; - - /* Frame length as kept by this module */ - u16 len; }; u16 qcafrm_create_header(u8 *buf, u16 len); From patchwork Mon Dec 18 23:26:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13497679 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (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 46296760AD; Mon, 18 Dec 2023 23:27:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="LVFQ8+dA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1702942019; x=1703546819; i=wahrenst@gmx.net; bh=ATxU7wMSMtD0bHBBcfJuMS+/O0nKa9cCnqr0XhKW9G8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=LVFQ8+dAUv7lLg/+EOswhwj8vzo4qE1wZbJlOuC4It63T26l0C1CLLXpCmvKIRZF TeLI8jHiUnmk5CoTzVLZ/2RpmKuSI0R50Yyx1NSHCrBYOM+P5LAbO2FXhK/0Lo82n i7Uz/wtxvQY7yLNwBmxqjiUU9jr5qUmb/UQZCW+akPrN1NEJ8OMMiDbgb3Vib6Q78 f8qEGri1+M8Ir2Xjzuwh887tfM464dStsegTy9VIcErS9OH2Oak68Sukj6Dhyt2XV /I+rmU7c+clumiVmiBFsN8U6uk9t/nDyh1VTnCGn2DhZ4W8Z8vYTuaoOW7ZOImyGg 3hwLxStLMMs3DkHNGQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MdvmO-1qhgQ913lW-00b4In; Tue, 19 Dec 2023 00:26:59 +0100 From: Stefan Wahren To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren Subject: [PATCH V2 06/12 net-next] qca_spi: Add QCASPI prefix to ring defines Date: Tue, 19 Dec 2023 00:26:33 +0100 Message-Id: <20231218232639.33327-7-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218232639.33327-1-wahrenst@gmx.net> References: <20231218232639.33327-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:7KE+AW/+kLGLekatA9aLHaa5Jt/x/8as9hdPn+js9I22RFc4HKQ BTPKjtWmGkeOjRIZ0TcrJrEZJBr6k+ONVmWrc9nrt4IMwWDC61eprK50Upu8hNvVqHRKMl8 S1A34GAlJIZLWncZ+9sJp4MzAEQmXPeTkwYeedDjKBv9s36B1OkboI+Sl9jMxKRN+UD/0S/ 6gJDENQ6rL+BVJcv0Bnuw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:2dskVjD6AZU=;/TF7XOTvB5vhsrfFEtjR7hdgZH5 QLn8tNbYPhRpjjE8PSZFhVpGCyLm5iwQxztzD2iTBJOgVOS8RxejsaEotlrbflDCLtMfhr5Bo qf/Btug9ZWaM6b5QDyi76ToLmp/07ZCTZYkI2J3cSsA/loWtSgfAalKBZUkg7soGWtiQNqJVR nE2fHaIUguzClSD6DlyJCjGVFaE8e7F19Bh3aQ01rk4eakIdQhRethYK/lEuc8EEXAmiLlBke d98E/cvXP8/DyPF7pnmWk0r0aY/10G/shXreukWAPlfzaXzKjCCw5cdccBB+6JiUjIiyVEEBH 8YEPhyInF/4h/OolJ6Abgro+dYkMYqNik0UFnBq174pf6UkiDMvoIHYbznRBxYgf4fBs9kPgH 2DzTEckQqben1ZYC78a2zhnTSSHMiBW1pnrw7s48RFKoBQkzPzR8IZGs7cqqjVKK+BWKmonZF OpnZaFZn1NrkIC4PliR3oTK94aBduFJKzOnC40hAfYtY81l1JZ8ehBFc2PsW953iD39cGnw0C uh4aE/4P98t8BX2fPLQTdIEssGT+NelA/uHJp2dRhQPY9pjMwy3ZkmhAgnTUK5a25qO1dZqCt XO9FvcrnP2e88DK+B/BFN65cGD2yqlj/qLyJV3PK3l+WyfUiPs+wU0w3iQaxtInu+tEB89XKn aJjMk8IjcCnW2TnVfnPAExviUTpuS7wNNpybuf9C2lVUgliUFxWDqwmWvuNWrqZa++jl77laT boWL4dTyexSF04TnlHEj49INY6NDW15lysw0H927C+x36ifAmqvHmfmb6t8s4dQxbqLV3+Pjc hP9u/eGx9XeQzVkSyLC8IO2jKvqcSm/LLQGefyqqA4fyqcCQY4EjwRDdgdWSbpUeRzMEzQ9zF RTVoiphXgLpY06cNK7C1e76gQS4kNN57i6VBrQmz8NeFM/MBmDHaT0LOEHsrALh9rZFjel9Ty 0iOi/DpPKndn04KsZLlbmZGQoKI= X-Patchwork-Delegate: kuba@kernel.org All defines in qca_spi.h except of the two ring limit defines have a QCASPI prefix. Since the name is quite generic add the QCASPI prefix to avoid possible name conflicts. Signed-off-by: Stefan Wahren Reviewed-by: Jacob Keller --- drivers/net/ethernet/qualcomm/qca_debug.c | 6 +++--- drivers/net/ethernet/qualcomm/qca_spi.c | 4 ++-- drivers/net/ethernet/qualcomm/qca_spi.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) -- 2.34.1 diff --git a/drivers/net/ethernet/qualcomm/qca_debug.c b/drivers/net/ethernet/qualcomm/qca_debug.c index 1822f2ad8f0d..857883d0b5ed 100644 --- a/drivers/net/ethernet/qualcomm/qca_debug.c +++ b/drivers/net/ethernet/qualcomm/qca_debug.c @@ -255,7 +255,7 @@ qcaspi_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring, struct qcaspi *qca = netdev_priv(dev); ring->rx_max_pending = QCASPI_RX_MAX_FRAMES; - ring->tx_max_pending = TX_RING_MAX_LEN; + ring->tx_max_pending = QCASPI_TX_RING_MAX_LEN; ring->rx_pending = QCASPI_RX_MAX_FRAMES; ring->tx_pending = qca->txr.count; } @@ -275,8 +275,8 @@ qcaspi_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring, if (qca->spi_thread) kthread_park(qca->spi_thread); - qca->txr.count = max_t(u32, ring->tx_pending, TX_RING_MIN_LEN); - qca->txr.count = min_t(u16, qca->txr.count, TX_RING_MAX_LEN); + qca->txr.count = max_t(u32, ring->tx_pending, QCASPI_TX_RING_MIN_LEN); + qca->txr.count = min_t(u16, qca->txr.count, QCASPI_TX_RING_MAX_LEN); if (qca->spi_thread) kthread_unpark(qca->spi_thread); diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c index 919a400412cb..2ca25844d91c 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.c +++ b/drivers/net/ethernet/qualcomm/qca_spi.c @@ -476,7 +476,7 @@ qcaspi_flush_tx_ring(struct qcaspi *qca) * has been replaced by netif_tx_lock_bh() and so on. */ netif_tx_lock_bh(qca->net_dev); - for (i = 0; i < TX_RING_MAX_LEN; i++) { + for (i = 0; i < QCASPI_TX_RING_MAX_LEN; i++) { if (qca->txr.skb[i]) { dev_kfree_skb(qca->txr.skb[i]); qca->txr.skb[i] = NULL; @@ -889,7 +889,7 @@ qcaspi_netdev_setup(struct net_device *dev) memset(qca, 0, sizeof(struct qcaspi)); memset(&qca->txr, 0, sizeof(qca->txr)); - qca->txr.count = TX_RING_MAX_LEN; + qca->txr.count = QCASPI_TX_RING_MAX_LEN; } static const struct of_device_id qca_spi_of_match[] = { diff --git a/drivers/net/ethernet/qualcomm/qca_spi.h b/drivers/net/ethernet/qualcomm/qca_spi.h index 3067356106f0..dcecb072b8eb 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.h +++ b/drivers/net/ethernet/qualcomm/qca_spi.h @@ -39,8 +39,8 @@ #define QCASPI_GOOD_SIGNATURE 0xAA55 -#define TX_RING_MAX_LEN 10 -#define TX_RING_MIN_LEN 2 +#define QCASPI_TX_RING_MAX_LEN 10 +#define QCASPI_TX_RING_MIN_LEN 2 /* sync related constants */ #define QCASPI_SYNC_UNKNOWN 0 @@ -54,7 +54,7 @@ #define QCASPI_EVENT_CPUON 1 struct tx_ring { - struct sk_buff *skb[TX_RING_MAX_LEN]; + struct sk_buff *skb[QCASPI_TX_RING_MAX_LEN]; u16 head; u16 tail; u16 size; From patchwork Mon Dec 18 23:26:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13497682 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (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 F3E8A760B1; Mon, 18 Dec 2023 23:27:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="jIg1x+WX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1702942019; x=1703546819; i=wahrenst@gmx.net; bh=NLGzEdJ+SI+lSaoV8ppjG5PYxBlLkFmauKl8qe4TW1g=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=jIg1x+WX6JYFikmWCcJpKPVpxY3gutn7YrL5TKKftjtG9eQfhzXI0VpFP1SEbbGz dvkw4PEYXmeVqwCWrYe1fWvswue+uzfrvjvldC4m1UjTjAJMa6uNCjlddZWTeEZIU uqFHVi/cFSjOaVUerojQ/CML8J4wrkLAENRpUXf2sehauVHfcWARxvb6h1OTtfR3u 6ypLtXdPONsdS2z7xm0lkhJDVHHc7o0w24Hb+DYYbbmz+5rwFPpDNC6hRIhXjC4y5 7wdYCMZqPJuTK6LL4agyfByQ5PoI6o64gY21N6BSb1P9Nslk/rkisz+kHfXpQXAj1 qrDKXj6sWa7zvrJdlw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MkYXs-1qsj3F2VHa-00m5qn; Tue, 19 Dec 2023 00:26:59 +0100 From: Stefan Wahren To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren Subject: [PATCH V2 07/12 net-next] qca_spi: Introduce QCASPI_RX_MAX_FRAMES Date: Tue, 19 Dec 2023 00:26:34 +0100 Message-Id: <20231218232639.33327-8-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218232639.33327-1-wahrenst@gmx.net> References: <20231218232639.33327-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:KFlCFdUSB45Y2CLJc3t1+mnM1qO5ku62SR01doxFtFzt50W+Uzw WEiAUTa43y18qEeB7ipitfxX+FD/qoc51hdvss3QNgWMH5rUpWQlQGJ1lwjhAOUBjnL9Q+D 0KLO7jgUosxRD6dwPEyC5GEEU4sXENJ2BKEjZqsbNqTQ3iI6Zq1M3CMKv4lcCVmYsZZJF4D hyL3YrT7U26ykZejpTI4A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:jASN/hqZtiE=;buY8J4G3yt8Adxd1cSd+ia3SaMn C2rtQQd8El2C17b3WkCBNN0/I88oCPqOWEEkcJNDqkeyVJeD+HLlTCtfbK+5e5Uj52X1V/ll0 dKHVN9n9OA29hLvMaa9IXKTNjXHQUFU33ZDvVciavpISU+VAF8RONLntbNMu2HdDRDQdVL+zG pLFQN+bJcwWwmvqvV3qqOHIlxpVpa7Yw9I8DuyGPOCBuDvKlpDkv47H4M6sgxEZlezV+fkggJ IzERLN1vcnGEDHsr/1QIROcO/KdIR7LcyuxFn9OxH5HoHno3GPMHfTh0g/At0+pjKPTjwKQQ4 aalIGUE8BJo7XptcycXRA0NqTngpDne1fD3iN5Oebjxd2VVDgvQXWX80rMK3SZpULCXaD/z9/ Ji6NdHodQqKZAIBztGlkAGBis6EM24AS0FWFASVHQxJTA4yHPH13wIYzRAonrfzW4rHeDIYxQ 98eLQSWOQ2FV/kzisoQemRx4iX6IsQipVUIhRCsITEJFCC7c0Qp6bl9EaLhJP2mfp2Eo8vXBc akDKX7aff0ro1wVjP0RsYoAvOw3zjpS1iezr4NqNtNUtLzqJOwJc4e4Nd4PLVx1oETaIV5m/I cNxKwxZyqP+Ushs2aezYeofdVn7foojmON96CsHpkcyh+cCYXzEol/wsqrufeb6KdQAFVGNyQ vt2V9fcvlMPHKwtNpEBYcGSEuCC0LW1lLgUHoEgEVuSd4Zwje6Jcby1fqnGsZDkZ4kBcV6sTe VQc0KL6mt0voVuTvf5Q9s9u+KOZgZPpONMZU5JX090H975BfLTFg+Gp/9VfyCHZyMzajA2BWO 9m3dzQH8VSGlL3mxxb/5X4WcB7qCwEZW8d9sOpUJHUTxB8cqfedNn8rwCPtYiak/+TdksMtYG FhaccogcoFTFw0I/UNRuqf4KL14OqbEAH9Lf/gb49shf94FVFlzd+zzJ+yUGeQuJn8aiCGDsw tDyAYWZwJsh734zcymBgLoDYKDA= X-Patchwork-Delegate: kuba@kernel.org Currently qca_spi reserves enough space for 4 complete Ethernet over SPI frames in the receive buffer. Unfortunately this is hidden under a magic number. So replace it with a more self explaining define. Signed-off-by: Stefan Wahren Reviewed-by: Jacob Keller --- drivers/net/ethernet/qualcomm/qca_spi.c | 2 +- drivers/net/ethernet/qualcomm/qca_spi.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -- 2.34.1 diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c index 2ca25844d91c..80182f8a4a50 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.c +++ b/drivers/net/ethernet/qualcomm/qca_spi.c @@ -814,7 +814,7 @@ qcaspi_netdev_init(struct net_device *dev) qca->burst_len = qcaspi_burst_len; qca->spi_thread = NULL; qca->buffer_size = (dev->mtu + VLAN_ETH_HLEN + QCAFRM_HEADER_LEN + - QCAFRM_FOOTER_LEN + 4) * 4; + QCAFRM_FOOTER_LEN + 4) * QCASPI_RX_MAX_FRAMES; memset(&qca->stats, 0, sizeof(struct qcaspi_stats)); diff --git a/drivers/net/ethernet/qualcomm/qca_spi.h b/drivers/net/ethernet/qualcomm/qca_spi.h index dcecb072b8eb..f735ad77402f 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.h +++ b/drivers/net/ethernet/qualcomm/qca_spi.h @@ -41,6 +41,7 @@ #define QCASPI_TX_RING_MAX_LEN 10 #define QCASPI_TX_RING_MIN_LEN 2 +#define QCASPI_RX_MAX_FRAMES 4 /* sync related constants */ #define QCASPI_SYNC_UNKNOWN 0 From patchwork Mon Dec 18 23:26:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13497686 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (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 51A91768FE; Mon, 18 Dec 2023 23:27:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="WjPInH1l" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1702942020; x=1703546820; i=wahrenst@gmx.net; bh=kVgOK4uDq2cMVF22bM1C1q4emK/CUOe/qBAvKkgt52E=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=WjPInH1lX3e8ZyY+tFYOssTdkd3aX5qOOkCGzgiHGHg/eolx90JzXSlBj0AaAmII 3cS2CCrt2uq7GfgiY2oaSykKHFnMz2NtDokV+j2X45kdhp8+eOKaed3bxwS7Y+DCd neSEOv9G1B/d+ZYTZtwQtzP5BwXfkqJ9T4N/9Ba08Yzu2GR605EV1ShRlMz1TH8A7 1f5GSQDiB1jzzFmbTM+X2szYsj0atjCQG0Ol9GTquLI4AOmjwgK1oNij5aRFBuyq8 fraf2Ndg6NhLGtL1JYKpPHatSqxDDkBMpNojOe5GqhabgiC2211pcnXaRtfc/0AR7 cck1TnCtQ5vCr39kxg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MY6Cl-1rnh7u3ve1-00YQgA; Tue, 19 Dec 2023 00:27:00 +0100 From: Stefan Wahren To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren Subject: [PATCH V2 08/12 net-next] qca_spi: Improve calculation of RX buffer size Date: Tue, 19 Dec 2023 00:26:35 +0100 Message-Id: <20231218232639.33327-9-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218232639.33327-1-wahrenst@gmx.net> References: <20231218232639.33327-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:1NUjojGG/T/8z6MjnDewqJEZgLj6mU1LKH7BkB4IXtu6N4HgOlD Kx6g9/QDQ9FZbCB5930t5D+1vLMxCfX64J+Kks2QzSMM7UszBxOCb47ohjP4FHhTTiHEOYJ 6jNn5jBz4u5qWbuvGtL1CJEymEGuz91Q6d+OAKtdp5HIvkcUA9Jnghy0kgqGy4B0ff1u/IK d4yDsh1NMUKtISnxyjbow== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:zaFDU2drG4s=;z22aI0GjLMAtYAPsUqCy6xqcRSP M61WcB+IMZos/C71UkiDxpM/40jLqM823flvrvyhcj6qyanoViLu5ADJjWlZZtau+0p1Az2fQ vbcv74rmjEz46YdK1rWWWh4H6fG+RXObABsG5DCFzT1NcsqAqhb6fATKdUWkPdZXusYdt+cP0 cIPr6WQ+5EOcXDrDpzvOWoTx4R1uD9gd+L/3hIBiE6E4g2fcXcoYYAbdF4gtsF4Uia6mn91Gy soxUapxBMcGWNP0BRaqtLmok/Z9yCfr9XwZcjvuLKTfx6kbBUK7pLJloXVVdpQWQt6sMwONOB rBrxcGh9aOLlsnL5VpLLVMmOMuS8J44l2UIlp7cjG39DvuLxB0ZG/0Ir+A8v0zaPHcDVO/BJm c94IINXb+nG7eUpT6JeT9FuG/9r2z8IDSWcpBq54oKgFIeLacUdtcgw74755aan3o0O3cL39x aAjoV0xvN4DgDVyUQ34XYXSfoC780W4OclKRsCyn1s2qgvJ3GtSnRVk0S6OQQqbPMPIKyTYLh fX40xnh39H0pS4pu+QWw+iz48TuHlRMXgFCuK5OZH40i93mQ/i8cUHLK47dssmIrIQAmdie+G c0w1eu0/H0FKcjOJvn+pfQrF5eQoJ9M3TrN8h07J+DmPcl+ob2QA5woaIHtGDXDXBRqu3eUOy xKerGsvnzM/yTCn0H6uba0v77gXQWsydsJTBAekTlbZhBBtMOHPgdU6aM11YdnQS9palyvAJq OKxxIMNgRtnYEY0L+xlJz/ZcFVnlDeYn+DGfdJTVSb/aGHJcTyrcbjs5C6XBLFXeIgLHDHtsW GrXVFQRwgcbFTiMa4ulGESbciI25CnQiigzbVeF+ADfxAArjlkbOtUTzkNHhsAr3mzfwA94Ou LSjlubLJQKyrdlQ+KTnipn/CAfyuaghZGo2C3o1EPTx/Uu7ckZ4LKiGBNWU2U92h1HGnHD5Y9 tfjwSQ== X-Patchwork-Delegate: kuba@kernel.org There are two points with the calculation of RX buffer size which are not optimal: 1. mtu is a mutual parameter, but actually we need the maximum possible MTU. So better use the define directly. 2. This magic number 4 represent the hardware generated frame length which is specific to SPI. We better replace this with the suitable define. There is no functional change. Signed-off-by: Stefan Wahren Reviewed-by: Jacob Keller --- drivers/net/ethernet/qualcomm/qca_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.34.1 diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c index 80182f8a4a50..6d2859aad921 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.c +++ b/drivers/net/ethernet/qualcomm/qca_spi.c @@ -813,8 +813,8 @@ qcaspi_netdev_init(struct net_device *dev) qca->clkspeed = qcaspi_clkspeed; qca->burst_len = qcaspi_burst_len; qca->spi_thread = NULL; - qca->buffer_size = (dev->mtu + VLAN_ETH_HLEN + QCAFRM_HEADER_LEN + - QCAFRM_FOOTER_LEN + 4) * QCASPI_RX_MAX_FRAMES; + qca->buffer_size = (QCAFRM_MAX_MTU + VLAN_ETH_HLEN + QCAFRM_HEADER_LEN + + QCAFRM_FOOTER_LEN + QCASPI_HW_PKT_LEN) * QCASPI_RX_MAX_FRAMES; memset(&qca->stats, 0, sizeof(struct qcaspi_stats)); From patchwork Mon Dec 18 23:26:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13497684 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (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 ACBBE768E4; Mon, 18 Dec 2023 23:27:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="j5poxOSK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1702942020; x=1703546820; i=wahrenst@gmx.net; bh=w4b5GD95/9d+6IhJ8/OG/JDuLp2gM7nWOD5+NDHeCCI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=j5poxOSKUe5Ycemi8UwL5vIXNvO+fPVhtaH+x+4wrViMgzyPQJ0PoZpjZCtearM6 eJS+tHgVsxD9PvMvtkZsGUOtREOibkJQmwlKDJWkVHb9BuhoA5gR5NPkrBc5wZUgs +JPYqukN2mwbZCaGyld/Iz4BA84LzH+kBqJuxjYcS0XmISO3/w4ywyRjcrq9kFUIJ GbXGrg5JFQ0ayqezNBU/ZcMP9WUvP2Ecu3izj5SjtdaHl+KW1nUwUyCcP1pDQk3Up 04MRcIVlH+KmIAqYhwxVmZxi0oGl7I9ALxbiouIJcZjPX+9EOb7PJgAREnexfy+FC uJ78PikYUyK9LJNJVA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mo6v3-1qwHpH17NL-00pgLY; Tue, 19 Dec 2023 00:27:00 +0100 From: Stefan Wahren To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren Subject: [PATCH V2 09/12 net-next] qca_spi: Log expected signature in error case Date: Tue, 19 Dec 2023 00:26:36 +0100 Message-Id: <20231218232639.33327-10-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218232639.33327-1-wahrenst@gmx.net> References: <20231218232639.33327-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:hHYoGwnG/npWO0LqVEcfYmPh48WImgUrw+j/hmc0KLzJsPrY2LT hc5SpWm5dI8Vi/jnIl+dnxvH9QU1MYWyEDtaUyuaT4ygq+HLcvpgJLovEnIr/FhsbbmcQuD mUThOs/+PL5ELCwlLsJq3oxv2RXJWG2LWS1SgGFdKm9y9BILfeHlxZmTr5aZ9efnxxdS5CK Ez0oZHZ7IaRVqVKMPKQYQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:MOBIsssI/sU=;H9N5eHivkxr2nG+qwXfBJJpkRfK kHRwBRHensCZCs6rc/CG7EdnOcDNDIDP3SBPVOgw3Nrc+efwRFWLSAUjrKsF6QVQkH1bLxc0M kwMOmaT5dvTRNSUUFhxpdn43KMlXcI7o5PIo6SK4Up8tkOb3maoeQzcL0WPatv4nSKWKk2YDA hjmnH5ViGE96BLF70mTyNzZFxD4aK0KyhFcxkvAEn/fmT7a/h5C3ZIH3Cj2tMAFvkv03Fif5T nhkTF3TFUze3loPNEXmC4AA+lW6rgrO2Uf7or8QT3KU1pAGNKj3i/cP1t8FmGfAO7HeAXErDP 21qOPl+lzzQrVeXr7Per1jdbm5PmhF3WpvAkDu95cJDfsAy2dpbkIm3Ksm5L5+qWTnXa79kdF OZFmAy5WCpmsN5dUGvkJc2nC6gkNk3PcH1mVFdB2aLL+Z4jw2T1ZQ7NVrWC6GtwDYVHsdY2zE sz2o/jKlAkYTkNkoeJguWb78gLD0y5yPfrZd97yhKQS8yYZFh0UcVVyxwswbl9hpIk/sGNYpD AA9QGLKsqcfSGewGgCWfSvMN/KPEHxn5IKe+ih/3FOcteQ/sFA890Pqe9H94ynKZiqxulQ8wD wCj+mY16XQK/kNkG0rklB68VsWjbn2Q0gJ7E5k7MbyQX4Ergau5nDljpKMkx1cBbaYm5QPVgG nqzt7h88gGPXJFzXbFcLh/UDE9d9nf2IBO6hEw3AD17gGDGetrsyzUymn7UHDbqyrxW6i8Kus TOsmYX/oElT3jMMLZd+P462HKBaZBwJ6d8os0jw1RnMdbGLKs/rXkWoniDf89I9oZAVbh00px 8789wVvJAGiX63RcAeqbQSZ/gQUpwO3F5YHToZLl0UYbmGV8g74JjHSGoe5Lqp/piLmC0rspx qkeU4w/rPzMAgIPX0Sbj6x0fgK52eDuGHQZ0V2R/1mkdLoVySKPmOsGR0FqBczBJhZxh/tjb9 73+8cw== X-Patchwork-Delegate: kuba@kernel.org Most of the users doesn't know the expected signature of the QCA700x. So provide it within the error message. Btw use lowercase for hex as in the rest of the driver. Signed-off-by: Stefan Wahren Reviewed-by: Jacob Keller --- drivers/net/ethernet/qualcomm/qca_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.34.1 diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c index 6d2859aad921..c5d240fe4146 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.c +++ b/drivers/net/ethernet/qualcomm/qca_spi.c @@ -1005,8 +1005,8 @@ qca_spi_probe(struct spi_device *spi) qcaspi_read_register(qca, SPI_REG_SIGNATURE, &signature); if (signature != QCASPI_GOOD_SIGNATURE) { - dev_err(&spi->dev, "Invalid signature (0x%04X)\n", - signature); + dev_err(&spi->dev, "Invalid signature (expected 0x%04x, read 0x%04x)\n", + QCASPI_GOOD_SIGNATURE, signature); free_netdev(qcaspi_devs); return -EFAULT; } From patchwork Mon Dec 18 23:26:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13497681 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (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 05F2E760B3; Mon, 18 Dec 2023 23:27:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="IIcUiQ7j" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1702942020; x=1703546820; i=wahrenst@gmx.net; bh=CjjtG6p/Dd5V8xoWnC6XwBQXgsiDM9L9WIAtb5Jft6E=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=IIcUiQ7jSLFeFkjotMMEvM3t3tUex3IXuCHOU4SKxBe7FZstB0+/aPN+7dzomQvq vfaH3/SJoz5ZuaZXbkAjzp0jlszviW2DbnKfxOOd53Cp00gtVordgvg15k07vZtG3 QANDglvztIPF0wDdyef4z014qMgRQNCf/6QF5/WjmxEZuqRIRZcDtpH6jOjkJy9Sc 18H5mfts6G2SnD61SM2YTaLComv5oMPZ8BSMINdiVq28LIKL+KdAhniuoHpcuTQ4Y IquXuJ3gljuDr+TuXzxXpbnUCZYTCaMg3s4zHfjHw5XsPX4snUMeRemfRCt9jRGPd Um8qFr9NjYPrgKbj4Q== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N63Ra-1rCzSm2UZM-016Nqt; Tue, 19 Dec 2023 00:27:00 +0100 From: Stefan Wahren To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren Subject: [PATCH V2 10/12 net-next] qca_spi: Adjust log of SPI_REG_RDBUF_BYTE_AVA Date: Tue, 19 Dec 2023 00:26:37 +0100 Message-Id: <20231218232639.33327-11-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218232639.33327-1-wahrenst@gmx.net> References: <20231218232639.33327-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:KJfQIIKf3KWSJUMeOZt+dbssoEkhfzmvoKw4d3woAkq3v5l5XMK i4Uyd5CnCeawEXPJ0glpReFPGg+nGrfk9KtjFpCvKOte5ry9I1Jik2xCwhr8RnDmbCi1c3z kTDVcnnpRIb/FCbbsvGURZdeccb8RzNEbstCzOlgxpNFMIaXZCXj7rL/7XO+90ZmFwVqGi6 x2m1QMT9UMbOlaOsYPxgw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:u8hUn6t+TGk=;lF3kbH92nTTWjbKz3jQGH2NzD68 WWeF4q5cKxywO0ITFeV1a7ReoPBkBG/dDFAkDNA1b3lbXN+WKcX9tbHzMMxAU9o5A7OncBoVy KewMjYYosoKR5PeWPd73al4WR8eUHswJi1ogGCSOciwCJFZDXl1iG2nXXzKX7dfDfNX97j3Nm YxfgnSUlq9ypQyg33hNeKLMV5icXwUibcubZ3/x2EInsp5FjLMLcF92Y5lxT72tGNhxZTpOfF okk+miIGCwYia32RTYs4aC0vPr5lTXtfYB0N2zUa7qKIoMOf5k/2Eyhw+wac1eL1awf+cVdGY q81moYtlFBY3fy/JYKKGBjZCoax4nEK0WPePzSQGN5gaHCnbyoTeLcSW4LAw4i3OWOTNaoDGb 8lVMmKUhTt63jUUY8OsIJx+iNpJEWv9g/TJ/rmoIq9W8Tks/Rfb9jMM9kqZTfMgROfERT/4rG NOovj/W/0Cr9hRrWDTWGgCH0wCyUfzZl77PG9h8G4CbZzGqRoXB2eQFWOBGINA1oZ4ww9U8Bf 59YDhLqCGHyB60uCm5AnuU3pK/hp/9XoAb+Vo7wxeOoW75kBTvYfx3MfKTm8KBc7wYgtv7aZ/ IDfmMjKuRzd6PFkS3/8CkEXm8iohtjtDVNh+nKyKZC8h0e89mrFOe1bm67y/1sijWP+czTi2N Kc0Mu8n9/LmI+3J2bjUmImjn7JJqyVi3VQomN37mKroiTi+04hoQbumuGTHx+rVp0e9/oled1 W3VkCj7YaX3hvQedmWGTidDrv/bFN6827L38SkRioD4/3ZT9X+j3cjQoFdzV9I2Wh7ApgzNO/ 9LYbZdDVo6+593PihniaR9fTFLnfNrp0cOXlUwMX4Zz/VfgVM24TM2R7fXSBQEPoW/JNAGZqV kXaKoWNzUavuFs+HihT0QQ30QF41r0baBDSfn2Jyh+f5pBIQQNEvTcQZuUard21cWWZ7Fa25n JAys4otVAH5Iws32Mqnv5dXvULA= X-Patchwork-Delegate: kuba@kernel.org All known SPI registers of the QCA700x are 16 bit long. So adjust the formater width accordingly. Signed-off-by: Stefan Wahren Reviewed-by: Jacob Keller --- drivers/net/ethernet/qualcomm/qca_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.34.1 diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c index c5d240fe4146..d3109eb24b4d 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.c +++ b/drivers/net/ethernet/qualcomm/qca_spi.c @@ -359,7 +359,7 @@ qcaspi_receive(struct qcaspi *qca) /* Read the packet size. */ qcaspi_read_register(qca, SPI_REG_RDBUF_BYTE_AVA, &available); - netdev_dbg(net_dev, "qcaspi_receive: SPI_REG_RDBUF_BYTE_AVA: Value: %08x\n", + netdev_dbg(net_dev, "qcaspi_receive: SPI_REG_RDBUF_BYTE_AVA: Value: %04x\n", available); if (available > QCASPI_HW_BUF_LEN + QCASPI_HW_PKT_LEN) { From patchwork Mon Dec 18 23:26:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13497689 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (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 B58317CD11; Mon, 18 Dec 2023 23:27:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="rnF0TVjY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1702942021; x=1703546821; i=wahrenst@gmx.net; bh=Erl1Hx4Iu/yc81ICtgx9HU1UabMeGNtOb5CM3iti9fU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=rnF0TVjY08uoxNM7/WoMipJTWdi8B9x7KbEUdQebAk2DQDoXUd40C6BbxNTU22nM iqW9bZN46045c3grmml1lxAhjHgQ8GqLlWxjIbHaQnYEN/fOEuhJg3KJEYdje4dnd SKpSt/nsmtHOcpkA3drGdN9rPqyLtjUQFJz49cghjc+CZeqjRMwkdh5udPZP/JpXb kTm7/OeLA1BfSFsmKieoXV7ClE0exvlLNx2mPvvXeokrw8TLQ5zL7/eWLLbLIj6Lk MXQihMfklFEMqlPOWijyXTYETgeo1jZMlI4mtQGllupOr8KtuAAyvkwEJsZpHgLL4 8ngnROy1ORckKVBiBA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MtwUw-1r0rxw44aa-00uEmd; Tue, 19 Dec 2023 00:27:01 +0100 From: Stefan Wahren To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren , Stefan Wahren Subject: [PATCH V2 11/12 net-next] qca_7k: Replace BSD boilerplate with SPDX Date: Tue, 19 Dec 2023 00:26:38 +0100 Message-Id: <20231218232639.33327-12-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218232639.33327-1-wahrenst@gmx.net> References: <20231218232639.33327-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:XTyNWHeOORMarYYVkt2U/alUzIyx4EnLzjFka85by091TafT2fr iqVyAletEr4A/6bb266fmjm/BUq4Ss9po6AlDagjw0PZzhpv/3PUScYdtoJ/jB+VCQ9uBe8 bs5SMn245OybM5SmPu+HJpDnM9vRKxPzp8uP/mAJDNweF3tBw0U6BEL1ku/xMvRUpPu59yt ly9qsLkekyZYSZosVzleA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:esTuO+Wo5Zs=;RhUYrbas1tPAtlD72JAleYuQw2h hcJjirKh77yVTi28sztzSdz43fWMbB1ZWoBLK1I4YhO66bz+8XHCN9Aja0SlzsZDGljr9Uve+ U7bAjgDsCvJOgVRPXhQGm+itK65iSEFz4bjLLNAtjvvVMrv/r3nNpOBhE/VRrtiEDFd6mppLk f4Du+JE4twzeQyjjjEHSryOdadkGmtRuLu/RvN29SVcVU9uuhFAUWIDoehfjVcW0ag+xFU5qL aEPVRYgddX3XqSPukjE1eBZpXu4UjZ9MF6O6ZWabzAWSu7nHqD63cnVeh7n0lso8oXMItFJlY 3P0hWY9LyMnVd/FbWQnHrBrArEiSpFWsoFR/JeVElmv997P49L7RePSiug4XmTes+omreqNWo c03ve9EF2nbAEANmz5gRofAhpCKTmLcn2dfyuyWraic7eeczuSrBWPYaRjirwuyfjWn5cF4Oz 891e29nHmmn2IjNmYi1q1J1cj8CGH6fq9a0fZ16vrV+2EwInxOefy3KLg/WtT4cFKdfRfZuu7 idosPGdDfatyGoOmcTptJjty5EMJEF8Ba+KEWb5zTSLL0b3GpTI/qqM4B0FZMjQfigWMIPy31 1BIRLZ+o5iST6HZfHMHJ1JrwQk++6NPCHIOIX7kuC5ut4YPRvhj9kjQlSc4547KjvSCA4RT6g CyfOPB5Qdf/+yf9G3sf3QD9Q9Mry9HukG7U/II4WgZ96Zv5iGCU2NsHScqBx2iAP7FZC0cgz3 qlwCqTaphglZOFEsF6f+oucqT67vwCxuYmG5LamJlavinqCB1Our5pe/GsfDq8AX5OUaM+zyy TUidugyPxKUuOO0WBGeN/0Gdtua7IW8PY2f1Lp0X0uMLvV3JSyhHGnb39bNNM37Yjl9pgoWpr GjTaJr9O9CcQude6b1OFvAyE+jhCW5zc1lad3eanA3Zs9rC9Apl7y1gZ4Oq0wV3PNL0eKGbJh qr/xykSaF6iYhCAAYnU2IdA6+S4= X-Patchwork-Delegate: kuba@kernel.org From: Stefan Wahren According to MODULE_LICENSE the driver is under a dual license. So replace the BSD license text with the proper SPDX tag. Signed-off-by: Stefan Wahren Signed-off-by: Stefan Wahren Reviewed-by: Jacob Keller --- drivers/net/ethernet/qualcomm/qca_7k.c | 17 +---------------- drivers/net/ethernet/qualcomm/qca_7k.h | 16 +--------------- drivers/net/ethernet/qualcomm/qca_7k_common.c | 15 +-------------- drivers/net/ethernet/qualcomm/qca_7k_common.h | 15 +-------------- drivers/net/ethernet/qualcomm/qca_debug.c | 15 +-------------- drivers/net/ethernet/qualcomm/qca_debug.h | 15 +-------------- drivers/net/ethernet/qualcomm/qca_spi.c | 15 +-------------- drivers/net/ethernet/qualcomm/qca_spi.h | 15 +-------------- drivers/net/ethernet/qualcomm/qca_uart.c | 15 +-------------- 9 files changed, 9 insertions(+), 129 deletions(-) -- 2.34.1 diff --git a/drivers/net/ethernet/qualcomm/qca_7k.c b/drivers/net/ethernet/qualcomm/qca_7k.c index 4292c89bd35c..6263e4cf47fa 100644 --- a/drivers/net/ethernet/qualcomm/qca_7k.c +++ b/drivers/net/ethernet/qualcomm/qca_7k.c @@ -1,22 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause /* - * * Copyright (c) 2011, 2012, Qualcomm Atheros Communications Inc. * Copyright (c) 2014, I2SE GmbH - * - * Permission to use, copy, modify, and/or distribute this software - * for any purpose with or without fee is hereby granted, provided - * that the above copyright notice and this permission notice appear - * in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL - * THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * */ /* This module implements the Qualcomm Atheros SPI protocol for diff --git a/drivers/net/ethernet/qualcomm/qca_7k.h b/drivers/net/ethernet/qualcomm/qca_7k.h index 356de8ec5d48..828ee9c27578 100644 --- a/drivers/net/ethernet/qualcomm/qca_7k.h +++ b/drivers/net/ethernet/qualcomm/qca_7k.h @@ -1,21 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ /* * Copyright (c) 2011, 2012, Qualcomm Atheros Communications Inc. * Copyright (c) 2014, I2SE GmbH - * - * Permission to use, copy, modify, and/or distribute this software - * for any purpose with or without fee is hereby granted, provided - * that the above copyright notice and this permission notice appear - * in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL - * THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * */ /* Qualcomm Atheros SPI register definition. diff --git a/drivers/net/ethernet/qualcomm/qca_7k_common.c b/drivers/net/ethernet/qualcomm/qca_7k_common.c index 6b511f05df61..be2f754efd21 100644 --- a/drivers/net/ethernet/qualcomm/qca_7k_common.c +++ b/drivers/net/ethernet/qualcomm/qca_7k_common.c @@ -1,20 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause /* * Copyright (c) 2011, 2012, Atheros Communications Inc. * Copyright (c) 2014, I2SE GmbH - * - * Permission to use, copy, modify, and/or distribute this software - * for any purpose with or without fee is hereby granted, provided - * that the above copyright notice and this permission notice appear - * in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL - * THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* Atheros ethernet framing. Every Ethernet frame is surrounded diff --git a/drivers/net/ethernet/qualcomm/qca_7k_common.h b/drivers/net/ethernet/qualcomm/qca_7k_common.h index 088cca7f61db..44ed66fdb407 100644 --- a/drivers/net/ethernet/qualcomm/qca_7k_common.h +++ b/drivers/net/ethernet/qualcomm/qca_7k_common.h @@ -1,20 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ /* * Copyright (c) 2011, 2012, Atheros Communications Inc. * Copyright (c) 2014, I2SE GmbH - * - * Permission to use, copy, modify, and/or distribute this software - * for any purpose with or without fee is hereby granted, provided - * that the above copyright notice and this permission notice appear - * in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL - * THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* Atheros Ethernet framing. Every Ethernet frame is surrounded by an atheros diff --git a/drivers/net/ethernet/qualcomm/qca_debug.c b/drivers/net/ethernet/qualcomm/qca_debug.c index 857883d0b5ed..ff3b89e9028e 100644 --- a/drivers/net/ethernet/qualcomm/qca_debug.c +++ b/drivers/net/ethernet/qualcomm/qca_debug.c @@ -1,20 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause /* * Copyright (c) 2011, 2012, Qualcomm Atheros Communications Inc. * Copyright (c) 2014, I2SE GmbH - * - * Permission to use, copy, modify, and/or distribute this software - * for any purpose with or without fee is hereby granted, provided - * that the above copyright notice and this permission notice appear - * in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL - * THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* This file contains debugging routines for use in the QCA7K driver. diff --git a/drivers/net/ethernet/qualcomm/qca_debug.h b/drivers/net/ethernet/qualcomm/qca_debug.h index 46a785844421..0d98cef3abc4 100644 --- a/drivers/net/ethernet/qualcomm/qca_debug.h +++ b/drivers/net/ethernet/qualcomm/qca_debug.h @@ -1,20 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ /* * Copyright (c) 2011, 2012, Qualcomm Atheros Communications Inc. * Copyright (c) 2014, I2SE GmbH - * - * Permission to use, copy, modify, and/or distribute this software - * for any purpose with or without fee is hereby granted, provided - * that the above copyright notice and this permission notice appear - * in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL - * THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* This file contains debugging routines for use in the QCA7K driver. diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c index d3109eb24b4d..7c63baeb3844 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.c +++ b/drivers/net/ethernet/qualcomm/qca_spi.c @@ -1,20 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause /* * Copyright (c) 2011, 2012, Qualcomm Atheros Communications Inc. * Copyright (c) 2014, I2SE GmbH - * - * Permission to use, copy, modify, and/or distribute this software - * for any purpose with or without fee is hereby granted, provided - * that the above copyright notice and this permission notice appear - * in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL - * THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* This module implements the Qualcomm Atheros SPI protocol for diff --git a/drivers/net/ethernet/qualcomm/qca_spi.h b/drivers/net/ethernet/qualcomm/qca_spi.h index f735ad77402f..d59cb2352cee 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.h +++ b/drivers/net/ethernet/qualcomm/qca_spi.h @@ -1,20 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ /* * Copyright (c) 2011, 2012, Qualcomm Atheros Communications Inc. * Copyright (c) 2014, I2SE GmbH - * - * Permission to use, copy, modify, and/or distribute this software - * for any purpose with or without fee is hereby granted, provided - * that the above copyright notice and this permission notice appear - * in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL - * THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* Qualcomm Atheros SPI register definition. diff --git a/drivers/net/ethernet/qualcomm/qca_uart.c b/drivers/net/ethernet/qualcomm/qca_uart.c index 9adec91f35e9..f911effccfe0 100644 --- a/drivers/net/ethernet/qualcomm/qca_uart.c +++ b/drivers/net/ethernet/qualcomm/qca_uart.c @@ -1,20 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause /* * Copyright (c) 2011, 2012, Qualcomm Atheros Communications Inc. * Copyright (c) 2017, I2SE GmbH - * - * Permission to use, copy, modify, and/or distribute this software - * for any purpose with or without fee is hereby granted, provided - * that the above copyright notice and this permission notice appear - * in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL - * THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* This module implements the Qualcomm Atheros UART protocol for From patchwork Mon Dec 18 23:26:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13497687 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (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 57B58768FF; Mon, 18 Dec 2023 23:27:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="ptTE9SK9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1702942021; x=1703546821; i=wahrenst@gmx.net; bh=dGQZrQAtPAAdqn1RR96G/+3tEEihlKoJ4rMV+rjxWCs=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=ptTE9SK9QEgevO0Z8RJqAYfcEZ4UYkuwlRSbq9cC91fHViyo9G2wafm4Dyz96/qa bsOG/RataMLP7lVIymnoeb2HAdpH2Wi5YU7j/dxdsBJva1L0aUJXa5TiV0q2jWGdy dVE2kXdsCSbbyhyzateE0HQsaXFwr/vlP+FakmMhqDXtgW00QlTJ0er3n/QOs0WFt L7tXGRxaYigY287MyZ4c5yAdMwTvysd5aVbSmS1i3+pvU1CTRAO0lD8Orw9v1Kmrs xMbKBgB27BKFJ6G5sjb7649BP6dhp92va66OduE1wue+Soik3tGa1q1fdz3DNuZr+ H3TnV2QVwp2lp+xThw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M8hZD-1rK1iO1Kmf-004log; Tue, 19 Dec 2023 00:27:01 +0100 From: Stefan Wahren To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren , Stefan Wahren Subject: [PATCH V2 12/12 net-next] qca_7k: Replace old mail address Date: Tue, 19 Dec 2023 00:26:39 +0100 Message-Id: <20231218232639.33327-13-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218232639.33327-1-wahrenst@gmx.net> References: <20231218232639.33327-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:idcAzR2hwvfWhfp3JA/vOz3Apoibd8T++eB3q53hVzJTh4P73Lv fXJtXwqK1HTM4lfBoWeBu+UWQvaP0UtvoKrakAD468/NqQ7bfttmFeWg+6i4JOBnhPHKks6 wrh8h6XIe7NA1CWd43qPV/dkwKclmT36c5YK2+0mpM274MPtKE6pIIxrVM/LlNT8vE1n1xp dWj1zf9epOKVfopYNVA2Q== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:tvMEd/mnorI=;geDrXHjqWKO7ITJR8V9vjDv52m1 hYJCBFjxZN/WCuM8yAGtVD3dNRFCx1zyFYRfHVQtbQGAWLlXlmEVKIMGDS3P/ZRmMjW2XNeE+ pf+4n2OlMoVG/qGlzH5GzZcCx9ECSx9dbeQlKcx5omwhWcPJ1BspWVvgvNQHcKconqc3lOvld 3BRqh4VOcOvtdMKbQQxdNx0T1Q2cDYqLGzFRM4SEzx0XB013ZXKpGwrAivoS32rQcCs72Gwaz LiEl6Utdeq4bqoYbvGcJk53SiLsjgXs5vIgF6zpyMvOcAXvx4kTUwURdqhfWeMoNn6Hol4WgF Aj+H43lDNiP2zPC+baC8c75T3wgGfSiYN9rt2BXPBRCs8tvMQDckhciuWFL+aQbiSnktvFsab ycI/CteOiH+KJpLuUJjc35E55LyQBqjP1FvsJVS1tYDGHRijlxAGh4QgOPKAj+YS5mIYhLBfZ Ykt6lXyNtwgn/v4+Duq7ZESUeeaGuRXZM4h8vLy3Mfbbiq+VYy3MiPbg4zsh9r5IlEgPlRfMC fujgGtKuzQ9pTc9Fodcz0wR6bdMAzcTUowzvd3ScIF0ip6Y5XBBDZuiPZETTNrgaeXjhQEExj s7nTJTQBRHH0neJyPGZkb4vsXoovvhnNT1vkoqi2Ddj97IcEXwM70wCeH0OBcljlPtd4JTrgA 61iUOlIeI4nadau2nYA8ekjqxtTW2zI0kXTTRhMiOwBbQ1xCK0QQPq46ERZDm4awW6xEi8yAP 42VlhwR6ZY6adTUczuh26F1XbovtqKpBIzPZnkALhlsSLJMCeR3tgMtb5WVyBPrSbIUt8XR/+ Fi6shhDyKH9dzzkqVc0RazAmPMb/kIF5fHZ3GuUfAO1+OLtY9mARZUCmYDVX8epw1eMQm0c2t kcS+JEfDqTN495WL3kBklOHa8uBK3TlCIxev6yKMStYX/YwCIs1b2Oe58avd5lhozW6nyNOYr RefPUOz+uUskTbM1Wg6aXZzYPe8= X-Patchwork-Delegate: kuba@kernel.org From: Stefan Wahren The company I2SE has been acquired a long time ago. Switch to my private mail address before the I2SE account is deactivated. Signed-off-by: Stefan Wahren Signed-off-by: Stefan Wahren Reviewed-by: Jacob Keller --- drivers/net/ethernet/qualcomm/qca_7k_common.c | 2 +- drivers/net/ethernet/qualcomm/qca_spi.c | 2 +- drivers/net/ethernet/qualcomm/qca_uart.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- 2.34.1 diff --git a/drivers/net/ethernet/qualcomm/qca_7k_common.c b/drivers/net/ethernet/qualcomm/qca_7k_common.c index be2f754efd21..5302da587620 100644 --- a/drivers/net/ethernet/qualcomm/qca_7k_common.c +++ b/drivers/net/ethernet/qualcomm/qca_7k_common.c @@ -149,5 +149,5 @@ EXPORT_SYMBOL_GPL(qcafrm_fsm_decode); MODULE_DESCRIPTION("Qualcomm Atheros QCA7000 common"); MODULE_AUTHOR("Qualcomm Atheros Communications"); -MODULE_AUTHOR("Stefan Wahren "); +MODULE_AUTHOR("Stefan Wahren "); MODULE_LICENSE("Dual BSD/GPL"); diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c index 7c63baeb3844..29be0fe0b235 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.c +++ b/drivers/net/ethernet/qualcomm/qca_spi.c @@ -1042,6 +1042,6 @@ module_spi_driver(qca_spi_driver); MODULE_DESCRIPTION("Qualcomm Atheros QCA7000 SPI Driver"); MODULE_AUTHOR("Qualcomm Atheros Communications"); -MODULE_AUTHOR("Stefan Wahren "); +MODULE_AUTHOR("Stefan Wahren "); MODULE_LICENSE("Dual BSD/GPL"); MODULE_VERSION(QCASPI_DRV_VERSION); diff --git a/drivers/net/ethernet/qualcomm/qca_uart.c b/drivers/net/ethernet/qualcomm/qca_uart.c index f911effccfe0..fb53a0c32898 100644 --- a/drivers/net/ethernet/qualcomm/qca_uart.c +++ b/drivers/net/ethernet/qualcomm/qca_uart.c @@ -398,6 +398,6 @@ module_serdev_device_driver(qca_uart_driver); MODULE_DESCRIPTION("Qualcomm Atheros QCA7000 UART Driver"); MODULE_AUTHOR("Qualcomm Atheros Communications"); -MODULE_AUTHOR("Stefan Wahren "); +MODULE_AUTHOR("Stefan Wahren "); MODULE_LICENSE("Dual BSD/GPL"); MODULE_VERSION(QCAUART_DRV_VERSION);