Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1497205
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 01/10] ethernet: add sun8i-emac driver |
| Date | 2016-10-07 17:10 +0200 |
| Message-ID | <spEWB-2dt-9@gated-at.bofh.it> (permalink) |
| References | <spyHv-604-3@gated-at.bofh.it> <spyHv-604-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, 2016-10-07 at 10:25 +0200, Corentin Labbe wrote:
> This patch add support for sun8i-emac ethernet MAC hardware.
> It could be found in Allwinner H3/A83T/A64 SoCs.
trivial notes:
> diff --git a/drivers/net/ethernet/allwinner/sun8i-emac.c b/drivers/net/ethernet/allwinner/sun8i-emac.c
[]
> +static const char const estats_str[][ETH_GSTRING_LEN] = {
one too many const
> +/* MAGIC value for knowing if a descriptor is available or not */
> +#define DCLEAN cpu_to_le32(BIT(16) | BIT(14) | BIT(12) | BIT(10) | BIT(9))
Aren't there #defines for these bits?
> +static void sun8i_emac_flow_ctrl(struct sun8i_emac_priv *priv, int duplex,
> + int fc)
> +{
> + u32 flow = 0;
> +
> + flow = readl(priv->base + EMAC_RX_CTL0);
> + if (fc & EMAC_FLOW_RX)
> + flow |= BIT(16);
> + else
> + flow &= ~BIT(16);
> + writel(flow, priv->base + EMAC_RX_CTL0);
> +
> + flow = readl(priv->base + EMAC_TX_FLOW_CTL);
> + if (fc & EMAC_FLOW_TX)
> + flow |= BIT(0);
> + else
> + flow &= ~BIT(0);
more magic bits that could be #defines
> +static int sun8i_emac_rx_from_ddesc(struct net_device *ndev, int i)
> +{
> []
> + /* the checksum or length of received frame's payload is wrong*/
> + if (dstatus & BIT(0)) {
[]
> + if (dstatus & BIT(1)) {
[]
> + if ((dstatus & BIT(3))) {
etc...
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v4 00/10] net-next: ethernet: add sun8i-emac driver Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-10-07 10:30 +0200
[PATCH v4 07/10] ARM: dts: sun8i: Enable sun8i-emac on the Orange PI One Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-10-07 10:40 +0200
[PATCH v4 08/10] ARM: dts: sun8i: Enable sun8i-emac on the Orange Pi 2 Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-10-07 10:40 +0200
Re: [PATCH v4 08/10] ARM: dts: sun8i: Enable sun8i-emac on the Orange Pi 2 Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-12 11:10 +0200
Re: [PATCH v4 08/10] ARM: dts: sun8i: Enable sun8i-emac on the Orange Pi 2 Jean-Francois Moine <moinejf@free.fr> - 2016-10-12 11:10 +0200
[PATCH v4 06/10] ARM: dts: sun8i: Enable sun8i-emac on the Orange PI PC Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-10-07 10:40 +0200
[PATCH v4 10/10] ARM: sunxi: Enable sun8i-emac driver on multi_v7_defconfig Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-10-07 10:40 +0200
Re: [PATCH v4 10/10] ARM: sunxi: Enable sun8i-emac driver on multi_v7_defconfig Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-10 14:40 +0200
Re: [PATCH v4 10/10] ARM: sunxi: Enable sun8i-emac driver on multi_v7_defconfig LABBE Corentin <clabbe.montjoie@gmail.com> - 2016-10-10 14:40 +0200
Re: [PATCH v4 10/10] ARM: sunxi: Enable sun8i-emac driver on multi_v7_defconfig Jean-Francois Moine <moinejf@free.fr> - 2016-10-10 15:20 +0200
Re: [PATCH v4 10/10] ARM: sunxi: Enable sun8i-emac driver on multi_v7_defconfig Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-11 11:50 +0200
Re: [PATCH v4 10/10] ARM: sunxi: Enable sun8i-emac driver on multi_v7_defconfig LABBE Corentin <clabbe.montjoie@gmail.com> - 2016-10-12 10:40 +0200
[PATCH v4 05/10] ARM: dts: sun8i-h3: add sun8i-emac ethernet driver Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-10-07 10:40 +0200
[PATCH v4 04/10] ARM: dts: sun8i-h3: Add dt node for the syscon control module Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-10-07 10:40 +0200
Re: [PATCH v4 04/10] ARM: dts: sun8i-h3: Add dt node for the syscon control module Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-10 14:40 +0200
Re: [PATCH v4 04/10] ARM: dts: sun8i-h3: Add dt node for the syscon control module Jean-Francois Moine <moinejf@free.fr> - 2016-10-10 15:00 +0200
Re: [PATCH v4 04/10] ARM: dts: sun8i-h3: Add dt node for the syscon control module Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-11 12:00 +0200
[PATCH v4 09/10] ARM: sunxi: Enable sun8i-emac driver on sunxi_defconfig Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-10-07 10:40 +0200
Re: [PATCH v4 01/10] ethernet: add sun8i-emac driver Joe Perches <joe@perches.com> - 2016-10-07 17:10 +0200
csiph-web