From patchwork Thu Sep 5 19:49:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13792937 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D263D18E772; Thu, 5 Sep 2024 19:49:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565784; cv=none; b=UZCCfE6STyg0zLNuUQGjYzSOiNdcDGu39h3rGPgbgIy+MImSr5SygPLjSdtvpBgCmTGPGXU16431UCe5EYhwD0olyypKkZdK+HgkBKhXlHhP9XciCkAI403jn9lm6LJuPyBqs/c16xRibSL/39jACNLyPVaZxdlej2v+5J/x8WM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565784; c=relaxed/simple; bh=hAk9pXqkbo2o+5MhqRTmqI9f/rGaqlCpmFo3+Ai3ipQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UK5L2bpyJ5FX74309g9Sepyg4IFCTaw5qxmKyXlKr2wYfCaPoZwkwP1c6/VgsF4EDKEx6kQiLAeJqoiu94rEjJ15OcO4wAM3X0Wh1e6X5IRVFs4pC4jjyFVb5dzzOTaTMtkju5VwyIOVRZ8Ej0RI8sgG1Q3FNImdA2DVLB2nAEg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HqvUs6+2; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HqvUs6+2" Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-71767ef16b3so800883b3a.0; Thu, 05 Sep 2024 12:49:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725565782; x=1726170582; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LUmhuELtVNs0Uu50P1tyTkvo5EER/vEBydF2CtAxSf4=; b=HqvUs6+24zJl65ciacOBoob9dVu425kwnZVSY7Gd3kyzAS2Etp235ikCGhr0TVwuLD zOSLIzWyf4QS4BLk8IDS+oaQEzboNHBABa2q8jELiKTziM21yEUwhOlN3MT82kVIp/go 1DAFbS1eI9JJD60pDr3dBeUeXYBlwAvFjEQy7IBSr/v1F3KOpVJADP24DI9mgpvmhBU5 2n4wI8ltsBaqvafTguvuHkIeqNpBIsPYc6SuAVyP4ybpHDMDEuuf8F9lCjpg0UFeaJ4T Nyhqs28r46oMgibY1Ai+f/LPnWP1QH5t0M4wjvYkHFz56RuBojjPWhiX1ufFAW2Kpq1j OBMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725565782; x=1726170582; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LUmhuELtVNs0Uu50P1tyTkvo5EER/vEBydF2CtAxSf4=; b=htNLLYLsyaW5XS68mfJKfJj8Z8vdeJvpbBSi9iokXUB7RIoV4l2yazpONO8B993sBQ gi8EKJyhtlE1fpESi4I3OjDUDzENPFlSIfayGWOxGqnEUi4ZoB6r0mGBXcvkQJcRjSvC QqFjN+XhZp6kdhQImz3FHizWAclD9QRp8+CmpQDJd473J99NRFPGQH/EjKXFeDN4R+YB QcjZG7M12jaHvkx3c3X+vkC05kbZWpKMa38ueM7/uoxH2QVuoD0eE+XEvxxIk9cOFRI9 gFeSVVIRAiDjiAdbfqeXruYoSUfqMMMPtEW8krJ2ohlS2tPxv5Q26llq9uxo1mQ4i72K WtuQ== X-Forwarded-Encrypted: i=1; AJvYcCX8xfdExe1T4iI2PfA6Boz4cvzJYTr3NCBTl30K+sHJpuisR3ZAlkYjisIYLmWxXT+0f3uGW/zWpQFOTRs=@vger.kernel.org X-Gm-Message-State: AOJu0YzJoNnCBcaceZ4OqC8arNmDk93PMBGizRZJHkVJu79ZJBUydOkd cx4+uK0TP0yFD+ZR4dP199X0L584+vzJXogN3txx4S70MAN5cH+haP0vE0ip X-Google-Smtp-Source: AGHT+IGU9F9j0MLcMSEyQw55on9GjRQS3pue9/pZJ9yl4bX73p7jFnMkyVCLZ0R3hVuYIJe1C65Sag== X-Received: by 2002:a05:6a00:1896:b0:706:284f:6a68 with SMTP id d2e1a72fcca58-718d5f0d28dmr288555b3a.23.1725565781839; Thu, 05 Sep 2024 12:49:41 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71791e54585sm1248410b3a.182.2024.09.05.12.49.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 12:49:41 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, p.zabel@pengutronix.de Subject: [PATCHv2 net-next 1/7] net: ag71xx: add COMPILE_TEST to test compilation Date: Thu, 5 Sep 2024 12:49:32 -0700 Message-ID: <20240905194938.8453-2-rosenp@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905194938.8453-1-rosenp@gmail.com> References: <20240905194938.8453-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org While this driver is meant for MIPS only, it can be compiled on x86 just fine. Remove pointless parentheses while at it. Enables CI building of this driver. Signed-off-by: Rosen Penev Reviewed-by: Simon Horman --- drivers/net/ethernet/atheros/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/atheros/Kconfig b/drivers/net/ethernet/atheros/Kconfig index 482c58c4c584..bec5cdf8d1da 100644 --- a/drivers/net/ethernet/atheros/Kconfig +++ b/drivers/net/ethernet/atheros/Kconfig @@ -6,7 +6,7 @@ config NET_VENDOR_ATHEROS bool "Atheros devices" default y - depends on (PCI || ATH79) + depends on PCI || ATH79 || COMPILE_TEST help If you have a network (Ethernet) card belonging to this class, say Y. @@ -19,7 +19,7 @@ if NET_VENDOR_ATHEROS config AG71XX tristate "Atheros AR7XXX/AR9XXX built-in ethernet mac support" - depends on ATH79 + depends on ATH79 || COMPILE_TEST select PHYLINK imply NET_SELFTESTS help From patchwork Thu Sep 5 19:49:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13792938 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1737D193434; Thu, 5 Sep 2024 19:49:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565785; cv=none; b=SxxM9WYvlDTa7AqVXIH0zJSxvGEgsv+5Nr8Q08ooqnPYcgrZU0juFRTV+ofd+qGqCfqLGKm1qenW+k4Ka7wuRcEWgoUsLL0PxFHjU0simeL/kls9rYoVt1FycPJWgHTdmaGH+/OLCl6Fg8T4srdvnp/Ko0NSIqyv4ykddmx44Ec= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565785; c=relaxed/simple; bh=2e+zqLJChzoEk17K7RQCNuO6avikar5qyyl/r+8hbIo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EK/eilEy/KxyN/zMUuaFzmUYWkN6FmGr/GAn/JHrWqskw9O6rHuyGmq+dmi8ZCUETav6GyvRNjSV5m0H5JQJYLPEQCjYTElZQkrtDVNu9hwHdTG9x0n8RPJ4ZRzgMYxA2WbNoCct9iJhhUSWjx2cFQfOFwplsKm6rboJhu3acNQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IpBqYwjC; arc=none smtp.client-ip=209.85.210.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IpBqYwjC" Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-715cc93694fso1080190b3a.2; Thu, 05 Sep 2024 12:49:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725565783; x=1726170583; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HDORespKQdD6y18i2/lwUAe4YrBswe868gOWj16POCs=; b=IpBqYwjCQWqLfcLS0SfNT/p2v8qKnE4o42szUlDaoYAucKI4R1l5kO2lxMcS/tTQwn 5w/hpK4U+N7cgMxDbvSoDuuGaby6/HK+BrTbsA9Jq1c6jmLpPqnP9Thq9vXtF1IAjaxF GAi8F0iecU7aiEd5kur/NtkAYK7d7b58/tS2P0S3gmvFhBkrgRjToQY14/36FrTZawEt RKN2wa9bcnmR93v+62MufTStAZMDc67MPGgmhbcLrLKcXGMEvT+oyMwU4BZbmypW84Pj 0LvhmZspfVw92NlT0jUpf0Y9P5wglKPvjOG2w98RteIW4/NUwV0l1BB5UR7Dq6DclLGR JE1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725565783; x=1726170583; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HDORespKQdD6y18i2/lwUAe4YrBswe868gOWj16POCs=; b=heBwjeHATjBR5cEAJtJ63ZmoJWHB4kp2GZURinEEkuy8Ddt8HlyUUyj0gvpgoEsfdt 9f8nQ21smR4CBo0wfjdMH/PtMei86HY3YRwXs6llzIjNPwfM16B/dZrVgTouSj356j+a AY2BalZ8+sahg4jQn+BWSKNE2K08ygrZzZNRl5SI8SlKjdTOp2Z3Ll/YS71QwWXjSS8T mikdPf9eQcjG0RaEEe6p6Ow6kr2voxPD47Yqm2kG6E9foCYH/1FMiz80Q/OoIiHLA4pS 18DK3yLLWs6yGMexiQgGppaVo5hbQdDHFKBZaCS+pHNDxT7PFcC9l0CYog2+EHDaXqJG KBlQ== X-Forwarded-Encrypted: i=1; AJvYcCV9L6FhDPoD+KdUvGCg0Lpylm8R5An7ShhmD4AkJpmqjNZuhUXNVJZBbjzquwr8dm23SZ81Fm7Zh5ZTcpo=@vger.kernel.org X-Gm-Message-State: AOJu0YwBaRXMQC96b/568OAzjP/5PvsZ1HqmY5ZqRlCh/rH6t27MEvO8 t5N8WRwvznlkQcwbFo8SXvzV2H4xAP9zyfkDTxZbrP1nEnZFZ5yJtC+jUgkp X-Google-Smtp-Source: AGHT+IHWfs0ZKT4XrRqI/6tXkYn2zDzLsooHJtJMUNXqmuBZpj15Uw7z4zm1C2OyFVp6rEuQNQIBrw== X-Received: by 2002:a05:6a00:1a89:b0:714:157a:bfc7 with SMTP id d2e1a72fcca58-718d5e53d08mr284848b3a.15.1725565783055; Thu, 05 Sep 2024 12:49:43 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71791e54585sm1248410b3a.182.2024.09.05.12.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 12:49:42 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, p.zabel@pengutronix.de Subject: [PATCHv2 net-next 2/7] net: ag71xx: add MODULE_DESCRIPTION Date: Thu, 5 Sep 2024 12:49:33 -0700 Message-ID: <20240905194938.8453-3-rosenp@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905194938.8453-1-rosenp@gmail.com> References: <20240905194938.8453-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Now that COMPILE_TEST is enabled, it gets flagged when building with allmodconfig W=1 builds. Text taken from the beginning of the file. Signed-off-by: Rosen Penev Reviewed-by: Simon Horman --- drivers/net/ethernet/atheros/ag71xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index db2a8ade6205..e7da70f14f06 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -2033,4 +2033,5 @@ static struct platform_driver ag71xx_driver = { }; module_platform_driver(ag71xx_driver); +MODULE_DESCRIPTION("Atheros AR71xx built-in ethernet mac driver"); MODULE_LICENSE("GPL v2"); From patchwork Thu Sep 5 19:49:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13792939 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40B051A0721; Thu, 5 Sep 2024 19:49:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565786; cv=none; b=Dx++Drzoyx+5uKtG0IpIMM+33WUi//ygyFOAB2zXQcOHWd5iwpvv4zVcX+oLYeeBD36Qgggxe1Gyk12THofhNRCSVALihN8caWlG+fso99oX7LkIq+mlTgcNNtGjSLaHpfglIIjFr0eSTAnGJiVup8ZWgblWLJx/u/dRrOgg2Ic= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565786; c=relaxed/simple; bh=oHroWVGxmMxmoFyojOaOYeUj3KBNuZ53lO8tuQLNXrk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DCbXBYcIptGh2ahqnOE5E6yyqSIKtIZQV5S0YfGVxCaHJrTQuJ1o42JBLA+M93f+1WOc/k+5t9ACLDwBl2UPOQbG9AGRvoDI2y6Mcdc7xLOt2UHIBT/6LoDNexi8DT/MI/ZNCltkTFrNgEDUBOMzj+bBHfTgLCi/Gni7lXOV5xs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BZhFA43S; arc=none smtp.client-ip=209.85.215.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BZhFA43S" Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-6c5bcb8e8edso923413a12.2; Thu, 05 Sep 2024 12:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725565784; x=1726170584; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SnmxUQqRtH4TCHr6G7et4HHFrfCoGXFp7X7UNG+dva8=; b=BZhFA43SgWWznvzEaU6FHBfS20RTYrq49efnvq3byFCw+eA+5QWNyXmCJt9DFrkJAl rDkiPy25gpBVfCObzZsdDPz+YrJvZhHKNi6EkizJUPlCQMgQh0zFhOuRYFCE+8vabA1d 2R1HnKmMUxAnCGCIUMuCK351WuuKkJaK5Qsjy5MbstZ2F5HkmywUMEbbNcqv4jk3GUey rngKXsOOTynaxP6WdD/tH4ZOVjMhm2b9iBcj6LUi5maxvtJ7N2wKYs+2S0bwPvCZ7Vy3 SxxG7TBr0LYLqf+m95Jfujb2JE6uplkIGNcmnh6PYokqNRb4TSxoixwHfLHp6l/bugUp u7Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725565784; x=1726170584; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SnmxUQqRtH4TCHr6G7et4HHFrfCoGXFp7X7UNG+dva8=; b=l9BO0A5o6defcYJVvdD75r0ttFTtYdFvJThSNksNxWpXwkz8UxQUkjLWVa51zK3sh9 QlIO8FSYF543ZYTu3CL0y4YodoljC4khFA093Yod3jJMYwCjpu+IgnIch551o85GQS7G vyQLJnzCHs24LbY+dJS90iU55GZIXgfHS1JH6zMezURt/8QEkkDmJlhoU0LzNsm5eFCT mtNZU/qSq8YLvaR8H71LkaQs7Acxm8F5xvqMCmBAbWO67B8EdaJbp/VUTbn65bmFXO3/ zbmNAlvmbib72uIwb4h00pBTetLvUUlcuvQuMrzSexx4EfbXjM2ENueSmPdsgax8OAzt 88Qw== X-Forwarded-Encrypted: i=1; AJvYcCXdYo0b0LPpFSNqKyFfPNiTYwBA5mRB/hTKcup2c5ZOmyyZk/m4xUf/Dm2jwWFJUqmLpjcPe+qtb1c52EI=@vger.kernel.org X-Gm-Message-State: AOJu0Yz0jji5FLyv8YSCs/MNGk0iBnWV2Thv0TVa68RcX4OkQ0/txu4D XRpNe97MXhx+0ktiJ00cwWBAT9KC0zXnLEq9uXABYmd8wDNw3cB0R3IVsONw X-Google-Smtp-Source: AGHT+IEnUI2db9UPKQfKa7ssvFR2egUWf28hTWjaTTYi16U/JYiU/jpXIyAyYlltZGNKLhWGY45Mpg== X-Received: by 2002:a05:6a20:43ab:b0:1c4:6be3:f571 with SMTP id adf61e73a8af0-1cf1d1b32b9mr60419637.39.1725565784257; Thu, 05 Sep 2024 12:49:44 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71791e54585sm1248410b3a.182.2024.09.05.12.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 12:49:43 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, p.zabel@pengutronix.de Subject: [PATCHv2 net-next 3/7] net: ag71xx: update FIFO bits and descriptions Date: Thu, 5 Sep 2024 12:49:34 -0700 Message-ID: <20240905194938.8453-4-rosenp@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905194938.8453-1-rosenp@gmail.com> References: <20240905194938.8453-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Taken from QCA SDK. No functional difference as same bits get applied. Signed-off-by: Rosen Penev Reviewed-by: Oleksij Rempel --- drivers/net/ethernet/atheros/ag71xx.c | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index e7da70f14f06..74e01ce6161f 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -149,11 +149,11 @@ #define FIFO_CFG4_MC BIT(8) /* Multicast Packet */ #define FIFO_CFG4_BC BIT(9) /* Broadcast Packet */ #define FIFO_CFG4_DR BIT(10) /* Dribble */ -#define FIFO_CFG4_LE BIT(11) /* Long Event */ -#define FIFO_CFG4_CF BIT(12) /* Control Frame */ -#define FIFO_CFG4_PF BIT(13) /* Pause Frame */ -#define FIFO_CFG4_UO BIT(14) /* Unsupported Opcode */ -#define FIFO_CFG4_VT BIT(15) /* VLAN tag detected */ +#define FIFO_CFG4_CF BIT(11) /* Control Frame */ +#define FIFO_CFG4_PF BIT(12) /* Pause Frame */ +#define FIFO_CFG4_UO BIT(13) /* Unsupported Opcode */ +#define FIFO_CFG4_VT BIT(14) /* VLAN tag detected */ +#define FIFO_CFG4_LE BIT(15) /* Long Event */ #define FIFO_CFG4_FT BIT(16) /* Frame Truncated */ #define FIFO_CFG4_UC BIT(17) /* Unicast Packet */ #define FIFO_CFG4_INIT (FIFO_CFG4_DE | FIFO_CFG4_DV | FIFO_CFG4_FC | \ @@ -168,28 +168,28 @@ #define FIFO_CFG5_DV BIT(1) /* RX_DV Event */ #define FIFO_CFG5_FC BIT(2) /* False Carrier */ #define FIFO_CFG5_CE BIT(3) /* Code Error */ -#define FIFO_CFG5_LM BIT(4) /* Length Mismatch */ -#define FIFO_CFG5_LO BIT(5) /* Length Out of Range */ -#define FIFO_CFG5_OK BIT(6) /* Packet is OK */ -#define FIFO_CFG5_MC BIT(7) /* Multicast Packet */ -#define FIFO_CFG5_BC BIT(8) /* Broadcast Packet */ -#define FIFO_CFG5_DR BIT(9) /* Dribble */ -#define FIFO_CFG5_CF BIT(10) /* Control Frame */ -#define FIFO_CFG5_PF BIT(11) /* Pause Frame */ -#define FIFO_CFG5_UO BIT(12) /* Unsupported Opcode */ -#define FIFO_CFG5_VT BIT(13) /* VLAN tag detected */ -#define FIFO_CFG5_LE BIT(14) /* Long Event */ -#define FIFO_CFG5_FT BIT(15) /* Frame Truncated */ -#define FIFO_CFG5_16 BIT(16) /* unknown */ -#define FIFO_CFG5_17 BIT(17) /* unknown */ +#define FIFO_CFG5_CR BIT(4) /* CRC error */ +#define FIFO_CFG5_LM BIT(5) /* Length Mismatch */ +#define FIFO_CFG5_LO BIT(6) /* Length Out of Range */ +#define FIFO_CFG5_OK BIT(7) /* Packet is OK */ +#define FIFO_CFG5_MC BIT(8) /* Multicast Packet */ +#define FIFO_CFG5_BC BIT(9) /* Broadcast Packet */ +#define FIFO_CFG5_DR BIT(10) /* Dribble */ +#define FIFO_CFG5_CF BIT(11) /* Control Frame */ +#define FIFO_CFG5_PF BIT(12) /* Pause Frame */ +#define FIFO_CFG5_UO BIT(13) /* Unsupported Opcode */ +#define FIFO_CFG5_VT BIT(14) /* VLAN tag detected */ +#define FIFO_CFG5_LE BIT(15) /* Long Event */ +#define FIFO_CFG5_FT BIT(16) /* Frame Truncated */ +#define FIFO_CFG5_UC BIT(17) /* Unicast Packet */ #define FIFO_CFG5_SF BIT(18) /* Short Frame */ #define FIFO_CFG5_BM BIT(19) /* Byte Mode */ #define FIFO_CFG5_INIT (FIFO_CFG5_DE | FIFO_CFG5_DV | FIFO_CFG5_FC | \ - FIFO_CFG5_CE | FIFO_CFG5_LO | FIFO_CFG5_OK | \ - FIFO_CFG5_MC | FIFO_CFG5_BC | FIFO_CFG5_DR | \ - FIFO_CFG5_CF | FIFO_CFG5_PF | FIFO_CFG5_VT | \ - FIFO_CFG5_LE | FIFO_CFG5_FT | FIFO_CFG5_16 | \ - FIFO_CFG5_17 | FIFO_CFG5_SF) + FIFO_CFG5_CE | FIFO_CFG5_LM | FIFO_CFG5_LO | \ + FIFO_CFG5_OK | FIFO_CFG5_MC | FIFO_CFG5_BC | \ + FIFO_CFG5_DR | FIFO_CFG5_CF | FIFO_CFG5_UO | \ + FIFO_CFG5_VT | FIFO_CFG5_LE | FIFO_CFG5_FT | \ + FIFO_CFG5_UC | FIFO_CFG5_SF) #define AG71XX_REG_TX_CTRL 0x0180 #define TX_CTRL_TXE BIT(0) /* Tx Enable */ From patchwork Thu Sep 5 19:49:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13792940 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CE001A42D6; Thu, 5 Sep 2024 19:49:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565788; cv=none; b=cUqUmjHYfl6/SkBS3vo3t0QhVzgWCmkKVD0SpQkUDuGUR/kaQvrZq8GvYMN/wIiDATJulQ/mU732PLCBE115QEaGx4HiDYjGA5o5ZmNBQRytWbhVrAQE/PoMFqQA9qqIF/83eHk6BndjSNeXB3WleNClOsuP5BjjpYGH+1uEOQI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565788; c=relaxed/simple; bh=ocOTfn15mZ42FkdGoCVvk24eM2eHdWKcU5toPFzmbqw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GFpXMWktABXxXQ+HtUrAgujPoNUDxn0W9rbnJafSHOsC/w3ot1E3/63jnact3FzscVHWr9HfAltJBfQY65TOtvFQ/+Gg+VWf8JrDsfIqEQMZkuZfm6BXTYlaqiu+1JyyCOsy8oB35Cww+QMfRpwHbQur0sKNLJBKM/b+CL4YOpk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AC1qFvpa; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AC1qFvpa" Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-71434174201so936123b3a.0; Thu, 05 Sep 2024 12:49:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725565785; x=1726170585; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sNQBpvYKouXNClVOfI4NyYFsKZ6EI9XmLFucKyRCJCQ=; b=AC1qFvpa4DszVMeOMqIv/UDsy8IpNDJcoGK0LlHQNimRGS9lgUnKlPdTdxkYUBWtbs VMDAxDundkoDE8g2rAEOpj8VYF0stsf+dZuEdE2EeBHY649FHVU2ZW36ZSksTijrjLZC doidf2p2HgxqlGXxXJG0S59wEbgpaUJ1GwK82qRXaDiETbMW2prHOsmfhE47sI57Zuiw iDgVHjt3UyirIO7saT8VNqqYplQ5/otuJLbIkJq//op4XcAf0cbaUKCctuQL4CjoFmgB 2bzIJlRFcpZIjSVVFih4GTQFMsOm6Nd06ET4FiPgbCIv7SZrKa81cPINtyAddZspx1/O /ETA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725565785; x=1726170585; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sNQBpvYKouXNClVOfI4NyYFsKZ6EI9XmLFucKyRCJCQ=; b=eIr41R2oyVKZpndEtDF+IPjWC8Eonzo9RceT5hzK2SoGlSHje/QHhIzOjd3YiOj5fC Pkfi7idkAiotohygf8TQct5pvAJ84buhKDJATs+nkTAjlXgvMLjJtbuh4ZBPK50qmS8r AfTIunSAKswcT1Dk2YocX0/uSUaEQPEw1L50+JA0xnQ9lqUamV8xkqbVZi7RFkGx54SO bY/SsFXIgSo6xth/PktGg7hsU9PRktPt6b+dRWGYljW4aEfqiXVbPywv4rEk2QNcYw3i bwgwO9AlDrDcuAppkpeoBChYQBfbUqTlCvQFc1eYWNK3EKfHf5gEM87BHFDYCbyxmZ+B Gssw== X-Forwarded-Encrypted: i=1; AJvYcCXLaMAjx5tgkiqGXA6vkHssTQ8MWh5iC8Ifw5h4ganRVJAxtE8eEVjlDbG2SgAAE5WwuhL1hWJnVHZ+Z68=@vger.kernel.org X-Gm-Message-State: AOJu0Yxhpt5HRGEaAl3CwRqVaMD/9YpqbRW4CaztsqXn2GloNWnCV3Mk gRKn84/oKD0B0+E9KOeSMY5x8mujbI73AIDpz2io43EP9tI7tmS+0n5Iqyfy X-Google-Smtp-Source: AGHT+IG73rhYUtUHyzQ93pumcceiIgg9mSDXSXOc95psCZbYN9c4DSJ+iLUICWdYQxb/wcYsluFvww== X-Received: by 2002:a05:6a20:e687:b0:1cc:e50a:47b3 with SMTP id adf61e73a8af0-1cf1d237d2fmr36803637.31.1725565785508; Thu, 05 Sep 2024 12:49:45 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71791e54585sm1248410b3a.182.2024.09.05.12.49.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 12:49:45 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, p.zabel@pengutronix.de Subject: [PATCHv2 net-next 4/7] net: ag71xx: use ethtool_puts Date: Thu, 5 Sep 2024 12:49:35 -0700 Message-ID: <20240905194938.8453-5-rosenp@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905194938.8453-1-rosenp@gmail.com> References: <20240905194938.8453-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Allows simplifying get_strings and avoids manual pointer manipulation. Signed-off-by: Rosen Penev Reviewed-by: Oleksij Rempel --- drivers/net/ethernet/atheros/ag71xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index 74e01ce6161f..35db6912e845 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -509,8 +509,7 @@ static void ag71xx_ethtool_get_strings(struct net_device *netdev, u32 sset, switch (sset) { case ETH_SS_STATS: for (i = 0; i < ARRAY_SIZE(ag71xx_statistics); i++) - memcpy(data + i * ETH_GSTRING_LEN, - ag71xx_statistics[i].name, ETH_GSTRING_LEN); + ethtool_puts(&data, ag71xx_statistics[i].name); break; case ETH_SS_TEST: net_selftest_get_strings(data); From patchwork Thu Sep 5 19:49:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13792941 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2C421A76AF; Thu, 5 Sep 2024 19:49:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565789; cv=none; b=sagyYWtYp3QA196vDcWnntk82pVc3FqOWEJ7QZpTalIDlvdwWffxZzfwOlbb56FS490o4QPq3Eexh/GwUZY03e4sTxofDD9AyIErUvEHKEeA7laP5Fur46D6F2Q5RxYNzFQmLboP14Etrny8IdxHI3gwCNGVubxzxEDGdj6DgvA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565789; c=relaxed/simple; bh=e4LMAghAK6jo5o+X1LD08BhfgGQOz6zRc1nTh8q/nQ8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b9weK5W8J7WC3QZqMhoLANs5RQ4FN8FhnruzKIlmhQ0lHzQZjwXdu2KPJ2WDSJJBLfVsaC7IEzhWtjUW6PYI5tGwEEXi/RwYLGZSuygNIcRRwTqEpbHDc4sYWVOOSql7UtRg5e0C6pJQXKHtFcqqnH1tOFc6mYKco1FhaUiU9J0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lBwEk+YC; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lBwEk+YC" Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-70cec4aa1e4so866045b3a.1; Thu, 05 Sep 2024 12:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725565787; x=1726170587; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HL1pfpncPHaRZcWn98mFEfkaPIbamaj0hcsUBZfNekI=; b=lBwEk+YC/9FxexOk/rRlNq7tjZYemcT70gXV4skSvBmoITVNI6jw6BOSlnsddKHwPW IepQcVBUeEIwZc4Rx43e7iovLfcI27pGi7dBZ4wh5mZRCGgUQJznX4Mqt8qODEDb3OfL gZWJwQKaL+C2hAhLpzexR1EbJ2eONThD5nBeSHrOsLndV1LvLENuNXtU/Mcu4/lIIbtm 7KkL+DBK0tiPd48iVueDtzul6BsFzVX4eAgq8aedi34rgEyUYdTyaU+E42bYP3/B25s5 EAc9NLAm5RhYrkrSKYJBCJ59LZELf8ZYG9DwK22o1jX6F+15HRtl2wxtiX/DEVIICECN Zhvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725565787; x=1726170587; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HL1pfpncPHaRZcWn98mFEfkaPIbamaj0hcsUBZfNekI=; b=azv6DbP4HZWpJE8K8+lz2bM+osW0gS6+vTCtCHAkVlgTgoRV+8cC8MOzVF5V1OZJjx Gm0CnJBvW9NQMUx8thWlUsfnUtDTYtQx3He5MaJl9on+91YV3CEPSMEraxCNl9PdOmq9 W0B35DQ1LduqQUXLZyBvUWL+xczDZ1DH0X4KfFOhLfKNXCSvG5HB4bTyGbqPc9/fvK5w fzfMdohYqWTvfq02YJ8+BLYeJsHFmA9BaMv+6W5oTFabjnRwetvUZFiHDuYjhLffAJ/e Cv5RITTqsrQQWQEinaCdwSdCQVxG3PTvjkMSJqzy49LQ8G+J4kDNf0VbTQSVWTggDk0T IE2Q== X-Forwarded-Encrypted: i=1; AJvYcCUzPBfbTbTxrXKLicmIh+1LJYaX5FjZnjgik1E+Hc6yyCH1sAH2OWOaIriR/C5d1LhCyNBl+Ls67zt8DFE=@vger.kernel.org X-Gm-Message-State: AOJu0YwyC9pxv3+a+nlBLOWU7XywBnZayk3Oz5J5BE3CYZhmucdtvTag peJA9UXGgkWLL2d+3C07I9FwU56d1VOtPWBD1QKaEkKte6PoTzWZYNEvqaFr X-Google-Smtp-Source: AGHT+IG9IDvsFgmdmoSaweIVmZZDA9BTh83Iv6B1a5andu+0H+OFFrl10Ae7PCVqrOxNmlItLJ+37g== X-Received: by 2002:a05:6a21:3987:b0:1ce:e080:185c with SMTP id adf61e73a8af0-1cee0801caemr17859602637.41.1725565786921; Thu, 05 Sep 2024 12:49:46 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71791e54585sm1248410b3a.182.2024.09.05.12.49.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 12:49:46 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, p.zabel@pengutronix.de Subject: [PATCHv2 net-next 5/7] net: ag71xx: get reset control using devm api Date: Thu, 5 Sep 2024 12:49:36 -0700 Message-ID: <20240905194938.8453-6-rosenp@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905194938.8453-1-rosenp@gmail.com> References: <20240905194938.8453-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Currently, the of variant is missing reset_control_put in error paths. The devm variant does not require it. Allows removing mdio_reset from the struct as it is not used outside the function. Signed-off-by: Rosen Penev Reviewed-by: Oleksij Rempel --- v2: move variable up to maintain reverse tree. drivers/net/ethernet/atheros/ag71xx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index 35db6912e845..a32a72fa4179 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -379,7 +379,6 @@ struct ag71xx { u32 fifodata[3]; int mac_idx; - struct reset_control *mdio_reset; struct clk *clk_mdio; }; @@ -689,6 +688,7 @@ static int ag71xx_mdio_probe(struct ag71xx *ag) { struct device *dev = &ag->pdev->dev; struct net_device *ndev = ag->ndev; + struct reset_control *mdio_reset; static struct mii_bus *mii_bus; struct device_node *np, *mnp; int err; @@ -705,10 +705,10 @@ static int ag71xx_mdio_probe(struct ag71xx *ag) if (!mii_bus) return -ENOMEM; - ag->mdio_reset = of_reset_control_get_exclusive(np, "mdio"); - if (IS_ERR(ag->mdio_reset)) { + mdio_reset = devm_reset_control_get_exclusive(dev, "mdio"); + if (IS_ERR(mdio_reset)) { netif_err(ag, probe, ndev, "Failed to get reset mdio.\n"); - return PTR_ERR(ag->mdio_reset); + return PTR_ERR(mdio_reset); } mii_bus->name = "ag71xx_mdio"; @@ -719,10 +719,10 @@ static int ag71xx_mdio_probe(struct ag71xx *ag) mii_bus->parent = dev; snprintf(mii_bus->id, MII_BUS_ID_SIZE, "%s.%d", np->name, ag->mac_idx); - if (!IS_ERR(ag->mdio_reset)) { - reset_control_assert(ag->mdio_reset); + if (!IS_ERR(mdio_reset)) { + reset_control_assert(mdio_reset); msleep(100); - reset_control_deassert(ag->mdio_reset); + reset_control_deassert(mdio_reset); msleep(200); } From patchwork Thu Sep 5 19:49:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13792942 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43C401AE846; Thu, 5 Sep 2024 19:49:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565790; cv=none; b=K3gh2Zz+P2Kd52qqXZqi9PqP/bEiLYa6eY22wTycHri4EhNg62VkF0ndwXv7BF9RXFxk9AMaSuEOvIy3zFlKk6qsfyL2uDHP7CYwnv/CODRS8yGt3vSNqiHdzm5xHQrq/yifJfowTlz6BSf3T0OmajC9B9AmggUnAr2mv6ScHI4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565790; c=relaxed/simple; bh=1MXbig0Gfe11O9LAOpeyyY7fZHq5G8pcekT9BHoBb0M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=et+FIqYriEdOi4g1kQaeY9v9Mud1qsmZ4Nmg1V0LadGFgA5xkyBBftHiFmpiJLpL5ehxVEusAwMZGQDXZyD81FmEV0qt1ECGOs3kYDMXGD6qPvbBOs7ydFNw369EQ39B0jnSSznoHoT44O5zg0PkLC/BEGKz5YwADiaKqW4kXas= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JyoGwzVH; arc=none smtp.client-ip=209.85.210.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JyoGwzVH" Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-71798a15ce5so468810b3a.0; Thu, 05 Sep 2024 12:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725565788; x=1726170588; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2qpO2KwJrMxcAODh5GIPUFfJla71GHWnB9AbZMPCT2w=; b=JyoGwzVHShWnsqrYbffgpXbYGTDXPmAsCD+TxwwB7RcuJd9orQ8jAYVrlh9l7+qmV/ WY+CiR3VwhbfOzYpps73+koVPBHbsrJXOZVXzPhKDPRuHHKlL/ZyJIFBNeS1KR1tUeGX D6Q7PZAvue5jf0Ss5UQQSMh1oD2agfAwg2ZXfxxQxeiOyer9aTqPXnsPOHCpYlD6ZIkF 3acDYJPiXKXTr/85cla4ZZ0Qz+YPhtlJaQVJrMfMuUYuiG2Gg/WylHrt9vQbBUdDtROi ZTaBjXU/VyhcTMEfXBAvQcbKd9Jz1hGx+qT5swpyNHmXw7HaWqmXK7t3hjtjXMNNQxNO jqjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725565788; x=1726170588; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2qpO2KwJrMxcAODh5GIPUFfJla71GHWnB9AbZMPCT2w=; b=w+PVXipGKmwjgP0ZAe/ZhM/tOnE2+GVfVWXUfyEgUEXa1e9DpGhKCQ+qeg1zoUBJay GiZc7dDk1WZ9F/XXkCTNsagfkVHGM6v+fU9Vf5/yxUFG4Zj3DaIPAgQEJQU7i1B2bbK4 Jl2Z52Yj02BXu3TxsQAkXArKXsVxANSmECRC5XEYo/OmuJC9m4rC6/EW/t9yVQ+WVM+x 1Q6twIOUosLziXczePbr8A/qh+a+QtIpmOYC2HJQT/03NpI68QQdhG92DGQmoUXusGKj zZgnUCS2gUsOHq3Wi9ZytUM4+t6FPYkty2q7AljqaT4TRLbWhrz8hqe8yVIOh0ukFDVG uTGQ== X-Forwarded-Encrypted: i=1; AJvYcCW8Ff8QD4m6XCsQjvZ24bThe/LNCn42d7Iq48LqyYYiOY6RTRC/aSW1R04nNZWG8NdQYm/XzH/yA3iIW90=@vger.kernel.org X-Gm-Message-State: AOJu0YyWxyUnbJijAiuCnEpaGhsljNkOUKnBsom1jRmhNoJnY8VjFWnH lbV33vmOK81cCtBcxmf3OtY2WjN2vhysLfH0wOkFKPFSQNdvn+QLR/9uFYja X-Google-Smtp-Source: AGHT+IGd3iBb2hSC2lC2rLH6iy2MhdshYaZK9aSgm80rWUG4phhr4LZYWKDj/Sg8z0tTeoMOVUkCNg== X-Received: by 2002:a05:6a20:ce48:b0:1cc:d5d1:fe64 with SMTP id adf61e73a8af0-1cf1c0b9498mr606154637.14.1725565788282; Thu, 05 Sep 2024 12:49:48 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71791e54585sm1248410b3a.182.2024.09.05.12.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 12:49:48 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, p.zabel@pengutronix.de Subject: [PATCHv2 net-next 6/7] net: ag71xx: remove always true branch Date: Thu, 5 Sep 2024 12:49:37 -0700 Message-ID: <20240905194938.8453-7-rosenp@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905194938.8453-1-rosenp@gmail.com> References: <20240905194938.8453-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org The opposite of this condition is checked above and if true, function returns. Which means this can never be false. Signed-off-by: Rosen Penev Reviewed-by: Oleksij Rempel --- drivers/net/ethernet/atheros/ag71xx.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index a32a72fa4179..e28a4b018b11 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -719,12 +719,10 @@ static int ag71xx_mdio_probe(struct ag71xx *ag) mii_bus->parent = dev; snprintf(mii_bus->id, MII_BUS_ID_SIZE, "%s.%d", np->name, ag->mac_idx); - if (!IS_ERR(mdio_reset)) { - reset_control_assert(mdio_reset); - msleep(100); - reset_control_deassert(mdio_reset); - msleep(200); - } + reset_control_assert(mdio_reset); + msleep(100); + reset_control_deassert(mdio_reset); + msleep(200); mnp = of_get_child_by_name(np, "mdio"); err = devm_of_mdiobus_register(dev, mii_bus, mnp); From patchwork Thu Sep 5 19:49:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13792943 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BA0C1B1D56; Thu, 5 Sep 2024 19:49:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565792; cv=none; b=C1k5TULDvVe2F8NtMYyiwtbSU3bTmIybRC1cYEu2xYwzaM8ylIdKq23Oi+Q02/Mdky2gdD0fnTuEVBLcku3Gs0N3C6fmb9Ve9V0KprVn0I77fPeA34GvUWRnyJTC/pc7Xi11Xio4nIExe5QL8RacSxmlWLQpE43CL5pV/Klds0g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725565792; c=relaxed/simple; bh=2GOpH4dUCx/6xWlhBaz7YrfPlaGzpswMvi5hNvCJby8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HTCjM64/XvKYLBnAalLb0jyHxQGJuTf2xQq1LujQd0p5cO0evHa+RZWed71TNSVAJtyztWdXslKdLSYtYBZQQ7Ef0jOjCsZTehf+E4/a2slAThKAzbm9bK3Y2H+AGr6OeRBYlJErrms7bHsmX1lou9EpgYD8k01Gj7mqfwBxK5w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PnUud2d9; arc=none smtp.client-ip=209.85.215.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PnUud2d9" Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-7d4ed6158bcso975916a12.1; Thu, 05 Sep 2024 12:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725565789; x=1726170589; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zNs22ZVDs5twPg/KlrxF0LCZVcyK0csurONNSh5++RQ=; b=PnUud2d9oJLGyWSxjVi8plNAmKHEzNVgEoNPJw79dnSNjCBgd597Y96V/2FOlDAkNd XM66vWt0lKAAzGjCGN6uceu/6xiv9lBUCR2FocV566TVN5yhDBbu1kdCc1nZJxwkKJOr ce5AnZb7mj+AgqigAabMtgxqb6BQLmDl5grHGxkoZnwD/yu/vYfjMq9/intNUaVbxFlH Iec0j9Y8F47zIL3jkE0MVvaMf3R+jEKQwzdfos1uNf+ggRvFv0+oazXl3DSzBpA4Tocz hlD+cZk3wk5vO4oX2yPjn3Sco/QKp9X0CVpBI7I0GHa2b/5rMy50o6QEA0KPUIGGPzrI N/oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725565789; x=1726170589; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zNs22ZVDs5twPg/KlrxF0LCZVcyK0csurONNSh5++RQ=; b=LK6li6kA21wghs6CP6M8RHvL0rHLVWKV+8wBs3c7391AhnmFiM+1fKjv9S4/8erw9J rx82SbzehY9avSwpDH8+9BJF4L60s7x2C0ZopnCERGIFYsZ0/kWQgpnSNE7EaymsKoFn yHonUhiqQCwhT9UPD59A6Eut/9EcvUuX7GZnPyA/LPG3fmKeC/8Qo6QlLgy5rFx5s1nj jd43FcY6WtsCPbs2l8CeA4BiTJznEZgI3t5ClpEWTueyRPbl2DhFCr9ckXGxPbxzd5Xw 1W0f5XDKCAsXjeb46gnWrjSfTCn0nXzQXADN95THqL81uebXYim9Tq3QEPvhxVYgrHDH cITg== X-Forwarded-Encrypted: i=1; AJvYcCUDhXMopTgWz+M0a5BH7Fwfjsi8hlBUzyovQmlM/DNd2OTkQeLckTONpJisT8nbJ2sli4krdXXV+TPNpf8=@vger.kernel.org X-Gm-Message-State: AOJu0YzVJNVj45mke0ytL9v4rJSG6PmKkdCNrE1QDzRq1StR/gN5MWK0 WRKfEsk6rSELh4rdBKqMnt1p9lM2W3iygzorwiARU5mtimHprmhOFe5ugbX6 X-Google-Smtp-Source: AGHT+IF7Fjja6lcHracGAiX78aEJBVbbb5iBkbfsZCeCi1ty1jlysw2uk26qAYLHVE9ySf9nmO8wmg== X-Received: by 2002:a05:6a20:d50b:b0:1ca:db51:85df with SMTP id adf61e73a8af0-1cf1d05cc9dmr88446637.8.1725565789594; Thu, 05 Sep 2024 12:49:49 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71791e54585sm1248410b3a.182.2024.09.05.12.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 12:49:49 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, p.zabel@pengutronix.de Subject: [PATCHv2 net-next 7/7] net: ag71xx: disable napi interrupts during probe Date: Thu, 5 Sep 2024 12:49:38 -0700 Message-ID: <20240905194938.8453-8-rosenp@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905194938.8453-1-rosenp@gmail.com> References: <20240905194938.8453-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Sven Eckelmann ag71xx_probe is registering ag71xx_interrupt as handler for gmac0/gmac1 interrupts. The handler is trying to use napi_schedule to handle the processing of packets. But the netif_napi_add for this device is called a lot later in ag71xx_probe. It can therefore happen that a still running gmac0/gmac1 is triggering the interrupt handler with a bit from AG71XX_INT_POLL set in AG71XX_REG_INT_STATUS. The handler will then call napi_schedule and the napi code will crash the system because the ag->napi is not yet initialized. The gmcc0/gmac1 must be brought in a state in which it doesn't signal a AG71XX_INT_POLL related status bits as interrupt before registering the interrupt handler. ag71xx_hw_start will take care of re-initializing the AG71XX_REG_INT_ENABLE. This will become relevant when dual GMAC devices get added here. Signed-off-by: Sven Eckelmann Signed-off-by: Rosen Penev --- drivers/net/ethernet/atheros/ag71xx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index e28a4b018b11..96a6189cc31e 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -1850,6 +1850,12 @@ static int ag71xx_probe(struct platform_device *pdev) if (!ag->mac_base) return -ENOMEM; + /* ensure that HW is in manual polling mode before interrupts are + * activated. Otherwise ag71xx_interrupt might call napi_schedule + * before it is initialized by netif_napi_add. + */ + ag71xx_int_disable(ag, AG71XX_INT_POLL); + ndev->irq = platform_get_irq(pdev, 0); err = devm_request_irq(&pdev->dev, ndev->irq, ag71xx_interrupt, 0x0, dev_name(&pdev->dev), ndev);