From: Florian Fainelli <f.fainelli@gmail.com>
To: Steve Douthit <stephend@silicom-usa.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>,
"intel-wired-lan@lists.osuosl.org"
<intel-wired-lan@lists.osuosl.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH net-next v3 1/2] ixgbe: register a mdiobus
Date: Mon, 3 Dec 2018 11:07:13 -0800 [thread overview]
Message-ID: <b5de925d-bfef-0dff-61c7-63bd16113b1d@gmail.com> (raw)
In-Reply-To: <20181203185454.6357-2-stephend@silicom-usa.com>
On 12/3/18 10:55 AM, Steve Douthit wrote:
> Most dsa devices expect a 'struct mii_bus' pointer to talk to switches
> via the MII interface.
>
> While this works for dsa devices, it will not work safely with Linux
> PHYs in all configurations since the firmware of the ixgbe device may
> be polling some PHY addresses in the background.
>
> Signed-off-by: Stephen Douthit <stephend@silicom-usa.com>
> ---
[snip]
> +/**
> + * ixgbe_mii_bus_write - Write a clause 22/45 register
> + * @hw: pointer to hardware structure
> + * @addr: address
> + * @regnum: register number
> + * @regnum: valueto write
This should be @val to match the function parameters
> + **/
> +static s32 ixgbe_mii_bus_write(struct mii_bus *bus, int addr, int regnum,
> + u16 val)
> +{
> + struct ixgbe_adapter *adapter = (struct ixgbe_adapter *)bus->priv;
Nitpick: cast is not necessary since this is a void * pointer (for that
reason).
> + struct ixgbe_hw *hw = &adapter->hw;
> + u32 gssr = hw->phy.phy_semaphore_mask;
> +
> + return ixgbe_mii_bus_write_generic(hw, addr, regnum, val, gssr);
> +}
> +
> +/**
> + * ixgbe_x550em_a_mii_bus_read - Read a clause 22/45 register on x550em_a
> + * @hw: pointer to hardware structure
> + * @addr: address
> + * @regnum: register number
> + **/
> +static s32 ixgbe_x550em_a_mii_bus_read(struct mii_bus *bus, int addr,
> + int regnum)
> +{
> + struct ixgbe_adapter *adapter = (struct ixgbe_adapter *)bus->priv;
Likewise, the cast is not necessary.
Everything else looked fine, so with that fixed:
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
next prev parent reply other threads:[~2018-12-03 19:07 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 16:32 [PATCH net-next v2 0/2] Add mii_bus to ixgbe driver for dsa devs Steve Douthit
2018-12-03 16:32 ` [PATCH net-next v2 1/2] ixgbe: register a mdiobus Steve Douthit
2018-12-03 16:54 ` Andrew Lunn
2018-12-03 17:02 ` Steve Douthit
2018-12-03 17:21 ` Andrew Lunn
2018-12-03 17:59 ` Steve Douthit
2018-12-03 18:18 ` Andrew Lunn
2018-12-03 18:38 ` Steve Douthit
2018-12-03 18:54 ` Andrew Lunn
2018-12-03 16:33 ` [PATCH net-next v2 2/2] ixgbe: use mii_bus to handle MII related ioctls Steve Douthit
2018-12-03 18:55 ` [PATCH net-next v3 0/2] Add mii_bus to ixgbe driver for dsa devs Steve Douthit
2018-12-03 18:55 ` [PATCH net-next v3 1/2] ixgbe: register a mdiobus Steve Douthit
2018-12-03 19:00 ` Andrew Lunn
2018-12-03 19:07 ` Florian Fainelli [this message]
2018-12-03 19:44 ` Steve Douthit
2018-12-03 19:45 ` Florian Fainelli
2018-12-03 18:55 ` [PATCH net-next v3 2/2] ixgbe: use mii_bus to handle MII related ioctls Steve Douthit
2018-12-03 19:01 ` Andrew Lunn
2018-12-03 19:07 ` Florian Fainelli
2018-12-03 20:14 ` [PATCH net-next v4 0/2] Add mii_bus to ixgbe driver for dsa devs Steve Douthit
2018-12-03 20:15 ` [PATCH net-next v4 1/2] ixgbe: register a mdiobus Steve Douthit
2018-12-04 16:58 ` Bowers, AndrewX
2018-12-03 20:15 ` [PATCH net-next v4 2/2] ixgbe: use mii_bus to handle MII related ioctls Steve Douthit
2018-12-04 16:59 ` Bowers, AndrewX
2018-12-03 20:51 ` [PATCH net-next v4 0/2] Add mii_bus to ixgbe driver for dsa devs Florian Fainelli
2018-12-03 23:42 ` Steve Douthit
2018-12-03 23:46 ` Florian Fainelli
2018-12-04 10:40 ` Andrew Lunn
2018-12-04 16:02 ` Steve Douthit
2018-12-06 15:50 ` [PATCH net-next v5 " Steve Douthit
2018-12-06 15:50 ` [PATCH net-next v5 1/2] ixgbe: register a mdiobus Steve Douthit
2018-12-06 15:50 ` [PATCH net-next v5 2/2] ixgbe: use mii_bus to handle MII related ioctls Steve Douthit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b5de925d-bfef-0dff-61c7-63bd16113b1d@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
--cc=stephend@silicom-usa.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).