Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752613AbbKOUFM (ORCPT ); Sun, 15 Nov 2015 15:05:12 -0500 Received: from smtp-1b.atlantis.sk ([80.94.52.26]:46829 "EHLO smtp-1b.atlantis.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752492AbbKOUFI (ORCPT ); Sun, 15 Nov 2015 15:05:08 -0500 From: Ondrej Zary To: David Miller Subject: Re: [PATCH 1/2] dl2k: Add support for IP1000A-based cards Date: Sun, 15 Nov 2015 21:04:58 +0100 User-Agent: KMail/1.9.10 (enterprise35 0.20100827.1168748) Cc: andy.shevchenko@gmail.com, netdev@vger.kernel.org, romieu@fr.zoreil.com, linux-kernel@vger.kernel.org References: <1447538738-28605-1-git-send-email-linux@rainbow-software.org> <20151115.125905.63907005203700143.davem@davemloft.net> In-Reply-To: <20151115.125905.63907005203700143.davem@davemloft.net> X-KMail-QuotePrefix: > MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201511152104.59206.linux@rainbow-software.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1665 Lines: 48 On Sunday 15 November 2015 18:59:05 David Miller wrote: > From: Andy Shevchenko > 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/