[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <973c6f96-6020-43e0-a7cf-9c129611da13@lunn.ch>
Date: Fri, 15 Aug 2025 22:16:54 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Artur Rojek <contact@...ur-rojek.eu>
Cc: Rob Landley <rob@...dley.net>, Jeff Dionne <jeff@...esemi.io>,
John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] net: j2: Introduce J-Core EMAC
> +static irqreturn_t jcore_emac_irq(int irq, void *data)
> +{
> + struct jcore_emac *priv = data;
> + struct net_device *ndev = priv->ndev;
> + struct sk_buff *skb;
> + struct {
> + int packets;
> + int bytes;
> + int dropped;
> + int crc_errors;
> + } stats = {};
> + unsigned int status, pkt_len, i;
netdev uses 'reverse christmas tree' for local variables. They should
be sorted longest to shortest. This sometimes means you need to move
assignments into the body of the function, in this case, ndev.
> + jcore_emac_read_hw_addr(priv, mac);
> + if (is_zero_ether_addr(mac)) {
It would be more normal to use !is_valid_ether_addr()
What support is there for MDIO? Normally the MAC driver would not be
setting the carrier status, phylink or phylib would do that.
Andrew
---
pw-bot: cr
Powered by blists - more mailing lists