Merge branch 'mvneta-phylink'
Russell King says: ==================== Convert mvneta to phylink This series converts mvneta to use phylink, which is necessary to support the SFP cages on SolidRun's Clearfog platform. This series just converts mvneta without adding the DT parts - having discussed with Andrew, we believe we're too close to the merge window to submit that patch. I've split the "net: mvneta: convert to phylink" patch up to make it easier to review, and in doing so, spotted some minor corner cases that needed to be fixed along the way. This series depends on the previously merged phylink patches in netdev, along with the recently reviewed 7 patch series "Resolve races in phy accessors" without which, the race described in patch 5 of that series is very evident when triggering a dummy hibernate cycle. This series also illustrates how to convert mvpp2 to phylink. mvneta is the only user of the fixed_phy_update_state() API, and this becomes redundant with the conversion. It would be good to get this series not only reviewed, but also independently tested to ensure that I haven't missed anything - I only have the Clearfog platform to test on, and that doesn't support all the different interface modes that mvneta supports. A particularly interesting side effect of this series is that DSA switches no longer need the "CPU" port and DSA facing MAC ethernet instance to be marked as a fixed link anymore with mvneta - we can use 1000BaseX mode, and the DSA to CPU link will use the 802.3z negotiation to determine the link properties without needing the link parameters to be explicitly stated in DT - that is a subject of a future patch. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
1d641bd381
|
@ -60,7 +60,7 @@ config MVNETA
|
|||
depends on ARCH_MVEBU || COMPILE_TEST
|
||||
depends on HAS_DMA
|
||||
select MVMDIO
|
||||
select FIXED_PHY
|
||||
select PHYLINK
|
||||
---help---
|
||||
This driver supports the network interface units in the
|
||||
Marvell ARMADA XP, ARMADA 370, ARMADA 38x and
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -115,37 +115,6 @@ int fixed_phy_set_link_update(struct phy_device *phydev,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(fixed_phy_set_link_update);
|
||||
|
||||
int fixed_phy_update_state(struct phy_device *phydev,
|
||||
const struct fixed_phy_status *status,
|
||||
const struct fixed_phy_status *changed)
|
||||
{
|
||||
struct fixed_mdio_bus *fmb = &platform_fmb;
|
||||
struct fixed_phy *fp;
|
||||
|
||||
if (!phydev || phydev->mdio.bus != fmb->mii_bus)
|
||||
return -EINVAL;
|
||||
|
||||
list_for_each_entry(fp, &fmb->phys, node) {
|
||||
if (fp->addr == phydev->mdio.addr) {
|
||||
write_seqcount_begin(&fp->seqcount);
|
||||
#define _UPD(x) if (changed->x) \
|
||||
fp->status.x = status->x
|
||||
_UPD(link);
|
||||
_UPD(speed);
|
||||
_UPD(duplex);
|
||||
_UPD(pause);
|
||||
_UPD(asym_pause);
|
||||
#undef _UPD
|
||||
fixed_phy_update(fp);
|
||||
write_seqcount_end(&fp->seqcount);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return -ENOENT;
|
||||
}
|
||||
EXPORT_SYMBOL(fixed_phy_update_state);
|
||||
|
||||
int fixed_phy_add(unsigned int irq, int phy_addr,
|
||||
struct fixed_phy_status *status,
|
||||
int link_gpio)
|
||||
|
|
|
@ -24,9 +24,6 @@ extern void fixed_phy_unregister(struct phy_device *phydev);
|
|||
extern int fixed_phy_set_link_update(struct phy_device *phydev,
|
||||
int (*link_update)(struct net_device *,
|
||||
struct fixed_phy_status *));
|
||||
extern int fixed_phy_update_state(struct phy_device *phydev,
|
||||
const struct fixed_phy_status *status,
|
||||
const struct fixed_phy_status *changed);
|
||||
#else
|
||||
static inline int fixed_phy_add(unsigned int irq, int phy_id,
|
||||
struct fixed_phy_status *status,
|
||||
|
@ -50,12 +47,6 @@ static inline int fixed_phy_set_link_update(struct phy_device *phydev,
|
|||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
static inline int fixed_phy_update_state(struct phy_device *phydev,
|
||||
const struct fixed_phy_status *status,
|
||||
const struct fixed_phy_status *changed)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif /* CONFIG_FIXED_PHY */
|
||||
|
||||
#endif /* __PHY_FIXED_H */
|
||||
|
|
Loading…
Reference in New Issue