From: Andrew Lunn <andrew@lunn.ch>
To: Stefan Wahren <stefan.wahren@i2se.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Michael Heimpold <michael.heimpold@in-tech.com>,
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
Date: Thu, 16 Sep 2021 14:35:41 +0200 [thread overview]
Message-ID: <YUM6HfDYX0Twe67+@lunn.ch> (raw)
In-Reply-To: <bfbbf816-f467-7e2e-12ca-fb2172ce93f9@i2se.com>
> >> + 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
next prev parent reply other threads:[~2021-09-16 12:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-14 15:17 [PATCH RFC 0/3] add Vertexcom MSE102x support Stefan Wahren
2021-09-14 15:17 ` [PATCH RFC 1/3] dt-bindings: add vendor Vertexcom Stefan Wahren
2021-09-21 20:55 ` Rob Herring
2021-09-14 15:17 ` [PATCH RFC 2/3] dt-bindings: net: add Vertexcom MSE102x support Stefan Wahren
2021-09-21 21:09 ` Rob Herring
2021-09-14 15:17 ` [PATCH RFC 3/3] net: vertexcom: Add MSE102x SPI support Stefan Wahren
2021-09-15 2:55 ` Jakub Kicinski
2021-09-15 21:17 ` Andrew Lunn
2021-09-16 11:12 ` Stefan Wahren
2021-09-16 12:35 ` Andrew Lunn [this message]
2021-09-21 21:07 ` Rob Herring
2021-09-16 11:26 ` Michael Heimpold
2021-09-16 12:46 ` Andrew Lunn
2021-09-16 4:57 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YUM6HfDYX0Twe67+@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=jimmy.shen@vertexcom.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.heimpold@in-tech.com \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=stefan.wahren@i2se.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.