Thread (13 messages) flat view 13 messages, 5 authors, 2021-09-21

Re: [PATCH RFC 3/3] net: vertexcom: Add MSE102x SPI support

From: Stefan Wahren <hidden>
Date: 2021-09-16 11:13:02
Also in: lkml, netdev

Hi Andrew,

thanks for your review.

Am 15.09.21 um 23:17 schrieb Andrew Lunn:
quoted
+static void mse102x_init_mac(struct mse102x_net *mse, struct device_node *np)
+{
+	struct net_device *ndev = mse->ndev;
+	int ret = of_get_mac_address(np, ndev->dev_addr);
+
+	if (ret) {
+		eth_hw_addr_random(ndev);
+		netdev_err(ndev, "Using random MAC address: %pM\n",
+			   ndev->dev_addr);
+	}
+}
No need to tell the hardware? Does it work in promiscuous mode by
default?
Yes and yes
quoted
+	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?
quoted
+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.

@Jimmy Please correct me, if i'm wrong.

Best regards
	Andrew
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help