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]
Message-ID: <75F51B6F-A477-4A2B-B40F-1CC894546CF2@hpe.com>
Date:   Wed, 16 Aug 2023 00:55:56 +0000
From:   "Hawkins, Nick" <nick.hawkins@....com>
To:     Andrew Lunn <andrew@...n.ch>
CC:     "christophe.jaillet@...adoo.fr" <christophe.jaillet@...adoo.fr>,
        "simon.horman@...igine.com" <simon.horman@...igine.com>,
        "Verdun, Jean-Marie" <verdun@....com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>,
        "conor+dt@...nel.org" <conor+dt@...nel.org>,
        "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>
Subject: Re: [PATCH v2 2/5] net: hpe: Add GXP UMAC MDIO

Greetings Andrew,

I have a follow up question below:

>> +static int umac_mdio_read(struct mii_bus *bus, int phy_id, int reg)
>> +{
>> + struct umac_mdio_priv *umac_mdio = bus->priv;
>> + unsigned int status;
>> + unsigned int value;
>> + int ret;
>> +
>> + status = __raw_readl(umac_mdio->base + UMAC_MII);
>> +
>> + status &= ~(UMAC_MII_PHY_ADDR_MASK | UMAC_MII_REG_ADDR_MASK);
>> + status |= ((phy_id << UMAC_MII_PHY_ADDR_SHIFT) &
>> + UMAC_MII_PHY_ADDR_MASK);
>> + status |= (reg & UMAC_MII_REG_ADDR_MASK);
>> + status |= UMAC_MII_MRNW; /* set bit for read mode */
>> + __raw_writel(status, umac_mdio->base + UMAC_MII);
>> +
>> + status |= UMAC_MII_MOWNER; /* set bit to activate mii transfer */
>> + __raw_writel(status, umac_mdio->base + UMAC_MII);


> I assume UMAC_MII_MOWNER must be set in a separate operation? But
> using __raw_writel() i'm not sure there is any barrier between the two
> writes.

Is there a function you would recommend using instead?

Thank you for the assistance,

-Nick Hawkins



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ