History

ASoC/tda998x: Fix reporting of nonexistent capture streams

Merge series from Mark Brown <broonie@kernel.org>: The recently added pcm-test selftest has pointed out that systems with the tda998x driver end up advertising that they support capture when in reality as far as I can see the tda998x devices are transmit only. The DAIs registered through hdmi-codec are bidirectional, meaning that for I2S systems when combined with a typical bidrectional CPU DAI the overall capability of the PCM is bidirectional. In most cases the I2S links will clock OK but no useful audio will be returned which isn't so bad but we should still not advertise the useless capability, and some systems may notice problems for example due to pinmux management. This is happening due to the hdmi-codec helpers not providing any mechanism for indicating unidirectional audio so add one and use it in the tda998x driver. It is likely other hdmi-codec users are also affected but I don't have those systems to hand. Mark Brown (2): ASoC: hdmi-codec: Allow playback and capture to be disabled drm: tda99x: Don't advertise non-existent capture support drivers/gpu/drm/i2c/tda998x_drv.c | 2 ++ include/sound/hdmi-codec.h | 4 ++++ sound/soc/codecs/hdmi-codec.c | 30 +++++++++++++++++++++++++----- 3 files changed, 31 insertions(+), 5 deletions(-) base-commit: f0c4d9fc9cc9462659728d168387191387e903cc -- 2.30.2

Mark Brown committed 3 years ago

Commit f19a2ca2 parents 969357e a04f1c8298 files · +2171 −1064Browse files

Unified · Split

298 files
  1. CREDITS +4 −0
  2. Documentation/devicetree/bindings/input/goodix,gt7375p.yaml +4 −1
  3. Documentation/driver-api/miscellaneous.rst +2 −3
  4. Documentation/process/code-of-conduct-interpretation.rst +1 −1
  5. MAINTAINERS +38 −9
  6. Makefile +1 −1
  7. arch/arm/boot/dts/imx7s.dtsi +2 −2
  8. arch/arm/boot/dts/lan966x-pcb8291.dts +20 −0
  9. arch/arm/boot/dts/sama7g5-pinfunc.h +1 −1
  10. arch/arm/mach-at91/pm_suspend.S +6 −1
  11. arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts +26 −6
  12. arch/arm64/boot/dts/freescale/imx8mm.dtsi +2 −2
  13. arch/arm64/boot/dts/freescale/imx8mn.dtsi +1 −1
  14. arch/arm64/boot/dts/freescale/imx93-pinfunc.h +0 −0
  15. arch/arm64/boot/dts/qcom/ipq8074.dtsi +1 −1
  16. arch/arm64/boot/dts/qcom/msm8996.dtsi +1 −1
  17. arch/arm64/boot/dts/qcom/sa8155p-adp.dts +12 −1
  18. arch/arm64/boot/dts/qcom/sa8295p-adp.dts +12 −0
  19. arch/arm64/boot/dts/qcom/sc7280.dtsi +2 −1
  20. arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +6 −0
  21. arch/arm64/boot/dts/qcom/sc8280xp.dtsi +8 −28
  22. arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano.dtsi +6 −0
  23. arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi +6 −0
  24. arch/arm64/boot/dts/qcom/sm8250.dtsi +1 −0
  25. arch/arm64/boot/dts/qcom/sm8350-hdk.dts +12 −0
  26. arch/arm64/include/asm/pgtable.h +2 −2
  27. arch/arm64/kernel/entry-ftrace.S +1 −1
  28. arch/powerpc/kernel/vmlinux.lds.S +1 −1
  29. arch/s390/include/asm/processor.h +10 −1
  30. arch/x86/events/amd/core.c +2 −3
  31. arch/x86/events/amd/uncore.c +1 −0
  32. arch/x86/events/intel/pt.c +9 −0
  33. arch/x86/include/asm/msr-index.h +5 −3
  34. arch/x86/include/asm/qspinlock_paravirt.h +1 −1
  35. arch/x86/kernel/cpu/amd.c +2 −4
  36. arch/x86/kernel/cpu/hygon.c +2 −2
  37. arch/x86/kernel/cpu/sgx/ioctl.c +3 −0
  38. arch/x86/kernel/fpu/core.c +1 −1
  39. arch/x86/kvm/svm/svm.c +5 −5
  40. arch/x86/kvm/x86.c +1 −1
  41. arch/x86/net/bpf_jit_comp.c +0 −13
  42. arch/x86/power/cpu.c +1 −0
  43. arch/x86/xen/enlighten_pv.c +2 −1
  44. arch/x86/xen/setup.c +2 −1
  45. block/blk-cgroup.c +1 −1
  46. block/blk-core.c +0 −1
  47. block/blk-settings.c +5 −4
  48. block/blk.h +1 −0
  49. drivers/accessibility/speakup/main.c +1 −1
  50. drivers/accessibility/speakup/utils.h +1 −1
  51. drivers/android/binder_alloc.c +7 −0
  52. drivers/block/drbd/drbd_main.c +2 −2
  53. drivers/extcon/extcon-usbc-tusb320.c +7 −1
  54. drivers/firmware/google/coreboot_table.c +29 −8
  55. drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 −0
  56. drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +1 −3
  57. drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +20 −9
  58. drivers/gpu/drm/amd/amdgpu/amdgpu_cs.h +1 −0
  59. drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +41 −0
  60. drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +1 −1
  61. drivers/gpu/drm/amd/amdgpu/psp_v13_0.c +1 −0
  62. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +26 −6
  63. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +0 −6
  64. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +8 −2
  65. drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +30 −0
  66. drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hubp.c +1 −0
  67. drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c +1 −1
  68. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +5 −9
  69. drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +15 −1
  70. drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c +2 −0
  71. drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.h +2 −0
  72. drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c +3 −4
  73. drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +11 −12
  74. drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h +8 −0
  75. drivers/gpu/drm/amd/pm/swsmu/inc/smu_v11_0.h +1 −9
  76. drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h +3 −8
  77. drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +4 −0
  78. drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +1 −1
  79. drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +9 −0
  80. drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +28 −2
  81. drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +28 −2
  82. drivers/gpu/drm/display/drm_dp_dual_mode_helper.c +29 −22
  83. drivers/gpu/drm/drm_drv.c +1 −1
  84. drivers/gpu/drm/drm_internal.h +2 −1
  85. drivers/gpu/drm/drm_mode_config.c +0 −3
  86. drivers/gpu/drm/i2c/tda998x_drv.c +2 −0
  87. drivers/gpu/drm/i915/gem/i915_gem_ttm.c +3 −3
  88. drivers/gpu/drm/lima/lima_devfreq.c +9 −6
  89. drivers/gpu/drm/panel/panel-simple.c +2 −0
  90. drivers/gpu/drm/tegra/drm.c +4 −0
  91. drivers/gpu/drm/vc4/vc4_kms.c +4 −4
  92. drivers/gpu/host1x/dev.c +4 −0
  93. drivers/iio/accel/bma400_core.c +12 −12
  94. drivers/iio/adc/at91-sama5d2_adc.c +2 −4
  95. drivers/iio/adc/at91_adc.c +3 −1
  96. drivers/iio/adc/mp2629_adc.c +3 −2
  97. drivers/iio/imu/bno055/bno055.c +1 −1
  98. drivers/iio/pressure/ms5611.h +4 −8
  99. drivers/iio/pressure/ms5611_core.c +27 −24
  100. drivers/iio/pressure/ms5611_spi.c +1 −1
  101. drivers/iio/trigger/iio-trig-sysfs.c +5 −1
  102. drivers/input/joystick/iforce/iforce-main.c +4 −4
  103. drivers/input/misc/soc_button_array.c +13 −1
  104. drivers/input/mouse/synaptics.c +1 −0
  105. drivers/input/serio/i8042-acpipnpio.h +4 −4
  106. drivers/input/serio/i8042.c +0 −4
  107. drivers/input/touchscreen/goodix.c +11 −0
  108. drivers/iommu/intel/iommu.c +3 −5
  109. drivers/iommu/intel/pasid.c +3 −2
  110. drivers/isdn/mISDN/core.c +1 −1
  111. drivers/isdn/mISDN/dsp_pipeline.c +2 −1
  112. drivers/md/dm-bufio.c +2 −0
  113. drivers/md/dm-crypt.c +1 −0
  114. drivers/md/dm-integrity.c +15 −6
  115. drivers/md/dm-ioctl.c +2 −2
  116. drivers/md/dm-log-writes.c +1 −0
  117. drivers/misc/vmw_vmci/vmci_queue_pair.c +2 −0
  118. drivers/mmc/core/core.c +7 −1
  119. drivers/mmc/host/sdhci-pci-core.c +2 −0
  120. drivers/mmc/host/sdhci-pci-o2micro.c +7 −0
  121. drivers/mtd/nand/onenand/Kconfig +1 −0
  122. drivers/mtd/nand/raw/nand_base.c +2 −2
  123. drivers/mtd/nand/raw/qcom_nandc.c +7 −5
  124. drivers/net/ethernet/amazon/ena/ena_netdev.c +7 −1
  125. drivers/net/ethernet/atheros/ag71xx.c +2 −1
  126. drivers/net/ethernet/broadcom/bgmac.c +0 −1
  127. drivers/net/ethernet/broadcom/bnxt/bnxt.c +9 −1
  128. drivers/net/ethernet/cavium/liquidio/lio_main.c +26 −8
  129. drivers/net/ethernet/hisilicon/hns3/hnae3.h +0 −1
  130. drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_rss.c +0 −20
  131. drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_rss.h +0 −2
  132. drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +95 −72
  133. drivers/net/ethernet/hisilicon/hns3/hns3_enet.h +1 −0
  134. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +7 −4
  135. drivers/net/ethernet/huawei/hinic/hinic_main.c +8 −1
  136. drivers/net/ethernet/marvell/octeon_ep/octep_main.c +11 −5
  137. drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +2 −0
  138. drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c +3 −0
  139. drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c +3 −0
  140. drivers/net/ethernet/microchip/sparx5/sparx5_main.c +3 −0
  141. drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c +3 −3
  142. drivers/net/ethernet/pensando/ionic/ionic_main.c +7 −1
  143. drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +3 −0
  144. drivers/net/macvlan.c +2 −2
  145. drivers/net/mctp/mctp-i2c.c +32 −15
  146. drivers/net/mhi_net.c +2 −0
  147. drivers/net/netdevsim/dev.c +1 −0
  148. drivers/net/phy/dp83867.c +7 −0
  149. drivers/net/phy/marvell.c +9 −7
  150. drivers/net/thunderbolt.c +14 −5
  151. drivers/net/usb/qmi_wwan.c +1 −0
  152. drivers/net/usb/smsc95xx.c +42 −4
  153. drivers/nvme/host/pci.c +4 −0
  154. drivers/nvme/target/auth.c +2 −0
  155. drivers/nvmem/lan9662-otpc.c +1 −1
  156. drivers/nvmem/u-boot-env.c +1 −1
  157. drivers/parport/parport_pc.c +1 −1
  158. drivers/pinctrl/devicetree.c +2 −0
  159. drivers/pinctrl/mediatek/mtk-eint.c +29 −5
  160. drivers/pinctrl/mediatek/mtk-eint.h +6 −0
  161. drivers/pinctrl/mediatek/pinctrl-mt2701.c +1 −0
  162. drivers/pinctrl/mediatek/pinctrl-mt2712.c +1 −0
  163. drivers/pinctrl/mediatek/pinctrl-mt6765.c +1 −0
  164. drivers/pinctrl/mediatek/pinctrl-mt6779.c +1 −0
  165. drivers/pinctrl/mediatek/pinctrl-mt6795.c +1 −0
  166. drivers/pinctrl/mediatek/pinctrl-mt7622.c +1 −0
  167. drivers/pinctrl/mediatek/pinctrl-mt7623.c +1 −0
  168. drivers/pinctrl/mediatek/pinctrl-mt7629.c +1 −0
  169. drivers/pinctrl/mediatek/pinctrl-mt7986.c +2 −0
  170. drivers/pinctrl/mediatek/pinctrl-mt8127.c +1 −0
  171. drivers/pinctrl/mediatek/pinctrl-mt8135.c +1 −0
  172. drivers/pinctrl/mediatek/pinctrl-mt8167.c +1 −0
  173. drivers/pinctrl/mediatek/pinctrl-mt8173.c +1 −0
  174. drivers/pinctrl/mediatek/pinctrl-mt8183.c +1 −0
  175. drivers/pinctrl/mediatek/pinctrl-mt8186.c +1 −0
  176. drivers/pinctrl/mediatek/pinctrl-mt8188.c +1 −0
  177. drivers/pinctrl/mediatek/pinctrl-mt8192.c +1 −0
  178. drivers/pinctrl/mediatek/pinctrl-mt8195.c +1 −0
  179. drivers/pinctrl/mediatek/pinctrl-mt8365.c +1 −0
  180. drivers/pinctrl/mediatek/pinctrl-mt8516.c +1 −0
  181. drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c +3 −0
  182. drivers/pinctrl/pinctrl-rockchip.c +40 −0
  183. drivers/pinctrl/qcom/pinctrl-sc8280xp.c +2 −2
  184. drivers/platform/surface/aggregator/ssh_packet_layer.c +20 −4
  185. drivers/platform/surface/surface_aggregator_registry.c +37 −0
  186. drivers/platform/x86/acer-wmi.c +9 −0
  187. drivers/platform/x86/amd/pmc.c +1 −2
  188. drivers/platform/x86/asus-wmi.c +2 −0
  189. drivers/platform/x86/hp-wmi.c +3 −0
  190. drivers/platform/x86/ideapad-laptop.c +35 −2
  191. drivers/platform/x86/intel/pmc/pltdrv.c +9 −0
  192. drivers/platform/x86/thinkpad_acpi.c +8 −0
  193. drivers/s390/block/dcssblk.c +1 −0
  194. drivers/s390/scsi/zfcp_fsf.c +1 −1
  195. drivers/scsi/mpi3mr/mpi3mr_os.c +2 −1
  196. drivers/scsi/scsi_debug.c +5 −1
  197. drivers/scsi/scsi_transport_iscsi.c +16 −15
  198. drivers/siox/siox-core.c +2 −0
  199. drivers/slimbus/Kconfig +1 −1
  200. drivers/slimbus/stream.c +4 −4
  201. drivers/soc/imx/soc-imx8m.c +11 −0
  202. drivers/staging/rtl8192e/rtllib_softmac_wx.c +1 −8
  203. drivers/target/loopback/tcm_loop.c +2 −1
  204. drivers/tty/n_gsm.c +38 −33
  205. drivers/tty/serial/8250/8250_lpss.c +13 −4
  206. drivers/tty/serial/8250/8250_omap.c +30 −22
  207. drivers/tty/serial/8250/8250_port.c +5 −2
  208. drivers/tty/serial/fsl_lpuart.c +49 −27
  209. drivers/tty/serial/imx.c +1 −0
  210. drivers/usb/cdns3/host.c +28 −28
  211. drivers/usb/chipidea/otg_fsm.c +2 −0
  212. drivers/usb/core/quirks.c +3 −0
  213. drivers/usb/dwc3/core.c +10 −0
  214. drivers/usb/dwc3/gadget.c +1 −1
  215. drivers/usb/dwc3/host.c +0 −10
  216. drivers/usb/host/bcma-hcd.c +6 −4
  217. drivers/usb/serial/option.c +17 −2
  218. drivers/usb/typec/mux/intel_pmc_mux.c +13 −2
  219. drivers/usb/typec/tipd/core.c +3 −3
  220. drivers/vfio/pci/vfio_pci_core.c +5 −5
  221. drivers/vfio/vfio_main.c +21 −5
  222. drivers/xen/pcpu.c +1 −1
  223. drivers/xen/platform-pci.c +7 −3
  224. drivers/xen/xen-pciback/conf_space_capability.c +6 −3
  225. fs/ceph/caps.c +12 −36
  226. fs/ceph/inode.c +1 −1
  227. fs/ceph/snap.c +2 −1
  228. fs/cifs/connect.c +11 −3
  229. fs/cifs/ioctl.c +2 −2
  230. fs/cifs/smb2ops.c +4 −0
  231. fs/erofs/fscache.c +21 −14
  232. fs/erofs/internal.h +4 −2
  233. fs/erofs/super.c +22 −17
  234. fs/erofs/sysfs.c +4 −4
  235. fs/erofs/zdata.c +3 −0
  236. fs/kernfs/dir.c +12 −2
  237. fs/netfs/buffered_read.c +13 −7
  238. fs/netfs/io.c +3 −0
  239. fs/nfsd/trace.h +4 −1
  240. fs/zonefs/super.c +27 −10
  241. fs/zonefs/sysfs.c +0 −5
  242. include/linux/blkdev.h +8 −8
  243. include/linux/bpf.h +39 −21
  244. include/linux/io_uring.h +3 −0
  245. include/linux/ring_buffer.h +1 −1
  246. include/linux/trace.h +2 −2
  247. include/linux/vfio.h +1 −0
  248. include/net/ip.h +1 −1
  249. include/net/ipv6.h +1 −1
  250. include/net/sock.h +1 −1
  251. include/soc/at91/sama7-ddr.h +4 −1
  252. include/sound/hdmi-codec.h +4 −0
  253. include/uapi/linux/ip.h +4 −2
  254. include/uapi/linux/ipv6.h +4 −2
  255. io_uring/io_uring.c +1 −1
  256. io_uring/io_uring.h +2 −2
  257. io_uring/net.c +9 −14
  258. io_uring/poll.c +12 −0
  259. kernel/bpf/dispatcher.c +8 −20
  260. kernel/bpf/percpu_freelist.c +11 −12
  261. kernel/bpf/verifier.c +9 −5
  262. kernel/events/core.c +19 −6
  263. kernel/kprobes.c +7 −1
  264. kernel/rseq.c +17 −2
  265. kernel/sched/core.c +35 −17
  266. kernel/trace/ftrace.c +3 −2
  267. kernel/trace/kprobe_event_gen_test.c +32 −16
  268. kernel/trace/rethook.c +3 −1
  269. kernel/trace/ring_buffer.c +50 −21
  270. kernel/trace/synth_event_gen_test.c +6 −10
  271. kernel/trace/trace.c +7 −5
  272. kernel/trace/trace_eprobe.c +6 −2
  273. kernel/trace/trace_events_synth.c +2 −3
  274. kernel/trace/trace_syscalls.c +0 −2
  275. mm/maccess.c +1 −1
  276. net/bpf/test_run.c +1 −0
  277. net/bridge/br_vlan.c +14 −3
  278. net/caif/chnl_net.c +0 −3
  279. net/dsa/dsa2.c +10 −0
  280. net/dsa/dsa_priv.h +1 −0
  281. net/dsa/master.c +1 −2
  282. net/dsa/port.c +16 −0
  283. net/ipv4/Kconfig +10 −0
  284. net/ipv4/inet_hashtables.c +5 −5
  285. net/kcm/kcmsock.c +6 −52
  286. net/l2tp/l2tp_core.c +13 −6
  287. net/tls/tls_device_fallback.c +3 −2
  288. net/x25/x25_dev.c +1 −1
  289. scripts/package/mkdebian +1 −1
  290. sound/pci/hda/patch_realtek.c +2 −0
  291. sound/soc/codecs/hdmi-codec.c +25 −5
  292. sound/usb/midi.c +1 −3
  293. tools/arch/x86/include/asm/msr-index.h +5 −3
  294. tools/iio/iio_generic_buffer.c +2 −2
  295. tools/testing/selftests/bpf/prog_tests/varlen.c +7 −0
  296. tools/testing/selftests/bpf/progs/test_varlen.c +5 −0
  297. tools/testing/selftests/bpf/test_progs.c +1 −1
  298. tools/testing/selftests/bpf/test_verifier.c +1 −1
CREDITS+4−0
@@ -2452,6 +2452,10 @@ S: 482 Shadowgraph Dr. · 2451 unmodified lines
24522452 S: San Jose, CA 95110
24532453 S: USA
24542454
2455+N: Michal Marek
2456+E: michal.lkml@markovi.net
2457+D: Kbuild Maintainer 2009-2017
2458+
24552459 N: Martin Mares
24562460 E: mj@ucw.cz
24572461 W: http://www.ucw.cz/~mj/
Documentation/devicetree/bindings/input/goodix,gt7375p.yaml+4−1
@@ -16,8 +16,11 @@ description: · 15 unmodified lines
1616
1717 properties:
1818 compatible:
19− items:
19+ oneOf:
2020 - const: goodix,gt7375p
21+ - items:
22+ - const: goodix,gt7986u
23+ - const: goodix,gt7375p
2124
2225 reg:
2326 enum:
Documentation/driver-api/miscellaneous.rst+2−3
@@ -16,12 +16,11 @@ Parallel Port Devices · 15 unmodified lines
1616 16x50 UART Driver
1717 =================
1818
19−.. kernel-doc:: drivers/tty/serial/serial_core.c
20− :export:
21−
2219 .. kernel-doc:: drivers/tty/serial/8250/8250_core.c
2320 :export:
2421
22+See serial/driver.rst for related APIs.
23+
2524 Pulse-Width Modulation (PWM)
2625 ============================
2726
Documentation/process/code-of-conduct-interpretation.rst+1−1
@@ -51,7 +51,7 @@ the Technical Advisory Board (TAB) or other maintainers if you're · 50 unmodified lines
5151 uncertain how to handle situations that come up. It will not be
5252 considered a violation report unless you want it to be. If you are
5353 uncertain about approaching the TAB or any other maintainers, please
54−reach out to our conflict mediator, Joanna Lee <joanna.lee@gesmer.com>.
54+reach out to our conflict mediator, Joanna Lee <jlee@linuxfoundation.org>.
5555
5656 In the end, "be kind to each other" is really what the end goal is for
5757 everybody. We know everyone is human and we all fail at times, but the
MAINTAINERS+38−9
@@ -2197,7 +2197,7 @@ M: Wei Xu <xuwei5@hisilicon.com> · 2196 unmodified lines
21972197 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
21982198 S: Supported
21992199 W: http://www.hisilicon.com
2200−T: git git://github.com/hisilicon/linux-hisi.git
2200+T: git https://github.com/hisilicon/linux-hisi.git
22012201 F: arch/arm/boot/dts/hi3*
22022202 F: arch/arm/boot/dts/hip*
22032203 F: arch/arm/boot/dts/hisi*
@@ -4809,7 +4809,7 @@ R: Jeff Layton <jlayton@kernel.org> · 2605 unmodified lines
48094809 L: ceph-devel@vger.kernel.org
48104810 S: Supported
48114811 W: http://ceph.com/
4812−T: git git://github.com/ceph/ceph-client.git
4812+T: git https://github.com/ceph/ceph-client.git
48134813 F: include/linux/ceph/
48144814 F: include/linux/crush/
48154815 F: net/ceph/
@@ -4821,7 +4821,7 @@ R: Jeff Layton <jlayton@kernel.org> · 5 unmodified lines
48214821 L: ceph-devel@vger.kernel.org
48224822 S: Supported
48234823 W: http://ceph.com/
4824−T: git git://github.com/ceph/ceph-client.git
4824+T: git https://github.com/ceph/ceph-client.git
48254825 F: Documentation/filesystems/ceph.rst
48264826 F: fs/ceph/
48274827
@@ -11035,6 +11035,7 @@ KCONFIG · 6207 unmodified lines
1103511035 M: Masahiro Yamada <masahiroy@kernel.org>
1103611036 L: linux-kbuild@vger.kernel.org
1103711037 S: Maintained
11038+Q: https://patchwork.kernel.org/project/linux-kbuild/list/
1103811039 T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kconfig
1103911040 F: Documentation/kbuild/kconfig*
1104011041 F: scripts/Kconfig.include
@@ -11092,10 +11093,12 @@ F: fs/autofs/ · 51 unmodified lines
1109211093
1109311094 KERNEL BUILD + files below scripts/ (unless maintained elsewhere)
1109411095 M: Masahiro Yamada <masahiroy@kernel.org>
11095−M: Michal Marek <michal.lkml@markovi.net>
11096+R: Nathan Chancellor <nathan@kernel.org>
1109611097 R: Nick Desaulniers <ndesaulniers@google.com>
11098+R: Nicolas Schier <nicolas@fjasle.eu>
1109711099 L: linux-kbuild@vger.kernel.org
1109811100 S: Maintained
11101+Q: https://patchwork.kernel.org/project/linux-kbuild/list/
1109911102 T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
1110011103 F: Documentation/kbuild/
1110111104 F: Makefile
@@ -13625,6 +13628,12 @@ S: Supported · 2523 unmodified lines
1362513628 F: drivers/misc/atmel-ssc.c
1362613629 F: include/linux/atmel-ssc.h
1362713630
13631+MICROCHIP SOC DRIVERS
13632+M: Conor Dooley <conor@kernel.org>
13633+S: Supported
13634+T: git https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/
13635+F: drivers/soc/microchip/
13636+
1362813637 MICROCHIP USB251XB DRIVER
1362913638 M: Richard Leitner <richard.leitner@skidata.com>
1363013639 L: linux-usb@vger.kernel.org
@@ -17222,7 +17231,7 @@ R: Dongsheng Yang <dongsheng.yang@easystack.cn> · 3591 unmodified lines
1722217231 L: ceph-devel@vger.kernel.org
1722317232 S: Supported
1722417233 W: http://ceph.com/
17225−T: git git://github.com/ceph/ceph-client.git
17234+T: git https://github.com/ceph/ceph-client.git
1722617235 F: Documentation/ABI/testing/sysfs-bus-rbd
1722717236 F: drivers/block/rbd.c
1722817237 F: drivers/block/rbd_types.h
@@ -17723,7 +17732,7 @@ F: arch/riscv/ · 494 unmodified lines
1772317732 N: riscv
1772417733 K: riscv
1772517734
17726−RISC-V/MICROCHIP POLARFIRE SOC SUPPORT
17735+RISC-V MICROCHIP FPGA SUPPORT
1772717736 M: Conor Dooley <conor.dooley@microchip.com>
1772817737 M: Daire McNamara <daire.mcnamara@microchip.com>
1772917738 L: linux-riscv@lists.infradead.org
@@ -17741,17 +17750,26 @@ F: Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml · 11 unmodified lines
1774117750 F: arch/riscv/boot/dts/microchip/
1774217751 F: drivers/char/hw_random/mpfs-rng.c
1774317752 F: drivers/clk/microchip/clk-mpfs.c
17744−F: drivers/i2c/busses/i2c-microchip-core.c
17753+F: drivers/i2c/busses/i2c-microchip-corei2c.c
1774517754 F: drivers/mailbox/mailbox-mpfs.c
1774617755 F: drivers/pci/controller/pcie-microchip-host.c
1774717756 F: drivers/reset/reset-mpfs.c
1774817757 F: drivers/rtc/rtc-mpfs.c
17749−F: drivers/soc/microchip/
17758+F: drivers/soc/microchip/mpfs-sys-controller.c
1775017759 F: drivers/spi/spi-microchip-core-qspi.c
1775117760 F: drivers/spi/spi-microchip-core.c
1775217761 F: drivers/usb/musb/mpfs.c
1775317762 F: include/soc/microchip/mpfs.h
1775417763
17764+RISC-V MISC SOC SUPPORT
17765+M: Conor Dooley <conor@kernel.org>
17766+L: linux-riscv@lists.infradead.org
17767+S: Maintained
17768+Q: https://patchwork.kernel.org/project/linux-riscv/list/
17769+T: git https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/
17770+F: Documentation/devicetree/bindings/riscv/
17771+F: arch/riscv/boot/dts/
17772+
1775517773 RNBD BLOCK DRIVERS
1775617774 M: Md. Haris Iqbal <haris.iqbal@ionos.com>
1775717775 M: Jack Wang <jinpu.wang@ionos.com>
@@ -18778,7 +18796,6 @@ M: Palmer Dabbelt <palmer@dabbelt.com> · 1020 unmodified lines
1877818796 M: Paul Walmsley <paul.walmsley@sifive.com>
1877918797 L: linux-riscv@lists.infradead.org
1878018798 S: Supported
18781−T: git https://github.com/sifive/riscv-linux.git
1878218799 N: sifive
1878318800 K: [^@]sifive
1878418801
@@ -18797,6 +18814,13 @@ S: Maintained · 12 unmodified lines
1879718814 F: Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml
1879818815 F: drivers/dma/sf-pdma/
1879918816
18817+SIFIVE SOC DRIVERS
18818+M: Conor Dooley <conor@kernel.org>
18819+L: linux-riscv@lists.infradead.org
18820+S: Maintained
18821+T: git https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/
18822+F: drivers/soc/sifive/
18823+
1880018824 SILEAD TOUCHSCREEN DRIVER
1880118825 M: Hans de Goede <hdegoede@redhat.com>
1880218826 L: linux-input@vger.kernel.org
@@ -19598,6 +19622,11 @@ M: Ion Badulescu <ionut@badula.org> · 795 unmodified lines
1959819622 S: Odd Fixes
1959919623 F: drivers/net/ethernet/adaptec/starfire*
1960019624
19625+STARFIVE DEVICETREES
19626+M: Emil Renner Berthing <kernel@esmil.dk>
19627+S: Maintained
19628+F: arch/riscv/boot/dts/starfive/
19629+
1960119630 STARFIVE JH7100 CLOCK DRIVERS
1960219631 M: Emil Renner Berthing <kernel@esmil.dk>
1960319632 S: Maintained
Makefile+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 VERSION = 6
33 PATCHLEVEL = 1
44 SUBLEVEL = 0
5−EXTRAVERSION = -rc5
5+EXTRAVERSION = -rc6
66 NAME = Hurr durr I'ma ninja sloth
77
88 # *DOCUMENTATION*
arch/arm/boot/dts/imx7s.dtsi+2−2
@@ -1270,10 +1270,10 @@ · 1269 unmodified lines
12701270 clocks = <&clks IMX7D_NAND_USDHC_BUS_RAWNAND_CLK>;
12711271 };
12721272
1273− gpmi: nand-controller@33002000{
1273+ gpmi: nand-controller@33002000 {
12741274 compatible = "fsl,imx7d-gpmi-nand";
12751275 #address-cells = <1>;
1276− #size-cells = <1>;
1276+ #size-cells = <0>;
12771277 reg = <0x33002000 0x2000>, <0x33004000 0x4000>;
12781278 reg-names = "gpmi-nand", "bch";
12791279 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
arch/arm/boot/dts/lan966x-pcb8291.dts+20−0
@@ -69,6 +69,12 @@ · 68 unmodified lines
6969 pins = "GPIO_35", "GPIO_36";
7070 function = "can0_b";
7171 };
72+
73+ sgpio_a_pins: sgpio-a-pins {
74+ /* SCK, D0, D1, LD */
75+ pins = "GPIO_32", "GPIO_33", "GPIO_34", "GPIO_35";
76+ function = "sgpio_a";
77+ };
7278 };
7379
7480 &can0 {
@@ -118,6 +124,20 @@ · 43 unmodified lines
118124 status = "okay";
119125 };
120126
127+&sgpio {
128+ pinctrl-0 = <&sgpio_a_pins>;
129+ pinctrl-names = "default";
130+ microchip,sgpio-port-ranges = <0 3>, <8 11>;
131+ status = "okay";
132+
133+ gpio@0 {
134+ ngpios = <64>;
135+ };
136+ gpio@1 {
137+ ngpios = <64>;
138+ };
139+};
140+
121141 &switch {
122142 status = "okay";
123143 };
arch/arm/boot/dts/sama7g5-pinfunc.h+1−1
@@ -261,7 +261,7 @@ · 260 unmodified lines
261261 #define PIN_PB2__FLEXCOM6_IO0 PINMUX_PIN(PIN_PB2, 2, 1)
262262 #define PIN_PB2__ADTRG PINMUX_PIN(PIN_PB2, 3, 1)
263263 #define PIN_PB2__A20 PINMUX_PIN(PIN_PB2, 4, 1)
264−#define PIN_PB2__FLEXCOM11_IO0 PINMUX_PIN(PIN_PB2, 6, 3)
264+#define PIN_PB2__FLEXCOM11_IO1 PINMUX_PIN(PIN_PB2, 6, 3)
265265 #define PIN_PB3 35
266266 #define PIN_PB3__GPIO PINMUX_PIN(PIN_PB3, 0, 0)
267267 #define PIN_PB3__RF1 PINMUX_PIN(PIN_PB3, 1, 1)
arch/arm/mach-at91/pm_suspend.S+6−1
@@ -169,10 +169,15 @@ sr_ena_2: · 168 unmodified lines
169169 cmp tmp1, #UDDRC_STAT_SELFREF_TYPE_SW
170170 bne sr_ena_2
171171
172− /* Put DDR PHY's DLL in bypass mode for non-backup modes. */
172+ /* Disable DX DLLs for non-backup modes. */
173173 cmp r7, #AT91_PM_BACKUP
174174 beq sr_ena_3
175175
176+ /* Do not soft reset the AC DLL. */
177+ ldr tmp1, [r3, DDR3PHY_ACDLLCR]
178+ bic tmp1, tmp1, DDR3PHY_ACDLLCR_DLLSRST
179+ str tmp1, [r3, DDR3PHY_ACDLLCR]
180+
176181 /* Disable DX DLLs. */
177182 ldr tmp1, [r3, #DDR3PHY_DX0DLLCR]
178183 orr tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS
arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts+26−6
@@ -34,11 +34,25 @@ · 33 unmodified lines
3434 off-on-delay-us = <12000>;
3535 };
3636
37− extcon_usbotg1: extcon-usbotg1 {
38− compatible = "linux,extcon-usb-gpio";
37+ connector {
38+ compatible = "gpio-usb-b-connector", "usb-b-connector";
39+ type = "micro";
40+ label = "X19";
3941 pinctrl-names = "default";
40− pinctrl-0 = <&pinctrl_usb1_extcon>;
41− id-gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
42+ pinctrl-0 = <&pinctrl_usb1_connector>;
43+ id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
44+
45+ ports {
46+ #address-cells = <1>;
47+ #size-cells = <0>;
48+
49+ port@0 {
50+ reg = <0>;
51+ usb_dr_connector: endpoint {
52+ remote-endpoint = <&usb1_drd_sw>;
53+ };
54+ };
55+ };
4256 };
4357 };
4458
@@ -105,13 +119,19 @@ · 60 unmodified lines
105119 pinctrl-names = "default";
106120 pinctrl-0 = <&pinctrl_usbotg1>;
107121 dr_mode = "otg";
108− extcon = <&extcon_usbotg1>;
109122 srp-disable;
110123 hnp-disable;
111124 adp-disable;
112125 power-active-high;
113126 over-current-active-low;
127+ usb-role-switch;
114128 status = "okay";
129+
130+ port {
131+ usb1_drd_sw: endpoint {
132+ remote-endpoint = <&usb_dr_connector>;
133+ };
134+ };
115135 };
116136
117137 &usbotg2 {
@@ -231,7 +251,7 @@ · 113 unmodified lines
231251 <MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC 0x84>;
232252 };
233253
234− pinctrl_usb1_extcon: usb1-extcongrp {
254+ pinctrl_usb1_connector: usb1-connectorgrp {
235255 fsl,pins = <MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10 0x1c0>;
236256 };
237257
arch/arm64/boot/dts/freescale/imx8mm.dtsi+2−2
@@ -1244,10 +1244,10 @@ · 1243 unmodified lines
12441244 clocks = <&clk IMX8MM_CLK_NAND_USDHC_BUS_RAWNAND_CLK>;
12451245 };
12461246
1247− gpmi: nand-controller@33002000{
1247+ gpmi: nand-controller@33002000 {
12481248 compatible = "fsl,imx8mm-gpmi-nand", "fsl,imx7d-gpmi-nand";
12491249 #address-cells = <1>;
1250− #size-cells = <1>;
1250+ #size-cells = <0>;
12511251 reg = <0x33002000 0x2000>, <0x33004000 0x4000>;
12521252 reg-names = "gpmi-nand", "bch";
12531253 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
arch/arm64/boot/dts/freescale/imx8mn.dtsi+1−1
@@ -1102,7 +1102,7 @@ · 1101 unmodified lines
11021102 gpmi: nand-controller@33002000 {
11031103 compatible = "fsl,imx8mn-gpmi-nand", "fsl,imx7d-gpmi-nand";
11041104 #address-cells = <1>;
1105− #size-cells = <1>;
1105+ #size-cells = <0>;
11061106 reg = <0x33002000 0x2000>, <0x33004000 0x4000>;
11071107 reg-names = "gpmi-nand", "bch";
11081108 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
arch/arm64/boot/dts/freescale/imx93-pinfunc.h+0−0

File mode changed from 100755 to 100644.

arch/arm64/boot/dts/qcom/ipq8074.dtsi+1−1
@@ -668,7 +668,7 @@ · 667 unmodified lines
668668
669669 apcs_glb: mailbox@b111000 {
670670 compatible = "qcom,ipq8074-apcs-apps-global";
671− reg = <0x0b111000 0x6000>;
671+ reg = <0x0b111000 0x1000>;
672672
673673 #clock-cells = <1>;
674674 #mbox-cells = <1>;
arch/arm64/boot/dts/qcom/msm8996.dtsi+1−1
@@ -3504,7 +3504,7 @@ · 3503 unmodified lines
35043504 };
35053505
35063506 saw3: syscon@9a10000 {
3507− compatible = "qcom,tcsr-msm8996", "syscon";
3507+ compatible = "syscon";
35083508 reg = <0x09a10000 0x1000>;
35093509 };
35103510
arch/arm64/boot/dts/qcom/sa8155p-adp.dts+12−1
@@ -43,7 +43,6 @@ · 42 unmodified lines
4343
4444 regulator-always-on;
4545 regulator-boot-on;
46− regulator-allow-set-load;
4746
4847 vin-supply = <&vreg_3p3>;
4948 };
@@ -137,6 +136,9 @@ · 87 unmodified lines
137136 regulator-max-microvolt = <880000>;
138137 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
139138 regulator-allow-set-load;
139+ regulator-allowed-modes =
140+ <RPMH_REGULATOR_MODE_LPM
141+ RPMH_REGULATOR_MODE_HPM>;
140142 };
141143
142144 vreg_l7a_1p8: ldo7 {
@@ -152,6 +154,9 @@ · 9 unmodified lines
152154 regulator-max-microvolt = <2960000>;
153155 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
154156 regulator-allow-set-load;
157+ regulator-allowed-modes =
158+ <RPMH_REGULATOR_MODE_LPM
159+ RPMH_REGULATOR_MODE_HPM>;
155160 };
156161
157162 vreg_l11a_0p8: ldo11 {
@@ -258,6 +263,9 @@ · 100 unmodified lines
258263 regulator-max-microvolt = <1200000>;
259264 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
260265 regulator-allow-set-load;
266+ regulator-allowed-modes =
267+ <RPMH_REGULATOR_MODE_LPM
268+ RPMH_REGULATOR_MODE_HPM>;
261269 };
262270
263271 vreg_l7c_1p8: ldo7 {
@@ -273,6 +281,9 @@ · 9 unmodified lines
273281 regulator-max-microvolt = <1200000>;
274282 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
275283 regulator-allow-set-load;
284+ regulator-allowed-modes =
285+ <RPMH_REGULATOR_MODE_LPM
286+ RPMH_REGULATOR_MODE_HPM>;
276287 };
277288
278289 vreg_l10c_3p3: ldo10 {
arch/arm64/boot/dts/qcom/sa8295p-adp.dts+12−0
@@ -83,6 +83,9 @@ · 82 unmodified lines
8383 regulator-max-microvolt = <1200000>;
8484 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
8585 regulator-allow-set-load;
86+ regulator-allowed-modes =
87+ <RPMH_REGULATOR_MODE_LPM
88+ RPMH_REGULATOR_MODE_HPM>;
8689 };
8790
8891 vreg_l4c: ldo4 {
@@ -98,6 +101,9 @@ · 9 unmodified lines
98101 regulator-max-microvolt = <1200000>;
99102 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
100103 regulator-allow-set-load;
104+ regulator-allowed-modes =
105+ <RPMH_REGULATOR_MODE_LPM
106+ RPMH_REGULATOR_MODE_HPM>;
101107 };
102108
103109 vreg_l7c: ldo7 {
@@ -113,6 +119,9 @@ · 9 unmodified lines
113119 regulator-max-microvolt = <2504000>;
114120 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
115121 regulator-allow-set-load;
122+ regulator-allowed-modes =
123+ <RPMH_REGULATOR_MODE_LPM
124+ RPMH_REGULATOR_MODE_HPM>;
116125 };
117126
118127 vreg_l17c: ldo17 {
@@ -121,6 +130,9 @@ · 2 unmodified lines
121130 regulator-max-microvolt = <2504000>;
122131 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
123132 regulator-allow-set-load;
133+ regulator-allowed-modes =
134+ <RPMH_REGULATOR_MODE_LPM
135+ RPMH_REGULATOR_MODE_HPM>;
124136 };
125137 };
126138
arch/arm64/boot/dts/qcom/sc7280.dtsi+2−1
@@ -2296,7 +2296,8 @@ · 2295 unmodified lines
22962296
22972297 lpass_audiocc: clock-controller@3300000 {
22982298 compatible = "qcom,sc7280-lpassaudiocc";
2299− reg = <0 0x03300000 0 0x30000>;
2299+ reg = <0 0x03300000 0 0x30000>,
2300+ <0 0x032a9000 0 0x1000>;
23002301 clocks = <&rpmhcc RPMH_CXO_CLK>,
23012302 <&lpass_aon LPASS_AON_CC_MAIN_RCG_CLK_SRC>;
23022303 clock-names = "bi_tcxo", "lpass_aon_cc_main_rcg_clk_src";
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts+6−0
@@ -124,6 +124,9 @@ · 123 unmodified lines
124124 regulator-max-microvolt = <2504000>;
125125 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
126126 regulator-allow-set-load;
127+ regulator-allowed-modes =
128+ <RPMH_REGULATOR_MODE_LPM
129+ RPMH_REGULATOR_MODE_HPM>;
127130 };
128131
129132 vreg_l13c: ldo13 {
@@ -146,6 +149,9 @@ · 16 unmodified lines
146149 regulator-max-microvolt = <1200000>;
147150 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
148151 regulator-allow-set-load;
152+ regulator-allowed-modes =
153+ <RPMH_REGULATOR_MODE_LPM
154+ RPMH_REGULATOR_MODE_HPM>;
149155 };
150156
151157 vreg_l4d: ldo4 {
arch/arm64/boot/dts/qcom/sc8280xp.dtsi+8−28
@@ -885,13 +885,13 @@ · 884 unmodified lines
885885
886886 ufs_mem_phy: phy@1d87000 {
887887 compatible = "qcom,sc8280xp-qmp-ufs-phy";
888− reg = <0 0x01d87000 0 0xe10>;
888+ reg = <0 0x01d87000 0 0x1c8>;
889889 #address-cells = <2>;
890890 #size-cells = <2>;
891891 ranges;
892892 clock-names = "ref",
893893 "ref_aux";
894− clocks = <&rpmhcc RPMH_CXO_CLK>,
894+ clocks = <&gcc GCC_UFS_REF_CLKREF_CLK>,
895895 <&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
896896
897897 resets = <&ufs_mem_hc 0>;
@@ -953,13 +953,13 @@ · 55 unmodified lines
953953
954954 ufs_card_phy: phy@1da7000 {
955955 compatible = "qcom,sc8280xp-qmp-ufs-phy";
956− reg = <0 0x01da7000 0 0xe10>;
956+ reg = <0 0x01da7000 0 0x1c8>;
957957 #address-cells = <2>;
958958 #size-cells = <2>;
959959 ranges;
960960 clock-names = "ref",
961961 "ref_aux";
962− clocks = <&gcc GCC_UFS_1_CARD_CLKREF_CLK>,
962+ clocks = <&gcc GCC_UFS_REF_CLKREF_CLK>,
963963 <&gcc GCC_UFS_CARD_PHY_AUX_CLK>;
964964
965965 resets = <&ufs_card_hc 0>;
@@ -1181,26 +1181,16 @@ · 215 unmodified lines
11811181 usb_0_ssphy: usb3-phy@88eb400 {
11821182 reg = <0 0x088eb400 0 0x100>,
11831183 <0 0x088eb600 0 0x3ec>,
1184− <0 0x088ec400 0 0x1f0>,
1184+ <0 0x088ec400 0 0x364>,
11851185 <0 0x088eba00 0 0x100>,
11861186 <0 0x088ebc00 0 0x3ec>,
1187− <0 0x088ec700 0 0x64>;
1187+ <0 0x088ec200 0 0x18>;
11881188 #phy-cells = <0>;
11891189 #clock-cells = <0>;
11901190 clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
11911191 clock-names = "pipe0";
11921192 clock-output-names = "usb0_phy_pipe_clk_src";
11931193 };
1194−
1195− usb_0_dpphy: dp-phy@88ed200 {
1196− reg = <0 0x088ed200 0 0x200>,
1197− <0 0x088ed400 0 0x200>,
1198− <0 0x088eda00 0 0x200>,
1199− <0 0x088ea600 0 0x200>,
1200− <0 0x088ea800 0 0x200>;
1201− #clock-cells = <1>;
1202− #phy-cells = <0>;
1203− };
12041194 };
12051195
12061196 usb_1_hsphy: phy@8902000 {
@@ -1242,8 +1232,8 @@ · 35 unmodified lines
12421232
12431233 usb_1_ssphy: usb3-phy@8903400 {
12441234 reg = <0 0x08903400 0 0x100>,
1245− <0 0x08903c00 0 0x3ec>,
1246− <0 0x08904400 0 0x1f0>,
1235+ <0 0x08903600 0 0x3ec>,
1236+ <0 0x08904400 0 0x364>,
12471237 <0 0x08903a00 0 0x100>,
12481238 <0 0x08903c00 0 0x3ec>,
12491239 <0 0x08904200 0 0x18>;
@@ -1253,16 +1243,6 @@ · 3 unmodified lines
12531243 clock-names = "pipe0";
12541244 clock-output-names = "usb1_phy_pipe_clk_src";
12551245 };
1256−
1257− usb_1_dpphy: dp-phy@8904200 {
1258− reg = <0 0x08904200 0 0x200>,
1259− <0 0x08904400 0 0x200>,
1260− <0 0x08904a00 0 0x200>,
1261− <0 0x08904600 0 0x200>,
1262− <0 0x08904800 0 0x200>;
1263− #clock-cells = <1>;
1264− #phy-cells = <0>;
1265− };
12661246 };
12671247
12681248 system-cache-controller@9200000 {
arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano.dtsi+6−0
@@ -348,6 +348,9 @@ · 347 unmodified lines
348348 regulator-max-microvolt = <2960000>;
349349 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
350350 regulator-allow-set-load;
351+ regulator-allowed-modes =
352+ <RPMH_REGULATOR_MODE_LPM
353+ RPMH_REGULATOR_MODE_HPM>;
351354 };
352355
353356 vreg_l7c_3p0: ldo7 {
@@ -367,6 +370,9 @@ · 13 unmodified lines
367370 regulator-max-microvolt = <2960000>;
368371 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
369372 regulator-allow-set-load;
373+ regulator-allowed-modes =
374+ <RPMH_REGULATOR_MODE_LPM
375+ RPMH_REGULATOR_MODE_HPM>;
370376 };
371377
372378 vreg_l10c_3p3: ldo10 {
arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi+6−0
@@ -317,6 +317,9 @@ · 316 unmodified lines
317317 regulator-max-microvolt = <2960000>;
318318 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
319319 regulator-allow-set-load;
320+ regulator-allowed-modes =
321+ <RPMH_REGULATOR_MODE_LPM
322+ RPMH_REGULATOR_MODE_HPM>;
320323 };
321324
322325 vreg_l7c_2p85: ldo7 {
@@ -339,6 +342,9 @@ · 16 unmodified lines
339342 regulator-max-microvolt = <2960000>;
340343 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
341344 regulator-allow-set-load;
345+ regulator-allowed-modes =
346+ <RPMH_REGULATOR_MODE_LPM
347+ RPMH_REGULATOR_MODE_HPM>;
342348 };
343349
344350 vreg_l10c_3p3: ldo10 {
arch/arm64/boot/dts/qcom/sm8250.dtsi+1−0
@@ -334,6 +334,7 @@ · 333 unmodified lines
334334 exit-latency-us = <6562>;
335335 min-residency-us = <9987>;
336336 local-timer-stop;
337+ status = "disabled";
337338 };
338339 };
339340 };
arch/arm64/boot/dts/qcom/sm8350-hdk.dts+12−0
@@ -107,6 +107,9 @@ · 106 unmodified lines
107107 regulator-max-microvolt = <888000>;
108108 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
109109 regulator-allow-set-load;
110+ regulator-allowed-modes =
111+ <RPMH_REGULATOR_MODE_LPM
112+ RPMH_REGULATOR_MODE_HPM>;
110113 };
111114
112115 vreg_l6b_1p2: ldo6 {
@@ -115,6 +118,9 @@ · 2 unmodified lines
115118 regulator-max-microvolt = <1208000>;
116119 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
117120 regulator-allow-set-load;
121+ regulator-allowed-modes =
122+ <RPMH_REGULATOR_MODE_LPM
123+ RPMH_REGULATOR_MODE_HPM>;
118124 };
119125
120126 vreg_l7b_2p96: ldo7 {
@@ -123,6 +129,9 @@ · 2 unmodified lines
123129 regulator-max-microvolt = <2504000>;
124130 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
125131 regulator-allow-set-load;
132+ regulator-allowed-modes =
133+ <RPMH_REGULATOR_MODE_LPM
134+ RPMH_REGULATOR_MODE_HPM>;
126135 };
127136
128137 vreg_l9b_1p2: ldo9 {
@@ -131,6 +140,9 @@ · 2 unmodified lines
131140 regulator-max-microvolt = <1200000>;
132141 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
133142 regulator-allow-set-load;
143+ regulator-allowed-modes =
144+ <RPMH_REGULATOR_MODE_LPM
145+ RPMH_REGULATOR_MODE_HPM>;
134146 };
135147 };
136148
arch/arm64/include/asm/pgtable.h+2−2
@@ -863,12 +863,12 @@ static inline bool pte_user_accessible_page(pte_t pte) · 862 unmodified lines
863863
864864 static inline bool pmd_user_accessible_page(pmd_t pmd)
865865 {
866− return pmd_present(pmd) && (pmd_user(pmd) || pmd_user_exec(pmd));
866+ return pmd_leaf(pmd) && (pmd_user(pmd) || pmd_user_exec(pmd));
867867 }
868868
869869 static inline bool pud_user_accessible_page(pud_t pud)
870870 {
871− return pud_present(pud) && pud_user(pud);
871+ return pud_leaf(pud) && pud_user(pud);
872872 }
873873 #endif
874874
arch/arm64/kernel/entry-ftrace.S+1−1
@@ -299,11 +299,11 @@ SYM_TYPED_FUNC_START(ftrace_stub) · 298 unmodified lines
299299 ret
300300 SYM_FUNC_END(ftrace_stub)
301301
302+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
302303 SYM_TYPED_FUNC_START(ftrace_stub_graph)
303304 ret
304305 SYM_FUNC_END(ftrace_stub_graph)
305306
306−#ifdef CONFIG_FUNCTION_GRAPH_TRACER
307307 /*
308308 * void return_to_handler(void)
309309 *
arch/powerpc/kernel/vmlinux.lds.S+1−1
@@ -142,7 +142,7 @@ SECTIONS · 141 unmodified lines
142142 #endif
143143
144144 .data.rel.ro : AT(ADDR(.data.rel.ro) - LOAD_OFFSET) {
145− *(.data.rel.ro*)
145+ *(.data.rel.ro .data.rel.ro.*)
146146 }
147147
148148 .branch_lt : AT(ADDR(.branch_lt) - LOAD_OFFSET) {
arch/s390/include/asm/processor.h+10−1
@@ -199,7 +199,16 @@ unsigned long __get_wchan(struct task_struct *p); · 198 unmodified lines
199199 /* Has task runtime instrumentation enabled ? */
200200 #define is_ri_task(tsk) (!!(tsk)->thread.ri_cb)
201201
202−register unsigned long current_stack_pointer asm("r15");
202+/* avoid using global register due to gcc bug in versions < 8.4 */
203+#define current_stack_pointer (__current_stack_pointer())
204+
205+static __always_inline unsigned long __current_stack_pointer(void)
206+{
207+ unsigned long sp;
208+
209+ asm volatile("lgr %0,15" : "=d" (sp));
210+ return sp;
211+}
203212
204213 static __always_inline unsigned short stap(void)
205214 {
arch/x86/events/amd/core.c+2−3
@@ -861,8 +861,7 @@ static int amd_pmu_handle_irq(struct pt_regs *regs) · 860 unmodified lines
861861 pmu_enabled = cpuc->enabled;
862862 cpuc->enabled = 0;
863863
864− /* stop everything (includes BRS) */
865− amd_pmu_disable_all();
864+ amd_brs_disable_all();
866865
867866 /* Drain BRS is in use (could be inactive) */
868867 if (cpuc->lbr_users)
@@ -873,7 +872,7 @@ static int amd_pmu_handle_irq(struct pt_regs *regs) · 4 unmodified lines
873872
874873 cpuc->enabled = pmu_enabled;
875874 if (pmu_enabled)
876− amd_pmu_enable_all(0);
875+ amd_brs_enable_all();
877876
878877 return amd_pmu_adjust_nmi_window(handled);
879878 }
arch/x86/events/amd/uncore.c+1−0
@@ -553,6 +553,7 @@ static void uncore_clean_online(void) · 552 unmodified lines
553553
554554 hlist_for_each_entry_safe(uncore, n, &uncore_unused_list, node) {
555555 hlist_del(&uncore->node);
556+ kfree(uncore->events);
556557 kfree(uncore);
557558 }
558559 }
arch/x86/events/intel/pt.c+9−0
@@ -1263,6 +1263,15 @@ static int pt_buffer_try_single(struct pt_buffer *buf, int nr_pages) · 1262 unmodified lines
12631263 if (1 << order != nr_pages)
12641264 goto out;
12651265
1266+ /*
1267+ * Some processors cannot always support single range for more than
1268+ * 4KB - refer errata TGL052, ADL037 and RPL017. Future processors might
1269+ * also be affected, so for now rather than trying to keep track of
1270+ * which ones, just disable it for all.
1271+ */
1272+ if (nr_pages > 1)
1273+ goto out;
1274+
12661275 buf->single = true;
12671276 buf->nr_pages = nr_pages;
12681277 ret = 0;
arch/x86/include/asm/msr-index.h+5−3
@@ -535,6 +535,11 @@ · 534 unmodified lines
535535 #define MSR_AMD64_CPUID_FN_1 0xc0011004
536536 #define MSR_AMD64_LS_CFG 0xc0011020
537537 #define MSR_AMD64_DC_CFG 0xc0011022
538+
539+#define MSR_AMD64_DE_CFG 0xc0011029
540+#define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT 1
541+#define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE BIT_ULL(MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT)
542+
538543 #define MSR_AMD64_BU_CFG2 0xc001102a
539544 #define MSR_AMD64_IBSFETCHCTL 0xc0011030
540545 #define MSR_AMD64_IBSFETCHLINAD 0xc0011031
@@ -640,9 +645,6 @@ · 99 unmodified lines
640645 #define FAM10H_MMIO_CONF_BASE_MASK 0xfffffffULL
641646 #define FAM10H_MMIO_CONF_BASE_SHIFT 20
642647 #define MSR_FAM10H_NODE_ID 0xc001100c
643−#define MSR_F10H_DECFG 0xc0011029
644−#define MSR_F10H_DECFG_LFENCE_SERIALIZE_BIT 1
645−#define MSR_F10H_DECFG_LFENCE_SERIALIZE BIT_ULL(MSR_F10H_DECFG_LFENCE_SERIALIZE_BIT)
646648
647649 /* K8 MSRs */
648650 #define MSR_K8_TOP_MEM1 0xc001001a
arch/x86/include/asm/qspinlock_paravirt.h+1−1
@@ -37,7 +37,7 @@ __PV_CALLEE_SAVE_REGS_THUNK(__pv_queued_spin_unlock_slowpath, ".spinlock.text"); · 36 unmodified lines
3737 * rsi = lockval (second argument)
3838 * rdx = internal variable (set to 0)
3939 */
40−asm (".pushsection .spinlock.text;"
40+asm (".pushsection .spinlock.text, \"ax\";"
4141 ".globl " PV_UNLOCK ";"
4242 ".type " PV_UNLOCK ", @function;"
4343 ".align 4,0x90;"
arch/x86/kernel/cpu/amd.c+2−4
@@ -770,8 +770,6 @@ static void init_amd_gh(struct cpuinfo_x86 *c) · 769 unmodified lines
770770 set_cpu_bug(c, X86_BUG_AMD_TLB_MMATCH);
771771 }
772772
773−#define MSR_AMD64_DE_CFG 0xC0011029
774−
775773 static void init_amd_ln(struct cpuinfo_x86 *c)
776774 {
777775 /*
@@ -965,8 +963,8 @@ static void init_amd(struct cpuinfo_x86 *c) · 187 unmodified lines
965963 * msr_set_bit() uses the safe accessors, too, even if the MSR
966964 * is not present.
967965 */
968− msr_set_bit(MSR_F10H_DECFG,
969− MSR_F10H_DECFG_LFENCE_SERIALIZE_BIT);
966+ msr_set_bit(MSR_AMD64_DE_CFG,
967+ MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT);
970968
971969 /* A serializing LFENCE stops RDTSC speculation */
972970 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
arch/x86/kernel/cpu/hygon.c+2−2
@@ -326,8 +326,8 @@ static void init_hygon(struct cpuinfo_x86 *c) · 325 unmodified lines
326326 * msr_set_bit() uses the safe accessors, too, even if the MSR
327327 * is not present.
328328 */
329− msr_set_bit(MSR_F10H_DECFG,
330− MSR_F10H_DECFG_LFENCE_SERIALIZE_BIT);
329+ msr_set_bit(MSR_AMD64_DE_CFG,
330+ MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT);
331331
332332 /* A serializing LFENCE stops RDTSC speculation */
333333 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
arch/x86/kernel/cpu/sgx/ioctl.c+3−0
@@ -356,6 +356,9 @@ static int sgx_validate_offset_length(struct sgx_encl *encl, · 355 unmodified lines
356356 if (!length || !IS_ALIGNED(length, PAGE_SIZE))
357357 return -EINVAL;
358358
359+ if (offset + length < offset)
360+ return -EINVAL;
361+
359362 if (offset + length - PAGE_SIZE >= encl->size)
360363 return -EINVAL;
361364
arch/x86/kernel/fpu/core.c+1−1
@@ -605,9 +605,9 @@ int fpu_clone(struct task_struct *dst, unsigned long clone_flags, bool minimal) · 604 unmodified lines
605605 if (test_thread_flag(TIF_NEED_FPU_LOAD))
606606 fpregs_restore_userregs();
607607 save_fpregs_to_fpstate(dst_fpu);
608+ fpregs_unlock();
608609 if (!(clone_flags & CLONE_THREAD))
609610 fpu_inherit_perms(dst_fpu);
610− fpregs_unlock();
611611
612612 /*
613613 * Children never inherit PASID state.
arch/x86/kvm/svm/svm.c+5−5
@@ -2709,9 +2709,9 @@ static int svm_get_msr_feature(struct kvm_msr_entry *msr) · 2708 unmodified lines
27092709 msr->data = 0;
27102710
27112711 switch (msr->index) {
2712− case MSR_F10H_DECFG:
2713− if (boot_cpu_has(X86_FEATURE_LFENCE_RDTSC))
2714− msr->data |= MSR_F10H_DECFG_LFENCE_SERIALIZE;
2712+ case MSR_AMD64_DE_CFG:
2713+ if (cpu_feature_enabled(X86_FEATURE_LFENCE_RDTSC))
2714+ msr->data |= MSR_AMD64_DE_CFG_LFENCE_SERIALIZE;
27152715 break;
27162716 case MSR_IA32_PERF_CAPABILITIES:
27172717 return 0;
@@ -2812,7 +2812,7 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) · 94 unmodified lines
28122812 msr_info->data = 0x1E;
28132813 }
28142814 break;
2815− case MSR_F10H_DECFG:
2815+ case MSR_AMD64_DE_CFG:
28162816 msr_info->data = svm->msr_decfg;
28172817 break;
28182818 default:
@@ -3041,7 +3041,7 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) · 222 unmodified lines
30413041 case MSR_VM_IGNNE:
30423042 vcpu_unimpl(vcpu, "unimplemented wrmsr: 0x%x data 0x%llx\n", ecx, data);
30433043 break;
3044− case MSR_F10H_DECFG: {
3044+ case MSR_AMD64_DE_CFG: {
30453045 struct kvm_msr_entry msr_entry;
30463046
30473047 msr_entry.index = msr->index;
arch/x86/kvm/x86.c+1−1
@@ -1557,7 +1557,7 @@ static const u32 msr_based_features_all[] = { · 1556 unmodified lines
15571557 MSR_IA32_VMX_EPT_VPID_CAP,
15581558 MSR_IA32_VMX_VMFUNC,
15591559
1560− MSR_F10H_DECFG,
1560+ MSR_AMD64_DE_CFG,
15611561 MSR_IA32_UCODE_REV,
15621562 MSR_IA32_ARCH_CAPABILITIES,
15631563 MSR_IA32_PERF_CAPABILITIES,
arch/x86/net/bpf_jit_comp.c+0−13
@@ -11,7 +11,6 @@ · 10 unmodified lines
1111 #include <linux/bpf.h>
1212 #include <linux/memory.h>
1313 #include <linux/sort.h>
14−#include <linux/init.h>
1514 #include <asm/extable.h>
1615 #include <asm/set_memory.h>
1716 #include <asm/nospec-branch.h>
@@ -389,18 +388,6 @@ out: · 371 unmodified lines
389388 return ret;
390389 }
391390
392−int __init bpf_arch_init_dispatcher_early(void *ip)
393−{
394− const u8 *nop_insn = x86_nops[5];
395−
396− if (is_endbr(*(u32 *)ip))
397− ip += ENDBR_INSN_SIZE;
398−
399− if (memcmp(ip, nop_insn, X86_PATCH_SIZE))
400− text_poke_early(ip, nop_insn, X86_PATCH_SIZE);
401− return 0;
402−}
403−
404391 int bpf_arch_text_poke(void *ip, enum bpf_text_poke_type t,
405392 void *old_addr, void *new_addr)
406393 {
arch/x86/power/cpu.c+1−0
@@ -519,6 +519,7 @@ static void pm_save_spec_msr(void) · 518 unmodified lines
519519 MSR_TSX_FORCE_ABORT,
520520 MSR_IA32_MCU_OPT_CTRL,
521521 MSR_AMD64_LS_CFG,
522+ MSR_AMD64_DE_CFG,
522523 };
523524
524525 msr_build_context(spec_msr_id, ARRAY_SIZE(spec_msr_id));
arch/x86/xen/enlighten_pv.c+2−1
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #include <linux/start_kernel.h>
2424 #include <linux/sched.h>
2525 #include <linux/kprobes.h>
26+#include <linux/kstrtox.h>
2627 #include <linux/memblock.h>
2728 #include <linux/export.h>
2829 #include <linux/mm.h>
@@ -113,7 +114,7 @@ static __read_mostly bool xen_msr_safe = IS_ENABLED(CONFIG_XEN_PV_MSR_SAFE); · 84 unmodified lines
113114 static int __init parse_xen_msr_safe(char *str)
114115 {
115116 if (str)
116− return strtobool(str, &xen_msr_safe);
117+ return kstrtobool(str, &xen_msr_safe);
117118 return -EINVAL;
118119 }
119120 early_param("xen_msr_safe", parse_xen_msr_safe);
arch/x86/xen/setup.c+2−1
@@ -7,6 +7,7 @@ · 6 unmodified lines
77
88 #include <linux/init.h>
99 #include <linux/sched.h>
10+#include <linux/kstrtox.h>
1011 #include <linux/mm.h>
1112 #include <linux/pm.h>
1213 #include <linux/memblock.h>
@@ -85,7 +86,7 @@ static void __init xen_parse_512gb(void) · 72 unmodified lines
8586 arg = strstr(xen_start_info->cmd_line, "xen_512gb_limit=");
8687 if (!arg)
8788 val = true;
88− else if (strtobool(arg + strlen("xen_512gb_limit="), &val))
89+ else if (kstrtobool(arg + strlen("xen_512gb_limit="), &val))
8990 return;
9091
9192 xen_512gb_limit = val;
block/blk-cgroup.c+1−1
@@ -1213,7 +1213,7 @@ static int blkcg_css_online(struct cgroup_subsys_state *css) · 1212 unmodified lines
12131213 * parent so that offline always happens towards the root.
12141214 */
12151215 if (parent)
1216− blkcg_pin_online(css);
1216+ blkcg_pin_online(&parent->css);
12171217 return 0;
12181218 }
12191219
block/blk-core.c+0−1
@@ -425,7 +425,6 @@ struct request_queue *blk_alloc_queue(int node_id, bool alloc_srcu) · 424 unmodified lines
425425 PERCPU_REF_INIT_ATOMIC, GFP_KERNEL))
426426 goto fail_stats;
427427
428− blk_queue_dma_alignment(q, 511);
429428 blk_set_default_limits(&q->limits);
430429 q->nr_requests = BLKDEV_DEFAULT_RQ;
431430
block/blk-settings.c+5−4
@@ -57,8 +57,8 @@ void blk_set_default_limits(struct queue_limits *lim) · 56 unmodified lines
5757 lim->misaligned = 0;
5858 lim->zoned = BLK_ZONED_NONE;
5959 lim->zone_write_granularity = 0;
60+ lim->dma_alignment = 511;
6061 }
61−EXPORT_SYMBOL(blk_set_default_limits);
6262
6363 /**
6464 * blk_set_stacking_limits - set default limits for stacking devices
@@ -600,6 +600,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, · 535 unmodified lines
600600
601601 t->io_min = max(t->io_min, b->io_min);
602602 t->io_opt = lcm_not_zero(t->io_opt, b->io_opt);
603+ t->dma_alignment = max(t->dma_alignment, b->dma_alignment);
603604
604605 /* Set non-power-of-2 compatible chunk_sectors boundary */
605606 if (b->chunk_sectors)
@@ -773,7 +774,7 @@ EXPORT_SYMBOL(blk_queue_virt_boundary); · 167 unmodified lines
773774 **/
774775 void blk_queue_dma_alignment(struct request_queue *q, int mask)
775776 {
776− q->dma_alignment = mask;
777+ q->limits.dma_alignment = mask;
777778 }
778779 EXPORT_SYMBOL(blk_queue_dma_alignment);
779780
@@ -795,8 +796,8 @@ void blk_queue_update_dma_alignment(struct request_queue *q, int mask) · 15 unmodified lines
795796 {
796797 BUG_ON(mask > PAGE_SIZE);
797798
798− if (mask > q->dma_alignment)
799− q->dma_alignment = mask;
799+ if (mask > q->limits.dma_alignment)
800+ q->limits.dma_alignment = mask;
800801 }
801802 EXPORT_SYMBOL(blk_queue_update_dma_alignment);
802803
block/blk.h+1−0
@@ -331,6 +331,7 @@ void blk_rq_set_mixed_merge(struct request *rq); · 330 unmodified lines
331331 bool blk_rq_merge_ok(struct request *rq, struct bio *bio);
332332 enum elv_merge blk_try_merge(struct request *rq, struct bio *bio);
333333
334+void blk_set_default_limits(struct queue_limits *lim);
334335 int blk_dev_init(void);
335336
336337 /*
drivers/accessibility/speakup/main.c+1−1
@@ -1778,7 +1778,7 @@ static void speakup_con_update(struct vc_data *vc) · 1777 unmodified lines
17781778 {
17791779 unsigned long flags;
17801780
1781− if (!speakup_console[vc->vc_num] || spk_parked)
1781+ if (!speakup_console[vc->vc_num] || spk_parked || !synth)
17821782 return;
17831783 if (!spin_trylock_irqsave(&speakup_info.spinlock, flags))
17841784 /* Speakup output, discard */
drivers/accessibility/speakup/utils.h+1−1
@@ -54,7 +54,7 @@ static inline int oops(const char *msg, const char *info) · 53 unmodified lines
5454
5555 static inline struct st_key *hash_name(char *name)
5656 {
57− u_char *pn = (u_char *)name;
57+ unsigned char *pn = (unsigned char *)name;
5858 int hash = 0;
5959
6060 while (*pn) {
drivers/android/binder_alloc.c+7−0
@@ -739,6 +739,12 @@ int binder_alloc_mmap_handler(struct binder_alloc *alloc, · 738 unmodified lines
739739 const char *failure_string;
740740 struct binder_buffer *buffer;
741741
742+ if (unlikely(vma->vm_mm != alloc->mm)) {
743+ ret = -EINVAL;
744+ failure_string = "invalid vma->vm_mm";
745+ goto err_invalid_mm;
746+ }
747+
742748 mutex_lock(&binder_alloc_mmap_lock);
743749 if (alloc->buffer_size) {
744750 ret = -EBUSY;
@@ -785,6 +791,7 @@ err_alloc_pages_failed: · 40 unmodified lines
785791 alloc->buffer_size = 0;
786792 err_already_mapped:
787793 mutex_unlock(&binder_alloc_mmap_lock);
794+err_invalid_mm:
788795 binder_alloc_debug(BINDER_DEBUG_USER_ERROR,
789796 "%s: %d %lx-%lx %s failed %d\n", __func__,
790797 alloc->pid, vma->vm_start, vma->vm_end,
drivers/block/drbd/drbd_main.c+2−2
@@ -2672,7 +2672,7 @@ static int init_submitter(struct drbd_device *device) · 2671 unmodified lines
26722672 enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsigned int minor)
26732673 {
26742674 struct drbd_resource *resource = adm_ctx->resource;
2675− struct drbd_connection *connection;
2675+ struct drbd_connection *connection, *n;
26762676 struct drbd_device *device;
26772677 struct drbd_peer_device *peer_device, *tmp_peer_device;
26782678 struct gendisk *disk;
@@ -2789,7 +2789,7 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig · 110 unmodified lines
27892789 return NO_ERROR;
27902790
27912791 out_idr_remove_from_resource:
2792− for_each_connection(connection, resource) {
2792+ for_each_connection_safe(connection, n, resource) {
27932793 peer_device = idr_remove(&connection->peer_devices, vnr);
27942794 if (peer_device)
27952795 kref_put(&connection->kref, drbd_destroy_connection);
drivers/extcon/extcon-usbc-tusb320.c+7−1
@@ -327,7 +327,13 @@ static irqreturn_t tusb320_irq_handler(int irq, void *dev_id) · 326 unmodified lines
327327 return IRQ_NONE;
328328
329329 tusb320_extcon_irq_handler(priv, reg);
330− tusb320_typec_irq_handler(priv, reg);
330+
331+ /*
332+ * Type-C support is optional. Only call the Type-C handler if a
333+ * port had been registered previously.
334+ */
335+ if (priv->port)
336+ tusb320_typec_irq_handler(priv, reg);
331337
332338 regmap_write(priv->regmap, TUSB320_REG9, reg);
333339
drivers/firmware/google/coreboot_table.c+29−8
@@ -149,12 +149,8 @@ static int coreboot_table_probe(struct platform_device *pdev) · 148 unmodified lines
149149 if (!ptr)
150150 return -ENOMEM;
151151
152− ret = bus_register(&coreboot_bus_type);
153− if (!ret) {
154− ret = coreboot_table_populate(dev, ptr);
155− if (ret)
156− bus_unregister(&coreboot_bus_type);
157− }
152+ ret = coreboot_table_populate(dev, ptr);
153+
158154 memunmap(ptr);
159155
160156 return ret;
@@ -169,7 +165,6 @@ static int __cb_dev_unregister(struct device *dev, void *dummy) · 8 unmodified lines
169165 static int coreboot_table_remove(struct platform_device *pdev)
170166 {
171167 bus_for_each_dev(&coreboot_bus_type, NULL, NULL, __cb_dev_unregister);
172− bus_unregister(&coreboot_bus_type);
173168 return 0;
174169 }
175170
@@ -199,6 +194,32 @@ static struct platform_driver coreboot_table_driver = { · 23 unmodified lines
199194 .of_match_table = of_match_ptr(coreboot_of_match),
200195 },
201196 };
202−module_platform_driver(coreboot_table_driver);
197+
198+static int __init coreboot_table_driver_init(void)
199+{
200+ int ret;
201+
202+ ret = bus_register(&coreboot_bus_type);
203+ if (ret)
204+ return ret;
205+
206+ ret = platform_driver_register(&coreboot_table_driver);
207+ if (ret) {
208+ bus_unregister(&coreboot_bus_type);
209+ return ret;
210+ }
211+
212+ return 0;
213+}
214+
215+static void __exit coreboot_table_driver_exit(void)
216+{
217+ platform_driver_unregister(&coreboot_table_driver);
218+ bus_unregister(&coreboot_bus_type);
219+}
220+
221+module_init(coreboot_table_driver_init);
222+module_exit(coreboot_table_driver_exit);
223+
203224 MODULE_AUTHOR("Google, Inc.");
204225 MODULE_LICENSE("GPL");
drivers/gpu/drm/amd/amdgpu/amdgpu.h+1−0
@@ -1293,6 +1293,7 @@ void amdgpu_device_pcie_port_wreg(struct amdgpu_device *adev, · 1292 unmodified lines
12931293 u32 reg, u32 v);
12941294 struct dma_fence *amdgpu_device_switch_gang(struct amdgpu_device *adev,
12951295 struct dma_fence *gang);
1296+bool amdgpu_device_has_display_hardware(struct amdgpu_device *adev);
12961297
12971298 /* atpx handler */
12981299 #if defined(CONFIG_VGA_SWITCHEROO)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c+1−3
@@ -171,9 +171,7 @@ int amdgpu_amdkfd_reserve_mem_limit(struct amdgpu_device *adev, · 170 unmodified lines
171171 (kfd_mem_limit.ttm_mem_used + ttm_mem_needed >
172172 kfd_mem_limit.max_ttm_mem_limit) ||
173173 (adev && adev->kfd.vram_used + vram_needed >
174− adev->gmc.real_vram_size -
175− atomic64_read(&adev->vram_pin_size) -
176− reserved_for_pt)) {
174+ adev->gmc.real_vram_size - reserved_for_pt)) {
177175 ret = -ENOMEM;
178176 goto release;
179177 }
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c+20−9
@@ -109,6 +109,7 @@ static int amdgpu_cs_p1_ib(struct amdgpu_cs_parser *p, · 108 unmodified lines
109109 return r;
110110
111111 ++(num_ibs[r]);
112+ p->gang_leader_idx = r;
112113 return 0;
113114 }
114115
@@ -287,8 +288,10 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p, · 172 unmodified lines
287288 }
288289 }
289290
290− if (!p->gang_size)
291− return -EINVAL;
291+ if (!p->gang_size) {
292+ ret = -EINVAL;
293+ goto free_partial_kdata;
294+ }
292295
293296 for (i = 0; i < p->gang_size; ++i) {
294297 ret = amdgpu_job_alloc(p->adev, num_ibs[i], &p->jobs[i], vm);
@@ -300,7 +303,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p, · 5 unmodified lines
300303 if (ret)
301304 goto free_all_kdata;
302305 }
303− p->gang_leader = p->jobs[p->gang_size - 1];
306+ p->gang_leader = p->jobs[p->gang_leader_idx];
304307
305308 if (p->ctx->vram_lost_counter != p->gang_leader->vram_lost_counter) {
306309 ret = -ECANCELED;
@@ -1195,16 +1198,18 @@ static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p) · 888 unmodified lines
11951198 return r;
11961199 }
11971200
1198− for (i = 0; i < p->gang_size - 1; ++i) {
1201+ for (i = 0; i < p->gang_size; ++i) {
1202+ if (p->jobs[i] == leader)
1203+ continue;
1204+
11991205 r = amdgpu_sync_clone(&leader->sync, &p->jobs[i]->sync);
12001206 if (r)
12011207 return r;
12021208 }
12031209
1204− r = amdgpu_ctx_wait_prev_fence(p->ctx, p->entities[p->gang_size - 1]);
1210+ r = amdgpu_ctx_wait_prev_fence(p->ctx, p->entities[p->gang_leader_idx]);
12051211 if (r && r != -ERESTARTSYS)
12061212 DRM_ERROR("amdgpu_ctx_wait_prev_fence failed.\n");
1207−
12081213 return r;
12091214 }
12101215
@@ -1238,9 +1243,12 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · 27 unmodified lines
12381243 for (i = 0; i < p->gang_size; ++i)
12391244 drm_sched_job_arm(&p->jobs[i]->base);
12401245
1241− for (i = 0; i < (p->gang_size - 1); ++i) {
1246+ for (i = 0; i < p->gang_size; ++i) {
12421247 struct dma_fence *fence;
12431248
1249+ if (p->jobs[i] == leader)
1250+ continue;
1251+
12441252 fence = &p->jobs[i]->base.s_fence->scheduled;
12451253 r = amdgpu_sync_fence(&leader->sync, fence);
12461254 if (r)
@@ -1276,7 +1284,10 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · 29 unmodified lines
12761284 list_for_each_entry(e, &p->validated, tv.head) {
12771285
12781286 /* Everybody except for the gang leader uses READ */
1279− for (i = 0; i < (p->gang_size - 1); ++i) {
1287+ for (i = 0; i < p->gang_size; ++i) {
1288+ if (p->jobs[i] == leader)
1289+ continue;
1290+
12801291 dma_resv_add_fence(e->tv.bo->base.resv,
12811292 &p->jobs[i]->base.s_fence->finished,
12821293 DMA_RESV_USAGE_READ);
@@ -1286,7 +1297,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · 3 unmodified lines
12861297 e->tv.num_shared = 0;
12871298 }
12881299
1289− seq = amdgpu_ctx_add_fence(p->ctx, p->entities[p->gang_size - 1],
1300+ seq = amdgpu_ctx_add_fence(p->ctx, p->entities[p->gang_leader_idx],
12901301 p->fence);
12911302 amdgpu_cs_post_dependencies(p);
12921303
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.h+1−0
@@ -54,6 +54,7 @@ struct amdgpu_cs_parser { · 53 unmodified lines
5454
5555 /* scheduler job objects */
5656 unsigned int gang_size;
57+ unsigned int gang_leader_idx;
5758 struct drm_sched_entity *entities[AMDGPU_CS_GANG_SIZE];
5859 struct amdgpu_job *jobs[AMDGPU_CS_GANG_SIZE];
5960 struct amdgpu_job *gang_leader;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c+41−0
@@ -6044,3 +6044,44 @@ struct dma_fence *amdgpu_device_switch_gang(struct amdgpu_device *adev, · 6043 unmodified lines
60446044 dma_fence_put(old);
60456045 return NULL;
60466046 }
6047+
6048+bool amdgpu_device_has_display_hardware(struct amdgpu_device *adev)
6049+{
6050+ switch (adev->asic_type) {
6051+#ifdef CONFIG_DRM_AMDGPU_SI
6052+ case CHIP_HAINAN:
6053+#endif
6054+ case CHIP_TOPAZ:
6055+ /* chips with no display hardware */
6056+ return false;
6057+#ifdef CONFIG_DRM_AMDGPU_SI
6058+ case CHIP_TAHITI:
6059+ case CHIP_PITCAIRN:
6060+ case CHIP_VERDE:
6061+ case CHIP_OLAND:
6062+#endif
6063+#ifdef CONFIG_DRM_AMDGPU_CIK
6064+ case CHIP_BONAIRE:
6065+ case CHIP_HAWAII:
6066+ case CHIP_KAVERI:
6067+ case CHIP_KABINI:
6068+ case CHIP_MULLINS:
6069+#endif
6070+ case CHIP_TONGA:
6071+ case CHIP_FIJI:
6072+ case CHIP_POLARIS10:
6073+ case CHIP_POLARIS11:
6074+ case CHIP_POLARIS12:
6075+ case CHIP_VEGAM:
6076+ case CHIP_CARRIZO:
6077+ case CHIP_STONEY:
6078+ /* chips with display hardware */
6079+ return true;
6080+ default:
6081+ /* IP discovery */
6082+ if (!adev->ip_versions[DCE_HWIP][0] ||
6083+ (adev->harvest_ip_mask & AMD_HARVEST_IP_DMU_MASK))
6084+ return false;
6085+ return true;
6086+ }
6087+}
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c+1−1
@@ -656,7 +656,7 @@ void amdgpu_gmc_get_vbios_allocations(struct amdgpu_device *adev) · 655 unmodified lines
656656 }
657657
658658 if (amdgpu_sriov_vf(adev) ||
659− !amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_DCE)) {
659+ !amdgpu_device_has_display_hardware(adev)) {
660660 size = 0;
661661 } else {
662662 size = amdgpu_gmc_get_vbios_fb_size(adev);
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c+1−0
@@ -45,6 +45,7 @@ MODULE_FIRMWARE("amdgpu/psp_13_0_0_ta.bin"); · 44 unmodified lines
4545 MODULE_FIRMWARE("amdgpu/psp_13_0_7_sos.bin");
4646 MODULE_FIRMWARE("amdgpu/psp_13_0_7_ta.bin");
4747 MODULE_FIRMWARE("amdgpu/psp_13_0_10_sos.bin");
48+MODULE_FIRMWARE("amdgpu/psp_13_0_10_ta.bin");
4849
4950 /* For large FW files the time to complete can be very long */
5051 #define USBC_PD_POLLING_LIMIT_S 240
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c+26−6
@@ -147,6 +147,14 @@ MODULE_FIRMWARE(FIRMWARE_NAVI12_DMCU); · 146 unmodified lines
147147 /* Number of bytes in PSP footer for firmware. */
148148 #define PSP_FOOTER_BYTES 0x100
149149
150+/*
151+ * DMUB Async to Sync Mechanism Status
152+ */
153+#define DMUB_ASYNC_TO_SYNC_ACCESS_FAIL 1
154+#define DMUB_ASYNC_TO_SYNC_ACCESS_TIMEOUT 2
155+#define DMUB_ASYNC_TO_SYNC_ACCESS_SUCCESS 3
156+#define DMUB_ASYNC_TO_SYNC_ACCESS_INVALID 4
157+
150158 /**
151159 * DOC: overview
152160 *
@@ -1637,12 +1645,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) · 1484 unmodified lines
16371645 }
16381646 }
16391647
1640− if (amdgpu_dm_initialize_drm_device(adev)) {
1641− DRM_ERROR(
1642− "amdgpu: failed to initialize sw for display support.\n");
1643− goto error;
1644− }
1645−
16461648 /* Enable outbox notification only after IRQ handlers are registered and DMUB is alive.
16471649 * It is expected that DMUB will resend any pending notifications at this point, for
16481650 * example HPD from DPIA.
@@ -1650,6 +1652,12 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) · 1 unmodified line
16501652 if (dc_is_dmub_outbox_supported(adev->dm.dc))
16511653 dc_enable_dmub_outbox(adev->dm.dc);
16521654
1655+ if (amdgpu_dm_initialize_drm_device(adev)) {
1656+ DRM_ERROR(
1657+ "amdgpu: failed to initialize sw for display support.\n");
1658+ goto error;
1659+ }
1660+
16531661 /* create fake encoders for MST */
16541662 dm_dp_create_fake_mst_encoders(adev);
16551663
@@ -10109,6 +10117,8 @@ static int amdgpu_dm_set_dmub_async_sync_status(bool is_cmd_aux, · 8453 unmodified lines
1010910117 *operation_result = AUX_RET_ERROR_TIMEOUT;
1011010118 } else if (status_type == DMUB_ASYNC_TO_SYNC_ACCESS_FAIL) {
1011110119 *operation_result = AUX_RET_ERROR_ENGINE_ACQUIRE;
10120+ } else if (status_type == DMUB_ASYNC_TO_SYNC_ACCESS_INVALID) {
10121+ *operation_result = AUX_RET_ERROR_INVALID_REPLY;
1011210122 } else {
1011310123 *operation_result = AUX_RET_ERROR_UNKNOWN;
1011410124 }
@@ -10156,6 +10166,16 @@ int amdgpu_dm_process_dmub_aux_transfer_sync(bool is_cmd_aux, struct dc_context · 41 unmodified lines
1015610166 payload->reply[0] = adev->dm.dmub_notify->aux_reply.command;
1015710167 if (!payload->write && adev->dm.dmub_notify->aux_reply.length &&
1015810168 payload->reply[0] == AUX_TRANSACTION_REPLY_AUX_ACK) {
10169+
10170+ if (payload->length != adev->dm.dmub_notify->aux_reply.length) {
10171+ DRM_WARN("invalid read from DPIA AUX %x(%d) got length %d!\n",
10172+ payload->address, payload->length,
10173+ adev->dm.dmub_notify->aux_reply.length);
10174+ return amdgpu_dm_set_dmub_async_sync_status(is_cmd_aux, ctx,
10175+ DMUB_ASYNC_TO_SYNC_ACCESS_INVALID,
10176+ (uint32_t *)operation_result);
10177+ }
10178+
1015910179 memcpy(payload->data, adev->dm.dmub_notify->aux_reply.data,
1016010180 adev->dm.dmub_notify->aux_reply.length);
1016110181 }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h+0−6
@@ -50,12 +50,6 @@ · 49 unmodified lines
5050
5151 #define AMDGPU_DMUB_NOTIFICATION_MAX 5
5252
53−/*
54− * DMUB Async to Sync Mechanism Status
55− */
56−#define DMUB_ASYNC_TO_SYNC_ACCESS_FAIL 1
57−#define DMUB_ASYNC_TO_SYNC_ACCESS_TIMEOUT 2
58−#define DMUB_ASYNC_TO_SYNC_ACCESS_SUCCESS 3
5953 /*
6054 #include "include/amdgpu_dal_power_if.h"
6155 #include "amdgpu_dm_irq.h"
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c+8−2
@@ -412,7 +412,7 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm, · 411 unmodified lines
412412 {
413413 struct amdgpu_crtc *acrtc = NULL;
414414 struct drm_plane *cursor_plane;
415−
415+ bool is_dcn;
416416 int res = -ENOMEM;
417417
418418 cursor_plane = kzalloc(sizeof(*cursor_plane), GFP_KERNEL);
@@ -450,8 +450,14 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm, · 31 unmodified lines
450450 acrtc->otg_inst = -1;
451451
452452 dm->adev->mode_info.crtcs[crtc_index] = acrtc;
453− drm_crtc_enable_color_mgmt(&acrtc->base, MAX_COLOR_LUT_ENTRIES,
453+
454+ /* Don't enable DRM CRTC degamma property for DCE since it doesn't
455+ * support programmable degamma anywhere.
456+ */
457+ is_dcn = dm->adev->dm.dc->caps.color.dpp.dcn_arch;
458+ drm_crtc_enable_color_mgmt(&acrtc->base, is_dcn ? MAX_COLOR_LUT_ENTRIES : 0,
454459 true, MAX_COLOR_LUT_ENTRIES);
460+
455461 drm_mode_crtc_set_gamma_size(&acrtc->base, MAX_COLOR_LEGACY_LUT_ENTRIES);
456462
457463 return 0;
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c+30−0
@@ -2393,6 +2393,26 @@ static enum bp_result get_vram_info_v25( · 2392 unmodified lines
23932393 return result;
23942394 }
23952395
2396+static enum bp_result get_vram_info_v30(
2397+ struct bios_parser *bp,
2398+ struct dc_vram_info *info)
2399+{
2400+ struct atom_vram_info_header_v3_0 *info_v30;
2401+ enum bp_result result = BP_RESULT_OK;
2402+
2403+ info_v30 = GET_IMAGE(struct atom_vram_info_header_v3_0,
2404+ DATA_TABLES(vram_info));
2405+
2406+ if (info_v30 == NULL)
2407+ return BP_RESULT_BADBIOSTABLE;
2408+
2409+ info->num_chans = info_v30->channel_num;
2410+ info->dram_channel_width_bytes = (1 << info_v30->channel_width) / 8;
2411+
2412+ return result;
2413+}
2414+
2415+
23962416 /*
23972417 * get_integrated_info_v11
23982418 *
@@ -3060,6 +3080,16 @@ static enum bp_result bios_parser_get_vram_info( · 661 unmodified lines
30603080 }
30613081 break;
30623082
3083+ case 3:
3084+ switch (revision.minor) {
3085+ case 0:
3086+ result = get_vram_info_v30(bp, info);
3087+ break;
3088+ default:
3089+ break;
3090+ }
3091+ break;
3092+
30633093 default:
30643094 return result;
30653095 }
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hubp.c+1−0
@@ -87,6 +87,7 @@ static struct hubp_funcs dcn31_hubp_funcs = { · 86 unmodified lines
8787 .hubp_init = hubp3_init,
8888 .set_unbounded_requesting = hubp31_set_unbounded_requesting,
8989 .hubp_soft_reset = hubp31_soft_reset,
90+ .hubp_set_flip_int = hubp1_set_flip_int,
9091 .hubp_in_blank = hubp1_in_blank,
9192 .program_extended_blank = hubp31_program_extended_blank,
9293 };
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c+1−1
@@ -237,7 +237,7 @@ static struct timing_generator_funcs dcn314_tg_funcs = { · 236 unmodified lines
237237 .clear_optc_underflow = optc1_clear_optc_underflow,
238238 .setup_global_swap_lock = NULL,
239239 .get_crc = optc1_get_crc,
240− .configure_crc = optc2_configure_crc,
240+ .configure_crc = optc1_configure_crc,
241241 .set_dsc_config = optc3_set_dsc_config,
242242 .get_dsc_status = optc2_get_dsc_status,
243243 .set_dwb_source = NULL,
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c+5−9
@@ -283,8 +283,7 @@ static uint32_t dcn32_calculate_cab_allocation(struct dc *dc, struct dc_state *c · 282 unmodified lines
283283 using the max for calculation */
284284
285285 if (hubp->curs_attr.width > 0) {
286− // Round cursor width to next multiple of 64
287− cursor_size = (((hubp->curs_attr.width + 63) / 64) * 64) * hubp->curs_attr.height;
286+ cursor_size = hubp->curs_attr.pitch * hubp->curs_attr.height;
288287
289288 switch (pipe->stream->cursor_attributes.color_format) {
290289 case CURSOR_MODE_MONO:
@@ -309,9 +308,9 @@ static uint32_t dcn32_calculate_cab_allocation(struct dc *dc, struct dc_state *c · 18 unmodified lines
309308 cursor_size > 16384) {
310309 /* cursor_num_mblk = CEILING(num_cursors*cursor_width*cursor_width*cursor_Bpe/mblk_bytes, 1)
311310 */
312− cache_lines_used += (((hubp->curs_attr.width * hubp->curs_attr.height * cursor_bpp +
313− DCN3_2_MALL_MBLK_SIZE_BYTES - 1) / DCN3_2_MALL_MBLK_SIZE_BYTES) *
314− DCN3_2_MALL_MBLK_SIZE_BYTES) / dc->caps.cache_line_size + 2;
311+ cache_lines_used += (((cursor_size + DCN3_2_MALL_MBLK_SIZE_BYTES - 1) /
312+ DCN3_2_MALL_MBLK_SIZE_BYTES) * DCN3_2_MALL_MBLK_SIZE_BYTES) /
313+ dc->caps.cache_line_size + 2;
315314 }
316315 break;
317316 }
@@ -727,10 +726,7 @@ void dcn32_update_mall_sel(struct dc *dc, struct dc_state *context) · 409 unmodified lines
727726 struct hubp *hubp = pipe->plane_res.hubp;
728727
729728 if (pipe->stream && pipe->plane_state && hubp && hubp->funcs->hubp_update_mall_sel) {
730− //Round cursor width up to next multiple of 64
731− int cursor_width = ((hubp->curs_attr.width + 63) / 64) * 64;
732− int cursor_height = hubp->curs_attr.height;
733− int cursor_size = cursor_width * cursor_height;
729+ int cursor_size = hubp->curs_attr.pitch * hubp->curs_attr.height;
734730
735731 switch (hubp->curs_attr.color_format) {
736732 case CURSOR_MODE_MONO:
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c+15−1
@@ -1803,6 +1803,12 @@ void dcn32_calculate_wm_and_dlg_fpu(struct dc *dc, struct dc_state *context, · 1802 unmodified lines
18031803 */
18041804 context->bw_ctx.dml.soc.dram_clock_change_latency_us =
18051805 dc->clk_mgr->bw_params->wm_table.nv_entries[WM_A].dml_input.pstate_latency_us;
1806+ /* For DCN32/321 need to validate with fclk pstate change latency equal to dummy so
1807+ * prefetch is scheduled correctly to account for dummy pstate.
1808+ */
1809+ if (dummy_latency_index == 0)
1810+ context->bw_ctx.dml.soc.fclk_change_latency_us =
1811+ dc->clk_mgr->bw_params->dummy_pstate_table[dummy_latency_index].dummy_pstate_latency_us;
18061812 dcn32_internal_validate_bw(dc, context, pipes, &pipe_cnt, &vlevel, false);
18071813 maxMpcComb = context->bw_ctx.dml.vba.maxMpcComb;
18081814 dcfclk_from_fw_based_mclk_switching = context->bw_ctx.dml.vba.DCFCLKState[vlevel][context->bw_ctx.dml.vba.maxMpcComb];
@@ -1990,6 +1996,10 @@ void dcn32_calculate_wm_and_dlg_fpu(struct dc *dc, struct dc_state *context, · 181 unmodified lines
19901996
19911997 context->perf_params.stutter_period_us = context->bw_ctx.dml.vba.StutterPeriod;
19921998
1999+ if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching && dummy_latency_index == 0)
2000+ context->bw_ctx.dml.soc.fclk_change_latency_us =
2001+ dc->clk_mgr->bw_params->dummy_pstate_table[dummy_latency_index].dummy_pstate_latency_us;
2002+
19932003 dcn32_calculate_dlg_params(dc, context, pipes, pipe_cnt, vlevel);
19942004
19952005 if (!pstate_en)
@@ -1997,8 +2007,12 @@ void dcn32_calculate_wm_and_dlg_fpu(struct dc *dc, struct dc_state *context, · 1 unmodified line
19972007 context->bw_ctx.dml.soc.dram_clock_change_latency_us =
19982008 dc->clk_mgr->bw_params->wm_table.nv_entries[WM_A].dml_input.pstate_latency_us;
19992009
2000− if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching)
2010+ if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching) {
20012011 dcn30_setup_mclk_switch_using_fw_based_vblank_stretch(dc, context);
2012+ if (dummy_latency_index == 0)
2013+ context->bw_ctx.dml.soc.fclk_change_latency_us =
2014+ dc->clk_mgr->bw_params->wm_table.nv_entries[WM_A].dml_input.fclk_change_latency_us;
2015+ }
20022016 }
20032017
20042018 static void dcn32_get_optimal_dcfclk_fclk_for_uclk(unsigned int uclk_mts,
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c+2−0
@@ -718,6 +718,8 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman · 717 unmodified lines
718718
719719 do {
720720 MaxTotalRDBandwidth = 0;
721+ DestinationLineTimesForPrefetchLessThan2 = false;
722+ VRatioPrefetchMoreThanMax = false;
721723 #ifdef __DML_VBA_DEBUG__
722724 dml_print("DML::%s: Start loop: VStartup = %d\n", __func__, mode_lib->vba.VStartupLines);
723725 #endif
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.h+2−0
@@ -46,6 +46,8 @@ · 45 unmodified lines
4646 // Prefetch schedule max vratio
4747 #define __DML_MAX_VRATIO_PRE__ 4.0
4848
49+#define __DML_VBA_MAX_DST_Y_PRE__ 63.75
50+
4951 #define BPP_INVALID 0
5052 #define BPP_BLENDED_PIPE 0xffffffff
5153
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c+3−4
@@ -3475,7 +3475,6 @@ bool dml32_CalculatePrefetchSchedule( · 3474 unmodified lines
34753475 double min_Lsw;
34763476 double Tsw_est1 = 0;
34773477 double Tsw_est3 = 0;
3478− double TPreMargin = 0;
34793478
34803479 if (v->GPUVMEnable == true && v->HostVMEnable == true)
34813480 HostVMDynamicLevelsTrips = v->HostVMMaxNonCachedPageTableLevels;
@@ -3669,6 +3668,7 @@ bool dml32_CalculatePrefetchSchedule( · 187 unmodified lines
36693668 dst_y_prefetch_equ = VStartup - (*TSetup + dml_max(TWait + TCalc, *Tdmdl)) / LineTime -
36703669 (*DSTYAfterScaler + (double) *DSTXAfterScaler / (double) myPipe->HTotal);
36713670
3671+ dst_y_prefetch_equ = dml_min(dst_y_prefetch_equ, __DML_VBA_MAX_DST_Y_PRE__);
36723672 #ifdef __DML_VBA_DEBUG__
36733673 dml_print("DML::%s: HTotal = %d\n", __func__, myPipe->HTotal);
36743674 dml_print("DML::%s: min_Lsw = %f\n", __func__, min_Lsw);
@@ -3701,8 +3701,6 @@ bool dml32_CalculatePrefetchSchedule( · 26 unmodified lines
37013701
37023702 dst_y_prefetch_equ = dml_floor(4.0 * (dst_y_prefetch_equ + 0.125), 1) / 4.0;
37033703 Tpre_rounded = dst_y_prefetch_equ * LineTime;
3704−
3705− TPreMargin = Tpre_rounded - TPreReq;
37063704 #ifdef __DML_VBA_DEBUG__
37073705 dml_print("DML::%s: dst_y_prefetch_equ: %f (after round)\n", __func__, dst_y_prefetch_equ);
37083706 dml_print("DML::%s: LineTime: %f\n", __func__, LineTime);
@@ -3730,7 +3728,8 @@ bool dml32_CalculatePrefetchSchedule( · 21 unmodified lines
37303728 *VRatioPrefetchY = 0;
37313729 *VRatioPrefetchC = 0;
37323730 *RequiredPrefetchPixDataBWLuma = 0;
3733− if (dst_y_prefetch_equ > 1 && TPreMargin > 0.0) {
3731+ if (dst_y_prefetch_equ > 1 &&
3732+ (Tpre_rounded >= TPreReq || dst_y_prefetch_equ == __DML_VBA_MAX_DST_Y_PRE__)) {
37343733 double PrefetchBandwidth1;
37353734 double PrefetchBandwidth2;
37363735 double PrefetchBandwidth3;
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c+11−12
@@ -1156,22 +1156,21 @@ static int smu_smc_hw_setup(struct smu_context *smu) · 1155 unmodified lines
11561156 uint64_t features_supported;
11571157 int ret = 0;
11581158
1159− if (adev->in_suspend && smu_is_dpm_running(smu)) {
1160− dev_info(adev->dev, "dpm has been enabled\n");
1161− /* this is needed specifically */
1162− switch (adev->ip_versions[MP1_HWIP][0]) {
1163− case IP_VERSION(11, 0, 7):
1164− case IP_VERSION(11, 0, 11):
1165− case IP_VERSION(11, 5, 0):
1166− case IP_VERSION(11, 0, 12):
1159+ switch (adev->ip_versions[MP1_HWIP][0]) {
1160+ case IP_VERSION(11, 0, 7):
1161+ case IP_VERSION(11, 0, 11):
1162+ case IP_VERSION(11, 5, 0):
1163+ case IP_VERSION(11, 0, 12):
1164+ if (adev->in_suspend && smu_is_dpm_running(smu)) {
1165+ dev_info(adev->dev, "dpm has been enabled\n");
11671166 ret = smu_system_features_control(smu, true);
11681167 if (ret)
11691168 dev_err(adev->dev, "Failed system features control!\n");
1170− break;
1171− default:
1172− break;
1169+ return ret;
11731170 }
1174− return ret;
1171+ break;
1172+ default:
1173+ break;
11751174 }
11761175
11771176 ret = smu_init_display_count(smu, 0);
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h+8−0
@@ -1388,6 +1388,14 @@ enum smu_cmn2asic_mapping_type { · 1387 unmodified lines
13881388 CMN2ASIC_MAPPING_WORKLOAD,
13891389 };
13901390
1391+enum smu_baco_seq {
1392+ BACO_SEQ_BACO = 0,
1393+ BACO_SEQ_MSR,
1394+ BACO_SEQ_BAMACO,
1395+ BACO_SEQ_ULPS,
1396+ BACO_SEQ_COUNT,
1397+};
1398+
13911399 #define MSG_MAP(msg, index, valid_in_vf) \
13921400 [SMU_MSG_##msg] = {1, (index), (valid_in_vf)}
13931401
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v11_0.h+1−9
@@ -147,14 +147,6 @@ struct smu_11_5_power_context { · 146 unmodified lines
147147 uint32_t max_fast_ppt_limit;
148148 };
149149
150−enum smu_v11_0_baco_seq {
151− BACO_SEQ_BACO = 0,
152− BACO_SEQ_MSR,
153− BACO_SEQ_BAMACO,
154− BACO_SEQ_ULPS,
155− BACO_SEQ_COUNT,
156−};
157−
158150 #if defined(SWSMU_CODE_LAYER_L2) || defined(SWSMU_CODE_LAYER_L3)
159151
160152 int smu_v11_0_init_microcode(struct smu_context *smu);
@@ -257,7 +249,7 @@ int smu_v11_0_baco_enter(struct smu_context *smu); · 96 unmodified lines
257249 int smu_v11_0_baco_exit(struct smu_context *smu);
258250
259251 int smu_v11_0_baco_set_armd3_sequence(struct smu_context *smu,
260− enum smu_v11_0_baco_seq baco_seq);
252+ enum smu_baco_seq baco_seq);
261253
262254 int smu_v11_0_mode1_reset(struct smu_context *smu);
263255
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h+3−8
@@ -124,14 +124,6 @@ struct smu_13_0_power_context { · 123 unmodified lines
124124 enum smu_13_0_power_state power_state;
125125 };
126126
127−enum smu_v13_0_baco_seq {
128− BACO_SEQ_BACO = 0,
129− BACO_SEQ_MSR,
130− BACO_SEQ_BAMACO,
131− BACO_SEQ_ULPS,
132− BACO_SEQ_COUNT,
133−};
134−
135127 #if defined(SWSMU_CODE_LAYER_L2) || defined(SWSMU_CODE_LAYER_L3)
136128
137129 int smu_v13_0_init_microcode(struct smu_context *smu);
@@ -218,6 +210,9 @@ int smu_v13_0_set_azalia_d3_pme(struct smu_context *smu); · 80 unmodified lines
218210 int smu_v13_0_get_max_sustainable_clocks_by_dc(struct smu_context *smu,
219211 struct pp_smu_nv_clock_table *max_clocks);
220212
213+int smu_v13_0_baco_set_armd3_sequence(struct smu_context *smu,
214+ enum smu_baco_seq baco_seq);
215+
221216 bool smu_v13_0_baco_is_support(struct smu_context *smu);
222217
223218 enum smu_baco_state smu_v13_0_baco_get_state(struct smu_context *smu);
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c+4−0
@@ -379,6 +379,10 @@ static void sienna_cichlid_check_bxco_support(struct smu_context *smu) · 378 unmodified lines
379379 ((adev->pdev->device == 0x73BF) &&
380380 (adev->pdev->revision == 0xCF)) ||
381381 ((adev->pdev->device == 0x7422) &&
382+ (adev->pdev->revision == 0x00)) ||
383+ ((adev->pdev->device == 0x73A3) &&
384+ (adev->pdev->revision == 0x00)) ||
385+ ((adev->pdev->device == 0x73E3) &&
382386 (adev->pdev->revision == 0x00)))
383387 smu_baco->platform_support = false;
384388
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c+1−1
@@ -1576,7 +1576,7 @@ int smu_v11_0_set_azalia_d3_pme(struct smu_context *smu) · 1575 unmodified lines
15761576 }
15771577
15781578 int smu_v11_0_baco_set_armd3_sequence(struct smu_context *smu,
1579− enum smu_v11_0_baco_seq baco_seq)
1579+ enum smu_baco_seq baco_seq)
15801580 {
15811581 return smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_ArmD3, baco_seq, NULL);
15821582 }
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c+9−0
@@ -2230,6 +2230,15 @@ int smu_v13_0_gfx_ulv_control(struct smu_context *smu, · 2229 unmodified lines
22302230 return ret;
22312231 }
22322232
2233+int smu_v13_0_baco_set_armd3_sequence(struct smu_context *smu,
2234+ enum smu_baco_seq baco_seq)
2235+{
2236+ return smu_cmn_send_smc_msg_with_param(smu,
2237+ SMU_MSG_ArmD3,
2238+ baco_seq,
2239+ NULL);
2240+}
2241+
22332242 bool smu_v13_0_baco_is_support(struct smu_context *smu)
22342243 {
22352244 struct smu_baco_context *smu_baco = &smu->smu_baco;
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c+28−2
@@ -120,6 +120,7 @@ static struct cmn2asic_msg_mapping smu_v13_0_0_message_map[SMU_MSG_MAX_COUNT] = · 119 unmodified lines
120120 MSG_MAP(Mode1Reset, PPSMC_MSG_Mode1Reset, 0),
121121 MSG_MAP(PrepareMp1ForUnload, PPSMC_MSG_PrepareMp1ForUnload, 0),
122122 MSG_MAP(DFCstateControl, PPSMC_MSG_SetExternalClientDfCstateAllow, 0),
123+ MSG_MAP(ArmD3, PPSMC_MSG_ArmD3, 0),
123124 };
124125
125126 static struct cmn2asic_mapping smu_v13_0_0_clk_map[SMU_CLK_COUNT] = {
@@ -1566,6 +1567,31 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu, · 1440 unmodified lines
15661567 NULL);
15671568 }
15681569
1570+static int smu_v13_0_0_baco_enter(struct smu_context *smu)
1571+{
1572+ struct smu_baco_context *smu_baco = &smu->smu_baco;
1573+ struct amdgpu_device *adev = smu->adev;
1574+
1575+ if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev))
1576+ return smu_v13_0_baco_set_armd3_sequence(smu,
1577+ smu_baco->maco_support ? BACO_SEQ_BAMACO : BACO_SEQ_BACO);
1578+ else
1579+ return smu_v13_0_baco_enter(smu);
1580+}
1581+
1582+static int smu_v13_0_0_baco_exit(struct smu_context *smu)
1583+{
1584+ struct amdgpu_device *adev = smu->adev;
1585+
1586+ if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev)) {
1587+ /* Wait for PMFW handling for the Dstate change */
1588+ usleep_range(10000, 11000);
1589+ return smu_v13_0_baco_set_armd3_sequence(smu, BACO_SEQ_ULPS);
1590+ } else {
1591+ return smu_v13_0_baco_exit(smu);
1592+ }
1593+}
1594+
15691595 static bool smu_v13_0_0_is_mode1_reset_supported(struct smu_context *smu)
15701596 {
15711597 struct amdgpu_device *adev = smu->adev;
@@ -1827,8 +1853,8 @@ static const struct pptable_funcs smu_v13_0_0_ppt_funcs = { · 255 unmodified lines
18271853 .baco_is_support = smu_v13_0_baco_is_support,
18281854 .baco_get_state = smu_v13_0_baco_get_state,
18291855 .baco_set_state = smu_v13_0_baco_set_state,
1830− .baco_enter = smu_v13_0_baco_enter,
1831− .baco_exit = smu_v13_0_baco_exit,
1856+ .baco_enter = smu_v13_0_0_baco_enter,
1857+ .baco_exit = smu_v13_0_0_baco_exit,
18321858 .mode1_reset_is_support = smu_v13_0_0_is_mode1_reset_supported,
18331859 .mode1_reset = smu_v13_0_mode1_reset,
18341860 .set_mp1_state = smu_v13_0_0_set_mp1_state,
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c+28−2
@@ -122,6 +122,7 @@ static struct cmn2asic_msg_mapping smu_v13_0_7_message_map[SMU_MSG_MAX_COUNT] = · 121 unmodified lines
122122 MSG_MAP(PrepareMp1ForUnload, PPSMC_MSG_PrepareMp1ForUnload, 0),
123123 MSG_MAP(SetMGpuFanBoostLimitRpm, PPSMC_MSG_SetMGpuFanBoostLimitRpm, 0),
124124 MSG_MAP(DFCstateControl, PPSMC_MSG_SetExternalClientDfCstateAllow, 0),
125+ MSG_MAP(ArmD3, PPSMC_MSG_ArmD3, 0),
125126 };
126127
127128 static struct cmn2asic_mapping smu_v13_0_7_clk_map[SMU_CLK_COUNT] = {
@@ -1578,6 +1579,31 @@ static int smu_v13_0_7_set_mp1_state(struct smu_context *smu, · 1450 unmodified lines
15781579 return ret;
15791580 }
15801581
1582+static int smu_v13_0_7_baco_enter(struct smu_context *smu)
1583+{
1584+ struct smu_baco_context *smu_baco = &smu->smu_baco;
1585+ struct amdgpu_device *adev = smu->adev;
1586+
1587+ if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev))
1588+ return smu_v13_0_baco_set_armd3_sequence(smu,
1589+ smu_baco->maco_support ? BACO_SEQ_BAMACO : BACO_SEQ_BACO);
1590+ else
1591+ return smu_v13_0_baco_enter(smu);
1592+}
1593+
1594+static int smu_v13_0_7_baco_exit(struct smu_context *smu)
1595+{
1596+ struct amdgpu_device *adev = smu->adev;
1597+
1598+ if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev)) {
1599+ /* Wait for PMFW handling for the Dstate change */
1600+ usleep_range(10000, 11000);
1601+ return smu_v13_0_baco_set_armd3_sequence(smu, BACO_SEQ_ULPS);
1602+ } else {
1603+ return smu_v13_0_baco_exit(smu);
1604+ }
1605+}
1606+
15811607 static bool smu_v13_0_7_is_mode1_reset_supported(struct smu_context *smu)
15821608 {
15831609 struct amdgpu_device *adev = smu->adev;
@@ -1655,8 +1681,8 @@ static const struct pptable_funcs smu_v13_0_7_ppt_funcs = { · 71 unmodified lines
16551681 .baco_is_support = smu_v13_0_baco_is_support,
16561682 .baco_get_state = smu_v13_0_baco_get_state,
16571683 .baco_set_state = smu_v13_0_baco_set_state,
1658− .baco_enter = smu_v13_0_baco_enter,
1659− .baco_exit = smu_v13_0_baco_exit,
1684+ .baco_enter = smu_v13_0_7_baco_enter,
1685+ .baco_exit = smu_v13_0_7_baco_exit,
16601686 .mode1_reset_is_support = smu_v13_0_7_is_mode1_reset_supported,
16611687 .mode1_reset = smu_v13_0_mode1_reset,
16621688 .set_mp1_state = smu_v13_0_7_set_mp1_state,
drivers/gpu/drm/display/drm_dp_dual_mode_helper.c+29−22
@@ -63,23 +63,45 @@ · 62 unmodified lines
6363 ssize_t drm_dp_dual_mode_read(struct i2c_adapter *adapter,
6464 u8 offset, void *buffer, size_t size)
6565 {
66+ u8 zero = 0;
67+ char *tmpbuf = NULL;
68+ /*
69+ * As sub-addressing is not supported by all adaptors,
70+ * always explicitly read from the start and discard
71+ * any bytes that come before the requested offset.
72+ * This way, no matter whether the adaptor supports it
73+ * or not, we'll end up reading the proper data.
74+ */
6675 struct i2c_msg msgs[] = {
6776 {
6877 .addr = DP_DUAL_MODE_SLAVE_ADDRESS,
6978 .flags = 0,
7079 .len = 1,
71− .buf = &offset,
80+ .buf = &zero,
7281 },
7382 {
7483 .addr = DP_DUAL_MODE_SLAVE_ADDRESS,
7584 .flags = I2C_M_RD,
76− .len = size,
85+ .len = size + offset,
7786 .buf = buffer,
7887 },
7988 };
8089 int ret;
8190
91+ if (offset) {
92+ tmpbuf = kmalloc(size + offset, GFP_KERNEL);
93+ if (!tmpbuf)
94+ return -ENOMEM;
95+
96+ msgs[1].buf = tmpbuf;
97+ }
98+
8299 ret = i2c_transfer(adapter, msgs, ARRAY_SIZE(msgs));
100+ if (tmpbuf)
101+ memcpy(buffer, tmpbuf + offset, size);
102+
103+ kfree(tmpbuf);
104+
83105 if (ret < 0)
84106 return ret;
85107 if (ret != ARRAY_SIZE(msgs))
@@ -208,18 +230,6 @@ enum drm_dp_dual_mode_type drm_dp_dual_mode_detect(const struct drm_device *dev, · 122 unmodified lines
208230 if (ret)
209231 return DRM_DP_DUAL_MODE_UNKNOWN;
210232
211− /*
212− * Sigh. Some (maybe all?) type 1 adaptors are broken and ack
213− * the offset but ignore it, and instead they just always return
214− * data from the start of the HDMI ID buffer. So for a broken
215− * type 1 HDMI adaptor a single byte read will always give us
216− * 0x44, and for a type 1 DVI adaptor it should give 0x00
217− * (assuming it implements any registers). Fortunately neither
218− * of those values will match the type 2 signature of the
219− * DP_DUAL_MODE_ADAPTOR_ID register so we can proceed with
220− * the type 2 adaptor detection safely even in the presence
221− * of broken type 1 adaptors.
222− */
223233 ret = drm_dp_dual_mode_read(adapter, DP_DUAL_MODE_ADAPTOR_ID,
224234 &adaptor_id, sizeof(adaptor_id));
225235 drm_dbg_kms(dev, "DP dual mode adaptor ID: %02x (err %zd)\n", adaptor_id, ret);
@@ -233,11 +243,10 @@ enum drm_dp_dual_mode_type drm_dp_dual_mode_detect(const struct drm_device *dev, · 7 unmodified lines
233243 return DRM_DP_DUAL_MODE_TYPE2_DVI;
234244 }
235245 /*
236− * If neither a proper type 1 ID nor a broken type 1 adaptor
237− * as described above, assume type 1, but let the user know
238− * that we may have misdetected the type.
246+ * If not a proper type 1 ID, still assume type 1, but let
247+ * the user know that we may have misdetected the type.
239248 */
240− if (!is_type1_adaptor(adaptor_id) && adaptor_id != hdmi_id[0])
249+ if (!is_type1_adaptor(adaptor_id))
241250 drm_err(dev, "Unexpected DP dual mode adaptor ID %02x\n", adaptor_id);
242251
243252 }
@@ -343,10 +352,8 @@ EXPORT_SYMBOL(drm_dp_dual_mode_get_tmds_output); · 99 unmodified lines
343352 * @enable: enable (as opposed to disable) the TMDS output buffers
344353 *
345354 * Set the state of the TMDS output buffers in the adaptor. For
346− * type2 this is set via the DP_DUAL_MODE_TMDS_OEN register. As
347− * some type 1 adaptors have problems with registers (see comments
348− * in drm_dp_dual_mode_detect()) we avoid touching the register,
349− * making this function a no-op on type 1 adaptors.
355+ * type2 this is set via the DP_DUAL_MODE_TMDS_OEN register.
356+ * Type1 adaptors do not support any register writes.
350357 *
351358 * Returns:
352359 * 0 on success, negative error code on failure
drivers/gpu/drm/drm_drv.c+1−1
@@ -615,7 +615,7 @@ static int drm_dev_init(struct drm_device *dev, · 614 unmodified lines
615615 mutex_init(&dev->clientlist_mutex);
616616 mutex_init(&dev->master_mutex);
617617
618− ret = drmm_add_action(dev, drm_dev_init_release, NULL);
618+ ret = drmm_add_action_or_reset(dev, drm_dev_init_release, NULL);
619619 if (ret)
620620 return ret;
621621
drivers/gpu/drm/drm_internal.h+2−1
@@ -104,7 +104,8 @@ static inline void drm_vblank_flush_worker(struct drm_vblank_crtc *vblank) · 103 unmodified lines
104104
105105 static inline void drm_vblank_destroy_worker(struct drm_vblank_crtc *vblank)
106106 {
107− kthread_destroy_worker(vblank->worker);
107+ if (vblank->worker)
108+ kthread_destroy_worker(vblank->worker);
108109 }
109110
110111 int drm_vblank_worker_init(struct drm_vblank_crtc *vblank);
drivers/gpu/drm/drm_mode_config.c+0−3
@@ -151,9 +151,6 @@ int drm_mode_getresources(struct drm_device *dev, void *data, · 150 unmodified lines
151151 count = 0;
152152 connector_id = u64_to_user_ptr(card_res->connector_id_ptr);
153153 drm_for_each_connector_iter(connector, &conn_iter) {
154− if (connector->registration_state != DRM_CONNECTOR_REGISTERED)
155− continue;
156−
157154 /* only expose writeback connectors if userspace understands them */
158155 if (!file_priv->writeback_connectors &&
159156 (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK))
drivers/gpu/drm/i2c/tda998x_drv.c+2−0
@@ -1174,6 +1174,8 @@ static int tda998x_audio_codec_init(struct tda998x_priv *priv, · 1173 unmodified lines
11741174 struct hdmi_codec_pdata codec_data = {
11751175 .ops = &audio_codec_ops,
11761176 .max_i2s_channels = 2,
1177+ .no_i2s_capture = 1,
1178+ .no_spdif_capture = 1,
11771179 };
11781180
11791181 if (priv->audio_port_enable[AUDIO_ROUTE_I2S])
drivers/gpu/drm/i915/gem/i915_gem_ttm.c+3−3
@@ -1013,9 +1013,6 @@ static vm_fault_t vm_fault_ttm(struct vm_fault *vmf) · 1012 unmodified lines
10131013 return VM_FAULT_SIGBUS;
10141014 }
10151015
1016− if (i915_ttm_cpu_maps_iomem(bo->resource))
1017− wakeref = intel_runtime_pm_get(&to_i915(obj->base.dev)->runtime_pm);
1018−
10191016 if (!i915_ttm_resource_mappable(bo->resource)) {
10201017 int err = -ENODEV;
10211018 int i;
@@ -1042,6 +1039,9 @@ static vm_fault_t vm_fault_ttm(struct vm_fault *vmf) · 20 unmodified lines
10421039 }
10431040 }
10441041
1042+ if (i915_ttm_cpu_maps_iomem(bo->resource))
1043+ wakeref = intel_runtime_pm_get(&to_i915(obj->base.dev)->runtime_pm);
1044+
10451045 if (drm_dev_enter(dev, &idx)) {
10461046 ret = ttm_bo_vm_fault_reserved(vmf, vmf->vma->vm_page_prot,
10471047 TTM_BO_VM_NUM_PREFAULT);
drivers/gpu/drm/lima/lima_devfreq.c+9−6
@@ -112,11 +112,6 @@ int lima_devfreq_init(struct lima_device *ldev) · 111 unmodified lines
112112 unsigned long cur_freq;
113113 int ret;
114114 const char *regulator_names[] = { "mali", NULL };
115− const char *clk_names[] = { "core", NULL };
116− struct dev_pm_opp_config config = {
117− .regulator_names = regulator_names,
118− .clk_names = clk_names,
119− };
120115
121116 if (!device_property_present(dev, "operating-points-v2"))
122117 /* Optional, continue without devfreq */
@@ -124,7 +119,15 @@ int lima_devfreq_init(struct lima_device *ldev) · 1 unmodified line
124119
125120 spin_lock_init(&ldevfreq->lock);
126121
127− ret = devm_pm_opp_set_config(dev, &config);
122+ /*
123+ * clkname is set separately so it is not affected by the optional
124+ * regulator setting which may return error.
125+ */
126+ ret = devm_pm_opp_set_clkname(dev, "core");
127+ if (ret)
128+ return ret;
129+
130+ ret = devm_pm_opp_set_regulators(dev, regulator_names);
128131 if (ret) {
129132 /* Continue if the optional regulator is missing */
130133 if (ret != -ENODEV)
drivers/gpu/drm/panel/panel-simple.c+2−0
@@ -2500,6 +2500,7 @@ static const struct display_timing logictechno_lt161010_2nh_timing = { · 2499 unmodified lines
25002500 static const struct panel_desc logictechno_lt161010_2nh = {
25012501 .timings = &logictechno_lt161010_2nh_timing,
25022502 .num_timings = 1,
2503+ .bpc = 6,
25032504 .size = {
25042505 .width = 154,
25052506 .height = 86,
@@ -2529,6 +2530,7 @@ static const struct display_timing logictechno_lt170410_2whc_timing = { · 23 unmodified lines
25292530 static const struct panel_desc logictechno_lt170410_2whc = {
25302531 .timings = &logictechno_lt170410_2whc_timing,
25312532 .num_timings = 1,
2533+ .bpc = 8,
25322534 .size = {
25332535 .width = 217,
25342536 .height = 136,
drivers/gpu/drm/tegra/drm.c+4−0
@@ -1093,6 +1093,10 @@ static bool host1x_drm_wants_iommu(struct host1x_device *dev) · 1092 unmodified lines
10931093 struct host1x *host1x = dev_get_drvdata(dev->dev.parent);
10941094 struct iommu_domain *domain;
10951095
1096+ /* Our IOMMU usage policy doesn't currently play well with GART */
1097+ if (of_machine_is_compatible("nvidia,tegra20"))
1098+ return false;
1099+
10961100 /*
10971101 * If the Tegra DRM clients are backed by an IOMMU, push buffers are
10981102 * likely to be allocated beyond the 32-bit boundary if sufficient
drivers/gpu/drm/vc4/vc4_kms.c+4−4
@@ -197,8 +197,8 @@ vc4_hvs_get_new_global_state(struct drm_atomic_state *state) · 196 unmodified lines
197197 struct drm_private_state *priv_state;
198198
199199 priv_state = drm_atomic_get_new_private_obj_state(state, &vc4->hvs_channels);
200− if (IS_ERR(priv_state))
201− return ERR_CAST(priv_state);
200+ if (!priv_state)
201+ return ERR_PTR(-EINVAL);
202202
203203 return to_vc4_hvs_state(priv_state);
204204 }
@@ -210,8 +210,8 @@ vc4_hvs_get_old_global_state(struct drm_atomic_state *state) · 5 unmodified lines
210210 struct drm_private_state *priv_state;
211211
212212 priv_state = drm_atomic_get_old_private_obj_state(state, &vc4->hvs_channels);
213− if (IS_ERR(priv_state))
214− return ERR_CAST(priv_state);
213+ if (!priv_state)
214+ return ERR_PTR(-EINVAL);
215215
216216 return to_vc4_hvs_state(priv_state);
217217 }
drivers/gpu/host1x/dev.c+4−0
@@ -292,6 +292,10 @@ static void host1x_setup_virtualization_tables(struct host1x *host) · 291 unmodified lines
292292
293293 static bool host1x_wants_iommu(struct host1x *host1x)
294294 {
295+ /* Our IOMMU usage policy doesn't currently play well with GART */
296+ if (of_machine_is_compatible("nvidia,tegra20"))
297+ return false;
298+
295299 /*
296300 * If we support addressing a maximum of 32 bits of physical memory
297301 * and if the host1x firewall is enabled, there's no need to enable
drivers/iio/accel/bma400_core.c+12−12
@@ -869,18 +869,6 @@ static int bma400_init(struct bma400_data *data) · 868 unmodified lines
869869 unsigned int val;
870870 int ret;
871871
872− /* Try to read chip_id register. It must return 0x90. */
873− ret = regmap_read(data->regmap, BMA400_CHIP_ID_REG, &val);
874− if (ret) {
875− dev_err(data->dev, "Failed to read chip id register\n");
876− return ret;
877− }
878−
879− if (val != BMA400_ID_REG_VAL) {
880− dev_err(data->dev, "Chip ID mismatch\n");
881− return -ENODEV;
882− }
883−
884872 data->regulators[BMA400_VDD_REGULATOR].supply = "vdd";
885873 data->regulators[BMA400_VDDIO_REGULATOR].supply = "vddio";
886874 ret = devm_regulator_bulk_get(data->dev,
@@ -906,6 +894,18 @@ static int bma400_init(struct bma400_data *data) · 19 unmodified lines
906894 if (ret)
907895 return ret;
908896
897+ /* Try to read chip_id register. It must return 0x90. */
898+ ret = regmap_read(data->regmap, BMA400_CHIP_ID_REG, &val);
899+ if (ret) {
900+ dev_err(data->dev, "Failed to read chip id register\n");
901+ return ret;
902+ }
903+
904+ if (val != BMA400_ID_REG_VAL) {
905+ dev_err(data->dev, "Chip ID mismatch\n");
906+ return -ENODEV;
907+ }
908+
909909 ret = bma400_get_power_mode(data);
910910 if (ret) {
911911 dev_err(data->dev, "Failed to get the initial power-mode\n");
drivers/iio/adc/at91-sama5d2_adc.c+2−4
@@ -2307,11 +2307,9 @@ static int at91_adc_temp_sensor_init(struct at91_adc_state *st, · 2306 unmodified lines
23072307 clb->p6 = buf[AT91_ADC_TS_CLB_IDX_P6];
23082308
23092309 /*
2310− * We prepare here the conversion to milli and also add constant
2311− * factor (5 degrees Celsius) to p1 here to avoid doing it on
2312− * hotpath.
2310+ * We prepare here the conversion to milli to avoid doing it on hotpath.
23132311 */
2314− clb->p1 = clb->p1 * 1000 + 5000;
2312+ clb->p1 = clb->p1 * 1000;
23152313
23162314 free_buf:
23172315 kfree(buf);
drivers/iio/adc/at91_adc.c+3−1
@@ -634,8 +634,10 @@ static struct iio_trigger *at91_adc_allocate_trigger(struct iio_dev *idev, · 633 unmodified lines
634634 trig->ops = &at91_adc_trigger_ops;
635635
636636 ret = iio_trigger_register(trig);
637− if (ret)
637+ if (ret) {
638+ iio_trigger_free(trig);
638639 return NULL;
640+ }
639641
640642 return trig;
641643 }
drivers/iio/adc/mp2629_adc.c+3−2
@@ -57,7 +57,8 @@ static struct iio_map mp2629_adc_maps[] = { · 56 unmodified lines
5757 MP2629_MAP(SYSTEM_VOLT, "system-volt"),
5858 MP2629_MAP(INPUT_VOLT, "input-volt"),
5959 MP2629_MAP(BATT_CURRENT, "batt-current"),
60− MP2629_MAP(INPUT_CURRENT, "input-current")
60+ MP2629_MAP(INPUT_CURRENT, "input-current"),
61+ { }
6162 };
6263
6364 static int mp2629_read_raw(struct iio_dev *indio_dev,
@@ -74,7 +75,7 @@ static int mp2629_read_raw(struct iio_dev *indio_dev, · 10 unmodified lines
7475 if (ret)
7576 return ret;
7677
77− if (chan->address == MP2629_INPUT_VOLT)
78+ if (chan->channel == MP2629_INPUT_VOLT)
7879 rval &= GENMASK(6, 0);
7980 *val = rval;
8081 return IIO_VAL_INT;
drivers/iio/imu/bno055/bno055.c+1−1
@@ -632,7 +632,7 @@ static int bno055_set_regmask(struct bno055_priv *priv, int val, int val2, · 631 unmodified lines
632632 return -EINVAL;
633633 }
634634 delta = abs(tbl_val - req_val);
635− if (delta < best_delta || first) {
635+ if (first || delta < best_delta) {
636636 best_delta = delta;
637637 hwval = i;
638638 first = false;
drivers/iio/pressure/ms5611.h+4−8
@@ -25,13 +25,6 @@ enum { · 24 unmodified lines
2525 MS5607,
2626 };
2727
28−struct ms5611_chip_info {
29− u16 prom[MS5611_PROM_WORDS_NB];
30−
31− int (*temp_and_pressure_compensate)(struct ms5611_chip_info *chip_info,
32− s32 *temp, s32 *pressure);
33−};
34−
3528 /*
3629 * OverSampling Rate descriptor.
3730 * Warning: cmd MUST be kept aligned on a word boundary (see
@@ -50,12 +43,15 @@ struct ms5611_state { · 12 unmodified lines
5043 const struct ms5611_osr *pressure_osr;
5144 const struct ms5611_osr *temp_osr;
5245
46+ u16 prom[MS5611_PROM_WORDS_NB];
47+
5348 int (*reset)(struct ms5611_state *st);
5449 int (*read_prom_word)(struct ms5611_state *st, int index, u16 *word);
5550 int (*read_adc_temp_and_pressure)(struct ms5611_state *st,
5651 s32 *temp, s32 *pressure);
5752
58− struct ms5611_chip_info *chip_info;
53+ int (*compensate_temp_and_pressure)(struct ms5611_state *st, s32 *temp,
54+ s32 *pressure);
5955 struct regulator *vdd;
6056 };
6157
drivers/iio/pressure/ms5611_core.c+27−24
@@ -85,7 +85,7 @@ static int ms5611_read_prom(struct iio_dev *indio_dev) · 84 unmodified lines
8585 struct ms5611_state *st = iio_priv(indio_dev);
8686
8787 for (i = 0; i < MS5611_PROM_WORDS_NB; i++) {
88− ret = st->read_prom_word(st, i, &st->chip_info->prom[i]);
88+ ret = st->read_prom_word(st, i, &st->prom[i]);
8989 if (ret < 0) {
9090 dev_err(&indio_dev->dev,
9191 "failed to read prom at %d\n", i);
@@ -93,7 +93,7 @@ static int ms5611_read_prom(struct iio_dev *indio_dev) · 1 unmodified line
9393 }
9494 }
9595
96− if (!ms5611_prom_is_valid(st->chip_info->prom, MS5611_PROM_WORDS_NB)) {
96+ if (!ms5611_prom_is_valid(st->prom, MS5611_PROM_WORDS_NB)) {
9797 dev_err(&indio_dev->dev, "PROM integrity check failed\n");
9898 return -ENODEV;
9999 }
@@ -114,21 +114,20 @@ static int ms5611_read_temp_and_pressure(struct iio_dev *indio_dev, · 14 unmodified lines
114114 return ret;
115115 }
116116
117− return st->chip_info->temp_and_pressure_compensate(st->chip_info,
118− temp, pressure);
117+ return st->compensate_temp_and_pressure(st, temp, pressure);
119118 }
120119
121−static int ms5611_temp_and_pressure_compensate(struct ms5611_chip_info *chip_info,
120+static int ms5611_temp_and_pressure_compensate(struct ms5611_state *st,
122121 s32 *temp, s32 *pressure)
123122 {
124123 s32 t = *temp, p = *pressure;
125124 s64 off, sens, dt;
126125
127− dt = t - (chip_info->prom[5] << 8);
128− off = ((s64)chip_info->prom[2] << 16) + ((chip_info->prom[4] * dt) >> 7);
129− sens = ((s64)chip_info->prom[1] << 15) + ((chip_info->prom[3] * dt) >> 8);
126+ dt = t - (st->prom[5] << 8);
127+ off = ((s64)st->prom[2] << 16) + ((st->prom[4] * dt) >> 7);
128+ sens = ((s64)st->prom[1] << 15) + ((st->prom[3] * dt) >> 8);
130129
131− t = 2000 + ((chip_info->prom[6] * dt) >> 23);
130+ t = 2000 + ((st->prom[6] * dt) >> 23);
132131 if (t < 2000) {
133132 s64 off2, sens2, t2;
134133
@@ -154,17 +153,17 @@ static int ms5611_temp_and_pressure_compensate(struct ms5611_chip_info *chip_inf · 19 unmodified lines
154153 return 0;
155154 }
156155
157−static int ms5607_temp_and_pressure_compensate(struct ms5611_chip_info *chip_info,
156+static int ms5607_temp_and_pressure_compensate(struct ms5611_state *st,
158157 s32 *temp, s32 *pressure)
159158 {
160159 s32 t = *temp, p = *pressure;
161160 s64 off, sens, dt;
162161
163− dt = t - (chip_info->prom[5] << 8);
164− off = ((s64)chip_info->prom[2] << 17) + ((chip_info->prom[4] * dt) >> 6);
165− sens = ((s64)chip_info->prom[1] << 16) + ((chip_info->prom[3] * dt) >> 7);
162+ dt = t - (st->prom[5] << 8);
163+ off = ((s64)st->prom[2] << 17) + ((st->prom[4] * dt) >> 6);
164+ sens = ((s64)st->prom[1] << 16) + ((st->prom[3] * dt) >> 7);
166165
167− t = 2000 + ((chip_info->prom[6] * dt) >> 23);
166+ t = 2000 + ((st->prom[6] * dt) >> 23);
168167 if (t < 2000) {
169168 s64 off2, sens2, t2, tmp;
170169
@@ -342,15 +341,6 @@ static int ms5611_write_raw(struct iio_dev *indio_dev, · 171 unmodified lines
342341
343342 static const unsigned long ms5611_scan_masks[] = {0x3, 0};
344343
345−static struct ms5611_chip_info chip_info_tbl[] = {
346− [MS5611] = {
347− .temp_and_pressure_compensate = ms5611_temp_and_pressure_compensate,
348− },
349− [MS5607] = {
350− .temp_and_pressure_compensate = ms5607_temp_and_pressure_compensate,
351− }
352−};
353−
354344 static const struct iio_chan_spec ms5611_channels[] = {
355345 {
356346 .type = IIO_PRESSURE,
@@ -433,7 +423,20 @@ int ms5611_probe(struct iio_dev *indio_dev, struct device *dev, · 76 unmodified lines
433423 struct ms5611_state *st = iio_priv(indio_dev);
434424
435425 mutex_init(&st->lock);
436− st->chip_info = &chip_info_tbl[type];
426+
427+ switch (type) {
428+ case MS5611:
429+ st->compensate_temp_and_pressure =
430+ ms5611_temp_and_pressure_compensate;
431+ break;
432+ case MS5607:
433+ st->compensate_temp_and_pressure =
434+ ms5607_temp_and_pressure_compensate;
435+ break;
436+ default:
437+ return -EINVAL;
438+ }
439+
437440 st->temp_osr =
438441 &ms5611_avail_temp_osr[ARRAY_SIZE(ms5611_avail_temp_osr) - 1];
439442 st->pressure_osr =
drivers/iio/pressure/ms5611_spi.c+1−1
@@ -91,7 +91,7 @@ static int ms5611_spi_probe(struct spi_device *spi) · 90 unmodified lines
9191 spi_set_drvdata(spi, indio_dev);
9292
9393 spi->mode = SPI_MODE_0;
94− spi->max_speed_hz = 20000000;
94+ spi->max_speed_hz = min(spi->max_speed_hz, 20000000U);
9595 spi->bits_per_word = 8;
9696 ret = spi_setup(spi);
9797 if (ret < 0)
drivers/iio/trigger/iio-trig-sysfs.c+5−1
@@ -203,9 +203,13 @@ static int iio_sysfs_trigger_remove(int id) · 202 unmodified lines
203203
204204 static int __init iio_sysfs_trig_init(void)
205205 {
206+ int ret;
206207 device_initialize(&iio_sysfs_trig_dev);
207208 dev_set_name(&iio_sysfs_trig_dev, "iio_sysfs_trigger");
208− return device_add(&iio_sysfs_trig_dev);
209+ ret = device_add(&iio_sysfs_trig_dev);
210+ if (ret)
211+ put_device(&iio_sysfs_trig_dev);
212+ return ret;
209213 }
210214 module_init(iio_sysfs_trig_init);
211215
drivers/input/joystick/iforce/iforce-main.c+4−4
@@ -273,22 +273,22 @@ int iforce_init_device(struct device *parent, u16 bustype, · 272 unmodified lines
273273 * Get device info.
274274 */
275275
276− if (!iforce_get_id_packet(iforce, 'M', buf, &len) || len < 3)
276+ if (!iforce_get_id_packet(iforce, 'M', buf, &len) && len >= 3)
277277 input_dev->id.vendor = get_unaligned_le16(buf + 1);
278278 else
279279 dev_warn(&iforce->dev->dev, "Device does not respond to id packet M\n");
280280
281− if (!iforce_get_id_packet(iforce, 'P', buf, &len) || len < 3)
281+ if (!iforce_get_id_packet(iforce, 'P', buf, &len) && len >= 3)
282282 input_dev->id.product = get_unaligned_le16(buf + 1);
283283 else
284284 dev_warn(&iforce->dev->dev, "Device does not respond to id packet P\n");
285285
286− if (!iforce_get_id_packet(iforce, 'B', buf, &len) || len < 3)
286+ if (!iforce_get_id_packet(iforce, 'B', buf, &len) && len >= 3)
287287 iforce->device_memory.end = get_unaligned_le16(buf + 1);
288288 else
289289 dev_warn(&iforce->dev->dev, "Device does not respond to id packet B\n");
290290
291− if (!iforce_get_id_packet(iforce, 'N', buf, &len) || len < 2)
291+ if (!iforce_get_id_packet(iforce, 'N', buf, &len) && len >= 2)
292292 ff_effects = buf[1];
293293 else
294294 dev_warn(&iforce->dev->dev, "Device does not respond to id packet N\n");
drivers/input/misc/soc_button_array.c+13−1
@@ -18,6 +18,10 @@ · 17 unmodified lines
1818 #include <linux/gpio.h>
1919 #include <linux/platform_device.h>
2020
21+static bool use_low_level_irq;
22+module_param(use_low_level_irq, bool, 0444);
23+MODULE_PARM_DESC(use_low_level_irq, "Use low-level triggered IRQ instead of edge triggered");
24+
2125 struct soc_button_info {
2226 const char *name;
2327 int acpi_index;
@@ -73,6 +77,13 @@ static const struct dmi_system_id dmi_use_low_level_irq[] = { · 49 unmodified lines
7377 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW5-012"),
7478 },
7579 },
80+ {
81+ /* Acer Switch V 10 SW5-017, same issue as Acer Switch 10 SW5-012. */
82+ .matches = {
83+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
84+ DMI_MATCH(DMI_PRODUCT_NAME, "SW5-017"),
85+ },
86+ },
7687 {
7788 /*
7889 * Acer One S1003. _LID method messes with power-button GPIO
@@ -164,7 +175,8 @@ soc_button_device_create(struct platform_device *pdev, · 85 unmodified lines
164175 }
165176
166177 /* See dmi_use_low_level_irq[] comment */
167− if (!autorepeat && dmi_check_system(dmi_use_low_level_irq)) {
178+ if (!autorepeat && (use_low_level_irq ||
179+ dmi_check_system(dmi_use_low_level_irq))) {
168180 irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW);
169181 gpio_keys[n_buttons].irq = irq;
170182 gpio_keys[n_buttons].gpio = -ENOENT;
drivers/input/mouse/synaptics.c+1−0
@@ -192,6 +192,7 @@ static const char * const smbus_pnp_ids[] = { · 191 unmodified lines
192192 "SYN3221", /* HP 15-ay000 */
193193 "SYN323d", /* HP Spectre X360 13-w013dx */
194194 "SYN3257", /* HP Envy 13-ad105ng */
195+ "SYN3286", /* HP Laptop 15-da3001TU */
195196 NULL
196197 };
197198
drivers/input/serio/i8042-acpipnpio.h+4−4
@@ -115,18 +115,18 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { · 114 unmodified lines
115115 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_NEVER)
116116 },
117117 {
118− /* ASUS ZenBook UX425UA */
118+ /* ASUS ZenBook UX425UA/QA */
119119 .matches = {
120120 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
121− DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX425UA"),
121+ DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX425"),
122122 },
123123 .driver_data = (void *)(SERIO_QUIRK_PROBE_DEFER | SERIO_QUIRK_RESET_NEVER)
124124 },
125125 {
126− /* ASUS ZenBook UM325UA */
126+ /* ASUS ZenBook UM325UA/QA */
127127 .matches = {
128128 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
129− DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX325UA_UM325UA"),
129+ DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX325"),
130130 },
131131 .driver_data = (void *)(SERIO_QUIRK_PROBE_DEFER | SERIO_QUIRK_RESET_NEVER)
132132 },
drivers/input/serio/i8042.c+0−4
@@ -1543,8 +1543,6 @@ static int i8042_probe(struct platform_device *dev) · 1542 unmodified lines
15431543 {
15441544 int error;
15451545
1546− i8042_platform_device = dev;
1547−
15481546 if (i8042_reset == I8042_RESET_ALWAYS) {
15491547 error = i8042_controller_selftest();
15501548 if (error)
@@ -1582,7 +1580,6 @@ static int i8042_probe(struct platform_device *dev) · 31 unmodified lines
15821580 i8042_free_aux_ports(); /* in case KBD failed but AUX not */
15831581 i8042_free_irqs();
15841582 i8042_controller_reset(false);
1585− i8042_platform_device = NULL;
15861583
15871584 return error;
15881585 }
@@ -1592,7 +1589,6 @@ static int i8042_remove(struct platform_device *dev) · 3 unmodified lines
15921589 i8042_unregister_ports();
15931590 i8042_free_irqs();
15941591 i8042_controller_reset(false);
1595− i8042_platform_device = NULL;
15961592
15971593 return 0;
15981594 }
drivers/input/touchscreen/goodix.c+11−0
@@ -1158,6 +1158,7 @@ static int goodix_configure_dev(struct goodix_ts_data *ts) · 1157 unmodified lines
11581158 input_set_abs_params(ts->input_dev, ABS_MT_WIDTH_MAJOR, 0, 255, 0, 0);
11591159 input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
11601160
1161+retry_read_config:
11611162 /* Read configuration and apply touchscreen parameters */
11621163 goodix_read_config(ts);
11631164
@@ -1165,6 +1166,16 @@ static int goodix_configure_dev(struct goodix_ts_data *ts) · 1 unmodified line
11651166 touchscreen_parse_properties(ts->input_dev, true, &ts->prop);
11661167
11671168 if (!ts->prop.max_x || !ts->prop.max_y || !ts->max_touch_num) {
1169+ if (!ts->reset_controller_at_probe &&
1170+ ts->irq_pin_access_method != IRQ_PIN_ACCESS_NONE) {
1171+ dev_info(&ts->client->dev, "Config not set, resetting controller\n");
1172+ /* Retry after a controller reset */
1173+ ts->reset_controller_at_probe = true;
1174+ error = goodix_reset(ts);
1175+ if (error)
1176+ return error;
1177+ goto retry_read_config;
1178+ }
11681179 dev_err(&ts->client->dev,
11691180 "Invalid config (%d, %d, %d), using defaults\n",
11701181 ts->prop.max_x, ts->prop.max_y, ts->max_touch_num);
drivers/iommu/intel/iommu.c+3−5
@@ -959,11 +959,9 @@ static struct dma_pte *pfn_to_dma_pte(struct dmar_domain *domain, · 958 unmodified lines
959959
960960 domain_flush_cache(domain, tmp_page, VTD_PAGE_SIZE);
961961 pteval = ((uint64_t)virt_to_dma_pfn(tmp_page) << VTD_PAGE_SHIFT) | DMA_PTE_READ | DMA_PTE_WRITE;
962− if (domain_use_first_level(domain)) {
963− pteval |= DMA_FL_PTE_XD | DMA_FL_PTE_US;
964− if (iommu_is_dma_domain(&domain->domain))
965− pteval |= DMA_FL_PTE_ACCESS;
966− }
962+ if (domain_use_first_level(domain))
963+ pteval |= DMA_FL_PTE_XD | DMA_FL_PTE_US | DMA_FL_PTE_ACCESS;
964+
967965 if (cmpxchg64(&pte->val, 0ULL, pteval))
968966 /* Someone else set it while we were thinking; use theirs. */
969967 free_pgtable_page(tmp_page);
drivers/iommu/intel/pasid.c+3−2
@@ -642,7 +642,7 @@ int intel_pasid_setup_second_level(struct intel_iommu *iommu, · 641 unmodified lines
642642 * Since it is a second level only translation setup, we should
643643 * set SRE bit as well (addresses are expected to be GPAs).
644644 */
645− if (pasid != PASID_RID2PASID)
645+ if (pasid != PASID_RID2PASID && ecap_srs(iommu->ecap))
646646 pasid_set_sre(pte);
647647 pasid_set_present(pte);
648648 spin_unlock(&iommu->lock);
@@ -685,7 +685,8 @@ int intel_pasid_setup_pass_through(struct intel_iommu *iommu, · 36 unmodified lines
685685 * We should set SRE bit as well since the addresses are expected
686686 * to be GPAs.
687687 */
688− pasid_set_sre(pte);
688+ if (ecap_srs(iommu->ecap))
689+ pasid_set_sre(pte);
689690 pasid_set_present(pte);
690691 spin_unlock(&iommu->lock);
691692
drivers/isdn/mISDN/core.c+1−1
@@ -222,7 +222,7 @@ mISDN_register_device(struct mISDNdevice *dev, · 221 unmodified lines
222222
223223 err = get_free_devid();
224224 if (err < 0)
225− goto error1;
225+ return err;
226226 dev->id = err;
227227
228228 device_initialize(&dev->dev);
drivers/isdn/mISDN/dsp_pipeline.c+2−1
@@ -77,6 +77,7 @@ int mISDN_dsp_element_register(struct mISDN_dsp_element *elem) · 76 unmodified lines
7777 if (!entry)
7878 return -ENOMEM;
7979
80+ INIT_LIST_HEAD(&entry->list);
8081 entry->elem = elem;
8182
8283 entry->dev.class = elements_class;
@@ -107,7 +108,7 @@ err2: · 24 unmodified lines
107108 device_unregister(&entry->dev);
108109 return ret;
109110 err1:
110− kfree(entry);
111+ put_device(&entry->dev);
111112 return ret;
112113 }
113114 EXPORT_SYMBOL(mISDN_dsp_element_register);
drivers/md/dm-bufio.c+2−0
@@ -1858,6 +1858,8 @@ bad: · 1857 unmodified lines
18581858 dm_io_client_destroy(c->dm_io);
18591859 bad_dm_io:
18601860 mutex_destroy(&c->lock);
1861+ if (c->no_sleep)
1862+ static_branch_dec(&no_sleep_enabled);
18611863 kfree(c);
18621864 bad_client:
18631865 return ERR_PTR(r);
drivers/md/dm-crypt.c+1−0
@@ -3630,6 +3630,7 @@ static void crypt_io_hints(struct dm_target *ti, struct queue_limits *limits) · 3629 unmodified lines
36303630 limits->physical_block_size =
36313631 max_t(unsigned, limits->physical_block_size, cc->sector_size);
36323632 limits->io_min = max_t(unsigned, limits->io_min, cc->sector_size);
3633+ limits->dma_alignment = limits->logical_block_size - 1;
36333634 }
36343635
36353636 static struct target_type crypt_target = {
drivers/md/dm-integrity.c+15−6
@@ -263,6 +263,7 @@ struct dm_integrity_c { · 262 unmodified lines
263263
264264 struct completion crypto_backoff;
265265
266+ bool wrote_to_journal;
266267 bool journal_uptodate;
267268 bool just_formatted;
268269 bool recalculate_flag;
@@ -2375,6 +2376,8 @@ static void integrity_commit(struct work_struct *w) · 2106 unmodified lines
23752376 if (!commit_sections)
23762377 goto release_flush_bios;
23772378
2379+ ic->wrote_to_journal = true;
2380+
23782381 i = commit_start;
23792382 for (n = 0; n < commit_sections; n++) {
23802383 for (j = 0; j < ic->journal_section_entries; j++) {
@@ -2591,10 +2594,6 @@ static void integrity_writer(struct work_struct *w) · 210 unmodified lines
25912594
25922595 unsigned prev_free_sectors;
25932596
2594− /* the following test is not needed, but it tests the replay code */
2595− if (unlikely(dm_post_suspending(ic->ti)) && !ic->meta_dev)
2596− return;
2597−
25982597 spin_lock_irq(&ic->endio_wait.lock);
25992598 write_start = ic->committed_section;
26002599 write_sections = ic->n_committed_sections;
@@ -3101,10 +3100,17 @@ static void dm_integrity_postsuspend(struct dm_target *ti) · 500 unmodified lines
31013100 drain_workqueue(ic->commit_wq);
31023101
31033102 if (ic->mode == 'J') {
3104− if (ic->meta_dev)
3105− queue_work(ic->writer_wq, &ic->writer_work);
3103+ queue_work(ic->writer_wq, &ic->writer_work);
31063104 drain_workqueue(ic->writer_wq);
31073105 dm_integrity_flush_buffers(ic, true);
3106+ if (ic->wrote_to_journal) {
3107+ init_journal(ic, ic->free_section,
3108+ ic->journal_sections - ic->free_section, ic->commit_seq);
3109+ if (ic->free_section) {
3110+ init_journal(ic, 0, ic->free_section,
3111+ next_commit_seq(ic->commit_seq));
3112+ }
3113+ }
31083114 }
31093115
31103116 if (ic->mode == 'B') {
@@ -3132,6 +3138,8 @@ static void dm_integrity_resume(struct dm_target *ti) · 21 unmodified lines
31323138
31333139 DEBUG_print("resume\n");
31343140
3141+ ic->wrote_to_journal = false;
3142+
31353143 if (ic->provided_data_sectors != old_provided_data_sectors) {
31363144 if (ic->provided_data_sectors > old_provided_data_sectors &&
31373145 ic->mode == 'B' &&
@@ -3370,6 +3378,7 @@ static void dm_integrity_io_hints(struct dm_target *ti, struct queue_limits *lim · 232 unmodified lines
33703378 limits->logical_block_size = ic->sectors_per_block << SECTOR_SHIFT;
33713379 limits->physical_block_size = ic->sectors_per_block << SECTOR_SHIFT;
33723380 blk_limits_io_min(limits, ic->sectors_per_block << SECTOR_SHIFT);
3381+ limits->dma_alignment = limits->logical_block_size - 1;
33733382 }
33743383 }
33753384
drivers/md/dm-ioctl.c+2−2
@@ -655,7 +655,7 @@ static void list_version_get_needed(struct target_type *tt, void *needed_param) · 654 unmodified lines
655655 size_t *needed = needed_param;
656656
657657 *needed += sizeof(struct dm_target_versions);
658− *needed += strlen(tt->name);
658+ *needed += strlen(tt->name) + 1;
659659 *needed += ALIGN_MASK;
660660 }
661661
@@ -720,7 +720,7 @@ static int __list_versions(struct dm_ioctl *param, size_t param_size, const char · 58 unmodified lines
720720 iter_info.old_vers = NULL;
721721 iter_info.vers = vers;
722722 iter_info.flags = 0;
723− iter_info.end = (char *)vers+len;
723+ iter_info.end = (char *)vers + needed;
724724
725725 /*
726726 * Now loop through filling out the names & versions.
drivers/md/dm-log-writes.c+1−0
@@ -875,6 +875,7 @@ static void log_writes_io_hints(struct dm_target *ti, struct queue_limits *limit · 874 unmodified lines
875875 limits->logical_block_size = bdev_logical_block_size(lc->dev->bdev);
876876 limits->physical_block_size = bdev_physical_block_size(lc->dev->bdev);
877877 limits->io_min = limits->physical_block_size;
878+ limits->dma_alignment = limits->logical_block_size - 1;
878879 }
879880
880881 #if IS_ENABLED(CONFIG_FS_DAX)
drivers/misc/vmw_vmci/vmci_queue_pair.c+2−0
@@ -854,6 +854,7 @@ static int qp_notify_peer_local(bool attach, struct vmci_handle handle) · 853 unmodified lines
854854 u32 context_id = vmci_get_context_id();
855855 struct vmci_event_qp ev;
856856
857+ memset(&ev, 0, sizeof(ev));
857858 ev.msg.hdr.dst = vmci_make_handle(context_id, VMCI_EVENT_HANDLER);
858859 ev.msg.hdr.src = vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID,
859860 VMCI_CONTEXT_RESOURCE_ID);
@@ -1467,6 +1468,7 @@ static int qp_notify_peer(bool attach, · 607 unmodified lines
14671468 * kernel.
14681469 */
14691470
1471+ memset(&ev, 0, sizeof(ev));
14701472 ev.msg.hdr.dst = vmci_make_handle(peer_id, VMCI_EVENT_HANDLER);
14711473 ev.msg.hdr.src = vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID,
14721474 VMCI_CONTEXT_RESOURCE_ID);
drivers/mmc/core/core.c+7−1
@@ -1134,7 +1134,13 @@ u32 mmc_select_voltage(struct mmc_host *host, u32 ocr) · 1133 unmodified lines
11341134 mmc_power_cycle(host, ocr);
11351135 } else {
11361136 bit = fls(ocr) - 1;
1137− ocr &= 3 << bit;
1137+ /*
1138+ * The bit variable represents the highest voltage bit set in
1139+ * the OCR register.
1140+ * To keep a range of 2 values (e.g. 3.2V/3.3V and 3.3V/3.4V),
1141+ * we must shift the mask '3' with (bit - 1).
1142+ */
1143+ ocr &= 3 << (bit - 1);
11381144 if (bit != host->ios.vdd)
11391145 dev_warn(mmc_dev(host), "exceeding card's volts\n");
11401146 }
drivers/mmc/host/sdhci-pci-core.c+2−0
@@ -1749,6 +1749,8 @@ static int amd_probe(struct sdhci_pci_chip *chip) · 1748 unmodified lines
17491749 }
17501750 }
17511751
1752+ pci_dev_put(smbus_dev);
1753+
17521754 if (gen == AMD_CHIPSET_BEFORE_ML || gen == AMD_CHIPSET_CZ)
17531755 chip->quirks2 |= SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD;
17541756
drivers/mmc/host/sdhci-pci-o2micro.c+7−0
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232 #define O2_SD_CAPS 0xE0
3333 #define O2_SD_ADMA1 0xE2
3434 #define O2_SD_ADMA2 0xE7
35+#define O2_SD_MISC_CTRL2 0xF0
3536 #define O2_SD_INF_MOD 0xF1
3637 #define O2_SD_MISC_CTRL4 0xFC
3738 #define O2_SD_MISC_CTRL 0x1C0
@@ -877,6 +878,12 @@ static int sdhci_pci_o2_probe(struct sdhci_pci_chip *chip) · 839 unmodified lines
877878 /* Set Tuning Windows to 5 */
878879 pci_write_config_byte(chip->pdev,
879880 O2_SD_TUNING_CTRL, 0x55);
881+ //Adjust 1st and 2nd CD debounce time
882+ pci_read_config_dword(chip->pdev, O2_SD_MISC_CTRL2, &scratch_32);
883+ scratch_32 &= 0xFFE7FFFF;
884+ scratch_32 |= 0x00180000;
885+ pci_write_config_dword(chip->pdev, O2_SD_MISC_CTRL2, scratch_32);
886+ pci_write_config_dword(chip->pdev, O2_SD_DETECT_SETTING, 1);
880887 /* Lock WP */
881888 ret = pci_read_config_byte(chip->pdev,
882889 O2_SD_LOCK_WP, &scratch);
drivers/mtd/nand/onenand/Kconfig+1−0
@@ -26,6 +26,7 @@ config MTD_ONENAND_OMAP2 · 25 unmodified lines
2626 tristate "OneNAND on OMAP2/OMAP3 support"
2727 depends on ARCH_OMAP2 || ARCH_OMAP3 || (COMPILE_TEST && ARM)
2828 depends on OF || COMPILE_TEST
29+ depends on OMAP_GPMC
2930 help
3031 Support for a OneNAND flash device connected to an OMAP2/OMAP3 SoC
3132 via the GPMC memory controller.
drivers/mtd/nand/raw/nand_base.c+2−2
@@ -5834,7 +5834,7 @@ nand_match_ecc_req(struct nand_chip *chip, · 5833 unmodified lines
58345834 int req_step = requirements->step_size;
58355835 int req_strength = requirements->strength;
58365836 int req_corr, step_size, strength, nsteps, ecc_bytes, ecc_bytes_total;
5837− int best_step, best_strength, best_ecc_bytes;
5837+ int best_step = 0, best_strength = 0, best_ecc_bytes = 0;
58385838 int best_ecc_bytes_total = INT_MAX;
58395839 int i, j;
58405840
@@ -5915,7 +5915,7 @@ nand_maximize_ecc(struct nand_chip *chip, · 74 unmodified lines
59155915 int step_size, strength, nsteps, ecc_bytes, corr;
59165916 int best_corr = 0;
59175917 int best_step = 0;
5918− int best_strength, best_ecc_bytes;
5918+ int best_strength = 0, best_ecc_bytes = 0;
59195919 int i, j;
59205920
59215921 for (i = 0; i < caps->nstepinfos; i++) {
drivers/mtd/nand/raw/qcom_nandc.c+7−5
@@ -3167,16 +3167,18 @@ static int qcom_nand_host_init_and_register(struct qcom_nand_controller *nandc, · 3166 unmodified lines
31673167
31683168 ret = mtd_device_parse_register(mtd, probes, NULL, NULL, 0);
31693169 if (ret)
3170− nand_cleanup(chip);
3170+ goto err;
31713171
31723172 if (nandc->props->use_codeword_fixup) {
31733173 ret = qcom_nand_host_parse_boot_partitions(nandc, host, dn);
3174− if (ret) {
3175− nand_cleanup(chip);
3176− return ret;
3177− }
3174+ if (ret)
3175+ goto err;
31783176 }
31793177
3178+ return 0;
3179+
3180+err:
3181+ nand_cleanup(chip);
31803182 return ret;
31813183 }
31823184
drivers/net/ethernet/amazon/ena/ena_netdev.c+7−1
@@ -4543,13 +4543,19 @@ static struct pci_driver ena_pci_driver = { · 4542 unmodified lines
45434543
45444544 static int __init ena_init(void)
45454545 {
4546+ int ret;
4547+
45464548 ena_wq = create_singlethread_workqueue(DRV_MODULE_NAME);
45474549 if (!ena_wq) {
45484550 pr_err("Failed to create workqueue\n");
45494551 return -ENOMEM;
45504552 }
45514553
4552− return pci_register_driver(&ena_pci_driver);
4554+ ret = pci_register_driver(&ena_pci_driver);
4555+ if (ret)
4556+ destroy_workqueue(ena_wq);
4557+
4558+ return ret;
45534559 }
45544560
45554561 static void __exit ena_cleanup(void)
drivers/net/ethernet/atheros/ag71xx.c+2−1
@@ -1427,7 +1427,7 @@ static int ag71xx_open(struct net_device *ndev) · 1426 unmodified lines
14271427 if (ret) {
14281428 netif_err(ag, link, ndev, "phylink_of_phy_connect filed with err: %i\n",
14291429 ret);
1430− goto err;
1430+ return ret;
14311431 }
14321432
14331433 max_frame_len = ag71xx_max_frame_len(ndev->mtu);
@@ -1448,6 +1448,7 @@ static int ag71xx_open(struct net_device *ndev) · 14 unmodified lines
14481448
14491449 err:
14501450 ag71xx_rings_cleanup(ag);
1451+ phylink_disconnect_phy(ag->phylink);
14511452 return ret;
14521453 }
14531454
drivers/net/ethernet/broadcom/bgmac.c+0−1
@@ -1568,7 +1568,6 @@ void bgmac_enet_remove(struct bgmac *bgmac) · 1567 unmodified lines
15681568 phy_disconnect(bgmac->net_dev->phydev);
15691569 netif_napi_del(&bgmac->napi);
15701570 bgmac_dma_free(bgmac);
1571− free_netdev(bgmac->net_dev);
15721571 }
15731572 EXPORT_SYMBOL_GPL(bgmac_enet_remove);
15741573
drivers/net/ethernet/broadcom/bnxt/bnxt.c+9−1
@@ -14037,8 +14037,16 @@ static struct pci_driver bnxt_pci_driver = { · 14036 unmodified lines
1403714037
1403814038 static int __init bnxt_init(void)
1403914039 {
14040+ int err;
14041+
1404014042 bnxt_debug_init();
14041− return pci_register_driver(&bnxt_pci_driver);
14043+ err = pci_register_driver(&bnxt_pci_driver);
14044+ if (err) {
14045+ bnxt_debug_exit();
14046+ return err;
14047+ }
14048+
14049+ return 0;
1404214050 }
1404314051
1404414052 static void __exit bnxt_exit(void)
drivers/net/ethernet/cavium/liquidio/lio_main.c+26−8
@@ -1794,13 +1794,10 @@ static int liquidio_open(struct net_device *netdev) · 1793 unmodified lines
17941794
17951795 ifstate_set(lio, LIO_IFSTATE_RUNNING);
17961796
1797− if (OCTEON_CN23XX_PF(oct)) {
1798− if (!oct->msix_on)
1799− if (setup_tx_poll_fn(netdev))
1800− return -1;
1801− } else {
1802− if (setup_tx_poll_fn(netdev))
1803− return -1;
1797+ if (!OCTEON_CN23XX_PF(oct) || (OCTEON_CN23XX_PF(oct) && !oct->msix_on)) {
1798+ ret = setup_tx_poll_fn(netdev);
1799+ if (ret)
1800+ goto err_poll;
18041801 }
18051802
18061803 netif_tx_start_all_queues(netdev);
@@ -1813,7 +1810,7 @@ static int liquidio_open(struct net_device *netdev) · 6 unmodified lines
18131810 /* tell Octeon to start forwarding packets to host */
18141811 ret = send_rx_ctrl_cmd(lio, 1);
18151812 if (ret)
1816− return ret;
1813+ goto err_rx_ctrl;
18171814
18181815 /* start periodical statistics fetch */
18191816 INIT_DELAYED_WORK(&lio->stats_wk.work, lio_fetch_stats);
@@ -1824,6 +1821,27 @@ static int liquidio_open(struct net_device *netdev) · 4 unmodified lines
18241821 dev_info(&oct->pci_dev->dev, "%s interface is opened\n",
18251822 netdev->name);
18261823
1824+ return 0;
1825+
1826+err_rx_ctrl:
1827+ if (!OCTEON_CN23XX_PF(oct) || (OCTEON_CN23XX_PF(oct) && !oct->msix_on))
1828+ cleanup_tx_poll_fn(netdev);
1829+err_poll:
1830+ if (lio->ptp_clock) {
1831+ ptp_clock_unregister(lio->ptp_clock);
1832+ lio->ptp_clock = NULL;
1833+ }
1834+
1835+ if (oct->props[lio->ifidx].napi_enabled == 1) {
1836+ list_for_each_entry_safe(napi, n, &netdev->napi_list, dev_list)
1837+ napi_disable(napi);
1838+
1839+ oct->props[lio->ifidx].napi_enabled = 0;
1840+
1841+ if (OCTEON_CN23XX_PF(oct))
1842+ oct->droq[0]->ops.poll_mode = 0;
1843+ }
1844+
18271845 return ret;
18281846 }
18291847
drivers/net/ethernet/hisilicon/hns3/hnae3.h+0−1
@@ -819,7 +819,6 @@ struct hnae3_knic_private_info { · 818 unmodified lines
819819 const struct hnae3_dcb_ops *dcb_ops;
820820
821821 u16 int_rl_setting;
822− enum pkt_hash_types rss_type;
823822 void __iomem *io_base;
824823 };
825824
drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_rss.c+0−20
@@ -191,23 +191,6 @@ u32 hclge_comm_get_rss_key_size(struct hnae3_handle *handle) · 190 unmodified lines
191191 return HCLGE_COMM_RSS_KEY_SIZE;
192192 }
193193
194−void hclge_comm_get_rss_type(struct hnae3_handle *nic,
195− struct hclge_comm_rss_tuple_cfg *rss_tuple_sets)
196−{
197− if (rss_tuple_sets->ipv4_tcp_en ||
198− rss_tuple_sets->ipv4_udp_en ||
199− rss_tuple_sets->ipv4_sctp_en ||
200− rss_tuple_sets->ipv6_tcp_en ||
201− rss_tuple_sets->ipv6_udp_en ||
202− rss_tuple_sets->ipv6_sctp_en)
203− nic->kinfo.rss_type = PKT_HASH_TYPE_L4;
204− else if (rss_tuple_sets->ipv4_fragment_en ||
205− rss_tuple_sets->ipv6_fragment_en)
206− nic->kinfo.rss_type = PKT_HASH_TYPE_L3;
207− else
208− nic->kinfo.rss_type = PKT_HASH_TYPE_NONE;
209−}
210−
211194 int hclge_comm_parse_rss_hfunc(struct hclge_comm_rss_cfg *rss_cfg,
212195 const u8 hfunc, u8 *hash_algo)
213196 {
@@ -344,9 +327,6 @@ int hclge_comm_set_rss_input_tuple(struct hnae3_handle *nic, · 130 unmodified lines
344327 req->ipv6_sctp_en = rss_cfg->rss_tuple_sets.ipv6_sctp_en;
345328 req->ipv6_fragment_en = rss_cfg->rss_tuple_sets.ipv6_fragment_en;
346329
347− if (is_pf)
348− hclge_comm_get_rss_type(nic, &rss_cfg->rss_tuple_sets);
349−
350330 ret = hclge_comm_cmd_send(hw, &desc, 1);
351331 if (ret)
352332 dev_err(&hw->cmq.csq.pdev->dev,
drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_rss.h+0−2
@@ -95,8 +95,6 @@ struct hclge_comm_rss_tc_mode_cmd { · 94 unmodified lines
9595 };
9696
9797 u32 hclge_comm_get_rss_key_size(struct hnae3_handle *handle);
98−void hclge_comm_get_rss_type(struct hnae3_handle *nic,
99− struct hclge_comm_rss_tuple_cfg *rss_tuple_sets);
10098 void hclge_comm_rss_indir_init_cfg(struct hnae3_ae_dev *ae_dev,
10199 struct hclge_comm_rss_cfg *rss_cfg);
102100 int hclge_comm_get_rss_tuple(struct hclge_comm_rss_cfg *rss_cfg, int flow_type,
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c+95−72
@@ -105,26 +105,28 @@ static const struct pci_device_id hns3_pci_tbl[] = { · 104 unmodified lines
105105 };
106106 MODULE_DEVICE_TABLE(pci, hns3_pci_tbl);
107107
108−#define HNS3_RX_PTYPE_ENTRY(ptype, l, s, t) \
108+#define HNS3_RX_PTYPE_ENTRY(ptype, l, s, t, h) \
109109 { ptype, \
110110 l, \
111111 CHECKSUM_##s, \
112112 HNS3_L3_TYPE_##t, \
113− 1 }
113+ 1, \
114+ h}
114115
115116 #define HNS3_RX_PTYPE_UNUSED_ENTRY(ptype) \
116− { ptype, 0, CHECKSUM_NONE, HNS3_L3_TYPE_PARSE_FAIL, 0 }
117+ { ptype, 0, CHECKSUM_NONE, HNS3_L3_TYPE_PARSE_FAIL, 0, \
118+ PKT_HASH_TYPE_NONE }
117119
118120 static const struct hns3_rx_ptype hns3_rx_ptype_tbl[] = {
119121 HNS3_RX_PTYPE_UNUSED_ENTRY(0),
120− HNS3_RX_PTYPE_ENTRY(1, 0, COMPLETE, ARP),
121− HNS3_RX_PTYPE_ENTRY(2, 0, COMPLETE, RARP),
122− HNS3_RX_PTYPE_ENTRY(3, 0, COMPLETE, LLDP),
123− HNS3_RX_PTYPE_ENTRY(4, 0, COMPLETE, PARSE_FAIL),
124− HNS3_RX_PTYPE_ENTRY(5, 0, COMPLETE, PARSE_FAIL),
125− HNS3_RX_PTYPE_ENTRY(6, 0, COMPLETE, PARSE_FAIL),
126− HNS3_RX_PTYPE_ENTRY(7, 0, COMPLETE, CNM),
127− HNS3_RX_PTYPE_ENTRY(8, 0, NONE, PARSE_FAIL),
122+ HNS3_RX_PTYPE_ENTRY(1, 0, COMPLETE, ARP, PKT_HASH_TYPE_NONE),
123+ HNS3_RX_PTYPE_ENTRY(2, 0, COMPLETE, RARP, PKT_HASH_TYPE_NONE),
124+ HNS3_RX_PTYPE_ENTRY(3, 0, COMPLETE, LLDP, PKT_HASH_TYPE_NONE),
125+ HNS3_RX_PTYPE_ENTRY(4, 0, COMPLETE, PARSE_FAIL, PKT_HASH_TYPE_NONE),
126+ HNS3_RX_PTYPE_ENTRY(5, 0, COMPLETE, PARSE_FAIL, PKT_HASH_TYPE_NONE),
127+ HNS3_RX_PTYPE_ENTRY(6, 0, COMPLETE, PARSE_FAIL, PKT_HASH_TYPE_NONE),
128+ HNS3_RX_PTYPE_ENTRY(7, 0, COMPLETE, CNM, PKT_HASH_TYPE_NONE),
129+ HNS3_RX_PTYPE_ENTRY(8, 0, NONE, PARSE_FAIL, PKT_HASH_TYPE_NONE),
128130 HNS3_RX_PTYPE_UNUSED_ENTRY(9),
129131 HNS3_RX_PTYPE_UNUSED_ENTRY(10),
130132 HNS3_RX_PTYPE_UNUSED_ENTRY(11),
@@ -132,36 +134,36 @@ static const struct hns3_rx_ptype hns3_rx_ptype_tbl[] = { · 1 unmodified line
132134 HNS3_RX_PTYPE_UNUSED_ENTRY(13),
133135 HNS3_RX_PTYPE_UNUSED_ENTRY(14),
134136 HNS3_RX_PTYPE_UNUSED_ENTRY(15),
135− HNS3_RX_PTYPE_ENTRY(16, 0, COMPLETE, PARSE_FAIL),
136− HNS3_RX_PTYPE_ENTRY(17, 0, COMPLETE, IPV4),
137− HNS3_RX_PTYPE_ENTRY(18, 0, COMPLETE, IPV4),
138− HNS3_RX_PTYPE_ENTRY(19, 0, UNNECESSARY, IPV4),
139− HNS3_RX_PTYPE_ENTRY(20, 0, UNNECESSARY, IPV4),
140− HNS3_RX_PTYPE_ENTRY(21, 0, NONE, IPV4),
141− HNS3_RX_PTYPE_ENTRY(22, 0, UNNECESSARY, IPV4),
142− HNS3_RX_PTYPE_ENTRY(23, 0, NONE, IPV4),
143− HNS3_RX_PTYPE_ENTRY(24, 0, NONE, IPV4),
144− HNS3_RX_PTYPE_ENTRY(25, 0, UNNECESSARY, IPV4),
137+ HNS3_RX_PTYPE_ENTRY(16, 0, COMPLETE, PARSE_FAIL, PKT_HASH_TYPE_NONE),
138+ HNS3_RX_PTYPE_ENTRY(17, 0, COMPLETE, IPV4, PKT_HASH_TYPE_NONE),
139+ HNS3_RX_PTYPE_ENTRY(18, 0, COMPLETE, IPV4, PKT_HASH_TYPE_NONE),
140+ HNS3_RX_PTYPE_ENTRY(19, 0, UNNECESSARY, IPV4, PKT_HASH_TYPE_L4),
141+ HNS3_RX_PTYPE_ENTRY(20, 0, UNNECESSARY, IPV4, PKT_HASH_TYPE_L4),
142+ HNS3_RX_PTYPE_ENTRY(21, 0, NONE, IPV4, PKT_HASH_TYPE_NONE),
143+ HNS3_RX_PTYPE_ENTRY(22, 0, UNNECESSARY, IPV4, PKT_HASH_TYPE_L4),
144+ HNS3_RX_PTYPE_ENTRY(23, 0, NONE, IPV4, PKT_HASH_TYPE_L3),
145+ HNS3_RX_PTYPE_ENTRY(24, 0, NONE, IPV4, PKT_HASH_TYPE_L3),
146+ HNS3_RX_PTYPE_ENTRY(25, 0, UNNECESSARY, IPV4, PKT_HASH_TYPE_L4),
145147 HNS3_RX_PTYPE_UNUSED_ENTRY(26),
146148 HNS3_RX_PTYPE_UNUSED_ENTRY(27),
147149 HNS3_RX_PTYPE_UNUSED_ENTRY(28),
148− HNS3_RX_PTYPE_ENTRY(29, 0, COMPLETE, PARSE_FAIL),
149− HNS3_RX_PTYPE_ENTRY(30, 0, COMPLETE, PARSE_FAIL),
150− HNS3_RX_PTYPE_ENTRY(31, 0, COMPLETE, IPV4),
151− HNS3_RX_PTYPE_ENTRY(32, 0, COMPLETE, IPV4),
152− HNS3_RX_PTYPE_ENTRY(33, 1, UNNECESSARY, IPV4),
153− HNS3_RX_PTYPE_ENTRY(34, 1, UNNECESSARY, IPV4),
154− HNS3_RX_PTYPE_ENTRY(35, 1, UNNECESSARY, IPV4),
155− HNS3_RX_PTYPE_ENTRY(36, 0, COMPLETE, IPV4),
156− HNS3_RX_PTYPE_ENTRY(37, 0, COMPLETE, IPV4),
150+ HNS3_RX_PTYPE_ENTRY(29, 0, COMPLETE, PARSE_FAIL, PKT_HASH_TYPE_NONE),
151+ HNS3_RX_PTYPE_ENTRY(30, 0, COMPLETE, PARSE_FAIL, PKT_HASH_TYPE_NONE),
152+ HNS3_RX_PTYPE_ENTRY(31, 0, COMPLETE, IPV4, PKT_HASH_TYPE_L3),
153+ HNS3_RX_PTYPE_ENTRY(32, 0, COMPLETE, IPV4, PKT_HASH_TYPE_L3),
154+ HNS3_RX_PTYPE_ENTRY(33, 1, UNNECESSARY, IPV4, PKT_HASH_TYPE_L4),
155+ HNS3_RX_PTYPE_ENTRY(34, 1, UNNECESSARY, IPV4, PKT_HASH_TYPE_L4),
156+ HNS3_RX_PTYPE_ENTRY(35, 1, UNNECESSARY, IPV4, PKT_HASH_TYPE_L4),
157+ HNS3_RX_PTYPE_ENTRY(36, 0, COMPLETE, IPV4, PKT_HASH_TYPE_L3),
158+ HNS3_RX_PTYPE_ENTRY(37, 0, COMPLETE, IPV4, PKT_HASH_TYPE_L3),
157159 HNS3_RX_PTYPE_UNUSED_ENTRY(38),
158− HNS3_RX_PTYPE_ENTRY(39, 0, COMPLETE, IPV6),
159− HNS3_RX_PTYPE_ENTRY(40, 0, COMPLETE, IPV6),
160− HNS3_RX_PTYPE_ENTRY(41, 1, UNNECESSARY, IPV6),
161− HNS3_RX_PTYPE_ENTRY(42, 1, UNNECESSARY, IPV6),
162− HNS3_RX_PTYPE_ENTRY(43, 1, UNNECESSARY, IPV6),
163− HNS3_RX_PTYPE_ENTRY(44, 0, COMPLETE, IPV6),
164− HNS3_RX_PTYPE_ENTRY(45, 0, COMPLETE, IPV6),
160+ HNS3_RX_PTYPE_ENTRY(39, 0, COMPLETE, IPV6, PKT_HASH_TYPE_L3),
161+ HNS3_RX_PTYPE_ENTRY(40, 0, COMPLETE, IPV6, PKT_HASH_TYPE_L3),
162+ HNS3_RX_PTYPE_ENTRY(41, 1, UNNECESSARY, IPV6, PKT_HASH_TYPE_L4),
163+ HNS3_RX_PTYPE_ENTRY(42, 1, UNNECESSARY, IPV6, PKT_HASH_TYPE_L4),
164+ HNS3_RX_PTYPE_ENTRY(43, 1, UNNECESSARY, IPV6, PKT_HASH_TYPE_L4),
165+ HNS3_RX_PTYPE_ENTRY(44, 0, COMPLETE, IPV6, PKT_HASH_TYPE_L3),
166+ HNS3_RX_PTYPE_ENTRY(45, 0, COMPLETE, IPV6, PKT_HASH_TYPE_L3),
165167 HNS3_RX_PTYPE_UNUSED_ENTRY(46),
166168 HNS3_RX_PTYPE_UNUSED_ENTRY(47),
167169 HNS3_RX_PTYPE_UNUSED_ENTRY(48),
@@ -227,35 +229,35 @@ static const struct hns3_rx_ptype hns3_rx_ptype_tbl[] = { · 59 unmodified lines
227229 HNS3_RX_PTYPE_UNUSED_ENTRY(108),
228230 HNS3_RX_PTYPE_UNUSED_ENTRY(109),
229231 HNS3_RX_PTYPE_UNUSED_ENTRY(110),
230− HNS3_RX_PTYPE_ENTRY(111, 0, COMPLETE, IPV6),
231− HNS3_RX_PTYPE_ENTRY(112, 0, COMPLETE, IPV6),
232− HNS3_RX_PTYPE_ENTRY(113, 0, UNNECESSARY, IPV6),
233− HNS3_RX_PTYPE_ENTRY(114, 0, UNNECESSARY, IPV6),
234− HNS3_RX_PTYPE_ENTRY(115, 0, NONE, IPV6),
235− HNS3_RX_PTYPE_ENTRY(116, 0, UNNECESSARY, IPV6),
236− HNS3_RX_PTYPE_ENTRY(117, 0, NONE, IPV6),
237− HNS3_RX_PTYPE_ENTRY(118, 0, NONE, IPV6),
238− HNS3_RX_PTYPE_ENTRY(119, 0, UNNECESSARY, IPV6),
232+ HNS3_RX_PTYPE_ENTRY(111, 0, COMPLETE, IPV6, PKT_HASH_TYPE_L3),
233+ HNS3_RX_PTYPE_ENTRY(112, 0, COMPLETE, IPV6, PKT_HASH_TYPE_L3),
234+ HNS3_RX_PTYPE_ENTRY(113, 0, UNNECESSARY, IPV6, PKT_HASH_TYPE_L4),
235+ HNS3_RX_PTYPE_ENTRY(114, 0, UNNECESSARY, IPV6, PKT_HASH_TYPE_L4),
236+ HNS3_RX_PTYPE_ENTRY(115, 0, NONE, IPV6, PKT_HASH_TYPE_L3),
237+ HNS3_RX_PTYPE_ENTRY(116, 0, UNNECESSARY, IPV6, PKT_HASH_TYPE_L4),
238+ HNS3_RX_PTYPE_ENTRY(117, 0, NONE, IPV6, PKT_HASH_TYPE_L3),
239+ HNS3_RX_PTYPE_ENTRY(118, 0, NONE, IPV6, PKT_HASH_TYPE_L3),
240+ HNS3_RX_PTYPE_ENTRY(119, 0, UNNECESSARY, IPV6, PKT_HASH_TYPE_L4),
239241 HNS3_RX_PTYPE_UNUSED_ENTRY(120),
240242 HNS3_RX_PTYPE_UNUSED_ENTRY(121),
241243 HNS3_RX_PTYPE_UNUSED_ENTRY(122),
242− HNS3_RX_PTYPE_ENTRY(123, 0, COMPLETE, PARSE_FAIL),
243− HNS3_RX_PTYPE_ENTRY(124, 0, COMPLETE, PARSE_FAIL),
244− HNS3_RX_PTYPE_ENTRY(125, 0, COMPLETE, IPV4),
245− HNS3_RX_PTYPE_ENTRY(126, 0, COMPLETE, IPV4),
246− HNS3_RX_PTYPE_ENTRY(127, 1, UNNECESSARY, IPV4),
247− HNS3_RX_PTYPE_ENTRY(128, 1, UNNECESSARY, IPV4),
248− HNS3_RX_PTYPE_ENTRY(129, 1, UNNECESSARY, IPV4),
249− HNS3_RX_PTYPE_ENTRY(130, 0, COMPLETE, IPV4),
250− HNS3_RX_PTYPE_ENTRY(131, 0, COMPLETE, IPV4),
244+ HNS3_RX_PTYPE_ENTRY(123, 0, COMPLETE, PARSE_FAIL, PKT_HASH_TYPE_NONE),
245+ HNS3_RX_PTYPE_ENTRY(124, 0, COMPLETE, PARSE_FAIL, PKT_HASH_TYPE_NONE),
246+ HNS3_RX_PTYPE_ENTRY(125, 0, COMPLETE, IPV4, PKT_HASH_TYPE_L3),
247+ HNS3_RX_PTYPE_ENTRY(126, 0, COMPLETE, IPV4, PKT_HASH_TYPE_L3),
248+ HNS3_RX_PTYPE_ENTRY(127, 1, UNNECESSARY, IPV4, PKT_HASH_TYPE_L4),
249+ HNS3_RX_PTYPE_ENTRY(128, 1, UNNECESSARY, IPV4, PKT_HASH_TYPE_L4),
250+ HNS3_RX_PTYPE_ENTRY(129, 1, UNNECESSARY, IPV4, PKT_HASH_TYPE_L4),
251+ HNS3_RX_PTYPE_ENTRY(130, 0, COMPLETE, IPV4, PKT_HASH_TYPE_L3),
252+ HNS3_RX_PTYPE_ENTRY(131, 0, COMPLETE, IPV4, PKT_HASH_TYPE_L3),
251253 HNS3_RX_PTYPE_UNUSED_ENTRY(132),
252− HNS3_RX_PTYPE_ENTRY(133, 0, COMPLETE, IPV6),
253− HNS3_RX_PTYPE_ENTRY(134, 0, COMPLETE, IPV6),
254− HNS3_RX_PTYPE_ENTRY(135, 1, UNNECESSARY, IPV6),
255− HNS3_RX_PTYPE_ENTRY(136, 1, UNNECESSARY, IPV6),
256− HNS3_RX_PTYPE_ENTRY(137, 1, UNNECESSARY, IPV6),
257− HNS3_RX_PTYPE_ENTRY(138, 0, COMPLETE, IPV6),
258− HNS3_RX_PTYPE_ENTRY(139, 0, COMPLETE, IPV6),
254+ HNS3_RX_PTYPE_ENTRY(133, 0, COMPLETE, IPV6, PKT_HASH_TYPE_L3),
255+ HNS3_RX_PTYPE_ENTRY(134, 0, COMPLETE, IPV6, PKT_HASH_TYPE_L3),
256+ HNS3_RX_PTYPE_ENTRY(135, 1, UNNECESSARY, IPV6, PKT_HASH_TYPE_L4),
257+ HNS3_RX_PTYPE_ENTRY(136, 1, UNNECESSARY, IPV6, PKT_HASH_TYPE_L4),
258+ HNS3_RX_PTYPE_ENTRY(137, 1, UNNECESSARY, IPV6, PKT_HASH_TYPE_L4),
259+ HNS3_RX_PTYPE_ENTRY(138, 0, COMPLETE, IPV6, PKT_HASH_TYPE_L3),
260+ HNS3_RX_PTYPE_ENTRY(139, 0, COMPLETE, IPV6, PKT_HASH_TYPE_L3),
259261 HNS3_RX_PTYPE_UNUSED_ENTRY(140),
260262 HNS3_RX_PTYPE_UNUSED_ENTRY(141),
261263 HNS3_RX_PTYPE_UNUSED_ENTRY(142),
@@ -3776,8 +3778,8 @@ static void hns3_nic_reuse_page(struct sk_buff *skb, int i, · 3514 unmodified lines
37763778 desc_cb->reuse_flag = 1;
37773779 } else if (frag_size <= ring->rx_copybreak) {
37783780 ret = hns3_handle_rx_copybreak(skb, i, ring, pull_len, desc_cb);
3779− if (ret)
3780− goto out;
3781+ if (!ret)
3782+ return;
37813783 }
37823784
37833785 out:
@@ -4171,15 +4173,35 @@ static int hns3_set_gro_and_checksum(struct hns3_enet_ring *ring, · 387 unmodified lines
41714173 }
41724174
41734175 static void hns3_set_rx_skb_rss_type(struct hns3_enet_ring *ring,
4174− struct sk_buff *skb, u32 rss_hash)
4176+ struct sk_buff *skb, u32 rss_hash,
4177+ u32 l234info, u32 ol_info)
41754178 {
4176− struct hnae3_handle *handle = ring->tqp->handle;
4177− enum pkt_hash_types rss_type;
4179+ enum pkt_hash_types rss_type = PKT_HASH_TYPE_NONE;
4180+ struct net_device *netdev = ring_to_netdev(ring);
4181+ struct hns3_nic_priv *priv = netdev_priv(netdev);
41784182
4179− if (rss_hash)
4180− rss_type = handle->kinfo.rss_type;
4181− else
4182− rss_type = PKT_HASH_TYPE_NONE;
4183+ if (test_bit(HNS3_NIC_STATE_RXD_ADV_LAYOUT_ENABLE, &priv->state)) {
4184+ u32 ptype = hnae3_get_field(ol_info, HNS3_RXD_PTYPE_M,
4185+ HNS3_RXD_PTYPE_S);
4186+
4187+ rss_type = hns3_rx_ptype_tbl[ptype].hash_type;
4188+ } else {
4189+ int l3_type = hnae3_get_field(l234info, HNS3_RXD_L3ID_M,
4190+ HNS3_RXD_L3ID_S);
4191+ int l4_type = hnae3_get_field(l234info, HNS3_RXD_L4ID_M,
4192+ HNS3_RXD_L4ID_S);
4193+
4194+ if (l3_type == HNS3_L3_TYPE_IPV4 ||
4195+ l3_type == HNS3_L3_TYPE_IPV6) {
4196+ if (l4_type == HNS3_L4_TYPE_UDP ||
4197+ l4_type == HNS3_L4_TYPE_TCP ||
4198+ l4_type == HNS3_L4_TYPE_SCTP)
4199+ rss_type = PKT_HASH_TYPE_L4;
4200+ else if (l4_type == HNS3_L4_TYPE_IGMP ||
4201+ l4_type == HNS3_L4_TYPE_ICMP)
4202+ rss_type = PKT_HASH_TYPE_L3;
4203+ }
4204+ }
41834205
41844206 skb_set_hash(skb, rss_hash, rss_type);
41854207 }
@@ -4282,7 +4304,8 @@ static int hns3_handle_bdinfo(struct hns3_enet_ring *ring, struct sk_buff *skb) · 96 unmodified lines
42824304
42834305 ring->tqp_vector->rx_group.total_bytes += len;
42844306
4285− hns3_set_rx_skb_rss_type(ring, skb, le32_to_cpu(desc->rx.rss_hash));
4307+ hns3_set_rx_skb_rss_type(ring, skb, le32_to_cpu(desc->rx.rss_hash),
4308+ l234info, ol_info);
42864309 return 0;
42874310 }
42884311
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h+1−0
@@ -404,6 +404,7 @@ struct hns3_rx_ptype { · 403 unmodified lines
404404 u32 ip_summed : 2;
405405 u32 l3_type : 4;
406406 u32 valid : 1;
407+ u32 hash_type: 3;
407408 };
408409
409410 struct ring_stats {
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c+7−4
@@ -3443,6 +3443,7 @@ static int hclge_update_tp_port_info(struct hclge_dev *hdev) · 3442 unmodified lines
34433443 hdev->hw.mac.autoneg = cmd.base.autoneg;
34443444 hdev->hw.mac.speed = cmd.base.speed;
34453445 hdev->hw.mac.duplex = cmd.base.duplex;
3446+ linkmode_copy(hdev->hw.mac.advertising, cmd.link_modes.advertising);
34463447
34473448 return 0;
34483449 }
@@ -4859,7 +4860,6 @@ static int hclge_set_rss_tuple(struct hnae3_handle *handle, · 1410 unmodified lines
48594860 return ret;
48604861 }
48614862
4862− hclge_comm_get_rss_type(&vport->nic, &hdev->rss_cfg.rss_tuple_sets);
48634863 return 0;
48644864 }
48654865
@@ -11587,9 +11587,12 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev) · 6721 unmodified lines
1158711587 if (ret)
1158811588 goto err_msi_irq_uninit;
1158911589
11590− if (hdev->hw.mac.media_type == HNAE3_MEDIA_TYPE_COPPER &&
11591− !hnae3_dev_phy_imp_supported(hdev)) {
11592− ret = hclge_mac_mdio_config(hdev);
11590+ if (hdev->hw.mac.media_type == HNAE3_MEDIA_TYPE_COPPER) {
11591+ if (hnae3_dev_phy_imp_supported(hdev))
11592+ ret = hclge_update_tp_port_info(hdev);
11593+ else
11594+ ret = hclge_mac_mdio_config(hdev);
11595+
1159311596 if (ret)
1159411597 goto err_msi_irq_uninit;
1159511598 }
drivers/net/ethernet/huawei/hinic/hinic_main.c+8−1
@@ -1474,8 +1474,15 @@ static struct pci_driver hinic_driver = { · 1473 unmodified lines
14741474
14751475 static int __init hinic_module_init(void)
14761476 {
1477+ int ret;
1478+
14771479 hinic_dbg_register_debugfs(HINIC_DRV_NAME);
1478− return pci_register_driver(&hinic_driver);
1480+
1481+ ret = pci_register_driver(&hinic_driver);
1482+ if (ret)
1483+ hinic_dbg_unregister_debugfs();
1484+
1485+ return ret;
14791486 }
14801487
14811488 static void __exit hinic_module_exit(void)
drivers/net/ethernet/marvell/octeon_ep/octep_main.c+11−5
@@ -521,14 +521,12 @@ static int octep_open(struct net_device *netdev) · 520 unmodified lines
521521 octep_oq_dbell_init(oct);
522522
523523 ret = octep_get_link_status(oct);
524− if (ret)
524+ if (ret > 0)
525525 octep_link_up(netdev);
526526
527527 return 0;
528528
529529 set_queues_err:
530− octep_napi_disable(oct);
531− octep_napi_delete(oct);
532530 octep_clean_irqs(oct);
533531 setup_irq_err:
534532 octep_free_oqs(oct);
@@ -958,7 +956,7 @@ int octep_device_setup(struct octep_device *oct) · 423 unmodified lines
958956 ret = octep_ctrl_mbox_init(ctrl_mbox);
959957 if (ret) {
960958 dev_err(&pdev->dev, "Failed to initialize control mbox\n");
961− return -1;
959+ goto unsupported_dev;
962960 }
963961 oct->ctrl_mbox_ifstats_offset = OCTEP_CTRL_MBOX_SZ(ctrl_mbox->h2fq.elem_sz,
964962 ctrl_mbox->h2fq.elem_cnt,
@@ -968,6 +966,10 @@ int octep_device_setup(struct octep_device *oct) · 3 unmodified lines
968966 return 0;
969967
970968 unsupported_dev:
969+ for (i = 0; i < OCTEP_MMIO_REGIONS; i++)
970+ iounmap(oct->mmio[i].hw_addr);
971+
972+ kfree(oct->conf);
971973 return -1;
972974 }
973975
@@ -1070,7 +1072,11 @@ static int octep_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · 96 unmodified lines
10701072 netdev->max_mtu = OCTEP_MAX_MTU;
10711073 netdev->mtu = OCTEP_DEFAULT_MTU;
10721074
1073− octep_get_mac_addr(octep_dev, octep_dev->mac_addr);
1075+ err = octep_get_mac_addr(octep_dev, octep_dev->mac_addr);
1076+ if (err) {
1077+ dev_err(&pdev->dev, "Failed to get mac address\n");
1078+ goto register_dev_err;
1079+ }
10741080 eth_hw_addr_set(netdev, octep_dev->mac_addr);
10751081
10761082 err = register_netdev(netdev);
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c+2−0
@@ -3470,6 +3470,8 @@ mlxsw_sp_switchdev_vxlan_fdb_del(struct mlxsw_sp *mlxsw_sp, · 3469 unmodified lines
34703470 u16 vid;
34713471
34723472 vxlan_fdb_info = &switchdev_work->vxlan_fdb_info;
3473+ if (!vxlan_fdb_info->offloaded)
3474+ return;
34733475
34743476 bridge_device = mlxsw_sp_bridge_device_find(mlxsw_sp->bridge, br_dev);
34753477 if (!bridge_device)
drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c+3−0
@@ -716,6 +716,9 @@ int lan966x_stats_init(struct lan966x *lan966x) · 715 unmodified lines
716716 snprintf(queue_name, sizeof(queue_name), "%s-stats",
717717 dev_name(lan966x->dev));
718718 lan966x->stats_queue = create_singlethread_workqueue(queue_name);
719+ if (!lan966x->stats_queue)
720+ return -ENOMEM;
721+
719722 INIT_DELAYED_WORK(&lan966x->stats_work, lan966x_check_stats_work);
720723 queue_delayed_work(lan966x->stats_queue, &lan966x->stats_work,
721724 LAN966X_STATS_CHECK_DELAY);
drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c+3−0
@@ -1253,6 +1253,9 @@ int sparx_stats_init(struct sparx5 *sparx5) · 1252 unmodified lines
12531253 snprintf(queue_name, sizeof(queue_name), "%s-stats",
12541254 dev_name(sparx5->dev));
12551255 sparx5->stats_queue = create_singlethread_workqueue(queue_name);
1256+ if (!sparx5->stats_queue)
1257+ return -ENOMEM;
1258+
12561259 INIT_DELAYED_WORK(&sparx5->stats_work, sparx5_check_stats_work);
12571260 queue_delayed_work(sparx5->stats_queue, &sparx5->stats_work,
12581261 SPX5_STATS_CHECK_DELAY);
drivers/net/ethernet/microchip/sparx5/sparx5_main.c+3−0
@@ -659,6 +659,9 @@ static int sparx5_start(struct sparx5 *sparx5) · 658 unmodified lines
659659 snprintf(queue_name, sizeof(queue_name), "%s-mact",
660660 dev_name(sparx5->dev));
661661 sparx5->mact_queue = create_singlethread_workqueue(queue_name);
662+ if (!sparx5->mact_queue)
663+ return -ENOMEM;
664+
662665 INIT_DELAYED_WORK(&sparx5->mact_work, sparx5_mact_pull_work);
663666 queue_delayed_work(sparx5->mact_queue, &sparx5->mact_work,
664667 SPX5_MACT_PULL_DELAY);
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c+3−3
@@ -1477,15 +1477,15 @@ nfp_port_get_module_info(struct net_device *netdev, · 1476 unmodified lines
14771477
14781478 if (data < 0x3) {
14791479 modinfo->type = ETH_MODULE_SFF_8436;
1480− modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN;
1480+ modinfo->eeprom_len = ETH_MODULE_SFF_8436_MAX_LEN;
14811481 } else {
14821482 modinfo->type = ETH_MODULE_SFF_8636;
1483− modinfo->eeprom_len = ETH_MODULE_SFF_8636_LEN;
1483+ modinfo->eeprom_len = ETH_MODULE_SFF_8636_MAX_LEN;
14841484 }
14851485 break;
14861486 case NFP_INTERFACE_QSFP28:
14871487 modinfo->type = ETH_MODULE_SFF_8636;
1488− modinfo->eeprom_len = ETH_MODULE_SFF_8636_LEN;
1488+ modinfo->eeprom_len = ETH_MODULE_SFF_8636_MAX_LEN;
14891489 break;
14901490 default:
14911491 netdev_err(netdev, "Unsupported module 0x%x detected\n",
drivers/net/ethernet/pensando/ionic/ionic_main.c+7−1
@@ -687,8 +687,14 @@ int ionic_port_reset(struct ionic *ionic) · 686 unmodified lines
687687
688688 static int __init ionic_init_module(void)
689689 {
690+ int ret;
691+
690692 ionic_debugfs_create();
691− return ionic_bus_register_driver();
693+ ret = ionic_bus_register_driver();
694+ if (ret)
695+ ionic_debugfs_destroy();
696+
697+ return ret;
692698 }
693699
694700 static void __exit ionic_cleanup_module(void)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c+3−0
@@ -6548,6 +6548,9 @@ void stmmac_xdp_release(struct net_device *dev) · 6547 unmodified lines
65486548 struct stmmac_priv *priv = netdev_priv(dev);
65496549 u32 chan;
65506550
6551+ /* Ensure tx function is not running */
6552+ netif_tx_disable(dev);
6553+
65516554 /* Disable NAPI process */
65526555 stmmac_disable_all_queues(priv);
65536556
drivers/net/macvlan.c+2−2
@@ -141,7 +141,7 @@ static struct macvlan_source_entry *macvlan_hash_lookup_source( · 140 unmodified lines
141141 u32 idx = macvlan_eth_hash(addr);
142142 struct hlist_head *h = &vlan->port->vlan_source_hash[idx];
143143
144− hlist_for_each_entry_rcu(entry, h, hlist) {
144+ hlist_for_each_entry_rcu(entry, h, hlist, lockdep_rtnl_is_held()) {
145145 if (ether_addr_equal_64bits(entry->addr, addr) &&
146146 entry->vlan == vlan)
147147 return entry;
@@ -1647,7 +1647,7 @@ static int macvlan_fill_info_macaddr(struct sk_buff *skb, · 1499 unmodified lines
16471647 struct hlist_head *h = &vlan->port->vlan_source_hash[i];
16481648 struct macvlan_source_entry *entry;
16491649
1650− hlist_for_each_entry_rcu(entry, h, hlist) {
1650+ hlist_for_each_entry_rcu(entry, h, hlist, lockdep_rtnl_is_held()) {
16511651 if (entry->vlan != vlan)
16521652 continue;
16531653 if (nla_put(skb, IFLA_MACVLAN_MACADDR, ETH_ALEN, entry->addr))
drivers/net/mctp/mctp-i2c.c+32−15
@@ -43,6 +43,7 @@ · 42 unmodified lines
4343 enum {
4444 MCTP_I2C_FLOW_STATE_NEW = 0,
4545 MCTP_I2C_FLOW_STATE_ACTIVE,
46+ MCTP_I2C_FLOW_STATE_INVALID,
4647 };
4748
4849 /* List of all struct mctp_i2c_client
@@ -374,12 +375,18 @@ mctp_i2c_get_tx_flow_state(struct mctp_i2c_dev *midev, struct sk_buff *skb) · 325 unmodified lines
374375 */
375376 if (!key->valid) {
376377 state = MCTP_I2C_TX_FLOW_INVALID;
377−
378− } else if (key->dev_flow_state == MCTP_I2C_FLOW_STATE_NEW) {
379− key->dev_flow_state = MCTP_I2C_FLOW_STATE_ACTIVE;
380− state = MCTP_I2C_TX_FLOW_NEW;
381378 } else {
382− state = MCTP_I2C_TX_FLOW_EXISTING;
379+ switch (key->dev_flow_state) {
380+ case MCTP_I2C_FLOW_STATE_NEW:
381+ key->dev_flow_state = MCTP_I2C_FLOW_STATE_ACTIVE;
382+ state = MCTP_I2C_TX_FLOW_NEW;
383+ break;
384+ case MCTP_I2C_FLOW_STATE_ACTIVE:
385+ state = MCTP_I2C_TX_FLOW_EXISTING;
386+ break;
387+ default:
388+ state = MCTP_I2C_TX_FLOW_INVALID;
389+ }
383390 }
384391
385392 spin_unlock_irqrestore(&key->lock, flags);
@@ -617,21 +624,31 @@ static void mctp_i2c_release_flow(struct mctp_dev *mdev, · 231 unmodified lines
617624
618625 {
619626 struct mctp_i2c_dev *midev = netdev_priv(mdev->dev);
627+ bool queue_release = false;
620628 unsigned long flags;
621629
622630 spin_lock_irqsave(&midev->lock, flags);
623− midev->release_count++;
624− spin_unlock_irqrestore(&midev->lock, flags);
625−
626− /* Ensure we have a release operation queued, through the fake
627− * marker skb
631+ /* if we have seen the flow/key previously, we need to pair the
632+ * original lock with a release
628633 */
629− spin_lock(&midev->tx_queue.lock);
630− if (!midev->unlock_marker.next)
631− __skb_queue_tail(&midev->tx_queue, &midev->unlock_marker);
632− spin_unlock(&midev->tx_queue.lock);
634+ if (key->dev_flow_state == MCTP_I2C_FLOW_STATE_ACTIVE) {
635+ midev->release_count++;
636+ queue_release = true;
637+ }
638+ key->dev_flow_state = MCTP_I2C_FLOW_STATE_INVALID;
639+ spin_unlock_irqrestore(&midev->lock, flags);
633640
634− wake_up(&midev->tx_wq);
641+ if (queue_release) {
642+ /* Ensure we have a release operation queued, through the fake
643+ * marker skb
644+ */
645+ spin_lock(&midev->tx_queue.lock);
646+ if (!midev->unlock_marker.next)
647+ __skb_queue_tail(&midev->tx_queue,
648+ &midev->unlock_marker);
649+ spin_unlock(&midev->tx_queue.lock);
650+ wake_up(&midev->tx_wq);
651+ }
635652 }
636653
637654 static const struct net_device_ops mctp_i2c_ops = {
drivers/net/mhi_net.c+2−0
@@ -343,6 +343,8 @@ static void mhi_net_dellink(struct mhi_device *mhi_dev, struct net_device *ndev) · 342 unmodified lines
343343
344344 kfree_skb(mhi_netdev->skbagg_head);
345345
346+ free_netdev(ndev);
347+
346348 dev_set_drvdata(&mhi_dev->dev, NULL);
347349 }
348350
drivers/net/netdevsim/dev.c+1−0
@@ -1683,6 +1683,7 @@ void nsim_drv_remove(struct nsim_bus_dev *nsim_bus_dev) · 1682 unmodified lines
16831683 ARRAY_SIZE(nsim_devlink_params));
16841684 devl_resources_unregister(devlink);
16851685 kfree(nsim_dev->vfconfigs);
1686+ kfree(nsim_dev->fa_cookie);
16861687 devl_unlock(devlink);
16871688 devlink_free(devlink);
16881689 dev_set_drvdata(&nsim_bus_dev->dev, NULL);
drivers/net/phy/dp83867.c+7−0
@@ -682,6 +682,13 @@ static int dp83867_of_init(struct phy_device *phydev) · 681 unmodified lines
682682 */
683683 dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN / 2;
684684
685+ /* For non-OF device, the RX and TX FIFO depths are taken from
686+ * default value. So, we init RX & TX FIFO depths here
687+ * so that it is configured correctly later in dp83867_config_init();
688+ */
689+ dp83867->tx_fifo_depth = DP83867_PHYCR_FIFO_DEPTH_4_B_NIB;
690+ dp83867->rx_fifo_depth = DP83867_PHYCR_FIFO_DEPTH_4_B_NIB;
691+
685692 return 0;
686693 }
687694 #endif /* CONFIG_OF_MDIO */
drivers/net/phy/marvell.c+9−7
@@ -2015,14 +2015,16 @@ static int m88e1510_loopback(struct phy_device *phydev, bool enable) · 2014 unmodified lines
20152015 if (err < 0)
20162016 return err;
20172017
2018− /* FIXME: Based on trial and error test, it seem 1G need to have
2019− * delay between soft reset and loopback enablement.
2020− */
2021− if (phydev->speed == SPEED_1000)
2022− msleep(1000);
2018+ err = phy_modify(phydev, MII_BMCR, BMCR_LOOPBACK,
2019+ BMCR_LOOPBACK);
20232020
2024− return phy_modify(phydev, MII_BMCR, BMCR_LOOPBACK,
2025− BMCR_LOOPBACK);
2021+ if (!err) {
2022+ /* It takes some time for PHY device to switch
2023+ * into/out-of loopback mode.
2024+ */
2025+ msleep(1000);
2026+ }
2027+ return err;
20262028 } else {
20272029 err = phy_modify(phydev, MII_BMCR, BMCR_LOOPBACK, 0);
20282030 if (err < 0)
drivers/net/thunderbolt.c+14−5
@@ -1391,12 +1391,21 @@ static int __init tbnet_init(void) · 1390 unmodified lines
13911391 tb_property_add_immediate(tbnet_dir, "prtcstns", flags);
13921392
13931393 ret = tb_register_property_dir("network", tbnet_dir);
1394− if (ret) {
1395− tb_property_free_dir(tbnet_dir);
1396− return ret;
1397− }
1394+ if (ret)
1395+ goto err_free_dir;
1396+
1397+ ret = tb_register_service_driver(&tbnet_driver);
1398+ if (ret)
1399+ goto err_unregister;
13981400
1399− return tb_register_service_driver(&tbnet_driver);
1401+ return 0;
1402+
1403+err_unregister:
1404+ tb_unregister_property_dir("network", tbnet_dir);
1405+err_free_dir:
1406+ tb_property_free_dir(tbnet_dir);
1407+
1408+ return ret;
14001409 }
14011410 module_init(tbnet_init);
14021411
drivers/net/usb/qmi_wwan.c+1−0
@@ -1357,6 +1357,7 @@ static const struct usb_device_id products[] = { · 1356 unmodified lines
13571357 {QMI_FIXED_INTF(0x2357, 0x0201, 4)}, /* TP-LINK HSUPA Modem MA180 */
13581358 {QMI_FIXED_INTF(0x2357, 0x9000, 4)}, /* TP-LINK MA260 */
13591359 {QMI_QUIRK_SET_DTR(0x1bc7, 0x1031, 3)}, /* Telit LE910C1-EUX */
1360+ {QMI_QUIRK_SET_DTR(0x1bc7, 0x103a, 0)}, /* Telit LE910C4-WWX */
13601361 {QMI_QUIRK_SET_DTR(0x1bc7, 0x1040, 2)}, /* Telit LE922A */
13611362 {QMI_QUIRK_SET_DTR(0x1bc7, 0x1050, 2)}, /* Telit FN980 */
13621363 {QMI_QUIRK_SET_DTR(0x1bc7, 0x1057, 2)}, /* Telit FN980 */
drivers/net/usb/smsc95xx.c+42−4
@@ -66,6 +66,7 @@ struct smsc95xx_priv { · 65 unmodified lines
6666 spinlock_t mac_cr_lock;
6767 u8 features;
6868 u8 suspend_flags;
69+ bool is_internal_phy;
6970 struct irq_chip irqchip;
7071 struct irq_domain *irqdomain;
7172 struct fwnode_handle *irqfwnode;
@@ -252,6 +253,43 @@ done: · 180 unmodified lines
252253 mutex_unlock(&dev->phy_mutex);
253254 }
254255
256+static int smsc95xx_mdiobus_reset(struct mii_bus *bus)
257+{
258+ struct smsc95xx_priv *pdata;
259+ struct usbnet *dev;
260+ u32 val;
261+ int ret;
262+
263+ dev = bus->priv;
264+ pdata = dev->driver_priv;
265+
266+ if (pdata->is_internal_phy)
267+ return 0;
268+
269+ mutex_lock(&dev->phy_mutex);
270+
271+ ret = smsc95xx_read_reg(dev, PM_CTRL, &val);
272+ if (ret < 0)
273+ goto reset_out;
274+
275+ val |= PM_CTL_PHY_RST_;
276+
277+ ret = smsc95xx_write_reg(dev, PM_CTRL, val);
278+ if (ret < 0)
279+ goto reset_out;
280+
281+ /* Driver has no knowledge at this point about the external PHY.
282+ * The 802.3 specifies that the reset process shall
283+ * be completed within 0.5 s.
284+ */
285+ fsleep(500000);
286+
287+reset_out:
288+ mutex_unlock(&dev->phy_mutex);
289+
290+ return 0;
291+}
292+
255293 static int smsc95xx_mdiobus_read(struct mii_bus *bus, int phy_id, int idx)
256294 {
257295 struct usbnet *dev = bus->priv;
@@ -1052,7 +1090,6 @@ static void smsc95xx_handle_link_change(struct net_device *net) · 794 unmodified lines
10521090 static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf)
10531091 {
10541092 struct smsc95xx_priv *pdata;
1055− bool is_internal_phy;
10561093 char usb_path[64];
10571094 int ret, phy_irq;
10581095 u32 val;
@@ -1133,13 +1170,14 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf) · 74 unmodified lines
11331170 if (ret < 0)
11341171 goto free_mdio;
11351172
1136− is_internal_phy = !(val & HW_CFG_PSEL_);
1137− if (is_internal_phy)
1173+ pdata->is_internal_phy = !(val & HW_CFG_PSEL_);
1174+ if (pdata->is_internal_phy)
11381175 pdata->mdiobus->phy_mask = ~(1u << SMSC95XX_INTERNAL_PHY_ID);
11391176
11401177 pdata->mdiobus->priv = dev;
11411178 pdata->mdiobus->read = smsc95xx_mdiobus_read;
11421179 pdata->mdiobus->write = smsc95xx_mdiobus_write;
1180+ pdata->mdiobus->reset = smsc95xx_mdiobus_reset;
11431181 pdata->mdiobus->name = "smsc95xx-mdiobus";
11441182 pdata->mdiobus->parent = &dev->udev->dev;
11451183
@@ -1160,7 +1198,7 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf) · 14 unmodified lines
11601198 }
11611199
11621200 pdata->phydev->irq = phy_irq;
1163− pdata->phydev->is_internal = is_internal_phy;
1201+ pdata->phydev->is_internal = pdata->is_internal_phy;
11641202
11651203 /* detect device revision as different features may be available */
11661204 ret = smsc95xx_read_reg(dev, ID_REV, &val);
drivers/nvme/host/pci.c+4−0
@@ -3489,6 +3489,8 @@ static const struct pci_device_id nvme_id_table[] = { · 3488 unmodified lines
34893489 NVME_QUIRK_IGNORE_DEV_SUBNQN, },
34903490 { PCI_DEVICE(0x1344, 0x5407), /* Micron Technology Inc NVMe SSD */
34913491 .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN },
3492+ { PCI_DEVICE(0x1344, 0x6001), /* Micron Nitro NVMe */
3493+ .driver_data = NVME_QUIRK_BOGUS_NID, },
34923494 { PCI_DEVICE(0x1c5c, 0x1504), /* SK Hynix PC400 */
34933495 .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
34943496 { PCI_DEVICE(0x1c5c, 0x174a), /* SK Hynix P31 SSD */
@@ -3519,6 +3521,8 @@ static const struct pci_device_id nvme_id_table[] = { · 24 unmodified lines
35193521 .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
35203522 { PCI_DEVICE(0x2646, 0x501E), /* KINGSTON OM3PGP4xxxxQ OS21011 NVMe SSD */
35213523 .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
3524+ { PCI_DEVICE(0x1f40, 0x5236), /* Netac Technologies Co. NV7000 NVMe SSD */
3525+ .driver_data = NVME_QUIRK_BOGUS_NID, },
35223526 { PCI_DEVICE(0x1e4B, 0x1001), /* MAXIO MAP1001 */
35233527 .driver_data = NVME_QUIRK_BOGUS_NID, },
35243528 { PCI_DEVICE(0x1e4B, 0x1002), /* MAXIO MAP1002 */
drivers/nvme/target/auth.c+2−0
@@ -45,9 +45,11 @@ int nvmet_auth_set_key(struct nvmet_host *host, const char *secret, · 44 unmodified lines
4545 if (!dhchap_secret)
4646 return -ENOMEM;
4747 if (set_ctrl) {
48+ kfree(host->dhchap_ctrl_secret);
4849 host->dhchap_ctrl_secret = strim(dhchap_secret);
4950 host->dhchap_ctrl_key_hash = key_hash;
5051 } else {
52+ kfree(host->dhchap_secret);
5153 host->dhchap_secret = strim(dhchap_secret);
5254 host->dhchap_key_hash = key_hash;
5355 }
drivers/nvmem/lan9662-otpc.c+1−1
@@ -203,7 +203,7 @@ static int lan9662_otp_probe(struct platform_device *pdev) · 202 unmodified lines
203203 }
204204
205205 static const struct of_device_id lan9662_otp_match[] = {
206− { .compatible = "microchip,lan9662-otp", },
206+ { .compatible = "microchip,lan9662-otpc", },
207207 { },
208208 };
209209 MODULE_DEVICE_TABLE(of, lan9662_otp_match);
drivers/nvmem/u-boot-env.c+1−1
@@ -135,7 +135,7 @@ static int u_boot_env_parse(struct u_boot_env *priv) · 134 unmodified lines
135135 break;
136136 case U_BOOT_FORMAT_REDUNDANT:
137137 crc32_offset = offsetof(struct u_boot_env_image_redundant, crc32);
138− crc32_data_offset = offsetof(struct u_boot_env_image_redundant, mark);
138+ crc32_data_offset = offsetof(struct u_boot_env_image_redundant, data);
139139 data_offset = offsetof(struct u_boot_env_image_redundant, data);
140140 break;
141141 }
drivers/parport/parport_pc.c+1−1
@@ -468,7 +468,7 @@ static size_t parport_pc_fifo_write_block_pio(struct parport *port, · 467 unmodified lines
468468 const unsigned char *bufp = buf;
469469 size_t left = length;
470470 unsigned long expire = jiffies + port->physport->cad->timeout;
471− const int fifo = FIFO(port);
471+ const unsigned long fifo = FIFO(port);
472472 int poll_for = 8; /* 80 usecs */
473473 const struct parport_pc_private *priv = port->physport->private_data;
474474 const int fifo_depth = priv->fifo_depth;
drivers/pinctrl/devicetree.c+2−0
@@ -220,6 +220,8 @@ int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev) · 219 unmodified lines
220220 for (state = 0; ; state++) {
221221 /* Retrieve the pinctrl-* property */
222222 propname = kasprintf(GFP_KERNEL, "pinctrl-%d", state);
223+ if (!propname)
224+ return -ENOMEM;
223225 prop = of_find_property(np, propname, &size);
224226 kfree(propname);
225227 if (!prop) {
drivers/pinctrl/mediatek/mtk-eint.c+29−5
@@ -24,6 +24,7 @@ · 23 unmodified lines
2424 #define MTK_EINT_EDGE_SENSITIVE 0
2525 #define MTK_EINT_LEVEL_SENSITIVE 1
2626 #define MTK_EINT_DBNC_SET_DBNC_BITS 4
27+#define MTK_EINT_DBNC_MAX 16
2728 #define MTK_EINT_DBNC_RST_BIT (0x1 << 1)
2829 #define MTK_EINT_DBNC_SET_EN (0x1 << 0)
2930
@@ -48,6 +49,21 @@ static const struct mtk_eint_regs mtk_generic_eint_regs = { · 18 unmodified lines
4849 .dbnc_clr = 0x700,
4950 };
5051
52+const unsigned int debounce_time_mt2701[] = {
53+ 500, 1000, 16000, 32000, 64000, 128000, 256000, 0
54+};
55+EXPORT_SYMBOL_GPL(debounce_time_mt2701);
56+
57+const unsigned int debounce_time_mt6765[] = {
58+ 125, 250, 500, 1000, 16000, 32000, 64000, 128000, 256000, 512000, 0
59+};
60+EXPORT_SYMBOL_GPL(debounce_time_mt6765);
61+
62+const unsigned int debounce_time_mt6795[] = {
63+ 500, 1000, 16000, 32000, 64000, 128000, 256000, 512000, 0
64+};
65+EXPORT_SYMBOL_GPL(debounce_time_mt6795);
66+
5167 static void __iomem *mtk_eint_get_offset(struct mtk_eint *eint,
5268 unsigned int eint_num,
5369 unsigned int offset)
@@ -404,10 +420,11 @@ int mtk_eint_set_debounce(struct mtk_eint *eint, unsigned long eint_num, · 350 unmodified lines
404420 int virq, eint_offset;
405421 unsigned int set_offset, bit, clr_bit, clr_offset, rst, i, unmask,
406422 dbnc;
407− static const unsigned int debounce_time[] = {500, 1000, 16000, 32000,
408− 64000, 128000, 256000};
409423 struct irq_data *d;
410424
425+ if (!eint->hw->db_time)
426+ return -EOPNOTSUPP;
427+
411428 virq = irq_find_mapping(eint->domain, eint_num);
412429 eint_offset = (eint_num % 4) * 8;
413430 d = irq_get_irq_data(virq);
@@ -418,9 +435,9 @@ int mtk_eint_set_debounce(struct mtk_eint *eint, unsigned long eint_num, · 4 unmodified lines
418435 if (!mtk_eint_can_en_debounce(eint, eint_num))
419436 return -EINVAL;
420437
421− dbnc = ARRAY_SIZE(debounce_time);
422− for (i = 0; i < ARRAY_SIZE(debounce_time); i++) {
423− if (debounce <= debounce_time[i]) {
438+ dbnc = eint->num_db_time;
439+ for (i = 0; i < eint->num_db_time; i++) {
440+ if (debounce <= eint->hw->db_time[i]) {
424441 dbnc = i;
425442 break;
426443 }
@@ -494,6 +511,13 @@ int mtk_eint_do_init(struct mtk_eint *eint) · 67 unmodified lines
494511 if (!eint->domain)
495512 return -ENOMEM;
496513
514+ if (eint->hw->db_time) {
515+ for (i = 0; i < MTK_EINT_DBNC_MAX; i++)
516+ if (eint->hw->db_time[i] == 0)
517+ break;
518+ eint->num_db_time = i;
519+ }
520+
497521 mtk_eint_hw_init(eint);
498522 for (i = 0; i < eint->hw->ap_num; i++) {
499523 int virq = irq_create_mapping(eint->domain, i);
drivers/pinctrl/mediatek/mtk-eint.h+6−0
@@ -37,8 +37,13 @@ struct mtk_eint_hw { · 36 unmodified lines
3737 u8 ports;
3838 unsigned int ap_num;
3939 unsigned int db_cnt;
40+ const unsigned int *db_time;
4041 };
4142
43+extern const unsigned int debounce_time_mt2701[];
44+extern const unsigned int debounce_time_mt6765[];
45+extern const unsigned int debounce_time_mt6795[];
46+
4247 struct mtk_eint;
4348
4449 struct mtk_eint_xt {
@@ -62,6 +67,7 @@ struct mtk_eint { · 17 unmodified lines
6267 /* Used to fit into various EINT device */
6368 const struct mtk_eint_hw *hw;
6469 const struct mtk_eint_regs *regs;
70+ u16 num_db_time;
6571
6672 /* Used to fit into various pinctrl device */
6773 void *pctl;
drivers/pinctrl/mediatek/pinctrl-mt2701.c+1−0
@@ -518,6 +518,7 @@ static const struct mtk_pinctrl_devdata mt2701_pinctrl_data = { · 517 unmodified lines
518518 .ports = 6,
519519 .ap_num = 169,
520520 .db_cnt = 16,
521+ .db_time = debounce_time_mt2701,
521522 },
522523 };
523524
drivers/pinctrl/mediatek/pinctrl-mt2712.c+1−0
@@ -567,6 +567,7 @@ static const struct mtk_pinctrl_devdata mt2712_pinctrl_data = { · 566 unmodified lines
567567 .ports = 8,
568568 .ap_num = 229,
569569 .db_cnt = 40,
570+ .db_time = debounce_time_mt2701,
570571 },
571572 };
572573
drivers/pinctrl/mediatek/pinctrl-mt6765.c+1−0
@@ -1062,6 +1062,7 @@ static const struct mtk_eint_hw mt6765_eint_hw = { · 1061 unmodified lines
10621062 .ports = 6,
10631063 .ap_num = 160,
10641064 .db_cnt = 13,
1065+ .db_time = debounce_time_mt6765,
10651066 };
10661067
10671068 static const struct mtk_pin_soc mt6765_data = {
drivers/pinctrl/mediatek/pinctrl-mt6779.c+1−0
@@ -737,6 +737,7 @@ static const struct mtk_eint_hw mt6779_eint_hw = { · 736 unmodified lines
737737 .ports = 6,
738738 .ap_num = 195,
739739 .db_cnt = 13,
740+ .db_time = debounce_time_mt2701,
740741 };
741742
742743 static const struct mtk_pin_soc mt6779_data = {
drivers/pinctrl/mediatek/pinctrl-mt6795.c+1−0
@@ -475,6 +475,7 @@ static const struct mtk_eint_hw mt6795_eint_hw = { · 474 unmodified lines
475475 .ports = 7,
476476 .ap_num = 224,
477477 .db_cnt = 32,
478+ .db_time = debounce_time_mt6795,
478479 };
479480
480481 static const unsigned int mt6795_pull_type[] = {
drivers/pinctrl/mediatek/pinctrl-mt7622.c+1−0
@@ -846,6 +846,7 @@ static const struct mtk_eint_hw mt7622_eint_hw = { · 845 unmodified lines
846846 .ports = 7,
847847 .ap_num = ARRAY_SIZE(mt7622_pins),
848848 .db_cnt = 20,
849+ .db_time = debounce_time_mt6765,
849850 };
850851
851852 static const struct mtk_pin_soc mt7622_data = {
drivers/pinctrl/mediatek/pinctrl-mt7623.c+1−0
@@ -1369,6 +1369,7 @@ static const struct mtk_eint_hw mt7623_eint_hw = { · 1368 unmodified lines
13691369 .ports = 6,
13701370 .ap_num = 169,
13711371 .db_cnt = 20,
1372+ .db_time = debounce_time_mt2701,
13721373 };
13731374
13741375 static struct mtk_pin_soc mt7623_data = {
drivers/pinctrl/mediatek/pinctrl-mt7629.c+1−0
@@ -402,6 +402,7 @@ static const struct mtk_eint_hw mt7629_eint_hw = { · 401 unmodified lines
402402 .ports = 7,
403403 .ap_num = ARRAY_SIZE(mt7629_pins),
404404 .db_cnt = 16,
405+ .db_time = debounce_time_mt2701,
405406 };
406407
407408 static struct mtk_pin_soc mt7629_data = {
drivers/pinctrl/mediatek/pinctrl-mt7986.c+2−0
@@ -826,6 +826,7 @@ static const struct mtk_eint_hw mt7986a_eint_hw = { · 825 unmodified lines
826826 .ports = 7,
827827 .ap_num = ARRAY_SIZE(mt7986a_pins),
828828 .db_cnt = 16,
829+ .db_time = debounce_time_mt6765,
829830 };
830831
831832 static const struct mtk_eint_hw mt7986b_eint_hw = {
@@ -833,6 +834,7 @@ static const struct mtk_eint_hw mt7986b_eint_hw = { · 1 unmodified line
833834 .ports = 7,
834835 .ap_num = ARRAY_SIZE(mt7986b_pins),
835836 .db_cnt = 16,
837+ .db_time = debounce_time_mt6765,
836838 };
837839
838840 static struct mtk_pin_soc mt7986a_data = {
drivers/pinctrl/mediatek/pinctrl-mt8127.c+1−0
@@ -286,6 +286,7 @@ static const struct mtk_pinctrl_devdata mt8127_pinctrl_data = { · 285 unmodified lines
286286 .ports = 6,
287287 .ap_num = 143,
288288 .db_cnt = 16,
289+ .db_time = debounce_time_mt2701,
289290 },
290291 };
291292
drivers/pinctrl/mediatek/pinctrl-mt8135.c+1−0
@@ -315,6 +315,7 @@ static const struct mtk_pinctrl_devdata mt8135_pinctrl_data = { · 314 unmodified lines
315315 .ports = 6,
316316 .ap_num = 192,
317317 .db_cnt = 16,
318+ .db_time = debounce_time_mt2701,
318319 },
319320 };
320321
drivers/pinctrl/mediatek/pinctrl-mt8167.c+1−0
@@ -319,6 +319,7 @@ static const struct mtk_pinctrl_devdata mt8167_pinctrl_data = { · 318 unmodified lines
319319 .ports = 6,
320320 .ap_num = 169,
321321 .db_cnt = 64,
322+ .db_time = debounce_time_mt6795,
322323 },
323324 };
324325
drivers/pinctrl/mediatek/pinctrl-mt8173.c+1−0
@@ -327,6 +327,7 @@ static const struct mtk_pinctrl_devdata mt8173_pinctrl_data = { · 326 unmodified lines
327327 .ports = 6,
328328 .ap_num = 224,
329329 .db_cnt = 16,
330+ .db_time = debounce_time_mt2701,
330331 },
331332 };
332333
drivers/pinctrl/mediatek/pinctrl-mt8183.c+1−0
@@ -545,6 +545,7 @@ static const struct mtk_eint_hw mt8183_eint_hw = { · 544 unmodified lines
545545 .ports = 6,
546546 .ap_num = 212,
547547 .db_cnt = 13,
548+ .db_time = debounce_time_mt6765,
548549 };
549550
550551 static const struct mtk_pin_soc mt8183_data = {
drivers/pinctrl/mediatek/pinctrl-mt8186.c+1−0
@@ -1222,6 +1222,7 @@ static const struct mtk_eint_hw mt8186_eint_hw = { · 1221 unmodified lines
12221222 .ports = 7,
12231223 .ap_num = 217,
12241224 .db_cnt = 32,
1225+ .db_time = debounce_time_mt6765,
12251226 };
12261227
12271228 static const struct mtk_pin_soc mt8186_data = {
drivers/pinctrl/mediatek/pinctrl-mt8188.c+1−0
@@ -1625,6 +1625,7 @@ static const struct mtk_eint_hw mt8188_eint_hw = { · 1624 unmodified lines
16251625 .ports = 7,
16261626 .ap_num = 225,
16271627 .db_cnt = 32,
1628+ .db_time = debounce_time_mt6765,
16281629 };
16291630
16301631 static const struct mtk_pin_soc mt8188_data = {
drivers/pinctrl/mediatek/pinctrl-mt8192.c+1−0
@@ -1371,6 +1371,7 @@ static const struct mtk_eint_hw mt8192_eint_hw = { · 1370 unmodified lines
13711371 .ports = 7,
13721372 .ap_num = 224,
13731373 .db_cnt = 32,
1374+ .db_time = debounce_time_mt6765,
13741375 };
13751376
13761377 static const struct mtk_pin_reg_calc mt8192_reg_cals[PINCTRL_PIN_REG_MAX] = {
drivers/pinctrl/mediatek/pinctrl-mt8195.c+1−0
@@ -935,6 +935,7 @@ static const struct mtk_eint_hw mt8195_eint_hw = { · 934 unmodified lines
935935 .ports = 7,
936936 .ap_num = 225,
937937 .db_cnt = 32,
938+ .db_time = debounce_time_mt6765,
938939 };
939940
940941 static const struct mtk_pin_soc mt8195_data = {
drivers/pinctrl/mediatek/pinctrl-mt8365.c+1−0
@@ -453,6 +453,7 @@ static const struct mtk_pinctrl_devdata mt8365_pinctrl_data = { · 452 unmodified lines
453453 .ports = 5,
454454 .ap_num = 160,
455455 .db_cnt = 160,
456+ .db_time = debounce_time_mt6765,
456457 },
457458 };
458459
drivers/pinctrl/mediatek/pinctrl-mt8516.c+1−0
@@ -319,6 +319,7 @@ static const struct mtk_pinctrl_devdata mt8516_pinctrl_data = { · 318 unmodified lines
319319 .ports = 6,
320320 .ap_num = 169,
321321 .db_cnt = 64,
322+ .db_time = debounce_time_mt6795,
322323 },
323324 };
324325
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c+3−0
@@ -709,6 +709,9 @@ static int mtk_pinconf_bias_set_rsel(struct mtk_pinctrl *hw, · 708 unmodified lines
709709 {
710710 int err, rsel_val;
711711
712+ if (!pullup && arg == MTK_DISABLE)
713+ return 0;
714+
712715 if (hw->rsel_si_unit) {
713716 /* find pin rsel_index from pin_rsel array*/
714717 err = mtk_hw_pin_rsel_lookup(hw, desc, pullup, arg, &rsel_val);
drivers/pinctrl/pinctrl-rockchip.c+40−0
@@ -679,14 +679,54 @@ static void rockchip_get_recalced_mux(struct rockchip_pin_bank *bank, int pin, · 678 unmodified lines
679679 }
680680
681681 static struct rockchip_mux_route_data px30_mux_route_data[] = {
682+ RK_MUXROUTE_SAME(2, RK_PB4, 1, 0x184, BIT(16 + 7)), /* cif-d0m0 */
683+ RK_MUXROUTE_SAME(3, RK_PA1, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d0m1 */
684+ RK_MUXROUTE_SAME(2, RK_PB6, 1, 0x184, BIT(16 + 7)), /* cif-d1m0 */
685+ RK_MUXROUTE_SAME(3, RK_PA2, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d1m1 */
682686 RK_MUXROUTE_SAME(2, RK_PA0, 1, 0x184, BIT(16 + 7)), /* cif-d2m0 */
683687 RK_MUXROUTE_SAME(3, RK_PA3, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d2m1 */
688+ RK_MUXROUTE_SAME(2, RK_PA1, 1, 0x184, BIT(16 + 7)), /* cif-d3m0 */
689+ RK_MUXROUTE_SAME(3, RK_PA5, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d3m1 */
690+ RK_MUXROUTE_SAME(2, RK_PA2, 1, 0x184, BIT(16 + 7)), /* cif-d4m0 */
691+ RK_MUXROUTE_SAME(3, RK_PA7, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d4m1 */
692+ RK_MUXROUTE_SAME(2, RK_PA3, 1, 0x184, BIT(16 + 7)), /* cif-d5m0 */
693+ RK_MUXROUTE_SAME(3, RK_PB0, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d5m1 */
694+ RK_MUXROUTE_SAME(2, RK_PA4, 1, 0x184, BIT(16 + 7)), /* cif-d6m0 */
695+ RK_MUXROUTE_SAME(3, RK_PB1, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d6m1 */
696+ RK_MUXROUTE_SAME(2, RK_PA5, 1, 0x184, BIT(16 + 7)), /* cif-d7m0 */
697+ RK_MUXROUTE_SAME(3, RK_PB4, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d7m1 */
698+ RK_MUXROUTE_SAME(2, RK_PA6, 1, 0x184, BIT(16 + 7)), /* cif-d8m0 */
699+ RK_MUXROUTE_SAME(3, RK_PB6, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d8m1 */
700+ RK_MUXROUTE_SAME(2, RK_PA7, 1, 0x184, BIT(16 + 7)), /* cif-d9m0 */
701+ RK_MUXROUTE_SAME(3, RK_PB7, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d9m1 */
702+ RK_MUXROUTE_SAME(2, RK_PB7, 1, 0x184, BIT(16 + 7)), /* cif-d10m0 */
703+ RK_MUXROUTE_SAME(3, RK_PC6, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d10m1 */
704+ RK_MUXROUTE_SAME(2, RK_PC0, 1, 0x184, BIT(16 + 7)), /* cif-d11m0 */
705+ RK_MUXROUTE_SAME(3, RK_PC7, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d11m1 */
706+ RK_MUXROUTE_SAME(2, RK_PB0, 1, 0x184, BIT(16 + 7)), /* cif-vsyncm0 */
707+ RK_MUXROUTE_SAME(3, RK_PD1, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-vsyncm1 */
708+ RK_MUXROUTE_SAME(2, RK_PB1, 1, 0x184, BIT(16 + 7)), /* cif-hrefm0 */
709+ RK_MUXROUTE_SAME(3, RK_PD2, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-hrefm1 */
710+ RK_MUXROUTE_SAME(2, RK_PB2, 1, 0x184, BIT(16 + 7)), /* cif-clkinm0 */
711+ RK_MUXROUTE_SAME(3, RK_PD3, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-clkinm1 */
712+ RK_MUXROUTE_SAME(2, RK_PB3, 1, 0x184, BIT(16 + 7)), /* cif-clkoutm0 */
713+ RK_MUXROUTE_SAME(3, RK_PD0, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-clkoutm1 */
684714 RK_MUXROUTE_SAME(3, RK_PC6, 2, 0x184, BIT(16 + 8)), /* pdm-m0 */
685715 RK_MUXROUTE_SAME(2, RK_PC6, 1, 0x184, BIT(16 + 8) | BIT(8)), /* pdm-m1 */
716+ RK_MUXROUTE_SAME(3, RK_PD3, 2, 0x184, BIT(16 + 8)), /* pdm-sdi0m0 */
717+ RK_MUXROUTE_SAME(2, RK_PC5, 2, 0x184, BIT(16 + 8) | BIT(8)), /* pdm-sdi0m1 */
686718 RK_MUXROUTE_SAME(1, RK_PD3, 2, 0x184, BIT(16 + 10)), /* uart2-rxm0 */
687719 RK_MUXROUTE_SAME(2, RK_PB6, 2, 0x184, BIT(16 + 10) | BIT(10)), /* uart2-rxm1 */
720+ RK_MUXROUTE_SAME(1, RK_PD2, 2, 0x184, BIT(16 + 10)), /* uart2-txm0 */
721+ RK_MUXROUTE_SAME(2, RK_PB4, 2, 0x184, BIT(16 + 10) | BIT(10)), /* uart2-txm1 */
688722 RK_MUXROUTE_SAME(0, RK_PC1, 2, 0x184, BIT(16 + 9)), /* uart3-rxm0 */
689723 RK_MUXROUTE_SAME(1, RK_PB7, 2, 0x184, BIT(16 + 9) | BIT(9)), /* uart3-rxm1 */
724+ RK_MUXROUTE_SAME(0, RK_PC0, 2, 0x184, BIT(16 + 9)), /* uart3-txm0 */
725+ RK_MUXROUTE_SAME(1, RK_PB6, 2, 0x184, BIT(16 + 9) | BIT(9)), /* uart3-txm1 */
726+ RK_MUXROUTE_SAME(0, RK_PC2, 2, 0x184, BIT(16 + 9)), /* uart3-ctsm0 */
727+ RK_MUXROUTE_SAME(1, RK_PB4, 2, 0x184, BIT(16 + 9) | BIT(9)), /* uart3-ctsm1 */
728+ RK_MUXROUTE_SAME(0, RK_PC3, 2, 0x184, BIT(16 + 9)), /* uart3-rtsm0 */
729+ RK_MUXROUTE_SAME(1, RK_PB5, 2, 0x184, BIT(16 + 9) | BIT(9)), /* uart3-rtsm1 */
690730 };
691731
692732 static struct rockchip_mux_route_data rv1126_mux_route_data[] = {
drivers/pinctrl/qcom/pinctrl-sc8280xp.c+2−2
@@ -1873,8 +1873,8 @@ static const struct msm_pingroup sc8280xp_groups[] = { · 1872 unmodified lines
18731873 [225] = PINGROUP(225, hs3_mi2s, phase_flag, _, _, _, _, egpio),
18741874 [226] = PINGROUP(226, hs3_mi2s, phase_flag, _, _, _, _, egpio),
18751875 [227] = PINGROUP(227, hs3_mi2s, phase_flag, _, _, _, _, egpio),
1876− [228] = UFS_RESET(ufs_reset, 0xf1004),
1877− [229] = UFS_RESET(ufs1_reset, 0xf3004),
1876+ [228] = UFS_RESET(ufs_reset, 0xf1000),
1877+ [229] = UFS_RESET(ufs1_reset, 0xf3000),
18781878 [230] = SDC_QDSD_PINGROUP(sdc2_clk, 0xe8000, 14, 6),
18791879 [231] = SDC_QDSD_PINGROUP(sdc2_cmd, 0xe8000, 11, 3),
18801880 [232] = SDC_QDSD_PINGROUP(sdc2_data, 0xe8000, 9, 0),
drivers/platform/surface/aggregator/ssh_packet_layer.c+20−4
@@ -1596,16 +1596,32 @@ static void ssh_ptl_timeout_reap(struct work_struct *work) · 1595 unmodified lines
15961596 ssh_ptl_tx_wakeup_packet(ptl);
15971597 }
15981598
1599−static bool ssh_ptl_rx_retransmit_check(struct ssh_ptl *ptl, u8 seq)
1599+static bool ssh_ptl_rx_retransmit_check(struct ssh_ptl *ptl, const struct ssh_frame *frame)
16001600 {
16011601 int i;
16021602
1603+ /*
1604+ * Ignore unsequenced packets. On some devices (notably Surface Pro 9),
1605+ * unsequenced events will always be sent with SEQ=0x00. Attempting to
1606+ * detect retransmission would thus just block all events.
1607+ *
1608+ * While sequence numbers would also allow detection of retransmitted
1609+ * packets in unsequenced communication, they have only ever been used
1610+ * to cover edge-cases in sequenced transmission. In particular, the
1611+ * only instance of packets being retransmitted (that we are aware of)
1612+ * is due to an ACK timeout. As this does not happen in unsequenced
1613+ * communication, skip the retransmission check for those packets
1614+ * entirely.
1615+ */
1616+ if (frame->type == SSH_FRAME_TYPE_DATA_NSQ)
1617+ return false;
1618+
16031619 /*
16041620 * Check if SEQ has been seen recently (i.e. packet was
16051621 * re-transmitted and we should ignore it).
16061622 */
16071623 for (i = 0; i < ARRAY_SIZE(ptl->rx.blocked.seqs); i++) {
1608− if (likely(ptl->rx.blocked.seqs[i] != seq))
1624+ if (likely(ptl->rx.blocked.seqs[i] != frame->seq))
16091625 continue;
16101626
16111627 ptl_dbg(ptl, "ptl: ignoring repeated data packet\n");
@@ -1613,7 +1629,7 @@ static bool ssh_ptl_rx_retransmit_check(struct ssh_ptl *ptl, u8 seq) · 1 unmodified line
16131629 }
16141630
16151631 /* Update list of blocked sequence IDs. */
1616− ptl->rx.blocked.seqs[ptl->rx.blocked.offset] = seq;
1632+ ptl->rx.blocked.seqs[ptl->rx.blocked.offset] = frame->seq;
16171633 ptl->rx.blocked.offset = (ptl->rx.blocked.offset + 1)
16181634 % ARRAY_SIZE(ptl->rx.blocked.seqs);
16191635
@@ -1624,7 +1640,7 @@ static void ssh_ptl_rx_dataframe(struct ssh_ptl *ptl, · 4 unmodified lines
16241640 const struct ssh_frame *frame,
16251641 const struct ssam_span *payload)
16261642 {
1627− if (ssh_ptl_rx_retransmit_check(ptl, frame->seq))
1643+ if (ssh_ptl_rx_retransmit_check(ptl, frame))
16281644 return;
16291645
16301646 ptl->ops.data_received(ptl, payload);
drivers/platform/surface/surface_aggregator_registry.c+37−0
@@ -234,6 +234,19 @@ static const struct software_node *ssam_node_group_sl3[] = { · 233 unmodified lines
234234 NULL,
235235 };
236236
237+/* Devices for Surface Laptop 5. */
238+static const struct software_node *ssam_node_group_sl5[] = {
239+ &ssam_node_root,
240+ &ssam_node_bat_ac,
241+ &ssam_node_bat_main,
242+ &ssam_node_tmp_pprof,
243+ &ssam_node_hid_main_keyboard,
244+ &ssam_node_hid_main_touchpad,
245+ &ssam_node_hid_main_iid5,
246+ &ssam_node_hid_sam_ucm_ucsi,
247+ NULL,
248+};
249+
237250 /* Devices for Surface Laptop Studio. */
238251 static const struct software_node *ssam_node_group_sls[] = {
239252 &ssam_node_root,
@@ -268,6 +281,7 @@ static const struct software_node *ssam_node_group_sp7[] = { · 28 unmodified lines
268281 NULL,
269282 };
270283
284+/* Devices for Surface Pro 8 */
271285 static const struct software_node *ssam_node_group_sp8[] = {
272286 &ssam_node_root,
273287 &ssam_node_hub_kip,
@@ -284,6 +298,23 @@ static const struct software_node *ssam_node_group_sp8[] = { · 10 unmodified lines
284298 NULL,
285299 };
286300
301+/* Devices for Surface Pro 9 */
302+static const struct software_node *ssam_node_group_sp9[] = {
303+ &ssam_node_root,
304+ &ssam_node_hub_kip,
305+ &ssam_node_bat_ac,
306+ &ssam_node_bat_main,
307+ &ssam_node_tmp_pprof,
308+ /* TODO: Tablet mode switch (via POS subsystem) */
309+ &ssam_node_hid_kip_keyboard,
310+ &ssam_node_hid_kip_penstash,
311+ &ssam_node_hid_kip_touchpad,
312+ &ssam_node_hid_kip_fwupd,
313+ &ssam_node_hid_sam_sensors,
314+ &ssam_node_hid_sam_ucm_ucsi,
315+ NULL,
316+};
317+
287318
288319 /* -- SSAM platform/meta-hub driver. ---------------------------------------- */
289320
@@ -303,6 +334,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = { · 13 unmodified lines
303334 /* Surface Pro 8 */
304335 { "MSHW0263", (unsigned long)ssam_node_group_sp8 },
305336
337+ /* Surface Pro 9 */
338+ { "MSHW0343", (unsigned long)ssam_node_group_sp9 },
339+
306340 /* Surface Book 2 */
307341 { "MSHW0107", (unsigned long)ssam_node_group_gen5 },
308342
@@ -324,6 +358,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = { · 15 unmodified lines
324358 /* Surface Laptop 4 (13", Intel) */
325359 { "MSHW0250", (unsigned long)ssam_node_group_sl3 },
326360
361+ /* Surface Laptop 5 */
362+ { "MSHW0350", (unsigned long)ssam_node_group_sl5 },
363+
327364 /* Surface Laptop Go 1 */
328365 { "MSHW0118", (unsigned long)ssam_node_group_slg1 },
329366
drivers/platform/x86/acer-wmi.c+9−0
@@ -564,6 +564,15 @@ static const struct dmi_system_id acer_quirks[] __initconst = { · 563 unmodified lines
564564 },
565565 .driver_data = (void *)ACER_CAP_KBD_DOCK,
566566 },
567+ {
568+ .callback = set_force_caps,
569+ .ident = "Acer Aspire Switch V 10 SW5-017",
570+ .matches = {
571+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"),
572+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "SW5-017"),
573+ },
574+ .driver_data = (void *)ACER_CAP_KBD_DOCK,
575+ },
567576 {
568577 .callback = set_force_caps,
569578 .ident = "Acer One 10 (S1003)",
drivers/platform/x86/amd/pmc.c+1−2
@@ -276,7 +276,6 @@ static const struct file_operations amd_pmc_stb_debugfs_fops_v2 = { · 275 unmodified lines
276276 .release = amd_pmc_stb_debugfs_release_v2,
277277 };
278278
279−#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS)
280279 static int amd_pmc_setup_smu_logging(struct amd_pmc_dev *dev)
281280 {
282281 if (dev->cpu_id == AMD_CPU_ID_PCO) {
@@ -351,7 +350,6 @@ static int get_metrics_table(struct amd_pmc_dev *pdev, struct smu_metrics *table · 68 unmodified lines
351350 memcpy_fromio(table, pdev->smu_virt_addr, sizeof(struct smu_metrics));
352351 return 0;
353352 }
354−#endif /* CONFIG_SUSPEND || CONFIG_DEBUG_FS */
355353
356354 #ifdef CONFIG_SUSPEND
357355 static void amd_pmc_validate_deepest(struct amd_pmc_dev *pdev)
@@ -964,6 +962,7 @@ static const struct acpi_device_id amd_pmc_acpi_ids[] = { · 606 unmodified lines
964962 {"AMDI0006", 0},
965963 {"AMDI0007", 0},
966964 {"AMDI0008", 0},
965+ {"AMDI0009", 0},
967966 {"AMD0004", 0},
968967 {"AMD0005", 0},
969968 { }
drivers/platform/x86/asus-wmi.c+2−0
@@ -1738,6 +1738,8 @@ static void asus_wmi_set_xusb2pr(struct asus_wmi *asus) · 1737 unmodified lines
17381738 pci_write_config_dword(xhci_pdev, USB_INTEL_XUSB2PR,
17391739 cpu_to_le32(ports_available));
17401740
1741+ pci_dev_put(xhci_pdev);
1742+
17411743 pr_info("set USB_INTEL_XUSB2PR old: 0x%04x, new: 0x%04x\n",
17421744 orig_ports_available, ports_available);
17431745 }
drivers/platform/x86/hp-wmi.c+3−0
@@ -90,6 +90,7 @@ enum hp_wmi_event_ids { · 89 unmodified lines
9090 HPWMI_PEAKSHIFT_PERIOD = 0x0F,
9191 HPWMI_BATTERY_CHARGE_PERIOD = 0x10,
9292 HPWMI_SANITIZATION_MODE = 0x17,
93+ HPWMI_SMART_EXPERIENCE_APP = 0x21,
9394 };
9495
9596 /*
@@ -859,6 +860,8 @@ static void hp_wmi_notify(u32 value, void *context) · 763 unmodified lines
859860 break;
860861 case HPWMI_SANITIZATION_MODE:
861862 break;
863+ case HPWMI_SMART_EXPERIENCE_APP:
864+ break;
862865 default:
863866 pr_info("Unknown event_id - %d - 0x%x\n", event_id, event_data);
864867 break;
drivers/platform/x86/ideapad-laptop.c+35−2
@@ -136,6 +136,7 @@ struct ideapad_private { · 135 unmodified lines
136136 bool dytc : 1;
137137 bool fan_mode : 1;
138138 bool fn_lock : 1;
139+ bool set_fn_lock_led : 1;
139140 bool hw_rfkill_switch : 1;
140141 bool kbd_bl : 1;
141142 bool touchpad_ctrl_via_ec : 1;
@@ -154,7 +155,21 @@ MODULE_PARM_DESC(no_bt_rfkill, "No rfkill for bluetooth."); · 12 unmodified lines
154155
155156 static bool allow_v4_dytc;
156157 module_param(allow_v4_dytc, bool, 0444);
157−MODULE_PARM_DESC(allow_v4_dytc, "Enable DYTC version 4 platform-profile support.");
158+MODULE_PARM_DESC(allow_v4_dytc,
159+ "Enable DYTC version 4 platform-profile support. "
160+ "If you need this please report this to: platform-driver-x86@vger.kernel.org");
161+
162+static bool hw_rfkill_switch;
163+module_param(hw_rfkill_switch, bool, 0444);
164+MODULE_PARM_DESC(hw_rfkill_switch,
165+ "Enable rfkill support for laptops with a hw on/off wifi switch/slider. "
166+ "If you need this please report this to: platform-driver-x86@vger.kernel.org");
167+
168+static bool set_fn_lock_led;
169+module_param(set_fn_lock_led, bool, 0444);
170+MODULE_PARM_DESC(set_fn_lock_led,
171+ "Enable driver based updates of the fn-lock LED on fn-lock changes. "
172+ "If you need this please report this to: platform-driver-x86@vger.kernel.org");
158173
159174 /*
160175 * ACPI Helpers
@@ -1501,6 +1516,9 @@ static void ideapad_wmi_notify(u32 value, void *context) · 1340 unmodified lines
15011516 ideapad_input_report(priv, value);
15021517 break;
15031518 case 208:
1519+ if (!priv->features.set_fn_lock_led)
1520+ break;
1521+
15041522 if (!eval_hals(priv->adev->handle, &result)) {
15051523 bool state = test_bit(HALS_FNLOCK_STATE_BIT, &result);
15061524
@@ -1514,6 +1532,18 @@ static void ideapad_wmi_notify(u32 value, void *context) · 7 unmodified lines
15141532 }
15151533 #endif
15161534
1535+/* On some models we need to call exec_sals(SALS_FNLOCK_ON/OFF) to set the LED */
1536+static const struct dmi_system_id set_fn_lock_led_list[] = {
1537+ {
1538+ /* https://bugzilla.kernel.org/show_bug.cgi?id=212671 */
1539+ .matches = {
1540+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1541+ DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Legion R7000P2020H"),
1542+ }
1543+ },
1544+ {}
1545+};
1546+
15171547 /*
15181548 * Some ideapads have a hardware rfkill switch, but most do not have one.
15191549 * Reading VPCCMD_R_RF always results in 0 on models without a hardware rfkill,
@@ -1556,7 +1586,10 @@ static void ideapad_check_features(struct ideapad_private *priv) · 36 unmodified lines
15561586 acpi_handle handle = priv->adev->handle;
15571587 unsigned long val;
15581588
1559− priv->features.hw_rfkill_switch = dmi_check_system(hw_rfkill_list);
1589+ priv->features.set_fn_lock_led =
1590+ set_fn_lock_led || dmi_check_system(set_fn_lock_led_list);
1591+ priv->features.hw_rfkill_switch =
1592+ hw_rfkill_switch || dmi_check_system(hw_rfkill_list);
15601593
15611594 /* Most ideapads with ELAN0634 touchpad don't use EC touchpad switch */
15621595 if (acpi_dev_present("ELAN0634", NULL, -1))
drivers/platform/x86/intel/pmc/pltdrv.c+9−0
@@ -18,6 +18,8 @@ · 17 unmodified lines
1818 #include <asm/cpu_device_id.h>
1919 #include <asm/intel-family.h>
2020
21+#include <xen/xen.h>
22+
2123 static void intel_pmc_core_release(struct device *dev)
2224 {
2325 kfree(dev);
@@ -53,6 +55,13 @@ static int __init pmc_core_platform_init(void) · 29 unmodified lines
5355 if (acpi_dev_present("INT33A1", NULL, -1))
5456 return -ENODEV;
5557
58+ /*
59+ * Skip forcefully attaching the device for VMs. Make an exception for
60+ * Xen dom0, which does have full hardware access.
61+ */
62+ if (cpu_feature_enabled(X86_FEATURE_HYPERVISOR) && !xen_initial_domain())
63+ return -ENODEV;
64+
5665 if (!x86_match_cpu(intel_pmc_core_platform_ids))
5766 return -ENODEV;
5867
drivers/platform/x86/thinkpad_acpi.c+8−0
@@ -4497,6 +4497,14 @@ static const struct dmi_system_id fwbug_list[] __initconst = { · 4496 unmodified lines
44974497 DMI_MATCH(DMI_PRODUCT_NAME, "21A0"),
44984498 }
44994499 },
4500+ {
4501+ .ident = "P14s Gen2 AMD",
4502+ .driver_data = &quirk_s2idle_bug,
4503+ .matches = {
4504+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
4505+ DMI_MATCH(DMI_PRODUCT_NAME, "21A1"),
4506+ }
4507+ },
45004508 {}
45014509 };
45024510
drivers/s390/block/dcssblk.c+1−0
@@ -636,6 +636,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char · 635 unmodified lines
636636 dev_info->gd->minors = DCSSBLK_MINORS_PER_DISK;
637637 dev_info->gd->fops = &dcssblk_devops;
638638 dev_info->gd->private_data = dev_info;
639+ dev_info->gd->flags |= GENHD_FL_NO_PART;
639640 blk_queue_logical_block_size(dev_info->gd->queue, 4096);
640641 blk_queue_flag_set(QUEUE_FLAG_DAX, dev_info->gd->queue);
641642
drivers/s390/scsi/zfcp_fsf.c+1−1
@@ -884,7 +884,7 @@ static int zfcp_fsf_req_send(struct zfcp_fsf_req *req) · 883 unmodified lines
884884 const bool is_srb = zfcp_fsf_req_is_status_read_buffer(req);
885885 struct zfcp_adapter *adapter = req->adapter;
886886 struct zfcp_qdio *qdio = adapter->qdio;
887− int req_id = req->req_id;
887+ unsigned long req_id = req->req_id;
888888
889889 zfcp_reqlist_add(adapter->req_list, req);
890890
drivers/scsi/mpi3mr/mpi3mr_os.c+2−1
@@ -3265,7 +3265,8 @@ void mpi3mr_process_op_reply_desc(struct mpi3mr_ioc *mrioc, · 3264 unmodified lines
32653265 }
32663266
32673267 if (scmd->result != (DID_OK << 16) && (scmd->cmnd[0] != ATA_12) &&
3268− (scmd->cmnd[0] != ATA_16)) {
3268+ (scmd->cmnd[0] != ATA_16) &&
3269+ mrioc->logging_level & MPI3_DEBUG_SCSI_ERROR) {
32693270 ioc_info(mrioc, "%s :scmd->result 0x%x\n", __func__,
32703271 scmd->result);
32713272 scsi_print_command(scmd);
drivers/scsi/scsi_debug.c+5−1
@@ -7323,8 +7323,12 @@ static int sdebug_add_host_helper(int per_host_idx) · 7322 unmodified lines
73237323 dev_set_name(&sdbg_host->dev, "adapter%d", sdebug_num_hosts);
73247324
73257325 error = device_register(&sdbg_host->dev);
7326− if (error)
7326+ if (error) {
7327+ spin_lock(&sdebug_host_list_lock);
7328+ list_del(&sdbg_host->host_list);
7329+ spin_unlock(&sdebug_host_list_lock);
73277330 goto clean;
7331+ }
73287332
73297333 ++sdebug_num_hosts;
73307334 return 0;
drivers/scsi/scsi_transport_iscsi.c+16−15
@@ -231,7 +231,7 @@ iscsi_create_endpoint(int dd_size) · 230 unmodified lines
231231 dev_set_name(&ep->dev, "ep-%d", id);
232232 err = device_register(&ep->dev);
233233 if (err)
234− goto free_id;
234+ goto put_dev;
235235
236236 err = sysfs_create_group(&ep->dev.kobj, &iscsi_endpoint_group);
237237 if (err)
@@ -245,10 +245,12 @@ unregister_dev: · 7 unmodified lines
245245 device_unregister(&ep->dev);
246246 return NULL;
247247
248−free_id:
248+put_dev:
249249 mutex_lock(&iscsi_ep_idr_mutex);
250250 idr_remove(&iscsi_ep_idr, id);
251251 mutex_unlock(&iscsi_ep_idr_mutex);
252+ put_device(&ep->dev);
253+ return NULL;
252254 free_ep:
253255 kfree(ep);
254256 return NULL;
@@ -766,7 +768,7 @@ iscsi_create_iface(struct Scsi_Host *shost, struct iscsi_transport *transport, · 511 unmodified lines
766768
767769 err = device_register(&iface->dev);
768770 if (err)
769− goto free_iface;
771+ goto put_dev;
770772
771773 err = sysfs_create_group(&iface->dev.kobj, &iscsi_iface_group);
772774 if (err)
@@ -780,9 +782,8 @@ unreg_iface: · 7 unmodified lines
780782 device_unregister(&iface->dev);
781783 return NULL;
782784
783−free_iface:
784− put_device(iface->dev.parent);
785− kfree(iface);
785+put_dev:
786+ put_device(&iface->dev);
786787 return NULL;
787788 }
788789 EXPORT_SYMBOL_GPL(iscsi_create_iface);
@@ -1251,15 +1252,15 @@ iscsi_create_flashnode_sess(struct Scsi_Host *shost, int index, · 462 unmodified lines
12511252
12521253 err = device_register(&fnode_sess->dev);
12531254 if (err)
1254− goto free_fnode_sess;
1255+ goto put_dev;
12551256
12561257 if (dd_size)
12571258 fnode_sess->dd_data = &fnode_sess[1];
12581259
12591260 return fnode_sess;
12601261
1261−free_fnode_sess:
1262− kfree(fnode_sess);
1262+put_dev:
1263+ put_device(&fnode_sess->dev);
12631264 return NULL;
12641265 }
12651266 EXPORT_SYMBOL_GPL(iscsi_create_flashnode_sess);
@@ -1299,15 +1300,15 @@ iscsi_create_flashnode_conn(struct Scsi_Host *shost, · 33 unmodified lines
12991300
13001301 err = device_register(&fnode_conn->dev);
13011302 if (err)
1302− goto free_fnode_conn;
1303+ goto put_dev;
13031304
13041305 if (dd_size)
13051306 fnode_conn->dd_data = &fnode_conn[1];
13061307
13071308 return fnode_conn;
13081309
1309−free_fnode_conn:
1310− kfree(fnode_conn);
1310+put_dev:
1311+ put_device(&fnode_conn->dev);
13111312 return NULL;
13121313 }
13131314 EXPORT_SYMBOL_GPL(iscsi_create_flashnode_conn);
@@ -4815,7 +4816,7 @@ iscsi_register_transport(struct iscsi_transport *tt) · 3501 unmodified lines
48154816 dev_set_name(&priv->dev, "%s", tt->name);
48164817 err = device_register(&priv->dev);
48174818 if (err)
4818− goto free_priv;
4819+ goto put_dev;
48194820
48204821 err = sysfs_create_group(&priv->dev.kobj, &iscsi_transport_group);
48214822 if (err)
@@ -4850,8 +4851,8 @@ iscsi_register_transport(struct iscsi_transport *tt) · 28 unmodified lines
48504851 unregister_dev:
48514852 device_unregister(&priv->dev);
48524853 return NULL;
4853−free_priv:
4854− kfree(priv);
4854+put_dev:
4855+ put_device(&priv->dev);
48554856 return NULL;
48564857 }
48574858 EXPORT_SYMBOL_GPL(iscsi_register_transport);
drivers/siox/siox-core.c+2−0
@@ -839,6 +839,8 @@ static struct siox_device *siox_device_add(struct siox_master *smaster, · 838 unmodified lines
839839
840840 err_device_register:
841841 /* don't care to make the buffer smaller again */
842+ put_device(&sdevice->dev);
843+ sdevice = NULL;
842844
843845 err_buf_alloc:
844846 siox_master_unlock(smaster);
drivers/slimbus/Kconfig+1−1
@@ -23,7 +23,7 @@ config SLIM_QCOM_CTRL · 22 unmodified lines
2323 config SLIM_QCOM_NGD_CTRL
2424 tristate "Qualcomm SLIMbus Satellite Non-Generic Device Component"
2525 depends on HAS_IOMEM && DMA_ENGINE && NET
26− depends on QCOM_RPROC_COMMON || COMPILE_TEST
26+ depends on QCOM_RPROC_COMMON || (COMPILE_TEST && !QCOM_RPROC_COMMON)
2727 depends on ARCH_QCOM || COMPILE_TEST
2828 select QCOM_QMI_HELPERS
2929 select QCOM_PDR_HELPERS
drivers/slimbus/stream.c+4−4
@@ -67,10 +67,10 @@ static const int slim_presence_rate_table[] = { · 66 unmodified lines
6767 384000,
6868 768000,
6969 0, /* Reserved */
70− 110250,
71− 220500,
72− 441000,
73− 882000,
70+ 11025,
71+ 22050,
72+ 44100,
73+ 88200,
7474 176400,
7575 352800,
7676 705600,
drivers/soc/imx/soc-imx8m.c+11−0
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111 #include <linux/platform_device.h>
1212 #include <linux/arm-smccc.h>
1313 #include <linux/of.h>
14+#include <linux/clk.h>
1415
1516 #define REV_B1 0x21
1617
@@ -56,6 +57,7 @@ static u32 __init imx8mq_soc_revision(void) · 39 unmodified lines
5657 void __iomem *ocotp_base;
5758 u32 magic;
5859 u32 rev;
60+ struct clk *clk;
5961
6062 np = of_find_compatible_node(NULL, NULL, "fsl,imx8mq-ocotp");
6163 if (!np)
@@ -63,6 +65,13 @@ static u32 __init imx8mq_soc_revision(void) · 1 unmodified line
6365
6466 ocotp_base = of_iomap(np, 0);
6567 WARN_ON(!ocotp_base);
68+ clk = of_clk_get_by_name(np, NULL);
69+ if (!clk) {
70+ WARN_ON(!clk);
71+ return 0;
72+ }
73+
74+ clk_prepare_enable(clk);
6675
6776 /*
6877 * SOC revision on older imx8mq is not available in fuses so query
@@ -79,6 +88,8 @@ static u32 __init imx8mq_soc_revision(void) · 10 unmodified lines
7988 soc_uid <<= 32;
8089 soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW);
8190
91+ clk_disable_unprepare(clk);
92+ clk_put(clk);
8293 iounmap(ocotp_base);
8394 of_node_put(np);
8495
drivers/staging/rtl8192e/rtllib_softmac_wx.c+1−8
@@ -439,7 +439,7 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee, · 438 unmodified lines
439439 union iwreq_data *wrqu, char *extra)
440440 {
441441
442− int ret = 0, len, i;
442+ int ret = 0, len;
443443 short proto_started;
444444 unsigned long flags;
445445
@@ -455,13 +455,6 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee, · 9 unmodified lines
455455 goto out;
456456 }
457457
458− for (i = 0; i < len; i++) {
459− if (extra[i] < 0) {
460− ret = -1;
461− goto out;
462− }
463− }
464−
465458 if (proto_started)
466459 rtllib_stop_protocol(ieee, true);
467460
drivers/target/loopback/tcm_loop.c+2−1
@@ -397,6 +397,7 @@ static int tcm_loop_setup_hba_bus(struct tcm_loop_hba *tl_hba, int tcm_loop_host · 396 unmodified lines
397397 ret = device_register(&tl_hba->dev);
398398 if (ret) {
399399 pr_err("device_register() failed for tl_hba->dev: %d\n", ret);
400+ put_device(&tl_hba->dev);
400401 return -ENODEV;
401402 }
402403
@@ -1073,7 +1074,7 @@ check_len: · 670 unmodified lines
10731074 */
10741075 ret = tcm_loop_setup_hba_bus(tl_hba, tcm_loop_hba_no_cnt);
10751076 if (ret)
1076− goto out;
1077+ return ERR_PTR(ret);
10771078
10781079 sh = tl_hba->sh;
10791080 tcm_loop_hba_no_cnt++;
drivers/tty/n_gsm.c+38−33
@@ -264,7 +264,7 @@ struct gsm_mux { · 263 unmodified lines
264264 bool constipated; /* Asked by remote to shut up */
265265 bool has_devices; /* Devices were registered */
266266
267− struct mutex tx_mutex;
267+ spinlock_t tx_lock;
268268 unsigned int tx_bytes; /* TX data outstanding */
269269 #define TX_THRESH_HI 8192
270270 #define TX_THRESH_LO 2048
@@ -272,7 +272,7 @@ struct gsm_mux { · 1 unmodified line
272272 struct list_head tx_data_list; /* Pending data packets */
273273
274274 /* Control messages */
275− struct delayed_work kick_timeout; /* Kick TX queuing on timeout */
275+ struct timer_list kick_timer; /* Kick TX queuing on timeout */
276276 struct timer_list t2_timer; /* Retransmit timer for commands */
277277 int cretries; /* Command retry counter */
278278 struct gsm_control *pending_cmd;/* Our current pending command */
@@ -700,6 +700,7 @@ static int gsm_send(struct gsm_mux *gsm, int addr, int cr, int control) · 421 unmodified lines
700700 struct gsm_msg *msg;
701701 u8 *dp;
702702 int ocr;
703+ unsigned long flags;
703704
704705 msg = gsm_data_alloc(gsm, addr, 0, control);
705706 if (!msg)
@@ -721,10 +722,10 @@ static int gsm_send(struct gsm_mux *gsm, int addr, int cr, int control) · 15 unmodified lines
721722
722723 gsm_print_packet("Q->", addr, cr, control, NULL, 0);
723724
724− mutex_lock(&gsm->tx_mutex);
725+ spin_lock_irqsave(&gsm->tx_lock, flags);
725726 list_add_tail(&msg->list, &gsm->tx_ctrl_list);
726727 gsm->tx_bytes += msg->len;
727− mutex_unlock(&gsm->tx_mutex);
728+ spin_unlock_irqrestore(&gsm->tx_lock, flags);
728729 gsmld_write_trigger(gsm);
729730
730731 return 0;
@@ -749,7 +750,7 @@ static void gsm_dlci_clear_queues(struct gsm_mux *gsm, struct gsm_dlci *dlci) · 18 unmodified lines
749750 spin_unlock_irqrestore(&dlci->lock, flags);
750751
751752 /* Clear data packets in MUX write queue */
752− mutex_lock(&gsm->tx_mutex);
753+ spin_lock_irqsave(&gsm->tx_lock, flags);
753754 list_for_each_entry_safe(msg, nmsg, &gsm->tx_data_list, list) {
754755 if (msg->addr != addr)
755756 continue;
@@ -757,7 +758,7 @@ static void gsm_dlci_clear_queues(struct gsm_mux *gsm, struct gsm_dlci *dlci) · 1 unmodified line
757758 list_del(&msg->list);
758759 kfree(msg);
759760 }
760− mutex_unlock(&gsm->tx_mutex);
761+ spin_unlock_irqrestore(&gsm->tx_lock, flags);
761762 }
762763
763764 /**
@@ -1028,7 +1029,7 @@ static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg) · 264 unmodified lines
10281029 gsm->tx_bytes += msg->len;
10291030
10301031 gsmld_write_trigger(gsm);
1031− schedule_delayed_work(&gsm->kick_timeout, 10 * gsm->t1 * HZ / 100);
1032+ mod_timer(&gsm->kick_timer, jiffies + 10 * gsm->t1 * HZ / 100);
10321033 }
10331034
10341035 /**
@@ -1043,9 +1044,10 @@ static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg) · 8 unmodified lines
10431044
10441045 static void gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
10451046 {
1046− mutex_lock(&dlci->gsm->tx_mutex);
1047+ unsigned long flags;
1048+ spin_lock_irqsave(&dlci->gsm->tx_lock, flags);
10471049 __gsm_data_queue(dlci, msg);
1048− mutex_unlock(&dlci->gsm->tx_mutex);
1050+ spin_unlock_irqrestore(&dlci->gsm->tx_lock, flags);
10491051 }
10501052
10511053 /**
@@ -1057,7 +1059,7 @@ static void gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg) · 5 unmodified lines
10571059 * is data. Keep to the MRU of the mux. This path handles the usual tty
10581060 * interface which is a byte stream with optional modem data.
10591061 *
1060− * Caller must hold the tx_mutex of the mux.
1062+ * Caller must hold the tx_lock of the mux.
10611063 */
10621064
10631065 static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
@@ -1117,7 +1119,7 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci) · 53 unmodified lines
11171119 * is data. Keep to the MRU of the mux. This path handles framed data
11181120 * queued as skbuffs to the DLCI.
11191121 *
1120− * Caller must hold the tx_mutex of the mux.
1122+ * Caller must hold the tx_lock of the mux.
11211123 */
11221124
11231125 static int gsm_dlci_data_output_framed(struct gsm_mux *gsm,
@@ -1133,7 +1135,7 @@ static int gsm_dlci_data_output_framed(struct gsm_mux *gsm, · 9 unmodified lines
11331135 if (dlci->adaption == 4)
11341136 overhead = 1;
11351137
1136− /* dlci->skb is locked by tx_mutex */
1138+ /* dlci->skb is locked by tx_lock */
11371139 if (dlci->skb == NULL) {
11381140 dlci->skb = skb_dequeue_tail(&dlci->skb_list);
11391141 if (dlci->skb == NULL)
@@ -1187,7 +1189,7 @@ static int gsm_dlci_data_output_framed(struct gsm_mux *gsm, · 47 unmodified lines
11871189 * Push an empty frame in to the transmit queue to update the modem status
11881190 * bits and to transmit an optional break.
11891191 *
1190− * Caller must hold the tx_mutex of the mux.
1192+ * Caller must hold the tx_lock of the mux.
11911193 */
11921194
11931195 static int gsm_dlci_modem_output(struct gsm_mux *gsm, struct gsm_dlci *dlci,
@@ -1301,12 +1303,13 @@ static int gsm_dlci_data_sweep(struct gsm_mux *gsm) · 107 unmodified lines
13011303
13021304 static void gsm_dlci_data_kick(struct gsm_dlci *dlci)
13031305 {
1306+ unsigned long flags;
13041307 int sweep;
13051308
13061309 if (dlci->constipated)
13071310 return;
13081311
1309− mutex_lock(&dlci->gsm->tx_mutex);
1312+ spin_lock_irqsave(&dlci->gsm->tx_lock, flags);
13101313 /* If we have nothing running then we need to fire up */
13111314 sweep = (dlci->gsm->tx_bytes < TX_THRESH_LO);
13121315 if (dlci->gsm->tx_bytes == 0) {
@@ -1317,7 +1320,7 @@ static void gsm_dlci_data_kick(struct gsm_dlci *dlci) · 4 unmodified lines
13171320 }
13181321 if (sweep)
13191322 gsm_dlci_data_sweep(dlci->gsm);
1320− mutex_unlock(&dlci->gsm->tx_mutex);
1323+ spin_unlock_irqrestore(&dlci->gsm->tx_lock, flags);
13211324 }
13221325
13231326 /*
@@ -1708,7 +1711,7 @@ static struct gsm_control *gsm_control_send(struct gsm_mux *gsm, · 384 unmodified lines
17081711 unsigned int command, u8 *data, int clen)
17091712 {
17101713 struct gsm_control *ctrl = kzalloc(sizeof(struct gsm_control),
1711− GFP_KERNEL);
1714+ GFP_ATOMIC);
17121715 unsigned long flags;
17131716 if (ctrl == NULL)
17141717 return NULL;
@@ -2019,23 +2022,24 @@ static void gsm_dlci_command(struct gsm_dlci *dlci, const u8 *data, int len) · 304 unmodified lines
20192022 }
20202023
20212024 /**
2022− * gsm_kick_timeout - transmit if possible
2023− * @work: work contained in our gsm object
2025+ * gsm_kick_timer - transmit if possible
2026+ * @t: timer contained in our gsm object
20242027 *
20252028 * Transmit data from DLCIs if the queue is empty. We can't rely on
20262029 * a tty wakeup except when we filled the pipe so we need to fire off
20272030 * new data ourselves in other cases.
20282031 */
2029−static void gsm_kick_timeout(struct work_struct *work)
2032+static void gsm_kick_timer(struct timer_list *t)
20302033 {
2031− struct gsm_mux *gsm = container_of(work, struct gsm_mux, kick_timeout.work);
2034+ struct gsm_mux *gsm = from_timer(gsm, t, kick_timer);
2035+ unsigned long flags;
20322036 int sent = 0;
20332037
2034− mutex_lock(&gsm->tx_mutex);
2038+ spin_lock_irqsave(&gsm->tx_lock, flags);
20352039 /* If we have nothing running then we need to fire up */
20362040 if (gsm->tx_bytes < TX_THRESH_LO)
20372041 sent = gsm_dlci_data_sweep(gsm);
2038− mutex_unlock(&gsm->tx_mutex);
2042+ spin_unlock_irqrestore(&gsm->tx_lock, flags);
20392043
20402044 if (sent && debug & DBG_DATA)
20412045 pr_info("%s TX queue stalled\n", __func__);
@@ -2492,7 +2496,7 @@ static void gsm_cleanup_mux(struct gsm_mux *gsm, bool disc) · 450 unmodified lines
24922496 }
24932497
24942498 /* Finish outstanding timers, making sure they are done */
2495− cancel_delayed_work_sync(&gsm->kick_timeout);
2499+ del_timer_sync(&gsm->kick_timer);
24962500 del_timer_sync(&gsm->t2_timer);
24972501
24982502 /* Finish writing to ldisc */
@@ -2565,7 +2569,6 @@ static void gsm_free_mux(struct gsm_mux *gsm) · 66 unmodified lines
25652569 break;
25662570 }
25672571 }
2568− mutex_destroy(&gsm->tx_mutex);
25692572 mutex_destroy(&gsm->mutex);
25702573 kfree(gsm->txframe);
25712574 kfree(gsm->buf);
@@ -2637,15 +2640,15 @@ static struct gsm_mux *gsm_alloc_mux(void) · 65 unmodified lines
26372640 }
26382641 spin_lock_init(&gsm->lock);
26392642 mutex_init(&gsm->mutex);
2640− mutex_init(&gsm->tx_mutex);
26412643 kref_init(&gsm->ref);
26422644 INIT_LIST_HEAD(&gsm->tx_ctrl_list);
26432645 INIT_LIST_HEAD(&gsm->tx_data_list);
2644− INIT_DELAYED_WORK(&gsm->kick_timeout, gsm_kick_timeout);
2646+ timer_setup(&gsm->kick_timer, gsm_kick_timer, 0);
26452647 timer_setup(&gsm->t2_timer, gsm_control_retransmit, 0);
26462648 INIT_WORK(&gsm->tx_work, gsmld_write_task);
26472649 init_waitqueue_head(&gsm->event);
26482650 spin_lock_init(&gsm->control_lock);
2651+ spin_lock_init(&gsm->tx_lock);
26492652
26502653 gsm->t1 = T1;
26512654 gsm->t2 = T2;
@@ -2670,7 +2673,6 @@ static struct gsm_mux *gsm_alloc_mux(void) · 18 unmodified lines
26702673 }
26712674 spin_unlock(&gsm_mux_lock);
26722675 if (i == MAX_MUX) {
2673− mutex_destroy(&gsm->tx_mutex);
26742676 mutex_destroy(&gsm->mutex);
26752677 kfree(gsm->txframe);
26762678 kfree(gsm->buf);
@@ -2826,16 +2828,17 @@ static void gsmld_write_trigger(struct gsm_mux *gsm) · 149 unmodified lines
28262828 static void gsmld_write_task(struct work_struct *work)
28272829 {
28282830 struct gsm_mux *gsm = container_of(work, struct gsm_mux, tx_work);
2831+ unsigned long flags;
28292832 int i, ret;
28302833
28312834 /* All outstanding control channel and control messages and one data
28322835 * frame is sent.
28332836 */
28342837 ret = -ENODEV;
2835− mutex_lock(&gsm->tx_mutex);
2838+ spin_lock_irqsave(&gsm->tx_lock, flags);
28362839 if (gsm->tty)
28372840 ret = gsm_data_kick(gsm);
2838− mutex_unlock(&gsm->tx_mutex);
2841+ spin_unlock_irqrestore(&gsm->tx_lock, flags);
28392842
28402843 if (ret >= 0)
28412844 for (i = 0; i < NUM_DLCI; i++)
@@ -3042,6 +3045,7 @@ static ssize_t gsmld_write(struct tty_struct *tty, struct file *file, · 200 unmodified lines
30423045 const unsigned char *buf, size_t nr)
30433046 {
30443047 struct gsm_mux *gsm = tty->disc_data;
3048+ unsigned long flags;
30453049 int space;
30463050 int ret;
30473051
@@ -3049,13 +3053,13 @@ static ssize_t gsmld_write(struct tty_struct *tty, struct file *file, · 1 unmodified line
30493053 return -ENODEV;
30503054
30513055 ret = -ENOBUFS;
3052− mutex_lock(&gsm->tx_mutex);
3056+ spin_lock_irqsave(&gsm->tx_lock, flags);
30533057 space = tty_write_room(tty);
30543058 if (space >= nr)
30553059 ret = tty->ops->write(tty, buf, nr);
30563060 else
30573061 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
3058− mutex_unlock(&gsm->tx_mutex);
3062+ spin_unlock_irqrestore(&gsm->tx_lock, flags);
30593063
30603064 return ret;
30613065 }
@@ -3352,13 +3356,14 @@ static struct tty_ldisc_ops tty_ldisc_packet = { · 290 unmodified lines
33523356 static void gsm_modem_upd_via_data(struct gsm_dlci *dlci, u8 brk)
33533357 {
33543358 struct gsm_mux *gsm = dlci->gsm;
3359+ unsigned long flags;
33553360
33563361 if (dlci->state != DLCI_OPEN || dlci->adaption != 2)
33573362 return;
33583363
3359− mutex_lock(&gsm->tx_mutex);
3364+ spin_lock_irqsave(&gsm->tx_lock, flags);
33603365 gsm_dlci_modem_output(gsm, dlci, brk);
3361− mutex_unlock(&gsm->tx_mutex);
3366+ spin_unlock_irqrestore(&gsm->tx_lock, flags);
33623367 }
33633368
33643369 /**
drivers/tty/serial/8250/8250_lpss.c+13−4
@@ -174,6 +174,8 @@ static int ehl_serial_setup(struct lpss8250 *lpss, struct uart_port *port) · 173 unmodified lines
174174 */
175175 up->dma = dma;
176176
177+ lpss->dma_maxburst = 16;
178+
177179 port->set_termios = dw8250_do_set_termios;
178180
179181 return 0;
@@ -277,8 +279,13 @@ static int lpss8250_dma_setup(struct lpss8250 *lpss, struct uart_8250_port *port · 97 unmodified lines
277279 struct dw_dma_slave *rx_param, *tx_param;
278280 struct device *dev = port->port.dev;
279281
280− if (!lpss->dma_param.dma_dev)
282+ if (!lpss->dma_param.dma_dev) {
283+ dma = port->dma;
284+ if (dma)
285+ goto out_configuration_only;
286+
281287 return 0;
288+ }
282289
283290 rx_param = devm_kzalloc(dev, sizeof(*rx_param), GFP_KERNEL);
284291 if (!rx_param)
@@ -289,16 +296,18 @@ static int lpss8250_dma_setup(struct lpss8250 *lpss, struct uart_8250_port *port · 4 unmodified lines
289296 return -ENOMEM;
290297
291298 *rx_param = lpss->dma_param;
292− dma->rxconf.src_maxburst = lpss->dma_maxburst;
293−
294299 *tx_param = lpss->dma_param;
295− dma->txconf.dst_maxburst = lpss->dma_maxburst;
296300
297301 dma->fn = lpss8250_dma_filter;
298302 dma->rx_param = rx_param;
299303 dma->tx_param = tx_param;
300304
301305 port->dma = dma;
306+
307+out_configuration_only:
308+ dma->rxconf.src_maxburst = lpss->dma_maxburst;
309+ dma->txconf.dst_maxburst = lpss->dma_maxburst;
310+
302311 return 0;
303312 }
304313
drivers/tty/serial/8250/8250_omap.c+30−22
@@ -157,7 +157,11 @@ static u32 uart_read(struct uart_8250_port *up, u32 reg) · 156 unmodified lines
157157 return readl(up->port.membase + (reg << up->port.regshift));
158158 }
159159
160−static void omap8250_set_mctrl(struct uart_port *port, unsigned int mctrl)
160+/*
161+ * Called on runtime PM resume path from omap8250_restore_regs(), and
162+ * omap8250_set_mctrl().
163+ */
164+static void __omap8250_set_mctrl(struct uart_port *port, unsigned int mctrl)
161165 {
162166 struct uart_8250_port *up = up_to_u8250p(port);
163167 struct omap8250_priv *priv = up->port.private_data;
@@ -181,6 +185,20 @@ static void omap8250_set_mctrl(struct uart_port *port, unsigned int mctrl) · 17 unmodified lines
181185 }
182186 }
183187
188+static void omap8250_set_mctrl(struct uart_port *port, unsigned int mctrl)
189+{
190+ int err;
191+
192+ err = pm_runtime_resume_and_get(port->dev);
193+ if (err)
194+ return;
195+
196+ __omap8250_set_mctrl(port, mctrl);
197+
198+ pm_runtime_mark_last_busy(port->dev);
199+ pm_runtime_put_autosuspend(port->dev);
200+}
201+
184202 /*
185203 * Work Around for Errata i202 (2430, 3430, 3630, 4430 and 4460)
186204 * The access to uart register after MDR1 Access
@@ -193,27 +211,10 @@ static void omap8250_set_mctrl(struct uart_port *port, unsigned int mctrl) · 6 unmodified lines
193211 static void omap_8250_mdr1_errataset(struct uart_8250_port *up,
194212 struct omap8250_priv *priv)
195213 {
196− u8 timeout = 255;
197−
198214 serial_out(up, UART_OMAP_MDR1, priv->mdr1);
199215 udelay(2);
200216 serial_out(up, UART_FCR, up->fcr | UART_FCR_CLEAR_XMIT |
201217 UART_FCR_CLEAR_RCVR);
202− /*
203− * Wait for FIFO to empty: when empty, RX_FIFO_E bit is 0 and
204− * TX_FIFO_E bit is 1.
205− */
206− while (UART_LSR_THRE != (serial_in(up, UART_LSR) &
207− (UART_LSR_THRE | UART_LSR_DR))) {
208− timeout--;
209− if (!timeout) {
210− /* Should *never* happen. we warn and carry on */
211− dev_crit(up->port.dev, "Errata i202: timedout %x\n",
212− serial_in(up, UART_LSR));
213− break;
214− }
215− udelay(1);
216− }
217218 }
218219
219220 static void omap_8250_get_divisor(struct uart_port *port, unsigned int baud,
@@ -292,6 +293,7 @@ static void omap8250_restore_regs(struct uart_8250_port *up) · 72 unmodified lines
292293 {
293294 struct omap8250_priv *priv = up->port.private_data;
294295 struct uart_8250_dma *dma = up->dma;
296+ u8 mcr = serial8250_in_MCR(up);
295297
296298 if (dma && dma->tx_running) {
297299 /*
@@ -308,7 +310,7 @@ static void omap8250_restore_regs(struct uart_8250_port *up) · 10 unmodified lines
308310 serial_out(up, UART_EFR, UART_EFR_ECB);
309311
310312 serial_out(up, UART_LCR, UART_LCR_CONF_MODE_A);
311− serial8250_out_MCR(up, UART_MCR_TCRTLR);
313+ serial8250_out_MCR(up, mcr | UART_MCR_TCRTLR);
312314 serial_out(up, UART_FCR, up->fcr);
313315
314316 omap8250_update_scr(up, priv);
@@ -324,7 +326,8 @@ static void omap8250_restore_regs(struct uart_8250_port *up) · 9 unmodified lines
324326 serial_out(up, UART_LCR, 0);
325327
326328 /* drop TCR + TLR access, we setup XON/XOFF later */
327− serial8250_out_MCR(up, up->mcr);
329+ serial8250_out_MCR(up, mcr);
330+
328331 serial_out(up, UART_IER, up->ier);
329332
330333 serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
@@ -341,7 +344,7 @@ static void omap8250_restore_regs(struct uart_8250_port *up) · 10 unmodified lines
341344
342345 omap8250_update_mdr1(up, priv);
343346
344− up->port.ops->set_mctrl(&up->port, up->port.mctrl);
347+ __omap8250_set_mctrl(&up->port, up->port.mctrl);
345348
346349 if (up->port.rs485.flags & SER_RS485_ENABLED)
347350 serial8250_em485_stop_tx(up);
@@ -669,7 +672,6 @@ static int omap_8250_startup(struct uart_port *port) · 321 unmodified lines
669672
670673 pm_runtime_get_sync(port->dev);
671674
672− up->mcr = 0;
673675 serial_out(up, UART_FCR, UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT);
674676
675677 serial_out(up, UART_LCR, UART_LCR_WLEN8);
@@ -1458,9 +1460,15 @@ err: · 782 unmodified lines
14581460 static int omap8250_remove(struct platform_device *pdev)
14591461 {
14601462 struct omap8250_priv *priv = platform_get_drvdata(pdev);
1463+ int err;
1464+
1465+ err = pm_runtime_resume_and_get(&pdev->dev);
1466+ if (err)
1467+ return err;
14611468
14621469 pm_runtime_dont_use_autosuspend(&pdev->dev);
14631470 pm_runtime_put_sync(&pdev->dev);
1471+ flush_work(&priv->qos_work);
14641472 pm_runtime_disable(&pdev->dev);
14651473 serial8250_unregister_port(priv->line);
14661474 cpu_latency_qos_remove_request(&priv->pm_qos_request);
drivers/tty/serial/8250/8250_port.c+5−2
@@ -1897,10 +1897,13 @@ EXPORT_SYMBOL_GPL(serial8250_modem_status); · 1896 unmodified lines
18971897 static bool handle_rx_dma(struct uart_8250_port *up, unsigned int iir)
18981898 {
18991899 switch (iir & 0x3f) {
1900− case UART_IIR_RX_TIMEOUT:
1901− serial8250_rx_dma_flush(up);
1900+ case UART_IIR_RDI:
1901+ if (!up->dma->rx_running)
1902+ break;
19021903 fallthrough;
19031904 case UART_IIR_RLSI:
1905+ case UART_IIR_RX_TIMEOUT:
1906+ serial8250_rx_dma_flush(up);
19041907 return true;
19051908 }
19061909 return up->dma->rx_dma(up);
drivers/tty/serial/fsl_lpuart.c+49−27
@@ -12,6 +12,7 @@ · 11 unmodified lines
1212 #include <linux/dmaengine.h>
1313 #include <linux/dmapool.h>
1414 #include <linux/io.h>
15+#include <linux/iopoll.h>
1516 #include <linux/irq.h>
1617 #include <linux/module.h>
1718 #include <linux/of.h>
@@ -404,33 +405,6 @@ static unsigned int lpuart_get_baud_clk_rate(struct lpuart_port *sport) · 386 unmodified lines
404405 #define lpuart_enable_clks(x) __lpuart_enable_clks(x, true)
405406 #define lpuart_disable_clks(x) __lpuart_enable_clks(x, false)
406407
407−static int lpuart_global_reset(struct lpuart_port *sport)
408−{
409− struct uart_port *port = &sport->port;
410− void __iomem *global_addr;
411− int ret;
412−
413− if (uart_console(port))
414− return 0;
415−
416− ret = clk_prepare_enable(sport->ipg_clk);
417− if (ret) {
418− dev_err(sport->port.dev, "failed to enable uart ipg clk: %d\n", ret);
419− return ret;
420− }
421−
422− if (is_imx7ulp_lpuart(sport) || is_imx8qxp_lpuart(sport)) {
423− global_addr = port->membase + UART_GLOBAL - IMX_REG_OFF;
424− writel(UART_GLOBAL_RST, global_addr);
425− usleep_range(GLOBAL_RST_MIN_US, GLOBAL_RST_MAX_US);
426− writel(0, global_addr);
427− usleep_range(GLOBAL_RST_MIN_US, GLOBAL_RST_MAX_US);
428− }
429−
430− clk_disable_unprepare(sport->ipg_clk);
431− return 0;
432−}
433−
434408 static void lpuart_stop_tx(struct uart_port *port)
435409 {
436410 unsigned char temp;
@@ -2636,6 +2610,54 @@ static const struct serial_rs485 lpuart_rs485_supported = { · 2199 unmodified lines
26362610 /* delay_rts_* and RX_DURING_TX are not supported */
26372611 };
26382612
2613+static int lpuart_global_reset(struct lpuart_port *sport)
2614+{
2615+ struct uart_port *port = &sport->port;
2616+ void __iomem *global_addr;
2617+ unsigned long ctrl, bd;
2618+ unsigned int val = 0;
2619+ int ret;
2620+
2621+ ret = clk_prepare_enable(sport->ipg_clk);
2622+ if (ret) {
2623+ dev_err(sport->port.dev, "failed to enable uart ipg clk: %d\n", ret);
2624+ return ret;
2625+ }
2626+
2627+ if (is_imx7ulp_lpuart(sport) || is_imx8qxp_lpuart(sport)) {
2628+ /*
2629+ * If the transmitter is used by earlycon, wait for transmit engine to
2630+ * complete and then reset.
2631+ */
2632+ ctrl = lpuart32_read(port, UARTCTRL);
2633+ if (ctrl & UARTCTRL_TE) {
2634+ bd = lpuart32_read(&sport->port, UARTBAUD);
2635+ if (read_poll_timeout(lpuart32_tx_empty, val, val, 1, 100000, false,
2636+ port)) {
2637+ dev_warn(sport->port.dev,
2638+ "timeout waiting for transmit engine to complete\n");
2639+ clk_disable_unprepare(sport->ipg_clk);
2640+ return 0;
2641+ }
2642+ }
2643+
2644+ global_addr = port->membase + UART_GLOBAL - IMX_REG_OFF;
2645+ writel(UART_GLOBAL_RST, global_addr);
2646+ usleep_range(GLOBAL_RST_MIN_US, GLOBAL_RST_MAX_US);
2647+ writel(0, global_addr);
2648+ usleep_range(GLOBAL_RST_MIN_US, GLOBAL_RST_MAX_US);
2649+
2650+ /* Recover the transmitter for earlycon. */
2651+ if (ctrl & UARTCTRL_TE) {
2652+ lpuart32_write(port, bd, UARTBAUD);
2653+ lpuart32_write(port, ctrl, UARTCTRL);
2654+ }
2655+ }
2656+
2657+ clk_disable_unprepare(sport->ipg_clk);
2658+ return 0;
2659+}
2660+
26392661 static int lpuart_probe(struct platform_device *pdev)
26402662 {
26412663 const struct lpuart_soc_data *sdata = of_device_get_match_data(&pdev->dev);
drivers/tty/serial/imx.c+1−0
@@ -2594,6 +2594,7 @@ static const struct dev_pm_ops imx_uart_pm_ops = { · 2593 unmodified lines
25942594 .suspend_noirq = imx_uart_suspend_noirq,
25952595 .resume_noirq = imx_uart_resume_noirq,
25962596 .freeze_noirq = imx_uart_suspend_noirq,
2597+ .thaw_noirq = imx_uart_resume_noirq,
25972598 .restore_noirq = imx_uart_resume_noirq,
25982599 .suspend = imx_uart_suspend,
25992600 .resume = imx_uart_resume,
drivers/usb/cdns3/host.c+28−28
@@ -24,11 +24,37 @@ · 23 unmodified lines
2424 #define CFG_RXDET_P3_EN BIT(15)
2525 #define LPM_2_STB_SWITCH_EN BIT(25)
2626
27−static int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd);
27+static void xhci_cdns3_plat_start(struct usb_hcd *hcd)
28+{
29+ struct xhci_hcd *xhci = hcd_to_xhci(hcd);
30+ u32 value;
31+
32+ /* set usbcmd.EU3S */
33+ value = readl(&xhci->op_regs->command);
34+ value |= CMD_PM_INDEX;
35+ writel(value, &xhci->op_regs->command);
36+
37+ if (hcd->regs) {
38+ value = readl(hcd->regs + XECP_AUX_CTRL_REG1);
39+ value |= CFG_RXDET_P3_EN;
40+ writel(value, hcd->regs + XECP_AUX_CTRL_REG1);
41+
42+ value = readl(hcd->regs + XECP_PORT_CAP_REG);
43+ value |= LPM_2_STB_SWITCH_EN;
44+ writel(value, hcd->regs + XECP_PORT_CAP_REG);
45+ }
46+}
47+
48+static int xhci_cdns3_resume_quirk(struct usb_hcd *hcd)
49+{
50+ xhci_cdns3_plat_start(hcd);
51+ return 0;
52+}
2853
2954 static const struct xhci_plat_priv xhci_plat_cdns3_xhci = {
3055 .quirks = XHCI_SKIP_PHY_INIT | XHCI_AVOID_BEI,
31− .suspend_quirk = xhci_cdns3_suspend_quirk,
56+ .plat_start = xhci_cdns3_plat_start,
57+ .resume_quirk = xhci_cdns3_resume_quirk,
3258 };
3359
3460 static int __cdns_host_init(struct cdns *cdns)
@@ -90,32 +116,6 @@ err1: · 55 unmodified lines
90116 return ret;
91117 }
92118
93−static int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
94−{
95− struct xhci_hcd *xhci = hcd_to_xhci(hcd);
96− u32 value;
97−
98− if (pm_runtime_status_suspended(hcd->self.controller))
99− return 0;
100−
101− /* set usbcmd.EU3S */
102− value = readl(&xhci->op_regs->command);
103− value |= CMD_PM_INDEX;
104− writel(value, &xhci->op_regs->command);
105−
106− if (hcd->regs) {
107− value = readl(hcd->regs + XECP_AUX_CTRL_REG1);
108− value |= CFG_RXDET_P3_EN;
109− writel(value, hcd->regs + XECP_AUX_CTRL_REG1);
110−
111− value = readl(hcd->regs + XECP_PORT_CAP_REG);
112− value |= LPM_2_STB_SWITCH_EN;
113− writel(value, hcd->regs + XECP_PORT_CAP_REG);
114− }
115−
116− return 0;
117−}
118−
119119 static void cdns_host_exit(struct cdns *cdns)
120120 {
121121 kfree(cdns->xhci_plat_data);
drivers/usb/chipidea/otg_fsm.c+2−0
@@ -256,8 +256,10 @@ static void ci_otg_del_timer(struct ci_hdrc *ci, enum otg_fsm_timer t) · 255 unmodified lines
256256 ci->enabled_otg_timer_bits &= ~(1 << t);
257257 if (ci->next_otg_timer == t) {
258258 if (ci->enabled_otg_timer_bits == 0) {
259+ spin_unlock_irqrestore(&ci->lock, flags);
259260 /* No enabled timers after delete it */
260261 hrtimer_cancel(&ci->otg_fsm_hrtimer);
262+ spin_lock_irqsave(&ci->lock, flags);
261263 ci->next_otg_timer = NUM_OTG_FSM_TIMERS;
262264 } else {
263265 /* Find the next timer */
drivers/usb/core/quirks.c+3−0
@@ -362,6 +362,9 @@ static const struct usb_device_id usb_quirk_list[] = { · 361 unmodified lines
362362 { USB_DEVICE(0x0781, 0x5583), .driver_info = USB_QUIRK_NO_LPM },
363363 { USB_DEVICE(0x0781, 0x5591), .driver_info = USB_QUIRK_NO_LPM },
364364
365+ /* Realforce 87U Keyboard */
366+ { USB_DEVICE(0x0853, 0x011b), .driver_info = USB_QUIRK_NO_LPM },
367+
365368 /* M-Systems Flash Disk Pioneers */
366369 { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
367370
drivers/usb/dwc3/core.c+10−0
@@ -1710,6 +1710,16 @@ static struct extcon_dev *dwc3_get_extcon(struct dwc3 *dwc) · 1709 unmodified lines
17101710 if (device_property_read_string(dev, "linux,extcon-name", &name) == 0)
17111711 return extcon_get_extcon_dev(name);
17121712
1713+ /*
1714+ * Check explicitly if "usb-role-switch" is used since
1715+ * extcon_find_edev_by_node() can not be used to check the absence of
1716+ * an extcon device. In the absence of an device it will always return
1717+ * EPROBE_DEFER.
1718+ */
1719+ if (IS_ENABLED(CONFIG_USB_ROLE_SWITCH) &&
1720+ device_property_read_bool(dev, "usb-role-switch"))
1721+ return NULL;
1722+
17131723 /*
17141724 * Try to get an extcon device from the USB PHY controller's "port"
17151725 * node. Check if it has the "port" node first, to avoid printing the
drivers/usb/dwc3/gadget.c+1−1
@@ -1029,7 +1029,7 @@ static int __dwc3_gadget_ep_disable(struct dwc3_ep *dep) · 1028 unmodified lines
10291029 dep->endpoint.desc = NULL;
10301030 }
10311031
1032− dwc3_remove_requests(dwc, dep, -ECONNRESET);
1032+ dwc3_remove_requests(dwc, dep, -ESHUTDOWN);
10331033
10341034 dep->stream_capable = false;
10351035 dep->type = 0;
drivers/usb/dwc3/host.c+0−10
@@ -11,13 +11,8 @@ · 10 unmodified lines
1111 #include <linux/of.h>
1212 #include <linux/platform_device.h>
1313
14−#include "../host/xhci-plat.h"
1514 #include "core.h"
1615
17−static const struct xhci_plat_priv dwc3_xhci_plat_priv = {
18− .quirks = XHCI_SKIP_PHY_INIT,
19−};
20−
2116 static void dwc3_host_fill_xhci_irq_res(struct dwc3 *dwc,
2217 int irq, char *name)
2318 {
@@ -97,11 +92,6 @@ int dwc3_host_init(struct dwc3 *dwc) · 73 unmodified lines
9792 goto err;
9893 }
9994
100− ret = platform_device_add_data(xhci, &dwc3_xhci_plat_priv,
101− sizeof(dwc3_xhci_plat_priv));
102− if (ret)
103− goto err;
104−
10595 memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props));
10696
10797 if (dwc->usb3_lpm_capable)
drivers/usb/host/bcma-hcd.c+6−4
@@ -285,7 +285,7 @@ static void bcma_hci_platform_power_gpio(struct bcma_device *dev, bool val) · 284 unmodified lines
285285 {
286286 struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
287287
288− if (IS_ERR_OR_NULL(usb_dev->gpio_desc))
288+ if (!usb_dev->gpio_desc)
289289 return;
290290
291291 gpiod_set_value(usb_dev->gpio_desc, val);
@@ -406,9 +406,11 @@ static int bcma_hcd_probe(struct bcma_device *core) · 114 unmodified lines
406406 return -ENOMEM;
407407 usb_dev->core = core;
408408
409− if (core->dev.of_node)
410− usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc",
411− GPIOD_OUT_HIGH);
409+ usb_dev->gpio_desc = devm_gpiod_get_optional(&core->dev, "vcc",
410+ GPIOD_OUT_HIGH);
411+ if (IS_ERR(usb_dev->gpio_desc))
412+ return dev_err_probe(&core->dev, PTR_ERR(usb_dev->gpio_desc),
413+ "error obtaining VCC GPIO");
412414
413415 switch (core->id.id) {
414416 case BCMA_CORE_USB20_HOST:
drivers/usb/serial/option.c+17−2
@@ -162,6 +162,8 @@ static void option_instat_callback(struct urb *urb); · 161 unmodified lines
162162 #define NOVATELWIRELESS_PRODUCT_G2 0xA010
163163 #define NOVATELWIRELESS_PRODUCT_MC551 0xB001
164164
165+#define UBLOX_VENDOR_ID 0x1546
166+
165167 /* AMOI PRODUCTS */
166168 #define AMOI_VENDOR_ID 0x1614
167169 #define AMOI_PRODUCT_H01 0x0800
@@ -240,7 +242,6 @@ static void option_instat_callback(struct urb *urb); · 72 unmodified lines
240242 #define QUECTEL_PRODUCT_UC15 0x9090
241243 /* These u-blox products use Qualcomm's vendor ID */
242244 #define UBLOX_PRODUCT_R410M 0x90b2
243−#define UBLOX_PRODUCT_R6XX 0x90fa
244245 /* These Yuga products use Qualcomm's vendor ID */
245246 #define YUGA_PRODUCT_CLM920_NC5 0x9625
246247
@@ -581,6 +582,9 @@ static void option_instat_callback(struct urb *urb); · 334 unmodified lines
581582 #define OPPO_VENDOR_ID 0x22d9
582583 #define OPPO_PRODUCT_R11 0x276c
583584
585+/* Sierra Wireless products */
586+#define SIERRA_VENDOR_ID 0x1199
587+#define SIERRA_PRODUCT_EM9191 0x90d3
584588
585589 /* Device flags */
586590
@@ -1124,8 +1128,16 @@ static const struct usb_device_id option_ids[] = { · 537 unmodified lines
11241128 /* u-blox products using Qualcomm vendor ID */
11251129 { USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R410M),
11261130 .driver_info = RSVD(1) | RSVD(3) },
1127− { USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R6XX),
1131+ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x908b), /* u-blox LARA-R6 00B */
1132+ .driver_info = RSVD(4) },
1133+ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x90fa),
11281134 .driver_info = RSVD(3) },
1135+ /* u-blox products */
1136+ { USB_DEVICE(UBLOX_VENDOR_ID, 0x1341) }, /* u-blox LARA-L6 */
1137+ { USB_DEVICE(UBLOX_VENDOR_ID, 0x1342), /* u-blox LARA-L6 (RMNET) */
1138+ .driver_info = RSVD(4) },
1139+ { USB_DEVICE(UBLOX_VENDOR_ID, 0x1343), /* u-blox LARA-L6 (ECM) */
1140+ .driver_info = RSVD(4) },
11291141 /* Quectel products using Quectel vendor ID */
11301142 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21, 0xff, 0xff, 0xff),
11311143 .driver_info = NUMEP2 },
@@ -2167,6 +2179,7 @@ static const struct usb_device_id option_ids[] = { · 1035 unmodified lines
21672179 { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x010a, 0xff) }, /* Fibocom MA510 (ECM mode) */
21682180 { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0xff, 0x30) }, /* Fibocom FG150 Diag */
21692181 { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0, 0) }, /* Fibocom FG150 AT */
2182+ { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0111, 0xff) }, /* Fibocom FM160 (MBIM mode) */
21702183 { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */
21712184 { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a2, 0xff) }, /* Fibocom FM101-GL (laptop MBIM) */
21722185 { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a4, 0xff), /* Fibocom FM101-GL (laptop MBIM) */
@@ -2176,6 +2189,8 @@ static const struct usb_device_id option_ids[] = { · 3 unmodified lines
21762189 { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */
21772190 { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */
21782191 { USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) },
2192+ { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) },
2193+ { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) },
21792194 { } /* Terminating entry */
21802195 };
21812196 MODULE_DEVICE_TABLE(usb, option_ids);
drivers/usb/typec/mux/intel_pmc_mux.c+13−2
@@ -369,13 +369,24 @@ pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state) · 368 unmodified lines
369369 return pmc_usb_command(port, (void *)&req, sizeof(req));
370370 }
371371
372−static int pmc_usb_mux_safe_state(struct pmc_usb_port *port)
372+static int pmc_usb_mux_safe_state(struct pmc_usb_port *port,
373+ struct typec_mux_state *state)
373374 {
374375 u8 msg;
375376
376377 if (IOM_PORT_ACTIVITY_IS(port->iom_status, SAFE_MODE))
377378 return 0;
378379
380+ if ((IOM_PORT_ACTIVITY_IS(port->iom_status, DP) ||
381+ IOM_PORT_ACTIVITY_IS(port->iom_status, DP_MFD)) &&
382+ state->alt && state->alt->svid == USB_TYPEC_DP_SID)
383+ return 0;
384+
385+ if ((IOM_PORT_ACTIVITY_IS(port->iom_status, TBT) ||
386+ IOM_PORT_ACTIVITY_IS(port->iom_status, ALT_MODE_TBT_USB)) &&
387+ state->alt && state->alt->svid == USB_TYPEC_TBT_SID)
388+ return 0;
389+
379390 msg = PMC_USB_SAFE_MODE;
380391 msg |= port->usb3_port << PMC_USB_MSG_USB3_PORT_SHIFT;
381392
@@ -443,7 +454,7 @@ pmc_usb_mux_set(struct typec_mux_dev *mux, struct typec_mux_state *state) · 61 unmodified lines
443454 return 0;
444455
445456 if (state->mode == TYPEC_STATE_SAFE)
446− return pmc_usb_mux_safe_state(port);
457+ return pmc_usb_mux_safe_state(port, state);
447458 if (state->mode == TYPEC_STATE_USB)
448459 return pmc_usb_connect(port, port->role);
449460
drivers/usb/typec/tipd/core.c+3−3
@@ -474,7 +474,7 @@ static void tps6598x_handle_plug_event(struct tps6598x *tps, u32 status) · 473 unmodified lines
474474 static irqreturn_t cd321x_interrupt(int irq, void *data)
475475 {
476476 struct tps6598x *tps = data;
477− u64 event;
477+ u64 event = 0;
478478 u32 status;
479479 int ret;
480480
@@ -519,8 +519,8 @@ err_unlock: · 38 unmodified lines
519519 static irqreturn_t tps6598x_interrupt(int irq, void *data)
520520 {
521521 struct tps6598x *tps = data;
522− u64 event1;
523− u64 event2;
522+ u64 event1 = 0;
523+ u64 event2 = 0;
524524 u32 status;
525525 int ret;
526526
drivers/vfio/pci/vfio_pci_core.c+5−5
@@ -2488,12 +2488,12 @@ static bool vfio_pci_dev_set_needs_reset(struct vfio_device_set *dev_set) · 2487 unmodified lines
24882488 struct vfio_pci_core_device *cur;
24892489 bool needs_reset = false;
24902490
2491− list_for_each_entry(cur, &dev_set->device_list, vdev.dev_set_list) {
2492− /* No VFIO device in the set can have an open device FD */
2493− if (cur->vdev.open_count)
2494− return false;
2491+ /* No other VFIO device in the set can be open. */
2492+ if (vfio_device_set_open_count(dev_set) > 1)
2493+ return false;
2494+
2495+ list_for_each_entry(cur, &dev_set->device_list, vdev.dev_set_list)
24952496 needs_reset |= cur->needs_reset;
2496− }
24972497 return needs_reset;
24982498 }
24992499
drivers/vfio/vfio_main.c+21−5
@@ -125,6 +125,19 @@ static void vfio_release_device_set(struct vfio_device *device) · 124 unmodified lines
125125 xa_unlock(&vfio_device_set_xa);
126126 }
127127
128+unsigned int vfio_device_set_open_count(struct vfio_device_set *dev_set)
129+{
130+ struct vfio_device *cur;
131+ unsigned int open_count = 0;
132+
133+ lockdep_assert_held(&dev_set->lock);
134+
135+ list_for_each_entry(cur, &dev_set->device_list, dev_set_list)
136+ open_count += cur->open_count;
137+ return open_count;
138+}
139+EXPORT_SYMBOL_GPL(vfio_device_set_open_count);
140+
128141 /*
129142 * Group objects - create, release, get, put, search
130143 */
@@ -801,8 +814,9 @@ static struct file *vfio_device_open(struct vfio_device *device) · 670 unmodified lines
801814 err_close_device:
802815 mutex_lock(&device->dev_set->lock);
803816 mutex_lock(&device->group->group_lock);
804− if (device->open_count == 1 && device->ops->close_device) {
805− device->ops->close_device(device);
817+ if (device->open_count == 1) {
818+ if (device->ops->close_device)
819+ device->ops->close_device(device);
806820
807821 vfio_device_container_unregister(device);
808822 }
@@ -1017,10 +1031,12 @@ static int vfio_device_fops_release(struct inode *inode, struct file *filep) · 208 unmodified lines
10171031 mutex_lock(&device->dev_set->lock);
10181032 vfio_assert_device_open(device);
10191033 mutex_lock(&device->group->group_lock);
1020− if (device->open_count == 1 && device->ops->close_device)
1021− device->ops->close_device(device);
1034+ if (device->open_count == 1) {
1035+ if (device->ops->close_device)
1036+ device->ops->close_device(device);
10221037
1023− vfio_device_container_unregister(device);
1038+ vfio_device_container_unregister(device);
1039+ }
10241040 mutex_unlock(&device->group->group_lock);
10251041 device->open_count--;
10261042 if (device->open_count == 0)
drivers/xen/pcpu.c+1−1
@@ -228,7 +228,7 @@ static int register_pcpu(struct pcpu *pcpu) · 227 unmodified lines
228228
229229 err = device_register(dev);
230230 if (err) {
231− pcpu_release(dev);
231+ put_device(dev);
232232 return err;
233233 }
234234
drivers/xen/platform-pci.c+7−3
@@ -54,7 +54,8 @@ static uint64_t get_callback_via(struct pci_dev *pdev) · 53 unmodified lines
5454 pin = pdev->pin;
5555
5656 /* We don't know the GSI. Specify the PCI INTx line instead. */
57− return ((uint64_t)0x01 << HVM_CALLBACK_VIA_TYPE_SHIFT) | /* PCI INTx identifier */
57+ return ((uint64_t)HVM_PARAM_CALLBACK_TYPE_PCI_INTX <<
58+ HVM_CALLBACK_VIA_TYPE_SHIFT) |
5859 ((uint64_t)pci_domain_nr(pdev->bus) << 32) |
5960 ((uint64_t)pdev->bus->number << 16) |
6061 ((uint64_t)(pdev->devfn & 0xff) << 8) |
@@ -144,7 +145,7 @@ static int platform_pci_probe(struct pci_dev *pdev, · 83 unmodified lines
144145 if (ret) {
145146 dev_warn(&pdev->dev, "Unable to set the evtchn callback "
146147 "err=%d\n", ret);
147− goto out;
148+ goto irq_out;
148149 }
149150 }
150151
@@ -152,13 +153,16 @@ static int platform_pci_probe(struct pci_dev *pdev, · 1 unmodified line
152153 grant_frames = alloc_xen_mmio(PAGE_SIZE * max_nr_gframes);
153154 ret = gnttab_setup_auto_xlat_frames(grant_frames);
154155 if (ret)
155− goto out;
156+ goto irq_out;
156157 ret = gnttab_init();
157158 if (ret)
158159 goto grant_out;
159160 return 0;
160161 grant_out:
161162 gnttab_free_auto_xlat_frames();
163+irq_out:
164+ if (!xen_have_vector_callback)
165+ free_irq(pdev->irq, pdev);
162166 out:
163167 pci_release_region(pdev, 0);
164168 mem_out:
drivers/xen/xen-pciback/conf_space_capability.c+6−3
@@ -190,13 +190,16 @@ static const struct config_field caplist_pm[] = { · 189 unmodified lines
190190 };
191191
192192 static struct msi_msix_field_config {
193− u16 enable_bit; /* bit for enabling MSI/MSI-X */
194− unsigned int int_type; /* interrupt type for exclusiveness check */
193+ u16 enable_bit; /* bit for enabling MSI/MSI-X */
194+ u16 allowed_bits; /* bits allowed to be changed */
195+ unsigned int int_type; /* interrupt type for exclusiveness check */
195196 } msi_field_config = {
196197 .enable_bit = PCI_MSI_FLAGS_ENABLE,
198+ .allowed_bits = PCI_MSI_FLAGS_ENABLE,
197199 .int_type = INTERRUPT_TYPE_MSI,
198200 }, msix_field_config = {
199201 .enable_bit = PCI_MSIX_FLAGS_ENABLE,
202+ .allowed_bits = PCI_MSIX_FLAGS_ENABLE | PCI_MSIX_FLAGS_MASKALL,
200203 .int_type = INTERRUPT_TYPE_MSIX,
201204 };
202205
@@ -229,7 +232,7 @@ static int msi_msix_flags_write(struct pci_dev *dev, int offset, u16 new_value, · 26 unmodified lines
229232 return 0;
230233
231234 if (!dev_data->allow_interrupt_control ||
232− (new_value ^ old_value) & ~field_config->enable_bit)
235+ (new_value ^ old_value) & ~field_config->allowed_bits)
233236 return PCIBIOS_SET_FAILED;
234237
235238 if (new_value & field_config->enable_bit) {
fs/ceph/caps.c+12−36
@@ -2248,7 +2248,6 @@ static int flush_mdlog_and_wait_inode_unsafe_requests(struct inode *inode) · 2247 unmodified lines
22482248 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc;
22492249 struct ceph_inode_info *ci = ceph_inode(inode);
22502250 struct ceph_mds_request *req1 = NULL, *req2 = NULL;
2251− unsigned int max_sessions;
22522251 int ret, err = 0;
22532252
22542253 spin_lock(&ci->i_unsafe_lock);
@@ -2266,28 +2265,24 @@ static int flush_mdlog_and_wait_inode_unsafe_requests(struct inode *inode) · 11 unmodified lines
22662265 }
22672266 spin_unlock(&ci->i_unsafe_lock);
22682267
2269− /*
2270− * The mdsc->max_sessions is unlikely to be changed
2271− * mostly, here we will retry it by reallocating the
2272− * sessions array memory to get rid of the mdsc->mutex
2273− * lock.
2274− */
2275−retry:
2276− max_sessions = mdsc->max_sessions;
2277−
22782268 /*
22792269 * Trigger to flush the journal logs in all the relevant MDSes
22802270 * manually, or in the worst case we must wait at most 5 seconds
22812271 * to wait the journal logs to be flushed by the MDSes periodically.
22822272 */
2283− if ((req1 || req2) && likely(max_sessions)) {
2284− struct ceph_mds_session **sessions = NULL;
2285− struct ceph_mds_session *s;
2273+ if (req1 || req2) {
22862274 struct ceph_mds_request *req;
2275+ struct ceph_mds_session **sessions;
2276+ struct ceph_mds_session *s;
2277+ unsigned int max_sessions;
22872278 int i;
22882279
2280+ mutex_lock(&mdsc->mutex);
2281+ max_sessions = mdsc->max_sessions;
2282+
22892283 sessions = kcalloc(max_sessions, sizeof(s), GFP_KERNEL);
22902284 if (!sessions) {
2285+ mutex_unlock(&mdsc->mutex);
22912286 err = -ENOMEM;
22922287 goto out;
22932288 }
@@ -2299,16 +2294,6 @@ retry: · 5 unmodified lines
22992294 s = req->r_session;
23002295 if (!s)
23012296 continue;
2302− if (unlikely(s->s_mds >= max_sessions)) {
2303− spin_unlock(&ci->i_unsafe_lock);
2304− for (i = 0; i < max_sessions; i++) {
2305− s = sessions[i];
2306− if (s)
2307− ceph_put_mds_session(s);
2308− }
2309− kfree(sessions);
2310− goto retry;
2311− }
23122297 if (!sessions[s->s_mds]) {
23132298 s = ceph_get_mds_session(s);
23142299 sessions[s->s_mds] = s;
@@ -2321,16 +2306,6 @@ retry: · 6 unmodified lines
23212306 s = req->r_session;
23222307 if (!s)
23232308 continue;
2324− if (unlikely(s->s_mds >= max_sessions)) {
2325− spin_unlock(&ci->i_unsafe_lock);
2326− for (i = 0; i < max_sessions; i++) {
2327− s = sessions[i];
2328− if (s)
2329− ceph_put_mds_session(s);
2330− }
2331− kfree(sessions);
2332− goto retry;
2333− }
23342309 if (!sessions[s->s_mds]) {
23352310 s = ceph_get_mds_session(s);
23362311 sessions[s->s_mds] = s;
@@ -2342,11 +2317,12 @@ retry: · 5 unmodified lines
23422317 /* the auth MDS */
23432318 spin_lock(&ci->i_ceph_lock);
23442319 if (ci->i_auth_cap) {
2345− s = ci->i_auth_cap->session;
2346− if (!sessions[s->s_mds])
2347− sessions[s->s_mds] = ceph_get_mds_session(s);
2320+ s = ci->i_auth_cap->session;
2321+ if (!sessions[s->s_mds])
2322+ sessions[s->s_mds] = ceph_get_mds_session(s);
23482323 }
23492324 spin_unlock(&ci->i_ceph_lock);
2325+ mutex_unlock(&mdsc->mutex);
23502326
23512327 /* send flush mdlog request to MDSes */
23522328 for (i = 0; i < max_sessions; i++) {
fs/ceph/inode.c+1−1
@@ -2492,7 +2492,7 @@ int ceph_getattr(struct user_namespace *mnt_userns, const struct path *path, · 2491 unmodified lines
24922492 struct inode *parent;
24932493
24942494 parent = ceph_lookup_inode(sb, ceph_ino(inode));
2495− if (!parent)
2495+ if (IS_ERR(parent))
24962496 return PTR_ERR(parent);
24972497
24982498 pci = ceph_inode(parent);
fs/ceph/snap.c+2−1
@@ -763,7 +763,7 @@ int ceph_update_snap_trace(struct ceph_mds_client *mdsc, · 762 unmodified lines
763763 struct ceph_mds_snap_realm *ri; /* encoded */
764764 __le64 *snaps; /* encoded */
765765 __le64 *prior_parent_snaps; /* encoded */
766− struct ceph_snap_realm *realm = NULL;
766+ struct ceph_snap_realm *realm;
767767 struct ceph_snap_realm *first_realm = NULL;
768768 struct ceph_snap_realm *realm_to_rebuild = NULL;
769769 int rebuild_snapcs;
@@ -774,6 +774,7 @@ int ceph_update_snap_trace(struct ceph_mds_client *mdsc, · 4 unmodified lines
774774
775775 dout("%s deletion=%d\n", __func__, deletion);
776776 more:
777+ realm = NULL;
777778 rebuild_snapcs = 0;
778779 ceph_decode_need(&p, e, sizeof(*ri), bad);
779780 ri = p;
fs/cifs/connect.c+11−3
@@ -3855,9 +3855,13 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx) · 3854 unmodified lines
38553855 uuid_copy(&cifs_sb->dfs_mount_id, &mnt_ctx.mount_id);
38563856
38573857 out:
3858− free_xid(mnt_ctx.xid);
38593858 cifs_try_adding_channels(cifs_sb, mnt_ctx.ses);
3860− return mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon);
3859+ rc = mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon);
3860+ if (rc)
3861+ goto error;
3862+
3863+ free_xid(mnt_ctx.xid);
3864+ return rc;
38613865
38623866 error:
38633867 dfs_cache_put_refsrv_sessions(&mnt_ctx.mount_id);
@@ -3884,8 +3888,12 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx) · 20 unmodified lines
38843888 goto error;
38853889 }
38863890
3891+ rc = mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon);
3892+ if (rc)
3893+ goto error;
3894+
38873895 free_xid(mnt_ctx.xid);
3888− return mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon);
3896+ return rc;
38893897
38903898 error:
38913899 mount_put_conns(&mnt_ctx);
fs/cifs/ioctl.c+2−2
@@ -343,7 +343,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) · 342 unmodified lines
343343 rc = put_user(ExtAttrBits &
344344 FS_FL_USER_VISIBLE,
345345 (int __user *)arg);
346− if (rc != EOPNOTSUPP)
346+ if (rc != -EOPNOTSUPP)
347347 break;
348348 }
349349 #endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */
@@ -373,7 +373,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) · 23 unmodified lines
373373 * pSMBFile->fid.netfid,
374374 * extAttrBits,
375375 * &ExtAttrMask);
376− * if (rc != EOPNOTSUPP)
376+ * if (rc != -EOPNOTSUPP)
377377 * break;
378378 */
379379
fs/cifs/smb2ops.c+4−0
@@ -1116,6 +1116,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, · 1115 unmodified lines
11161116 COMPOUND_FID, current->tgid,
11171117 FILE_FULL_EA_INFORMATION,
11181118 SMB2_O_INFO_FILE, 0, data, size);
1119+ if (rc)
1120+ goto sea_exit;
11191121 smb2_set_next_command(tcon, &rqst[1]);
11201122 smb2_set_related(&rqst[1]);
11211123
@@ -1126,6 +1128,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, · 4 unmodified lines
11261128 rqst[2].rq_nvec = 1;
11271129 rc = SMB2_close_init(tcon, server,
11281130 &rqst[2], COMPOUND_FID, COMPOUND_FID, false);
1131+ if (rc)
1132+ goto sea_exit;
11291133 smb2_set_related(&rqst[2]);
11301134
11311135 rc = compound_send_recv(xid, ses, server,
fs/erofs/fscache.c+21−14
@@ -75,11 +75,15 @@ static void erofs_fscache_rreq_unlock_folios(struct netfs_io_request *rreq) · 74 unmodified lines
7575
7676 rcu_read_lock();
7777 xas_for_each(&xas, folio, last_page) {
78− unsigned int pgpos =
79− (folio_index(folio) - start_page) * PAGE_SIZE;
80− unsigned int pgend = pgpos + folio_size(folio);
78+ unsigned int pgpos, pgend;
8179 bool pg_failed = false;
8280
81+ if (xas_retry(&xas, folio))
82+ continue;
83+
84+ pgpos = (folio_index(folio) - start_page) * PAGE_SIZE;
85+ pgend = pgpos + folio_size(folio);
86+
8387 for (;;) {
8488 if (!subreq) {
8589 pg_failed = true;
@@ -287,22 +291,25 @@ static int erofs_fscache_data_read(struct address_space *mapping, · 201 unmodified lines
287291 return PTR_ERR(src);
288292
289293 iov_iter_xarray(&iter, READ, &mapping->i_pages, pos, PAGE_SIZE);
290− if (copy_to_iter(src + offset, size, &iter) != size)
294+ if (copy_to_iter(src + offset, size, &iter) != size) {
295+ erofs_put_metabuf(&buf);
291296 return -EFAULT;
297+ }
292298 iov_iter_zero(PAGE_SIZE - size, &iter);
293299 erofs_put_metabuf(&buf);
294300 return PAGE_SIZE;
295301 }
296302
297− count = min_t(size_t, map.m_llen - (pos - map.m_la), len);
298− DBG_BUGON(!count || count % PAGE_SIZE);
299−
300303 if (!(map.m_flags & EROFS_MAP_MAPPED)) {
304+ count = len;
301305 iov_iter_xarray(&iter, READ, &mapping->i_pages, pos, count);
302306 iov_iter_zero(count, &iter);
303307 return count;
304308 }
305309
310+ count = min_t(size_t, map.m_llen - (pos - map.m_la), len);
311+ DBG_BUGON(!count || count % PAGE_SIZE);
312+
306313 mdev = (struct erofs_map_dev) {
307314 .m_deviceid = map.m_deviceid,
308315 .m_pa = map.m_pa,
@@ -403,13 +410,13 @@ static void erofs_fscache_domain_put(struct erofs_domain *domain) · 94 unmodified lines
403410 static int erofs_fscache_register_volume(struct super_block *sb)
404411 {
405412 struct erofs_sb_info *sbi = EROFS_SB(sb);
406− char *domain_id = sbi->opt.domain_id;
413+ char *domain_id = sbi->domain_id;
407414 struct fscache_volume *volume;
408415 char *name;
409416 int ret = 0;
410417
411418 name = kasprintf(GFP_KERNEL, "erofs,%s",
412− domain_id ? domain_id : sbi->opt.fsid);
419+ domain_id ? domain_id : sbi->fsid);
413420 if (!name)
414421 return -ENOMEM;
415422
@@ -435,7 +442,7 @@ static int erofs_fscache_init_domain(struct super_block *sb) · 19 unmodified lines
435442 if (!domain)
436443 return -ENOMEM;
437444
438− domain->domain_id = kstrdup(sbi->opt.domain_id, GFP_KERNEL);
445+ domain->domain_id = kstrdup(sbi->domain_id, GFP_KERNEL);
439446 if (!domain->domain_id) {
440447 kfree(domain);
441448 return -ENOMEM;
@@ -472,7 +479,7 @@ static int erofs_fscache_register_domain(struct super_block *sb) · 30 unmodified lines
472479
473480 mutex_lock(&erofs_domain_list_lock);
474481 list_for_each_entry(domain, &erofs_domain_list, list) {
475− if (!strcmp(domain->domain_id, sbi->opt.domain_id)) {
482+ if (!strcmp(domain->domain_id, sbi->domain_id)) {
476483 sbi->domain = domain;
477484 sbi->volume = domain->volume;
478485 refcount_inc(&domain->ref);
@@ -609,7 +616,7 @@ struct erofs_fscache *erofs_domain_register_cookie(struct super_block *sb, · 130 unmodified lines
609616 struct erofs_fscache *erofs_fscache_register_cookie(struct super_block *sb,
610617 char *name, bool need_inode)
611618 {
612− if (EROFS_SB(sb)->opt.domain_id)
619+ if (EROFS_SB(sb)->domain_id)
613620 return erofs_domain_register_cookie(sb, name, need_inode);
614621 return erofs_fscache_acquire_cookie(sb, name, need_inode);
615622 }
@@ -641,7 +648,7 @@ int erofs_fscache_register_fs(struct super_block *sb) · 25 unmodified lines
641648 struct erofs_sb_info *sbi = EROFS_SB(sb);
642649 struct erofs_fscache *fscache;
643650
644− if (sbi->opt.domain_id)
651+ if (sbi->domain_id)
645652 ret = erofs_fscache_register_domain(sb);
646653 else
647654 ret = erofs_fscache_register_volume(sb);
@@ -649,7 +656,7 @@ int erofs_fscache_register_fs(struct super_block *sb) · 1 unmodified line
649656 return ret;
650657
651658 /* acquired domain/volume will be relinquished in kill_sb() on error */
652− fscache = erofs_fscache_register_cookie(sb, sbi->opt.fsid, true);
659+ fscache = erofs_fscache_register_cookie(sb, sbi->fsid, true);
653660 if (IS_ERR(fscache))
654661 return PTR_ERR(fscache);
655662
fs/erofs/internal.h+4−2
@@ -75,8 +75,6 @@ struct erofs_mount_opts { · 74 unmodified lines
7575 unsigned int max_sync_decompress_pages;
7676 #endif
7777 unsigned int mount_opt;
78− char *fsid;
79− char *domain_id;
8078 };
8179
8280 struct erofs_dev_context {
@@ -89,6 +87,8 @@ struct erofs_dev_context { · 6 unmodified lines
8987 struct erofs_fs_context {
9088 struct erofs_mount_opts opt;
9189 struct erofs_dev_context *devs;
90+ char *fsid;
91+ char *domain_id;
9292 };
9393
9494 /* all filesystem-wide lz4 configurations */
@@ -170,6 +170,8 @@ struct erofs_sb_info { · 75 unmodified lines
170170 struct fscache_volume *volume;
171171 struct erofs_fscache *s_fscache;
172172 struct erofs_domain *domain;
173+ char *fsid;
174+ char *domain_id;
173175 };
174176
175177 #define EROFS_SB(sb) ((struct erofs_sb_info *)(sb)->s_fs_info)
fs/erofs/super.c+22−17
@@ -579,9 +579,9 @@ static int erofs_fc_parse_param(struct fs_context *fc, · 578 unmodified lines
579579 break;
580580 case Opt_fsid:
581581 #ifdef CONFIG_EROFS_FS_ONDEMAND
582− kfree(ctx->opt.fsid);
583− ctx->opt.fsid = kstrdup(param->string, GFP_KERNEL);
584− if (!ctx->opt.fsid)
582+ kfree(ctx->fsid);
583+ ctx->fsid = kstrdup(param->string, GFP_KERNEL);
584+ if (!ctx->fsid)
585585 return -ENOMEM;
586586 #else
587587 errorfc(fc, "fsid option not supported");
@@ -589,9 +589,9 @@ static int erofs_fc_parse_param(struct fs_context *fc, · 1 unmodified line
589589 break;
590590 case Opt_domain_id:
591591 #ifdef CONFIG_EROFS_FS_ONDEMAND
592− kfree(ctx->opt.domain_id);
593− ctx->opt.domain_id = kstrdup(param->string, GFP_KERNEL);
594− if (!ctx->opt.domain_id)
592+ kfree(ctx->domain_id);
593+ ctx->domain_id = kstrdup(param->string, GFP_KERNEL);
594+ if (!ctx->domain_id)
595595 return -ENOMEM;
596596 #else
597597 errorfc(fc, "domain_id option not supported");
@@ -728,10 +728,12 @@ static int erofs_fc_fill_super(struct super_block *sb, struct fs_context *fc) · 130 unmodified lines
728728
729729 sb->s_fs_info = sbi;
730730 sbi->opt = ctx->opt;
731− ctx->opt.fsid = NULL;
732− ctx->opt.domain_id = NULL;
733731 sbi->devs = ctx->devs;
734732 ctx->devs = NULL;
733+ sbi->fsid = ctx->fsid;
734+ ctx->fsid = NULL;
735+ sbi->domain_id = ctx->domain_id;
736+ ctx->domain_id = NULL;
735737
736738 if (erofs_is_fscache_mode(sb)) {
737739 sb->s_blocksize = EROFS_BLKSIZ;
@@ -820,7 +822,7 @@ static int erofs_fc_get_tree(struct fs_context *fc) · 82 unmodified lines
820822 {
821823 struct erofs_fs_context *ctx = fc->fs_private;
822824
823− if (IS_ENABLED(CONFIG_EROFS_FS_ONDEMAND) && ctx->opt.fsid)
825+ if (IS_ENABLED(CONFIG_EROFS_FS_ONDEMAND) && ctx->fsid)
824826 return get_tree_nodev(fc, erofs_fc_fill_super);
825827
826828 return get_tree_bdev(fc, erofs_fc_fill_super);
@@ -834,6 +836,9 @@ static int erofs_fc_reconfigure(struct fs_context *fc) · 7 unmodified lines
834836
835837 DBG_BUGON(!sb_rdonly(sb));
836838
839+ if (ctx->fsid || ctx->domain_id)
840+ erofs_info(sb, "ignoring reconfiguration for fsid|domain_id.");
841+
837842 if (test_opt(&ctx->opt, POSIX_ACL))
838843 fc->sb_flags |= SB_POSIXACL;
839844 else
@@ -873,8 +878,8 @@ static void erofs_fc_free(struct fs_context *fc) · 33 unmodified lines
873878 struct erofs_fs_context *ctx = fc->fs_private;
874879
875880 erofs_free_dev_context(ctx->devs);
876− kfree(ctx->opt.fsid);
877− kfree(ctx->opt.domain_id);
881+ kfree(ctx->fsid);
882+ kfree(ctx->domain_id);
878883 kfree(ctx);
879884 }
880885
@@ -944,8 +949,8 @@ static void erofs_kill_sb(struct super_block *sb) · 63 unmodified lines
944949 erofs_free_dev_context(sbi->devs);
945950 fs_put_dax(sbi->dax_dev, NULL);
946951 erofs_fscache_unregister_fs(sb);
947− kfree(sbi->opt.fsid);
948− kfree(sbi->opt.domain_id);
952+ kfree(sbi->fsid);
953+ kfree(sbi->domain_id);
949954 kfree(sbi);
950955 sb->s_fs_info = NULL;
951956 }
@@ -1098,10 +1103,10 @@ static int erofs_show_options(struct seq_file *seq, struct dentry *root) · 146 unmodified lines
10981103 if (test_opt(opt, DAX_NEVER))
10991104 seq_puts(seq, ",dax=never");
11001105 #ifdef CONFIG_EROFS_FS_ONDEMAND
1101− if (opt->fsid)
1102− seq_printf(seq, ",fsid=%s", opt->fsid);
1103− if (opt->domain_id)
1104− seq_printf(seq, ",domain_id=%s", opt->domain_id);
1106+ if (sbi->fsid)
1107+ seq_printf(seq, ",fsid=%s", sbi->fsid);
1108+ if (sbi->domain_id)
1109+ seq_printf(seq, ",domain_id=%s", sbi->domain_id);
11051110 #endif
11061111 return 0;
11071112 }
fs/erofs/sysfs.c+4−4
@@ -210,14 +210,14 @@ int erofs_register_sysfs(struct super_block *sb) · 209 unmodified lines
210210 int err;
211211
212212 if (erofs_is_fscache_mode(sb)) {
213− if (sbi->opt.domain_id) {
214− str = kasprintf(GFP_KERNEL, "%s,%s", sbi->opt.domain_id,
215− sbi->opt.fsid);
213+ if (sbi->domain_id) {
214+ str = kasprintf(GFP_KERNEL, "%s,%s", sbi->domain_id,
215+ sbi->fsid);
216216 if (!str)
217217 return -ENOMEM;
218218 name = str;
219219 } else {
220− name = sbi->opt.fsid;
220+ name = sbi->fsid;
221221 }
222222 } else {
223223 name = sb->s_id;
fs/erofs/zdata.c+3−0
@@ -660,6 +660,9 @@ static int z_erofs_read_fragment(struct inode *inode, erofs_off_t pos, · 659 unmodified lines
660660 u8 *src, *dst;
661661 unsigned int i, cnt;
662662
663+ if (!packed_inode)
664+ return -EFSCORRUPTED;
665+
663666 pos += EROFS_I(inode)->z_fragmentoff;
664667 for (i = 0; i < len; i += cnt) {
665668 cnt = min_t(unsigned int, len - i,
fs/kernfs/dir.c+12−2
@@ -31,10 +31,15 @@ static DEFINE_SPINLOCK(kernfs_idr_lock); /* root->ino_idr */ · 30 unmodified lines
3131
3232 #define rb_to_kn(X) rb_entry((X), struct kernfs_node, rb)
3333
34+static bool __kernfs_active(struct kernfs_node *kn)
35+{
36+ return atomic_read(&kn->active) >= 0;
37+}
38+
3439 static bool kernfs_active(struct kernfs_node *kn)
3540 {
3641 lockdep_assert_held(&kernfs_root(kn)->kernfs_rwsem);
37− return atomic_read(&kn->active) >= 0;
42+ return __kernfs_active(kn);
3843 }
3944
4045 static bool kernfs_lockdep(struct kernfs_node *kn)
@@ -705,7 +710,12 @@ struct kernfs_node *kernfs_find_and_get_node_by_id(struct kernfs_root *root, · 664 unmodified lines
705710 goto err_unlock;
706711 }
707712
708− if (unlikely(!kernfs_active(kn) || !atomic_inc_not_zero(&kn->count)))
713+ /*
714+ * We should fail if @kn has never been activated and guarantee success
715+ * if the caller knows that @kn is active. Both can be achieved by
716+ * __kernfs_active() which tests @kn->active without kernfs_rwsem.
717+ */
718+ if (unlikely(!__kernfs_active(kn) || !atomic_inc_not_zero(&kn->count)))
709719 goto err_unlock;
710720
711721 spin_unlock(&kernfs_idr_lock);
fs/netfs/buffered_read.c+13−7
@@ -17,9 +17,9 @@ void netfs_rreq_unlock_folios(struct netfs_io_request *rreq) · 16 unmodified lines
1717 {
1818 struct netfs_io_subrequest *subreq;
1919 struct folio *folio;
20− unsigned int iopos, account = 0;
2120 pgoff_t start_page = rreq->start / PAGE_SIZE;
2221 pgoff_t last_page = ((rreq->start + rreq->len) / PAGE_SIZE) - 1;
22+ size_t account = 0;
2323 bool subreq_failed = false;
2424
2525 XA_STATE(xas, &rreq->mapping->i_pages, start_page);
@@ -39,18 +39,23 @@ void netfs_rreq_unlock_folios(struct netfs_io_request *rreq) · 13 unmodified lines
3939 */
4040 subreq = list_first_entry(&rreq->subrequests,
4141 struct netfs_io_subrequest, rreq_link);
42− iopos = 0;
4342 subreq_failed = (subreq->error < 0);
4443
4544 trace_netfs_rreq(rreq, netfs_rreq_trace_unlock);
4645
4746 rcu_read_lock();
4847 xas_for_each(&xas, folio, last_page) {
49− unsigned int pgpos = (folio_index(folio) - start_page) * PAGE_SIZE;
50− unsigned int pgend = pgpos + folio_size(folio);
48+ loff_t pg_end;
5149 bool pg_failed = false;
5250
51+ if (xas_retry(&xas, folio))
52+ continue;
53+
54+ pg_end = folio_pos(folio) + folio_size(folio) - 1;
55+
5356 for (;;) {
57+ loff_t sreq_end;
58+
5459 if (!subreq) {
5560 pg_failed = true;
5661 break;
@@ -58,11 +63,11 @@ void netfs_rreq_unlock_folios(struct netfs_io_request *rreq) · 1 unmodified line
5863 if (test_bit(NETFS_SREQ_COPY_TO_CACHE, &subreq->flags))
5964 folio_start_fscache(folio);
6065 pg_failed |= subreq_failed;
61− if (pgend < iopos + subreq->len)
66+ sreq_end = subreq->start + subreq->len - 1;
67+ if (pg_end < sreq_end)
6268 break;
6369
6470 account += subreq->transferred;
65− iopos += subreq->len;
6671 if (!list_is_last(&subreq->rreq_link, &rreq->subrequests)) {
6772 subreq = list_next_entry(subreq, rreq_link);
6873 subreq_failed = (subreq->error < 0);
@@ -70,7 +75,8 @@ void netfs_rreq_unlock_folios(struct netfs_io_request *rreq) · 1 unmodified line
7075 subreq = NULL;
7176 subreq_failed = false;
7277 }
73− if (pgend == iopos)
78+
79+ if (pg_end == sreq_end)
7480 break;
7581 }
7682
fs/netfs/io.c+3−0
@@ -121,6 +121,9 @@ static void netfs_rreq_unmark_after_write(struct netfs_io_request *rreq, · 120 unmodified lines
121121 XA_STATE(xas, &rreq->mapping->i_pages, subreq->start / PAGE_SIZE);
122122
123123 xas_for_each(&xas, folio, (subreq->start + subreq->len - 1) / PAGE_SIZE) {
124+ if (xas_retry(&xas, folio))
125+ continue;
126+
124127 /* We might have multiple writes from the same huge
125128 * folio, but we mustn't unlock a folio more than once.
126129 */
fs/nfsd/trace.h+4−1
@@ -254,7 +254,10 @@ TRACE_EVENT_CONDITION(nfsd_fh_verify_err, · 253 unmodified lines
254254 rqstp->rq_xprt->xpt_remotelen);
255255 __entry->xid = be32_to_cpu(rqstp->rq_xid);
256256 __entry->fh_hash = knfsd_fh_hash(&fhp->fh_handle);
257− __entry->inode = d_inode(fhp->fh_dentry);
257+ if (fhp->fh_dentry)
258+ __entry->inode = d_inode(fhp->fh_dentry);
259+ else
260+ __entry->inode = NULL;
258261 __entry->type = type;
259262 __entry->access = access;
260263 __entry->error = be32_to_cpu(error);
fs/zonefs/super.c+27−10
@@ -478,14 +478,22 @@ static void __zonefs_io_error(struct inode *inode, bool write) · 477 unmodified lines
478478 struct super_block *sb = inode->i_sb;
479479 struct zonefs_sb_info *sbi = ZONEFS_SB(sb);
480480 unsigned int noio_flag;
481− unsigned int nr_zones =
482− zi->i_zone_size >> (sbi->s_zone_sectors_shift + SECTOR_SHIFT);
481+ unsigned int nr_zones = 1;
483482 struct zonefs_ioerr_data err = {
484483 .inode = inode,
485484 .write = write,
486485 };
487486 int ret;
488487
488+ /*
489+ * The only files that have more than one zone are conventional zone
490+ * files with aggregated conventional zones, for which the inode zone
491+ * size is always larger than the device zone size.
492+ */
493+ if (zi->i_zone_size > bdev_zone_sectors(sb->s_bdev))
494+ nr_zones = zi->i_zone_size >>
495+ (sbi->s_zone_sectors_shift + SECTOR_SHIFT);
496+
489497 /*
490498 * Memory allocations in blkdev_report_zones() can trigger a memory
491499 * reclaim which may in turn cause a recursion into zonefs as well as
@@ -1407,6 +1415,14 @@ static int zonefs_init_file_inode(struct inode *inode, struct blk_zone *zone, · 915 unmodified lines
14071415 zi->i_ztype = type;
14081416 zi->i_zsector = zone->start;
14091417 zi->i_zone_size = zone->len << SECTOR_SHIFT;
1418+ if (zi->i_zone_size > bdev_zone_sectors(sb->s_bdev) << SECTOR_SHIFT &&
1419+ !(sbi->s_features & ZONEFS_F_AGGRCNV)) {
1420+ zonefs_err(sb,
1421+ "zone size %llu doesn't match device's zone sectors %llu\n",
1422+ zi->i_zone_size,
1423+ bdev_zone_sectors(sb->s_bdev) << SECTOR_SHIFT);
1424+ return -EINVAL;
1425+ }
14101426
14111427 zi->i_max_size = min_t(loff_t, MAX_LFS_FILESIZE,
14121428 zone->capacity << SECTOR_SHIFT);
@@ -1456,11 +1472,11 @@ static struct dentry *zonefs_create_inode(struct dentry *parent, · 43 unmodified lines
14561472 struct inode *dir = d_inode(parent);
14571473 struct dentry *dentry;
14581474 struct inode *inode;
1459− int ret;
1475+ int ret = -ENOMEM;
14601476
14611477 dentry = d_alloc_name(parent, name);
14621478 if (!dentry)
1463− return NULL;
1479+ return ERR_PTR(ret);
14641480
14651481 inode = new_inode(parent->d_sb);
14661482 if (!inode)
@@ -1485,7 +1501,7 @@ static struct dentry *zonefs_create_inode(struct dentry *parent, · 18 unmodified lines
14851501 dput:
14861502 dput(dentry);
14871503
1488− return NULL;
1504+ return ERR_PTR(ret);
14891505 }
14901506
14911507 struct zonefs_zone_data {
@@ -1505,7 +1521,7 @@ static int zonefs_create_zgroup(struct zonefs_zone_data *zd, · 13 unmodified lines
15051521 struct blk_zone *zone, *next, *end;
15061522 const char *zgroup_name;
15071523 char *file_name;
1508− struct dentry *dir;
1524+ struct dentry *dir, *dent;
15091525 unsigned int n = 0;
15101526 int ret;
15111527
@@ -1523,8 +1539,8 @@ static int zonefs_create_zgroup(struct zonefs_zone_data *zd, · 11 unmodified lines
15231539 zgroup_name = "seq";
15241540
15251541 dir = zonefs_create_inode(sb->s_root, zgroup_name, NULL, type);
1526− if (!dir) {
1527− ret = -ENOMEM;
1542+ if (IS_ERR(dir)) {
1543+ ret = PTR_ERR(dir);
15281544 goto free;
15291545 }
15301546
@@ -1570,8 +1586,9 @@ static int zonefs_create_zgroup(struct zonefs_zone_data *zd, · 39 unmodified lines
15701586 * Use the file number within its group as file name.
15711587 */
15721588 snprintf(file_name, ZONEFS_NAME_MAX - 1, "%u", n);
1573− if (!zonefs_create_inode(dir, file_name, zone, type)) {
1574− ret = -ENOMEM;
1589+ dent = zonefs_create_inode(dir, file_name, zone, type);
1590+ if (IS_ERR(dent)) {
1591+ ret = PTR_ERR(dent);
15751592 goto free;
15761593 }
15771594
fs/zonefs/sysfs.c+0−5
@@ -15,11 +15,6 @@ struct zonefs_sysfs_attr { · 14 unmodified lines
1515 ssize_t (*show)(struct zonefs_sb_info *sbi, char *buf);
1616 };
1717
18−static inline struct zonefs_sysfs_attr *to_attr(struct attribute *attr)
19−{
20− return container_of(attr, struct zonefs_sysfs_attr, attr);
21−}
22−
2318 #define ZONEFS_SYSFS_ATTR_RO(name) \
2419 static struct zonefs_sysfs_attr zonefs_sysfs_attr_##name = __ATTR_RO(name)
2520
include/linux/blkdev.h+8−8
@@ -311,6 +311,13 @@ struct queue_limits { · 310 unmodified lines
311311 unsigned char discard_misaligned;
312312 unsigned char raid_partial_stripes_expensive;
313313 enum blk_zoned_model zoned;
314+
315+ /*
316+ * Drivers that set dma_alignment to less than 511 must be prepared to
317+ * handle individual bvec's that are not a multiple of a SECTOR_SIZE
318+ * due to possible offsets.
319+ */
320+ unsigned int dma_alignment;
314321 };
315322
316323 typedef int (*report_zones_cb)(struct blk_zone *zone, unsigned int idx,
@@ -456,12 +463,6 @@ struct request_queue { · 139 unmodified lines
456463 unsigned long nr_requests; /* Max # of requests */
457464
458465 unsigned int dma_pad_mask;
459− /*
460− * Drivers that set dma_alignment to less than 511 must be prepared to
461− * handle individual bvec's that are not a multiple of a SECTOR_SIZE
462− * due to possible offsets.
463− */
464− unsigned int dma_alignment;
465466
466467 #ifdef CONFIG_BLK_INLINE_ENCRYPTION
467468 struct blk_crypto_profile *crypto_profile;
@@ -944,7 +945,6 @@ extern void blk_queue_io_min(struct request_queue *q, unsigned int min); · 476 unmodified lines
944945 extern void blk_limits_io_opt(struct queue_limits *limits, unsigned int opt);
945946 extern void blk_queue_io_opt(struct request_queue *q, unsigned int opt);
946947 extern void blk_set_queue_depth(struct request_queue *q, unsigned int depth);
947−extern void blk_set_default_limits(struct queue_limits *lim);
948948 extern void blk_set_stacking_limits(struct queue_limits *lim);
949949 extern int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
950950 sector_t offset);
@@ -1324,7 +1324,7 @@ static inline sector_t bdev_zone_sectors(struct block_device *bdev) · 373 unmodified lines
13241324
13251325 static inline int queue_dma_alignment(const struct request_queue *q)
13261326 {
1327− return q ? q->dma_alignment : 511;
1327+ return q ? q->limits.dma_alignment : 511;
13281328 }
13291329
13301330 static inline unsigned int bdev_dma_alignment(struct block_device *bdev)
include/linux/bpf.h+39−21
@@ -27,7 +27,7 @@ · 26 unmodified lines
2727 #include <linux/bpfptr.h>
2828 #include <linux/btf.h>
2929 #include <linux/rcupdate_trace.h>
30−#include <linux/init.h>
30+#include <linux/static_call.h>
3131
3232 struct bpf_verifier_env;
3333 struct bpf_verifier_log;
@@ -315,7 +315,7 @@ static inline void __copy_map_value(struct bpf_map *map, void *dst, void *src, b · 281 unmodified lines
315315 u32 next_off = map->off_arr->field_off[i];
316316
317317 memcpy(dst + curr_off, src + curr_off, next_off - curr_off);
318− curr_off += map->off_arr->field_sz[i];
318+ curr_off = next_off + map->off_arr->field_sz[i];
319319 }
320320 memcpy(dst + curr_off, src + curr_off, map->value_size - curr_off);
321321 }
@@ -344,7 +344,7 @@ static inline void zero_map_value(struct bpf_map *map, void *dst) · 22 unmodified lines
344344 u32 next_off = map->off_arr->field_off[i];
345345
346346 memset(dst + curr_off, 0, next_off - curr_off);
347− curr_off += map->off_arr->field_sz[i];
347+ curr_off = next_off + map->off_arr->field_sz[i];
348348 }
349349 memset(dst + curr_off, 0, map->value_size - curr_off);
350350 }
@@ -954,6 +954,10 @@ struct bpf_dispatcher { · 603 unmodified lines
954954 void *rw_image;
955955 u32 image_off;
956956 struct bpf_ksym ksym;
957+#ifdef CONFIG_HAVE_STATIC_CALL
958+ struct static_call_key *sc_key;
959+ void *sc_tramp;
960+#endif
957961 };
958962
959963 static __always_inline __nocfi unsigned int bpf_dispatcher_nop_func(
@@ -971,7 +975,33 @@ struct bpf_trampoline *bpf_trampoline_get(u64 key, · 11 unmodified lines
971975 struct bpf_attach_target_info *tgt_info);
972976 void bpf_trampoline_put(struct bpf_trampoline *tr);
973977 int arch_prepare_bpf_dispatcher(void *image, void *buf, s64 *funcs, int num_funcs);
974−int __init bpf_arch_init_dispatcher_early(void *ip);
978+
979+/*
980+ * When the architecture supports STATIC_CALL replace the bpf_dispatcher_fn
981+ * indirection with a direct call to the bpf program. If the architecture does
982+ * not have STATIC_CALL, avoid a double-indirection.
983+ */
984+#ifdef CONFIG_HAVE_STATIC_CALL
985+
986+#define __BPF_DISPATCHER_SC_INIT(_name) \
987+ .sc_key = &STATIC_CALL_KEY(_name), \
988+ .sc_tramp = STATIC_CALL_TRAMP_ADDR(_name),
989+
990+#define __BPF_DISPATCHER_SC(name) \
991+ DEFINE_STATIC_CALL(bpf_dispatcher_##name##_call, bpf_dispatcher_nop_func)
992+
993+#define __BPF_DISPATCHER_CALL(name) \
994+ static_call(bpf_dispatcher_##name##_call)(ctx, insnsi, bpf_func)
995+
996+#define __BPF_DISPATCHER_UPDATE(_d, _new) \
997+ __static_call_update((_d)->sc_key, (_d)->sc_tramp, (_new))
998+
999+#else
1000+#define __BPF_DISPATCHER_SC_INIT(name)
1001+#define __BPF_DISPATCHER_SC(name)
1002+#define __BPF_DISPATCHER_CALL(name) bpf_func(ctx, insnsi)
1003+#define __BPF_DISPATCHER_UPDATE(_d, _new)
1004+#endif
9751005
9761006 #define BPF_DISPATCHER_INIT(_name) { \
9771007 .mutex = __MUTEX_INITIALIZER(_name.mutex), \
@@ -984,34 +1014,21 @@ int __init bpf_arch_init_dispatcher_early(void *ip); · 6 unmodified lines
9841014 .name = #_name, \
9851015 .lnode = LIST_HEAD_INIT(_name.ksym.lnode), \
9861016 }, \
1017+ __BPF_DISPATCHER_SC_INIT(_name##_call) \
9871018 }
9881019
989−#define BPF_DISPATCHER_INIT_CALL(_name) \
990− static int __init _name##_init(void) \
991− { \
992− return bpf_arch_init_dispatcher_early(_name##_func); \
993− } \
994− early_initcall(_name##_init)
995−
996−#ifdef CONFIG_X86_64
997−#define BPF_DISPATCHER_ATTRIBUTES __attribute__((patchable_function_entry(5)))
998−#else
999−#define BPF_DISPATCHER_ATTRIBUTES
1000−#endif
1001−
10021020 #define DEFINE_BPF_DISPATCHER(name) \
1003− notrace BPF_DISPATCHER_ATTRIBUTES \
1021+ __BPF_DISPATCHER_SC(name); \
10041022 noinline __nocfi unsigned int bpf_dispatcher_##name##_func( \
10051023 const void *ctx, \
10061024 const struct bpf_insn *insnsi, \
10071025 bpf_func_t bpf_func) \
10081026 { \
1009− return bpf_func(ctx, insnsi); \
1027+ return __BPF_DISPATCHER_CALL(name); \
10101028 } \
10111029 EXPORT_SYMBOL(bpf_dispatcher_##name##_func); \
10121030 struct bpf_dispatcher bpf_dispatcher_##name = \
1013− BPF_DISPATCHER_INIT(bpf_dispatcher_##name); \
1014− BPF_DISPATCHER_INIT_CALL(bpf_dispatcher_##name);
1031+ BPF_DISPATCHER_INIT(bpf_dispatcher_##name);
10151032
10161033 #define DECLARE_BPF_DISPATCHER(name) \
10171034 unsigned int bpf_dispatcher_##name##_func( \
@@ -1019,6 +1036,7 @@ int __init bpf_arch_init_dispatcher_early(void *ip); · 1 unmodified line
10191036 const struct bpf_insn *insnsi, \
10201037 bpf_func_t bpf_func); \
10211038 extern struct bpf_dispatcher bpf_dispatcher_##name;
1039+
10221040 #define BPF_DISPATCHER_FUNC(name) bpf_dispatcher_##name##_func
10231041 #define BPF_DISPATCHER_PTR(name) (&bpf_dispatcher_##name)
10241042 void bpf_dispatcher_change_prog(struct bpf_dispatcher *d, struct bpf_prog *from,
include/linux/io_uring.h+3−0
@@ -16,6 +16,9 @@ enum io_uring_cmd_flags { · 15 unmodified lines
1616 IO_URING_F_SQE128 = 4,
1717 IO_URING_F_CQE32 = 8,
1818 IO_URING_F_IOPOLL = 16,
19+
20+ /* the request is executed from poll, it should not be freed */
21+ IO_URING_F_MULTISHOT = 32,
1922 };
2023
2124 struct io_uring_cmd {
include/linux/ring_buffer.h+1−1
@@ -100,7 +100,7 @@ __ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *k · 99 unmodified lines
100100
101101 int ring_buffer_wait(struct trace_buffer *buffer, int cpu, int full);
102102 __poll_t ring_buffer_poll_wait(struct trace_buffer *buffer, int cpu,
103− struct file *filp, poll_table *poll_table);
103+ struct file *filp, poll_table *poll_table, int full);
104104 void ring_buffer_wake_waiters(struct trace_buffer *buffer, int cpu);
105105
106106 #define RING_BUFFER_ALL_CPUS -1
include/linux/trace.h+2−2
@@ -26,13 +26,13 @@ struct trace_export { · 25 unmodified lines
2626 int flags;
2727 };
2828
29+struct trace_array;
30+
2931 #ifdef CONFIG_TRACING
3032
3133 int register_ftrace_export(struct trace_export *export);
3234 int unregister_ftrace_export(struct trace_export *export);
3335
34−struct trace_array;
35−
3636 void trace_printk_init_buffers(void);
3737 __printf(3, 4)
3838 int trace_array_printk(struct trace_array *tr, unsigned long ip,
include/linux/vfio.h+1−0
@@ -189,6 +189,7 @@ int vfio_register_emulated_iommu_dev(struct vfio_device *device); · 188 unmodified lines
189189 void vfio_unregister_group_dev(struct vfio_device *device);
190190
191191 int vfio_assign_device_set(struct vfio_device *device, void *set_id);
192+unsigned int vfio_device_set_open_count(struct vfio_device_set *dev_set);
192193
193194 int vfio_mig_get_next_state(struct vfio_device *device,
194195 enum vfio_device_mig_state cur_fsm,
include/net/ip.h+1−1
@@ -563,7 +563,7 @@ static inline void iph_to_flow_copy_v4addrs(struct flow_keys *flow, · 562 unmodified lines
563563 BUILD_BUG_ON(offsetof(typeof(flow->addrs), v4addrs.dst) !=
564564 offsetof(typeof(flow->addrs), v4addrs.src) +
565565 sizeof(flow->addrs.v4addrs.src));
566− memcpy(&flow->addrs.v4addrs, &iph->saddr, sizeof(flow->addrs.v4addrs));
566+ memcpy(&flow->addrs.v4addrs, &iph->addrs, sizeof(flow->addrs.v4addrs));
567567 flow->control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
568568 }
569569
include/net/ipv6.h+1−1
@@ -897,7 +897,7 @@ static inline void iph_to_flow_copy_v6addrs(struct flow_keys *flow, · 896 unmodified lines
897897 BUILD_BUG_ON(offsetof(typeof(flow->addrs), v6addrs.dst) !=
898898 offsetof(typeof(flow->addrs), v6addrs.src) +
899899 sizeof(flow->addrs.v6addrs.src));
900− memcpy(&flow->addrs.v6addrs, &iph->saddr, sizeof(flow->addrs.v6addrs));
900+ memcpy(&flow->addrs.v6addrs, &iph->addrs, sizeof(flow->addrs.v6addrs));
901901 flow->control.addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS;
902902 }
903903
include/net/sock.h+1−1
@@ -323,7 +323,7 @@ struct sk_filter; · 322 unmodified lines
323323 * @sk_tskey: counter to disambiguate concurrent tstamp requests
324324 * @sk_zckey: counter to order MSG_ZEROCOPY notifications
325325 * @sk_socket: Identd and reporting IO signals
326− * @sk_user_data: RPC layer private data
326+ * @sk_user_data: RPC layer private data. Write-protected by @sk_callback_lock.
327327 * @sk_frag: cached page frag
328328 * @sk_peek_off: current peek_offset value
329329 * @sk_send_head: front of stuff to transmit
include/soc/at91/sama7-ddr.h+4−1
@@ -26,7 +26,10 @@ · 25 unmodified lines
2626 #define DDR3PHY_PGSR (0x0C) /* DDR3PHY PHY General Status Register */
2727 #define DDR3PHY_PGSR_IDONE (1 << 0) /* Initialization Done */
2828
29−#define DDR3PHY_ACIOCR (0x24) /* DDR3PHY AC I/O Configuration Register */
29+#define DDR3PHY_ACDLLCR (0x14) /* DDR3PHY AC DLL Control Register */
30+#define DDR3PHY_ACDLLCR_DLLSRST (1 << 30) /* DLL Soft Reset */
31+
32+#define DDR3PHY_ACIOCR (0x24) /* DDR3PHY AC I/O Configuration Register */
3033 #define DDR3PHY_ACIOCR_CSPDD_CS0 (1 << 18) /* CS#[0] Power Down Driver */
3134 #define DDR3PHY_ACIOCR_CKPDD_CK0 (1 << 8) /* CK[0] Power Down Driver */
3235 #define DDR3PHY_ACIORC_ACPDD (1 << 3) /* AC Power Down Driver */
include/sound/hdmi-codec.h+4−0
@@ -124,7 +124,11 @@ struct hdmi_codec_ops { · 123 unmodified lines
124124 struct hdmi_codec_pdata {
125125 const struct hdmi_codec_ops *ops;
126126 uint i2s:1;
127+ uint no_i2s_playback:1;
128+ uint no_i2s_capture:1;
127129 uint spdif:1;
130+ uint no_spdif_playback:1;
131+ uint no_spdif_capture:1;
128132 int max_i2s_channels;
129133 void *data;
130134 };
include/uapi/linux/ip.h+4−2
@@ -100,8 +100,10 @@ struct iphdr { · 99 unmodified lines
100100 __u8 ttl;
101101 __u8 protocol;
102102 __sum16 check;
103− __be32 saddr;
104− __be32 daddr;
103+ __struct_group(/* no tag */, addrs, /* no attrs */,
104+ __be32 saddr;
105+ __be32 daddr;
106+ );
105107 /*The options start here. */
106108 };
107109
include/uapi/linux/ipv6.h+4−2
@@ -130,8 +130,10 @@ struct ipv6hdr { · 129 unmodified lines
130130 __u8 nexthdr;
131131 __u8 hop_limit;
132132
133− struct in6_addr saddr;
134− struct in6_addr daddr;
133+ __struct_group(/* no tag */, addrs, /* no attrs */,
134+ struct in6_addr saddr;
135+ struct in6_addr daddr;
136+ );
135137 };
136138
137139
io_uring/io_uring.c+1−1
@@ -1768,7 +1768,7 @@ int io_poll_issue(struct io_kiocb *req, bool *locked) · 1767 unmodified lines
17681768 io_tw_lock(req->ctx, locked);
17691769 if (unlikely(req->task->flags & PF_EXITING))
17701770 return -EFAULT;
1771− return io_issue_sqe(req, IO_URING_F_NONBLOCK);
1771+ return io_issue_sqe(req, IO_URING_F_NONBLOCK|IO_URING_F_MULTISHOT);
17721772 }
17731773
17741774 struct io_wq_work *io_wq_free_work(struct io_wq_work *work)
io_uring/io_uring.h+2−2
@@ -17,8 +17,8 @@ enum { · 16 unmodified lines
1717 IOU_ISSUE_SKIP_COMPLETE = -EIOCBQUEUED,
1818
1919 /*
20− * Intended only when both REQ_F_POLLED and REQ_F_APOLL_MULTISHOT
21− * are set to indicate to the poll runner that multishot should be
20+ * Intended only when both IO_URING_F_MULTISHOT is passed
21+ * to indicate to the poll runner that multishot should be
2222 * removed and the result is set on req->cqe.res.
2323 */
2424 IOU_STOP_MULTISHOT = -ECANCELED,
io_uring/net.c+9−14
@@ -67,8 +67,6 @@ struct io_sr_msg { · 66 unmodified lines
6767 struct io_kiocb *notif;
6868 };
6969
70−#define IO_APOLL_MULTI_POLLED (REQ_F_APOLL_MULTISHOT | REQ_F_POLLED)
71−
7270 int io_shutdown_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
7371 {
7472 struct io_shutdown *shutdown = io_kiocb_to_cmd(req, struct io_shutdown);
@@ -591,7 +589,8 @@ static inline void io_recv_prep_retry(struct io_kiocb *req) · 516 unmodified lines
591589 * again (for multishot).
592590 */
593591 static inline bool io_recv_finish(struct io_kiocb *req, int *ret,
594− unsigned int cflags, bool mshot_finished)
592+ unsigned int cflags, bool mshot_finished,
593+ unsigned issue_flags)
595594 {
596595 if (!(req->flags & REQ_F_APOLL_MULTISHOT)) {
597596 io_req_set_res(req, *ret, cflags);
@@ -614,7 +613,7 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret, · 16 unmodified lines
614613
615614 io_req_set_res(req, *ret, cflags);
616615
617− if (req->flags & REQ_F_POLLED)
616+ if (issue_flags & IO_URING_F_MULTISHOT)
618617 *ret = IOU_STOP_MULTISHOT;
619618 else
620619 *ret = IOU_OK;
@@ -773,8 +772,7 @@ retry_multishot: · 152 unmodified lines
773772 if (ret < min_ret) {
774773 if (ret == -EAGAIN && force_nonblock) {
775774 ret = io_setup_async_msg(req, kmsg, issue_flags);
776− if (ret == -EAGAIN && (req->flags & IO_APOLL_MULTI_POLLED) ==
777− IO_APOLL_MULTI_POLLED) {
775+ if (ret == -EAGAIN && (issue_flags & IO_URING_F_MULTISHOT)) {
778776 io_kbuf_recycle(req, issue_flags);
779777 return IOU_ISSUE_SKIP_COMPLETE;
780778 }
@@ -803,7 +801,7 @@ retry_multishot: · 22 unmodified lines
803801 if (kmsg->msg.msg_inq)
804802 cflags |= IORING_CQE_F_SOCK_NONEMPTY;
805803
806− if (!io_recv_finish(req, &ret, cflags, mshot_finished))
804+ if (!io_recv_finish(req, &ret, cflags, mshot_finished, issue_flags))
807805 goto retry_multishot;
808806
809807 if (mshot_finished) {
@@ -869,7 +867,7 @@ retry_multishot: · 59 unmodified lines
869867 ret = sock_recvmsg(sock, &msg, flags);
870868 if (ret < min_ret) {
871869 if (ret == -EAGAIN && force_nonblock) {
872− if ((req->flags & IO_APOLL_MULTI_POLLED) == IO_APOLL_MULTI_POLLED) {
870+ if (issue_flags & IO_URING_F_MULTISHOT) {
873871 io_kbuf_recycle(req, issue_flags);
874872 return IOU_ISSUE_SKIP_COMPLETE;
875873 }
@@ -902,7 +900,7 @@ out_free: · 26 unmodified lines
902900 if (msg.msg_inq)
903901 cflags |= IORING_CQE_F_SOCK_NONEMPTY;
904902
905− if (!io_recv_finish(req, &ret, cflags, ret <= 0))
903+ if (!io_recv_finish(req, &ret, cflags, ret <= 0, issue_flags))
906904 goto retry_multishot;
907905
908906 return ret;
@@ -1289,8 +1287,7 @@ retry: · 380 unmodified lines
12891287 * return EAGAIN to arm the poll infra since it
12901288 * has already been done
12911289 */
1292− if ((req->flags & IO_APOLL_MULTI_POLLED) ==
1293− IO_APOLL_MULTI_POLLED)
1290+ if (issue_flags & IO_URING_F_MULTISHOT)
12941291 ret = IOU_ISSUE_SKIP_COMPLETE;
12951292 return ret;
12961293 }
@@ -1315,9 +1312,7 @@ retry: · 18 unmodified lines
13151312 goto retry;
13161313
13171314 io_req_set_res(req, ret, 0);
1318− if (req->flags & REQ_F_POLLED)
1319− return IOU_STOP_MULTISHOT;
1320− return IOU_OK;
1315+ return (issue_flags & IO_URING_F_MULTISHOT) ? IOU_STOP_MULTISHOT : IOU_OK;
13211316 }
13221317
13231318 int io_socket_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
io_uring/poll.c+12−0
@@ -228,6 +228,13 @@ static int io_poll_check_events(struct io_kiocb *req, bool *locked) · 227 unmodified lines
228228 return IOU_POLL_DONE;
229229 if (v & IO_POLL_CANCEL_FLAG)
230230 return -ECANCELED;
231+ /*
232+ * cqe.res contains only events of the first wake up
233+ * and all others are be lost. Redo vfs_poll() to get
234+ * up to date state.
235+ */
236+ if ((v & IO_POLL_REF_MASK) != 1)
237+ req->cqe.res = 0;
231238
232239 /* the mask was stashed in __io_poll_execute */
233240 if (!req->cqe.res) {
@@ -239,6 +246,8 @@ static int io_poll_check_events(struct io_kiocb *req, bool *locked) · 5 unmodified lines
239246 continue;
240247 if (req->apoll_events & EPOLLONESHOT)
241248 return IOU_POLL_DONE;
249+ if (io_is_uring_fops(req->file))
250+ return IOU_POLL_DONE;
242251
243252 /* multishot, just fill a CQE and proceed */
244253 if (!(req->flags & REQ_F_APOLL_MULTISHOT)) {
@@ -258,6 +267,9 @@ static int io_poll_check_events(struct io_kiocb *req, bool *locked) · 13 unmodified lines
258267 return ret;
259268 }
260269
270+ /* force the next iteration to vfs_poll() */
271+ req->cqe.res = 0;
272+
261273 /*
262274 * Release all references, retry if someone tried to restart
263275 * task_work while we were executing it.
kernel/bpf/dispatcher.c+8−20
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 #include <linux/hash.h>
55 #include <linux/bpf.h>
66 #include <linux/filter.h>
7−#include <linux/init.h>
7+#include <linux/static_call.h>
88
99 /* The BPF dispatcher is a multiway branch code generator. The
1010 * dispatcher is a mechanism to avoid the performance penalty of an
@@ -91,11 +91,6 @@ int __weak arch_prepare_bpf_dispatcher(void *image, void *buf, s64 *funcs, int n · 80 unmodified lines
9191 return -ENOTSUPP;
9292 }
9393
94−int __weak __init bpf_arch_init_dispatcher_early(void *ip)
95−{
96− return -ENOTSUPP;
97−}
98−
9994 static int bpf_dispatcher_prepare(struct bpf_dispatcher *d, void *image, void *buf)
10095 {
10196 s64 ips[BPF_DISPATCHER_MAX] = {}, *ipsp = &ips[0];
@@ -110,17 +105,11 @@ static int bpf_dispatcher_prepare(struct bpf_dispatcher *d, void *image, void *b · 8 unmodified lines
110105
111106 static void bpf_dispatcher_update(struct bpf_dispatcher *d, int prev_num_progs)
112107 {
113− void *old, *new, *tmp;
114− u32 noff;
115− int err;
116−
117− if (!prev_num_progs) {
118− old = NULL;
119− noff = 0;
120− } else {
121− old = d->image + d->image_off;
108+ void *new, *tmp;
109+ u32 noff = 0;
110+
111+ if (prev_num_progs)
122112 noff = d->image_off ^ (PAGE_SIZE / 2);
123− }
124113
125114 new = d->num_progs ? d->image + noff : NULL;
126115 tmp = d->num_progs ? d->rw_image + noff : NULL;
@@ -134,11 +123,10 @@ static void bpf_dispatcher_update(struct bpf_dispatcher *d, int prev_num_progs) · 7 unmodified lines
134123 return;
135124 }
136125
137− err = bpf_arch_text_poke(d->func, BPF_MOD_JUMP, old, new);
138− if (err || !new)
139− return;
126+ __BPF_DISPATCHER_UPDATE(d, new ?: (void *)&bpf_dispatcher_nop_func);
140127
141− d->image_off = noff;
128+ if (new)
129+ d->image_off = noff;
142130 }
143131
144132 void bpf_dispatcher_change_prog(struct bpf_dispatcher *d, struct bpf_prog *from,
kernel/bpf/percpu_freelist.c+11−12
@@ -100,22 +100,21 @@ void pcpu_freelist_populate(struct pcpu_freelist *s, void *buf, u32 elem_size, · 99 unmodified lines
100100 u32 nr_elems)
101101 {
102102 struct pcpu_freelist_head *head;
103− int i, cpu, pcpu_entries;
103+ unsigned int cpu, cpu_idx, i, j, n, m;
104104
105− pcpu_entries = nr_elems / num_possible_cpus() + 1;
106− i = 0;
105+ n = nr_elems / num_possible_cpus();
106+ m = nr_elems % num_possible_cpus();
107107
108+ cpu_idx = 0;
108109 for_each_possible_cpu(cpu) {
109−again:
110110 head = per_cpu_ptr(s->freelist, cpu);
111− /* No locking required as this is not visible yet. */
112− pcpu_freelist_push_node(head, buf);
113− i++;
114− buf += elem_size;
115− if (i == nr_elems)
116− break;
117− if (i % pcpu_entries)
118− goto again;
111+ j = n + (cpu_idx < m ? 1 : 0);
112+ for (i = 0; i < j; i++) {
113+ /* No locking required as this is not visible yet. */
114+ pcpu_freelist_push_node(head, buf);
115+ buf += elem_size;
116+ }
117+ cpu_idx++;
119118 }
120119 }
121120
kernel/bpf/verifier.c+9−5
@@ -6745,11 +6745,11 @@ static int __check_func_call(struct bpf_verifier_env *env, struct bpf_insn *insn · 6744 unmodified lines
67456745 /* Transfer references to the callee */
67466746 err = copy_reference_state(callee, caller);
67476747 if (err)
6748− return err;
6748+ goto err_out;
67496749
67506750 err = set_callee_state_cb(env, caller, callee, *insn_idx);
67516751 if (err)
6752− return err;
6752+ goto err_out;
67536753
67546754 clear_caller_saved_regs(env, caller->regs);
67556755
@@ -6766,6 +6766,11 @@ static int __check_func_call(struct bpf_verifier_env *env, struct bpf_insn *insn · 10 unmodified lines
67666766 print_verifier_state(env, callee, true);
67676767 }
67686768 return 0;
6769+
6770+err_out:
6771+ free_func_state(callee);
6772+ state->frame[state->curframe + 1] = NULL;
6773+ return err;
67696774 }
67706775
67716776 int map_set_for_each_callback_args(struct bpf_verifier_env *env,
@@ -6979,8 +6984,7 @@ static int prepare_func_exit(struct bpf_verifier_env *env, int *insn_idx) · 207 unmodified lines
69796984 return -EINVAL;
69806985 }
69816986
6982− state->curframe--;
6983− caller = state->frame[state->curframe];
6987+ caller = state->frame[state->curframe - 1];
69846988 if (callee->in_callback_fn) {
69856989 /* enforce R0 return value range [0, 1]. */
69866990 struct tnum range = callee->callback_ret_range;
@@ -7019,7 +7023,7 @@ static int prepare_func_exit(struct bpf_verifier_env *env, int *insn_idx) · 32 unmodified lines
70197023 }
70207024 /* clear everything in the callee */
70217025 free_func_state(callee);
7022− state->frame[state->curframe + 1] = NULL;
7026+ state->frame[state->curframe--] = NULL;
70237027 return 0;
70247028 }
70257029
kernel/events/core.c+19−6
@@ -9306,14 +9306,27 @@ static int __perf_event_overflow(struct perf_event *event, · 9305 unmodified lines
93069306 }
93079307
93089308 if (event->attr.sigtrap) {
9309− /*
9310− * Should not be able to return to user space without processing
9311− * pending_sigtrap (kernel events can overflow multiple times).
9312− */
9313− WARN_ON_ONCE(event->pending_sigtrap && event->attr.exclude_kernel);
9309+ unsigned int pending_id = 1;
9310+
9311+ if (regs)
9312+ pending_id = hash32_ptr((void *)instruction_pointer(regs)) ?: 1;
93149313 if (!event->pending_sigtrap) {
9315− event->pending_sigtrap = 1;
9314+ event->pending_sigtrap = pending_id;
93169315 local_inc(&event->ctx->nr_pending);
9316+ } else if (event->attr.exclude_kernel) {
9317+ /*
9318+ * Should not be able to return to user space without
9319+ * consuming pending_sigtrap; with exceptions:
9320+ *
9321+ * 1. Where !exclude_kernel, events can overflow again
9322+ * in the kernel without returning to user space.
9323+ *
9324+ * 2. Events that can overflow again before the IRQ-
9325+ * work without user space progress (e.g. hrtimer).
9326+ * To approximate progress (with false negatives),
9327+ * check 32-bit hash of the current IP.
9328+ */
9329+ WARN_ON_ONCE(event->pending_sigtrap != pending_id);
93179330 }
93189331 event->pending_addr = data->addr;
93199332 irq_work_queue(&event->pending_irq);
kernel/kprobes.c+7−1
@@ -1766,7 +1766,13 @@ static int __unregister_kprobe_top(struct kprobe *p) · 1765 unmodified lines
17661766 if ((list_p != p) && (list_p->post_handler))
17671767 goto noclean;
17681768 }
1769− ap->post_handler = NULL;
1769+ /*
1770+ * For the kprobe-on-ftrace case, we keep the
1771+ * post_handler setting to identify this aggrprobe
1772+ * armed with kprobe_ipmodify_ops.
1773+ */
1774+ if (!kprobe_ftrace(ap))
1775+ ap->post_handler = NULL;
17701776 }
17711777 noclean:
17721778 /*
kernel/rseq.c+17−2
@@ -171,12 +171,27 @@ static int rseq_get_rseq_cs(struct task_struct *t, struct rseq_cs *rseq_cs) · 170 unmodified lines
171171 return 0;
172172 }
173173
174+static bool rseq_warn_flags(const char *str, u32 flags)
175+{
176+ u32 test_flags;
177+
178+ if (!flags)
179+ return false;
180+ test_flags = flags & RSEQ_CS_NO_RESTART_FLAGS;
181+ if (test_flags)
182+ pr_warn_once("Deprecated flags (%u) in %s ABI structure", test_flags, str);
183+ test_flags = flags & ~RSEQ_CS_NO_RESTART_FLAGS;
184+ if (test_flags)
185+ pr_warn_once("Unknown flags (%u) in %s ABI structure", test_flags, str);
186+ return true;
187+}
188+
174189 static int rseq_need_restart(struct task_struct *t, u32 cs_flags)
175190 {
176191 u32 flags, event_mask;
177192 int ret;
178193
179− if (WARN_ON_ONCE(cs_flags & RSEQ_CS_NO_RESTART_FLAGS) || cs_flags)
194+ if (rseq_warn_flags("rseq_cs", cs_flags))
180195 return -EINVAL;
181196
182197 /* Get thread flags. */
@@ -184,7 +199,7 @@ static int rseq_need_restart(struct task_struct *t, u32 cs_flags) · 1 unmodified line
184199 if (ret)
185200 return ret;
186201
187− if (WARN_ON_ONCE(flags & RSEQ_CS_NO_RESTART_FLAGS) || flags)
202+ if (rseq_warn_flags("rseq", flags))
188203 return -EINVAL;
189204
190205 /*
kernel/sched/core.c+35−17
@@ -4200,6 +4200,40 @@ out: · 4199 unmodified lines
42004200 return success;
42014201 }
42024202
4203+static bool __task_needs_rq_lock(struct task_struct *p)
4204+{
4205+ unsigned int state = READ_ONCE(p->__state);
4206+
4207+ /*
4208+ * Since pi->lock blocks try_to_wake_up(), we don't need rq->lock when
4209+ * the task is blocked. Make sure to check @state since ttwu() can drop
4210+ * locks at the end, see ttwu_queue_wakelist().
4211+ */
4212+ if (state == TASK_RUNNING || state == TASK_WAKING)
4213+ return true;
4214+
4215+ /*
4216+ * Ensure we load p->on_rq after p->__state, otherwise it would be
4217+ * possible to, falsely, observe p->on_rq == 0.
4218+ *
4219+ * See try_to_wake_up() for a longer comment.
4220+ */
4221+ smp_rmb();
4222+ if (p->on_rq)
4223+ return true;
4224+
4225+#ifdef CONFIG_SMP
4226+ /*
4227+ * Ensure the task has finished __schedule() and will not be referenced
4228+ * anymore. Again, see try_to_wake_up() for a longer comment.
4229+ */
4230+ smp_rmb();
4231+ smp_cond_load_acquire(&p->on_cpu, !VAL);
4232+#endif
4233+
4234+ return false;
4235+}
4236+
42034237 /**
42044238 * task_call_func - Invoke a function on task in fixed state
42054239 * @p: Process for which the function is to be invoked, can be @current.
@@ -4217,28 +4251,12 @@ out: · 11 unmodified lines
42174251 int task_call_func(struct task_struct *p, task_call_f func, void *arg)
42184252 {
42194253 struct rq *rq = NULL;
4220− unsigned int state;
42214254 struct rq_flags rf;
42224255 int ret;
42234256
42244257 raw_spin_lock_irqsave(&p->pi_lock, rf.flags);
42254258
4226− state = READ_ONCE(p->__state);
4227−
4228− /*
4229− * Ensure we load p->on_rq after p->__state, otherwise it would be
4230− * possible to, falsely, observe p->on_rq == 0.
4231− *
4232− * See try_to_wake_up() for a longer comment.
4233− */
4234− smp_rmb();
4235−
4236− /*
4237− * Since pi->lock blocks try_to_wake_up(), we don't need rq->lock when
4238− * the task is blocked. Make sure to check @state since ttwu() can drop
4239− * locks at the end, see ttwu_queue_wakelist().
4240− */
4241− if (state == TASK_RUNNING || state == TASK_WAKING || p->on_rq)
4259+ if (__task_needs_rq_lock(p))
42424260 rq = __task_rq_lock(p, &rf);
42434261
42444262 /*
kernel/trace/ftrace.c+3−2
@@ -1289,6 +1289,7 @@ static int ftrace_add_mod(struct trace_array *tr, · 1288 unmodified lines
12891289 if (!ftrace_mod)
12901290 return -ENOMEM;
12911291
1292+ INIT_LIST_HEAD(&ftrace_mod->list);
12921293 ftrace_mod->func = kstrdup(func, GFP_KERNEL);
12931294 ftrace_mod->module = kstrdup(module, GFP_KERNEL);
12941295 ftrace_mod->enable = enable;
@@ -3190,7 +3191,7 @@ static int ftrace_allocate_records(struct ftrace_page *pg, int count) · 1895 unmodified lines
31903191 /* if we can't allocate this size, try something smaller */
31913192 if (!order)
31923193 return -ENOMEM;
3193− order >>= 1;
3194+ order--;
31943195 goto again;
31953196 }
31963197
@@ -7391,7 +7392,7 @@ void __init ftrace_init(void) · 4194 unmodified lines
73917392 }
73927393
73937394 pr_info("ftrace: allocating %ld entries in %ld pages\n",
7394− count, count / ENTRIES_PER_PAGE + 1);
7395+ count, DIV_ROUND_UP(count, ENTRIES_PER_PAGE));
73957396
73967397 ret = ftrace_process_locs(NULL,
73977398 __start_mcount_loc,
kernel/trace/kprobe_event_gen_test.c+32−16
@@ -73,6 +73,10 @@ static struct trace_event_file *gen_kretprobe_test; · 72 unmodified lines
7373 #define KPROBE_GEN_TEST_ARG3 NULL
7474 #endif
7575
76+static bool trace_event_file_is_valid(struct trace_event_file *input)
77+{
78+ return input && !IS_ERR(input);
79+}
7680
7781 /*
7882 * Test to make sure we can create a kprobe event, then add more
@@ -139,6 +143,8 @@ static int __init test_gen_kprobe_cmd(void) · 60 unmodified lines
139143 kfree(buf);
140144 return ret;
141145 delete:
146+ if (trace_event_file_is_valid(gen_kprobe_test))
147+ gen_kprobe_test = NULL;
142148 /* We got an error after creating the event, delete it */
143149 ret = kprobe_event_delete("gen_kprobe_test");
144150 goto out;
@@ -202,6 +208,8 @@ static int __init test_gen_kretprobe_cmd(void) · 57 unmodified lines
202208 kfree(buf);
203209 return ret;
204210 delete:
211+ if (trace_event_file_is_valid(gen_kretprobe_test))
212+ gen_kretprobe_test = NULL;
205213 /* We got an error after creating the event, delete it */
206214 ret = kprobe_event_delete("gen_kretprobe_test");
207215 goto out;
@@ -217,10 +225,12 @@ static int __init kprobe_event_gen_test_init(void) · 9 unmodified lines
217225
218226 ret = test_gen_kretprobe_cmd();
219227 if (ret) {
220− WARN_ON(trace_array_set_clr_event(gen_kretprobe_test->tr,
221− "kprobes",
222− "gen_kretprobe_test", false));
223− trace_put_event_file(gen_kretprobe_test);
228+ if (trace_event_file_is_valid(gen_kretprobe_test)) {
229+ WARN_ON(trace_array_set_clr_event(gen_kretprobe_test->tr,
230+ "kprobes",
231+ "gen_kretprobe_test", false));
232+ trace_put_event_file(gen_kretprobe_test);
233+ }
224234 WARN_ON(kprobe_event_delete("gen_kretprobe_test"));
225235 }
226236
@@ -229,24 +239,30 @@ static int __init kprobe_event_gen_test_init(void) · 2 unmodified lines
229239
230240 static void __exit kprobe_event_gen_test_exit(void)
231241 {
232− /* Disable the event or you can't remove it */
233− WARN_ON(trace_array_set_clr_event(gen_kprobe_test->tr,
234− "kprobes",
235− "gen_kprobe_test", false));
242+ if (trace_event_file_is_valid(gen_kprobe_test)) {
243+ /* Disable the event or you can't remove it */
244+ WARN_ON(trace_array_set_clr_event(gen_kprobe_test->tr,
245+ "kprobes",
246+ "gen_kprobe_test", false));
247+
248+ /* Now give the file and instance back */
249+ trace_put_event_file(gen_kprobe_test);
250+ }
236251
237− /* Now give the file and instance back */
238− trace_put_event_file(gen_kprobe_test);
239252
240253 /* Now unregister and free the event */
241254 WARN_ON(kprobe_event_delete("gen_kprobe_test"));
242255
243− /* Disable the event or you can't remove it */
244− WARN_ON(trace_array_set_clr_event(gen_kretprobe_test->tr,
245− "kprobes",
246− "gen_kretprobe_test", false));
256+ if (trace_event_file_is_valid(gen_kretprobe_test)) {
257+ /* Disable the event or you can't remove it */
258+ WARN_ON(trace_array_set_clr_event(gen_kretprobe_test->tr,
259+ "kprobes",
260+ "gen_kretprobe_test", false));
261+
262+ /* Now give the file and instance back */
263+ trace_put_event_file(gen_kretprobe_test);
264+ }
247265
248− /* Now give the file and instance back */
249− trace_put_event_file(gen_kretprobe_test);
250266
251267 /* Now unregister and free the event */
252268 WARN_ON(kprobe_event_delete("gen_kretprobe_test"));
kernel/trace/rethook.c+3−1
@@ -83,8 +83,10 @@ struct rethook *rethook_alloc(void *data, rethook_handler_t handler) · 82 unmodified lines
8383 {
8484 struct rethook *rh = kzalloc(sizeof(struct rethook), GFP_KERNEL);
8585
86− if (!rh || !handler)
86+ if (!rh || !handler) {
87+ kfree(rh);
8788 return NULL;
89+ }
8890
8991 rh->data = data;
9092 rh->handler = handler;
kernel/trace/ring_buffer.c+50−21
@@ -519,6 +519,7 @@ struct ring_buffer_per_cpu { · 518 unmodified lines
519519 local_t committing;
520520 local_t commits;
521521 local_t pages_touched;
522+ local_t pages_lost;
522523 local_t pages_read;
523524 long last_pages_touch;
524525 size_t shortest_full;
@@ -894,10 +895,18 @@ size_t ring_buffer_nr_pages(struct trace_buffer *buffer, int cpu) · 369 unmodified lines
894895 size_t ring_buffer_nr_dirty_pages(struct trace_buffer *buffer, int cpu)
895896 {
896897 size_t read;
898+ size_t lost;
897899 size_t cnt;
898900
899901 read = local_read(&buffer->buffers[cpu]->pages_read);
902+ lost = local_read(&buffer->buffers[cpu]->pages_lost);
900903 cnt = local_read(&buffer->buffers[cpu]->pages_touched);
904+
905+ if (WARN_ON_ONCE(cnt < lost))
906+ return 0;
907+
908+ cnt -= lost;
909+
901910 /* The reader can read an empty page, but not more than that */
902911 if (cnt < read) {
903912 WARN_ON_ONCE(read > cnt + 1);
@@ -907,6 +916,21 @@ size_t ring_buffer_nr_dirty_pages(struct trace_buffer *buffer, int cpu) · 3 unmodified lines
907916 return cnt - read;
908917 }
909918
919+static __always_inline bool full_hit(struct trace_buffer *buffer, int cpu, int full)
920+{
921+ struct ring_buffer_per_cpu *cpu_buffer = buffer->buffers[cpu];
922+ size_t nr_pages;
923+ size_t dirty;
924+
925+ nr_pages = cpu_buffer->nr_pages;
926+ if (!nr_pages || !full)
927+ return true;
928+
929+ dirty = ring_buffer_nr_dirty_pages(buffer, cpu);
930+
931+ return (dirty * 100) > (full * nr_pages);
932+}
933+
910934 /*
911935 * rb_wake_up_waiters - wake up tasks waiting for ring buffer input
912936 *
@@ -1046,22 +1070,20 @@ int ring_buffer_wait(struct trace_buffer *buffer, int cpu, int full) · 133 unmodified lines
10461070 !ring_buffer_empty_cpu(buffer, cpu)) {
10471071 unsigned long flags;
10481072 bool pagebusy;
1049− size_t nr_pages;
1050− size_t dirty;
1073+ bool done;
10511074
10521075 if (!full)
10531076 break;
10541077
10551078 raw_spin_lock_irqsave(&cpu_buffer->reader_lock, flags);
10561079 pagebusy = cpu_buffer->reader_page == cpu_buffer->commit_page;
1057− nr_pages = cpu_buffer->nr_pages;
1058− dirty = ring_buffer_nr_dirty_pages(buffer, cpu);
1080+ done = !pagebusy && full_hit(buffer, cpu, full);
1081+
10591082 if (!cpu_buffer->shortest_full ||
10601083 cpu_buffer->shortest_full > full)
10611084 cpu_buffer->shortest_full = full;
10621085 raw_spin_unlock_irqrestore(&cpu_buffer->reader_lock, flags);
1063− if (!pagebusy &&
1064− (!nr_pages || (dirty * 100) > full * nr_pages))
1086+ if (done)
10651087 break;
10661088 }
10671089
@@ -1087,6 +1109,7 @@ int ring_buffer_wait(struct trace_buffer *buffer, int cpu, int full) · 19 unmodified lines
10871109 * @cpu: the cpu buffer to wait on
10881110 * @filp: the file descriptor
10891111 * @poll_table: The poll descriptor
1112+ * @full: wait until the percentage of pages are available, if @cpu != RING_BUFFER_ALL_CPUS
10901113 *
10911114 * If @cpu == RING_BUFFER_ALL_CPUS then the task will wake up as soon
10921115 * as data is added to any of the @buffer's cpu buffers. Otherwise
@@ -1096,14 +1119,15 @@ int ring_buffer_wait(struct trace_buffer *buffer, int cpu, int full) · 3 unmodified lines
10961119 * zero otherwise.
10971120 */
10981121 __poll_t ring_buffer_poll_wait(struct trace_buffer *buffer, int cpu,
1099− struct file *filp, poll_table *poll_table)
1122+ struct file *filp, poll_table *poll_table, int full)
11001123 {
11011124 struct ring_buffer_per_cpu *cpu_buffer;
11021125 struct rb_irq_work *work;
11031126
1104− if (cpu == RING_BUFFER_ALL_CPUS)
1127+ if (cpu == RING_BUFFER_ALL_CPUS) {
11051128 work = &buffer->irq_work;
1106− else {
1129+ full = 0;
1130+ } else {
11071131 if (!cpumask_test_cpu(cpu, buffer->cpumask))
11081132 return -EINVAL;
11091133
@@ -1111,8 +1135,14 @@ __poll_t ring_buffer_poll_wait(struct trace_buffer *buffer, int cpu, · 1 unmodified line
11111135 work = &cpu_buffer->irq_work;
11121136 }
11131137
1114− poll_wait(filp, &work->waiters, poll_table);
1115− work->waiters_pending = true;
1138+ if (full) {
1139+ poll_wait(filp, &work->full_waiters, poll_table);
1140+ work->full_waiters_pending = true;
1141+ } else {
1142+ poll_wait(filp, &work->waiters, poll_table);
1143+ work->waiters_pending = true;
1144+ }
1145+
11161146 /*
11171147 * There's a tight race between setting the waiters_pending and
11181148 * checking if the ring buffer is empty. Once the waiters_pending bit
@@ -1128,6 +1158,9 @@ __poll_t ring_buffer_poll_wait(struct trace_buffer *buffer, int cpu, · 9 unmodified lines
11281158 */
11291159 smp_mb();
11301160
1161+ if (full)
1162+ return full_hit(buffer, cpu, full) ? EPOLLIN | EPOLLRDNORM : 0;
1163+
11311164 if ((cpu == RING_BUFFER_ALL_CPUS && !ring_buffer_empty(buffer)) ||
11321165 (cpu != RING_BUFFER_ALL_CPUS && !ring_buffer_empty_cpu(buffer, cpu)))
11331166 return EPOLLIN | EPOLLRDNORM;
@@ -1769,9 +1802,9 @@ static void rb_free_cpu_buffer(struct ring_buffer_per_cpu *cpu_buffer) · 635 unmodified lines
17691802
17701803 free_buffer_page(cpu_buffer->reader_page);
17711804
1772− rb_head_page_deactivate(cpu_buffer);
1773−
17741805 if (head) {
1806+ rb_head_page_deactivate(cpu_buffer);
1807+
17751808 list_for_each_entry_safe(bpage, tmp, head, list) {
17761809 list_del_init(&bpage->list);
17771810 free_buffer_page(bpage);
@@ -2007,6 +2040,7 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned long nr_pages) · 229 unmodified lines
20072040 */
20082041 local_add(page_entries, &cpu_buffer->overrun);
20092042 local_sub(BUF_PAGE_SIZE, &cpu_buffer->entries_bytes);
2043+ local_inc(&cpu_buffer->pages_lost);
20102044 }
20112045
20122046 /*
@@ -2491,6 +2525,7 @@ rb_handle_head_page(struct ring_buffer_per_cpu *cpu_buffer, · 478 unmodified lines
24912525 */
24922526 local_add(entries, &cpu_buffer->overrun);
24932527 local_sub(BUF_PAGE_SIZE, &cpu_buffer->entries_bytes);
2528+ local_inc(&cpu_buffer->pages_lost);
24942529
24952530 /*
24962531 * The entries will be zeroed out when we move the
@@ -3155,10 +3190,6 @@ static void rb_commit(struct ring_buffer_per_cpu *cpu_buffer, · 658 unmodified lines
31553190 static __always_inline void
31563191 rb_wakeups(struct trace_buffer *buffer, struct ring_buffer_per_cpu *cpu_buffer)
31573192 {
3158− size_t nr_pages;
3159− size_t dirty;
3160− size_t full;
3161−
31623193 if (buffer->irq_work.waiters_pending) {
31633194 buffer->irq_work.waiters_pending = false;
31643195 /* irq_work_queue() supplies it's own memory barriers */
@@ -3182,10 +3213,7 @@ rb_wakeups(struct trace_buffer *buffer, struct ring_buffer_per_cpu *cpu_buffer) · 17 unmodified lines
31823213
31833214 cpu_buffer->last_pages_touch = local_read(&cpu_buffer->pages_touched);
31843215
3185− full = cpu_buffer->shortest_full;
3186− nr_pages = cpu_buffer->nr_pages;
3187− dirty = ring_buffer_nr_dirty_pages(buffer, cpu_buffer->cpu);
3188− if (full && nr_pages && (dirty * 100) <= full * nr_pages)
3216+ if (!full_hit(buffer, cpu_buffer->cpu, cpu_buffer->shortest_full))
31893217 return;
31903218
31913219 cpu_buffer->irq_work.wakeup_full = true;
@@ -5248,6 +5276,7 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer) · 2056 unmodified lines
52485276 local_set(&cpu_buffer->committing, 0);
52495277 local_set(&cpu_buffer->commits, 0);
52505278 local_set(&cpu_buffer->pages_touched, 0);
5279+ local_set(&cpu_buffer->pages_lost, 0);
52515280 local_set(&cpu_buffer->pages_read, 0);
52525281 cpu_buffer->last_pages_touch = 0;
52535282 cpu_buffer->shortest_full = 0;
kernel/trace/synth_event_gen_test.c+6−10
@@ -120,15 +120,13 @@ static int __init test_gen_synth_cmd(void) · 119 unmodified lines
120120
121121 /* Now generate a gen_synth_test event */
122122 ret = synth_event_trace_array(gen_synth_test, vals, ARRAY_SIZE(vals));
123− out:
123+ free:
124+ kfree(buf);
124125 return ret;
125126 delete:
126127 /* We got an error after creating the event, delete it */
127128 synth_event_delete("gen_synth_test");
128− free:
129− kfree(buf);
130−
131− goto out;
129+ goto free;
132130 }
133131
134132 /*
@@ -227,15 +225,13 @@ static int __init test_empty_synth_event(void) · 92 unmodified lines
227225
228226 /* Now trace an empty_synth_test event */
229227 ret = synth_event_trace_array(empty_synth_test, vals, ARRAY_SIZE(vals));
230− out:
228+ free:
229+ kfree(buf);
231230 return ret;
232231 delete:
233232 /* We got an error after creating the event, delete it */
234233 synth_event_delete("empty_synth_test");
235− free:
236− kfree(buf);
237−
238− goto out;
234+ goto free;
239235 }
240236
241237 static struct synth_field_desc create_synth_test_fields[] = {
kernel/trace/trace.c+7−5
@@ -6657,6 +6657,7 @@ static int tracing_release_pipe(struct inode *inode, struct file *file) · 6656 unmodified lines
66576657 mutex_unlock(&trace_types_lock);
66586658
66596659 free_cpumask_var(iter->started);
6660+ kfree(iter->fmt);
66606661 mutex_destroy(&iter->mutex);
66616662 kfree(iter);
66626663
@@ -6681,7 +6682,7 @@ trace_poll(struct trace_iterator *iter, struct file *filp, poll_table *poll_tabl · 18 unmodified lines
66816682 return EPOLLIN | EPOLLRDNORM;
66826683 else
66836684 return ring_buffer_poll_wait(iter->array_buffer->buffer, iter->cpu_file,
6684− filp, poll_table);
6685+ filp, poll_table, iter->tr->buffer_percent);
66856686 }
66866687
66876688 static __poll_t
@@ -7802,6 +7803,7 @@ static struct tracing_log_err *get_tracing_log_err(struct trace_array *tr, · 1114 unmodified lines
78027803 int len)
78037804 {
78047805 struct tracing_log_err *err;
7806+ char *cmd;
78057807
78067808 if (tr->n_err_log_entries < TRACING_LOG_ERRS_MAX) {
78077809 err = alloc_tracing_log_err(len);
@@ -7810,12 +7812,12 @@ static struct tracing_log_err *get_tracing_log_err(struct trace_array *tr, · 2 unmodified lines
78107812
78117813 return err;
78127814 }
7813−
7815+ cmd = kzalloc(len, GFP_KERNEL);
7816+ if (!cmd)
7817+ return ERR_PTR(-ENOMEM);
78147818 err = list_first_entry(&tr->err_log, struct tracing_log_err, list);
78157819 kfree(err->cmd);
7816− err->cmd = kzalloc(len, GFP_KERNEL);
7817− if (!err->cmd)
7818− return ERR_PTR(-ENOMEM);
7820+ err->cmd = cmd;
78197821 list_del(&err->list);
78207822
78217823 return err;
kernel/trace/trace_eprobe.c+6−2
@@ -52,6 +52,7 @@ static void trace_event_probe_cleanup(struct trace_eprobe *ep) · 51 unmodified lines
5252 kfree(ep->event_system);
5353 if (ep->event)
5454 trace_event_put_ref(ep->event);
55+ kfree(ep->filter_str);
5556 kfree(ep);
5657 }
5758
@@ -563,6 +564,9 @@ static void eprobe_trigger_func(struct event_trigger_data *data, · 505 unmodified lines
563564 {
564565 struct eprobe_data *edata = data->private_data;
565566
567+ if (unlikely(!rec))
568+ return;
569+
566570 __eprobe_trace_func(edata, rec);
567571 }
568572
@@ -642,7 +646,7 @@ new_eprobe_trigger(struct trace_eprobe *ep, struct trace_event_file *file) · 73 unmodified lines
642646 INIT_LIST_HEAD(&trigger->list);
643647
644648 if (ep->filter_str) {
645− ret = create_event_filter(file->tr, file->event_call,
649+ ret = create_event_filter(file->tr, ep->event,
646650 ep->filter_str, false, &filter);
647651 if (ret)
648652 goto error;
@@ -900,7 +904,7 @@ static int trace_eprobe_tp_update_arg(struct trace_eprobe *ep, const char *argv[ · 251 unmodified lines
900904
901905 static int trace_eprobe_parse_filter(struct trace_eprobe *ep, int argc, const char *argv[])
902906 {
903− struct event_filter *dummy;
907+ struct event_filter *dummy = NULL;
904908 int i, ret, len = 0;
905909 char *p;
906910
kernel/trace/trace_events_synth.c+2−3
@@ -828,10 +828,9 @@ static int register_synth_event(struct synth_event *event) · 827 unmodified lines
828828 }
829829
830830 ret = set_synth_event_print_fmt(call);
831− if (ret < 0) {
831+ /* unregister_trace_event() will be called inside */
832+ if (ret < 0)
832833 trace_remove_event_call(call);
833− goto err;
834− }
835834 out:
836835 return ret;
837836 err:
kernel/trace/trace_syscalls.c+0−2
@@ -201,8 +201,6 @@ print_syscall_exit(struct trace_iterator *iter, int flags, · 200 unmodified lines
201201 return trace_handle_return(s);
202202 }
203203
204−extern char *__bad_type_size(void);
205−
206204 #define SYSCALL_FIELD(_type, _name) { \
207205 .type = #_type, .name = #_name, \
208206 .size = sizeof(_type), .align = __alignof__(_type), \
mm/maccess.c+1−1
@@ -97,7 +97,7 @@ long strncpy_from_kernel_nofault(char *dst, const void *unsafe_addr, long count) · 96 unmodified lines
9797 return src - unsafe_addr;
9898 Efault:
9999 pagefault_enable();
100− dst[-1] = '\0';
100+ dst[0] = '\0';
101101 return -EFAULT;
102102 }
103103
net/bpf/test_run.c+1−0
@@ -774,6 +774,7 @@ static void *bpf_test_init(const union bpf_attr *kattr, u32 user_size, · 773 unmodified lines
774774 if (user_size > size)
775775 return ERR_PTR(-EMSGSIZE);
776776
777+ size = SKB_DATA_ALIGN(size);
777778 data = kzalloc(size + headroom + tailroom, GFP_USER);
778779 if (!data)
779780 return ERR_PTR(-ENOMEM);
net/bridge/br_vlan.c+14−3
@@ -959,6 +959,8 @@ int __br_vlan_set_proto(struct net_bridge *br, __be16 proto, · 958 unmodified lines
959959 list_for_each_entry(p, &br->port_list, list) {
960960 vg = nbp_vlan_group(p);
961961 list_for_each_entry(vlan, &vg->vlan_list, vlist) {
962+ if (vlan->priv_flags & BR_VLFLAG_ADDED_BY_SWITCHDEV)
963+ continue;
962964 err = vlan_vid_add(p->dev, proto, vlan->vid);
963965 if (err)
964966 goto err_filt;
@@ -973,8 +975,11 @@ int __br_vlan_set_proto(struct net_bridge *br, __be16 proto, · 8 unmodified lines
973975 /* Delete VLANs for the old proto from the device filter. */
974976 list_for_each_entry(p, &br->port_list, list) {
975977 vg = nbp_vlan_group(p);
976− list_for_each_entry(vlan, &vg->vlan_list, vlist)
978+ list_for_each_entry(vlan, &vg->vlan_list, vlist) {
979+ if (vlan->priv_flags & BR_VLFLAG_ADDED_BY_SWITCHDEV)
980+ continue;
977981 vlan_vid_del(p->dev, oldproto, vlan->vid);
982+ }
978983 }
979984
980985 return 0;
@@ -983,13 +988,19 @@ err_filt: · 2 unmodified lines
983988 attr.u.vlan_protocol = ntohs(oldproto);
984989 switchdev_port_attr_set(br->dev, &attr, NULL);
985990
986− list_for_each_entry_continue_reverse(vlan, &vg->vlan_list, vlist)
991+ list_for_each_entry_continue_reverse(vlan, &vg->vlan_list, vlist) {
992+ if (vlan->priv_flags & BR_VLFLAG_ADDED_BY_SWITCHDEV)
993+ continue;
987994 vlan_vid_del(p->dev, proto, vlan->vid);
995+ }
988996
989997 list_for_each_entry_continue_reverse(p, &br->port_list, list) {
990998 vg = nbp_vlan_group(p);
991− list_for_each_entry(vlan, &vg->vlan_list, vlist)
999+ list_for_each_entry(vlan, &vg->vlan_list, vlist) {
1000+ if (vlan->priv_flags & BR_VLFLAG_ADDED_BY_SWITCHDEV)
1001+ continue;
9921002 vlan_vid_del(p->dev, proto, vlan->vid);
1003+ }
9931004 }
9941005
9951006 return err;
net/caif/chnl_net.c+0−3
@@ -310,9 +310,6 @@ static int chnl_net_open(struct net_device *dev) · 309 unmodified lines
310310
311311 if (result == 0) {
312312 pr_debug("connect timeout\n");
313− caif_disconnect_client(dev_net(dev), &priv->chnl);
314− priv->state = CAIF_DISCONNECTED;
315− pr_debug("state disconnected\n");
316313 result = -ETIMEDOUT;
317314 goto error;
318315 }
net/dsa/dsa2.c+10−0
@@ -864,6 +864,14 @@ disconnect: · 863 unmodified lines
864864 return err;
865865 }
866866
867+static void dsa_switch_teardown_tag_protocol(struct dsa_switch *ds)
868+{
869+ const struct dsa_device_ops *tag_ops = ds->dst->tag_ops;
870+
871+ if (tag_ops->disconnect)
872+ tag_ops->disconnect(ds);
873+}
874+
867875 static int dsa_switch_setup(struct dsa_switch *ds)
868876 {
869877 struct dsa_devlink_priv *dl_priv;
@@ -953,6 +961,8 @@ static void dsa_switch_teardown(struct dsa_switch *ds) · 83 unmodified lines
953961 ds->slave_mii_bus = NULL;
954962 }
955963
964+ dsa_switch_teardown_tag_protocol(ds);
965+
956966 if (ds->ops->teardown)
957967 ds->ops->teardown(ds);
958968
net/dsa/dsa_priv.h+1−0
@@ -210,6 +210,7 @@ static inline struct net_device *dsa_master_find_slave(struct net_device *dev, · 209 unmodified lines
210210 extern struct rtnl_link_ops dsa_link_ops __read_mostly;
211211
212212 /* port.c */
213+bool dsa_port_supports_hwtstamp(struct dsa_port *dp, struct ifreq *ifr);
213214 void dsa_port_set_tag_protocol(struct dsa_port *cpu_dp,
214215 const struct dsa_device_ops *tag_ops);
215216 int dsa_port_set_state(struct dsa_port *dp, u8 state, bool do_fast_age);
net/dsa/master.c+1−2
@@ -204,8 +204,7 @@ static int dsa_master_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) · 203 unmodified lines
204204 * switch in the tree that is PTP capable.
205205 */
206206 list_for_each_entry(dp, &dst->ports, list)
207− if (dp->ds->ops->port_hwtstamp_get ||
208− dp->ds->ops->port_hwtstamp_set)
207+ if (dsa_port_supports_hwtstamp(dp, ifr))
209208 return -EBUSY;
210209 break;
211210 }
net/dsa/port.c+16−0
@@ -110,6 +110,22 @@ static bool dsa_port_can_configure_learning(struct dsa_port *dp) · 109 unmodified lines
110110 return !err;
111111 }
112112
113+bool dsa_port_supports_hwtstamp(struct dsa_port *dp, struct ifreq *ifr)
114+{
115+ struct dsa_switch *ds = dp->ds;
116+ int err;
117+
118+ if (!ds->ops->port_hwtstamp_get || !ds->ops->port_hwtstamp_set)
119+ return false;
120+
121+ /* "See through" shim implementations of the "get" method.
122+ * This will clobber the ifreq structure, but we will either return an
123+ * error, or the master will overwrite it with proper values.
124+ */
125+ err = ds->ops->port_hwtstamp_get(ds, dp->index, ifr);
126+ return err != -EOPNOTSUPP;
127+}
128+
113129 int dsa_port_set_state(struct dsa_port *dp, u8 state, bool do_fast_age)
114130 {
115131 struct dsa_switch *ds = dp->ds;
net/ipv4/Kconfig+10−0
@@ -402,6 +402,16 @@ config INET_IPCOMP · 401 unmodified lines
402402
403403 If unsure, say Y.
404404
405+config INET_TABLE_PERTURB_ORDER
406+ int "INET: Source port perturbation table size (as power of 2)" if EXPERT
407+ default 16
408+ help
409+ Source port perturbation table size (as power of 2) for
410+ RFC 6056 3.3.4. Algorithm 4: Double-Hash Port Selection Algorithm.
411+
412+ The default is almost always what you want.
413+ Only change this if you know what you are doing.
414+
405415 config INET_XFRM_TUNNEL
406416 tristate
407417 select INET_TUNNEL
net/ipv4/inet_hashtables.c+5−5
@@ -906,13 +906,13 @@ EXPORT_SYMBOL_GPL(inet_bhash2_update_saddr); · 905 unmodified lines
906906 * Note that we use 32bit integers (vs RFC 'short integers')
907907 * because 2^16 is not a multiple of num_ephemeral and this
908908 * property might be used by clever attacker.
909+ *
909910 * RFC claims using TABLE_LENGTH=10 buckets gives an improvement, though
910− * attacks were since demonstrated, thus we use 65536 instead to really
911− * give more isolation and privacy, at the expense of 256kB of kernel
912− * memory.
911+ * attacks were since demonstrated, thus we use 65536 by default instead
912+ * to really give more isolation and privacy, at the expense of 256kB
913+ * of kernel memory.
913914 */
914−#define INET_TABLE_PERTURB_SHIFT 16
915−#define INET_TABLE_PERTURB_SIZE (1 << INET_TABLE_PERTURB_SHIFT)
915+#define INET_TABLE_PERTURB_SIZE (1 << CONFIG_INET_TABLE_PERTURB_ORDER)
916916 static u32 *table_perturb;
917917
918918 int __inet_hash_connect(struct inet_timewait_death_row *death_row,
net/kcm/kcmsock.c+6−52
@@ -222,7 +222,7 @@ static void requeue_rx_msgs(struct kcm_mux *mux, struct sk_buff_head *head) · 221 unmodified lines
222222 struct sk_buff *skb;
223223 struct kcm_sock *kcm;
224224
225− while ((skb = __skb_dequeue(head))) {
225+ while ((skb = skb_dequeue(head))) {
226226 /* Reset destructor to avoid calling kcm_rcv_ready */
227227 skb->destructor = sock_rfree;
228228 skb_orphan(skb);
@@ -1085,53 +1085,17 @@ out_error: · 856 unmodified lines
10851085 return err;
10861086 }
10871087
1088−static struct sk_buff *kcm_wait_data(struct sock *sk, int flags,
1089− long timeo, int *err)
1090−{
1091− struct sk_buff *skb;
1092−
1093− while (!(skb = skb_peek(&sk->sk_receive_queue))) {
1094− if (sk->sk_err) {
1095− *err = sock_error(sk);
1096− return NULL;
1097− }
1098−
1099− if (sock_flag(sk, SOCK_DONE))
1100− return NULL;
1101−
1102− if ((flags & MSG_DONTWAIT) || !timeo) {
1103− *err = -EAGAIN;
1104− return NULL;
1105− }
1106−
1107− sk_wait_data(sk, &timeo, NULL);
1108−
1109− /* Handle signals */
1110− if (signal_pending(current)) {
1111− *err = sock_intr_errno(timeo);
1112− return NULL;
1113− }
1114− }
1115−
1116− return skb;
1117−}
1118−
11191088 static int kcm_recvmsg(struct socket *sock, struct msghdr *msg,
11201089 size_t len, int flags)
11211090 {
11221091 struct sock *sk = sock->sk;
11231092 struct kcm_sock *kcm = kcm_sk(sk);
11241093 int err = 0;
1125− long timeo;
11261094 struct strp_msg *stm;
11271095 int copied = 0;
11281096 struct sk_buff *skb;
11291097
1130− timeo = sock_rcvtimeo(sk, flags & MSG_DONTWAIT);
1131−
1132− lock_sock(sk);
1133−
1134− skb = kcm_wait_data(sk, flags, timeo, &err);
1098+ skb = skb_recv_datagram(sk, flags, &err);
11351099 if (!skb)
11361100 goto out;
11371101
@@ -1162,14 +1126,11 @@ msg_finished: · 24 unmodified lines
11621126 /* Finished with message */
11631127 msg->msg_flags |= MSG_EOR;
11641128 KCM_STATS_INCR(kcm->stats.rx_msgs);
1165− skb_unlink(skb, &sk->sk_receive_queue);
1166− kfree_skb(skb);
11671129 }
11681130 }
11691131
11701132 out:
1171− release_sock(sk);
1172−
1133+ skb_free_datagram(sk, skb);
11731134 return copied ? : err;
11741135 }
11751136
@@ -1179,7 +1140,6 @@ static ssize_t kcm_splice_read(struct socket *sock, loff_t *ppos, · 3 unmodified lines
11791140 {
11801141 struct sock *sk = sock->sk;
11811142 struct kcm_sock *kcm = kcm_sk(sk);
1182− long timeo;
11831143 struct strp_msg *stm;
11841144 int err = 0;
11851145 ssize_t copied;
@@ -1187,11 +1147,7 @@ static ssize_t kcm_splice_read(struct socket *sock, loff_t *ppos, · 1 unmodified line
11871147
11881148 /* Only support splice for SOCKSEQPACKET */
11891149
1190− timeo = sock_rcvtimeo(sk, flags & MSG_DONTWAIT);
1191−
1192− lock_sock(sk);
1193−
1194− skb = kcm_wait_data(sk, flags, timeo, &err);
1150+ skb = skb_recv_datagram(sk, flags, &err);
11951151 if (!skb)
11961152 goto err_out;
11971153
@@ -1219,13 +1175,11 @@ static ssize_t kcm_splice_read(struct socket *sock, loff_t *ppos, · 21 unmodified lines
12191175 * finish reading the message.
12201176 */
12211177
1222− release_sock(sk);
1223−
1178+ skb_free_datagram(sk, skb);
12241179 return copied;
12251180
12261181 err_out:
1227− release_sock(sk);
1228−
1182+ skb_free_datagram(sk, skb);
12291183 return err;
12301184 }
12311185
net/l2tp/l2tp_core.c+13−6
@@ -1150,8 +1150,10 @@ static void l2tp_tunnel_destruct(struct sock *sk) · 1149 unmodified lines
11501150 }
11511151
11521152 /* Remove hooks into tunnel socket */
1153+ write_lock_bh(&sk->sk_callback_lock);
11531154 sk->sk_destruct = tunnel->old_sk_destruct;
11541155 sk->sk_user_data = NULL;
1156+ write_unlock_bh(&sk->sk_callback_lock);
11551157
11561158 /* Call the original destructor */
11571159 if (sk->sk_destruct)
@@ -1469,16 +1471,18 @@ int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, · 311 unmodified lines
14691471 sock = sockfd_lookup(tunnel->fd, &ret);
14701472 if (!sock)
14711473 goto err;
1472−
1473− ret = l2tp_validate_socket(sock->sk, net, tunnel->encap);
1474− if (ret < 0)
1475− goto err_sock;
14761474 }
14771475
1476+ sk = sock->sk;
1477+ write_lock(&sk->sk_callback_lock);
1478+
1479+ ret = l2tp_validate_socket(sk, net, tunnel->encap);
1480+ if (ret < 0)
1481+ goto err_sock;
1482+
14781483 tunnel->l2tp_net = net;
14791484 pn = l2tp_pernet(net);
14801485
1481− sk = sock->sk;
14821486 sock_hold(sk);
14831487 tunnel->sock = sk;
14841488
@@ -1504,7 +1508,7 @@ int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, · 19 unmodified lines
15041508
15051509 setup_udp_tunnel_sock(net, sock, &udp_cfg);
15061510 } else {
1507− sk->sk_user_data = tunnel;
1511+ rcu_assign_sk_user_data(sk, tunnel);
15081512 }
15091513
15101514 tunnel->old_sk_destruct = sk->sk_destruct;
@@ -1518,6 +1522,7 @@ int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, · 7 unmodified lines
15181522 if (tunnel->fd >= 0)
15191523 sockfd_put(sock);
15201524
1525+ write_unlock(&sk->sk_callback_lock);
15211526 return 0;
15221527
15231528 err_sock:
@@ -1525,6 +1530,8 @@ err_sock: · 1 unmodified line
15251530 sock_release(sock);
15261531 else
15271532 sockfd_put(sock);
1533+
1534+ write_unlock(&sk->sk_callback_lock);
15281535 err:
15291536 return ret;
15301537 }
net/tls/tls_device_fallback.c+3−2
@@ -346,7 +346,7 @@ static struct sk_buff *tls_enc_skb(struct tls_context *tls_ctx, · 345 unmodified lines
346346 salt = tls_ctx->crypto_send.aes_gcm_256.salt;
347347 break;
348348 default:
349− return NULL;
349+ goto free_req;
350350 }
351351 cipher_sz = &tls_cipher_size_desc[tls_ctx->crypto_send.info.cipher_type];
352352 buf_len = cipher_sz->salt + cipher_sz->iv + TLS_AAD_SPACE_SIZE +
@@ -492,7 +492,8 @@ int tls_sw_fallback_init(struct sock *sk, · 139 unmodified lines
492492 key = ((struct tls12_crypto_info_aes_gcm_256 *)crypto_info)->key;
493493 break;
494494 default:
495− return -EINVAL;
495+ rc = -EINVAL;
496+ goto free_aead;
496497 }
497498 cipher_sz = &tls_cipher_size_desc[crypto_info->cipher_type];
498499
net/x25/x25_dev.c+1−1
@@ -117,7 +117,7 @@ int x25_lapb_receive_frame(struct sk_buff *skb, struct net_device *dev, · 116 unmodified lines
117117
118118 if (!pskb_may_pull(skb, 1)) {
119119 x25_neigh_put(nb);
120− return 0;
120+ goto drop;
121121 }
122122
123123 switch (skb->data[0]) {
scripts/package/mkdebian+1−1
@@ -90,7 +90,7 @@ if [ -n "$KDEB_PKGVERSION" ]; then · 89 unmodified lines
9090 packageversion=$KDEB_PKGVERSION
9191 revision=${packageversion##*-}
9292 else
93− revision=$(cat .version 2>/dev/null||echo 1)
93+ revision=$($srctree/init/build-version)
9494 packageversion=$version-$revision
9595 fi
9696 sourcename=$KDEB_SOURCENAME
sound/pci/hda/patch_realtek.c+2−0
@@ -9436,6 +9436,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { · 9435 unmodified lines
94369436 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP),
94379437 SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP),
94389438 SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
9439+ SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP),
9440+ SND_PCI_QUIRK(0x144d, 0xc1a6, "Samsung Galaxy Book Pro 360 (NP930QBD)", ALC298_FIXUP_SAMSUNG_AMP),
94399441 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8),
94409442 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP),
94419443 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP),
sound/soc/codecs/hdmi-codec.c+25−5
@@ -816,12 +816,19 @@ static int hdmi_dai_probe(struct snd_soc_dai *dai) · 815 unmodified lines
816816 .source = "RX",
817817 },
818818 };
819− int ret;
819+ int ret, i;
820820
821821 dapm = snd_soc_component_get_dapm(dai->component);
822− ret = snd_soc_dapm_add_routes(dapm, route, 2);
823− if (ret)
824− return ret;
822+
823+ /* One of the directions might be omitted for unidirectional DAIs */
824+ for (i = 0; i < ARRAY_SIZE(route); i++) {
825+ if (!route[i].source || !route[i].sink)
826+ continue;
827+
828+ ret = snd_soc_dapm_add_routes(dapm, &route[i], 1);
829+ if (ret)
830+ return ret;
831+ }
825832
826833 daifmt = devm_kzalloc(dai->dev, sizeof(*daifmt), GFP_KERNEL);
827834 if (!daifmt)
@@ -1009,11 +1016,24 @@ static int hdmi_codec_probe(struct platform_device *pdev) · 181 unmodified lines
10091016 if (hcd->i2s) {
10101017 daidrv[i] = hdmi_i2s_dai;
10111018 daidrv[i].playback.channels_max = hcd->max_i2s_channels;
1019+ if (hcd->no_i2s_playback)
1020+ memset(&daidrv[i].playback, 0,
1021+ sizeof(daidrv[i].playback));
1022+ if (hcd->no_i2s_capture)
1023+ memset(&daidrv[i].capture, 0,
1024+ sizeof(daidrv[i].capture));
10121025 i++;
10131026 }
10141027
1015− if (hcd->spdif)
1028+ if (hcd->spdif) {
10161029 daidrv[i] = hdmi_spdif_dai;
1030+ if (hcd->no_spdif_playback)
1031+ memset(&daidrv[i].playback, 0,
1032+ sizeof(daidrv[i].playback));
1033+ if (hcd->no_spdif_capture)
1034+ memset(&daidrv[i].capture, 0,
1035+ sizeof(daidrv[i].capture));
1036+ }
10171037
10181038 dev_set_drvdata(dev, hcp);
10191039
sound/usb/midi.c+1−3
@@ -1133,10 +1133,8 @@ static int snd_usbmidi_output_open(struct snd_rawmidi_substream *substream) · 1132 unmodified lines
11331133 port = &umidi->endpoints[i].out->ports[j];
11341134 break;
11351135 }
1136− if (!port) {
1137− snd_BUG();
1136+ if (!port)
11381137 return -ENXIO;
1139− }
11401138
11411139 substream->runtime->private_data = port;
11421140 port->state = STATE_UNKNOWN;
tools/arch/x86/include/asm/msr-index.h+5−3
@@ -535,6 +535,11 @@ · 534 unmodified lines
535535 #define MSR_AMD64_CPUID_FN_1 0xc0011004
536536 #define MSR_AMD64_LS_CFG 0xc0011020
537537 #define MSR_AMD64_DC_CFG 0xc0011022
538+
539+#define MSR_AMD64_DE_CFG 0xc0011029
540+#define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT 1
541+#define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE BIT_ULL(MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT)
542+
538543 #define MSR_AMD64_BU_CFG2 0xc001102a
539544 #define MSR_AMD64_IBSFETCHCTL 0xc0011030
540545 #define MSR_AMD64_IBSFETCHLINAD 0xc0011031
@@ -640,9 +645,6 @@ · 99 unmodified lines
640645 #define FAM10H_MMIO_CONF_BASE_MASK 0xfffffffULL
641646 #define FAM10H_MMIO_CONF_BASE_SHIFT 20
642647 #define MSR_FAM10H_NODE_ID 0xc001100c
643−#define MSR_F10H_DECFG 0xc0011029
644−#define MSR_F10H_DECFG_LFENCE_SERIALIZE_BIT 1
645−#define MSR_F10H_DECFG_LFENCE_SERIALIZE BIT_ULL(MSR_F10H_DECFG_LFENCE_SERIALIZE_BIT)
646648
647649 /* K8 MSRs */
648650 #define MSR_K8_TOP_MEM1 0xc001001a
tools/iio/iio_generic_buffer.c+2−2
@@ -715,12 +715,12 @@ int main(int argc, char **argv) · 714 unmodified lines
715715 continue;
716716 }
717717
718− toread = buf_len;
719718 } else {
720719 usleep(timedelay);
721− toread = 64;
722720 }
723721
722+ toread = buf_len;
723+
724724 read_size = read(buf_fd, data, toread * scan_size);
725725 if (read_size < 0) {
726726 if (errno == EAGAIN) {
tools/testing/selftests/bpf/prog_tests/varlen.c+7−0
@@ -63,6 +63,13 @@ void test_varlen(void) · 62 unmodified lines
6363 CHECK_VAL(data->total4, size1 + size2);
6464 CHECK(memcmp(data->payload4, exp_str, size1 + size2), "content_check",
6565 "doesn't match!\n");
66+
67+ CHECK_VAL(bss->ret_bad_read, -EFAULT);
68+ CHECK_VAL(data->payload_bad[0], 0x42);
69+ CHECK_VAL(data->payload_bad[1], 0x42);
70+ CHECK_VAL(data->payload_bad[2], 0);
71+ CHECK_VAL(data->payload_bad[3], 0x42);
72+ CHECK_VAL(data->payload_bad[4], 0x42);
6673 cleanup:
6774 test_varlen__destroy(skel);
6875 }
tools/testing/selftests/bpf/progs/test_varlen.c+5−0
@@ -19,6 +19,7 @@ __u64 payload1_len1 = 0; · 18 unmodified lines
1919 __u64 payload1_len2 = 0;
2020 __u64 total1 = 0;
2121 char payload1[MAX_LEN + MAX_LEN] = {};
22+__u64 ret_bad_read = 0;
2223
2324 /* .data */
2425 int payload2_len1 = -1;
@@ -36,6 +37,8 @@ int payload4_len2 = -1; · 11 unmodified lines
3637 int total4= -1;
3738 char payload4[MAX_LEN + MAX_LEN] = { 1 };
3839
40+char payload_bad[5] = { 0x42, 0x42, 0x42, 0x42, 0x42 };
41+
3942 SEC("raw_tp/sys_enter")
4043 int handler64_unsigned(void *regs)
4144 {
@@ -61,6 +64,8 @@ int handler64_unsigned(void *regs) · 19 unmodified lines
6164
6265 total1 = payload - (void *)payload1;
6366
67+ ret_bad_read = bpf_probe_read_kernel_str(payload_bad + 2, 1, (void *) -1);
68+
6469 return 0;
6570 }
6671
tools/testing/selftests/bpf/test_progs.c+1−1
@@ -1010,7 +1010,7 @@ static inline const char *str_msg(const struct msg *msg, char *buf) · 1009 unmodified lines
10101010 msg->subtest_done.have_log);
10111011 break;
10121012 case MSG_TEST_LOG:
1013− sprintf(buf, "MSG_TEST_LOG (cnt: %ld, last: %d)",
1013+ sprintf(buf, "MSG_TEST_LOG (cnt: %zu, last: %d)",
10141014 strlen(msg->test_log.log_buf),
10151015 msg->test_log.is_last);
10161016 break;
tools/testing/selftests/bpf/test_verifier.c+1−1
@@ -1260,7 +1260,7 @@ static int get_xlated_program(int fd_prog, struct bpf_insn **buf, int *cnt) · 1259 unmodified lines
12601260
12611261 bzero(&info, sizeof(info));
12621262 info.xlated_prog_len = xlated_prog_len;
1263− info.xlated_prog_insns = (__u64)*buf;
1263+ info.xlated_prog_insns = (__u64)(unsigned long)*buf;
12641264 if (bpf_obj_get_info_by_fd(fd_prog, &info, &info_len)) {
12651265 perror("second bpf_obj_get_info_by_fd failed");
12661266 goto out_free_buf;