From: Andrew Lunn <andrew@lunn.ch>
To: Tristram.Ha@microchip.com
Cc: marex@denx.de, netdev@vger.kernel.org, Woojung.Huh@microchip.com,
f.fainelli@gmail.com
Subject: Re: [RFT][PATCH 4/7] net: dsa: microchip: Remove dev->txbuf
Date: Fri, 21 Dec 2018 10:30:16 +0100 [thread overview]
Message-ID: <20181221093016.GA5023@lunn.ch> (raw)
In-Reply-To: <BY1PR11MB04398923A2A7D113C738523EECB80@BY1PR11MB0439.namprd11.prod.outlook.com>
On Fri, Dec 21, 2018 at 01:02:23AM +0000, Tristram.Ha@microchip.com wrote:
> > On 12/20/2018 10:41 AM, Andrew Lunn wrote:
> > > On Wed, Dec 19, 2018 at 05:20:33PM -0800, Florian Fainelli wrote:
> > >> On 12/19/18 5:06 PM, Marek Vasut wrote:
> > >>> Previous patches unconver that ksz_spi_write() is always ever called
> > >>> with len = 1, 2 or 4. We can thus drop the if (len > SPI_TX_BUF_LEN)
> > >>> check and we can also drop the allocation of the txbuf which is part
> > >>> of the driver data. This wastes 256 bytes for no reason and can be
> > >>> replaced with 8-byte stack allocated buffer, which is what this patch
> > >>> does. This is an intermediate step though, which will go away after
> > >>> regmap conversion.
>
> The switch uses auto address increment and can return the whole register
> space in 1 transfer. Most switches have only 256 registers, so I just stopped
> at that number for KSZ9477.
>
> This read operation is mostly done by users to dump the registers for debugging.
> The write operation can be used to setup registers from a file.
>
> I mentioned before the driver can use the standard Linux register access API for
> users to read the chip. Maybe you also want to try that for debugging.
Hi Tristram
You might want to implement the register dump per port, and connect it
to ethtool --register-dump. The core DSA code has what is needed, you
just need driver specific code. Vivien also sent patches for ethtool
to pritty print the values for the mv88e6xxx. You can do the same for
your chipsets.
Andrew
next prev parent reply other threads:[~2018-12-21 9:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-20 1:06 [RFT][PATCH 0/7] net: dsa: microchip: Convert to regmap Marek Vasut
2018-12-20 1:06 ` [RFT][PATCH 1/7] net: dsa: microchip: Remove ksz_{read,write}24() Marek Vasut
2018-12-20 1:06 ` [RFT][PATCH 2/7] net: dsa: microchip: Remove ksz_{get,set}() Marek Vasut
2018-12-20 1:06 ` [RFT][PATCH 3/7] net: dsa: microchip: Inline ksz_spi.h Marek Vasut
2018-12-20 1:06 ` [RFT][PATCH 4/7] net: dsa: microchip: Remove dev->txbuf Marek Vasut
2018-12-20 1:20 ` Florian Fainelli
2018-12-20 9:41 ` Andrew Lunn
2018-12-20 14:35 ` Marek Vasut
2018-12-21 1:02 ` Tristram.Ha
2018-12-21 2:04 ` Marek Vasut
2018-12-21 9:30 ` Andrew Lunn [this message]
2018-12-20 18:57 ` Marek Vasut
2018-12-20 1:06 ` [RFT][PATCH 5/7] net: dsa: microchip: Factor out register access opcode generation Marek Vasut
2018-12-20 1:06 ` [RFT][PATCH 6/7] net: dsa: microchip: Initial SPI regmap support Marek Vasut
2018-12-21 1:30 ` Tristram.Ha
2018-12-21 2:04 ` Marek Vasut
2018-12-20 1:06 ` [RFT][PATCH 7/7] net: dsa: microchip: Dispose of ksz_io_ops Marek Vasut
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=20181221093016.GA5023@lunn.ch \
--to=andrew@lunn.ch \
--cc=Tristram.Ha@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=f.fainelli@gmail.com \
--cc=marex@denx.de \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).