Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1269755

Re: [PATCH 1/2] dl2k: Add support for IP1000A-based cards

From Ondrej Zary <linux@rainbow-software.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] dl2k: Add support for IP1000A-based cards
Date 2015-11-15 21:10 +0100
Message-ID <qvbMB-60R-5@gated-at.bofh.it> (permalink)
References <quRbb-1jj-3@gated-at.bofh.it> <quVou-3Q7-9@gated-at.bofh.it> <qv9KO-4w4-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] dl2k: Add support for IP1000A-based cards Ondrej Zary <linux@rainbow-software.org> - 2015-11-14 23:10 +0100
  Re: [PATCH 1/2] dl2k: Add support for IP1000A-based cards Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-11-15 03:40 +0100
    Re: [PATCH 1/2] dl2k: Add support for IP1000A-based cards Ondrej Zary <linux@rainbow-software.org> - 2015-11-15 11:50 +0100
    Re: [PATCH 1/2] dl2k: Add support for IP1000A-based cards David Miller <davem@davemloft.net> - 2015-11-15 19:00 +0100
      Re: [PATCH 1/2] dl2k: Add support for IP1000A-based cards Ondrej Zary <linux@rainbow-software.org> - 2015-11-15 21:10 +0100
        Re: [PATCH 1/2] dl2k: Add support for IP1000A-based cards David Miller <davem@davemloft.net> - 2015-11-15 23:10 +0100

csiph-web