Netdev Archive on lore.kernel.org
 help / color / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Marek Vasut <marex@denx.de>
Cc: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
	Petr Stetiar <ynezz@true.cz>, YueHaibing <yuehaibing@huawei.com>
Subject: Re: [PATCH 1/3] net: ks8851-ml: Remove 8-bit bus accessors
Date: Mon, 10 Feb 2020 20:31:02 +0100
Message-ID: <20200210193102.q7qikf4czfzuqlox@wunner.de> (raw)
In-Reply-To: <20200210184139.342716-1-marex@denx.de>

On Mon, Feb 10, 2020 at 07:41:37PM +0100, Marek Vasut wrote:
> This driver is mixing 8-bit and 16-bit bus accessors for reasons unknown,
> however the speculation is that this was some sort of attempt to support
> the 8-bit bus mode.

ks8851.c was introduced in July 2009 with commit 3ba81f3ece3c.
ks8851_mll.c was introduced two months later with a55c0a0ed415.

Perhaps the 8-bit accesses are remnants of the SPI-version ks8851.c?

Both chips are very similar.  Unfortunately ks8851_mll.c duplicated
much of ks8851.c, instead of separating it into a common portion and
an SPI-specific portion.  I've deduplicated at least the register
macros with commit aae079aa76d0.  It would be great if you could
continue this effort and increase the amount of shared code between
the two drivers.  Right now ks8851_mll.c supports features that
ks8851.c does not, e.g. multicast filtering.  On the other hand
I've fixed bugs in ks8851.c which I believe still exist in ks8851_mll.c,
see 536d3680fd2d for an example.  I didn't apply the fixes to
ks8851_mll.c simply because I don't have hardware with that chip.
I do have access to hardware using ks8851.c.

HTH,

Lukas

  parent reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 18:41 Marek Vasut
2020-02-10 18:41 ` [PATCH 2/3] net: ks8851-ml: Fix 16-bit data access Marek Vasut
2020-02-10 19:35   ` Lukas Wunner
2020-02-10 19:40     ` Marek Vasut
2020-02-15  9:24   ` David Miller
2020-02-15  9:47     ` Marek Vasut
2020-02-15  9:56       ` David Miller
2020-02-10 18:41 ` [PATCH 3/3] net: ks8851-ml: Fix 16-bit IO operation Marek Vasut
2020-02-10 19:31 ` Lukas Wunner [this message]
2020-02-10 19:44   ` [PATCH 1/3] net: ks8851-ml: Remove 8-bit bus accessors 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=20200210193102.q7qikf4czfzuqlox@wunner.de \
    --to=lukas@wunner.de \
    --cc=davem@davemloft.net \
    --cc=marex@denx.de \
    --cc=netdev@vger.kernel.org \
    --cc=ynezz@true.cz \
    --cc=yuehaibing@huawei.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

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git