--- a/arch/arm/include/asm/string.h
+++ b/arch/arm/include/asm/string.h
-@@ -68,4 +68,9 @@ static inline void *memset64(uint64_t *p
+@@ -72,4 +72,9 @@ static inline void *memset64(uint64_t *p
#endif
#define USB_VENDOR_ID_BELKIN 0x050d
#define USB_DEVICE_ID_FLIP_KVM 0x3201
-@@ -1479,6 +1482,9 @@
+@@ -1480,6 +1483,9 @@
#define USB_VENDOR_ID_XIAOMI 0x2717
#define USB_DEVICE_ID_MI_SILENT_MOUSE 0x5014
--- a/drivers/hwmon/aht10.c
+++ b/drivers/hwmon/aht10.c
-@@ -57,6 +57,12 @@ static const struct i2c_device_id aht10_
+@@ -62,6 +62,12 @@ static const struct i2c_device_id aht10_
};
MODULE_DEVICE_TABLE(i2c, aht10_id);
/**
* struct aht10_data - All the data required to operate an AHT10/AHT20 chip
* @client: the i2c client associated with the AHT10/AHT20
-@@ -380,6 +386,7 @@ static int aht10_probe(struct i2c_client
+@@ -395,6 +401,7 @@ static int aht10_probe(struct i2c_client
static struct i2c_driver aht10_driver = {
.driver = {
.name = "aht10",
+
config VIDEO_DW9714
tristate "DW9714 lens voice coil support"
- depends on I2C && VIDEO_DEV
+ depends on GPIOLIB && I2C && VIDEO_DEV
--- a/drivers/media/i2c/Makefile
+++ b/drivers/media/i2c/Makefile
@@ -26,6 +26,7 @@ obj-$(CONFIG_VIDEO_ARDUCAM_PIVARIETY) +=
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
-@@ -996,9 +996,6 @@ static int pci_register_host_bridge(stru
+@@ -994,9 +994,6 @@ static int pci_register_host_bridge(stru
else
pr_info("PCI host bridge to bus %s\n", name);
--- a/drivers/hwmon/aht10.c
+++ b/drivers/hwmon/aht10.c
-@@ -37,6 +37,8 @@
- #define AHT10_CMD_MEAS 0b10101100
- #define AHT10_CMD_RST 0b10111010
-
-+#define AHT20_CMD_INIT 0b10111110
-+
- /*
- * Flags in the answer byte/command
- */
-@@ -59,6 +61,7 @@ MODULE_DEVICE_TABLE(i2c, aht10_id);
+@@ -64,6 +64,7 @@ MODULE_DEVICE_TABLE(i2c, aht10_id);
static const struct of_device_id aht10_of_id[] = {
{ .compatible = "aosong,aht10", },
{ }
};
MODULE_DEVICE_TABLE(of, aht10_of_id);
-@@ -107,8 +110,13 @@ struct aht10_data {
- */
- static int aht10_init(struct aht10_data *data)
- {
-- const u8 cmd_init[] = {AHT10_CMD_INIT, AHT10_CAL_ENABLED | AHT10_MODE_CYC,
-- 0x00};
-+ u8 cmd_init[] = {AHT10_CMD_INIT, AHT10_CAL_ENABLED | AHT10_MODE_CYC, 0x00};
-+
-+ if (data->crc8) { /* AHT20 */
-+ cmd_init[0] = AHT20_CMD_INIT;
-+ cmd_init[1] = AHT10_CAL_ENABLED;
-+ }
-+
- int res;
- u8 status;
- struct i2c_client *client = data->client;
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
-@@ -351,6 +351,9 @@ static void pci_read_bridge_io(struct pc
+@@ -349,6 +349,9 @@ static void pci_read_bridge_io(struct pc
unsigned long io_mask, io_granularity, base, limit;
struct pci_bus_region region;
io_mask = PCI_IO_RANGE_MASK;
io_granularity = 0x1000;
if (dev->io_window_1k) {
-@@ -412,6 +415,9 @@ static void pci_read_bridge_mmio_pref(st
+@@ -410,6 +413,9 @@ static void pci_read_bridge_mmio_pref(st
pci_bus_addr_t base, limit;
struct pci_bus_region region;
+++ /dev/null
-From 9fb6fef0fb49124291837af1da5028f79d53f98e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>
-Date: Fri, 14 Jun 2024 13:06:03 +0300
-Subject: [PATCH] resource: Add resource set range and size helpers
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Setting the end address for a resource with a given size lacks a helper and
-is therefore coded manually unlike the getter side which has a helper for
-resource size calculation. Also, almost all callsites that calculate the
-end address for a resource also set the start address right before it like
-this:
-
- res->start = start_addr;
- res->end = res->start + size - 1;
-
-Add resource_set_range(res, start_addr, size) that sets the start address
-and calculates the end address to simplify this often repeated fragment.
-
-Also add resource_set_size() for the cases where setting the start address
-of the resource is not necessary but mention in its kerneldoc that
-resource_set_range() is preferred when setting both addresses.
-
-Link: https://lore.kernel.org/r/20240614100606.15830-2-ilpo.jarvinen@linux.intel.com
-Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
-Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
----
- include/linux/ioport.h | 32 ++++++++++++++++++++++++++++++++
- 1 file changed, 32 insertions(+)
-
---- a/include/linux/ioport.h
-+++ b/include/linux/ioport.h
-@@ -249,6 +249,38 @@ struct resource *lookup_resource(struct
- int adjust_resource(struct resource *res, resource_size_t start,
- resource_size_t size);
- resource_size_t resource_alignment(struct resource *res);
-+
-+/**
-+ * resource_set_size - Calculate resource end address from size and start
-+ * @res: Resource descriptor
-+ * @size: Size of the resource
-+ *
-+ * Calculate the end address for @res based on @size.
-+ *
-+ * Note: The start address of @res must be set when calling this function.
-+ * Prefer resource_set_range() if setting both the start address and @size.
-+ */
-+static inline void resource_set_size(struct resource *res, resource_size_t size)
-+{
-+ res->end = res->start + size - 1;
-+}
-+
-+/**
-+ * resource_set_range - Set resource start and end addresses
-+ * @res: Resource descriptor
-+ * @start: Start address for the resource
-+ * @size: Size of the resource
-+ *
-+ * Set @res start address and calculate the end address based on @size.
-+ */
-+static inline void resource_set_range(struct resource *res,
-+ resource_size_t start,
-+ resource_size_t size)
-+{
-+ res->start = start;
-+ resource_set_size(res, size);
-+}
-+
- static inline resource_size_t resource_size(const struct resource *res)
- {
- return res->end - res->start + 1;
mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN | MAC_MCR_FORCE_LINK;
mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
}
-@@ -4514,6 +4524,61 @@ static int mtk_set_pauseparam(struct net
+@@ -4523,6 +4533,61 @@ static int mtk_set_pauseparam(struct net
return phylink_ethtool_set_pauseparam(mac->phylink, pause);
}
static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev)
{
-@@ -4546,6 +4611,8 @@ static const struct ethtool_ops mtk_etht
+@@ -4555,6 +4620,8 @@ static const struct ethtool_ops mtk_etht
.set_pauseparam = mtk_set_pauseparam,
.get_rxnfc = mtk_get_rxnfc,
.set_rxnfc = mtk_set_rxnfc,
};
static const struct net_device_ops mtk_netdev_ops = {
-@@ -4606,6 +4673,8 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4615,6 +4682,8 @@ static int mtk_add_mac(struct mtk_eth *e
}
mac = netdev_priv(eth->netdev[id]);
eth->mac[id] = mac;
.glo_cfg = 0x4604,
.rst_idx = 0x4608,
.delay_irq = 0x460c,
-@@ -4060,6 +4063,56 @@ static void mtk_set_mcr_max_rx(struct mt
+@@ -4069,6 +4072,56 @@ static void mtk_set_mcr_max_rx(struct mt
mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id));
}
static void mtk_hw_reset(struct mtk_eth *eth)
{
u32 val;
-@@ -4539,6 +4592,8 @@ static void mtk_pending_work(struct work
+@@ -4548,6 +4601,8 @@ static void mtk_pending_work(struct work
rtnl_lock();
set_bit(MTK_RESETTING, ð->state);
-LINUX_VERSION-6.12 = .76
-LINUX_KERNEL_HASH-6.12.76 = bbb43e834c46e6bd49a5c28f22e679a937443404e1f653204d4b24929f3ad896
+LINUX_VERSION-6.12 = .77
+LINUX_KERNEL_HASH-6.12.77 = 358836ebe5caef41e7ae9492e7fbcdf5be6e53ee43c99752aebda81e1b2cff67
static const struct rt6_info ip6_blk_hole_entry_template = {
.dst = {
.__rcuref = RCUREF_INIT(1),
-@@ -1085,6 +1099,7 @@ static const int fib6_prop[RTN_MAX + 1]
+@@ -1086,6 +1100,7 @@ static const int fib6_prop[RTN_MAX + 1]
[RTN_BLACKHOLE] = -EINVAL,
[RTN_UNREACHABLE] = -EHOSTUNREACH,
[RTN_PROHIBIT] = -EACCES,
[RTN_THROW] = -EAGAIN,
[RTN_NAT] = -EINVAL,
[RTN_XRESOLVE] = -EINVAL,
-@@ -1120,6 +1135,10 @@ static void ip6_rt_init_dst_reject(struc
+@@ -1121,6 +1136,10 @@ static void ip6_rt_init_dst_reject(struc
rt->dst.output = ip6_pkt_prohibit_out;
rt->dst.input = ip6_pkt_prohibit;
break;
case RTN_THROW:
case RTN_UNREACHABLE:
default:
-@@ -4610,6 +4629,17 @@ static int ip6_pkt_prohibit_out(struct n
+@@ -4609,6 +4628,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
/*
* Allocate a dst for local (unicast / anycast) address.
*/
-@@ -5101,7 +5131,8 @@ static int rtm_to_fib6_config(struct sk_
+@@ -5100,7 +5130,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT ||
cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL)
-@@ -6372,6 +6403,8 @@ static int ip6_route_dev_notify(struct n
+@@ -6371,6 +6402,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
-@@ -6383,6 +6416,7 @@ static int ip6_route_dev_notify(struct n
+@@ -6382,6 +6415,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif
}
-@@ -6578,6 +6612,8 @@ static int __net_init ip6_route_net_init
+@@ -6577,6 +6611,8 @@ static int __net_init ip6_route_net_init
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.fib6_has_custom_rules = false;
net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
sizeof(*net->ipv6.ip6_prohibit_entry),
GFP_KERNEL);
-@@ -6588,11 +6624,21 @@ static int __net_init ip6_route_net_init
+@@ -6587,11 +6623,21 @@ static int __net_init ip6_route_net_init
ip6_template_metrics, true);
INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->dst.rt_uncached);
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true);
-@@ -6619,6 +6665,8 @@ out:
+@@ -6618,6 +6664,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
-@@ -6638,6 +6686,7 @@ static void __net_exit ip6_route_net_exi
+@@ -6637,6 +6685,7 @@ static void __net_exit ip6_route_net_exi
kfree(net->ipv6.ip6_null_entry);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
kfree(net->ipv6.ip6_blk_hole_entry);
#endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
-@@ -6721,6 +6770,9 @@ void __init ip6_route_init_special_entri
+@@ -6720,6 +6769,9 @@ void __init ip6_route_init_special_entri
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -5148,6 +5148,8 @@ static int mtk_probe(struct platform_dev
+@@ -5157,6 +5157,8 @@ static int mtk_probe(struct platform_dev
dev_err(eth->dev, "failed to allocated dummy device\n");
goto err_unreg_netdev;
}
eth->scratch_ring, eth->phy_scratch_ring);
eth->scratch_ring = NULL;
eth->phy_scratch_ring = 0;
-@@ -5236,6 +5239,9 @@ static void mtk_remove(struct platform_d
+@@ -5245,6 +5248,9 @@ static void mtk_remove(struct platform_d
mtk_mdio_cleanup(eth);
}
static const struct mtk_soc_data mt2701_data = {
.reg_map = &mtk_reg_map,
.caps = MT7623_CAPS | MTK_HWLRO,
-@@ -5244,14 +5250,14 @@ static const struct mtk_soc_data mt2701_
+@@ -5253,14 +5259,14 @@ static const struct mtk_soc_data mt2701_
.required_pctl = true,
.version = 1,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_size = MTK_DMA_SIZE(2K),
-@@ -5272,14 +5278,14 @@ static const struct mtk_soc_data mt7621_
+@@ -5281,14 +5287,14 @@ static const struct mtk_soc_data mt7621_
.hash_offset = 2,
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_size = MTK_DMA_SIZE(2K),
-@@ -5302,14 +5308,14 @@ static const struct mtk_soc_data mt7622_
+@@ -5311,14 +5317,14 @@ static const struct mtk_soc_data mt7622_
.has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_size = MTK_DMA_SIZE(2K),
-@@ -5331,14 +5337,14 @@ static const struct mtk_soc_data mt7623_
+@@ -5340,14 +5346,14 @@ static const struct mtk_soc_data mt7623_
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
.disable_pll_modes = true,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_size = MTK_DMA_SIZE(2K),
-@@ -5357,14 +5363,14 @@ static const struct mtk_soc_data mt7629_
+@@ -5366,14 +5372,14 @@ static const struct mtk_soc_data mt7629_
.has_accounting = true,
.version = 1,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_size = MTK_DMA_SIZE(2K),
-@@ -5387,14 +5393,14 @@ static const struct mtk_soc_data mt7981_
+@@ -5396,14 +5402,14 @@ static const struct mtk_soc_data mt7981_
.has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID_V2,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
-@@ -5417,14 +5423,14 @@ static const struct mtk_soc_data mt7986_
+@@ -5426,14 +5432,14 @@ static const struct mtk_soc_data mt7986_
.has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID_V2,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
-@@ -5447,14 +5453,14 @@ static const struct mtk_soc_data mt7988_
+@@ -5456,14 +5462,14 @@ static const struct mtk_soc_data mt7988_
.has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V3_SIZE,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT_V2,
.dma_l4_valid = RX_DMA_L4_VALID_V2,
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
-@@ -5471,13 +5477,13 @@ static const struct mtk_soc_data rt5350_
+@@ -5480,13 +5486,13 @@ static const struct mtk_soc_data rt5350_
.required_pctl = false,
.version = 1,
.tx = {
return 0;
}
-@@ -4828,6 +4979,7 @@ static const struct net_device_ops mtk_n
+@@ -4837,6 +4988,7 @@ static const struct net_device_ops mtk_n
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
{
const __be32 *_id = of_get_property(np, "reg", NULL);
phy_interface_t phy_mode;
struct phylink *phylink;
struct mtk_mac *mac;
-@@ -4866,16 +5018,44 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4875,16 +5027,44 @@ static int mtk_add_mac(struct mtk_eth *e
mac->id = id;
mac->hw = eth;
mac->of_node = np;
}
memset(mac->hwlro_ip, 0, sizeof(mac->hwlro_ip));
-@@ -4958,8 +5138,21 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4967,8 +5147,21 @@ static int mtk_add_mac(struct mtk_eth *e
phy_interface_zero(mac->phylink_config.supported_interfaces);
__set_bit(PHY_INTERFACE_MODE_INTERNAL,
mac->phylink_config.supported_interfaces);
phylink = phylink_create(&mac->phylink_config,
of_fwnode_handle(mac->of_node),
phy_mode, &mtk_phylink_ops);
-@@ -5010,6 +5203,26 @@ free_netdev:
+@@ -5019,6 +5212,26 @@ free_netdev:
return err;
}
void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev)
{
struct net_device *dev, *tmp;
-@@ -5156,7 +5369,8 @@ static int mtk_probe(struct platform_dev
+@@ -5165,7 +5378,8 @@ static int mtk_probe(struct platform_dev
regmap_write(cci, 0, 3);
}
err = mtk_sgmii_init(eth);
if (err)
-@@ -5267,6 +5481,24 @@ static int mtk_probe(struct platform_dev
+@@ -5276,6 +5490,24 @@ static int mtk_probe(struct platform_dev
}
}
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) {
err = devm_request_irq(eth->dev, eth->irq[0],
mtk_handle_irq, 0,
-@@ -5377,6 +5609,11 @@ static void mtk_remove(struct platform_d
+@@ -5386,6 +5618,11 @@ static void mtk_remove(struct platform_d
mtk_stop(eth->netdev[i]);
mac = netdev_priv(eth->netdev[i]);
phylink_disconnect_phy(mac->phylink);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -5647,7 +5647,7 @@ static const struct mtk_soc_data mt2701_
+@@ -5656,7 +5656,7 @@ static const struct mtk_soc_data mt2701_
DESC_SIZE(struct mtk_rx_dma),
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
-@@ -5675,7 +5675,7 @@ static const struct mtk_soc_data mt7621_
+@@ -5684,7 +5684,7 @@ static const struct mtk_soc_data mt7621_
DESC_SIZE(struct mtk_rx_dma),
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
-@@ -5705,7 +5705,7 @@ static const struct mtk_soc_data mt7622_
+@@ -5714,7 +5714,7 @@ static const struct mtk_soc_data mt7622_
DESC_SIZE(struct mtk_rx_dma),
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
-@@ -5734,7 +5734,7 @@ static const struct mtk_soc_data mt7623_
+@@ -5743,7 +5743,7 @@ static const struct mtk_soc_data mt7623_
DESC_SIZE(struct mtk_rx_dma),
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
-@@ -5760,7 +5760,7 @@ static const struct mtk_soc_data mt7629_
+@@ -5769,7 +5769,7 @@ static const struct mtk_soc_data mt7629_
DESC_SIZE(struct mtk_rx_dma),
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
-@@ -5792,7 +5792,7 @@ static const struct mtk_soc_data mt7981_
+@@ -5801,7 +5801,7 @@ static const struct mtk_soc_data mt7981_
.dma_l4_valid = RX_DMA_L4_VALID_V2,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
};
-@@ -5822,7 +5822,7 @@ static const struct mtk_soc_data mt7986_
+@@ -5831,7 +5831,7 @@ static const struct mtk_soc_data mt7986_
.dma_l4_valid = RX_DMA_L4_VALID_V2,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
};
-@@ -5875,7 +5875,7 @@ static const struct mtk_soc_data rt5350_
+@@ -5884,7 +5884,7 @@ static const struct mtk_soc_data rt5350_
.dma_l4_valid = RX_DMA_L4_VALID_PDMA,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
help
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4747,6 +4747,7 @@ static int mtk_get_sset_count(struct net
+@@ -4756,6 +4756,7 @@ static int mtk_get_sset_count(struct net
static void mtk_ethtool_pp_stats(struct mtk_eth *eth, u64 *data)
{
struct page_pool_stats stats = {};
int i;
-@@ -4759,6 +4760,7 @@ static void mtk_ethtool_pp_stats(struct
+@@ -4768,6 +4769,7 @@ static void mtk_ethtool_pp_stats(struct
page_pool_get_stats(ring->page_pool, &stats);
}
page_pool_ethtool_stats_get(data, &stats);
/**
* ata_build_rw_tf - Build ATA taskfile for given read/write request
* @qc: Metadata associated with the taskfile to build
-@@ -4818,6 +4829,9 @@ void __ata_qc_complete(struct ata_queued
+@@ -4807,6 +4818,9 @@ void __ata_qc_complete(struct ata_queued
link->active_tag = ATA_TAG_POISON;
ap->nr_active_links--;
}
/* clear exclusive status */
if (unlikely(qc->flags & ATA_QCFLAG_CLEAR_EXCL &&
-@@ -5546,6 +5560,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -5536,6 +5550,9 @@ struct ata_port *ata_port_alloc(struct a
ap->stats.unhandled_irq = 1;
ap->stats.idle_irq = 1;
#endif
ata_sff_port_init(ap);
ata_force_pflags(ap);
-@@ -5562,6 +5579,12 @@ void ata_port_free(struct ata_port *ap)
+@@ -5552,6 +5569,12 @@ void ata_port_free(struct ata_port *ap)
kfree(ap->pmp_link);
kfree(ap->slave_link);
ida_free(&ata_ida, ap->print_id);
kfree(ap);
}
EXPORT_SYMBOL_GPL(ata_port_free);
-@@ -5966,7 +5989,23 @@ int ata_host_register(struct ata_host *h
+@@ -5956,7 +5979,23 @@ int ata_host_register(struct ata_host *h
WARN_ON(1);
return -EINVAL;
}
/*
* Define if arch has non-standard setup. This is a _PCI_ standard
-@@ -935,6 +938,10 @@ struct ata_port {
+@@ -937,6 +940,10 @@ struct ata_port {
#ifdef CONFIG_ATA_ACPI
struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */
#endif
if (mtk_is_netsys_v1(eth))
val |= MTK_QTX_SCH_LEAKY_BUCKET_EN;
mtk_w32(eth, val, soc->reg_map->qdma.qtx_sch + ofs);
-@@ -5883,6 +5919,36 @@ static const struct mtk_soc_data mt7986_
+@@ -5892,6 +5928,36 @@ static const struct mtk_soc_data mt7986_
},
};
static const struct mtk_soc_data mt7988_data = {
.reg_map = &mt7988_reg_map,
.ana_rgc3 = 0x128,
-@@ -5944,6 +6010,7 @@ const struct of_device_id of_mtk_match[]
+@@ -5953,6 +6019,7 @@ const struct of_device_id of_mtk_match[]
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data },
{ .compatible = "mediatek,mt7981-eth", .data = &mt7981_data },
{ .compatible = "mediatek,mt7986-eth", .data = &mt7986_data },
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4452,27 +4452,40 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -4461,27 +4461,40 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_w32(eth, PSE_DUMMY_WORK_GDM(1) | PSE_DUMMY_WORK_GDM(2) |
PSE_DUMMY_WORK_GDM(3) | DUMMY_PAGE_THR, PSE_DUMY_REQ);
+++ /dev/null
-From 6c28aa8dfdf24f554d4c5d4ff7d723a95360d94a Mon Sep 17 00:00:00 2001
-From: Daniel Machon <daniel.machon@microchip.com>
-Date: Tue, 10 Feb 2026 14:44:01 +0100
-Subject: [PATCH] net: sparx5/lan969x: fix DWRR cost max to match hardware
- register width
-
-DWRR (Deficit Weighted Round Robin) scheduling distributes bandwidth
-across traffic classes based on per-queue cost values, where lower cost
-means higher bandwidth share.
-
-The SPX5_DWRR_COST_MAX constant is 63 (6 bits) but the hardware
-register field HSCH_DWRR_ENTRY_DWRR_COST is GENMASK(24, 20), only
-5 bits wide (max 31). This causes sparx5_weight_to_hw_cost() to
-compute cost values that silently overflow via FIELD_PREP, resulting
-in incorrect scheduling weights.
-
-Set SPX5_DWRR_COST_MAX to 31 to match the hardware register width.
-
-Fixes: 211225428d65 ("net: microchip: sparx5: add support for offloading ets qdisc")
-Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
-Reviewed-by: Simon Horman <horms@kernel.org>
-Link: https://patch.msgid.link/20260210-sparx5-fix-dwrr-cost-max-v1-1-58fbdbc25652@microchip.com
-Signed-off-by: Jakub Kicinski <kuba@kernel.org>
----
- drivers/net/ethernet/microchip/sparx5/sparx5_qos.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/microchip/sparx5/sparx5_qos.h
-+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_qos.h
-@@ -35,7 +35,7 @@
- #define SPX5_SE_BURST_UNIT 4096
-
- /* Dwrr */
--#define SPX5_DWRR_COST_MAX 63
-+#define SPX5_DWRR_COST_MAX 31
-
- struct sparx5_shaper {
- u32 mode;
--- a/drivers/irqchip/irq-sifive-plic.c
+++ b/drivers/irqchip/irq-sifive-plic.c
-@@ -204,6 +204,9 @@ static struct irq_chip plic_edge_chip =
+@@ -209,6 +209,9 @@ static struct irq_chip plic_edge_chip =
#endif
.irq_set_type = plic_irq_set_type,
.flags = IRQCHIP_SKIP_SET_WAKE |
IRQCHIP_AFFINITY_PRE_STARTUP,
};
-@@ -219,6 +222,9 @@ static struct irq_chip plic_chip = {
+@@ -224,6 +227,9 @@ static struct irq_chip plic_chip = {
#endif
.irq_set_type = plic_irq_set_type,
.flags = IRQCHIP_SKIP_SET_WAKE |