[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YNc790LXRWjFmT21@lunn.ch>
Date: Sat, 26 Jun 2021 16:38:47 +0200
From: Andrew Lunn <andrew@...n.ch>
To: David Thompson <davthompson@...dia.com>
Cc: davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
limings@...dia.com, Asmaa Mnebhi <asmaa@...dia.com>
Subject: Re: [PATCH net-next v8] Add Mellanox BlueField Gigabit Ethernet
driver
> +static void mlxbf_gige_get_regs(struct net_device *netdev,
> + struct ethtool_regs *regs, void *p)
> +{
> + struct mlxbf_gige *priv = netdev_priv(netdev);
> +
> + regs->version = MLXBF_GIGE_REGS_VERSION;
> +
> + /* Read entire MMIO register space and store results
> + * into the provided buffer. Each 64-bit word is converted
> + * to big-endian to make the output more readable.
> + *
> + * NOTE: by design, a read to an offset without an existing
> + * register will be acknowledged and return zero.
> + */
> + memcpy_fromio(p, priv->base, MLXBF_GIGE_MMIO_REG_SZ);
Is the big-endian comment correct? memcpy_fromio() appears to be
native endian.
> +static int mlxbf_gige_do_ioctl(struct net_device *netdev,
> + struct ifreq *ifr, int cmd)
> +{
> + if (!(netif_running(netdev)))
> + return -EINVAL;
> +
> + return phy_mii_ioctl(netdev->phydev, ifr, cmd);
> +}
You could use phy_do_ioctl_running() here.
For the MDIO, PHY and ethtool parts:
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists