Commit Graph

9849 Commits

Author SHA1 Message Date
Tao Huang
0c5f11d591 mtd: rknand: Fix typo in Rockchip copyright notice
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ia01ee5601474bbf4937fe198bd1b51a99d1f87c6
2025-01-22 19:24:37 +08:00
Tao Huang
8e8bec3797 mtd: bbt_store: Fix typos in Rockchip copyright notice
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I4fb28f10580711d2c524c04b0bc94dc4cb9f2d6e
2025-01-22 19:24:35 +08:00
Tao Huang
64786cc312 mtd: rawnand: rockchip: Fix typo in Rockchip copyright notice
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I12965ad29f1be0d0e1e7f60e8d45e40525b785e8
2025-01-22 18:51:19 +08:00
Miquel Raynal
6f42afbf70 UPSTREAM: mtd: Clean refcounting with MTD_PARTITIONED_MASTER
The logic is way too convoluted, let's clean the kref_get/put section to
clarify what this block does when using CONFIG_MTD_PARTITIONED_MASTER:
- Iterate through all the parent mtd devices
- Grab a reference over them all but the master
- Only grab the master whith CONFIG_MTD_PARTITIONED_MASTER
Same logic must apply in the put path, otherwise it would be broken.

Cc: Tomas Winkler <tomas.winkler@intel.com>
Cc: Alexander Usyskin <alexander.usyskin@intel.com>
Cc: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Fixes: 19bfa9ebebb5 ("mtd: use refcount to prevent corruption")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Tested-by: Alexander Usyskin <alexander.usyskin@intel.com>
Link: https://lore.kernel.org/linux-mtd/20230731090903.770277-1-miquel.raynal@bootlin.com
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 264725e35fbc3b67e053a405e022393a6017e6da)
Change-Id: Iff8dd692dda07361a1c4bc9db73908dfd8256419
2025-01-20 09:04:43 +00:00
Alexander Usyskin
6c3662a2c5 UPSTREAM: mtd: call external _get and _put in right order
MTD provider provides mtd_info object to mtd subsystem.
With kref patch the mtd_info object can be alive after
provider released mtd device.
Fix calling order in _get and _put functions to allow
mtd provider to safely alloc and release mtd object.

Execute:
1) call external _get
2) get_module
3) add internal kref
in the get function and opposite order in the put one.

The _put_device callback should be the last in put
as the master struct memory may be freed in this callback.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230620131905.648089-3-alexander.usyskin@intel.com
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 79c4a56250216991f1d965ee26dcd273376e4e91)
Change-Id: I12b1b5f3ac0bcc432cee429c5c56a057e0a2e589
2025-01-20 09:04:43 +00:00
Alexander Usyskin
1cc0c0baa3 UPSTREAM: mtd: fix use-after-free in mtd release
I case of partition device_unregister() in mtd_device_release()
calls mtd_release() which frees mtd_info structure for partition.
All code after device_unregister in mtd_device_release thus
uses already freed memory.

Move part of code to mtd_release() and restict mtd->dev cleanup
to non-partion object.
For partition object such cleanup have no sense as partition
mtd_info is removed.

Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Fixes: 19bfa9ebebb5 ("mtd: use refcount to prevent corruption")
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230731115836.542747-1-alexander.usyskin@intel.com
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit e9714c22c1a8238a85d069b1517941fc723312f7)
Change-Id: Ie124021921b2f5efcb131b5c4860e19efaf5228a
2025-01-20 09:04:43 +00:00
Tomas Winkler
b088c5c203 UPSTREAM: mtd: use refcount to prevent corruption
When underlying device is removed mtd core will crash
in case user space is holding open handle.
Need to use proper refcounting so device is release
only when has no users.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230620131905.648089-2-alexander.usyskin@intel.com
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 19bfa9ebebb5ec0695def57eb1d80de7e9cab369)
Change-Id: I95b670fa24e6411867cfa517560802e58a183ef8
2025-01-20 09:04:43 +00:00
Jon Lin
af9ab5cb58 mtd: spi-nor: xmc: Support XM25QU256C
Change-Id: I2ad00d784627f2ca69c6bec46d97ab1415facc42
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-01-17 00:09:54 +08:00
Jon Lin
ba3c36d8c2 mtd: spinand: UNIM: Support new device UM19A0XISW
UM19A0HISW, UM19A0LISW.

Change-Id: I29baad2badf95ce2bd6daeb8819e99efb7e1d3fd
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-01-16 23:53:43 +08:00
Jon Lin
e625024f13 mtd: spinand: xtx: Support new devices
XT26G12DWSIGA, XT26Q12DWSIGA, XT26G11DWSIGA, XT26Q14DWSIGA.

Change-Id: I733172ed78a95f4d2129c98c9d2c6b92525bde4c
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-01-16 23:53:43 +08:00
Tao Huang
96900fe2fe Merge tag 'v6.1.115'
This is the 6.1.115 stable release

* tag 'v6.1.115': (2780 commits)
  Linux 6.1.115
  xfrm: validate new SA's prefixlen using SA family when sel.family is unset
  arm64/uprobes: change the uprobe_opcode_t typedef to fix the sparse warning
  ACPI: PRM: Clean up guid type in struct prm_handler_info
  platform/x86: dell-wmi: Ignore suspend notifications
  ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
  net: phy: dp83822: Fix reset pin definitions
  serial: protect uart_port_dtr_rts() in uart_shutdown() too
  selinux: improve error checking in sel_write_load()
  drm/amd/display: Disable PSR-SU on Parade 08-01 TCON too
  hv_netvsc: Fix VF namespace also in synthetic NIC NETDEV_REGISTER event
  xfrm: fix one more kernel-infoleak in algo dumping
  LoongArch: Get correct cores_per_package for SMT systems
  ALSA: hda/realtek: Add subwoofer quirk for Acer Predator G9-593
  KVM: arm64: Don't eagerly teardown the vgic on init error
  KVM: nSVM: Ignore nCR3[4:0] when loading PDPTEs from memory
  openat2: explicitly return -E2BIG for (usize > PAGE_SIZE)
  nilfs2: fix kernel bug due to missing clearing of buffer delay flag
  ACPI: button: Add DMI quirk for Samsung Galaxy Book2 to fix initial lid detection issue
  ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context
  ...

Change-Id: Iee600c49a5c914b79141c62cda38e787e429a167

Conflicts:
	arch/arm64/boot/dts/rockchip/rk356x.dtsi
	drivers/gpio/gpio-rockchip.c
	drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop.h
	drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
	drivers/gpu/drm/rockchip/rockchip_vop_reg.c
	drivers/media/i2c/imx335.c
	drivers/pci/controller/dwc/pcie-dw-rockchip.c
	drivers/spi/spi-rockchip.c
	drivers/spi/spidev.c
	drivers/usb/dwc3/gadget.c
	drivers/usb/host/xhci.h
2025-01-10 17:48:57 +08:00
Jon Lin
05d9d625eb mtd: spi-nor: Make spi_nor_wait_till_ready_with_msleep() static
drivers/mtd/spi-nor/core.c:736:5: warning: no previous prototype for ‘spi_nor_wait_till_ready_with_msleep’ [-Wmissing-prototypes]

Fixes a7b3870670 ("mtd: spi-nor: core: Change to use msleep for erase ops")
Change-Id: If2add4f5614f5337b5bd872db8a1b5149b7c4221
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-12-30 06:28:48 +00:00
Jon Lin
f5031143d9 mtd: spi-nor: boya: Support BY25Q64ESSIG
Change-Id: Ia670d98504a9bb1a2a9be5481b2186ecdabe1cce
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-12-23 18:31:04 +08:00
Jon Lin
999ff49607 mtd: spi-nor: puya: Support PY25Q256LC
Change-Id: I99a39fc0cf86477aa97e4eb555856d8f6a0e9e77
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-12-23 18:30:49 +08:00
Jon Lin
9764ff4348 mtd: spi-nor: esmt: Support en25qx64a
Change-Id: Ic52e1748c80aed6feea17aa5dbeab262c7b55f0a
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-12-23 18:30:41 +08:00
Tao Huang
7c5c062446 mtd: spinand: Fix typos in Rockchip copyright notices
There are many cases in which the company name is misspelled.
The patch fixes these typos.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ib8582ea151037c5ba0dfef0b3274287bf3c9106e
2024-12-09 18:08:42 +08:00
Jon Lin
f965b5da7c mtd: spi-nor: Add macro definition constraints
Change-Id: I3b35faaea4fad132be18940328e7df88ebdb0dbd
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-11-28 18:40:31 +08:00
Jon Lin
a104b8efc3 mtd: spinand: Add macro definition constraints
Change-Id: I65e03dd7cc70d1ab279c5bdea0ef8969666d7469
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-11-28 10:58:41 +08:00
Jon Lin
21226ba125 mtd: spinand: HIKSEMI: Fix MFR id to 0x3C
Change-Id: If7ce0da4e1678615a8252740259f5bee46ef0f76
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-11-18 17:22:07 +08:00
Jon Lin
3265632a88 mtd: spinand: GSTO: Add third flash id for some devices
GSS02GSAX1, GSS01GSAX1.

Change-Id: Id61f63a2c2460b5b8e3a57aeaa3341ddcf32f44e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-11-14 09:21:19 +08:00
Jon Lin
a1f4d7f37f mtd: spinand: Winbond: Add third flash id for some devices
W25N01JWZEIG, W25N01KWZPIG.

Change-Id: I05648d131f9076ab716f3baadfc7249eecf31671
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-11-14 09:21:19 +08:00
Jon Lin
0b1e501654 mtd: spinand: Zbit: Support new device ZB35Q04BYIG
Change-Id: I5312eca70a3ec9baf41c39016eee38f036e9dbd2
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-11-08 17:10:06 +08:00
Jon Lin
4cbd30a423 mtd: spinand: dosilicon: Support new device DS35Q2GBS
Change-Id: I40b452063b71b9407eda1fd7b134585f6a7823dc
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-11-07 14:47:00 +08:00
Jon Lin
049d5bbd60 mtd: spinand: foresee: Support new device F35SQB002G
Change-Id: Ib7aef1f2e4a68925e30dcab8b8bfd76996820437
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-11-07 14:47:00 +08:00
Jon Lin
4e64a24d62 mtd: spinand: HIKSEMI: Support new device HSESYHDSW2G
Change-Id: I5ff5e791412d3d81296c8c806145b88da6545cae
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-11-07 14:47:00 +08:00