Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1344456pxb; Thu, 16 Sep 2021 05:38:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbuXo7wzbpJm4G/KG19iY6MfG+1V2EH/9xHbDnpUmXLehdcToTk/VnD+mudBWu9UkQqUbx X-Received: by 2002:a05:6602:2436:: with SMTP id g22mr4269084iob.109.1631795884314; Thu, 16 Sep 2021 05:38:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631795884; cv=none; d=google.com; s=arc-20160816; b=mlAM4cl+GQ2VJxR87RqWfhaciviOZh8vNwUI58svc2QLbF2c/ryxOeN+GCkCf5JILT Xqu06EFkEmf3LmRHE5fgWtPLJagidOBolDPo1A9va+Rk6B29dDWQY13BiJNN0hcrcrT1 ma+WsVeg1cp42/OyL8OJi01tu5szxaPQvlT0DL84XY3nyGaXcOCAJtLRqggM9kaYm8Rq UYDGy7QYIxXxeF/NydugsApHcKsFuXyNFA8O6TY+bovzygGWKmzZjmL54B/r2eX+/r3r bZoMFj+Wy2UeNnUy5nop/KXWiCpzhJwFtTyu9alknNZpqZGwATfzBFZ86sVO4lS6tBlt doaA== 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:dkim-signature; bh=V6UiYMHUcx5TF7n24nYkSm/8/ySg85wDtoqkAeaY5B0=; b=MSHq0cgvgNzVUS60t2gbGs2BBf7gnVF6GfyYxpZfHSUySbAh9PmYNi4LAi1v+MVdQu cBHpodGV0EFOd3GFtxAQvphn6LgKegu/7B7ZNOWHa7Q48xOPyloDbBX4LYaJQyINlw81 c4Icxs3znGXEFRPXkL9NM55ZEFBMytHbleCiLkEupXmYw/WqbKuq+JMTubaqxf90kybR dermaxukvPYMDashfUlGbk3a2aizPBrvRdYBge1KRlrY57Z+m6LCQsvCm8piH7pHvpli hOb6NZwqjJ2AKNp2r8AO7DPoeuc4ius+TbW625owRFn3lr5mgNBFDEA/dECjtJ8VCg9Y xUSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=E0k1SVPE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q22si2297025jae.93.2021.09.16.05.37.52; Thu, 16 Sep 2021 05:38:04 -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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=E0k1SVPE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239570AbhIPMhO (ORCPT + 99 others); Thu, 16 Sep 2021 08:37:14 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:44024 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230299AbhIPMhN (ORCPT ); Thu, 16 Sep 2021 08:37:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=V6UiYMHUcx5TF7n24nYkSm/8/ySg85wDtoqkAeaY5B0=; b=E0k1SVPE/SRI7xHGQptd3ceuNZ rxG+qoikEDd0dYbi/Cf8ht8yF2RT8mky4ZZg6iHhNCuWQLZTVLwFMWNDtHwrwnRemT5PmOyk32UOg Ht+AU4rQjzqki9vXM2E/SmDIBdehqOATkI8jbMNrr9ikOtCMzZjQnE3N5BBZnVzH1ePI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mQqc9-006u8h-KC; Thu, 16 Sep 2021 14:35:41 +0200 Date: Thu, 16 Sep 2021 14:35:41 +0200 From: Andrew Lunn To: Stefan Wahren Cc: "David S. Miller" , Jakub Kicinski , Rob Herring , 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 > >> + 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". 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. Andrew