public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>,
	"David S. Miller" <davem@davemloft.net>,
	Andrew Lunn <andrew@lunn.ch>, Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	Woojung Huh <woojung.huh@microchip.com>,
	Arun Ramadoss <arun.ramadoss@microchip.com>
Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, UNGLinuxDriver@microchip.com
Subject: Re: [PATCH net v2 5/6] net: dsa: microchip: ksz8863_smi: fix bulk access
Date: Fri, 24 Mar 2023 15:21:07 -0700	[thread overview]
Message-ID: <4236cc30-86f6-803d-82dc-a340fbe89481@gmail.com> (raw)
In-Reply-To: <20230324080608.3428714-6-o.rempel@pengutronix.de>

On 3/24/23 01:06, Oleksij Rempel wrote:
> Current regmap bulk access is broken, resulting to wrong reads/writes
> if ksz_read64/ksz_write64 functions are used.
> Mostly this issue was visible by using ksz8_fdb_dump(), which returned
> corrupt MAC address.
> 
> The reason is that regmap was configured to have max_raw_read/write,
> even if ksz8863_mdio_read/write functions are able to handle unlimited
> read/write accesses. On ksz_read64 function we are using multiple 32bit
> accesses by incrementing each access by 1 instead of 4. Resulting buffer
> had 01234567.12345678 instead of 01234567.89abcdef.
> 
> We have multiple ways to fix it:
> - enable 4 byte alignment for 32bit accesses. Since the HW do not have
>    this requirement. It will break driver.
> - disable max_raw_* limit.
> 
> This patch is removing max_raw_* limit for regmap accesses in ksz8863_smi.
> 
> Fixes: 60a364760002 ("net: dsa: microchip: Add Microchip KSZ8863 SMI based driver support")
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian


  reply	other threads:[~2023-03-24 22:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24  8:06 [PATCH net v2 0/6] net: dsa: microchip: ksz8: fixes for stable Oleksij Rempel
2023-03-24  8:06 ` [PATCH net v2 1/6] net: dsa: microchip: ksz8: fix ksz8_fdb_dump() Oleksij Rempel
2023-03-24 22:19   ` Florian Fainelli
2023-03-24  8:06 ` [PATCH net v2 2/6] net: dsa: microchip: ksz8: fix ksz8_fdb_dump() to extract all 1024 entries Oleksij Rempel
2023-03-24 22:19   ` Florian Fainelli
2023-03-24  8:06 ` [PATCH net v2 3/6] net: dsa: microchip: ksz8: fix offset for the timestamp filed Oleksij Rempel
2023-03-24 22:20   ` Florian Fainelli
2023-03-24  8:06 ` [PATCH net v2 4/6] net: dsa: microchip: ksz8: ksz8_fdb_dump: avoid extracting ghost entry from empty dynamic MAC table Oleksij Rempel
2023-03-24 22:20   ` Florian Fainelli
2023-03-24  8:06 ` [PATCH net v2 5/6] net: dsa: microchip: ksz8863_smi: fix bulk access Oleksij Rempel
2023-03-24 22:21   ` Florian Fainelli [this message]
2023-03-24  8:06 ` [PATCH net v2 6/6] net: dsa: microchip: ksz8: fix MDB configuration with non-zero VID Oleksij Rempel
2023-03-24 22:21   ` Florian Fainelli
2023-03-25 11:31 ` [PATCH net v2 0/6] net: dsa: microchip: ksz8: fixes for stable patchwork-bot+netdevbpf

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=4236cc30-86f6-803d-82dc-a340fbe89481@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=arun.ramadoss@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=woojung.huh@microchip.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