Refresh backport patches with make target/linux/refresh.
Signed-off-by: Weijie Gao <hackpascal@gmail.com>
static umode_t aqr_hwmon_is_visible(const void *data,
--- a/drivers/net/phy/aquantia/aquantia_main.c
+++ b/drivers/net/phy/aquantia/aquantia_main.c
-@@ -89,61 +89,6 @@
+@@ -91,61 +91,6 @@
#define MDIO_C22EXT_STAT_SGMII_TX_FRAME_ALIGN_ERR 0xd31a
#define MDIO_C22EXT_STAT_SGMII_TX_RUNT_FRAMES 0xd31b
+}
--- a/drivers/net/phy/aquantia/aquantia_main.c
+++ b/drivers/net/phy/aquantia/aquantia_main.c
-@@ -656,11 +656,17 @@ static int aqr107_resume(struct phy_devi
+@@ -658,11 +658,17 @@ static int aqr107_resume(struct phy_devi
static int aqr107_probe(struct phy_device *phydev)
{
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
-@@ -330,7 +330,7 @@ struct mdio_bus_stats {
+@@ -338,7 +338,7 @@ struct mdio_bus_stats {
* phy_package_leave().
*/
struct phy_package_shared {
phy_unlock_mdio_bus(phydev);
--- a/drivers/net/phy/mscc/mscc.h
+++ b/drivers/net/phy/mscc/mscc.h
-@@ -414,6 +414,11 @@ struct vsc8531_private {
+@@ -416,6 +416,11 @@ struct vsc8531_private {
* gpio_lock: used for PHC operations. Common for all PHYs as the load/save GPIO
* is shared.
*/
};
--- a/drivers/net/phy/mscc/mscc_main.c
+++ b/drivers/net/phy/mscc/mscc_main.c
-@@ -700,7 +700,7 @@ int phy_base_write(struct phy_device *ph
+@@ -711,7 +711,7 @@ int phy_base_write(struct phy_device *ph
dump_stack();
}
}
/* phydev->bus->mdio_lock should be locked when using this function */
-@@ -711,7 +711,7 @@ int phy_base_read(struct phy_device *phy
+@@ -722,7 +722,7 @@ int phy_base_read(struct phy_device *phy
dump_stack();
}
u32 vsc85xx_csr_read(struct phy_device *phydev,
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -1602,20 +1602,22 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1
+@@ -1650,20 +1650,22 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1
/**
* phy_package_join - join a common PHY group
* @phydev: target phy_device struct
*
* This will set the shared pointer of the phydev to the shared storage.
* If this is the first call for a this cookie the shared storage will be
-@@ -1625,17 +1627,17 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1
+@@ -1673,17 +1675,17 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1
* Returns < 1 on error, 0 on success. Esp. calling phy_package_join()
* with the same cookie but a different priv_size is an error.
*/
if (!shared) {
ret = -ENOMEM;
shared = kzalloc(sizeof(*shared), GFP_KERNEL);
-@@ -1647,9 +1649,9 @@ int phy_package_join(struct phy_device *
+@@ -1695,9 +1697,9 @@ int phy_package_join(struct phy_device *
goto err_free;
shared->priv_size = priv_size;
}
} else {
ret = -EINVAL;
if (priv_size && priv_size != shared->priv_size)
-@@ -1687,7 +1689,7 @@ void phy_package_leave(struct phy_device
+@@ -1735,7 +1737,7 @@ void phy_package_leave(struct phy_device
return;
if (refcount_dec_and_mutex_lock(&shared->refcnt, &bus->shared_lock)) {
mutex_unlock(&bus->shared_lock);
kfree(shared->priv);
kfree(shared);
-@@ -1706,7 +1708,8 @@ static void devm_phy_package_leave(struc
+@@ -1754,7 +1756,8 @@ static void devm_phy_package_leave(struc
* devm_phy_package_join - resource managed phy_package_join()
* @dev: device that is registering this PHY package
* @phydev: target phy_device struct
* @priv_size: if non-zero allocate this amount of bytes for private data
*
* Managed phy_package_join(). Shared storage fetched by this function,
-@@ -1714,7 +1717,7 @@ static void devm_phy_package_leave(struc
+@@ -1762,7 +1765,7 @@ static void devm_phy_package_leave(struc
* phy_package_join() for more information.
*/
int devm_phy_package_join(struct device *dev, struct phy_device *phydev,
{
struct phy_device **ptr;
int ret;
-@@ -1724,7 +1727,7 @@ int devm_phy_package_join(struct device
+@@ -1772,7 +1775,7 @@ int devm_phy_package_join(struct device
if (!ptr)
return -ENOMEM;
*ptr = phydev;
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
-@@ -319,7 +319,8 @@ struct mdio_bus_stats {
+@@ -327,7 +327,8 @@ struct mdio_bus_stats {
/**
* struct phy_package_shared - Shared information in PHY packages
* @refcnt: Number of PHYs connected to this shared data
* @flags: Initialization of PHY package
* @priv_size: Size of the shared private data @priv
-@@ -330,7 +331,7 @@ struct mdio_bus_stats {
+@@ -338,7 +339,7 @@ struct mdio_bus_stats {
* phy_package_leave().
*/
struct phy_package_shared {
--- a/drivers/net/phy/phy-core.c
+++ b/drivers/net/phy/phy-core.c
-@@ -528,6 +528,28 @@ static void mmd_phy_indirect(struct mii_
+@@ -540,6 +540,28 @@ static void mmd_phy_indirect(struct mii_
devad | MII_MMD_CTRL_NOINCR);
}
/**
* __phy_read_mmd - Convenience function for reading a register
* from an MMD on a given PHY.
-@@ -539,26 +561,14 @@ static void mmd_phy_indirect(struct mii_
+@@ -551,26 +573,14 @@ static void mmd_phy_indirect(struct mii_
*/
int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum)
{
}
EXPORT_SYMBOL(__phy_read_mmd);
-@@ -595,28 +605,14 @@ EXPORT_SYMBOL(phy_read_mmd);
+@@ -607,28 +617,14 @@ EXPORT_SYMBOL(phy_read_mmd);
*/
int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val)
{
--- a/drivers/net/phy/phy-core.c
+++ b/drivers/net/phy/phy-core.c
-@@ -639,6 +639,146 @@ int phy_write_mmd(struct phy_device *phy
+@@ -651,6 +651,146 @@ int phy_write_mmd(struct phy_device *phy
EXPORT_SYMBOL(phy_write_mmd);
/**
* @regnum: register number to modify
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
-@@ -1840,6 +1840,22 @@ static inline int __phy_package_write(st
+@@ -2057,6 +2057,22 @@ static inline int __phy_package_write(st
return __mdiobus_write(phydev->mdio.bus, addr, regnum, val);
}
}
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
-@@ -448,19 +448,34 @@ EXPORT_SYMBOL(of_mdio_find_bus);
+@@ -455,19 +455,34 @@ EXPORT_SYMBOL(of_mdio_find_bus);
* found, set the of_node pointer for the mdio device. This allows
* auto-probed phy devices to be supplied with information passed in
* via DT.
addr = of_mdio_parse_addr(dev, child);
if (addr < 0)
continue;
-@@ -470,9 +485,22 @@ static void of_mdiobus_link_mdiodev(stru
+@@ -477,9 +492,22 @@ static void of_mdiobus_link_mdiodev(stru
/* The refcount on "child" is passed to the mdio
* device. Do _not_ use of_node_put(child) here.
*/
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -1648,6 +1648,7 @@ int phy_package_join(struct phy_device *
+@@ -1698,6 +1698,7 @@ int phy_package_join(struct phy_device *
shared->priv_size = priv_size;
}
shared->base_addr = base_addr;
refcount_set(&shared->refcnt, 1);
bus->shared[base_addr] = shared;
} else {
-@@ -1671,6 +1672,63 @@ err_unlock:
+@@ -1721,6 +1722,63 @@ err_unlock:
EXPORT_SYMBOL_GPL(phy_package_join);
/**
* phy_package_leave - leave a common PHY group
* @phydev: target phy_device struct
*
-@@ -1686,6 +1744,10 @@ void phy_package_leave(struct phy_device
+@@ -1736,6 +1794,10 @@ void phy_package_leave(struct phy_device
if (!shared)
return;
if (refcount_dec_and_mutex_lock(&shared->refcnt, &bus->shared_lock)) {
bus->shared[shared->base_addr] = NULL;
mutex_unlock(&bus->shared_lock);
-@@ -1739,6 +1801,40 @@ int devm_phy_package_join(struct device
+@@ -1789,6 +1851,40 @@ int devm_phy_package_join(struct device
EXPORT_SYMBOL_GPL(devm_phy_package_join);
/**
*
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
-@@ -321,6 +321,7 @@ struct mdio_bus_stats {
+@@ -329,6 +329,7 @@ struct mdio_bus_stats {
* struct phy_package_shared - Shared information in PHY packages
* @base_addr: Base PHY address of PHY package used to combine PHYs
* in one package and for offset calculation of phy_package_read/write
* @refcnt: Number of PHYs connected to this shared data
* @flags: Initialization of PHY package
* @priv_size: Size of the shared private data @priv
-@@ -332,6 +333,8 @@ struct mdio_bus_stats {
+@@ -340,6 +341,8 @@ struct mdio_bus_stats {
*/
struct phy_package_shared {
u8 base_addr;
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
-@@ -609,10 +609,11 @@ static int bcm54616s_config_aneg(struct
+@@ -665,10 +665,11 @@ static int bcm54616s_config_aneg(struct
static int bcm54616s_read_status(struct phy_device *phydev)
{
struct bcm54616s_phy_priv *priv = phydev->priv;
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -2549,12 +2549,15 @@ EXPORT_SYMBOL(genphy_read_status);
+@@ -2607,12 +2607,15 @@ EXPORT_SYMBOL(genphy_read_status);
/**
* genphy_c37_read_status - check the link status and update current link state
* @phydev: target phy_device struct
{
int lpa, err, old_link = phydev->link;
-@@ -2564,9 +2567,13 @@ int genphy_c37_read_status(struct phy_de
+@@ -2622,9 +2625,13 @@ int genphy_c37_read_status(struct phy_de
return err;
/* why bother the PHY if nothing can have changed */
}
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
-@@ -1688,7 +1688,7 @@ int genphy_write_mmd_unsupported(struct
+@@ -1849,7 +1849,7 @@ int genphy_write_mmd_unsupported(struct
/* Clause 37 */
int genphy_c37_config_aneg(struct phy_device *phydev);
};
static int ipq4019_mdio_wait_busy(struct mii_bus *bus)
-@@ -179,6 +191,38 @@ static int ipq4019_mdio_write(struct mii
+@@ -203,6 +215,38 @@ static int ipq4019_mdio_write_c22(struct
return 0;
}
static int ipq_mdio_reset(struct mii_bus *bus)
{
struct ipq4019_mdio_data *priv = bus->priv;
-@@ -201,10 +245,58 @@ static int ipq_mdio_reset(struct mii_bus
+@@ -225,10 +269,58 @@ static int ipq_mdio_reset(struct mii_bus
return ret;
ret = clk_prepare_enable(priv->mdio_clk);
}
static int ipq4019_mdio_probe(struct platform_device *pdev)
-@@ -228,6 +320,11 @@ static int ipq4019_mdio_probe(struct pla
+@@ -252,6 +344,11 @@ static int ipq4019_mdio_probe(struct pla
if (IS_ERR(priv->mdio_clk))
return PTR_ERR(priv->mdio_clk);
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
-@@ -476,42 +476,43 @@ int mtk_foe_entry_set_queue(struct mtk_e
+@@ -477,42 +477,43 @@ int mtk_foe_entry_set_queue(struct mtk_e
return 0;
}
struct mtk_foe_entry *hwe = mtk_foe_get_entry(ppe, entry->hash);
hwe->ib1 &= ~MTK_FOE_IB1_STATE;
-@@ -531,7 +532,8 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
+@@ -533,7 +534,8 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
if (entry->type != MTK_FLOW_TYPE_L2_SUBFLOW)
return;
kfree(entry);
}
-@@ -547,66 +549,55 @@ static int __mtk_foe_entry_idle_time(str
+@@ -549,66 +551,55 @@ static int __mtk_foe_entry_idle_time(str
return now - timestamp;
}
}
static void
-@@ -649,7 +640,8 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
+@@ -651,7 +642,8 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry)
{
spin_lock_bh(&ppe_lock);
spin_unlock_bh(&ppe_lock);
}
-@@ -696,8 +688,8 @@ mtk_foe_entry_commit_subflow(struct mtk_
+@@ -698,8 +690,8 @@ mtk_foe_entry_commit_subflow(struct mtk_
{
const struct mtk_soc_data *soc = ppe->eth->soc;
struct mtk_flow_entry *flow_info;
u32 ib1_mask = mtk_get_ib1_pkt_type_mask(ppe->eth) | MTK_FOE_IB1_UDP;
int type;
-@@ -705,30 +697,30 @@ mtk_foe_entry_commit_subflow(struct mtk_
+@@ -707,30 +699,30 @@ mtk_foe_entry_commit_subflow(struct mtk_
if (!flow_info)
return;
}
void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash)
-@@ -738,9 +730,11 @@ void __mtk_ppe_check_skb(struct mtk_ppe
+@@ -740,9 +732,11 @@ void __mtk_ppe_check_skb(struct mtk_ppe
struct mtk_foe_entry *hwe = mtk_foe_get_entry(ppe, hash);
struct mtk_flow_entry *entry;
struct mtk_foe_bridge key = {};
u8 *tag;
spin_lock_bh(&ppe_lock);
-@@ -748,20 +742,14 @@ void __mtk_ppe_check_skb(struct mtk_ppe
+@@ -750,20 +744,14 @@ void __mtk_ppe_check_skb(struct mtk_ppe
if (FIELD_GET(MTK_FOE_IB1_STATE, hwe->ib1) == MTK_FOE_STATE_BIND)
goto out;
continue;
}
-@@ -810,9 +798,17 @@ out:
+@@ -814,9 +802,17 @@ out:
int mtk_foe_entry_idle_time(struct mtk_ppe *ppe, struct mtk_flow_entry *entry)
{
}
static void mtk_ppe_cache_clear(struct mtk_ppe *ppe)
-@@ -522,14 +536,6 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
+@@ -520,14 +534,6 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
hwe->ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_INVALID);
dma_wmb();
mtk_ppe_cache_clear(ppe);
}
entry->hash = 0xffff;
-@@ -554,11 +560,14 @@ static int __mtk_foe_entry_idle_time(str
+@@ -552,11 +558,14 @@ static int __mtk_foe_entry_idle_time(str
}
static bool
int len;
if (hash == 0xffff)
-@@ -569,18 +578,35 @@ mtk_flow_entry_update(struct mtk_ppe *pp
+@@ -567,18 +576,35 @@ mtk_flow_entry_update(struct mtk_ppe *pp
memcpy(&foe, hwe, len);
if (!mtk_flow_entry_match(ppe->eth, entry, &foe, len) ||
struct mtk_flow_entry *cur;
struct hlist_node *tmp;
int idle;
-@@ -589,7 +615,9 @@ mtk_flow_entry_update_l2(struct mtk_ppe
+@@ -587,7 +613,9 @@ mtk_flow_entry_update_l2(struct mtk_ppe
hlist_for_each_entry_safe(cur, tmp, &entry->l2_flows, l2_list) {
int cur_idle;
__mtk_foe_entry_clear(ppe, entry, false);
continue;
}
-@@ -604,10 +632,29 @@ mtk_flow_entry_update_l2(struct mtk_ppe
+@@ -602,10 +630,29 @@ mtk_flow_entry_update_l2(struct mtk_ppe
}
}
struct mtk_eth *eth = ppe->eth;
u16 timestamp = mtk_eth_timestamp(eth);
struct mtk_foe_entry *hwe;
-@@ -638,6 +685,12 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
+@@ -636,6 +683,12 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
dma_wmb();
mtk_ppe_cache_clear(ppe);
}
-@@ -802,21 +855,6 @@ void __mtk_ppe_check_skb(struct mtk_ppe
+@@ -800,21 +853,6 @@ out:
spin_unlock_bh(&ppe_lock);
}
int mtk_ppe_prepare_reset(struct mtk_ppe *ppe)
{
if (!ppe)
-@@ -844,32 +882,6 @@ int mtk_ppe_prepare_reset(struct mtk_ppe
+@@ -842,32 +880,6 @@ int mtk_ppe_prepare_reset(struct mtk_ppe
return mtk_ppe_wait_busy(ppe);
}
void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash);
-@@ -397,9 +400,8 @@ int mtk_foe_entry_set_queue(struct mtk_e
+@@ -396,9 +399,8 @@ int mtk_foe_entry_set_queue(struct mtk_e
unsigned int queue);
int mtk_foe_entry_commit(struct mtk_ppe *ppe, struct mtk_flow_entry *entry);
void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry);
seq_printf(m, "%05x %s %7s", i,
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -505,24 +505,21 @@ static int
+@@ -501,24 +501,21 @@ static int
mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f)
{
struct mtk_flow_entry *entry;
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -1712,19 +1712,20 @@ mtk_wed_irq_set_mask(struct mtk_wed_devi
+@@ -1713,19 +1713,20 @@ mtk_wed_irq_set_mask(struct mtk_wed_devi
int mtk_wed_flow_add(int index)
{
struct mtk_wed_hw *hw = hw_list[index];
goto out;
}
-@@ -1743,14 +1744,15 @@ void mtk_wed_flow_remove(int index)
+@@ -1744,14 +1745,15 @@ void mtk_wed_flow_remove(int index)
{
struct mtk_wed_hw *hw = hw_list[index];
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -277,7 +277,7 @@ mtk_wed_assign(struct mtk_wed_device *de
+@@ -278,7 +278,7 @@ mtk_wed_assign(struct mtk_wed_device *de
if (!hw->wed_dev)
goto out;
return NULL;
/* MT7986 WED devices do not have any pcie slot restrictions */
-@@ -358,7 +358,7 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
+@@ -359,7 +359,7 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
desc->buf0 = cpu_to_le32(buf_phys);
desc->buf1 = cpu_to_le32(buf_phys + txd_size);
ctrl = FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN0, txd_size) |
FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN1,
MTK_WED_BUF_SIZE - txd_size) |
-@@ -497,7 +497,7 @@ mtk_wed_set_ext_int(struct mtk_wed_devic
+@@ -498,7 +498,7 @@ mtk_wed_set_ext_int(struct mtk_wed_devic
{
u32 mask = MTK_WED_EXT_INT_STATUS_ERROR_MASK;
mask |= MTK_WED_EXT_INT_STATUS_TX_DRV_R_RESP_ERR;
else
mask |= MTK_WED_EXT_INT_STATUS_RX_FBUF_LO_TH |
-@@ -576,7 +576,7 @@ mtk_wed_dma_disable(struct mtk_wed_devic
+@@ -577,7 +577,7 @@ mtk_wed_dma_disable(struct mtk_wed_devic
MTK_WDMA_GLO_CFG_RX_INFO1_PRERES |
MTK_WDMA_GLO_CFG_RX_INFO2_PRERES);
regmap_write(dev->hw->mirror, dev->hw->index * 4, 0);
wdma_clr(dev, MTK_WDMA_GLO_CFG,
MTK_WDMA_GLO_CFG_RX_INFO3_PRERES);
-@@ -605,7 +605,7 @@ mtk_wed_stop(struct mtk_wed_device *dev)
+@@ -606,7 +606,7 @@ mtk_wed_stop(struct mtk_wed_device *dev)
wdma_w32(dev, MTK_WDMA_INT_GRP2, 0);
wed_w32(dev, MTK_WED_WPDMA_INT_MASK, 0);
return;
wed_w32(dev, MTK_WED_EXT_INT_MASK1, 0);
-@@ -624,7 +624,7 @@ mtk_wed_deinit(struct mtk_wed_device *de
+@@ -625,7 +625,7 @@ mtk_wed_deinit(struct mtk_wed_device *de
MTK_WED_CTRL_WED_TX_BM_EN |
MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
return;
wed_clr(dev, MTK_WED_CTRL,
-@@ -730,7 +730,7 @@ mtk_wed_bus_init(struct mtk_wed_device *
+@@ -731,7 +731,7 @@ mtk_wed_bus_init(struct mtk_wed_device *
static void
mtk_wed_set_wpdma(struct mtk_wed_device *dev)
{
wed_w32(dev, MTK_WED_WPDMA_CFG_BASE, dev->wlan.wpdma_phys);
} else {
mtk_wed_bus_init(dev);
-@@ -761,7 +761,7 @@ mtk_wed_hw_init_early(struct mtk_wed_dev
+@@ -762,7 +762,7 @@ mtk_wed_hw_init_early(struct mtk_wed_dev
MTK_WED_WDMA_GLO_CFG_IDLE_DMAD_SUPPLY;
wed_m32(dev, MTK_WED_WDMA_GLO_CFG, mask, set);
u32 offset = dev->hw->index ? 0x04000400 : 0;
wdma_set(dev, MTK_WDMA_GLO_CFG,
-@@ -934,7 +934,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -935,7 +935,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d
wed_w32(dev, MTK_WED_TX_BM_BUF_LEN, MTK_WED_PKT_SIZE);
wed_w32(dev, MTK_WED_TX_BM_TKID,
FIELD_PREP(MTK_WED_TX_BM_TKID_START,
dev->wlan.token_start) |
-@@ -967,7 +967,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -968,7 +968,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d
mtk_wed_reset(dev, MTK_WED_RESET_TX_BM);
wed_set(dev, MTK_WED_CTRL,
MTK_WED_CTRL_WED_TX_BM_EN |
MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
-@@ -1217,7 +1217,7 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1218,7 +1218,7 @@ mtk_wed_reset_dma(struct mtk_wed_device
}
dev->init_done = false;
return;
if (!busy) {
-@@ -1343,7 +1343,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -1344,7 +1344,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev
MTK_WED_CTRL_WED_TX_BM_EN |
MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
wed_w32(dev, MTK_WED_PCIE_INT_TRIGGER,
MTK_WED_PCIE_INT_TRIGGER_STATUS);
-@@ -1416,7 +1416,7 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1417,7 +1417,7 @@ mtk_wed_dma_enable(struct mtk_wed_device
MTK_WDMA_GLO_CFG_RX_INFO1_PRERES |
MTK_WDMA_GLO_CFG_RX_INFO2_PRERES);
wdma_set(dev, MTK_WDMA_GLO_CFG,
MTK_WDMA_GLO_CFG_RX_INFO3_PRERES);
} else {
-@@ -1465,7 +1465,7 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -1466,7 +1466,7 @@ mtk_wed_start(struct mtk_wed_device *dev
mtk_wed_set_ext_int(dev, true);
u32 val = dev->wlan.wpdma_phys | MTK_PCIE_MIRROR_MAP_EN |
FIELD_PREP(MTK_PCIE_MIRROR_MAP_WED_ID,
dev->hw->index);
-@@ -1550,7 +1550,7 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -1551,7 +1551,7 @@ mtk_wed_attach(struct mtk_wed_device *de
}
mtk_wed_hw_init_early(dev);
regmap_update_bits(hw->hifsys, HIFSYS_DMA_AG_MAP,
BIT(hw->index), 0);
} else {
-@@ -1618,7 +1618,7 @@ static int
+@@ -1619,7 +1619,7 @@ static int
mtk_wed_txfree_ring_setup(struct mtk_wed_device *dev, void __iomem *regs)
{
struct mtk_wed_ring *ring = &dev->txfree_ring;
/*
* For txfree event handling, the same DMA ring is shared between WED
-@@ -1676,7 +1676,7 @@ mtk_wed_irq_get(struct mtk_wed_device *d
+@@ -1677,7 +1677,7 @@ mtk_wed_irq_get(struct mtk_wed_device *d
{
u32 val, ext_mask = MTK_WED_EXT_INT_STATUS_ERROR_MASK;
ext_mask |= MTK_WED_EXT_INT_STATUS_TX_DRV_R_RESP_ERR;
else
ext_mask |= MTK_WED_EXT_INT_STATUS_RX_FBUF_LO_TH |
-@@ -1843,7 +1843,7 @@ mtk_wed_setup_tc(struct mtk_wed_device *
+@@ -1844,7 +1844,7 @@ mtk_wed_setup_tc(struct mtk_wed_device *
{
struct mtk_wed_hw *hw = wed->hw;
return -EOPNOTSUPP;
switch (type) {
-@@ -1917,9 +1917,9 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1918,9 +1918,9 @@ void mtk_wed_add_hw(struct device_node *
hw->wdma = wdma;
hw->index = index;
hw->irq = irq;
{
--- a/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
-@@ -263,7 +263,7 @@ void mtk_wed_hw_add_debugfs(struct mtk_w
+@@ -261,7 +261,7 @@ void mtk_wed_hw_add_debugfs(struct mtk_w
debugfs_create_u32("regidx", 0600, dir, &hw->debugfs_reg);
debugfs_create_file_unsafe("regval", 0600, dir, hw, &fops_regval);
debugfs_create_file_unsafe("txinfo", 0400, dir, hw, &wed_txinfo_fops);
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -605,7 +605,7 @@ mtk_wed_stop(struct mtk_wed_device *dev)
+@@ -606,7 +606,7 @@ mtk_wed_stop(struct mtk_wed_device *dev)
wdma_w32(dev, MTK_WDMA_INT_GRP2, 0);
wed_w32(dev, MTK_WED_WPDMA_INT_MASK, 0);
return;
wed_w32(dev, MTK_WED_EXT_INT_MASK1, 0);
-@@ -732,16 +732,21 @@ mtk_wed_set_wpdma(struct mtk_wed_device
+@@ -733,16 +733,21 @@ mtk_wed_set_wpdma(struct mtk_wed_device
{
if (mtk_wed_is_v1(dev->hw)) {
wed_w32(dev, MTK_WED_WPDMA_CFG_BASE, dev->wlan.wpdma_phys);
}
static void
-@@ -973,15 +978,17 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -974,15 +979,17 @@ mtk_wed_hw_init(struct mtk_wed_device *d
MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
} else {
wed_clr(dev, MTK_WED_TX_TKID_CTRL, MTK_WED_TX_TKID_CTRL_PAUSE);
}
wed_clr(dev, MTK_WED_TX_BM_CTRL, MTK_WED_TX_BM_CTRL_PAUSE);
-@@ -1353,8 +1360,6 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -1354,8 +1361,6 @@ mtk_wed_configure_irq(struct mtk_wed_dev
wed_clr(dev, MTK_WED_WDMA_INT_CTRL, wdma_mask);
} else {
/* initail tx interrupt trigger */
wed_w32(dev, MTK_WED_WPDMA_INT_CTRL_TX,
MTK_WED_WPDMA_INT_CTRL_TX0_DONE_EN |
-@@ -1373,15 +1378,20 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -1374,15 +1379,20 @@ mtk_wed_configure_irq(struct mtk_wed_dev
FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_TX_FREE_DONE_TRIG,
dev->wlan.txfree_tbit));
wed_w32(dev, MTK_WED_WDMA_INT_CLR, wdma_mask);
wed_set(dev, MTK_WED_WDMA_INT_CTRL,
-@@ -1400,6 +1410,8 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -1401,6 +1411,8 @@ mtk_wed_configure_irq(struct mtk_wed_dev
static void
mtk_wed_dma_enable(struct mtk_wed_device *dev)
{
wed_set(dev, MTK_WED_WPDMA_INT_CTRL, MTK_WED_WPDMA_INT_CTRL_SUBRT_ADV);
wed_set(dev, MTK_WED_GLO_CFG,
-@@ -1419,33 +1431,33 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1420,33 +1432,33 @@ mtk_wed_dma_enable(struct mtk_wed_device
if (mtk_wed_is_v1(dev->hw)) {
wdma_set(dev, MTK_WDMA_GLO_CFG,
MTK_WDMA_GLO_CFG_RX_INFO3_PRERES);
}
static void
-@@ -1472,7 +1484,7 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -1473,7 +1485,7 @@ mtk_wed_start(struct mtk_wed_device *dev
val |= BIT(0) | (BIT(1) * !!dev->hw->index);
regmap_write(dev->hw->mirror, dev->hw->index * 4, val);
/* driver set mid ready and only once */
wed_w32(dev, MTK_WED_EXT_INT_MASK1,
MTK_WED_EXT_INT_STATUS_WPDMA_MID_RDY);
-@@ -1484,7 +1496,6 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -1485,7 +1497,6 @@ mtk_wed_start(struct mtk_wed_device *dev
if (mtk_wed_rro_cfg(dev))
return;
}
mtk_wed_set_512_support(dev, dev->wlan.wcid_512);
-@@ -1550,13 +1561,14 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -1551,13 +1562,14 @@ mtk_wed_attach(struct mtk_wed_device *de
}
mtk_wed_hw_init_early(dev);
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -599,7 +599,7 @@ mtk_wed_free_tx_buffer(struct mtk_wed_device
+@@ -422,7 +422,7 @@ free_pagelist:
static int
mtk_wed_rx_buffer_alloc(struct mtk_wed_device *dev)
{
dma_addr_t desc_phys;
dev->rx_buf_ring.size = dev->wlan.rx_nbuf;
-@@ -619,7 +619,7 @@ mtk_wed_rx_buffer_alloc(struct mtk_wed_d
+@@ -442,7 +442,7 @@ mtk_wed_rx_buffer_alloc(struct mtk_wed_d
static void
mtk_wed_free_rx_buffer(struct mtk_wed_device *dev)
{
__le32 buf0;
__le32 token;
} __packed __aligned(4);
-@@ -109,7 +109,7 @@ struct mtk_wed_device {
+@@ -104,7 +104,7 @@ struct mtk_wed_device {
struct {
int size;
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -299,9 +299,9 @@ out:
+@@ -300,9 +300,9 @@ out:
static int
mtk_wed_tx_buffer_alloc(struct mtk_wed_device *dev)
{
int token = dev->wlan.token_start;
int ring_size;
int n_pages;
-@@ -342,7 +342,8 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
+@@ -343,7 +343,8 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
return -ENOMEM;
}
dma_sync_single_for_cpu(dev->hw->dev, page_phys, PAGE_SIZE,
DMA_BIDIRECTIONAL);
-@@ -386,8 +387,8 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
+@@ -387,8 +388,8 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
static void
mtk_wed_free_tx_buffer(struct mtk_wed_device *dev)
{
int page_idx;
int i;
-@@ -399,13 +400,12 @@ mtk_wed_free_tx_buffer(struct mtk_wed_de
+@@ -400,13 +401,12 @@ mtk_wed_free_tx_buffer(struct mtk_wed_de
for (i = 0, page_idx = 0; i < dev->tx_buf_ring.size;
i += MTK_WED_BUF_PER_PAGE) {
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -48,6 +48,26 @@ struct mtk_wed_flow_block_priv {
+@@ -49,6 +49,26 @@ struct mtk_wed_flow_block_priv {
struct net_device *dev;
};
static void
wed_m32(struct mtk_wed_device *dev, u32 reg, u32 mask, u32 val)
{
-@@ -746,7 +766,7 @@ mtk_wed_set_wpdma(struct mtk_wed_device
+@@ -747,7 +767,7 @@ mtk_wed_set_wpdma(struct mtk_wed_device
return;
wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo);
}
static void
-@@ -940,22 +960,10 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -941,22 +961,10 @@ mtk_wed_hw_init(struct mtk_wed_device *d
wed_w32(dev, MTK_WED_TX_BM_BUF_LEN, MTK_WED_PKT_SIZE);
if (mtk_wed_is_v1(dev->hw)) {
wed_w32(dev, MTK_WED_TX_BM_DYN_THR,
FIELD_PREP(MTK_WED_TX_BM_DYN_THR_LO_V2, 0) |
MTK_WED_TX_BM_DYN_THR_HI_V2);
-@@ -970,6 +978,11 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -971,6 +979,11 @@ mtk_wed_hw_init(struct mtk_wed_device *d
MTK_WED_TX_TKID_DYN_THR_HI);
}
mtk_wed_reset(dev, MTK_WED_RESET_TX_BM);
if (mtk_wed_is_v1(dev->hw)) {
-@@ -1104,13 +1117,8 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+@@ -1105,13 +1118,8 @@ mtk_wed_rx_reset(struct mtk_wed_device *
if (ret) {
mtk_wed_reset(dev, MTK_WED_RESET_WED_RX_DMA);
} else {
wed_w32(dev, MTK_WED_RESET_IDX, 0);
}
-@@ -1163,7 +1171,8 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1164,7 +1172,8 @@ mtk_wed_reset_dma(struct mtk_wed_device
if (busy) {
mtk_wed_reset(dev, MTK_WED_RESET_WED_TX_DMA);
} else {
wed_w32(dev, MTK_WED_RESET_IDX, 0);
}
-@@ -1255,7 +1264,6 @@ static int
+@@ -1256,7 +1265,6 @@ static int
mtk_wed_wdma_rx_ring_setup(struct mtk_wed_device *dev, int idx, int size,
bool reset)
{
struct mtk_wed_ring *wdma;
if (idx >= ARRAY_SIZE(dev->rx_wdma))
-@@ -1263,7 +1271,7 @@ mtk_wed_wdma_rx_ring_setup(struct mtk_we
+@@ -1264,7 +1272,7 @@ mtk_wed_wdma_rx_ring_setup(struct mtk_we
wdma = &dev->rx_wdma[idx];
if (!reset && mtk_wed_ring_alloc(dev, wdma, MTK_WED_WDMA_RING_SIZE,
return -ENOMEM;
wdma_w32(dev, MTK_WDMA_RING_RX(idx) + MTK_WED_RING_OFS_BASE,
-@@ -1284,7 +1292,6 @@ static int
+@@ -1285,7 +1293,6 @@ static int
mtk_wed_wdma_tx_ring_setup(struct mtk_wed_device *dev, int idx, int size,
bool reset)
{
struct mtk_wed_ring *wdma;
if (idx >= ARRAY_SIZE(dev->tx_wdma))
-@@ -1292,7 +1299,7 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
+@@ -1293,7 +1300,7 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
wdma = &dev->tx_wdma[idx];
if (!reset && mtk_wed_ring_alloc(dev, wdma, MTK_WED_WDMA_RING_SIZE,
return -ENOMEM;
wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_BASE,
-@@ -1931,7 +1938,12 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1932,7 +1939,12 @@ void mtk_wed_add_hw(struct device_node *
hw->irq = irq;
hw->version = eth->soc->version;
hw->mirror = syscon_regmap_lookup_by_phandle(eth_np,
"mediatek,pcie-mirror");
hw->hifsys = syscon_regmap_lookup_by_phandle(eth_np,
-@@ -1945,6 +1957,8 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1946,6 +1958,8 @@ void mtk_wed_add_hw(struct device_node *
regmap_write(hw->mirror, 0, 0);
regmap_write(hw->mirror, 4, 0);
}
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -195,6 +195,7 @@ static const struct mtk_reg_map mt7988_r
+@@ -197,6 +197,7 @@ static const struct mtk_reg_map mt7988_r
.wdma_base = {
[0] = 0x4800,
[1] = 0x4c00,
}
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -16,17 +16,19 @@
+@@ -17,17 +17,19 @@
#include <net/flow_offload.h>
#include <net/pkt_cls.h>
#include "mtk_eth_soc.h"
#define MTK_WED_TX_RING_SIZE 2048
#define MTK_WED_WDMA_RING_SIZE 1024
-@@ -40,7 +42,10 @@
+@@ -41,7 +43,10 @@
#define MTK_WED_RRO_QUE_CNT 8192
#define MTK_WED_MIOD_ENTRY_CNT 128
static DEFINE_MUTEX(hw_lock);
struct mtk_wed_flow_block_priv {
-@@ -55,6 +60,7 @@ static const struct mtk_wed_soc_data mt7
+@@ -56,6 +61,7 @@ static const struct mtk_wed_soc_data mt7
.reset_idx_tx_mask = GENMASK(3, 0),
.reset_idx_rx_mask = GENMASK(17, 16),
},
.wdma_desc_size = sizeof(struct mtk_wdma_desc),
};
-@@ -65,6 +71,18 @@ static const struct mtk_wed_soc_data mt7
+@@ -66,6 +72,18 @@ static const struct mtk_wed_soc_data mt7
.reset_idx_tx_mask = GENMASK(1, 0),
.reset_idx_rx_mask = GENMASK(7, 6),
},
.wdma_desc_size = 2 * sizeof(struct mtk_wdma_desc),
};
-@@ -319,33 +337,38 @@ out:
+@@ -320,33 +338,38 @@ out:
static int
mtk_wed_tx_buffer_alloc(struct mtk_wed_device *dev)
{
dma_addr_t page_phys, buf_phys;
struct page *page;
void *buf;
-@@ -371,28 +394,31 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
+@@ -372,28 +395,31 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
buf_phys = page_phys;
for (s = 0; s < MTK_WED_BUF_PER_PAGE; s++) {
buf += MTK_WED_BUF_SIZE;
buf_phys += MTK_WED_BUF_SIZE;
}
-@@ -408,31 +434,31 @@ static void
+@@ -409,31 +435,31 @@ static void
mtk_wed_free_tx_buffer(struct mtk_wed_device *dev)
{
struct mtk_wed_buf *page_list = dev->tx_buf_ring.pages;
free_pagelist:
kfree(page_list);
-@@ -517,13 +543,23 @@ mtk_wed_set_ext_int(struct mtk_wed_devic
+@@ -518,13 +544,23 @@ mtk_wed_set_ext_int(struct mtk_wed_devic
{
u32 mask = MTK_WED_EXT_INT_STATUS_ERROR_MASK;
if (!dev->hw->num_flows)
mask &= ~MTK_WED_EXT_INT_STATUS_TKID_WO_PYLD;
-@@ -535,6 +571,9 @@ mtk_wed_set_ext_int(struct mtk_wed_devic
+@@ -536,6 +572,9 @@ mtk_wed_set_ext_int(struct mtk_wed_devic
static void
mtk_wed_set_512_support(struct mtk_wed_device *dev, bool enable)
{
if (enable) {
wed_w32(dev, MTK_WED_TXDP_CTRL, MTK_WED_TXDP_DW9_OVERWR);
wed_w32(dev, MTK_WED_TXP_DW1,
-@@ -609,6 +648,14 @@ mtk_wed_dma_disable(struct mtk_wed_devic
+@@ -610,6 +649,14 @@ mtk_wed_dma_disable(struct mtk_wed_devic
MTK_WED_WPDMA_RX_D_RX_DRV_EN);
wed_clr(dev, MTK_WED_WDMA_GLO_CFG,
MTK_WED_WDMA_GLO_CFG_TX_DDONE_CHK);
}
mtk_wed_set_512_support(dev, false);
-@@ -651,6 +698,14 @@ mtk_wed_deinit(struct mtk_wed_device *de
+@@ -652,6 +699,14 @@ mtk_wed_deinit(struct mtk_wed_device *de
MTK_WED_CTRL_RX_ROUTE_QM_EN |
MTK_WED_CTRL_WED_RX_BM_EN |
MTK_WED_CTRL_RX_RRO_QM_EN);
}
static void
-@@ -700,21 +755,37 @@ mtk_wed_detach(struct mtk_wed_device *de
+@@ -701,21 +756,37 @@ mtk_wed_detach(struct mtk_wed_device *de
mutex_unlock(&hw_lock);
}
wed_w32(dev, MTK_WED_PCIE_INT_CTRL,
FIELD_PREP(MTK_WED_PCIE_INT_CTRL_POLL_EN, 2));
-@@ -722,19 +793,9 @@ mtk_wed_bus_init(struct mtk_wed_device *
+@@ -723,19 +794,9 @@ mtk_wed_bus_init(struct mtk_wed_device *
/* pcie interrupt control: pola/source selection */
wed_set(dev, MTK_WED_PCIE_INT_CTRL,
MTK_WED_PCIE_INT_CTRL_MSK_EN_POLA |
break;
}
case MTK_WED_BUS_AXI:
-@@ -772,18 +833,19 @@ mtk_wed_set_wpdma(struct mtk_wed_device
+@@ -773,18 +834,19 @@ mtk_wed_set_wpdma(struct mtk_wed_device
static void
mtk_wed_hw_init_early(struct mtk_wed_device *dev)
{
wed_m32(dev, MTK_WED_WDMA_GLO_CFG, mask, set);
if (mtk_wed_is_v1(dev->hw)) {
-@@ -931,11 +993,18 @@ mtk_wed_route_qm_hw_init(struct mtk_wed_
+@@ -932,11 +994,18 @@ mtk_wed_route_qm_hw_init(struct mtk_wed_
}
/* configure RX_ROUTE_QM */
/* enable RX_ROUTE_QM */
wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_RX_ROUTE_QM_EN);
}
-@@ -948,22 +1017,30 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -949,22 +1018,30 @@ mtk_wed_hw_init(struct mtk_wed_device *d
dev->init_done = true;
mtk_wed_set_ext_int(dev, false);
wed_w32(dev, MTK_WED_TX_BM_DYN_THR,
FIELD_PREP(MTK_WED_TX_BM_DYN_THR_LO_V2, 0) |
MTK_WED_TX_BM_DYN_THR_HI_V2);
-@@ -973,9 +1050,6 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -974,9 +1051,6 @@ mtk_wed_hw_init(struct mtk_wed_device *d
dev->tx_buf_ring.size / 128) |
FIELD_PREP(MTK_WED_TX_TKID_CTRL_RSV_GRP_NUM,
dev->tx_buf_ring.size / 128));
}
wed_w32(dev, dev->hw->soc->regmap.tx_bm_tkid,
-@@ -985,26 +1059,62 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -986,26 +1060,62 @@ mtk_wed_hw_init(struct mtk_wed_device *d
mtk_wed_reset(dev, MTK_WED_RESET_TX_BM);
}
static void
-@@ -1302,6 +1412,24 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
+@@ -1303,6 +1413,24 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
dev->hw->soc->wdma_desc_size, true))
return -ENOMEM;
wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_BASE,
wdma->desc_phys);
wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_COUNT,
-@@ -1367,6 +1495,9 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -1368,6 +1496,9 @@ mtk_wed_configure_irq(struct mtk_wed_dev
wed_clr(dev, MTK_WED_WDMA_INT_CTRL, wdma_mask);
} else {
/* initail tx interrupt trigger */
wed_w32(dev, MTK_WED_WPDMA_INT_CTRL_TX,
MTK_WED_WPDMA_INT_CTRL_TX0_DONE_EN |
-@@ -1419,33 +1550,60 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1420,33 +1551,60 @@ mtk_wed_dma_enable(struct mtk_wed_device
{
int i;
wed_clr(dev, MTK_WED_WPDMA_GLO_CFG,
MTK_WED_WPDMA_GLO_CFG_TX_TKID_KEEP |
MTK_WED_WPDMA_GLO_CFG_TX_DMAD_DW3_PREV);
-@@ -1457,11 +1615,22 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1458,11 +1616,22 @@ mtk_wed_dma_enable(struct mtk_wed_device
MTK_WED_WDMA_GLO_CFG_TX_DRV_EN |
MTK_WED_WDMA_GLO_CFG_TX_DDONE_CHK);
for (i = 0; i < MTK_WED_RX_QUEUES; i++)
mtk_wed_check_wfdma_rx_fill(dev, i);
-@@ -1501,6 +1670,12 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -1502,6 +1671,12 @@ mtk_wed_start(struct mtk_wed_device *dev
wed_r32(dev, MTK_WED_EXT_INT_MASK1);
wed_r32(dev, MTK_WED_EXT_INT_MASK2);
if (mtk_wed_rro_cfg(dev))
return;
}
-@@ -1552,6 +1727,7 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -1553,6 +1728,7 @@ mtk_wed_attach(struct mtk_wed_device *de
dev->irq = hw->irq;
dev->wdma_idx = hw->index;
dev->version = hw->version;
if (hw->eth->dma_dev == hw->eth->dev &&
of_dma_is_coherent(hw->eth->dev->of_node))
-@@ -1619,6 +1795,23 @@ mtk_wed_tx_ring_setup(struct mtk_wed_dev
+@@ -1620,6 +1796,23 @@ mtk_wed_tx_ring_setup(struct mtk_wed_dev
ring->reg_base = MTK_WED_RING_TX(idx);
ring->wpdma = regs;
/* WED -> WPDMA */
wpdma_tx_w32(dev, idx, MTK_WED_RING_OFS_BASE, ring->desc_phys);
wpdma_tx_w32(dev, idx, MTK_WED_RING_OFS_COUNT, MTK_WED_TX_RING_SIZE);
-@@ -1693,15 +1886,13 @@ mtk_wed_rx_ring_setup(struct mtk_wed_dev
+@@ -1694,15 +1887,13 @@ mtk_wed_rx_ring_setup(struct mtk_wed_dev
static u32
mtk_wed_irq_get(struct mtk_wed_device *dev, u32 mask)
{
val = wed_r32(dev, MTK_WED_EXT_INT_STATUS);
wed_w32(dev, MTK_WED_EXT_INT_STATUS, val);
-@@ -1942,6 +2133,9 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1943,6 +2134,9 @@ void mtk_wed_add_hw(struct device_node *
case 2:
hw->soc = &mt7986_data;
break;
#define MTK_WO_MCU_CFG_LS_HW_VER_ADDR (MTK_WO_MCU_CFG_LS_BASE + 0x000)
--- a/include/linux/soc/mediatek/mtk_wed.h
+++ b/include/linux/soc/mediatek/mtk_wed.h
-@@ -139,6 +139,8 @@ struct mtk_wed_device {
+@@ -138,6 +138,8 @@ struct mtk_wed_device {
u32 wpdma_rx;
bool wcid_512;
u16 token_start;
unsigned int nbuf;
-@@ -212,10 +214,12 @@ mtk_wed_device_attach(struct mtk_wed_dev
+@@ -211,10 +213,12 @@ mtk_wed_device_attach(struct mtk_wed_dev
return ret;
}
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -585,22 +585,15 @@ mtk_wed_set_512_support(struct mtk_wed_d
+@@ -586,22 +586,15 @@ mtk_wed_set_512_support(struct mtk_wed_d
}
}
if (cur_idx == MTK_WED_RX_RING_SIZE - 1)
break;
-@@ -609,12 +602,10 @@ mtk_wed_check_wfdma_rx_fill(struct mtk_w
+@@ -610,12 +603,10 @@ mtk_wed_check_wfdma_rx_fill(struct mtk_w
if (i == 3) {
dev_err(dev->hw->dev, "rx dma enable failed\n");
}
static void
-@@ -1545,6 +1536,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -1546,6 +1537,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev
wed_w32(dev, MTK_WED_INT_MASK, irq_mask);
}
static void
mtk_wed_dma_enable(struct mtk_wed_device *dev)
{
-@@ -1632,8 +1624,26 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1633,8 +1625,26 @@ mtk_wed_dma_enable(struct mtk_wed_device
wdma_set(dev, MTK_WDMA_WRBK_TX_CFG, MTK_WDMA_WRBK_TX_CFG_WRBK_EN);
}
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
-@@ -438,7 +438,8 @@ int mtk_foe_entry_set_pppoe(struct mtk_e
+@@ -439,7 +439,8 @@ int mtk_foe_entry_set_pppoe(struct mtk_e
}
int mtk_foe_entry_set_wdma(struct mtk_eth *eth, struct mtk_foe_entry *entry,
{
struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry);
u32 *ib2 = mtk_foe_entry_ib2(eth, entry);
-@@ -450,6 +451,7 @@ int mtk_foe_entry_set_wdma(struct mtk_et
+@@ -451,6 +452,7 @@ int mtk_foe_entry_set_wdma(struct mtk_et
MTK_FOE_IB2_WDMA_WINFO_V2;
l2->w3info = FIELD_PREP(MTK_FOE_WINFO_WCID_V3, wcid) |
FIELD_PREP(MTK_FOE_WINFO_BSS_V3, bss);
case 0:
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -29,6 +29,8 @@
+@@ -30,6 +30,8 @@
#define MTK_WED_RX_PAGE_BUF_PER_PAGE (PAGE_SIZE / 128)
#define MTK_WED_RX_RING_SIZE 1536
#define MTK_WED_RX_PG_BM_CNT 8192
#define MTK_WED_TX_RING_SIZE 2048
#define MTK_WED_WDMA_RING_SIZE 1024
-@@ -172,6 +174,23 @@ mtk_wdma_rx_reset(struct mtk_wed_device
+@@ -173,6 +175,23 @@ mtk_wdma_rx_reset(struct mtk_wed_device
return ret;
}
static void
mtk_wdma_tx_reset(struct mtk_wed_device *dev)
{
-@@ -335,6 +354,118 @@ out:
+@@ -336,6 +355,118 @@ out:
}
static int
mtk_wed_tx_buffer_alloc(struct mtk_wed_device *dev)
{
u32 desc_size = dev->hw->soc->tx_ring_desc_size;
-@@ -708,6 +839,7 @@ __mtk_wed_detach(struct mtk_wed_device *
+@@ -709,6 +840,7 @@ __mtk_wed_detach(struct mtk_wed_device *
mtk_wdma_rx_reset(dev);
mtk_wed_reset(dev, MTK_WED_RESET_WED);
mtk_wed_free_tx_buffer(dev);
mtk_wed_free_tx_rings(dev);
-@@ -1128,23 +1260,6 @@ mtk_wed_ring_reset(struct mtk_wed_ring *
+@@ -1129,23 +1261,6 @@ mtk_wed_ring_reset(struct mtk_wed_ring *
}
}
static int
mtk_wed_rx_reset(struct mtk_wed_device *dev)
{
-@@ -1691,6 +1806,7 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -1692,6 +1807,7 @@ mtk_wed_start(struct mtk_wed_device *dev
}
mtk_wed_set_512_support(dev, dev->wlan.wcid_512);
mtk_wed_dma_enable(dev);
dev->running = true;
-@@ -1747,6 +1863,10 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -1748,6 +1864,10 @@ mtk_wed_attach(struct mtk_wed_device *de
if (ret)
goto out;
#define MTK_WED_PCIE_BASE1 0x11310000
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -928,6 +928,7 @@ struct net_device_path {
+@@ -917,6 +917,7 @@ struct net_device_path {
u8 queue;
u16 wcid;
u8 bss;
};
--- a/include/linux/soc/mediatek/mtk_wed.h
+++ b/include/linux/soc/mediatek/mtk_wed.h
-@@ -129,6 +129,7 @@ struct mtk_wed_device {
+@@ -128,6 +128,7 @@ struct mtk_wed_device {
enum mtk_wed_bus_tye bus_type;
void __iomem *base;
u32 phy_base;
u32 wpdma_phys;
u32 wpdma_int;
-@@ -147,10 +148,12 @@ struct mtk_wed_device {
+@@ -146,10 +147,12 @@ struct mtk_wed_device {
unsigned int rx_nbuf;
unsigned int rx_npkt;
unsigned int rx_size;
u32 (*init_buf)(void *ptr, dma_addr_t phys, int token_id);
int (*offload_enable)(struct mtk_wed_device *wed);
-@@ -224,6 +227,15 @@ static inline bool mtk_wed_get_rx_capa(s
+@@ -223,6 +226,15 @@ static inline bool mtk_wed_get_rx_capa(s
#else
return false;
#endif
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -26,7 +26,7 @@
+@@ -27,7 +27,7 @@
#define MTK_WED_BUF_SIZE 2048
#define MTK_WED_PAGE_BUF_SIZE 128
#define MTK_WED_BUF_PER_PAGE (PAGE_SIZE / 2048)
#define MTK_WED_RX_RING_SIZE 1536
#define MTK_WED_RX_PG_BM_CNT 8192
#define MTK_WED_AMSDU_BUF_SIZE (PAGE_SIZE << 4)
-@@ -596,6 +596,68 @@ free_pagelist:
+@@ -597,6 +597,68 @@ free_pagelist:
}
static int
mtk_wed_rx_buffer_alloc(struct mtk_wed_device *dev)
{
struct mtk_wed_bm_desc *desc;
-@@ -612,7 +674,42 @@ mtk_wed_rx_buffer_alloc(struct mtk_wed_d
+@@ -613,7 +675,42 @@ mtk_wed_rx_buffer_alloc(struct mtk_wed_d
dev->rx_buf_ring.desc_phys = desc_phys;
dev->wlan.init_rx_buf(dev, dev->wlan.rx_npkt);
}
static void
-@@ -626,6 +723,28 @@ mtk_wed_free_rx_buffer(struct mtk_wed_de
+@@ -627,6 +724,28 @@ mtk_wed_free_rx_buffer(struct mtk_wed_de
dev->wlan.release_rx_buf(dev);
dma_free_coherent(dev->hw->dev, dev->rx_buf_ring.size * sizeof(*desc),
desc, dev->rx_buf_ring.desc_phys);
}
static void
-@@ -639,6 +758,8 @@ mtk_wed_rx_buffer_hw_init(struct mtk_wed
+@@ -640,6 +759,8 @@ mtk_wed_rx_buffer_hw_init(struct mtk_wed
wed_w32(dev, MTK_WED_RX_BM_DYN_ALLOC_TH,
FIELD_PREP(MTK_WED_RX_BM_DYN_ALLOC_TH_H, 0xffff));
wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_WED_RX_BM_EN);
}
static void
-@@ -934,6 +1055,8 @@ mtk_wed_bus_init(struct mtk_wed_device *
+@@ -935,6 +1056,8 @@ mtk_wed_bus_init(struct mtk_wed_device *
static void
mtk_wed_set_wpdma(struct mtk_wed_device *dev)
{
if (mtk_wed_is_v1(dev->hw)) {
wed_w32(dev, MTK_WED_WPDMA_CFG_BASE, dev->wlan.wpdma_phys);
return;
-@@ -951,6 +1074,15 @@ mtk_wed_set_wpdma(struct mtk_wed_device
+@@ -952,6 +1075,15 @@ mtk_wed_set_wpdma(struct mtk_wed_device
wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo);
wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring0, dev->wlan.wpdma_rx);
}
static void
-@@ -1762,6 +1894,165 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1763,6 +1895,165 @@ mtk_wed_dma_enable(struct mtk_wed_device
}
static void
mtk_wed_start(struct mtk_wed_device *dev, u32 irq_mask)
{
int i;
-@@ -2215,6 +2506,10 @@ void mtk_wed_add_hw(struct device_node *
+@@ -2216,6 +2507,10 @@ void mtk_wed_add_hw(struct device_node *
.detach = mtk_wed_detach,
.ppe_check = mtk_wed_ppe_check,
.setup_tc = mtk_wed_setup_tc,
struct {
int size;
-@@ -120,6 +124,13 @@ struct mtk_wed_device {
+@@ -119,6 +123,13 @@ struct mtk_wed_device {
dma_addr_t fdbk_phys;
} rro;
/* filled by driver: */
struct {
union {
-@@ -138,6 +149,8 @@ struct mtk_wed_device {
+@@ -137,6 +148,8 @@ struct mtk_wed_device {
u32 wpdma_txfree;
u32 wpdma_rx_glo;
u32 wpdma_rx;
bool wcid_512;
bool hw_rro;
-@@ -152,9 +165,20 @@ struct mtk_wed_device {
+@@ -151,9 +164,20 @@ struct mtk_wed_device {
u8 tx_tbit[MTK_WED_TX_QUEUES];
u8 rx_tbit[MTK_WED_RX_QUEUES];
u32 (*init_buf)(void *ptr, dma_addr_t phys, int token_id);
int (*offload_enable)(struct mtk_wed_device *wed);
void (*offload_disable)(struct mtk_wed_device *wed);
-@@ -193,6 +217,14 @@ struct mtk_wed_ops {
+@@ -192,6 +216,14 @@ struct mtk_wed_ops {
void (*irq_set_mask)(struct mtk_wed_device *dev, u32 mask);
int (*setup_tc)(struct mtk_wed_device *wed, struct net_device *dev,
enum tc_setup_type type, void *type_data);
};
extern const struct mtk_wed_ops __rcu *mtk_soc_wed_ops;
-@@ -264,6 +296,15 @@ static inline bool mtk_wed_is_amsdu_supp
+@@ -263,6 +295,15 @@ static inline bool mtk_wed_is_amsdu_supp
#define mtk_wed_device_dma_reset(_dev) (_dev)->ops->reset_dma(_dev)
#define mtk_wed_device_setup_tc(_dev, _netdev, _type, _type_data) \
(_dev)->ops->setup_tc(_dev, _netdev, _type, _type_data)
#else
static inline bool mtk_wed_device_active(struct mtk_wed_device *dev)
{
-@@ -283,6 +324,10 @@ static inline bool mtk_wed_device_active
+@@ -282,6 +323,10 @@ static inline bool mtk_wed_device_active
#define mtk_wed_device_stop(_dev) do {} while (0)
#define mtk_wed_device_dma_reset(_dev) do {} while (0)
#define mtk_wed_device_setup_tc(_dev, _netdev, _type, _type_data) -EOPNOTSUPP
mtk_wed_reg_set(void *data, u64 val)
{
struct mtk_wed_hw *hw = data;
-@@ -266,7 +624,16 @@ void mtk_wed_hw_add_debugfs(struct mtk_w
+@@ -264,7 +622,16 @@ void mtk_wed_hw_add_debugfs(struct mtk_w
debugfs_create_u32("regidx", 0600, dir, &hw->debugfs_reg);
debugfs_create_file_unsafe("regval", 0600, dir, hw, &fops_regval);
debugfs_create_file_unsafe("txinfo", 0400, dir, hw, &wed_txinfo_fops);
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -148,6 +148,90 @@ mtk_wdma_read_reset(struct mtk_wed_devic
+@@ -149,6 +149,90 @@ mtk_wdma_read_reset(struct mtk_wed_devic
return wdma_r32(dev, MTK_WDMA_GLO_CFG);
}
static int
mtk_wdma_rx_reset(struct mtk_wed_device *dev)
{
-@@ -160,6 +244,7 @@ mtk_wdma_rx_reset(struct mtk_wed_device
+@@ -161,6 +245,7 @@ mtk_wdma_rx_reset(struct mtk_wed_device
if (ret)
dev_err(dev->hw->dev, "rx reset failed\n");
wdma_w32(dev, MTK_WDMA_RESET_IDX, MTK_WDMA_RESET_IDX_RX);
wdma_w32(dev, MTK_WDMA_RESET_IDX, 0);
-@@ -192,6 +277,84 @@ mtk_wed_poll_busy(struct mtk_wed_device
+@@ -193,6 +278,84 @@ mtk_wed_poll_busy(struct mtk_wed_device
}
static void
mtk_wdma_tx_reset(struct mtk_wed_device *dev)
{
u32 status, mask = MTK_WDMA_GLO_CFG_TX_DMA_BUSY;
-@@ -202,6 +365,7 @@ mtk_wdma_tx_reset(struct mtk_wed_device
+@@ -203,6 +366,7 @@ mtk_wdma_tx_reset(struct mtk_wed_device
!(status & mask), 0, 10000))
dev_err(dev->hw->dev, "tx reset failed\n");
wdma_w32(dev, MTK_WDMA_RESET_IDX, MTK_WDMA_RESET_IDX_TX);
wdma_w32(dev, MTK_WDMA_RESET_IDX, 0);
-@@ -1405,13 +1569,33 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+@@ -1406,13 +1570,33 @@ mtk_wed_rx_reset(struct mtk_wed_device *
if (ret)
return ret;
wed_w32(dev, MTK_WED_WPDMA_RX_D_RST_IDX,
MTK_WED_WPDMA_RX_D_RST_CRX_IDX |
MTK_WED_WPDMA_RX_D_RST_DRV_IDX);
-@@ -1439,23 +1623,52 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+@@ -1440,23 +1624,52 @@ mtk_wed_rx_reset(struct mtk_wed_device *
wed_w32(dev, MTK_WED_RROQM_RST_IDX, 0);
}
mtk_wed_reset(dev, MTK_WED_RESET_WDMA_TX_DRV);
/* reset wed rx dma */
-@@ -1476,6 +1689,14 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+@@ -1477,6 +1690,14 @@ mtk_wed_rx_reset(struct mtk_wed_device *
MTK_WED_CTRL_WED_RX_BM_BUSY);
mtk_wed_reset(dev, MTK_WED_RESET_RX_BM);
/* wo change to enable state */
val = MTK_WED_WO_STATE_ENABLE;
ret = mtk_wed_mcu_send_msg(wo, MTK_WED_MODULE_ID_WO,
-@@ -1493,6 +1714,7 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+@@ -1494,6 +1715,7 @@ mtk_wed_rx_reset(struct mtk_wed_device *
false);
}
mtk_wed_free_rx_buffer(dev);
return 0;
}
-@@ -1526,15 +1748,41 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1527,15 +1749,41 @@ mtk_wed_reset_dma(struct mtk_wed_device
/* 2. reset WDMA rx DMA */
busy = !!mtk_wdma_rx_reset(dev);
wed_w32(dev, MTK_WED_WDMA_RESET_IDX,
MTK_WED_WDMA_RESET_IDX_RX | MTK_WED_WDMA_RESET_IDX_DRV);
wed_w32(dev, MTK_WED_WDMA_RESET_IDX, 0);
-@@ -1550,8 +1798,13 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1551,8 +1799,13 @@ mtk_wed_reset_dma(struct mtk_wed_device
wed_clr(dev, MTK_WED_CTRL, MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
for (i = 0; i < 100; i++) {
break;
}
-@@ -1573,6 +1826,8 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1574,6 +1827,8 @@ mtk_wed_reset_dma(struct mtk_wed_device
mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_INT_AGENT);
mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_TX_DRV);
mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_RX_DRV);
} else {
wed_w32(dev, MTK_WED_WPDMA_RESET_IDX,
MTK_WED_WPDMA_RESET_IDX_TX |
-@@ -1589,7 +1844,14 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1590,7 +1845,14 @@ mtk_wed_reset_dma(struct mtk_wed_device
wed_w32(dev, MTK_WED_RESET_IDX, 0);
}
}
static int
-@@ -1841,6 +2103,7 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1842,6 +2104,7 @@ mtk_wed_dma_enable(struct mtk_wed_device
MTK_WED_WPDMA_GLO_CFG_RX_DRV_UNS_VER_FORCE_4);
wdma_set(dev, MTK_WDMA_PREF_RX_CFG, MTK_WDMA_PREF_RX_CFG_PREF_EN);
}
wed_clr(dev, MTK_WED_WPDMA_GLO_CFG,
-@@ -1904,6 +2167,12 @@ mtk_wed_start_hw_rro(struct mtk_wed_devi
+@@ -1905,6 +2168,12 @@ mtk_wed_start_hw_rro(struct mtk_wed_devi
if (!mtk_wed_get_rx_capa(dev) || !dev->wlan.hw_rro)
return;
#define PHY_ID_AQR112 0x03a1b662
#define PHY_ID_AQR412 0x03a1b712
#define PHY_ID_AQR113C 0x31c31c12
-@@ -670,6 +672,16 @@ static int aqr107_probe(struct phy_devic
+@@ -672,6 +674,16 @@ static int aqr107_probe(struct phy_devic
return aqr_hwmon_probe(phydev);
}
static struct phy_driver aqr_driver[] = {
{
PHY_ID_MATCH_MODEL(PHY_ID_AQ1202),
-@@ -744,6 +756,44 @@ static struct phy_driver aqr_driver[] =
+@@ -746,6 +758,44 @@ static struct phy_driver aqr_driver[] =
.link_change_notify = aqr107_link_change_notify,
},
{
--- a/drivers/net/phy/aquantia/aquantia_main.c
+++ b/drivers/net/phy/aquantia/aquantia_main.c
-@@ -24,6 +24,7 @@
+@@ -26,6 +26,7 @@
#define PHY_ID_AQR111B0 0x03a1b612
#define PHY_ID_AQR112 0x03a1b662
#define PHY_ID_AQR412 0x03a1b712
#define PHY_ID_AQR113C 0x31c31c12
#define MDIO_PHYXS_VEND_IF_STATUS 0xe812
-@@ -802,6 +803,25 @@ static struct phy_driver aqr_driver[] =
+@@ -840,6 +841,25 @@ static struct phy_driver aqr_driver[] =
.link_change_notify = aqr107_link_change_notify,
},
{
PHY_ID_MATCH_MODEL(PHY_ID_AQR113C),
.name = "Aquantia AQR113C",
.probe = aqr107_probe,
-@@ -834,6 +854,7 @@ static struct mdio_device_id __maybe_unu
+@@ -874,6 +894,7 @@ static struct mdio_device_id __maybe_unu
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR111B0) },
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR112) },
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR412) },
--- a/drivers/net/phy/aquantia/aquantia_main.c
+++ b/drivers/net/phy/aquantia/aquantia_main.c
-@@ -26,6 +26,7 @@
+@@ -28,6 +28,7 @@
#define PHY_ID_AQR412 0x03a1b712
#define PHY_ID_AQR113 0x31c31c40
#define PHY_ID_AQR113C 0x31c31c12
#define MDIO_PHYXS_VEND_IF_STATUS 0xe812
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3)
-@@ -840,6 +841,25 @@ static struct phy_driver aqr_driver[] =
+@@ -878,6 +879,25 @@ static struct phy_driver aqr_driver[] =
.get_stats = aqr107_get_stats,
.link_change_notify = aqr107_link_change_notify,
},
};
module_phy_driver(aqr_driver);
-@@ -856,6 +876,7 @@ static struct mdio_device_id __maybe_unu
+@@ -896,6 +916,7 @@ static struct mdio_device_id __maybe_unu
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR412) },
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR113) },
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
--- a/drivers/net/ethernet/chelsio/cxgb3/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/sge.c
-@@ -2507,14 +2507,6 @@ static int napi_rx_handler(struct napi_s
+@@ -2501,14 +2501,6 @@ static int napi_rx_handler(struct napi_s
return work_done;
}
* @adap: the adapter
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
-@@ -1479,7 +1479,7 @@ static void rtw89_core_rx_to_mac80211(st
+@@ -1744,7 +1744,7 @@ static void rtw89_core_rx_to_mac80211(st
struct napi_struct *napi = &rtwdev->napi;
/* In low power mode, napi isn't scheduled. Receive it to netif. */
rtw89_core_hw_to_sband_rate(rx_status);
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -468,6 +468,29 @@ static inline bool napi_prefer_busy_poll
+@@ -480,6 +480,29 @@ static inline bool napi_prefer_busy_poll
return test_bit(NAPI_STATE_PREFER_BUSY_POLL, &n->state);
}
/**
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -6533,7 +6533,7 @@ static int __napi_poll(struct napi_struc
+@@ -6555,7 +6555,7 @@ static int __napi_poll(struct napi_struc
* accidentally calling ->poll() when NAPI is not scheduled.
*/
work = 0;
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -2974,13 +2974,25 @@ static void stmmac_tx_timer_arm(struct s
+@@ -3003,13 +3003,25 @@ static void stmmac_tx_timer_arm(struct s
{
struct stmmac_tx_queue *tx_q = &priv->dma_conf.tx_queue[queue];
u32 tx_coal_timer = priv->tx_coal_timer[queue];
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
-@@ -287,7 +287,7 @@ struct stmmac_safety_stats {
+@@ -318,7 +318,7 @@ struct stmmac_safety_stats {
#define MIN_DMA_RIWT 0x10
#define DEF_DMA_RIWT 0xa0
/* Tx coalesce parameters */
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
-@@ -2583,8 +2583,9 @@ static int rx_bottom(struct r8152 *tp, i
+@@ -2584,8 +2584,9 @@ static int rx_bottom(struct r8152 *tp, i
while (urb->actual_length > len_used) {
struct net_device *netdev = tp->netdev;
struct net_device_stats *stats = &netdev->stats;
WARN_ON_ONCE(skb_queue_len(&tp->rx_queue) >= 1000);
-@@ -2597,45 +2598,77 @@ static int rx_bottom(struct r8152 *tp, i
+@@ -2598,45 +2599,77 @@ static int rx_bottom(struct r8152 *tp, i
break;
pkt_len -= ETH_FCS_LEN;
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
-@@ -164,6 +164,7 @@ config LEDS_TURRIS_OMNIA
+@@ -188,6 +188,7 @@ config LEDS_TURRIS_OMNIA
depends on I2C
depends on MACH_ARMADA_38X || COMPILE_TEST
depends on OF
/* put the LED into software mode */
ret = omnia_cmd_write_u8(client, CMD_LED_MODE,
-@@ -309,6 +385,12 @@ static int omnia_leds_probe(struct i2c_c
+@@ -308,6 +384,12 @@ static int omnia_leds_probe(struct i2c_c
mutex_init(&leds->lock);
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
-@@ -523,6 +523,7 @@ static int mtd_nvmem_add(struct mtd_info
+@@ -552,6 +552,7 @@ static int mtd_nvmem_add(struct mtd_info
config.dev = &mtd->dev;
config.name = dev_name(&mtd->dev);
config.owner = THIS_MODULE;
config.reg_read = mtd_nvmem_reg_read;
config.size = mtd->size;
config.word_size = 1;
-@@ -891,6 +892,7 @@ static struct nvmem_device *mtd_otp_nvme
+@@ -898,6 +899,7 @@ static struct nvmem_device *mtd_otp_nvme
config.name = compatible;
config.id = NVMEM_DEVID_AUTO;
config.owner = THIS_MODULE;
.stride = sizeof(u32),
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
-@@ -998,9 +998,11 @@ struct nvmem_device *nvmem_register(cons
+@@ -1003,9 +1003,11 @@ struct nvmem_device *nvmem_register(cons
if (rval)
goto err_remove_cells;
.stride = 1,
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
-@@ -616,6 +616,7 @@ static int imx_ocotp_probe(struct platfo
+@@ -615,6 +615,7 @@ static int imx_ocotp_probe(struct platfo
return PTR_ERR(priv->clk);
priv->params = of_device_get_match_data(&pdev->dev);
econfig->reg_read = meson_efuse_read;
--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
-@@ -211,6 +211,7 @@ static int meson_mx_efuse_probe(struct p
+@@ -210,6 +210,7 @@ static int meson_mx_efuse_probe(struct p
efuse->config.owner = THIS_MODULE;
efuse->config.dev = &pdev->dev;
efuse->config.priv = efuse;
.read_only = true,
--- a/drivers/nvmem/sc27xx-efuse.c
+++ b/drivers/nvmem/sc27xx-efuse.c
-@@ -248,6 +248,7 @@ static int sc27xx_efuse_probe(struct pla
+@@ -247,6 +247,7 @@ static int sc27xx_efuse_probe(struct pla
econfig.reg_read = sc27xx_efuse_read;
econfig.priv = efuse;
econfig.dev = &pdev->dev;
.size = QAC628_OTP_SIZE,
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
-@@ -154,6 +154,7 @@ static int sunxi_sid_probe(struct platfo
+@@ -153,6 +153,7 @@ static int sunxi_sid_probe(struct platfo
nvmem_cfg->dev = dev;
nvmem_cfg->name = "sunxi-sid";
nvmem_cfg->type = NVMEM_TYPE_OTP;
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
-@@ -531,7 +531,6 @@ static int mtd_nvmem_add(struct mtd_info
+@@ -560,7 +560,6 @@ static int mtd_nvmem_add(struct mtd_info
config.read_only = true;
config.root_only = true;
config.ignore_wp = true;
mtd->nvmem = nvmem_register(&config);
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
-@@ -936,7 +936,7 @@ struct nvmem_device *nvmem_register(cons
+@@ -941,7 +941,7 @@ struct nvmem_device *nvmem_register(cons
nvmem->nkeepout = config->nkeepout;
if (config->of_node)
nvmem->dev.of_node = config->of_node;
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
-@@ -395,3 +395,44 @@ int of_device_uevent_modalias(struct dev
+@@ -304,3 +304,44 @@ int of_device_uevent_modalias(const stru
return 0;
}
EXPORT_SYMBOL_GPL(of_device_uevent_modalias);
+EXPORT_SYMBOL_GPL(of_device_make_bus_id);
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
-@@ -64,46 +64,6 @@ EXPORT_SYMBOL(of_find_device_by_node);
+@@ -98,46 +98,6 @@ static const struct of_device_id of_skip
*/
/**
* @bus_id: Name to assign to the device. May be null to use default name.
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
-@@ -56,6 +56,9 @@ static inline int of_dma_configure(struc
+@@ -40,6 +40,9 @@ static inline int of_dma_configure(struc
{
return of_dma_configure_id(dev, np, force_dma, NULL);
}
#else /* CONFIG_OF */
static inline int of_driver_match_device(struct device *dev,
-@@ -113,6 +116,9 @@ static inline int of_dma_configure(struc
+@@ -82,6 +85,9 @@ static inline int of_dma_configure(struc
{
return 0;
}
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
-@@ -848,14 +848,6 @@ static int nvmem_add_cells_from_layout(s
+@@ -847,14 +847,6 @@ static int nvmem_add_cells_from_layout(s
}
#if IS_ENABLED(CONFIG_OF)
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
-@@ -817,7 +817,7 @@ static int nvmem_add_cells_from_layout(s
+@@ -816,7 +816,7 @@ static int nvmem_add_cells_from_layout(s
int ret;
if (layout && layout->add_cells) {
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
-@@ -676,7 +676,6 @@ static int nvmem_validate_keepouts(struc
+@@ -675,7 +675,6 @@ static int nvmem_validate_keepouts(struc
static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np)
{
struct device *dev = &nvmem->dev;
struct device_node *child;
const __be32 *addr;
-@@ -706,8 +705,8 @@ static int nvmem_add_cells_from_dt(struc
+@@ -705,8 +704,8 @@ static int nvmem_add_cells_from_dt(struc
info.np = of_node_get(child);
ret = nvmem_add_one_cell(nvmem, &info);
kfree(info.name);
-@@ -896,6 +895,7 @@ struct nvmem_device *nvmem_register(cons
+@@ -895,6 +894,7 @@ struct nvmem_device *nvmem_register(cons
kref_init(&nvmem->refcnt);
INIT_LIST_HEAD(&nvmem->cells);
if (!nvmem->owner && config->dev->driver)
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
-@@ -584,17 +584,12 @@ static const struct of_device_id imx_oco
+@@ -583,17 +583,12 @@ static const struct of_device_id imx_oco
};
MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids);
static int imx_ocotp_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
-@@ -620,7 +615,7 @@ static int imx_ocotp_probe(struct platfo
+@@ -619,7 +614,7 @@ static int imx_ocotp_probe(struct platfo
imx_ocotp_nvmem_config.size = 4 * priv->params->nregs;
imx_ocotp_nvmem_config.dev = dev;
imx_ocotp_nvmem_config.priv = priv;
# Devices
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
-@@ -56,9 +56,6 @@ static LIST_HEAD(nvmem_lookup_list);
+@@ -55,9 +55,6 @@ static LIST_HEAD(nvmem_lookup_list);
static BLOCKING_NOTIFIER_HEAD(nvmem_notifier);
static int __nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset,
void *val, size_t bytes)
{
-@@ -741,97 +738,22 @@ static int nvmem_add_cells_from_fixed_la
+@@ -740,97 +737,22 @@ static int nvmem_add_cells_from_fixed_la
return err;
}
const void *nvmem_layout_get_match_data(struct nvmem_device *nvmem,
struct nvmem_layout *layout)
{
-@@ -839,7 +761,7 @@ const void *nvmem_layout_get_match_data(
+@@ -838,7 +760,7 @@ const void *nvmem_layout_get_match_data(
const struct of_device_id *match;
layout_np = of_nvmem_layout_get_container(nvmem);
return match ? match->data : NULL;
}
-@@ -951,19 +873,6 @@ struct nvmem_device *nvmem_register(cons
+@@ -950,19 +872,6 @@ struct nvmem_device *nvmem_register(cons
goto err_put_device;
}
if (config->cells) {
rval = nvmem_add_cells(nvmem, config->cells, config->ncells);
if (rval)
-@@ -984,24 +893,24 @@ struct nvmem_device *nvmem_register(cons
+@@ -983,24 +892,24 @@ struct nvmem_device *nvmem_register(cons
if (rval)
goto err_remove_cells;
if (config->compat)
nvmem_sysfs_remove_compat(nvmem, config);
err_put_device:
-@@ -1023,7 +932,7 @@ static void nvmem_device_release(struct
+@@ -1022,7 +931,7 @@ static void nvmem_device_release(struct
device_remove_bin_file(nvmem->base_dev, &nvmem->eeprom);
nvmem_device_remove_all_cells(nvmem);
device_unregister(&nvmem->dev);
}
-@@ -1325,6 +1234,12 @@ nvmem_cell_get_from_lookup(struct device
+@@ -1324,6 +1233,12 @@ nvmem_cell_get_from_lookup(struct device
return cell;
}
#if IS_ENABLED(CONFIG_OF)
static struct nvmem_cell_entry *
nvmem_find_cell_entry_by_node(struct nvmem_device *nvmem, struct device_node *np)
-@@ -1343,6 +1258,18 @@ nvmem_find_cell_entry_by_node(struct nvm
+@@ -1342,6 +1257,18 @@ nvmem_find_cell_entry_by_node(struct nvm
return cell;
}
/**
* of_nvmem_cell_get() - Get a nvmem cell from given device node and cell id
*
-@@ -1405,16 +1332,29 @@ struct nvmem_cell *of_nvmem_cell_get(str
+@@ -1404,16 +1331,29 @@ struct nvmem_cell *of_nvmem_cell_get(str
return ERR_CAST(nvmem);
}
return cell;
}
-@@ -1528,6 +1468,7 @@ void nvmem_cell_put(struct nvmem_cell *c
+@@ -1527,6 +1467,7 @@ void nvmem_cell_put(struct nvmem_cell *c
kfree(cell);
__nvmem_device_put(nvmem);
}
EXPORT_SYMBOL_GPL(nvmem_cell_put);
-@@ -2105,11 +2046,22 @@ EXPORT_SYMBOL_GPL(nvmem_dev_name);
+@@ -2104,11 +2045,22 @@ EXPORT_SYMBOL_GPL(nvmem_dev_name);
static int __init nvmem_init(void)
{
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
-@@ -300,6 +300,43 @@ static umode_t nvmem_bin_attr_is_visible
+@@ -299,6 +299,43 @@ static umode_t nvmem_bin_attr_is_visible
return nvmem_bin_attr_get_umode(nvmem);
}
/* default read/write permissions */
static struct bin_attribute bin_attr_rw_nvmem = {
.attr = {
-@@ -321,11 +358,21 @@ static const struct attribute_group nvme
+@@ -320,11 +357,21 @@ static const struct attribute_group nvme
.is_bin_visible = nvmem_bin_attr_is_visible,
};
static struct bin_attribute bin_attr_nvmem_eeprom_compat = {
.attr = {
.name = "eeprom",
-@@ -381,6 +428,68 @@ static void nvmem_sysfs_remove_compat(st
+@@ -380,6 +427,68 @@ static void nvmem_sysfs_remove_compat(st
device_remove_bin_file(nvmem->base_dev, &nvmem->eeprom);
}
#else /* CONFIG_NVMEM_SYSFS */
static int nvmem_sysfs_setup_compat(struct nvmem_device *nvmem,
-@@ -740,11 +849,25 @@ static int nvmem_add_cells_from_fixed_la
+@@ -739,11 +848,25 @@ static int nvmem_add_cells_from_fixed_la
int nvmem_layout_register(struct nvmem_layout *layout)
{
}
EXPORT_SYMBOL_GPL(nvmem_layout_register);
-@@ -903,10 +1026,20 @@ struct nvmem_device *nvmem_register(cons
+@@ -902,10 +1025,20 @@ struct nvmem_device *nvmem_register(cons
if (rval)
goto err_remove_dev;
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
-@@ -855,7 +855,7 @@ int nvmem_layout_register(struct nvmem_l
+@@ -854,7 +854,7 @@ int nvmem_layout_register(struct nvmem_l
return -EINVAL;
/* Populate the cells */
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
-@@ -877,19 +877,6 @@ void nvmem_layout_unregister(struct nvme
+@@ -876,19 +876,6 @@ void nvmem_layout_unregister(struct nvme
}
EXPORT_SYMBOL_GPL(nvmem_layout_unregister);
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
-@@ -2164,6 +2164,19 @@ const char *nvmem_dev_name(struct nvmem_
+@@ -2163,6 +2163,19 @@ const char *nvmem_dev_name(struct nvmem_
}
EXPORT_SYMBOL_GPL(nvmem_dev_name);
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
-@@ -72,9 +72,9 @@ config SFP
+@@ -69,9 +69,9 @@ config SFP
comment "MII PHY device drivers"
config AMD_PHY
if (test_bit(TRIGGER_NETDEV_HALF_DUPLEX, &trigger_data->mode) &&
trigger_data->duplex == DUPLEX_HALF)
blink_on = true;
-@@ -286,6 +298,9 @@ static ssize_t netdev_led_attr_show(stru
+@@ -289,6 +301,9 @@ static ssize_t netdev_led_attr_show(stru
case TRIGGER_NETDEV_LINK_10:
case TRIGGER_NETDEV_LINK_100:
case TRIGGER_NETDEV_LINK_1000:
case TRIGGER_NETDEV_HALF_DUPLEX:
case TRIGGER_NETDEV_FULL_DUPLEX:
case TRIGGER_NETDEV_TX:
-@@ -316,6 +331,9 @@ static ssize_t netdev_led_attr_store(str
+@@ -319,6 +334,9 @@ static ssize_t netdev_led_attr_store(str
case TRIGGER_NETDEV_LINK_10:
case TRIGGER_NETDEV_LINK_100:
case TRIGGER_NETDEV_LINK_1000:
case TRIGGER_NETDEV_HALF_DUPLEX:
case TRIGGER_NETDEV_FULL_DUPLEX:
case TRIGGER_NETDEV_TX:
-@@ -334,7 +352,10 @@ static ssize_t netdev_led_attr_store(str
+@@ -337,7 +355,10 @@ static ssize_t netdev_led_attr_store(str
if (test_bit(TRIGGER_NETDEV_LINK, &mode) &&
(test_bit(TRIGGER_NETDEV_LINK_10, &mode) ||
test_bit(TRIGGER_NETDEV_LINK_100, &mode) ||
return -EINVAL;
cancel_delayed_work_sync(&trigger_data->work);
-@@ -364,6 +385,9 @@ DEFINE_NETDEV_TRIGGER(link, TRIGGER_NETD
+@@ -367,6 +388,9 @@ DEFINE_NETDEV_TRIGGER(link, TRIGGER_NETD
DEFINE_NETDEV_TRIGGER(link_10, TRIGGER_NETDEV_LINK_10);
DEFINE_NETDEV_TRIGGER(link_100, TRIGGER_NETDEV_LINK_100);
DEFINE_NETDEV_TRIGGER(link_1000, TRIGGER_NETDEV_LINK_1000);
DEFINE_NETDEV_TRIGGER(half_duplex, TRIGGER_NETDEV_HALF_DUPLEX);
DEFINE_NETDEV_TRIGGER(full_duplex, TRIGGER_NETDEV_FULL_DUPLEX);
DEFINE_NETDEV_TRIGGER(tx, TRIGGER_NETDEV_TX);
-@@ -422,6 +446,9 @@ static struct attribute *netdev_trig_att
+@@ -425,6 +449,9 @@ static struct attribute *netdev_trig_att
&dev_attr_link_10.attr,
&dev_attr_link_100.attr,
&dev_attr_link_1000.attr,
&dev_attr_full_duplex.attr,
&dev_attr_half_duplex.attr,
&dev_attr_rx.attr,
-@@ -519,6 +546,9 @@ static void netdev_trig_work(struct work
+@@ -522,6 +549,9 @@ static void netdev_trig_work(struct work
test_bit(TRIGGER_NETDEV_LINK_10, &trigger_data->mode) ||
test_bit(TRIGGER_NETDEV_LINK_100, &trigger_data->mode) ||
test_bit(TRIGGER_NETDEV_LINK_1000, &trigger_data->mode) ||
interval = jiffies_to_msecs(
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
-@@ -533,6 +533,9 @@ enum led_trigger_netdev_modes {
+@@ -588,6 +588,9 @@ enum led_trigger_netdev_modes {
TRIGGER_NETDEV_LINK_10,
TRIGGER_NETDEV_LINK_100,
TRIGGER_NETDEV_LINK_1000,
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -3138,6 +3138,7 @@ static int of_phy_led(struct phy_device
+@@ -3198,6 +3198,7 @@ static int of_phy_led(struct phy_device
struct device *dev = &phydev->mdio.dev;
struct led_init_data init_data = {};
struct led_classdev *cdev;
struct phy_led *phyled;
u32 index;
int err;
-@@ -3155,6 +3156,21 @@ static int of_phy_led(struct phy_device
+@@ -3215,6 +3216,21 @@ static int of_phy_led(struct phy_device
if (index > U8_MAX)
return -EINVAL;
cdev->brightness_set_blocking = phy_led_set_brightness;
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
-@@ -791,6 +791,15 @@ struct phy_led {
+@@ -870,6 +870,15 @@ struct phy_led {
#define to_phy_led(d) container_of(d, struct phy_led, led_cdev)
/**
* struct phy_driver - Driver structure for a particular PHY type
*
-@@ -1059,6 +1068,19 @@ struct phy_driver {
+@@ -1146,6 +1155,19 @@ struct phy_driver {
int (*led_hw_control_get)(struct phy_device *dev, u8 index,
unsigned long *rules);
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
-@@ -843,4 +843,17 @@ int ethtool_get_phc_vclocks(struct net_d
+@@ -1052,4 +1052,17 @@ static inline int ethtool_mm_frag_size_m
* next string.
*/
extern __printf(2, 3) void ethtool_sprintf(u8 **data, const char *fmt, ...);
#endif /* _LINUX_ETHTOOL_H */
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
-@@ -1974,6 +1974,13 @@ __printf(2, 3) void ethtool_sprintf(u8 *
+@@ -1991,6 +1991,13 @@ __printf(2, 3) void ethtool_sprintf(u8 *
}
EXPORT_SYMBOL(ethtool_sprintf);