From: Maxim Zhukov <mussitantesmortem@gmail.com>
To: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
Maxim Zhukov <mussitantesmortem@gmail.com>
Subject: [PATCH 1/2] staging, mt7621-eth: fix api for linkmode bitmap
Date: Sat, 9 Mar 2019 12:53:59 +0300 [thread overview]
Message-ID: <20190309095400.26930-2-mussitantesmortem@gmail.com> (raw)
In-Reply-To: <20190309095400.26930-1-mussitantesmortem@gmail.com>
Start using new api for linkmode bitmap
Fixed build after 3c1bcc8614db ("net: ethernet: Convert phydev advertize and supported from u32 to link mode")
Signed-off-by: Maxim Zhukov <mussitantesmortem@gmail.com>
---
drivers/staging/mt7621-eth/mdio.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/mt7621-eth/mdio.c b/drivers/staging/mt7621-eth/mdio.c
index 5fea6a447eed..142d7a082dd3 100644
--- a/drivers/staging/mt7621-eth/mdio.c
+++ b/drivers/staging/mt7621-eth/mdio.c
@@ -89,8 +89,12 @@ int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac,
return -ENODEV;
}
- phydev->supported &= PHY_1000BT_FEATURES;
- phydev->advertising = phydev->supported;
+ linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT,
+ phydev->supported);
+ linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
+ phydev->supported);
+
+ linkmode_copy(phydev->advertising, phydev->supported);
dev_info(eth->dev,
"connected port %d to PHY at %s [uid=%08x, driver=%s]\n",
@@ -113,7 +117,9 @@ static void phy_init(struct mtk_eth *eth, struct mtk_mac *mac,
phy->speed = 0;
phy->duplex = 0;
phy_set_max_speed(phy, SPEED_100);
- phy->advertising = phy->supported | ADVERTISED_Autoneg;
+ linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
+ phy->advertising);
+
phy_start_aneg(phy);
}
--
2.21.0
next prev parent reply other threads:[~2019-03-09 10:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-09 9:53 [PATCH 0/2] staging, mt7621: fix build Maxim Zhukov
2019-03-09 9:53 ` Maxim Zhukov [this message]
2019-03-18 6:58 ` [PATCH 1/2] staging, mt7621-eth: fix api for linkmode bitmap Greg Kroah-Hartman
2019-03-09 9:54 ` [PATCH 2/2] staging, mt7621-pci: fix build without pci support Maxim Zhukov
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=20190309095400.26930-2-mussitantesmortem@gmail.com \
--to=mussitantesmortem@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.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