From patchwork Tue Aug 27 19:09:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13780078 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (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 BBA65148FE5; Tue, 27 Aug 2024 19:10:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724785847; cv=none; b=hZq6LkMpBiBLXAS6mS8KpgzptBpfRMCxlczLGRxwpd83Tc3Vgxe6S36kHa8CEgZhKuH/HWXvlFw/nS19YMq4q6V7x9l8jJ/0h1Lq3iGy66mMYuh7qN2zXwpXqgt/kAFIFRWZdw7rXo3zgypqb9RYXoC4iqGjmbyKwpxwuFNzHzA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724785847; c=relaxed/simple; bh=oRk73755Ab6XaVcx93FEYeUlYSOEDnuSor+FnYJ+JKE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MtIpxmqbEs4Tc1gwTTbpFiwYJHMDmDZ/PPoDysAmqXQJ5FCB09o9tgXg1FX4f+60fMqCv+g0JQiygYr/a3KwZgzBvlq9WKMEAN3fhTj5KZwTQJfAqT+uh9G3GJliGVvHj06QmiGtGye8Vkh4D00XE/uNY9kwxfLMNgaw/bfNDKM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=KtVLoJtO; arc=none smtp.client-ip=212.227.17.21 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="KtVLoJtO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1724785829; x=1725390629; i=wahrenst@gmx.net; bh=vinKMheLarOF4ojWh2zc9izCXo/2DVtUtAGCi3VT5SA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=KtVLoJtOzr60WpkVurG6azlVFCW/dT82cAurqJDCP2WwO64HVMTUwtbarSy62p0f OtUljZRK1lQGg4OJDFiX11wj17n5hBsQZ5JUTJAHjqGCRK8k2eMCrIcm/muv2Texo xZ9ZdLrFD+fW9ajh8k/TT0VvIPRLeE0CG0KAiW1qfcmsIMZdw2MUM8T7AnwyuB/X7 8clZvL0HwIZNAC5ZGOvMMfj1QFucL/hAXePS13LILzjJOdHipvCtAluaCrSHSUaIR abpbqN86B6fvL6A+kgLl8zVdvFBChoSGAW03l+ArE9y73Dq5xqnU641Mds/hV3Nck VTJsfUWOt+iUuOrmbg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MUXpQ-1saG9t0iFE-00Sliw; Tue, 27 Aug 2024 21:10:29 +0200 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 1/5 next] net: vertexcom: mse102x: Use DEFINE_SIMPLE_DEV_PM_OPS Date: Tue, 27 Aug 2024 21:09:56 +0200 Message-Id: <20240827191000.3244-2-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240827191000.3244-1-wahrenst@gmx.net> References: <20240827191000.3244-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:KX8dbKW5fftM/5aJ56zxGBxMMzoBIEO4rn79qEadYztoB6l+uK3 S04R83gzWt0pROkRm36FqiSlliowt9umZKZOzX4Y8vopF+qp27sH7XnFxO4WGcFNvpbKPZZ Jim7gSCHq065EMb6JZRn01oOwOJWgkHW2OZqvO04InrOu/GFurx4NlptbIjVub9TeAenoLd lkLaT1Qa5IE+pIiJHWKrQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:w7TMYXbNAEc=;sISBO2LyCnBQwQmZEeHeFp5kTeb KHiosM3IHvH76Y2bGzw86C/ACZrj9iayk/BzVVZ95uygYumZ7gR7c+gO785gLwTQt3Tt+Qx1E yoiYVekEaOl02OEDvVvjswGizVkI+Qhlue0hZxgCGAk4Nf4JrIVOcRpbLqoXJjKgG85Et+aXZ lClcun9wGd3yvIV1iDA7iliISjeDiB329ikualhYyR94J8wVZmQ49vrf0d9J3N+Z9kbULPK0X wj5CRIxJNmX0lkvSkd8PbshDOzaTP/DjRmusgSdxkO3c3JVcAU1Z/e/++nH4Gv+fUU4WB0Ti6 6RwwqGRCaImmXnPbKHdCacbjUAWciVsoUtmbyRLu0nWNuj5X0AXYVbvxi6EPJW29Ne1rRN64n jjH/z+tL6kcKRvgAZiXRwMCa4/6q1OEVZxn7HrshfeLgEMgxkqineCRT8Jh2OLVS66XUcnlXE pEbjXF1sgzAG5THCaQuIjDvoueZFp/NofuH/Frseq6++hjHvLtke2WKl5mvvAOKq3bxyDI4LG YVLnGgbrZySZ2/LUkOSYz50y1rKq/R6kd6IsYF/Z7b1R2qULPYyH3+pQ0/dH+aKjwHoDdVFc4 0uomRPgangTyG53R8J+r5WcclRc1OAkVBpGPc+v18hnwH+vp3sY7dXK28rs+ucQpqoNsYU3i0 gTxlQYToxwVqnV7vJ2K9gaJwa/aTIUhEKe+PYhe+VWSwo8F2NXrD1Yv3ijX/d6hDLewHJgxOn wsoD7iLPUvTGJrQYQM58yZ5sFWpy/ihE9MFgURSFRkBkHMRwXqjC5pfrmO3KPn5RSwdiE3hF/ O8oVviN/pyPVf5xnysl5Ltmw== X-Patchwork-Delegate: kuba@kernel.org This macro has the advantage over SET_SYSTEM_SLEEP_PM_OPS that we don't have to care about when the functions are actually used. Also make use of pm_sleep_ptr() to discard all PM_SLEEP related stuff if CONFIG_PM_SLEEP isn't enabled. Signed-off-by: Stefan Wahren Reviewed-by: Simon Horman --- drivers/net/ethernet/vertexcom/mse102x.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.34.1 diff --git a/drivers/net/ethernet/vertexcom/mse102x.c b/drivers/net/ethernet/vertexcom/mse102x.c index edd8b59680e5..0711641fc3c9 100644 --- a/drivers/net/ethernet/vertexcom/mse102x.c +++ b/drivers/net/ethernet/vertexcom/mse102x.c @@ -622,8 +622,6 @@ static const struct ethtool_ops mse102x_ethtool_ops = { /* driver bus management functions */ -#ifdef CONFIG_PM_SLEEP - static int mse102x_suspend(struct device *dev) { struct mse102x_net *mse = dev_get_drvdata(dev); @@ -649,9 +647,8 @@ static int mse102x_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(mse102x_pm_ops, mse102x_suspend, mse102x_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(mse102x_pm_ops, mse102x_suspend, mse102x_resume); static int mse102x_probe_spi(struct spi_device *spi) { @@ -761,7 +758,7 @@ static struct spi_driver mse102x_driver = { .driver = { .name = DRV_NAME, .of_match_table = mse102x_match_table, - .pm = &mse102x_pm_ops, + .pm = pm_sleep_ptr(&mse102x_pm_ops), }, .probe = mse102x_probe_spi, .remove = mse102x_remove_spi, From patchwork Tue Aug 27 19:09:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13780074 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (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 CC2E61CFECE; Tue, 27 Aug 2024 19:10:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724785846; cv=none; b=OP4G2ZLctGukEgVWn15t1X/b9Zm2gavtZHlse+Cm1Lgf0mlQf5JAGHgNOL/Ohfot8bnFYOU3eNvEJ9ohKkzDG9sfaTeBW1f1mUWdZxQrxa/OJRpBOgGFcm2lwAuwpoYVCKLQnU+/QOcW8OlQ2c3sk5RoIfaA2D2m1OZISFa/Dz8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724785846; c=relaxed/simple; bh=HRc508RbmXV0FUoC3kABdxRTsv47VzpEFEzUtcw2HZI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EfcX+UQ17F+/oH4fvP66NWGvVipHSozhBxS0u9cmZA2GZUJgGrmxFmM3m74+2XDbx5So84ALkAVZvvmPMhU3QMZcvU57kxc5OflekJhpHhKtsAGnynaQGPtC4gPqx/5Ln7lFMz2MrKRuyIQipDZ6V8p8Mk4ThQmYge3uqMxmQ/w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=QJzplBAL; arc=none smtp.client-ip=212.227.17.21 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="QJzplBAL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1724785829; x=1725390629; i=wahrenst@gmx.net; bh=pG/5Ey5pW92eb7Gus/e9GS+zhwU9GERN5pNXlAVFNys=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=QJzplBALM0r/vwdm7kbqAmKIbIHC3ZumAjGZUa07wWqn1MzQAKX+huVCw9z9TcH0 KQwFxybkH+LsiEMQf7PzGJqaeaeu4WsyJzPwGxLuHL3haqmwkrB5qIp1IJ6qIw26T JxXlrc4h7LDAsuvC5yvTqdCyco01MnG5DMSYpAi2tM6G8lQcwS+yoWP8+esLZD/Ze +lGXcWTMyvDWsSY9lfCnp5SE0FwBhu9RbN9vhv8K4E3j3xz8xN/z1PZKNI13cISob dpmODwEWp1RF9ltPV/aETv6U7/fgtXsBcVig9QGyMUxuQsTlC/MMBhXDSroj8FpFE LH52YsZTvvljdIjZOw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N6KYb-1s3hV62REv-014HCB; Tue, 27 Aug 2024 21:10:29 +0200 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 2/5 next] net: vertexcom: mse102x: Silence TX timeout Date: Tue, 27 Aug 2024 21:09:57 +0200 Message-Id: <20240827191000.3244-3-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240827191000.3244-1-wahrenst@gmx.net> References: <20240827191000.3244-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:73bKUGUnFn9baLAlG2gPdFfDAWNap+UJv7Ta8ZKfi0g4mkEZmIS wxhABpHzTjuyQs8H+m+GbZovcRutydd1UMZZy+YUAkqfWinnB6WrcdT65AzQKLJTCtkm04J r/cqQv5B1rN1ul3F/H0hbArrA2rvVy80res6gbxPQgk8zlE9k3BG+Qs+UhOd99AdHdRmG0i v83QTbTVJxzVdFws2QGnQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:ORozQXzBRXU=;ztBVa1JIpth+dnJDlOSLlmtrKTl cNHOW+FhEajMg+rZ3gCq34Prcrnen1fU8Lyc4ZTQ3bqA+fkzdT4vMQpxKm5TGZv7Xqueln2EQ YuJGPOn8yQDHG1UGJWLgSWtn8MhfGzALTGo0u4YTybuSNHHccULSMuSHtla7BvPWmNCR9dKMf ZpqZVwFaHrnyMVmGMEe0helsskWqJuJq2APltNhXIH3H+mddsOj35RYNhAFRwAk0gecSbz5IW 5c1j9VOp5J1Uk5mKjvH3afy3ZwXBgvNtZFju9FGvn6Ns01rZ6wYy7BD9PRAbRPsA1ucdKlODS xBTji6yE5jinRHryO2IGOBxZD97zVWA+QOHSevgZ5S8DI6ovVouDdgxGFBA+SSPcLUREAgSBw UgRJHNdlhu4o62TD7iTjFqr6qa/eFTYJRlRJFDCPEhgTTbSPn9K14nWk2TQByT6h+wEhwEt92 0CKFOhe5nr1nzKrFkYF5Je/quYZcnb8ondDBhumQjcsiCivAPtZ90ySuAGdIol9rMIdIdZuSa dKxW/Binr82+XgylHirKFlAWkvgtsZaCXs2JektZpuZAf9/SHny5IWqxbZIEaTuQzyHNZOjjk sz0/41zxC6L54Xhu4VllKLtQfCziLP081IeMNiT8Gqc6Dwh8mh9SBC7qqXMiUWkByT2ttooRd dQM+ljksZ1a8XGhFMS8gDaO+E2+thgLX/g6ynQQ4KdpcnTgeU5D9j+q+slrobZBqolTTCAZbv +SPpgfZ8Y9wNubTlDFu7REL3z0U4KQrNyEp3VdyKjlvnIt7AjV/aYOSf6g75jVU/tHmBAqcJ5 jImLJdsAaT5TJ+yEVnQgM20w== X-Patchwork-Delegate: kuba@kernel.org As long as the MSE102x is not operational, every packet transmission will run into a TX timeout and flood the kernel log. So log only the first TX timeout and a user is at least informed about this issue. The amount of timeouts are still available via netstat. Signed-off-by: Stefan Wahren Reviewed-by: Simon Horman --- drivers/net/ethernet/vertexcom/mse102x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.34.1 diff --git a/drivers/net/ethernet/vertexcom/mse102x.c b/drivers/net/ethernet/vertexcom/mse102x.c index 0711641fc3c9..336435fe8241 100644 --- a/drivers/net/ethernet/vertexcom/mse102x.c +++ b/drivers/net/ethernet/vertexcom/mse102x.c @@ -451,7 +451,7 @@ static void mse102x_tx_work(struct work_struct *work) if (ret == -ETIMEDOUT) { if (netif_msg_timer(mse)) - netdev_err(mse->ndev, "tx work timeout\n"); + netdev_err_once(mse->ndev, "tx work timeout\n"); mse->stats.tx_timeout++; } From patchwork Tue Aug 27 19:09:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13780076 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (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 134C51D279D; Tue, 27 Aug 2024 19:10:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724785846; cv=none; b=rr0mKAt5E8TFDiZI+bEHPNGOn850rDkZNPg9iGXYph4dDri/ePsQe7pnFWBCwDBK7EzLrBm1OJWWBpn2Xie9keoHjgsRhlj5FGxU/gSPY93An69CNrBWr8qgKe01OyRRMtzH6Ac+rHfxFkYAXwEyli9fLg6BtTA5j0krX2yJAoM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724785846; c=relaxed/simple; bh=hOJ8P1eDdJPh/P5tV+GHSuEcFo9uesg+AnwGIYG6ywg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AKXFnrCzTjr7qWd8jD7clkszeg+DSS5cmQQv40K+d6jGXPM7drlDpggFp8SpD1Ak8zwem/1wkog4n+ZRnYIjS6L+6VtFc/2rO0CARaCRTAM/GxztwnDuRX20v5JRAa3UYJv1S+eM6Itj8Zj22RYqUi7+GaA2kij+6c7+a/GT7ZQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=YF0TuHm/; arc=none smtp.client-ip=212.227.17.21 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="YF0TuHm/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1724785830; x=1725390630; i=wahrenst@gmx.net; bh=x+XCBOGbZtklKS/6Dl5mPMQvwFou/sc9R6ngeOYiRcM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=YF0TuHm/J0zp7cFMraANYxQkyzgRmFDnnjhRBU/+EScaqNYjqLMWrRTIBebAAifq CCpK41OO5efZ0bMGm/npfARVH6ucikOrAzkSpo1Tjvo5/jTRLdfKUXBKeDpGwPbkR UX/r2zqGRulOpX5b+5iSmoK4mzuoDOMdVorbk0Leq2Tp04AAlXTwgutjD7fgFieRR neyWE/jKE2c8K4kR6JVpgCbvGtj7HnQ02KZ0i8NASrnAxp4SrnNm2NXsIrB4zs06z dfYQnGTEyDen9112RqRWoXerICEXoixku1oiy3BoyG0T5oPZkG3Un8CN8vKMRhio1 SRaX6mhMi9Z9KB6BhA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MxlzC-1rt0X53xT4-00wsfA; Tue, 27 Aug 2024 21:10:30 +0200 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 3/5 next] net: vertexcom: mse102x: Fix random MAC address log Date: Tue, 27 Aug 2024 21:09:58 +0200 Message-Id: <20240827191000.3244-4-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240827191000.3244-1-wahrenst@gmx.net> References: <20240827191000.3244-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:9xtNyaDLTmFAd8qi+xZgWTLMFnq4pH3eEwSo4y/Srcz3c3g7Vfo /aNAwNQs19fMXFsmktB4BlfyZxGknshFDhax6N99GfsMFIh47x2udbb52zU5hCDhA9CrzKQ B/LFRLSXcnEzW/qZKTqawZzpZ7dlv2U6/F4RlfXP9/EQF0EJYh/mnUY1EYG/JAbslKv6RZO 3KK0bJmSP8rGfcbHqL5Ow== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:BCgp+o7LsLs=;TalLNIhDgCMrfrtlNU0+tPOVO04 kmJRDvSDenWFxpGgINcqnKZKiOiBj134oXWgcDMNy0cyYt+LxbEb3oQC3vqP/naa5QHIMAeXY 2m9lGMwfcFUmCAfAk5AZTv0TvXOyL+CXomm9gtl0tkecNqwPxAh4pQy6NDf0IfbjHeJ/5B4ZU I0huE72dIqGenHHt+vSAEZYGt4QnJU86YsVQp5PxTgR0SgvABKdP+UWyHRRQ/eYF9KeGmWHAS 9dGDd22LmWHBWpw8PZBaRViB5Rcfo98sCCpKRqq/tMrCLLVsWk1BsQuzquN1Bq+qLYUXD+95T LrCCU5W3fIZoNU8bfn8ZDQlZQrFMiTPAdaVqakZWzgjK2A1C8BNSm99XaDqtpg4F00inSBZMR MkuOAvhEVrl7HipDUPZ4FbD6/0RdpB8PiHgURAHf2tsVNAXAgtIETZIZTzvEmS8CJiVCINXwW GYagwQ12O73evPqQUnMXrmxI6t/DAX1UyIYLWbDbzcrEv9NFyK68UYQt4lAhh7IeFxXTrpNTx 1Dt/H6UuaaqRDaVjhqPf/cd9UaEjq/yqgsoTF3/suK0DP3ZD93j5def6CYnAKPhbP7doFn68a n97uOLXKHZl/ew9GTapLTYhdaotcz0AVAV4KPvJr3xK/8Sy+xAa5MOSOLjGCLShIFwX8x/41t yMS7HSYuVXDXfUfccA/v1IY3DA8d2mw+dLBAfSZ1+mV5Zif1kyTuWhnW7cpuqCF2giKUn1Zfa XALT9JiBEFUbUnBSQabQsqg93wIavYhoT5akwQlLScWiLpSP9nRAxDcl4MSJZe0Z62BkQdDLR FtMjKf9Rap4d+fCuO+M6Tm0g== X-Patchwork-Delegate: kuba@kernel.org At the time of MAC address assignment the netdev is not registered yet, so netdev log functions won't work as expected. While we are at this downgrade the log level to a warning, because a random MAC address is not a real error. Signed-off-by: Stefan Wahren Reviewed-by: Simon Horman --- drivers/net/ethernet/vertexcom/mse102x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.34.1 diff --git a/drivers/net/ethernet/vertexcom/mse102x.c b/drivers/net/ethernet/vertexcom/mse102x.c index 336435fe8241..4ce027f8e376 100644 --- a/drivers/net/ethernet/vertexcom/mse102x.c +++ b/drivers/net/ethernet/vertexcom/mse102x.c @@ -485,8 +485,8 @@ static void mse102x_init_mac(struct mse102x_net *mse, struct device_node *np) if (ret) { eth_hw_addr_random(ndev); - netdev_err(ndev, "Using random MAC address: %pM\n", - ndev->dev_addr); + dev_warn(ndev->dev.parent, "Using random MAC address: %pM\n", + ndev->dev_addr); } } From patchwork Tue Aug 27 19:09:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13780077 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (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 2A55B1D2F45; Tue, 27 Aug 2024 19:10:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724785847; cv=none; b=jJygha4uUZ+4CCnUnec4DhH8a3L3/qONbK1yNH55EWnPK1E0JszfMT3h2soiVSboD6ewJcZ8Crdkf8seWiN5+6IXIzqzEg+89n6o/0+S1LDFDXvUySgZObBsKOq+ajGCb2lkeHDg1GBJTWtuLkA5pP5kavHGN0sM+l0UpMhyJnc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724785847; c=relaxed/simple; bh=f5M2dUbFg8SUTGwQuifAPGq+G1rs5KExKGWCR9gMGmw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AfmnTCOCgFV9czPY/LXfoD7ABBkbgFQmPAQA90vfGBieCKGPdqdBL/9nQvPPfMxXYqybcdc4/1d9XksWyXi7q2XOBiRWXqrKxAGVf7N00oIAs0Bnr3LVV/FOk63BO7lNLeFYRqWwbUl7mdbL1OH2yKGayjGFSRpf+HE3lajULQo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=n87yQxbF; arc=none smtp.client-ip=212.227.17.21 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="n87yQxbF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1724785830; x=1725390630; i=wahrenst@gmx.net; bh=L8WsVaIOqQALP+jrHSgr/UBOvBBnAWPppfvzJakqsxo=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=n87yQxbFFF/DeSwmWS9wWanm2SMqbsCLfiYYHSVMY5zcDE4M6cIILO+CDs/St9qa UVM3Vd7fFuGnP0suTBhWroqpm+KNIJp79i1cQfqr+4aPjI9qt9Rdr09GrdbCSD//Z xKmmbhiNrEPsTBY+MWJDKuOcJxnEmBBKnR/4qzXQ210B3R1nJx3L89ksUsBfRMC9N nyWjceGL/6uQIHeWr1yeyz4mF3hC3i9kHBhcaljt+v+NDliY5hmKsGndBfLf9V1xm U5mePkM6HlGx7dKEpqSERoEA96zN+4DApBNzeV2PUrZI6aXWLmEygeVyDJMS26KbX Ere7A+O1EMsVfF63vw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MpUUm-1sJqm21DAa-00nZI2; Tue, 27 Aug 2024 21:10:30 +0200 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 4/5 next] net: vertexcom: mse102x: Drop log message on remove Date: Tue, 27 Aug 2024 21:09:59 +0200 Message-Id: <20240827191000.3244-5-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240827191000.3244-1-wahrenst@gmx.net> References: <20240827191000.3244-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:GUkr1wWIGikxAmWoETg0Wjo3EgBVhYl86OZVFlfXYYPRlgkNyJ5 ZLetNccei+iMcq+oUdIyXMHLQdxaT1mrBPZevFXg/tKEe+M7m+k9U2GoDrGJnoleqL21boU hup7WKin7gkvpCo6HsNwf4I/UgMhbbaIbF4Otl8cLOoxJGTiwAXokABtiR+YCnF29EiWM2S 8z981nWY5rNZdcjivK9BQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:PMvBGUrLKEQ=;reQ5yaLcz8S5QC9RZCJP7PEquME i61MytT69U6GYBTvw/M37iNdwZp36vnLzBioOmt1FaH9GOLGbJJSSp+mzwdH5q2xgyt+8EvHq kvsV9lpYRkaj6i9RNq1oDGepSrclDqfwJxO5b8w9hqoS2KTY8W6C3kWRxMrallOE0eicRSAHk h3UMs1RxsGlMEQYlwuGOf2i80+3z+781e20pBT96OIykcxhgeh4e0ZiGFPXI3MUmTetIjPv2j AB3RFv2utIDIBhxYhgu0aUG8SYdnYcMKrDpPCEbDNlmWglrnGA+x8ZXKvuU7seR8Ie2UILjIa WiN4BWL7zPQTK2tlBU0tkq8Qh3v/fImN9mDWJ8vRIwNaDTBYle2bN+ENl1bOjh0TPGYFMn6Na LEXJwUsZ89xzXodUEY+g+gvAXf6nPEcqRYckHAD1C2r3gjmfjQsQQZ7i5sIIahBsUZljCXAbA 6QAeumhBdzwX6qab8TD+QKagN/EngFpxyxnTMf8n7j1lSOpvVZQdM66DFB41kTpus/lD1N3BG qbOxaYA7QPQcrZmqXSYPpPIruMvJQ3Dm+qZzfA/N0+dhG3Lovf+8fmmlYT6X4BSPMJdzz5KfE 61wvUyR2VnXasbVZTeOkLtmdkInmoZzRlCvq2pgyjC+cYFHI3LBWOafGtSphBrTe8qC2JnBVd 5/Bfun7zMO2OFLbXPXv2NdwJ2ifmFPisZSs3J0TZpvpevGNlsq7M6Jti77ParItTYNIU97AaB UHez3CpYr949bjimuXig9ZBhmehqEdBh0oC4Zv89v0n8VusdKBW8nSnqSsSQsBmYyGpQjRODj acUq/E41egChXNDZbmwbxNxA== X-Patchwork-Delegate: kuba@kernel.org This message is a leftover from initial development. It's unnecessary now and can be dropped. Signed-off-by: Stefan Wahren Reviewed-by: Simon Horman --- drivers/net/ethernet/vertexcom/mse102x.c | 3 --- 1 file changed, 3 deletions(-) -- 2.34.1 diff --git a/drivers/net/ethernet/vertexcom/mse102x.c b/drivers/net/ethernet/vertexcom/mse102x.c index 4ce027f8e376..8a72d8699b84 100644 --- a/drivers/net/ethernet/vertexcom/mse102x.c +++ b/drivers/net/ethernet/vertexcom/mse102x.c @@ -733,9 +733,6 @@ static void mse102x_remove_spi(struct spi_device *spi) struct mse102x_net *mse = dev_get_drvdata(&spi->dev); struct mse102x_net_spi *mses = to_mse102x_spi(mse); - if (netif_msg_drv(mse)) - dev_info(&spi->dev, "remove\n"); - mse102x_remove_device_debugfs(mses); unregister_netdev(mse->ndev); } From patchwork Tue Aug 27 19:10:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13780075 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (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 DDA381D2787; Tue, 27 Aug 2024 19:10:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724785846; cv=none; b=pPSA+NitYGtl5+EfOCpSgwfbvyjDrkS2LntULksldoXZmlRjZtOvLyYU/MPscHJwzh3Sa5qruFZ1T5b8ZbuERobcS19EvZT72H9Xq1Iz3X2m0PGqbRf4Qq7gJ2GZj43jxyG8YAsVZPnTHFtHsZoElmw6/gfX/yFjxjinkZ7wQcw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724785846; c=relaxed/simple; bh=VCg1E/yUOyYkbm2QnGpBTYpLqUv5Ug/iEYQzqGHhiiM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CskL423rQSfN8yyaEkGxmaLTvsV7gAHC/lLpsO5AimbQ+1IXPoVV/stf7qA7Y2xe1CpqC3KrhkHNaY2IQyApnFrSirf/9S974sDwV7qDzlppYnWAGuSvTtW93DFeC87ibg5Nru8VaOsvaLD+eq5PUXHiE+NRqkHcnNdRBqhgcws= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=HxPbJ4GI; arc=none smtp.client-ip=212.227.17.20 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="HxPbJ4GI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1724785830; x=1725390630; i=wahrenst@gmx.net; bh=iBp3pbEaZp9GAgIqRXdBVERs/VyykwuEMnkHZgKqzIo=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=HxPbJ4GIcYvXjUG1dEc8F0IdqNtEAT8ivSQY+dYbUccZV6xVu3Fo7CsLSYBMoBg0 qI4OvVTOatFKsJbR20+s4BU9s8nTmrv1djIDggKggC9p3zGmVC5aPKRcAwkK83EUy Kvn6G4pUiGby+2ZbcMAAGrVyou4TFVMWTXDcXTVwaLzTHiN6JRx2KBSdPkBFiLc21 pv9RbJyF8vXsN71HrvIS7Z4xYRNc0VJ/5brjKO2aSEY0RrsdbqDfLbEkWGAEkfNO8 XKuguTjgX2ROJpdLDQM80ofLJ5fKEtHJI3zEN66WRClYuUTLqucxodU3HCc5xZshX lboI63pb1BWyPZ2TiQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MRTRN-1sV5Ep2uMn-00PkuB; Tue, 27 Aug 2024 21:10:30 +0200 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 5/5 next] net: vertexcom: mse102x: Use ETH_ZLEN Date: Tue, 27 Aug 2024 21:10:00 +0200 Message-Id: <20240827191000.3244-6-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240827191000.3244-1-wahrenst@gmx.net> References: <20240827191000.3244-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:qus8KVBOsgQLvHN5h5ZsNS/fUFaROBPvHcN2AKzitTBClmsBM2Y raxPb6aihzMYj7qNWiFX8jIUCXVT4KkOmqTf1A6wj+jyi9WuzWow1XiykrqT1t59nZYZC8y zJbbD1LsiXiH5QHY7sIWgQWybEbTClelTN8GOChYCvTva6ezrVAEkCxVecekYnOZTBZt2jG 6yUMvfvqINORfUrJd7z4A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:9ZyvCe+VkmU=;aNPZiYxC4WG8jxNLbuHjflvxqpY 68SHXhXX0yUIsn8F+nrytDuSuQQp3ntgY5oQGiiOdKAzH2Y/Y/EY5bH7gx38YXmNdviMvpzmB P4zooljpsR/mCVV6q3YHjEAhIxflZdlDq5BWr+f8HydtBiuo6s7JyA+MlGbyqUvsf291ncvVo /fU5KhaMbskzPr9FzguGNlHdFPixejoSVoFWliMgY+qUFfc7ltwj+krgAeT/QoWIiTwVOABEq zeidB1UWe7LPMiE0RSVLcx3A/40ZMXNLRy3f3YGWdxHP+caCPqD6cutga2pTnW4gtqoPt5JEa JjzWbIuUrErRa8H+kPti64NezQA6pXOKXOkOtPysOKFxiMlcWKDOUXYje/o/RvF9Lh0aykZW6 LQMv7SVysk+XgudJtP3Z8mBRuIZCGZZouMp5qUBAZfn2mJq8W8+ZcC18D0iI1qWXgzdncjxY4 /pTyf1iSqdknHBy89EXPROYJkO/8mnJFjXaEtbmI4Atu6iM8pIVFHQk25S+NfGrx1k1hAi4qm XAe09hTl7qP43mCCLJxQRSre11MUF38ICStX0BSbSKlb4pZR/UxBZfiolzNgcLyf/+BcISZoI w9C0W3Aw3NNqhnUtYoOiw+X3XFgkTvlRrEtetkHh3iaK05/5LPZwC0vkpli0dbZhlOVBaeLpP ccQE51QBQLLtrOSBxAjxpAPJeyobQ/p60ASCavG6loeUrtCVeReL2xt7msR1c1LUqAYz32dg/ e8W8CNcWh3JzDmFvJUq4RoUCVqPsWlEN9a6DKpKNUN3Nd+cENAy6n+save3QmPVXx/qDDcLsA pHyaNCKk8VoeyCqW0jCvRzfg== X-Patchwork-Delegate: kuba@kernel.org There is already a define for minimum Ethernet frame length without FCS. So used this instead of the magic number. Signed-off-by: Stefan Wahren Reviewed-by: Simon Horman --- drivers/net/ethernet/vertexcom/mse102x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.34.1 diff --git a/drivers/net/ethernet/vertexcom/mse102x.c b/drivers/net/ethernet/vertexcom/mse102x.c index 8a72d8699b84..a04d4073def9 100644 --- a/drivers/net/ethernet/vertexcom/mse102x.c +++ b/drivers/net/ethernet/vertexcom/mse102x.c @@ -377,8 +377,8 @@ static int mse102x_tx_pkt_spi(struct mse102x_net *mse, struct sk_buff *txb, int ret; bool first = true; - if (txb->len < 60) - pad = 60 - txb->len; + if (txb->len < ETH_ZLEN) + pad = ETH_ZLEN - txb->len; while (1) { mse102x_tx_cmd_spi(mse, CMD_RTS | (txb->len + pad));