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

From: Stefan Wahren
Date: Thu Sep 16 2021 - 07:13:03 EST


Hi Andrew,

thanks for your review.

Am 15.09.21 um 23:17 schrieb Andrew Lunn:
>> +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
>
>> + 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?
>
>> +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