-LINUX_VERSION-5.10 = .177
-LINUX_KERNEL_HASH-5.10.177 = 9f2261fea804112dcec8fa2dcc26e9c1388aa9cb7f86e5913beb00b9b5a15571
+LINUX_VERSION-5.10 = .178
+LINUX_KERNEL_HASH-5.10.178 = 1acfade3715e560f00fb30615d5471e24b3940b549381558787aee9734e7a8af
xhci->quirks |= XHCI_RESET_ON_RESUME;
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
-@@ -427,10 +427,14 @@ static int xhci_try_enable_msi(struct us
+@@ -431,10 +431,14 @@ static int xhci_try_enable_msi(struct us
free_irq(hcd->irq, hcd);
hcd->irq = 0;
#ifdef CONFIG_MACB_USE_HWSTAMP
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
-@@ -3824,15 +3824,15 @@ static int macb_init(struct platform_dev
+@@ -3828,15 +3828,15 @@ static int macb_init(struct platform_dev
if (!(bp->caps & MACB_CAPS_USRIO_DISABLED)) {
val = 0;
if (phy_interface_mode_is_rgmii(bp->phy_interface))
macb_or_gem_writel(bp, USRIO, val);
}
-@@ -4350,6 +4350,13 @@ static int fu540_c000_init(struct platfo
+@@ -4354,6 +4354,13 @@ static int fu540_c000_init(struct platfo
return macb_init(pdev);
}
static const struct macb_config fu540_c000_config = {
.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO |
MACB_CAPS_GEM_HAS_PTP,
-@@ -4357,12 +4364,14 @@ static const struct macb_config fu540_c0
+@@ -4361,12 +4368,14 @@ static const struct macb_config fu540_c0
.clk_init = fu540_c000_clk_init,
.init = fu540_c000_init,
.jumbo_max_len = 10240,
};
static const struct macb_config sama5d3macb_config = {
-@@ -4370,6 +4379,7 @@ static const struct macb_config sama5d3m
+@@ -4374,6 +4383,7 @@ static const struct macb_config sama5d3m
| MACB_CAPS_USRIO_HAS_CLKEN | MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII,
.clk_init = macb_clk_init,
.init = macb_init,
};
static const struct macb_config pc302gem_config = {
-@@ -4377,6 +4387,7 @@ static const struct macb_config pc302gem
+@@ -4381,6 +4391,7 @@ static const struct macb_config pc302gem
.dma_burst_length = 16,
.clk_init = macb_clk_init,
.init = macb_init,
};
static const struct macb_config sama5d2_config = {
-@@ -4384,6 +4395,7 @@ static const struct macb_config sama5d2_
+@@ -4388,6 +4399,7 @@ static const struct macb_config sama5d2_
.dma_burst_length = 16,
.clk_init = macb_clk_init,
.init = macb_init,
};
static const struct macb_config sama5d3_config = {
-@@ -4393,6 +4405,7 @@ static const struct macb_config sama5d3_
+@@ -4397,6 +4409,7 @@ static const struct macb_config sama5d3_
.clk_init = macb_clk_init,
.init = macb_init,
.jumbo_max_len = 10240,
};
static const struct macb_config sama5d4_config = {
-@@ -4400,18 +4413,21 @@ static const struct macb_config sama5d4_
+@@ -4404,18 +4417,21 @@ static const struct macb_config sama5d4_
.dma_burst_length = 4,
.clk_init = macb_clk_init,
.init = macb_init,
};
static const struct macb_config zynqmp_config = {
-@@ -4422,6 +4438,7 @@ static const struct macb_config zynqmp_c
+@@ -4426,6 +4442,7 @@ static const struct macb_config zynqmp_c
.clk_init = macb_clk_init,
.init = macb_init,
.jumbo_max_len = 10240,
};
static const struct macb_config zynq_config = {
-@@ -4430,6 +4447,7 @@ static const struct macb_config zynq_con
+@@ -4434,6 +4451,7 @@ static const struct macb_config zynq_con
.dma_burst_length = 16,
.clk_init = macb_clk_init,
.init = macb_init,
};
static const struct of_device_id macb_dt_ids[] = {
-@@ -4550,6 +4568,8 @@ static int macb_probe(struct platform_de
+@@ -4554,6 +4572,8 @@ static int macb_probe(struct platform_de
bp->wol |= MACB_WOL_HAS_MAGIC_PACKET;
device_set_wakeup_capable(&pdev->dev, bp->wol & MACB_WOL_HAS_MAGIC_PACKET);
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
-@@ -3599,6 +3599,20 @@ static void macb_probe_queues(void __iom
+@@ -3603,6 +3603,20 @@ static void macb_probe_queues(void __iom
*num_queues = hweight32(*queue_mask);
}
static int macb_clk_init(struct platform_device *pdev, struct clk **pclk,
struct clk **hclk, struct clk **tx_clk,
struct clk **rx_clk, struct clk **tsu_clk)
-@@ -4661,11 +4675,7 @@ err_out_free_netdev:
+@@ -4665,11 +4679,7 @@ err_out_free_netdev:
free_netdev(dev);
err_disable_clocks:
pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);
-@@ -4690,11 +4700,8 @@ static int macb_remove(struct platform_d
+@@ -4694,11 +4704,8 @@ static int macb_remove(struct platform_d
pm_runtime_disable(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);
if (!pm_runtime_suspended(&pdev->dev)) {
pm_runtime_set_suspended(&pdev->dev);
}
phylink_destroy(bp->phylink);
-@@ -4873,13 +4880,10 @@ static int __maybe_unused macb_runtime_s
+@@ -4877,13 +4884,10 @@ static int __maybe_unused macb_runtime_s
struct net_device *netdev = dev_get_drvdata(dev);
struct macb *bp = netdev_priv(netdev);
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
-@@ -4331,8 +4331,10 @@ static int fu540_c000_clk_init(struct pl
+@@ -4335,8 +4335,10 @@ static int fu540_c000_clk_init(struct pl
return err;
mgmt = devm_kzalloc(&pdev->dev, sizeof(*mgmt), GFP_KERNEL);
init.name = "sifive-gemgxl-mgmt";
init.ops = &fu540_c000_ops;
-@@ -4343,16 +4345,26 @@ static int fu540_c000_clk_init(struct pl
+@@ -4347,16 +4349,26 @@ static int fu540_c000_clk_init(struct pl
mgmt->hw.init = &init;
*tx_clk = devm_clk_register(&pdev->dev, &mgmt->hw);
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
-@@ -4383,6 +4383,14 @@ static const struct macb_usrio_config ma
+@@ -4387,6 +4387,14 @@ static const struct macb_usrio_config ma
.refclk = MACB_BIT(CLKEN),
};
static const struct macb_config fu540_c000_config = {
.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO |
MACB_CAPS_GEM_HAS_PTP,
-@@ -4476,6 +4484,14 @@ static const struct macb_config zynq_con
+@@ -4480,6 +4488,14 @@ static const struct macb_config zynq_con
.usrio = &macb_default_usrio,
};
static const struct of_device_id macb_dt_ids[] = {
{ .compatible = "cdns,at32ap7000-macb" },
{ .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
-@@ -4493,6 +4509,7 @@ static const struct of_device_id macb_dt
+@@ -4497,6 +4513,7 @@ static const struct of_device_id macb_dt
{ .compatible = "cdns,zynqmp-gem", .data = &zynqmp_config},
{ .compatible = "cdns,zynq-gem", .data = &zynq_config },
{ .compatible = "sifive,fu540-c000-gem", .data = &fu540_c000_config },
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
-@@ -4492,6 +4492,14 @@ static const struct macb_config sama7g5_
+@@ -4496,6 +4496,14 @@ static const struct macb_config sama7g5_
.usrio = &sama7g5_usrio,
};
static const struct of_device_id macb_dt_ids[] = {
{ .compatible = "cdns,at32ap7000-macb" },
{ .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
-@@ -4510,6 +4518,7 @@ static const struct of_device_id macb_dt
+@@ -4514,6 +4522,7 @@ static const struct of_device_id macb_dt
{ .compatible = "cdns,zynq-gem", .data = &zynq_config },
{ .compatible = "sifive,fu540-c000-gem", .data = &fu540_c000_config },
{ .compatible = "microchip,sama7g5-gem", .data = &sama7g5_gem_config },
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
-@@ -3861,6 +3861,13 @@ static int macb_init(struct platform_dev
+@@ -3865,6 +3865,13 @@ static int macb_init(struct platform_dev
return 0;
}
#if defined(CONFIG_OF)
/* 1518 rounded up */
#define AT91ETHER_MAX_RBUFF_SZ 0x600
-@@ -4376,13 +4383,6 @@ static int fu540_c000_init(struct platfo
+@@ -4380,13 +4387,6 @@ static int fu540_c000_init(struct platfo
return macb_init(pdev);
}
static const struct macb_usrio_config sama7g5_usrio = {
.mii = 0,
.rmii = 1,
-@@ -4531,6 +4531,7 @@ static const struct macb_config default_
+@@ -4535,6 +4535,7 @@ static const struct macb_config default_
.dma_burst_length = 16,
.clk_init = macb_clk_init,
.init = macb_init,
void __user *argp = (void __user *)arg;
long ret = 0;
-@@ -1180,6 +1205,15 @@ static long do_fb_ioctl(struct fb_info *
+@@ -1182,6 +1207,15 @@ static long do_fb_ioctl(struct fb_info *
unlock_fb_info(info);
console_unlock();
break;
default:
lock_fb_info(info);
fb = info->fbops;
-@@ -1325,6 +1359,7 @@ static long fb_compat_ioctl(struct file
+@@ -1327,6 +1361,7 @@ static long fb_compat_ioctl(struct file
case FBIOPAN_DISPLAY:
case FBIOGET_CON2FBMAP:
case FBIOPUT_CON2FBMAP:
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
-@@ -1494,6 +1494,103 @@ command_cleanup:
+@@ -1498,6 +1498,103 @@ command_cleanup:
}
/*
* non-error returns are a promise to giveback() the urb later
* we drop ownership so next owner (or urb unlink) can get it
*/
-@@ -5414,6 +5511,7 @@ static const struct hc_driver xhci_hc_dr
+@@ -5418,6 +5515,7 @@ static const struct hc_driver xhci_hc_dr
.endpoint_reset = xhci_endpoint_reset,
.check_bandwidth = xhci_check_bandwidth,
.reset_bandwidth = xhci_reset_bandwidth,
--- a/Makefile
+++ b/Makefile
-@@ -1376,6 +1376,9 @@ ifneq ($(dtstree),)
+@@ -1378,6 +1378,9 @@ ifneq ($(dtstree),)
%.dtb: include/config/kernel.release scripts_dtc
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
--- a/Makefile
+++ b/Makefile
-@@ -1376,7 +1376,7 @@ ifneq ($(dtstree),)
+@@ -1378,7 +1378,7 @@ ifneq ($(dtstree),)
%.dtb: include/config/kernel.release scripts_dtc
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_dp_helper.h>
#include <drm/drm_edid.h>
-@@ -1161,8 +1162,10 @@ nv50_msto_new(struct drm_device *dev, st
+@@ -1193,8 +1194,10 @@ nv50_msto_new(struct drm_device *dev, st
static struct drm_encoder *
nv50_mstc_atomic_best_encoder(struct drm_connector *connector,
/* called during probe() after chip reset completes */
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
-@@ -158,6 +158,49 @@ int xhci_start(struct xhci_hcd *xhci)
+@@ -159,6 +159,49 @@ int xhci_start(struct xhci_hcd *xhci)
return ret;
}
/*
* Reset a halted HC.
*
-@@ -608,10 +651,20 @@ static int xhci_init(struct usb_hcd *hcd
+@@ -612,10 +655,20 @@ static int xhci_init(struct usb_hcd *hcd
static int xhci_run_finished(struct xhci_hcd *xhci)
{
xhci->shared_hcd->state = HC_STATE_RUNNING;
xhci->cmd_ring_state = CMD_RING_STATE_RUNNING;
-@@ -621,6 +674,10 @@ static int xhci_run_finished(struct xhci
+@@ -625,6 +678,10 @@ static int xhci_run_finished(struct xhci
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
"Finished xhci_run for USB3 roothub");
return 0;
+++ /dev/null
-From 1e020e1b96afdecd20680b5b5be2a6ffc3d27628 Mon Sep 17 00:00:00 2001
-From: Zhihao Cheng <chengzhihao1@huawei.com>
-Date: Mon, 6 Mar 2023 09:33:08 +0800
-Subject: [PATCH] ubi: Fix failure attaching when vid_hdr offset equals to
- (sub)page size
-
-Following process will make ubi attaching failed since commit
-1b42b1a36fc946 ("ubi: ensure that VID header offset ... size"):
-
-ID="0xec,0xa1,0x00,0x15" # 128M 128KB 2KB
-modprobe nandsim id_bytes=$ID
-flash_eraseall /dev/mtd0
-modprobe ubi mtd="0,2048" # set vid_hdr offset as 2048 (one page)
-(dmesg):
- ubi0 error: ubi_attach_mtd_dev [ubi]: VID header offset 2048 too large.
- UBI error: cannot attach mtd0
- UBI error: cannot initialize UBI, error -22
-
-Rework original solution, the key point is making sure
-'vid_hdr_shift + UBI_VID_HDR_SIZE < ubi->vid_hdr_alsize',
-so we should check vid_hdr_shift rather not vid_hdr_offset.
-Then, ubi still support (sub)page aligined VID header offset.
-
-Fixes: 1b42b1a36fc946 ("ubi: ensure that VID header offset ... size")
-Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
-Tested-by: Nicolas Schichan <nschichan@freebox.fr>
-Tested-by: Miquel Raynal <miquel.raynal@bootlin.com> # v5.10, v4.19
-Signed-off-by: Richard Weinberger <richard@nod.at>
----
- drivers/mtd/ubi/build.c | 21 +++++++++++++++------
- 1 file changed, 15 insertions(+), 6 deletions(-)
-
---- a/drivers/mtd/ubi/build.c
-+++ b/drivers/mtd/ubi/build.c
-@@ -665,12 +665,6 @@ static int io_init(struct ubi_device *ub
- ubi->ec_hdr_alsize = ALIGN(UBI_EC_HDR_SIZE, ubi->hdrs_min_io_size);
- ubi->vid_hdr_alsize = ALIGN(UBI_VID_HDR_SIZE, ubi->hdrs_min_io_size);
-
-- if (ubi->vid_hdr_offset && ((ubi->vid_hdr_offset + UBI_VID_HDR_SIZE) >
-- ubi->vid_hdr_alsize)) {
-- ubi_err(ubi, "VID header offset %d too large.", ubi->vid_hdr_offset);
-- return -EINVAL;
-- }
--
- dbg_gen("min_io_size %d", ubi->min_io_size);
- dbg_gen("max_write_size %d", ubi->max_write_size);
- dbg_gen("hdrs_min_io_size %d", ubi->hdrs_min_io_size);
-@@ -688,6 +682,21 @@ static int io_init(struct ubi_device *ub
- ubi->vid_hdr_aloffset;
- }
-
-+ /*
-+ * Memory allocation for VID header is ubi->vid_hdr_alsize
-+ * which is described in comments in io.c.
-+ * Make sure VID header shift + UBI_VID_HDR_SIZE not exceeds
-+ * ubi->vid_hdr_alsize, so that all vid header operations
-+ * won't access memory out of bounds.
-+ */
-+ if ((ubi->vid_hdr_shift + UBI_VID_HDR_SIZE) > ubi->vid_hdr_alsize) {
-+ ubi_err(ubi, "Invalid VID header offset %d, VID header shift(%d)"
-+ " + VID header size(%zu) > VID header aligned size(%d).",
-+ ubi->vid_hdr_offset, ubi->vid_hdr_shift,
-+ UBI_VID_HDR_SIZE, ubi->vid_hdr_alsize);
-+ return -EINVAL;
-+ }
-+
- /* Similar for the data offset */
- ubi->leb_start = ubi->vid_hdr_offset + UBI_VID_HDR_SIZE;
- ubi->leb_start = ALIGN(ubi->leb_start, ubi->min_io_size);
if (bgmac->irq < 0)
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
-@@ -4480,7 +4480,6 @@ static int macb_probe(struct platform_de
+@@ -4484,7 +4484,6 @@ static int macb_probe(struct platform_de
struct net_device *dev;
struct resource *regs;
void __iomem *mem;
struct macb *bp;
int err, val;
-@@ -4593,15 +4592,11 @@ static int macb_probe(struct platform_de
+@@ -4597,15 +4596,11 @@ static int macb_probe(struct platform_de
if (bp->caps & MACB_CAPS_NEEDS_RSTONUBR)
bp->rx_intr_mask |= MACB_BIT(RXUBR);
int irq;
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -5015,7 +5015,7 @@ int stmmac_dvr_probe(struct device *devi
+@@ -5019,7 +5019,7 @@ int stmmac_dvr_probe(struct device *devi
priv->wol_irq = res->wol_irq;
priv->lpi_irq = res->lpi_irq;
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -2352,6 +2352,13 @@ config UNUSED_KSYMS_WHITELIST
+@@ -2364,6 +2364,13 @@ config UNUSED_KSYMS_WHITELIST
one per line. The path can be absolute, or relative to the kernel
source tree.
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -2384,7 +2384,7 @@ config PADATA
+@@ -2396,7 +2396,7 @@ config PADATA
bool
config ASN1
__le64 signature;
--- a/drivers/mtd/mtdblock.c
+++ b/drivers/mtd/mtdblock.c
-@@ -334,7 +334,11 @@ static void mtdblock_remove_dev(struct m
+@@ -338,7 +338,11 @@ static void mtdblock_remove_dev(struct m
static struct mtd_blktrans_ops mtdblock_tr = {
.name = "mtdblock",
.major = MTD_BLOCK_MAJOR,
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1389,6 +1389,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
+@@ -1401,6 +1401,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
the unaligned access emulation.
see arch/parisc/kernel/unaligned.c for reference
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1805,6 +1805,15 @@ config EMBEDDED
+@@ -1817,6 +1817,15 @@ config EMBEDDED
an embedded system so certain expert options are available
for configuration.
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -5048,6 +5048,10 @@ int stmmac_dvr_probe(struct device *devi
+@@ -5052,6 +5052,10 @@ int stmmac_dvr_probe(struct device *devi
reset_control_reset(priv->plat->stmmac_rst);
}
/* Init MAC and get the capabilities */
ret = stmmac_hw_init(priv);
if (ret)
-@@ -5262,6 +5266,7 @@ int stmmac_dvr_remove(struct device *dev
+@@ -5266,6 +5270,7 @@ int stmmac_dvr_remove(struct device *dev
phylink_destroy(priv->phylink);
if (priv->plat->stmmac_rst)
reset_control_assert(priv->plat->stmmac_rst);
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
-@@ -1966,6 +1966,13 @@ static void sfp_sm_module(struct sfp *sf
+@@ -1968,6 +1968,13 @@ static void sfp_sm_module(struct sfp *sf
return;
}
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
-@@ -413,32 +413,72 @@ static int sfp_i2c_write(struct sfp *sfp
+@@ -419,32 +419,72 @@ static int sfp_i2c_write(struct sfp *sfp
return ret == ARRAY_SIZE(msgs) ? len : 0;
}