From patchwork Thu Feb 11 12:12:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12082989 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B60D4C433DB for ; Thu, 11 Feb 2021 12:18:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7768F64EBB for ; Thu, 11 Feb 2021 12:18:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231634AbhBKMRk (ORCPT ); Thu, 11 Feb 2021 07:17:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231665AbhBKMNn (ORCPT ); Thu, 11 Feb 2021 07:13:43 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22690C061786; Thu, 11 Feb 2021 04:13:03 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id m22so7781951lfg.5; Thu, 11 Feb 2021 04:13:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lAf/efFvJkR44ix7CEFq+qMsVF4H4ZJn+sIO16zj+qo=; b=plx65wUlIOmKbBNLUGuKE88slSV8xTw6TYqfaWs5egF+aABaBhKNUrvzg9KGXESOv5 eDhXyR+RoTHL4PDWRvNkLoZ7UzppLOJGdOBgpf9NMjtQ5U0HlOqHL6fpwpIN+qfskSO3 t/y3ZwT6omKIpAC0USAfRl8Hz6u4B2NckU/em4IDMXJVKm4DwknT/aGXS5cbdDFOGnGw 7g9PEdWP51PKbPVZoyUYmD9rInryR+1OBgz/G3nCfljbUTCXVU4N+CMhgok43M5lJAXv otNu1WiscoabES9fRdHhbCz0u9UyEiZUor4U/DMMilNw5jYfRaCMCQjTquZviO2coUJt 5Hig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lAf/efFvJkR44ix7CEFq+qMsVF4H4ZJn+sIO16zj+qo=; b=b5HjjeCSjEDp9Sk8KB5RtZ5SBkVuJsABbW3OT7lV+XVVg0/vyxMtfna3pfxGYlkBkW ohvdNNekNAiepv5O3oYsmFPyXrtgngOtaypoY9LbnKehte/w35owEOG7UnkPPTBBmwAt zwRpAnqLhzlS4TiChPitrPSCoqtgCjGdfPbkFlVqNukpafypW9G1TaoMvxED8KAqEbGr jfD4V7D+83hLJy5rr2Mvc5S86yfoIgQ5OxeYp5Ah5CBpuShkuC23pwlC8HX1QqsmE8ad F/TY/UnLb+fGG/Ct2r/YWavdaeSYnMMoXCbwGdeX+QTktEr+7NrYoulZIlASHqM3szsA 2kqw== X-Gm-Message-State: AOAM532dsg7WQTspttT6bCd2n5F5+zMIsr1xCbMEADR9C/W/mDhJIXkg DkS6kVCeQGqD9O5SuNgLzQI= X-Google-Smtp-Source: ABdhPJy7N8QFA/x3WOXkKZScEMrOMQ7zLrV2EK0bpjcvZUQLMue91Xazizt6AGm68o9gvkKTcH1XCw== X-Received: by 2002:a19:48c2:: with SMTP id v185mr1730985lfa.375.1613045581569; Thu, 11 Feb 2021 04:13:01 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id f23sm834783ljn.131.2021.02.11.04.13.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 04:13:01 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: "David S . Miller" , Jakub Kicinski , Rob Herring Cc: Florian Fainelli , Randy Dunlap , Masahiro Yamada , netdev@vger.kernel.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Andrew Lunn , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Rob Herring Subject: [PATCH net-next 5.12 1/8] dt-bindings: net: rename BCM4908 Ethernet binding Date: Thu, 11 Feb 2021 13:12:32 +0100 Message-Id: <20210211121239.728-2-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210211121239.728-1-zajec5@gmail.com> References: <20210209230130.4690-2-zajec5@gmail.com> <20210211121239.728-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Rafał Miłecki Rob pointed out that a normal convention is "brcm,bcm4908-enet" so update whole binding to match it. Suggested-by: Rob Herring Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli --- .../net/{brcm,bcm4908enet.yaml => brcm,bcm4908-enet.yaml} | 6 +++--- MAINTAINERS | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename Documentation/devicetree/bindings/net/{brcm,bcm4908enet.yaml => brcm,bcm4908-enet.yaml} (85%) diff --git a/Documentation/devicetree/bindings/net/brcm,bcm4908enet.yaml b/Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml similarity index 85% rename from Documentation/devicetree/bindings/net/brcm,bcm4908enet.yaml rename to Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml index 5f12f51c5b19..c70f222365c0 100644 --- a/Documentation/devicetree/bindings/net/brcm,bcm4908enet.yaml +++ b/Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 --- -$id: http://devicetree.org/schemas/net/brcm,bcm4908enet.yaml# +$id: http://devicetree.org/schemas/net/brcm,bcm4908-enet.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Broadcom BCM4908 Ethernet controller @@ -13,7 +13,7 @@ maintainers: properties: compatible: - const: brcm,bcm4908enet + const: brcm,bcm4908-enet reg: maxItems: 1 @@ -37,7 +37,7 @@ examples: #include ethernet@80002000 { - compatible = "brcm,bcm4908enet"; + compatible = "brcm,bcm4908-enet"; reg = <0x80002000 0x1000>; interrupts = ; diff --git a/MAINTAINERS b/MAINTAINERS index 0bbd95b73c39..63fb312dedcf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3450,7 +3450,7 @@ M: Rafał Miłecki M: bcm-kernel-feedback-list@broadcom.com L: netdev@vger.kernel.org S: Maintained -F: Documentation/devicetree/bindings/net/brcm,bcm4908enet.yaml +F: Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml F: drivers/net/ethernet/broadcom/bcm4908enet.* F: drivers/net/ethernet/broadcom/unimac.h From patchwork Thu Feb 11 12:12:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12082985 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 718F7C433E0 for ; Thu, 11 Feb 2021 12:16:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4547064E79 for ; Thu, 11 Feb 2021 12:16:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231771AbhBKMQj (ORCPT ); Thu, 11 Feb 2021 07:16:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230238AbhBKMNu (ORCPT ); Thu, 11 Feb 2021 07:13:50 -0500 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F00E9C06178A; Thu, 11 Feb 2021 04:13:09 -0800 (PST) Received: by mail-lj1-x22a.google.com with SMTP id b16so7037017lji.13; Thu, 11 Feb 2021 04:13:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AXjo91NU1riO24orGNjx7IfdO+L8CByC9r+nnemA7tE=; b=pfaZPryMElKRaSs84AmP7beM6Ko/in2xHsKchGqzKYglcO9sXL6XFZVq9omNEHbZAr 6sttMlWxx/DxQmec2X7QPbX1faWJcJcLkQkulYIQhFzNSsy1MjkO46bkX4BXx418GMax HU1Wg82CmSkM7yDmLGBk7ulHgMsqlwbWT5w5sld8adf3Tbdt213JiPKiVvBoKrwAaKWd 09E7UMw9dQcAEvMUSnS2GdZoZS+4nxeKXlT9dv0Qx3AXNeS2lVPdL8lxpISBprrCT6OT M7JdVcH8wW9csE7y1RV8p4J0+xOtrwIpR2dukBGBGMkVbyv5scOVDkTJJ1hxUyPWGM5z TwGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AXjo91NU1riO24orGNjx7IfdO+L8CByC9r+nnemA7tE=; b=GbBcl03WtX0b+Au05V6PuBLqHo74Drz6kOFBJeEEfE8hIk9kjc/3babOuSOKx86oxk BUIdwrOpLse80C1GLlns7Fj7yNiykccjF5ztlCyivyczr0v1Mt5iM9qKN4aN3VLDAxBe fTbe78YbWvDf1/EIwGtkstllMFJTiWbdMWAGZwENmeNRoQ3PXP1MaOFJLAONS8q/Sl87 0dQWmn66vQX3DDGXSVyHBGU2cpqsNHZdzzsQhb3ta1/r89R+tPM2UmJ+G1iJKl/KIS+m 4zGMLHj2I/KTwrlL6i9mtqYLd0qVwtsoHgooSutYSXSVpfEZrrjAX0KWSBv1mmbwIsIF 3mQA== X-Gm-Message-State: AOAM533shKQUoEM/IC7vG/YmziN8LjqIJC7Cg1K4wIvq14xjmBGkUokV ULjAsG8HtUyfvxWpNuU/oDB4XcZi5fg= X-Google-Smtp-Source: ABdhPJw2kmkiZ/V6KdUUDvac+WAhrxI0iDxsqQxvI3pNs5lTYCmh4Ro3Wag53TCbvPfVDxQmN4DX9w== X-Received: by 2002:a2e:9004:: with SMTP id h4mr5082640ljg.276.1613045588367; Thu, 11 Feb 2021 04:13:08 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id f23sm834783ljn.131.2021.02.11.04.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 04:13:08 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: "David S . Miller" , Jakub Kicinski , Rob Herring Cc: Florian Fainelli , Randy Dunlap , Masahiro Yamada , netdev@vger.kernel.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Andrew Lunn , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Rob Herring Subject: [PATCH net-next 5.12 2/8] dt-bindings: net: bcm4908-enet: include ethernet-controller.yaml Date: Thu, 11 Feb 2021 13:12:33 +0100 Message-Id: <20210211121239.728-3-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210211121239.728-1-zajec5@gmail.com> References: <20210209230130.4690-2-zajec5@gmail.com> <20210211121239.728-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Rafał Miłecki It should be /included/ by every Ethernet controller binding. It adds support for various generic properties. Suggested-by: Rob Herring Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli --- Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml b/Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml index c70f222365c0..79c38ea14237 100644 --- a/Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml +++ b/Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml @@ -11,6 +11,9 @@ description: Broadcom's Ethernet controller integrated into BCM4908 family SoCs maintainers: - Rafał Miłecki +allOf: + - $ref: ethernet-controller.yaml# + properties: compatible: const: brcm,bcm4908-enet From patchwork Thu Feb 11 12:12:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12082991 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D51D1C433E6 for ; Thu, 11 Feb 2021 12:18:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9831064E95 for ; Thu, 11 Feb 2021 12:18:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231814AbhBKMSI (ORCPT ); Thu, 11 Feb 2021 07:18:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229699AbhBKMNy (ORCPT ); Thu, 11 Feb 2021 07:13:54 -0500 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70A49C06178B; Thu, 11 Feb 2021 04:13:13 -0800 (PST) Received: by mail-lj1-x22f.google.com with SMTP id x1so430483ljj.11; Thu, 11 Feb 2021 04:13:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3LYo1Qei5Cl0fQ9W8gRaAOjNN70EI6+Y1kg7e/hnHow=; b=BktiqkYw12/dPHtSJKD6t/LlOrUrFwrc2lLYbHG0gdCe3yqGiIksocpP5Wm+UrJeKX RafbEubv3M+xioBrJ2MsKEohR1gY9NXJVDeyj4pp10bq0zO1XLEnD0u7O8VqWbCniVf1 1N2zbkSMgV8Xqwh9r1MSLqAzrsUyTOzqHPwC3jkrQhQWX6ZIaML77ogwSAHX4KTj3aPd 0Mcr3o+mj5OPT7FH/di1+Jk4Zdh05lsmscI3hUmRpSIsl1CaA0ICr+WsYyfngFX4TREJ 1rqIsbdgvsV1fOVHTddG31g/CVgoQS+/tFJZzWt/nqhHXI2vu4Jp41jU8MoQfMNY7QEp Wd2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3LYo1Qei5Cl0fQ9W8gRaAOjNN70EI6+Y1kg7e/hnHow=; b=WBWWFUmrgMC2jtsmIifTnbrfoWrCnvM7j19613GZE/fxevVyjJo6hDIUDDvQchVf02 elLdoTsz87Y7NFuVknWVZoJTk1i4XTPQmfKyWZXhi3NyzUp/Ty1K3KY1nHNn8jwt7DL8 JtiOtdHzxVILA/Xl/SYvLagzd7JpayyOy76bnPHKJuk+jQkY86CnkAJatl9i0lg52r1K EwN1uEuVDRhpOqO06WpDyVugyWtRJrcEHd5P9TPX8tP3fLnD/GcnlgZiPFe0Yo/ffwKV 4lL/0stNQuXDvbDk6ca15hW0k9XtRrhDQa5d5R8bkydMwgvmKZJH/oDQ3M7S9+Dp63fh ZrlA== X-Gm-Message-State: AOAM530Hr7KQkyltbudMEa9jVJMsjZqyFVXxP8LirByAcIdWnVgxElJW 4HCysfTwUa1M0n7WEeLJL3w= X-Google-Smtp-Source: ABdhPJxv9vzXmGIdmFu7WrnQfcLcFo2iJeD7iiZ2wqdraIl8i9u3xHW25D9hc8A5xB+qjhoSRMWY1g== X-Received: by 2002:a2e:9588:: with SMTP id w8mr1793665ljh.339.1613045591938; Thu, 11 Feb 2021 04:13:11 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id f23sm834783ljn.131.2021.02.11.04.13.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 04:13:11 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: "David S . Miller" , Jakub Kicinski , Rob Herring Cc: Florian Fainelli , Randy Dunlap , Masahiro Yamada , netdev@vger.kernel.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Andrew Lunn , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH net-next 5.12 3/8] net: broadcom: rename BCM4908 driver & update DT binding Date: Thu, 11 Feb 2021 13:12:34 +0100 Message-Id: <20210211121239.728-4-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210211121239.728-1-zajec5@gmail.com> References: <20210209230130.4690-2-zajec5@gmail.com> <20210211121239.728-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Rafał Miłecki compatible string was updated to match normal naming convention so update driver as well Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli --- MAINTAINERS | 2 +- drivers/net/ethernet/broadcom/Kconfig | 2 +- drivers/net/ethernet/broadcom/Makefile | 2 +- .../{bcm4908enet.c => bcm4908_enet.c} | 215 +++++++++--------- .../{bcm4908enet.h => bcm4908_enet.h} | 4 +- 5 files changed, 113 insertions(+), 112 deletions(-) rename drivers/net/ethernet/broadcom/{bcm4908enet.c => bcm4908_enet.c} (68%) rename drivers/net/ethernet/broadcom/{bcm4908enet.h => bcm4908_enet.h} (98%) diff --git a/MAINTAINERS b/MAINTAINERS index 63fb312dedcf..9016541d6555 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3451,7 +3451,7 @@ M: bcm-kernel-feedback-list@broadcom.com L: netdev@vger.kernel.org S: Maintained F: Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml -F: drivers/net/ethernet/broadcom/bcm4908enet.* +F: drivers/net/ethernet/broadcom/bcm4908_enet.* F: drivers/net/ethernet/broadcom/unimac.h BROADCOM BCM5301X ARM ARCHITECTURE diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig index bcf9e0a410fd..f8a168b73307 100644 --- a/drivers/net/ethernet/broadcom/Kconfig +++ b/drivers/net/ethernet/broadcom/Kconfig @@ -51,7 +51,7 @@ config B44_PCI depends on B44_PCI_AUTOSELECT && B44_PCICORE_AUTOSELECT default y -config BCM4908ENET +config BCM4908_ENET tristate "Broadcom BCM4908 internal mac support" depends on ARCH_BCM4908 || COMPILE_TEST default y diff --git a/drivers/net/ethernet/broadcom/Makefile b/drivers/net/ethernet/broadcom/Makefile index 379012de3569..0ddfb5b5d53c 100644 --- a/drivers/net/ethernet/broadcom/Makefile +++ b/drivers/net/ethernet/broadcom/Makefile @@ -4,7 +4,7 @@ # obj-$(CONFIG_B44) += b44.o -obj-$(CONFIG_BCM4908ENET) += bcm4908enet.o +obj-$(CONFIG_BCM4908_ENET) += bcm4908_enet.o obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o obj-$(CONFIG_BCMGENET) += genet/ obj-$(CONFIG_BNX2) += bnx2.o diff --git a/drivers/net/ethernet/broadcom/bcm4908enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c similarity index 68% rename from drivers/net/ethernet/broadcom/bcm4908enet.c rename to drivers/net/ethernet/broadcom/bcm4908_enet.c index d68b328e7596..e56348eb188f 100644 --- a/drivers/net/ethernet/broadcom/bcm4908enet.c +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c @@ -12,7 +12,7 @@ #include #include -#include "bcm4908enet.h" +#include "bcm4908_enet.h" #include "unimac.h" #define ENET_DMA_CH_RX_CFG ENET_DMA_CH0_CFG @@ -33,18 +33,18 @@ #define ENET_MTU_MAX 1500 /* Is it possible to support 2044? */ #define ENET_MTU_MAX_EXTRA_SIZE 32 /* L2 */ -struct bcm4908enet_dma_ring_bd { +struct bcm4908_enet_dma_ring_bd { __le32 ctl; __le32 addr; } __packed; -struct bcm4908enet_dma_ring_slot { +struct bcm4908_enet_dma_ring_slot { struct sk_buff *skb; unsigned int len; dma_addr_t dma_addr; }; -struct bcm4908enet_dma_ring { +struct bcm4908_enet_dma_ring { int is_tx; int read_idx; int write_idx; @@ -54,38 +54,38 @@ struct bcm4908enet_dma_ring { union { void *cpu_addr; - struct bcm4908enet_dma_ring_bd *buf_desc; + struct bcm4908_enet_dma_ring_bd *buf_desc; }; dma_addr_t dma_addr; - struct bcm4908enet_dma_ring_slot *slots; + struct bcm4908_enet_dma_ring_slot *slots; }; -struct bcm4908enet { +struct bcm4908_enet { struct device *dev; struct net_device *netdev; struct napi_struct napi; void __iomem *base; - struct bcm4908enet_dma_ring tx_ring; - struct bcm4908enet_dma_ring rx_ring; + struct bcm4908_enet_dma_ring tx_ring; + struct bcm4908_enet_dma_ring rx_ring; }; /*** * R/W ops */ -static inline u32 enet_read(struct bcm4908enet *enet, u16 offset) +static inline u32 enet_read(struct bcm4908_enet *enet, u16 offset) { return readl(enet->base + offset); } -static inline void enet_write(struct bcm4908enet *enet, u16 offset, u32 value) +static inline void enet_write(struct bcm4908_enet *enet, u16 offset, u32 value) { writel(value, enet->base + offset); } -static inline void enet_maskset(struct bcm4908enet *enet, u16 offset, u32 mask, u32 set) +static inline void enet_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set) { u32 val; @@ -96,27 +96,27 @@ static inline void enet_maskset(struct bcm4908enet *enet, u16 offset, u32 mask, enet_write(enet, offset, val); } -static inline void enet_set(struct bcm4908enet *enet, u16 offset, u32 set) +static inline void enet_set(struct bcm4908_enet *enet, u16 offset, u32 set) { enet_maskset(enet, offset, set, set); } -static inline u32 enet_umac_read(struct bcm4908enet *enet, u16 offset) +static inline u32 enet_umac_read(struct bcm4908_enet *enet, u16 offset) { return enet_read(enet, ENET_UNIMAC + offset); } -static inline void enet_umac_write(struct bcm4908enet *enet, u16 offset, u32 value) +static inline void enet_umac_write(struct bcm4908_enet *enet, u16 offset, u32 value) { enet_write(enet, ENET_UNIMAC + offset, value); } -static inline void enet_umac_maskset(struct bcm4908enet *enet, u16 offset, u32 mask, u32 set) +static inline void enet_umac_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set) { enet_maskset(enet, ENET_UNIMAC + offset, mask, set); } -static inline void enet_umac_set(struct bcm4908enet *enet, u16 offset, u32 set) +static inline void enet_umac_set(struct bcm4908_enet *enet, u16 offset, u32 set) { enet_set(enet, ENET_UNIMAC + offset, set); } @@ -125,17 +125,17 @@ static inline void enet_umac_set(struct bcm4908enet *enet, u16 offset, u32 set) * Helpers */ -static void bcm4908enet_intrs_on(struct bcm4908enet *enet) +static void bcm4908_enet_intrs_on(struct bcm4908_enet *enet) { enet_write(enet, ENET_DMA_CH_RX_CFG + ENET_DMA_CH_CFG_INT_MASK, ENET_DMA_INT_DEFAULTS); } -static void bcm4908enet_intrs_off(struct bcm4908enet *enet) +static void bcm4908_enet_intrs_off(struct bcm4908_enet *enet) { enet_write(enet, ENET_DMA_CH_RX_CFG + ENET_DMA_CH_CFG_INT_MASK, 0); } -static void bcm4908enet_intrs_ack(struct bcm4908enet *enet) +static void bcm4908_enet_intrs_ack(struct bcm4908_enet *enet) { enet_write(enet, ENET_DMA_CH_RX_CFG + ENET_DMA_CH_CFG_INT_STAT, ENET_DMA_INT_DEFAULTS); } @@ -144,9 +144,10 @@ static void bcm4908enet_intrs_ack(struct bcm4908enet *enet) * DMA */ -static int bcm4908_dma_alloc_buf_descs(struct bcm4908enet *enet, struct bcm4908enet_dma_ring *ring) +static int bcm4908_dma_alloc_buf_descs(struct bcm4908_enet *enet, + struct bcm4908_enet_dma_ring *ring) { - int size = ring->length * sizeof(struct bcm4908enet_dma_ring_bd); + int size = ring->length * sizeof(struct bcm4908_enet_dma_ring_bd); struct device *dev = enet->dev; ring->cpu_addr = dma_alloc_coherent(dev, size, &ring->dma_addr, GFP_KERNEL); @@ -174,28 +175,28 @@ static int bcm4908_dma_alloc_buf_descs(struct bcm4908enet *enet, struct bcm4908e return -ENOMEM; } -static void bcm4908enet_dma_free(struct bcm4908enet *enet) +static void bcm4908_enet_dma_free(struct bcm4908_enet *enet) { - struct bcm4908enet_dma_ring *tx_ring = &enet->tx_ring; - struct bcm4908enet_dma_ring *rx_ring = &enet->rx_ring; + struct bcm4908_enet_dma_ring *tx_ring = &enet->tx_ring; + struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; struct device *dev = enet->dev; int size; - size = rx_ring->length * sizeof(struct bcm4908enet_dma_ring_bd); + size = rx_ring->length * sizeof(struct bcm4908_enet_dma_ring_bd); if (rx_ring->cpu_addr) dma_free_coherent(dev, size, rx_ring->cpu_addr, rx_ring->dma_addr); kfree(rx_ring->slots); - size = tx_ring->length * sizeof(struct bcm4908enet_dma_ring_bd); + size = tx_ring->length * sizeof(struct bcm4908_enet_dma_ring_bd); if (tx_ring->cpu_addr) dma_free_coherent(dev, size, tx_ring->cpu_addr, tx_ring->dma_addr); kfree(tx_ring->slots); } -static int bcm4908enet_dma_alloc(struct bcm4908enet *enet) +static int bcm4908_enet_dma_alloc(struct bcm4908_enet *enet) { - struct bcm4908enet_dma_ring *tx_ring = &enet->tx_ring; - struct bcm4908enet_dma_ring *rx_ring = &enet->rx_ring; + struct bcm4908_enet_dma_ring *tx_ring = &enet->tx_ring; + struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; struct device *dev = enet->dev; int err; @@ -216,16 +217,16 @@ static int bcm4908enet_dma_alloc(struct bcm4908enet *enet) err = bcm4908_dma_alloc_buf_descs(enet, rx_ring); if (err) { dev_err(dev, "Failed to alloc RX buf descriptors: %d\n", err); - bcm4908enet_dma_free(enet); + bcm4908_enet_dma_free(enet); return err; } return 0; } -static void bcm4908enet_dma_reset(struct bcm4908enet *enet) +static void bcm4908_enet_dma_reset(struct bcm4908_enet *enet) { - struct bcm4908enet_dma_ring *rings[] = { &enet->rx_ring, &enet->tx_ring }; + struct bcm4908_enet_dma_ring *rings[] = { &enet->rx_ring, &enet->tx_ring }; int i; /* Disable the DMA controller and channel */ @@ -235,7 +236,7 @@ static void bcm4908enet_dma_reset(struct bcm4908enet *enet) /* Reset channels state */ for (i = 0; i < ARRAY_SIZE(rings); i++) { - struct bcm4908enet_dma_ring *ring = rings[i]; + struct bcm4908_enet_dma_ring *ring = rings[i]; enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_BASE_DESC_PTR, 0); enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_STATE_DATA, 0); @@ -244,10 +245,10 @@ static void bcm4908enet_dma_reset(struct bcm4908enet *enet) } } -static int bcm4908enet_dma_alloc_rx_buf(struct bcm4908enet *enet, unsigned int idx) +static int bcm4908_enet_dma_alloc_rx_buf(struct bcm4908_enet *enet, unsigned int idx) { - struct bcm4908enet_dma_ring_bd *buf_desc = &enet->rx_ring.buf_desc[idx]; - struct bcm4908enet_dma_ring_slot *slot = &enet->rx_ring.slots[idx]; + struct bcm4908_enet_dma_ring_bd *buf_desc = &enet->rx_ring.buf_desc[idx]; + struct bcm4908_enet_dma_ring_slot *slot = &enet->rx_ring.slots[idx]; struct device *dev = enet->dev; u32 tmp; int err; @@ -277,8 +278,8 @@ static int bcm4908enet_dma_alloc_rx_buf(struct bcm4908enet *enet, unsigned int i return 0; } -static void bcm4908enet_dma_ring_init(struct bcm4908enet *enet, - struct bcm4908enet_dma_ring *ring) +static void bcm4908_enet_dma_ring_init(struct bcm4908_enet *enet, + struct bcm4908_enet_dma_ring *ring) { int reset_channel = 0; /* We support only 1 main channel (with TX and RX) */ int reset_subch = ring->is_tx ? 1 : 0; @@ -295,10 +296,10 @@ static void bcm4908enet_dma_ring_init(struct bcm4908enet *enet, (uint32_t)ring->dma_addr); } -static void bcm4908enet_dma_uninit(struct bcm4908enet *enet) +static void bcm4908_enet_dma_uninit(struct bcm4908_enet *enet) { - struct bcm4908enet_dma_ring *rx_ring = &enet->rx_ring; - struct bcm4908enet_dma_ring_slot *slot; + struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; + struct bcm4908_enet_dma_ring_slot *slot; struct device *dev = enet->dev; int i; @@ -312,48 +313,48 @@ static void bcm4908enet_dma_uninit(struct bcm4908enet *enet) } } -static int bcm4908enet_dma_init(struct bcm4908enet *enet) +static int bcm4908_enet_dma_init(struct bcm4908_enet *enet) { - struct bcm4908enet_dma_ring *rx_ring = &enet->rx_ring; + struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; struct device *dev = enet->dev; int err; int i; for (i = 0; i < rx_ring->length; i++) { - err = bcm4908enet_dma_alloc_rx_buf(enet, i); + err = bcm4908_enet_dma_alloc_rx_buf(enet, i); if (err) { dev_err(dev, "Failed to alloc RX buffer: %d\n", err); - bcm4908enet_dma_uninit(enet); + bcm4908_enet_dma_uninit(enet); return err; } } - bcm4908enet_dma_ring_init(enet, &enet->tx_ring); - bcm4908enet_dma_ring_init(enet, &enet->rx_ring); + bcm4908_enet_dma_ring_init(enet, &enet->tx_ring); + bcm4908_enet_dma_ring_init(enet, &enet->rx_ring); return 0; } -static void bcm4908enet_dma_tx_ring_ensable(struct bcm4908enet *enet, - struct bcm4908enet_dma_ring *ring) +static void bcm4908_enet_dma_tx_ring_ensable(struct bcm4908_enet *enet, + struct bcm4908_enet_dma_ring *ring) { enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE); } -static void bcm4908enet_dma_tx_ring_disable(struct bcm4908enet *enet, - struct bcm4908enet_dma_ring *ring) +static void bcm4908_enet_dma_tx_ring_disable(struct bcm4908_enet *enet, + struct bcm4908_enet_dma_ring *ring) { enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG, 0); } -static void bcm4908enet_dma_rx_ring_enable(struct bcm4908enet *enet, - struct bcm4908enet_dma_ring *ring) +static void bcm4908_enet_dma_rx_ring_enable(struct bcm4908_enet *enet, + struct bcm4908_enet_dma_ring *ring) { enet_set(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE); } -static void bcm4908enet_dma_rx_ring_disable(struct bcm4908enet *enet, - struct bcm4908enet_dma_ring *ring) +static void bcm4908_enet_dma_rx_ring_disable(struct bcm4908_enet *enet, + struct bcm4908_enet_dma_ring *ring) { unsigned long deadline; u32 tmp; @@ -376,7 +377,7 @@ static void bcm4908enet_dma_rx_ring_disable(struct bcm4908enet *enet, * Ethernet driver */ -static void bcm4908enet_gmac_init(struct bcm4908enet *enet) +static void bcm4908_enet_gmac_init(struct bcm4908_enet *enet) { u32 cmd; @@ -407,75 +408,75 @@ static void bcm4908enet_gmac_init(struct bcm4908enet *enet) ENET_GMAC_STATUS_LINK_UP); } -static irqreturn_t bcm4908enet_irq_handler(int irq, void *dev_id) +static irqreturn_t bcm4908_enet_irq_handler(int irq, void *dev_id) { - struct bcm4908enet *enet = dev_id; + struct bcm4908_enet *enet = dev_id; - bcm4908enet_intrs_off(enet); - bcm4908enet_intrs_ack(enet); + bcm4908_enet_intrs_off(enet); + bcm4908_enet_intrs_ack(enet); napi_schedule(&enet->napi); return IRQ_HANDLED; } -static int bcm4908enet_open(struct net_device *netdev) +static int bcm4908_enet_open(struct net_device *netdev) { - struct bcm4908enet *enet = netdev_priv(netdev); + struct bcm4908_enet *enet = netdev_priv(netdev); struct device *dev = enet->dev; int err; - err = request_irq(netdev->irq, bcm4908enet_irq_handler, 0, "enet", enet); + err = request_irq(netdev->irq, bcm4908_enet_irq_handler, 0, "enet", enet); if (err) { dev_err(dev, "Failed to request IRQ %d: %d\n", netdev->irq, err); return err; } - bcm4908enet_gmac_init(enet); - bcm4908enet_dma_reset(enet); - bcm4908enet_dma_init(enet); + bcm4908_enet_gmac_init(enet); + bcm4908_enet_dma_reset(enet); + bcm4908_enet_dma_init(enet); enet_umac_set(enet, UMAC_CMD, CMD_TX_EN | CMD_RX_EN); enet_set(enet, ENET_DMA_CONTROLLER_CFG, ENET_DMA_CTRL_CFG_MASTER_EN); enet_maskset(enet, ENET_DMA_CONTROLLER_CFG, ENET_DMA_CTRL_CFG_FLOWC_CH1_EN, 0); - bcm4908enet_dma_rx_ring_enable(enet, &enet->rx_ring); + bcm4908_enet_dma_rx_ring_enable(enet, &enet->rx_ring); napi_enable(&enet->napi); netif_carrier_on(netdev); netif_start_queue(netdev); - bcm4908enet_intrs_ack(enet); - bcm4908enet_intrs_on(enet); + bcm4908_enet_intrs_ack(enet); + bcm4908_enet_intrs_on(enet); return 0; } -static int bcm4908enet_stop(struct net_device *netdev) +static int bcm4908_enet_stop(struct net_device *netdev) { - struct bcm4908enet *enet = netdev_priv(netdev); + struct bcm4908_enet *enet = netdev_priv(netdev); netif_stop_queue(netdev); netif_carrier_off(netdev); napi_disable(&enet->napi); - bcm4908enet_dma_rx_ring_disable(enet, &enet->rx_ring); - bcm4908enet_dma_tx_ring_disable(enet, &enet->tx_ring); + bcm4908_enet_dma_rx_ring_disable(enet, &enet->rx_ring); + bcm4908_enet_dma_tx_ring_disable(enet, &enet->tx_ring); - bcm4908enet_dma_uninit(enet); + bcm4908_enet_dma_uninit(enet); free_irq(enet->netdev->irq, enet); return 0; } -static int bcm4908enet_start_xmit(struct sk_buff *skb, struct net_device *netdev) +static int bcm4908_enet_start_xmit(struct sk_buff *skb, struct net_device *netdev) { - struct bcm4908enet *enet = netdev_priv(netdev); - struct bcm4908enet_dma_ring *ring = &enet->tx_ring; - struct bcm4908enet_dma_ring_slot *slot; + struct bcm4908_enet *enet = netdev_priv(netdev); + struct bcm4908_enet_dma_ring *ring = &enet->tx_ring; + struct bcm4908_enet_dma_ring_slot *slot; struct device *dev = enet->dev; - struct bcm4908enet_dma_ring_bd *buf_desc; + struct bcm4908_enet_dma_ring_bd *buf_desc; int free_buf_descs; u32 tmp; @@ -525,7 +526,7 @@ static int bcm4908enet_start_xmit(struct sk_buff *skb, struct net_device *netdev buf_desc->addr = cpu_to_le32((uint32_t)slot->dma_addr); buf_desc->ctl = cpu_to_le32(tmp); - bcm4908enet_dma_tx_ring_ensable(enet, &enet->tx_ring); + bcm4908_enet_dma_tx_ring_ensable(enet, &enet->tx_ring); if (++ring->write_idx == ring->length - 1) ring->write_idx = 0; @@ -535,15 +536,15 @@ static int bcm4908enet_start_xmit(struct sk_buff *skb, struct net_device *netdev return NETDEV_TX_OK; } -static int bcm4908enet_poll(struct napi_struct *napi, int weight) +static int bcm4908_enet_poll(struct napi_struct *napi, int weight) { - struct bcm4908enet *enet = container_of(napi, struct bcm4908enet, napi); + struct bcm4908_enet *enet = container_of(napi, struct bcm4908_enet, napi); struct device *dev = enet->dev; int handled = 0; while (handled < weight) { - struct bcm4908enet_dma_ring_bd *buf_desc; - struct bcm4908enet_dma_ring_slot slot; + struct bcm4908_enet_dma_ring_bd *buf_desc; + struct bcm4908_enet_dma_ring_slot slot; u32 ctl; int len; int err; @@ -556,7 +557,7 @@ static int bcm4908enet_poll(struct napi_struct *napi, int weight) slot = enet->rx_ring.slots[enet->rx_ring.read_idx]; /* Provide new buffer before unpinning the old one */ - err = bcm4908enet_dma_alloc_rx_buf(enet, enet->rx_ring.read_idx); + err = bcm4908_enet_dma_alloc_rx_buf(enet, enet->rx_ring.read_idx); if (err) break; @@ -583,24 +584,24 @@ static int bcm4908enet_poll(struct napi_struct *napi, int weight) if (handled < weight) { napi_complete_done(napi, handled); - bcm4908enet_intrs_on(enet); + bcm4908_enet_intrs_on(enet); } return handled; } static const struct net_device_ops bcm96xx_netdev_ops = { - .ndo_open = bcm4908enet_open, - .ndo_stop = bcm4908enet_stop, - .ndo_start_xmit = bcm4908enet_start_xmit, + .ndo_open = bcm4908_enet_open, + .ndo_stop = bcm4908_enet_stop, + .ndo_start_xmit = bcm4908_enet_start_xmit, .ndo_set_mac_address = eth_mac_addr, }; -static int bcm4908enet_probe(struct platform_device *pdev) +static int bcm4908_enet_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct net_device *netdev; - struct bcm4908enet *enet; + struct bcm4908_enet *enet; int err; netdev = devm_alloc_etherdev(dev, sizeof(*enet)); @@ -623,7 +624,7 @@ static int bcm4908enet_probe(struct platform_device *pdev) dma_set_coherent_mask(dev, DMA_BIT_MASK(32)); - err = bcm4908enet_dma_alloc(enet); + err = bcm4908_enet_dma_alloc(enet); if (err) return err; @@ -633,11 +634,11 @@ static int bcm4908enet_probe(struct platform_device *pdev) netdev->min_mtu = ETH_ZLEN; netdev->mtu = ENET_MTU_MAX; netdev->max_mtu = ENET_MTU_MAX; - netif_napi_add(netdev, &enet->napi, bcm4908enet_poll, 64); + netif_napi_add(netdev, &enet->napi, bcm4908_enet_poll, 64); err = register_netdev(netdev); if (err) { - bcm4908enet_dma_free(enet); + bcm4908_enet_dma_free(enet); return err; } @@ -646,31 +647,31 @@ static int bcm4908enet_probe(struct platform_device *pdev) return 0; } -static int bcm4908enet_remove(struct platform_device *pdev) +static int bcm4908_enet_remove(struct platform_device *pdev) { - struct bcm4908enet *enet = platform_get_drvdata(pdev); + struct bcm4908_enet *enet = platform_get_drvdata(pdev); unregister_netdev(enet->netdev); netif_napi_del(&enet->napi); - bcm4908enet_dma_free(enet); + bcm4908_enet_dma_free(enet); return 0; } -static const struct of_device_id bcm4908enet_of_match[] = { - { .compatible = "brcm,bcm4908enet"}, +static const struct of_device_id bcm4908_enet_of_match[] = { + { .compatible = "brcm,bcm4908-enet"}, {}, }; -static struct platform_driver bcm4908enet_driver = { +static struct platform_driver bcm4908_enet_driver = { .driver = { - .name = "bcm4908enet", - .of_match_table = bcm4908enet_of_match, + .name = "bcm4908_enet", + .of_match_table = bcm4908_enet_of_match, }, - .probe = bcm4908enet_probe, - .remove = bcm4908enet_remove, + .probe = bcm4908_enet_probe, + .remove = bcm4908_enet_remove, }; -module_platform_driver(bcm4908enet_driver); +module_platform_driver(bcm4908_enet_driver); MODULE_LICENSE("GPL v2"); -MODULE_DEVICE_TABLE(of, bcm4908enet_of_match); +MODULE_DEVICE_TABLE(of, bcm4908_enet_of_match); diff --git a/drivers/net/ethernet/broadcom/bcm4908enet.h b/drivers/net/ethernet/broadcom/bcm4908_enet.h similarity index 98% rename from drivers/net/ethernet/broadcom/bcm4908enet.h rename to drivers/net/ethernet/broadcom/bcm4908_enet.h index 11aadf0715d3..8a3ede2da537 100644 --- a/drivers/net/ethernet/broadcom/bcm4908enet.h +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __BCM4908ENET_H -#define __BCM4908ENET_H +#ifndef __BCM4908_ENET_H +#define __BCM4908_ENET_H #define ENET_CONTROL 0x000 #define ENET_MIB_CTRL 0x004 From patchwork Thu Feb 11 12:12:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12082993 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB9E7C433E9 for ; Thu, 11 Feb 2021 12:18:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B624E64E9A for ; Thu, 11 Feb 2021 12:18:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231835AbhBKMSc (ORCPT ); Thu, 11 Feb 2021 07:18:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231709AbhBKMN6 (ORCPT ); Thu, 11 Feb 2021 07:13:58 -0500 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A69B2C06178C; Thu, 11 Feb 2021 04:13:15 -0800 (PST) Received: by mail-lj1-x22d.google.com with SMTP id v6so2435784ljh.9; Thu, 11 Feb 2021 04:13:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eWK55MN/QnlaO+o8PUxLf8oUHMPNZSUqMMx8+4iR3UE=; b=dj1xr97R60wSnSVwYtEVBaSZWomdFjzcVFIEcLiuZN5OYXBSqG0ruAWS40zHeDI7xF zZ9LE2fO84BHD/YQPhpF0Y1uf4xKc2FUw1c4ejENTxuq49lfJhgY9tA3TYS9Oz8Y0flP 4O6amDC6LZH3CIEMKzrWiNHusDdzryjXdRAJ558Rzb0qzwRPe8CBcs9uLdG78vMawf/K 3JOlFSrLBJN4O3VkvoRTnM6UEaWMas0KpRQR8MRNOuVAfvTwCr9urPLvAadq04GFTQYv UxKmUKx/r2Q7qm3ivzTX+0o+LgXWcLwZvAhWjbbOY8C+TOlwq45Rqsyx+gfffWH9y7KJ apIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eWK55MN/QnlaO+o8PUxLf8oUHMPNZSUqMMx8+4iR3UE=; b=Po3Ac2AVWfs4GIgq/5+TXYAzCqudVQ7A9JoYlgZP88M415KVyOgdhQZYXsG3nNpTmE 0l0YG9kAIjcbNRqVIh+K8Rp70igqkzJPz7Vsru7i6DRKvU1r4+yCdXTIDNhuVO8CL8rF jqUX9hHHdtJUQD13qxnDiTDOt3vcPpbFTUGvQpszZlLAnqCVTmLg8ElinbMh3CkD416y YY9N5NrvHE5brI0ePRyhto1Ge9zmD10NdGTTERG35jEn6o4u8s34THqlN3ItwLSq+H+C dLqP/CcvCg38DwZx1xEjkoQZrhyYRZp7bNtlUVHlmaMa58N4UyiyIsIAzWTR7BJ3otrq /vVw== X-Gm-Message-State: AOAM531TcZEVqwA63KW6s8NY+QcP2KfhpLx0c6dnQ+7cXDoC5syydyxS UmKVd195oH5NmRTc0peM5uU= X-Google-Smtp-Source: ABdhPJzmDe/zMH8sTaq4bXho6QdIVSbg7Y+gVLja53fcPvJ10r9fPPTbEvyq34MOFE46U+UHcqf3vw== X-Received: by 2002:a2e:9748:: with SMTP id f8mr3656577ljj.29.1613045594242; Thu, 11 Feb 2021 04:13:14 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id f23sm834783ljn.131.2021.02.11.04.13.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 04:13:13 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: "David S . Miller" , Jakub Kicinski , Rob Herring Cc: Florian Fainelli , Randy Dunlap , Masahiro Yamada , netdev@vger.kernel.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Andrew Lunn , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH net-next 5.12 4/8] net: broadcom: bcm4908_enet: drop unneeded memset() Date: Thu, 11 Feb 2021 13:12:35 +0100 Message-Id: <20210211121239.728-5-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210211121239.728-1-zajec5@gmail.com> References: <20210209230130.4690-2-zajec5@gmail.com> <20210211121239.728-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Rafał Miłecki dma_alloc_coherent takes care of zeroing allocated memory Suggested-by: Andrew Lunn Signed-off-by: Rafał Miłecki Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c index e56348eb188f..f4e31646d50f 100644 --- a/drivers/net/ethernet/broadcom/bcm4908_enet.c +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c @@ -163,8 +163,6 @@ static int bcm4908_dma_alloc_buf_descs(struct bcm4908_enet *enet, if (!ring->slots) goto err_free_buf_descs; - memset(ring->cpu_addr, 0, size); - ring->read_idx = 0; ring->write_idx = 0; From patchwork Thu Feb 11 12:12:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12082995 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81C73C433DB for ; Thu, 11 Feb 2021 12:19:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 49A0A64E9A for ; Thu, 11 Feb 2021 12:19:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231687AbhBKMTA (ORCPT ); Thu, 11 Feb 2021 07:19:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231624AbhBKMOX (ORCPT ); Thu, 11 Feb 2021 07:14:23 -0500 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 604C7C061793; Thu, 11 Feb 2021 04:13:18 -0800 (PST) Received: by mail-lj1-x229.google.com with SMTP id e17so7072513ljl.8; Thu, 11 Feb 2021 04:13:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=46N7YZOZpVCLxCj0X2/FFcvXA9Ez10ge8/4y9IqilWQ=; b=Ywr9we38aQ7KQ622yeueL9uFAHmUMe/W6sS1ehPZgAUiiH7N0i8ThYR9c1API2THgS f+elkjc3rnVHRiexRLzEK3MCVsTOdu2I/p0O6Xs+zn92Xs2cPW3lZVNyyOtTvgwbOucU kmNB25dM3pjqYGYRjO1bMF/M2aJZPdtOcjWwxod8f7qCyCQm4q48vC9Lw2hX0KJTJImM +lqXzwxapJ0r9+038g0NpYt/qAYt6YyyY0cLkvgBsAy4g0yvmYQF9CApAaaEFedKVQFV ibKC03B1BvC9tm8LY8hPmfqLzWQb/BHm/7B7fzRYUucrqFmPfaVu9BIQOKzYIRCwXRZq mnXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=46N7YZOZpVCLxCj0X2/FFcvXA9Ez10ge8/4y9IqilWQ=; b=myHzeZKKiMq0cGs5QBlzcdKmXZADHJHWy8H7LeoBbpqI+PK+6aEV+9mS/8rCFjbCVp NDvWrZSZ+GzwL4bMrIobjekUTbkG2oyOYiF9/HZwM7iiY7L5amuskrkS5lvIHElfeYKi +uBQk4HuSqbKLU4y/e+e9FJ8wpJMtKI6COZ+FUOLEWv2SZj2J7zfPBjPbjXI1TfAcjq1 Wq5ra+oaNaCXGF+rB1vR/BjzXasul4hoz+0wUxx8qb9HMCLeO0ThVUiBAQ0Oym6kdal2 N7ws/H8rwR8xZztX3/VnXFJoMenbNFM1s0Dj7n/voZJ+wTJVKC1tTfKKqG8GT5Sv+l9A 5UoA== X-Gm-Message-State: AOAM5317UW2GKNuLyW0mrUzuK0yPrcWAl2Ezml40XFjaHE+bua61QFRL 1Onf+ugN0Zdxf7WbdmqAtiw= X-Google-Smtp-Source: ABdhPJy5uhePebtgEp550Vgi4TfdkccRzbwGYliB3mmr96hOJb6IvrBFY87YXPgj9LnqBm731OyWAg== X-Received: by 2002:a2e:b8c7:: with SMTP id s7mr4619805ljp.397.1613045596948; Thu, 11 Feb 2021 04:13:16 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id f23sm834783ljn.131.2021.02.11.04.13.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 04:13:16 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: "David S . Miller" , Jakub Kicinski , Rob Herring Cc: Florian Fainelli , Randy Dunlap , Masahiro Yamada , netdev@vger.kernel.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Andrew Lunn , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH net-next 5.12 5/8] net: broadcom: bcm4908_enet: drop "inline" from C functions Date: Thu, 11 Feb 2021 13:12:36 +0100 Message-Id: <20210211121239.728-6-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210211121239.728-1-zajec5@gmail.com> References: <20210209230130.4690-2-zajec5@gmail.com> <20210211121239.728-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Rafał Miłecki It seems preferred to let compiler optimize code if applicable. While at it drop unused enet_umac_maskset(). Suggested-by: Andrew Lunn Signed-off-by: Rafał Miłecki Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bcm4908_enet.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c index f4e31646d50f..7d619aa9410a 100644 --- a/drivers/net/ethernet/broadcom/bcm4908_enet.c +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c @@ -75,17 +75,17 @@ struct bcm4908_enet { * R/W ops */ -static inline u32 enet_read(struct bcm4908_enet *enet, u16 offset) +static u32 enet_read(struct bcm4908_enet *enet, u16 offset) { return readl(enet->base + offset); } -static inline void enet_write(struct bcm4908_enet *enet, u16 offset, u32 value) +static void enet_write(struct bcm4908_enet *enet, u16 offset, u32 value) { writel(value, enet->base + offset); } -static inline void enet_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set) +static void enet_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set) { u32 val; @@ -96,27 +96,22 @@ static inline void enet_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, enet_write(enet, offset, val); } -static inline void enet_set(struct bcm4908_enet *enet, u16 offset, u32 set) +static void enet_set(struct bcm4908_enet *enet, u16 offset, u32 set) { enet_maskset(enet, offset, set, set); } -static inline u32 enet_umac_read(struct bcm4908_enet *enet, u16 offset) +static u32 enet_umac_read(struct bcm4908_enet *enet, u16 offset) { return enet_read(enet, ENET_UNIMAC + offset); } -static inline void enet_umac_write(struct bcm4908_enet *enet, u16 offset, u32 value) +static void enet_umac_write(struct bcm4908_enet *enet, u16 offset, u32 value) { enet_write(enet, ENET_UNIMAC + offset, value); } -static inline void enet_umac_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set) -{ - enet_maskset(enet, ENET_UNIMAC + offset, mask, set); -} - -static inline void enet_umac_set(struct bcm4908_enet *enet, u16 offset, u32 set) +static void enet_umac_set(struct bcm4908_enet *enet, u16 offset, u32 set) { enet_set(enet, ENET_UNIMAC + offset, set); } From patchwork Thu Feb 11 12:12:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12082997 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8B03C433E0 for ; Thu, 11 Feb 2021 12:20:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8965D64E9A for ; Thu, 11 Feb 2021 12:20:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231846AbhBKMTw (ORCPT ); Thu, 11 Feb 2021 07:19:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231341AbhBKMOW (ORCPT ); Thu, 11 Feb 2021 07:14:22 -0500 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25A7AC061794; Thu, 11 Feb 2021 04:13:21 -0800 (PST) Received: by mail-lj1-x22d.google.com with SMTP id a17so7109164ljq.2; Thu, 11 Feb 2021 04:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0n1rj6KXJV8lItBfQGefDY+6pvSVUYY2v+L9R4Nw21U=; b=haJpz5MbihVmiUw234yx3dHPVu2/LgXK1XrqZIpSHMqCr9oFmWUaXz3qj5vELuu1AY zIhaM8wWxVdjP90jMMhUmsGSbOcLO4XvfNF/boV/rQxrTeY2f+6IaChi8wWKVSSMle/N 9HW1QQilwu2yJCdr3qMka0Hur4cEiynnaY8wVTbV7ftO5XtmxVSHw6zjRjSGLry1ZUI9 ZgoDdNjPmgrRghVYuU/hhsDG27jO2Hsx0VuBfGkZtp8/PbCqTIReiq6gXwwMnRau9kAS h4h7iu1wnh409snhrnljZz/PE620w5wSUQ0q+Ld4z7GM0zAYSOS9VIEXebvLroBDW22y 7Ldg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0n1rj6KXJV8lItBfQGefDY+6pvSVUYY2v+L9R4Nw21U=; b=oD15f5AoDPb6IkhLc+cpbXoiNR/TwJQqZ/1pO0FdvawTiQiSOh1oAVQrRVrSdUoAyc LB8zTWGZWgsxrieZS3+ASmng/jwGCzLWAMw3vYGPTmJQS0GN64n1VE2d5n/Q9z5xSSse yMmX/CTuuEVkrywG6RO+idsdCYv1l7zktvjzd5j7R7keuF8A051ouU8LdlVvV8MoWbtm jt6607LJ30IpTwfI7CQcf/D9C9jKNDL8cPybIDp16C6gvME9MlrAoWDGDk/2W/zk1Ijt h5vdBaZixLMoP15khJ0csAXZeS6OYaNc91gdgmx/HVC6MiEyemSHqVw6JQw089sroicf mjow== X-Gm-Message-State: AOAM531CgiiIqzWJXbbAnrLy7Am417rENhO45Lp9RTYvDB5EaOWm4s0v JRA6kh2eSnU5alqB6Mko1p4Dv0/xKNU= X-Google-Smtp-Source: ABdhPJy1AqfS6XAHbyY5VYW5hW5IviqUvTWOaD67yK6QFGakSNVApDWlL7C+w3VHvb7tvTu/ins+Hw== X-Received: by 2002:a2e:b552:: with SMTP id a18mr4819235ljn.330.1613045599693; Thu, 11 Feb 2021 04:13:19 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id f23sm834783ljn.131.2021.02.11.04.13.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 04:13:19 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: "David S . Miller" , Jakub Kicinski , Rob Herring Cc: Florian Fainelli , Randy Dunlap , Masahiro Yamada , netdev@vger.kernel.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Andrew Lunn , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH net-next 5.12 6/8] net: broadcom: bcm4908_enet: fix minor typos Date: Thu, 11 Feb 2021 13:12:37 +0100 Message-Id: <20210211121239.728-7-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210211121239.728-1-zajec5@gmail.com> References: <20210209230130.4690-2-zajec5@gmail.com> <20210211121239.728-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Rafał Miłecki 1. Fix "ensable" typo noticed by Andrew 2. Fix chipset name in the struct net_device_ops variable Suggested-by: Andrew Lunn Signed-off-by: Rafał Miłecki Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bcm4908_enet.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c index 7d619aa9410a..47c1b7d827c5 100644 --- a/drivers/net/ethernet/broadcom/bcm4908_enet.c +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c @@ -328,8 +328,8 @@ static int bcm4908_enet_dma_init(struct bcm4908_enet *enet) return 0; } -static void bcm4908_enet_dma_tx_ring_ensable(struct bcm4908_enet *enet, - struct bcm4908_enet_dma_ring *ring) +static void bcm4908_enet_dma_tx_ring_enable(struct bcm4908_enet *enet, + struct bcm4908_enet_dma_ring *ring) { enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE); } @@ -519,7 +519,7 @@ static int bcm4908_enet_start_xmit(struct sk_buff *skb, struct net_device *netde buf_desc->addr = cpu_to_le32((uint32_t)slot->dma_addr); buf_desc->ctl = cpu_to_le32(tmp); - bcm4908_enet_dma_tx_ring_ensable(enet, &enet->tx_ring); + bcm4908_enet_dma_tx_ring_enable(enet, &enet->tx_ring); if (++ring->write_idx == ring->length - 1) ring->write_idx = 0; @@ -583,7 +583,7 @@ static int bcm4908_enet_poll(struct napi_struct *napi, int weight) return handled; } -static const struct net_device_ops bcm96xx_netdev_ops = { +static const struct net_device_ops bcm4908_enet_netdev_ops = { .ndo_open = bcm4908_enet_open, .ndo_stop = bcm4908_enet_stop, .ndo_start_xmit = bcm4908_enet_start_xmit, @@ -623,7 +623,7 @@ static int bcm4908_enet_probe(struct platform_device *pdev) SET_NETDEV_DEV(netdev, &pdev->dev); eth_hw_addr_random(netdev); - netdev->netdev_ops = &bcm96xx_netdev_ops; + netdev->netdev_ops = &bcm4908_enet_netdev_ops; netdev->min_mtu = ETH_ZLEN; netdev->mtu = ENET_MTU_MAX; netdev->max_mtu = ENET_MTU_MAX; From patchwork Thu Feb 11 12:12:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12082999 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3981AC433E0 for ; Thu, 11 Feb 2021 12:20:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E2CAC64D5D for ; Thu, 11 Feb 2021 12:20:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231881AbhBKMUf (ORCPT ); Thu, 11 Feb 2021 07:20:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230525AbhBKMPy (ORCPT ); Thu, 11 Feb 2021 07:15:54 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89D61C061797; Thu, 11 Feb 2021 04:13:24 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id u25so7782545lfc.2; Thu, 11 Feb 2021 04:13:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5jBv6+wQs+1iSUDgV0nyq65E1gECWYEx7EKoseRNJ2A=; b=OGZ9PZmeIdhle3+Scn8/ejoghrCCylgUFhZMLAx7vpg+WuGICL44nd+DhkL0+aIKO+ K0F4uVm1U7owS7S0qXtx7pxL/PfE67JX/59gWXJQNoSYyh9hPtMgoi/s4gt9DPXoMlO4 gYCbY4ZIw3EGAhyyuYkeWzcf9WQPUH/JYd/sqeKGx9BoqqU9ccllRFwOkldN5gCyFMuQ P0Qb5R1/E+X5gOvC30hePo9xyEBAuxcjzz7/o3EwxgBkXVZMJa3Q4paUU91tXRPDDkPa J0DvfM/ebVwP2IXy+irR2SXwSOb070+wdxVbuMRfGozAdUdn1jDNYvN/VWauh5MDm9w9 ck3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5jBv6+wQs+1iSUDgV0nyq65E1gECWYEx7EKoseRNJ2A=; b=GxiYZUsTSRxbZQcwo4vHpnn5S9YQc/p9R66XHChLBXglTgmt6OA9QxRcHjyt6Mf9+t 7SSwBjR2BiUkFYqaGOGUvrBPWb4hThv/GwFer3o7K6uHLutsgkYaqknKT6N2l/Wez8SL BiLifSqGfE8lthcPEzf5TPacisSUbbppu978rfVdBhRxvPNuYs6FNp1xAN5XK4DALXdW wPzHwxPuXkGO3KRAhaMoXkRuID5oreC+cCrAaEC+FVxYKjezWcvMLWdRpq/PxQDZg8sg YSmboHazHQC7UPg6YkkZaXzLyGXS7WZOsjs9BDG9VZGD9QWCeiCn89YFruKLR9vIKOgV cQ3A== X-Gm-Message-State: AOAM530GcdRRgj6Em9BrqmRmDok4LUJWw1JyP4ozuAeMvxpfZyu0NSjG r3uuwJUAgl/kXU4L65cpqAo= X-Google-Smtp-Source: ABdhPJxife9Z3qnRWVO1rxqnUiFfTeksjfM3MpVJI0k0/pPPCsCB4dxO12N7CiNdPyrCwmPk66b9+g== X-Received: by 2002:a19:4013:: with SMTP id n19mr4156077lfa.543.1613045603088; Thu, 11 Feb 2021 04:13:23 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id f23sm834783ljn.131.2021.02.11.04.13.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 04:13:22 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: "David S . Miller" , Jakub Kicinski , Rob Herring Cc: Florian Fainelli , Randy Dunlap , Masahiro Yamada , netdev@vger.kernel.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Andrew Lunn , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH net-next 5.12 7/8] net: broadcom: bcm4908_enet: fix received skb length Date: Thu, 11 Feb 2021 13:12:38 +0100 Message-Id: <20210211121239.728-8-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210211121239.728-1-zajec5@gmail.com> References: <20210209230130.4690-2-zajec5@gmail.com> <20210211121239.728-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Rafał Miłecki Use ETH_FCS_LEN instead of magic value and drop incorrect + 2 Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c index 47c1b7d827c5..2e825db3b2f1 100644 --- a/drivers/net/ethernet/broadcom/bcm4908_enet.c +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c @@ -567,7 +567,7 @@ static int bcm4908_enet_poll(struct napi_struct *napi, int weight) dma_unmap_single(dev, slot.dma_addr, slot.len, DMA_FROM_DEVICE); - skb_put(slot.skb, len - 4 + 2); + skb_put(slot.skb, len - ETH_FCS_LEN); slot.skb->protocol = eth_type_trans(slot.skb, enet->netdev); netif_receive_skb(slot.skb); From patchwork Thu Feb 11 12:12:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12083001 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96E85C433DB for ; Thu, 11 Feb 2021 12:21:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5FEF164D73 for ; Thu, 11 Feb 2021 12:21:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231779AbhBKMVF (ORCPT ); Thu, 11 Feb 2021 07:21:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229683AbhBKMPy (ORCPT ); Thu, 11 Feb 2021 07:15:54 -0500 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C45DC0617A7; Thu, 11 Feb 2021 04:13:26 -0800 (PST) Received: by mail-lj1-x234.google.com with SMTP id a22so7041636ljp.10; Thu, 11 Feb 2021 04:13:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cJPoGrTKInAL8lHXhueEWmoIyBBxrbtsidr003g0JVQ=; b=h1S9L/MuiipWGDZk0QdAJ1vxuwelYSDaRBxXL3pl6CAN+SFT1MtEfVK6e/btoiTk31 GMoJNQrugZmMkU1zE8A5H9hMrDnCwNngqWKylXHkkCkbdi3nSURxYZIFvDbdWbtUq4eF iWQ9OG1aE0TKTPLnhpl3fFdSWh1EhiD2mAxZ4NURAmvYHZI9o2dqf7/dfPYNzsHn8qN0 yDOYopSBM3pV+eMLcIujCB7hodz1oBDMy+0pnhz7PeQJ1iypor5aamhJIuDl5p3zHP1a 8Jmlq81J3pTgM5EPtcZB7Kwc/lYmoIvuOXzJeGQPbe7SSDtS39UfVEBrtRdvaLRf9lNF rOuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cJPoGrTKInAL8lHXhueEWmoIyBBxrbtsidr003g0JVQ=; b=lXLXLryD0n+PBkUTmHzszL7+TwSp+KstC6Qu9ft77zTCly6K0ey6D575DjXgmW3GLp eZkUSVjBoGGTWTl1Iw+FB6F3FfdqoeOyLnxYrPtuwL849Noiv44KIYuCUvfNmdLe6x0X NQsg9kH1lk/eAde2UNfE5TauIjHnV2G55vTHVejd4K5PC8XY1lnwvK7lR1VWogsTEAWL nsxwvsjJN+ciPZV7EmlLHzhLawgRt4vc9mUjl6Rc78crurRfckPUEbiFocbJ1KIaeYM2 Xabq/bp3r7jBqtB7SI7h6kzseDrghLpWeWqQIjeh+65EFEcSFLxCDpMvCW2RnewCbjW1 QM0A== X-Gm-Message-State: AOAM532zYPoy8BFbV0jXvUK3fsXBTwuvgU+SGyI9xDeGp9UCbJPNL/cn idsG3STp7dpngy1JyBBQ1eU= X-Google-Smtp-Source: ABdhPJzOWCeQE/xVojne9iRVhq0uq/euljiV13i1vMRK8IOzZ0xMScWhj2h1gBBN4qc11DbGdoz3EQ== X-Received: by 2002:a2e:9b0b:: with SMTP id u11mr4879282lji.415.1613045605509; Thu, 11 Feb 2021 04:13:25 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id f23sm834783ljn.131.2021.02.11.04.13.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 04:13:25 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: "David S . Miller" , Jakub Kicinski , Rob Herring Cc: Florian Fainelli , Randy Dunlap , Masahiro Yamada , netdev@vger.kernel.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Andrew Lunn , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH net-next 5.12 8/8] net: broadcom: bcm4908_enet: fix endianness in xmit code Date: Thu, 11 Feb 2021 13:12:39 +0100 Message-Id: <20210211121239.728-9-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210211121239.728-1-zajec5@gmail.com> References: <20210209230130.4690-2-zajec5@gmail.com> <20210211121239.728-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Rafał Miłecki Use le32_to_cpu() for reading __le32 struct field filled by hw. Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c index 2e825db3b2f1..0da8c8c73ba7 100644 --- a/drivers/net/ethernet/broadcom/bcm4908_enet.c +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c @@ -476,7 +476,7 @@ static int bcm4908_enet_start_xmit(struct sk_buff *skb, struct net_device *netde /* Free transmitted skbs */ while (ring->read_idx != ring->write_idx) { buf_desc = &ring->buf_desc[ring->read_idx]; - if (buf_desc->ctl & DMA_CTL_STATUS_OWN) + if (le32_to_cpu(buf_desc->ctl) & DMA_CTL_STATUS_OWN) break; slot = &ring->slots[ring->read_idx];