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>] [day] [month] [year] [list]
Date:   Tue, 28 Dec 2021 16:34:16 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Joseph CHAMG <josright123@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        "joseph_chang@...icom.com.tw" <joseph_chang@...icom.com.tw>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Leon Romanovsky <leon@...nel.org>
Subject: Re: [PATCH v9, 2/2] net: Add dm9051 driver

>     +static int dm9051_mdio_read(struct mii_bus *mdiobus, int phy_id, int reg)
>     +{
>     +       struct board_info *db = mdiobus->priv;
>     +       int val, ret;
>     +
>     +       if (phy_id == DM9051_PHY_ID) {
>     +               mutex_lock(&db->addr_lock);
>     +               ret = dm9051_phy_read(db, reg, &val);
>     +               mutex_unlock(&db->addr_lock);
>     +               if (ret)
>     +                       return ret;
>     +               return val;
>     +       }
>     +
>     +       return 0xffff;
> 
> 
> 
> Hmm.. can we rather use regmap APIs for SPI and MDIO?

Hi Andy

regmap via MDIO is very new, but yes it exists. This driver just needs
SPI which has had regmap support for a long time.

However, i suspect the submitter is trying hard to keep the driver in
a shape they can reuse the core with other OSes. At least that is my
feeling give the way requests for changes are handled. Maybe forcing
the use of regmap is actually a good idea, to break them away from
that bad idea.

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ