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:   Fri, 2 Sep 2022 20:18:32 +0000
From:   <Jerry.Ray@...rochip.com>
To:     <andrew@...n.ch>
CC:     <vivien.didelot@...il.com>, <f.fainelli@...il.com>,
        <olteanv@...il.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
        <kuba@...nel.org>, <pabeni@...hat.com>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/2] net: dsa: LAN9303: Add basic support for LAN9354

>> -     if ((reg >> 16) != LAN9303_CHIP_ID) {
>> -             dev_err(chip->dev, "expecting LAN9303 chip, but found: %X\n",
>> +     if (((reg >> 16) != LAN9303_CHIP_ID) &&
>> +         ((reg >> 16) != LAN9354_CHIP_ID)) {
>> +             dev_err(chip->dev, "unexpected device found: 
>> + LAN%4.4X\n",
>>                       reg >> 16);
>>               return -ENODEV;
>>       }
>> @@ -884,7 +889,7 @@ static int lan9303_check_device(struct lan9303 *chip)
>>       if (ret)
>>               dev_warn(chip->dev, "failed to disable switching %d\n", 
>> ret);
>>
>> -     dev_info(chip->dev, "Found LAN9303 rev. %u\n", reg & 0xffff);
>> +     dev_info(chip->dev, "Found LAN%4.4X rev. %u\n", (reg >> 16), reg 
>> + & 0xffff);
>>
>>       ret = lan9303_detect_phy_setup(chip);
>>       if (ret) {
>> diff --git a/drivers/net/dsa/lan9303_mdio.c 
>> b/drivers/net/dsa/lan9303_mdio.c index bbb7032409ba..d12c55fdc811 
>> 100644
>> --- a/drivers/net/dsa/lan9303_mdio.c
>> +++ b/drivers/net/dsa/lan9303_mdio.c
>> @@ -158,6 +158,7 @@ static void lan9303_mdio_shutdown(struct 
>> mdio_device *mdiodev)
>>
>>  static const struct of_device_id lan9303_mdio_of_match[] = {
>>       { .compatible = "smsc,lan9303-mdio" },
>> +     { .compatible = "microchip,lan9354-mdio" },
>
>Please validate that what you find on the board actually is what the compatible says it should be. If you don't validate it, there will be some DT blobs that have the wrong value, but probe fine. But then you cannot actually make use of the compatible string in the driver to do something different between the 9303 and the 9354 because some boards have the wrong compatible....
>
>     Andrew
>

At this time, the driver is meant to support both devices equally.  In the future, I will be adding content that only applies to the LAN9354.  That is when I'm planning to add .data to the .compatible entries.

Jerry.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ