From: Andrew Lunn <andrew@lunn.ch>
To: Hauke Mehrtens <hauke@hauke-m.de>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com,
john@phrozen.org, linux-mips@linux-mips.org, dev@kresin.me,
hauke.mehrtens@intel.com
Subject: Re: [PATCH 4/4] net: dsa: Add Lantiq / Intel DSA driver for vrx200
Date: Sun, 29 Jul 2018 18:49:40 +0200 [thread overview]
Message-ID: <20180729164940.GB14420@lunn.ch> (raw)
In-Reply-To: <df047f7a-de85-372a-7bce-1f78839f98fe@hauke-m.de>
> >> +static const struct gswip_rmon_cnt_desc gswip_rmon_cnt[] = {
> >> + /** Receive Packet Count (only packets that are accepted and not discarded). */
> >> + MIB_DESC(1, 0x1F, "RxGoodPkts"),
> >> + /** Receive Size 1024-1522 (or more, if configured) Packet Count. */
> >> + MIB_DESC(1, 0x17, "RxMaxBytePkts"),
> >> + /** Transmit Size 1024-1522 (or more, if configured) Packet Count. */
> >> + MIB_DESC(1, 0x05, "TxMaxBytePkts"),
> >
> > Most of the comments here don't add anything useful. Maybe remove
> > them?
>
> Ok I removed them.
The comments i left above are useful, since they give additional
information which is not obvious from the name.
> Are the names ok, or should they follow any Linux definition?
There are no standard names. So each driver tends to be different.
> > Please return ETIMEOUT when needed. Maybe use one of the variants of
> > readx_poll_timeout().
>
> I am returning ETIMEOUT now.
>
> When I would use readx_poll_timeout() I can not use the gswip_mdio_r()
> function, because it takes two arguments and would have to use readl
> directly.
Yes, they don't always fit, which is why is said "maybe".
> > The names make this unclear. The callback is used to configure the MAC
> > layer when something happens at the PHY layer. phyaddr does not appear
> > to be an address, not should it be doing anything to a PHY.
>
> I renamed this to phyconf, as this contains multiple configuration
> values. This tells the mac what settings the phy wants to use.
macconf might be better, since this is configuring the MAC, not the
PHY.
> This is sort of a firmware, but it is also in the GPL driver.
> Currently the probe function is not marked __init so we can not make
> this easily __initdata.
> It has 64 entries of 8 bytes each so, 512 bytes, I think we can put this
> into the code.
512 bytes is fine.
Andrew
next prev parent reply other threads:[~2018-07-29 16:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-21 19:13 [PATCH 0/4] net: Add support for Lantiq / Intel vrx200 network Hauke Mehrtens
2018-07-21 19:13 ` [PATCH 1/4] MIPS: lantiq: Do not enable IRQs in dma open Hauke Mehrtens
2018-07-24 0:19 ` Paul Burton
2018-07-24 5:32 ` Hauke Mehrtens
2018-07-24 5:39 ` David Miller
2018-07-21 19:13 ` [PATCH 2/4] net: dsa: Add Lantiq / Intel GSWIP tag support Hauke Mehrtens
2018-07-25 14:20 ` Andrew Lunn
2018-07-29 14:01 ` Hauke Mehrtens
2018-07-21 19:13 ` [PATCH 3/4] net: lantiq: Add Lantiq / Intel vrx200 Ethernet driver Hauke Mehrtens
2018-07-21 20:25 ` John Crispin
2018-07-21 23:18 ` Hauke Mehrtens
2018-07-24 0:34 ` Paul Burton
2018-07-24 5:27 ` Hauke Mehrtens
2018-07-25 15:28 ` Andrew Lunn
2018-07-29 14:03 ` Hauke Mehrtens
2018-07-29 15:51 ` Andrew Lunn
2018-07-29 15:53 ` Hauke Mehrtens
2018-07-29 16:40 ` Andrew Lunn
2018-07-29 17:44 ` Hauke Mehrtens
2018-07-29 18:10 ` Andrew Lunn
2018-07-21 19:13 ` [PATCH 4/4] net: dsa: Add Lantiq / Intel DSA driver for vrx200 Hauke Mehrtens
2018-07-22 3:17 ` David Miller
2018-07-22 9:29 ` Hauke Mehrtens
2018-07-22 9:29 ` Hauke Mehrtens
2018-07-25 16:12 ` Andrew Lunn
2018-07-29 16:25 ` Hauke Mehrtens
2018-07-29 16:49 ` Andrew Lunn [this message]
2018-07-25 16:32 ` John Crispin
2018-07-25 16:46 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180729164940.GB14420@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dev@kresin.me \
--cc=f.fainelli@gmail.com \
--cc=hauke.mehrtens@intel.com \
--cc=hauke@hauke-m.de \
--cc=john@phrozen.org \
--cc=linux-mips@linux-mips.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox