lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 21 Sep 2021 16:07:39 -0500
From:   Rob Herring <robh@...nel.org>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Stefan Wahren <stefan.wahren@...e.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Michael Heimpold <michael.heimpold@...tech.com>,
        jimmy.shen@...texcom.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH RFC 3/3] net: vertexcom: Add MSE102x SPI support

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ