From: Ondrej Zary <linux@rainbow-software.org>
To: David Miller <davem@davemloft.net>
Cc: andy.shevchenko@gmail.com, netdev@vger.kernel.org,
romieu@fr.zoreil.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dl2k: Add support for IP1000A-based cards
Date: Sun, 15 Nov 2015 21:04:58 +0100 [thread overview]
Message-ID: <201511152104.59206.linux@rainbow-software.org> (raw)
In-Reply-To: <20151115.125905.63907005203700143.davem@davemloft.net>
On Sunday 15 November 2015 18:59:05 David Miller wrote:
> From: Andy Shevchenko <andy.shevchenko@gmail.com>
> Date: Sun, 15 Nov 2015 04:30:25 +0200
>
> > On Sun, Nov 15, 2015 at 12:05 AM, Ondrej Zary
> >
> >> @@ -433,9 +474,10 @@ rio_open (struct net_device *dev)
> >>
> >> alloc_list (dev);
> >>
> >> - /* Get station address */
> >> - for (i = 0; i < 6; i++)
> >> - dw8(StationAddr0 + i, dev->dev_addr[i]);
> >> + /* Set station address */
> >> + for (i = 0; i < 3; i++)
> >> + dw16(StationAddr0 + 2 * i,
> >> + cpu_to_le16(((u16 *)dev->dev_addr)[i]));
> >
> > Is it specific requirement for new HW? If not, may be another patch
> > with micro optimizations.
>
> I absolutely agree, this definitely should not just be blindly copied
> over from the other driver.
>
> And if it is a requirement:
Yes, it's required. The byte access does not work on IP1000A chips.
> 1) It must be documented as per why, both in a comment above the loop
> and in the commit log message.
OK.
> 2) It must therefore be tested on dl2k chips that worked with the
> dl2k driver beforehand to prove that it doesn't break them.
Tested it with D-Link DGE-550T (chip marked DL-2000, probably rebranded
TC9020) and it works fine.
Even the TC9020 datasheet says: "Access Rule: Word, Double Word". So it was
always wrong but worked anyway.
--
Ondrej Zary
next prev parent reply other threads:[~2015-11-15 20:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-14 22:05 [PATCH 1/2] dl2k: Add support for IP1000A-based cards Ondrej Zary
2015-11-14 22:05 ` [PATCH 2/2] ipg: Remove ipg driver Ondrej Zary
2015-11-15 2:30 ` [PATCH 1/2] dl2k: Add support for IP1000A-based cards Andy Shevchenko
2015-11-15 10:33 ` Ondrej Zary
2015-11-15 17:59 ` David Miller
2015-11-15 20:04 ` Ondrej Zary [this message]
2015-11-15 22:03 ` David Miller
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=201511152104.59206.linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=andy.shevchenko@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.