Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3170330pxb; Tue, 21 Sep 2021 16:37:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5ijX3pa+yIbgkhdvPfvARvsXzhaZSVEA9dYDLcN3mNmY8HWJgY1BXK2Uaiq2LoH0RFbgL X-Received: by 2002:a6b:4e0d:: with SMTP id c13mr2076423iob.143.1632267479378; Tue, 21 Sep 2021 16:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632267479; cv=none; d=google.com; s=arc-20160816; b=jrX0kRjR/CFILtPNb4NELBWG6ht6L5bxpoUn88x0731AoVXI48h06J/00FqLBrLrAO DTTj48CcPYLJxT/p8/FZ8H7vPQQotFBqYhdtgZhLarMO6F7KhgM6/VNmZ3qN0ibOoGKo Nsj6+QLOqoLJZigm6j3nuDLVbzzAYsLfka3e+sZz0Maz9ZCP7PSdfuVWwp3BRFFNJhsb YtsB3makzJfEUIlQ6O1VptubnSONvQfHJoBGAvsEdiPzbZ+6yvToDX9lzdgrkIPfn9cP LgIe71MYVedwVZwWmO0+w/qSBT1xFU5QdcEBOMbstuzkeL5qNVZ2EzkuH7KFUIm6Ryjk FgCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=PB7mw84oWqMcTM8L33Z/mqiJNX2vqTIfyYp6vIibYpQ=; b=ajRHqYuxu0xoQqVjIShRmc8bDLVF+ft9JK1//cl9tOND0ksw6jIg2IN5UiB2pt/Z30 PA0U0XqQp+ZvZx2Y4hhme+XcSAdPOwYOkLMJJ0sP3HV9RYN0tJXKZcrxgL5hHiiOG0XB azel8A2XVuoYd5sbbS7Gz5M9XzIxjO75JmHFKVJAI20XmPgZ9O7qybvL75xCJFsku5Im Qm8xieTIzokQY19noE0NhMN223kYlCaT63qFyW/jtifHhOoJ020zdzRSZl6xECMQnAF6 sQMDo4vGsFup/oEFrV5APSv6RTedZndEY2NusLjNHISN8tPulB9nmj1df8S2xn53xJXK 1QIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r199si444716jac.71.2021.09.21.16.37.48; Tue, 21 Sep 2021 16:37:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235250AbhIUVKa (ORCPT + 99 others); Tue, 21 Sep 2021 17:10:30 -0400 Received: from mail-oi1-f171.google.com ([209.85.167.171]:36368 "EHLO mail-oi1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235238AbhIUVK2 (ORCPT ); Tue, 21 Sep 2021 17:10:28 -0400 Received: by mail-oi1-f171.google.com with SMTP id y201so1178268oie.3; Tue, 21 Sep 2021 14:08:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PB7mw84oWqMcTM8L33Z/mqiJNX2vqTIfyYp6vIibYpQ=; b=pv5Uonr5OTyBh2ro0cq896BUghHzrOeg109cypv38nh8xdUBuw4Y0NoHhcRtiLl1vK zNvH3PewPp4yi6HiBxCz/f23AmBem56k8Pk5VPL5l71i46mwsjyBqnR81tCN/QfJAB6a oTjk8p50KXDU+3uMxyf1Et+dqgMrLto4p0MqAfxB5MTDC69d2GCWPmf9T2Rom1q/DO6h 1ptxleM93rPezIV3mTJvoo/Fu+VGRp91u+V06+bwLs1W81SmBBNC9apKnYkuQ0yUZ0MT XnNok0JrEGqUFOie8TEILIo7C6FihuheQSurqO8cFoIttJAMUHBk01qbd7/dY7D97H3g h3Hg== X-Gm-Message-State: AOAM533Nb227Kh6CMEuN2NHBjCPmFTllXooOA4YUQSHLqtnTYrPMnnBr otcHH6a8Mta/Z/xYU+EvXrhx952gqQ== X-Received: by 2002:a54:4e1d:: with SMTP id a29mr5287079oiy.7.1632258539121; Tue, 21 Sep 2021 14:08:59 -0700 (PDT) Received: from robh.at.kernel.org (rrcs-192-154-179-36.sw.biz.rr.com. [192.154.179.36]) by smtp.gmail.com with ESMTPSA id g23sm33684otl.23.2021.09.21.14.07.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Sep 2021 14:08:58 -0700 (PDT) Received: (nullmailer pid 3326678 invoked by uid 1000); Tue, 21 Sep 2021 21:07:39 -0000 Date: Tue, 21 Sep 2021 16:07:39 -0500 From: Rob Herring To: Andrew Lunn Cc: Stefan Wahren , "David S. Miller" , Jakub Kicinski , Michael Heimpold , jimmy.shen@vertexcom.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH RFC 3/3] net: vertexcom: Add MSE102x SPI support Message-ID: References: <20210914151717.12232-1-stefan.wahren@i2se.com> <20210914151717.12232-4-stefan.wahren@i2se.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 16, 2021 at 02:35:41PM +0200, Andrew Lunn wrote: > > >> + netif_carrier_off(mse->ndev); > > >> + ndev->if_port = IF_PORT_10BASET; > > > That is not correct. Maybe you should add a IF_PORT_HOMEPLUG ? > > > > There is already a driver (qca_spi, qcauart) for a similiar Homeplug > > device (QCA7000), which also uses IF_PORT_10BASET. Should i change this > > too or leave it because of resulting changes to userspace? > > Technically, it would be an ABI change. But ifmap seems pretty loosely > defined. See man 7 netdevice: > > SIOCGIFMAP, SIOCSIFMAP > Get or set the interface's hardware parameters using ifr_map. > Setting the parameters is a privileged operation. > > struct ifmap { > unsigned long mem_start; > unsigned long mem_end; > unsigned short base_addr; > unsigned char irq; > unsigned char dma; > unsigned char port; > }; > > The interpretation of the ifmap structure depends on the device driver > and the architecture. > > The if_port value ends up in port. And i've no idea where it is > actually available in user space. iproute2 does not use it, nor > ethtool. So, i would say, submit a separate patch for the other > drivers, and we will see if anybody notices. > > > >> +static const struct of_device_id mse102x_match_table[] = { > > >> + { .compatible = "vertexcom,mse1021" }, > > >> + { .compatible = "vertexcom,mse1022" }, > > > Is there an ID register you can read to determine what device you > > > actually have? If so, i suggest you verify the correct compatible is > > > used. > > > > AFAIK the device doesn't have any kind of ID register. > > Then i would suggest changing the compatible to "vertexcom,mse102x". Don't use wildcards in compatible strings. > > If you cannot verify it, and it makes no actual difference, then 50% > of the boards will use the wrong one. Which means you can then later > not actually make use of it to enable features specific to a > compatible string. A wildcard doesn't help with this. If some boards are wrong, not any way we can fix that short of a DT update. If you can update the DT, then you can correct the string then. Rob