Merge tag 'android11-5.4.295_r00' into android11-5.4

This merges the android11-5.4.295_r00 tag into the android11-5.4 branch,
catching it up with the latest LTS releases.

It contains the following commits:

*   978aeb58ff Merge 5.4.295 into android11-5.4-lts
|\
| * 39ed7800f9 Linux 5.4.295
| * 5d84869995 scsi: qedf: Use designated initializer for struct qed_fcoe_cb_ops
| * 64773b3ea0 arm64/ptrace: Fix stack-out-of-bounds read in regs_get_kernel_stack_nth()
| * 7b8f3c7217 perf: Fix sample vs do_exit()
| * cc2f923e92 s390/pci: Fix __pcilg_mio_inuser() inline assembly
| * b9dc8b84b9 rtc: test: Fix invalid format specifier.
| * 5c1a34ff5b jbd2: fix data-race and null-ptr-deref in jbd2_journal_dirty_metadata()
| * 753f142f7f mm/huge_memory: fix dereferencing invalid pmd migration entry
| * afef20f488 rtc: Make rtc_time64_to_tm() support dates before 1970
| * 31d87dda79 rtc: Improve performance of rtc_time64_to_tm(). Add tests.
| * 59892d18dd xprtrdma: fix pointer derefs in error cases of rpcrdma_ep_create
| * 78a4b8e379 posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del()
| * 0fee1b2b48 ARM: dts: am335x-bone-common: Increase MDIO reset deassert delay to 50ms
| * b9ffe75f36 ARM: dts: am335x-bone-common: Increase MDIO reset deassert time
| * 6a4c1721a7 ARM: dts: am335x-bone-common: Add GPIO PHY reset on revision C3 board
| * fcfccf56f4 net: atm: fix /proc/net/atm/lec handling
| * e91274cc7e net: atm: add lec_mutex
| * 956f149941 calipso: Fix null-ptr-deref in calipso_req_{set,del}attr().
| * 3998283e4c tipc: fix null-ptr-deref when acquiring remote ip of ethernet bearer
| * 4918865254 tcp: fix tcp_packet_delayed() for tcp_is_non_sack_preventing_reopen() behavior
| * c19c094342 atm: atmtcp: Free invalid length skb in atmtcp_c_send().
| * 2919297b18 mpls: Use rcu_dereference_rtnl() in mpls_route_input_rcu().
| * 0140d3d37f wifi: carl9170: do not ping device which has failed to load firmware
| * ed52e9652b aoe: clean device rq_list in aoedev_downdev()
| * c14c02a712 hwmon: (occ) fix unaligned accesses
| * 738066cdd0 drm/nouveau/bl: increase buffer size to avoid truncate warning
| * 2b9109de64 erofs: remove unused trace event erofs_destroy_inode
| * de2b7d137b ALSA: hda/realtek: enable headset mic on Latitude 5420 Rugged
| * 6357f20e00 ALSA: hda/intel: Add Thinkpad E15 to PM deny list
| * 82ff0cc5f5 Input: sparcspkr - avoid unannotated fall-through
| * 7a6d6b68db HID: usbhid: Eliminate recurrent out-of-bounds bug in usbhid_parse()
| * 5e0d009921 atm: Revert atm_account_tx() if copy_from_iter_full() fails.
| * a21966e594 selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len
| * 48222a330d scsi: s390: zfcp: Ensure synchronous unit_add
| * 8bc89302f3 scsi: storvsc: Increase the timeouts to storvsc_timeout
| * 7e860296d7 jffs2: check jffs2_prealloc_raw_node_refs() result in few other places
| * 337f80f3d5 jffs2: check that raw node were preallocated before writing summary
| * a8b5ea2e30 drivers/rapidio/rio_cm.c: prevent possible heap overwrite
| * a8b7347f5e Revert "x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2" on v6.6 and older
| * ba649593f3 powerpc/eeh: Fix missing PE bridge reconfiguration during VFIO EEH recovery
| * 65594ec9d2 platform/x86: dell_rbu: Stop overwriting data buffer
| * e6ff2952c3 platform: Add Surface platform directory
| * 882ff6d324 Revert "bus: ti-sysc: Probe for l4_wkup and l4_cfg interconnect devices first"
| * 77a06908a3 tee: Prevent size calculation wraparound on 32-bit kernels
| * 54edad2d2c ARM: OMAP2+: Fix l4ls clk domain handling in STANDBY
| * 41a4c323cc bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
| * df5bd72949 watchdog: da9052_wdt: respect TWDMIN
| * 872607632c i40e: fix MMIO write access to an invalid page in i40e_clear_hw
| * 7e372262cd sock: Correct error checking condition for (assign|release)_proto_idx()
| * ac7bfaa099 scsi: lpfc: Use memcpy() for BIOS version
| * 4f10da4e82 vxlan: Do not treat dst cache initialization errors as fatal
| * 90cba782f8 clk: rockchip: rk3036: mark ddrphy as critical
| * 7c24ad36d5 wifi: mac80211: do not offer a mesh path if forwarding is disabled
| * db876c0a05 net: mlx4: add SOF_TIMESTAMPING_TX_SOFTWARE flag when getting ts info
| * 7db634f5f6 pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get()
| * e29b3da920 pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction()
| * 3168358647 pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction()
| * ecbd6b4d83 pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name()
| * de9b7586f9 ipv4/route: Use this_cpu_inc() for stats on PREEMPT_RT
| * bcaf3c2f06 tcp: fix initial tp->rcvq_space.space value for passive TS enabled flows
| * 17c42ca3d1 tcp: always seek for minimal rtt in tcp_rcv_rtt_update()
| * 17813543a3 net: dlink: add synchronization for stats update
| * 8094640cdf sctp: Do not wake readers in __sctp_write_space()
| * c5ea7c6d0a emulex/benet: correct command version selection in be_cmd_get_stats()
| * aa588740e3 i2c: designware: Invoke runtime suspend on quick slave re-registration
| * 9a9fd4025b net: macb: Check return value of dma_set_mask_and_coherent()
| * 7f33b484bb cpufreq: Force sync policy boost with global boost on sysfs update
| * d4292853f7 nios2: force update_mmu_cache on spurious tlb-permission--related pagefaults
| * b0d92b9427 media: platform: exynos4-is: Add hardware sync wait to fimc_is_hw_change_mode()
| * 45f5a37b58 media: tc358743: ignore video while HPD is low
| * 8a8b77335f drm/amdkfd: Set SDMA_RLCx_IB_CNTL/SWITCH_INSIDE_IB
| * 0d50231d47 jfs: Fix null-ptr-deref in jfs_ioc_trim
| * c17707f2e7 drm/amdgpu/gfx9: fix CSIB handling
| * 3ba40789f5 drm/amdgpu/gfx8: fix CSIB handling
| * 81af4b34fd jfs: fix array-index-out-of-bounds read in add_missing_indices
| * 9a3b711f78 drm/amdgpu/gfx7: fix CSIB handling
| * d7f3ca1c09 drm/amdgpu/gfx10: fix CSIB handling
| * 8c49859140 drm/msm/a6xx: Increase HFI response timeout
| * 63074eed66 drm/amd/display: Add NULL pointer checks in dm_force_atomic_commit()
| * ceb810de2d media: uapi: v4l: Fix V4L2_TYPE_IS_OUTPUT condition
| * 9c60c173ab drm/msm/hdmi: add runtime PM calls to DDC transfer function
| * 08493880ff drm/bridge: analogix_dp: Add irq flag IRQF_NO_AUTOEN instead of calling disable_irq()
| * 88dec58190 sunrpc: update nextcheck time when adding new cache entries
| * 255959104f drm/amdgpu/gfx6: fix CSIB handling
| * 081558451e ACPI: battery: negate current when discharging
| * 44050a6c1a PM: runtime: fix denying of auto suspend in pm_suspend_timer_fn()
| * a9f710fc7a power: supply: bq27xxx: Retrieve again when busy
| * 1e0e629e88 ACPICA: fix acpi parse and parseext cache leaks
| * 2ca55d221b ACPICA: Avoid sequence overread in call to strncmp()
| * 4fa430a8bc ACPICA: fix acpi operand cache leak in dswstate.c
| * 0068025928 iio: adc: ad7606_spi: fix reg write value mask
| * acf5c9d8b3 PCI: Fix lock symmetry in pci_slot_unlock()
| * 300f543231 PCI: Add ACS quirk for Loongson PCIe
| * 0ac228f76f uio_hv_generic: Use correct size for interrupt and monitor pages
| * e66a241cb7 regulator: max14577: Add error check for max14577_read_reg()
| * 39fe75f00f mips: Add -std= flag specified in KBUILD_CFLAGS to vdso CFLAGS
| * 34d5ea7ee0 staging: iio: ad5933: Correct settling cycles encoding per datasheet
| * 119766de49 net: ch9200: fix uninitialised access during mii_nway_restart
| * d064c68781 ftrace: Fix UAF when lookup kallsym after ftrace disabled
| * 92311f8dfd dm-mirror: fix a tiny race condition
| * 3b443407da mtd: nand: sunxi: Add randomizer configuration before randomizer enable
| * b1f30e7c7d mtd: rawnand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk
| * b36ad2ddc2 mm: fix ratelimit_pages update error in dirty_ratio_handler()
| * 5f1e1573bf ipc: fix to protect IPCS lookups using RCU
| * 6a5cda7fd5 parisc: fix building with gcc-15
| * e44532b1c3 vgacon: Add check for vc_origin address range in vgacon_scroll()
| * ee20216f12 fbdev: Fix fb_set_var to prevent null-ptr-deref in fb_videomode_to_var
| * 0d02410db5 EDAC/altera: Use correct write width with the INTTEST register
| * a514fca2b8 NFC: nci: uart: Set tty->disc_data only in success path
| * d9a55869d8 f2fs: prevent kernel warning due to negative i_nlink from corrupted image
| * c1b9d140b0 Input: ims-pcu - check record size in ims_pcu_flash_firmware()
| * 922200f03b ext4: fix calculation of credits for extent tree modification
| * d3dfc60efd ext4: inline: fix len overflow in ext4_prepare_inline_data
| * e5d5647b7b bus: fsl-mc: do not add a device-link for the UAPI used DPMCP device
| * 67d66a5e45 ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330
| * 175925abd5 ARM: 9447/1: arm/memremap: fix arch_memremap_can_ram_remap()
| * ee141706e7 media: v4l2-dev: fix error handling in __video_register_device()
| * 658029a3c8 media: gspca: Add error handling for stv06xx_read_sensor()
| * b51ce65c44 wifi: rtlwifi: disable ASPM for RTL8723BE with subsystem ID 11ad:1723
| * bf78a2706c nfsd: nfsd4_spo_must_allow() must check this is a v4 compound request
| * 12134f79e5 wifi: p54: prevent buffer-overflow in p54_rx_eeprom_readback()
| * aad09bbe46 gfs2: move msleep to sleepable context
| * 64d0e07a9b configfs: Do not override creating attribute file failure in populate_attrs()
| * c50b9bb30c net: usb: aqc111: debug info before sanitation
| * 2186f01c75 calipso: unlock rcu before returning -EAFNOSUPPORT
| * bddb807958 xen/arm: call uaccess_ttbr0_enable for dm_op hypercall
| * b2ce37d86d usb: Flush altsetting 0 endpoints before reinitializating them after reset.
| * ae57ce58ac fs/filesystems: Fix potential unsigned integer underflow in fs_name()
| * ff70bd8ff4 net/mdiobus: Fix potential out-of-bounds read/write access
| * f4c6337da9 drm/amd/display: Do not add '-mhard-float' to dcn2{1,0}_resource.o for clang
| * d3e3345645 drm/amd/display: Do not add '-mhard-float' to dml_ccflags for clang
| * 92b7545695 MIPS: Move '-Wa,-msoft-float' check from as-option to cc-option
| * c33417f3b8 x86/boot/compressed: prefer cc-option for CFLAGS additions
| * 38c9d4f8e6 net: mdio: C22 is now optional, EOPNOTSUPP if not provided
| * da1f38bc18 net_sched: tbf: fix a race in tbf_change()
| * 2790c4ec48 net_sched: red: fix a race in __red_change()
| * 53d11560e9 net_sched: prio: fix a race in prio_tune()
| * 21498209cb net/mlx5: Fix return value when searching for existing flow group
| * 2fa390ee36 net/mlx5: Wait for inactive autogroups
| * 6ab93dcedc i40e: retry VFLR handling if there is ongoing VF reset
| * 4b4c8fd192 i40e: return false from i40e_reset_vf if reset is in progress
| * c337efb20d net_sched: sch_sfq: fix a potential crash on gso_skb handling
| * b076002838 scsi: iscsi: Fix incorrect error path labels for flashnode operations
| * 72c14aed68 NFSD: Fix NFSv3 SETATTR/CREATE's handling of large file sizes
| * d2211e6e34 NFSD: Fix ia_size underflow
| * 69aff1b73c Input: synaptics-rmi - fix crash with unsupported versions of F34
| * b475d189f4 Input: synaptics-rmi4 - convert to use sysfs_emit() APIs
| * eab11dcd6a pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id()
| * 787937c4e3 do_change_type(): refuse to operate on unmounted/not ours mounts
| * 36d91620a6 PM: sleep: Fix power.is_suspended cleanup for direct-complete devices
| * b0122774ab ice: create new Tx scheduler nodes for new queues only
| * 737f13ac66 Bluetooth: L2CAP: Fix not responding with L2CAP_CR_LE_ENCRYPTION
| * 589c0971af net/mlx4_en: Prevent potential integer overflow calculating Hz
| * 85ae8372cd vt: remove VT_RESIZE and VT_RESIZEX from vt_compat_ioctl()
| * a05ebe384c serial: Fix potential null-ptr-deref in mlb_usio_probe()
| * 095cc0b588 usb: renesas_usbhs: Reorder clock handling and power management in probe
| * 55d4b2734f rtc: Fix offset calculation for .start_secs < 0
| * 5023b76466 rtc: sh: assign correct interrupts with DT
| * a972ec94c3 perf record: Fix incorrect --user-regs comments
| * eed18824a1 perf tests switch-tracking: Fix timestamp comparison
| * 49d0662fea mfd: stmpe-spi: Correct the name used in MODULE_DEVICE_TABLE
| * 24358eb471 mfd: exynos-lpass: Avoid calling exynos_lpass_disable() twice in exynos_lpass_remove()
| * 7b44dbda2e rpmsg: qcom_smd: Fix uninitialized return variable in __qcom_smd_send()
| * 0ea2f7e9e3 perf scripts python: exported-sql-viewer.py: Fix pattern matching with Python 3
| * 43fe88b963 perf ui browser hists: Set actions->thread before calling do_zoom_thread()
| * 9027ce4c03 fbdev: core: fbcvt: avoid division by 0 in fb_cvt_hperiod()
| * 2beee9cf83 soc: aspeed: Add NULL check in aspeed_lpc_enable_snoop()
| * c07c8b4e33 soc: aspeed: lpc: Fix impossible judgment condition
| * 81e5357d47 arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma with Haikou
| * 4e4c974ab4 ARM: dts: qcom: apq8064 merge hw splinlock into corresponding syscon device
| * 12e4431e50 bus: fsl-mc: fix double-free on mc_dev
| * 2f11add2ff nilfs2: do not propagate ENOENT error from nilfs_btree_propagate()
| * 67d596979f nilfs2: add pointer check for nilfs_direct_propagate()
| * db7096ea16 Squashfs: check return result of sb_min_blocksize
| * 21bcf72e97 ARM: dts: at91: at91sam9263: fix NAND chip selects
| * d5373a0af2 ARM: dts: at91: usb_a9263: fix GPIO for Dataflash chip select
| * ce87f4c192 f2fs: fix to correct check conditions in f2fs_cross_rename
| * ab752ebd97 f2fs: use d_inode(dentry) cleanup dentry->d_inode
| * fc2da88411 calipso: Don't call calipso functions for AF_INET sk.
| * 961ad55974 net: lan743x: rename lan743x_reset_phy to lan743x_hw_reset_phy
| * 8c97655275 net: usb: aqc111: fix error handling of usbnet read calls
| * 48af842f4e netfilter: nf_tables: nft_fib_ipv6: fix VRF ipv4/ipv6 result discrepancy
| * e5ce9df1d6 wifi: ath9k_htc: Abort software beacon handling if disabled
| * 44ebe361ab bpf: Fix WARN() in get_bpf_raw_tp_regs
| * 264a5cf0c4 pinctrl: at91: Fix possible out-of-boundary access
| * ac7fca667b ktls, sockmap: Fix missing uncharge operation
| * 6d1ab8bf2e netfilter: bridge: Move specific fragmented packet to slow_path instead of dropping it
| * 879d3e0d54 f2fs: clean up w/ fscrypt_is_bounce_page()
| * ceb20ec671 RDMA/hns: Include hnae3.h in hns_roce_hw_v2.h
| * a052c91a7d wifi: rtw88: do not ignore hardware read error during DPK
| * 64f82c02df net: ncsi: Fix GCPS 64-bit member variables
| * 49bc7bf38e f2fs: fix to do sanity check on sbi->total_valid_block_count
| * 6a2be4740d drm/tegra: rgb: Fix the unbound reference count
| * 833d0acee9 drm/vkms: Adjust vkms_state->active_planes allocation type
| * e443e547a5 drm: rcar-du: Fix memory leak in rcar_du_vsps_init()
| * 593f0060fb selftests/seccomp: fix syscall_restart test for arm compat
| * 5c1d85c971 firmware: psci: Fix refcount leak in psci_dt_init
| * 629a2417ea m68k: mac: Fix macintosh_config for Mac II
| * dc796cdae6 drm/vmwgfx: Add seqno waiter for sync_files
| * 5571f36f21 spi: sh-msiof: Fix maximum DMA transfer size
| * d79fee3bc1 ACPI: OSI: Stop advertising support for "3.0 _SCP Extensions"
| * a3c189e7c1 x86/mtrr: Check if fixed-range MTRRs exist in mtrr_save_fixed_ranges()
| * 8eb5b081bc PM: wakeup: Delete space in the end of string shown by pm_show_wakelocks()
| * 80bf28fd62 EDAC/skx_common: Fix general protection fault
| * 8517d3af60 crypto: marvell/cesa - Avoid empty transfer descriptor
| * 32d3e8049a crypto: marvell/cesa - Handle zero-length skcipher requests
| * b48773f888 x86/cpu: Sanitize CPUID(0x80000000) output
| * 5b4da569a2 perf/core: Fix broken throttling when max_samples_per_tick=1
| * 7bf56bd74a gfs2: gfs2_create_inode error handling fix
| * 076d281e90 netfilter: nft_socket: fix sk refcount leaks
| * e49e994cd8 thunderbolt: Do not double dequeue a configuration request
| * 768668e159 usb: usbtmc: Fix timeout value in get_stb
| * 90da5d9876 usb: storage: Ignore UAS driver for SanDisk 3.2 Gen2 storage device
| * 5db9d2c508 usb: quirks: Add NO_LPM quirk for SanDisk Extreme 55AE
| * 0ce2e102ea pinctrl: armada-37xx: set GPIO output value before setting direction
| * 33b1b38acf pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31
| * 26fd2dbc65 tracing: Fix compilation warning on arm32
* b3fbf76488 Merge android11-5.4 into android11-5.4-lts

Change-Id: I5dc61fb04bfb3b890a77c22b1f6312ada2cc46df
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2025-07-16 06:41:33 +00:00 • committed by Treehugger Robot
commit 21224f4b67
222 changed files with 1289 additions and 652 deletions

View file

@ -4606,8 +4606,6 @@
Selecting 'on' will also enable the mitigation
against user space to user space task attacks.
Selecting specific mitigation does not force enable
user mitigations.
Selecting 'off' will disable both the kernel and
the user space protections.

View file

@ -10825,6 +10825,15 @@ L: netdev@vger.kernel.org
S: Supported
F: drivers/net/ethernet/mscc/
MICROSOFT SURFACE HARDWARE PLATFORM SUPPORT
M: Hans de Goede <hdegoede@redhat.com>
M: Mark Gross <mgross@linux.intel.com>
M: Maximilian Luz <luzmaximilian@gmail.com>
L: platform-driver-x86@vger.kernel.org
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
F: drivers/platform/surface/
MICROSOFT SURFACE PRO 3 BUTTON DRIVER
M: Chen Yu <yu.c.chen@intel.com>
L: platform-driver-x86@vger.kernel.org

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 294
SUBLEVEL = 295
EXTRAVERSION =
NAME = Kleptomaniac Octopus

View file

@ -145,6 +145,8 @@
/* MDIO */
AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0)
/* Added to support GPIO controlled PHY reset */
AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_OUTPUT_PULLUP, MUX_MODE7)
>;
};
@ -153,6 +155,8 @@
/* MDIO reset value */
AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLDOWN, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_MDC, PIN_INPUT_PULLDOWN, MUX_MODE7)
/* Added to support GPIO controlled PHY reset */
AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE7)
>;
};
@ -396,6 +400,10 @@
ethphy0: ethernet-phy@0 {
reg = <0>;
/* Support GPIO reset on revision C3 boards */
reset-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
reset-assert-us = <300>;
reset-deassert-us = <50000>;
};
};

View file

@ -147,7 +147,7 @@
nand@3 {
reg = <0x3 0x0 0x800000>;
rb-gpios = <&pioA 22 GPIO_ACTIVE_HIGH>;
cs-gpios = <&pioA 15 GPIO_ACTIVE_HIGH>;
cs-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>;
nand-bus-width = <8>;
nand-ecc-mode = "soft";
nand-on-flash-bbt;

View file

@ -211,12 +211,6 @@
};
};
sfpb_mutex: hwmutex {
compatible = "qcom,sfpb-mutex";
syscon = <&sfpb_wrapper_mutex 0x604 0x4>;
#hwlock-cells = <1>;
};
smem {
compatible = "qcom,smem";
memory-region = <&smem_region>;
@ -359,9 +353,10 @@
pinctrl-0 = <&ps_hold>;
};
sfpb_wrapper_mutex: syscon@1200000 {
compatible = "syscon";
reg = <0x01200000 0x8000>;
sfpb_mutex: hwmutex@1200600 {
compatible = "qcom,sfpb-mutex";
reg = <0x01200600 0x100>;
#hwlock-cells = <1>;
};
intc: interrupt-controller@2000000 {

View file

@ -64,7 +64,7 @@
nand@3 {
reg = <0x3 0x0 0x800000>;
rb-gpios = <&pioA 22 GPIO_ACTIVE_HIGH>;
cs-gpios = <&pioA 15 GPIO_ACTIVE_HIGH>;
cs-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>;
nand-bus-width = <8>;
nand-ecc-mode = "soft";
nand-on-flash-bbt;

View file

@ -58,7 +58,7 @@
};
spi0: spi@fffa4000 {
cs-gpios = <&pioB 15 GPIO_ACTIVE_HIGH>;
cs-gpios = <&pioA 5 GPIO_ACTIVE_LOW>;
status = "okay";
mtd_dataflash@0 {
compatible = "atmel,at45", "atmel,dataflash";
@ -84,7 +84,7 @@
nand@3 {
reg = <0x3 0x0 0x800000>;
rb-gpios = <&pioA 22 GPIO_ACTIVE_HIGH>;
cs-gpios = <&pioA 15 GPIO_ACTIVE_HIGH>;
cs-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>;
nand-bus-width = <8>;
nand-ecc-mode = "soft";
nand-on-flash-bbt;

View file

@ -48,6 +48,7 @@
#define CLKDM_NO_AUTODEPS (1 << 4)
#define CLKDM_ACTIVE_WITH_MPU (1 << 5)
#define CLKDM_MISSING_IDLE_REPORTING (1 << 6)
#define CLKDM_STANDBY_FORCE_WAKEUP BIT(7)
#define CLKDM_CAN_HWSUP (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO)
#define CLKDM_CAN_SWSUP (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP)

View file

@ -27,7 +27,7 @@ static struct clockdomain l4ls_am33xx_clkdm = {
.pwrdm = { .name = "per_pwrdm" },
.cm_inst = AM33XX_CM_PER_MOD,
.clkdm_offs = AM33XX_CM_PER_L4LS_CLKSTCTRL_OFFSET,
.flags = CLKDM_CAN_SWSUP,
.flags = CLKDM_CAN_SWSUP | CLKDM_STANDBY_FORCE_WAKEUP,
};
static struct clockdomain l3s_am33xx_clkdm = {

View file

@ -28,6 +28,9 @@
#include "cm-regbits-34xx.h"
#include "cm-regbits-33xx.h"
#include "prm33xx.h"
#if IS_ENABLED(CONFIG_SUSPEND)
#include <linux/suspend.h>
#endif
/*
* CLKCTRL_IDLEST_*: possible values for the CM_*_CLKCTRL.IDLEST bitfield:
@ -336,8 +339,17 @@ static int am33xx_clkdm_clk_disable(struct clockdomain *clkdm)
{
bool hwsup = false;
#if IS_ENABLED(CONFIG_SUSPEND)
/*
* In case of standby, Don't put the l4ls clk domain to sleep.
* Since CM3 PM FW doesn't wake-up/enable the l4ls clk domain
* upon wake-up, CM3 PM FW fails to wake-up th MPU.
*/
if (pm_suspend_target_state == PM_SUSPEND_STANDBY &&
(clkdm->flags & CLKDM_STANDBY_FORCE_WAKEUP))
return 0;
#endif
hwsup = am33xx_cm_is_clkdm_in_hwsup(clkdm->cm_inst, clkdm->clkdm_offs);
if (!hwsup && (clkdm->flags & CLKDM_CAN_FORCE_SLEEP))
am33xx_clkdm_sleep(clkdm);

View file

@ -504,7 +504,5 @@ void __init early_ioremap_init(void)
bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size,
unsigned long flags)
{
unsigned long pfn = PHYS_PFN(offset);
return memblock_is_map_memory(pfn);
return memblock_is_map_memory(offset);
}

View file

@ -246,14 +246,6 @@
status = "okay";
};
&usb_host0_ehci {
status = "okay";
};
&usb_host0_ohci {
status = "okay";
};
&vopb {
status = "okay";
};

View file

@ -140,7 +140,7 @@ unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n)
addr += n;
if (regs_within_kernel_stack(regs, (unsigned long)addr))
return *addr;
return READ_ONCE_NOCHECK(*addr);
else
return 0;
}

View file

@ -84,7 +84,26 @@ HYPERCALL1(tmem_op);
HYPERCALL1(platform_op_raw);
HYPERCALL2(multicall);
HYPERCALL2(vm_assist);
HYPERCALL3(dm_op);
SYM_FUNC_START(HYPERVISOR_dm_op)
mov x16, #__HYPERVISOR_dm_op; \
/*
* dm_op hypercalls are issued by the userspace. The kernel needs to
* enable access to TTBR0_EL1 as the hypervisor would issue stage 1
* translations to user memory via AT instructions. Since AT
* instructions are not affected by the PAN bit (ARMv8.1), we only
* need the explicit uaccess_enable/disable if the TTBR0 PAN emulation
* is enabled (it implies that hardware UAO and PAN disabled).
*/
uaccess_ttbr0_enable x6, x7, x8
hvc XEN_IMM
/*
* Disable userspace access from kernel once the hyp call completed.
*/
uaccess_ttbr0_disable x6, x7
ret
SYM_FUNC_END(HYPERVISOR_dm_op);
ENTRY(privcmd_call)
mov x16, x0

View file

@ -804,7 +804,7 @@ static void __init mac_identify(void)
}
macintosh_config = mac_data_table;
for (m = macintosh_config; m->ident != -1; m++) {
for (m = &mac_data_table[1]; m->ident != -1; m++) {
if (m->ident == model) {
macintosh_config = m;
break;

View file

@ -107,7 +107,7 @@ endif
# (specifically newer than 2.24.51.20140728) we then also need to explicitly
# set ".set hardfloat" in all files which manipulate floating point registers.
#
ifneq ($(call as-option,-Wa$(comma)-msoft-float,),)
ifneq ($(call cc-option,$(cflags-y) -Wa$(comma)-msoft-float,),)
cflags-y += -DGAS_HAS_SET_HARDFLOAT -Wa,-msoft-float
endif

View file

@ -29,6 +29,7 @@ endif
# offsets.
cflags-vdso := $(ccflags-vdso) \
$(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \
$(filter -std=%,$(KBUILD_CFLAGS)) \
-O3 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \
-fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \
$(call cc-option, -fno-asynchronous-unwind-tables) \

View file

@ -297,4 +297,20 @@ extern void __init mmu_init(void);
extern void update_mmu_cache(struct vm_area_struct *vma,
unsigned long address, pte_t *pte);
static inline int pte_same(pte_t pte_a, pte_t pte_b);
#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
static inline int ptep_set_access_flags(struct vm_area_struct *vma,
unsigned long address, pte_t *ptep,
pte_t entry, int dirty)
{
if (!pte_same(*ptep, entry))
set_ptes(vma->vm_mm, address, ptep, entry, 1);
/*
* update_mmu_cache will unconditionally execute, handling both
* the case that the PTE changed and the spurious fault case.
*/
return true;
}
#endif /* _ASM_NIOS2_PGTABLE_H */

View file

@ -21,6 +21,7 @@ KBUILD_CFLAGS += -fno-PIE -mno-space-regs -mdisable-fpregs -Os
ifndef CONFIG_64BIT
KBUILD_CFLAGS += -mfast-indirect-calls
endif
KBUILD_CFLAGS += -std=gnu11
OBJECTS += $(obj)/head.o $(obj)/real2.o $(obj)/firmware.o $(obj)/misc.o $(obj)/piggy.o

View file

@ -1723,6 +1723,8 @@ int eeh_pe_configure(struct eeh_pe *pe)
/* Invalid PE ? */
if (!pe)
return -ENODEV;
else
ret = eeh_ops->configure_bridge(pe);
return ret;
}

View file

@ -227,7 +227,7 @@ static inline int __pcilg_mio_inuser(
:
[cc] "+d" (cc), [val] "=d" (val), [len] "+d" (len),
[dst] "+a" (dst), [cnt] "+d" (cnt), [tmp] "=d" (tmp),
[shift] "+d" (shift)
[shift] "+a" (shift)
:
[ioaddr] "a" (addr)
: "cc", "memory");

View file

@ -39,7 +39,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
KBUILD_CFLAGS += -Wno-pointer-sign
# Disable relocation relaxation in case the link is not PIE.
KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mrelax-relocations=no)
KBUILD_CFLAGS += $(call cc-option,-Wa$(comma)-mrelax-relocations=no)
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
GCOV_PROFILE := n

View file

@ -1050,13 +1050,9 @@ static __ro_after_init enum spectre_v2_mitigation_cmd spectre_v2_cmd;
static enum spectre_v2_user_cmd __init
spectre_v2_parse_user_cmdline(void)
{
enum spectre_v2_user_cmd mode;
char arg[20];
int ret, i;
mode = IS_ENABLED(CONFIG_MITIGATION_SPECTRE_V2) ?
SPECTRE_V2_USER_CMD_AUTO : SPECTRE_V2_USER_CMD_NONE;
switch (spectre_v2_cmd) {
case SPECTRE_V2_CMD_NONE:
return SPECTRE_V2_USER_CMD_NONE;
@ -1069,7 +1065,7 @@ spectre_v2_parse_user_cmdline(void)
ret = cmdline_find_option(boot_command_line, "spectre_v2_user",
arg, sizeof(arg));
if (ret < 0)
return mode;
return SPECTRE_V2_USER_CMD_AUTO;
for (i = 0; i < ARRAY_SIZE(v2_user_options); i++) {
if (match_option(arg, ret, v2_user_options[i].option)) {
@ -1079,8 +1075,8 @@ spectre_v2_parse_user_cmdline(void)
}
}
pr_err("Unknown user space protection option (%s). Switching to default\n", arg);
return mode;
pr_err("Unknown user space protection option (%s). Switching to AUTO select\n", arg);
return SPECTRE_V2_USER_CMD_AUTO;
}
static inline bool spectre_v2_in_eibrs_mode(enum spectre_v2_mitigation mode)

View file

@ -934,17 +934,18 @@ void get_cpu_cap(struct cpuinfo_x86 *c)
c->x86_capability[CPUID_D_1_EAX] = eax;
}
/* AMD-defined flags: level 0x80000001 */
/*
* Check if extended CPUID leaves are implemented: Max extended
* CPUID leaf must be in the 0x80000001-0x8000ffff range.
*/
eax = cpuid_eax(0x80000000);
c->extended_cpuid_level = eax;
c->extended_cpuid_level = ((eax & 0xffff0000) == 0x80000000) ? eax : 0;
if ((eax & 0xffff0000) == 0x80000000) {
if (eax >= 0x80000001) {
cpuid(0x80000001, &eax, &ebx, &ecx, &edx);
if (c->extended_cpuid_level >= 0x80000001) {
cpuid(0x80000001, &eax, &ebx, &ecx, &edx);
c->x86_capability[CPUID_8000_0001_ECX] = ecx;
c->x86_capability[CPUID_8000_0001_EDX] = edx;
}
c->x86_capability[CPUID_8000_0001_ECX] = ecx;
c->x86_capability[CPUID_8000_0001_EDX] = edx;
}
if (c->extended_cpuid_level >= 0x80000007) {

View file

@ -350,7 +350,7 @@ static void get_fixed_ranges(mtrr_type *frs)
void mtrr_save_fixed_ranges(void *info)
{
if (boot_cpu_has(X86_FEATURE_MTRR))
if (mtrr_state.have_fixed)
get_fixed_ranges(mtrr_state.fixed_ranges);
}

View file

@ -668,6 +668,8 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
union acpi_parse_object *arguments[ACPI_OBJ_NUM_OPERANDS];
u32 arg_count = 0;
u32 index = walk_state->num_operands;
u32 prev_num_operands = walk_state->num_operands;
u32 new_num_operands;
u32 i;
ACPI_FUNCTION_TRACE_PTR(ds_create_operands, first_arg);
@ -696,6 +698,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
/* Create the interpreter arguments, in reverse order */
new_num_operands = index;
index--;
for (i = 0; i < arg_count; i++) {
arg = arguments[index];
@ -720,7 +723,11 @@ cleanup:
* pop everything off of the operand stack and delete those
* objects
*/
acpi_ds_obj_stack_pop_and_delete(arg_count, walk_state);
walk_state->num_operands = i;
acpi_ds_obj_stack_pop_and_delete(new_num_operands, walk_state);
/* Restore operand count */
walk_state->num_operands = prev_num_operands;
ACPI_EXCEPTION((AE_INFO, status, "While creating Arg %u", index));
return_ACPI_STATUS(status);

View file

@ -639,7 +639,8 @@ acpi_status
acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
union acpi_parse_object *op, acpi_status status)
{
acpi_status status2;
acpi_status return_status = status;
u8 ascending = TRUE;
ACPI_FUNCTION_TRACE_PTR(ps_complete_final_op, walk_state);
@ -653,7 +654,7 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
op));
do {
if (op) {
if (walk_state->ascending_callback != NULL) {
if (ascending && walk_state->ascending_callback != NULL) {
walk_state->op = op;
walk_state->op_info =
acpi_ps_get_opcode_info(op->common.
@ -675,49 +676,26 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
}
if (status == AE_CTRL_TERMINATE) {
status = AE_OK;
/* Clean up */
do {
if (op) {
status2 =
acpi_ps_complete_this_op
(walk_state, op);
if (ACPI_FAILURE
(status2)) {
return_ACPI_STATUS
(status2);
}
}
acpi_ps_pop_scope(&
(walk_state->
parser_state),
&op,
&walk_state->
arg_types,
&walk_state->
arg_count);
} while (op);
return_ACPI_STATUS(status);
ascending = FALSE;
return_status = AE_CTRL_TERMINATE;
}
else if (ACPI_FAILURE(status)) {
/* First error is most important */
(void)
acpi_ps_complete_this_op(walk_state,
op);
return_ACPI_STATUS(status);
ascending = FALSE;
return_status = status;
}
}
status2 = acpi_ps_complete_this_op(walk_state, op);
if (ACPI_FAILURE(status2)) {
return_ACPI_STATUS(status2);
status = acpi_ps_complete_this_op(walk_state, op);
if (ACPI_FAILURE(status)) {
ascending = FALSE;
if (ACPI_SUCCESS(return_status) ||
return_status == AE_CTRL_TERMINATE) {
return_status = status;
}
}
}
@ -727,5 +705,5 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
} while (op);
return_ACPI_STATUS(status);
return_ACPI_STATUS(return_status);
}

View file

@ -266,10 +266,23 @@ static int acpi_battery_get_property(struct power_supply *psy,
break;
case POWER_SUPPLY_PROP_CURRENT_NOW:
case POWER_SUPPLY_PROP_POWER_NOW:
if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN)
if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN) {
ret = -ENODEV;
else
val->intval = battery->rate_now * 1000;
break;
}
val->intval = battery->rate_now * 1000;
/*
* When discharging, the current should be reported as a
* negative number as per the power supply class interface
* definition.
*/
if (psp == POWER_SUPPLY_PROP_CURRENT_NOW &&
(battery->state & ACPI_BATTERY_STATE_DISCHARGING) &&
acpi_battery_handle_discharging(battery)
== POWER_SUPPLY_STATUS_DISCHARGING)
val->intval = -val->intval;
break;
case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN:
case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN:

View file

@ -42,7 +42,6 @@ static struct acpi_osi_entry
osi_setup_entries[OSI_STRING_ENTRIES_MAX] __initdata = {
{"Module Device", true},
{"Processor Device", true},
{"3.0 _SCP Extensions", true},
{"Processor Aggregator Device", true},
/*
* Linux-Dell-Video is used by BIOS to disable RTD3 for NVidia graphics

View file

@ -368,7 +368,8 @@ static unsigned long via_mode_filter(struct ata_device *dev, unsigned long mask)
}
if (dev->class == ATA_DEV_ATAPI &&
dmi_check_system(no_atapi_dma_dmi_table)) {
(dmi_check_system(no_atapi_dma_dmi_table) ||
config->id == PCI_DEVICE_ID_VIA_6415)) {
ata_dev_warn(dev, "controller locks up on ATAPI DMA, forcing PIO\n");
mask &= ATA_MASK_PIO;
}

View file

@ -288,7 +288,9 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
struct sk_buff *new_skb;
int result = 0;
if (!skb->len) return 0;
if (skb->len < sizeof(struct atmtcp_hdr))
goto done;
dev = vcc->dev_data;
hdr = (struct atmtcp_hdr *) skb->data;
if (hdr->length == ATMTCP_HDR_MAGIC) {

View file

@ -2509,7 +2509,7 @@ struct device *genpd_dev_pm_attach_by_id(struct device *dev,
/* Verify that the index is within a valid range. */
num_domains = of_count_phandle_with_args(dev->of_node, "power-domains",
"#power-domain-cells");
if (index >= num_domains)
if (num_domains < 0 || index >= num_domains)
return NULL;
/* Allocate and register device on the genpd bus. */

View file

@ -972,6 +972,8 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)
if (!dev->power.is_suspended)
goto Complete;
dev->power.is_suspended = false;
if (dev->power.direct_complete) {
/* Match the pm_runtime_disable() in __device_suspend(). */
pm_runtime_enable(dev);
@ -1027,7 +1029,6 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)
End:
error = dpm_run_callback(callback, dev, state, info);
dev->power.is_suspended = false;
device_unlock(dev);
dpm_watchdog_clear(&wd);

View file

@ -982,7 +982,7 @@ static enum hrtimer_restart pm_suspend_timer_fn(struct hrtimer *timer)
* If 'expires' is after the current time, we've been called
* too early.
*/
if (expires > 0 && expires < ktime_get_mono_fast_ns()) {
if (expires > 0 && expires <= ktime_get_mono_fast_ns()) {
dev->power.timer_expires = 0;
rpm_suspend(dev, dev->power.timer_autosuspends ?
(RPM_ASYNC | RPM_AUTO) : RPM_ASYNC);

View file

@ -198,6 +198,7 @@ aoedev_downdev(struct aoedev *d)
{
struct aoetgt *t, **tt, **te;
struct list_head *head, *pos, *nx;
struct request *rq, *rqnext;
int i;
d->flags &= ~DEVFL_UP;
@ -223,6 +224,13 @@ aoedev_downdev(struct aoedev *d)
/* clean out the in-process request (if any) */
aoe_failip(d);
/* clean out any queued block requests */
list_for_each_entry_safe(rq, rqnext, &d->rq_list, queuelist) {
list_del_init(&rq->queuelist);
blk_mq_start_request(rq);
blk_mq_end_request(rq, BLK_STS_IOERR);
}
/* fast fail all pending I/O */
if (d->blkq) {
/* UP is cleared, freeze+quiesce to insure all are errored */

View file

@ -679,8 +679,10 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,
error_cleanup_dev:
kfree(mc_dev->regions);
kfree(mc_bus);
kfree(mc_dev);
if (mc_bus)
kfree(mc_bus);
else
kfree(mc_dev);
return error;
}

View file

@ -214,12 +214,19 @@ int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
if (error < 0)
goto error_cleanup_resource;
dpmcp_dev->consumer_link = device_link_add(&mc_dev->dev,
&dpmcp_dev->dev,
DL_FLAG_AUTOREMOVE_CONSUMER);
if (!dpmcp_dev->consumer_link) {
error = -EINVAL;
goto error_cleanup_mc_io;
/* If the DPRC device itself tries to allocate a portal (usually for
* UAPI interaction), don't add a device link between them since the
* DPMCP device is an actual child device of the DPRC and a reverse
* dependency is not allowed.
*/
if (mc_dev != mc_bus_dev) {
dpmcp_dev->consumer_link = device_link_add(&mc_dev->dev,
&dpmcp_dev->dev,
DL_FLAG_AUTOREMOVE_CONSUMER);
if (!dpmcp_dev->consumer_link) {
error = -EINVAL;
goto error_cleanup_mc_io;
}
}
*new_mc_io = mc_io;

View file

@ -19,7 +19,7 @@
/**
* Timeout in milliseconds to wait for the completion of an MC command
*/
#define MC_CMD_COMPLETION_TIMEOUT_MS 500
#define MC_CMD_COMPLETION_TIMEOUT_MS 15000
/*
* usleep_range() min and max values used to throttle down polling

View file

@ -602,51 +602,6 @@ static int sysc_parse_and_check_child_range(struct sysc *ddata)
return 0;
}
/* Interconnect instances to probe before l4_per instances */
static struct resource early_bus_ranges[] = {
/* am3/4 l4_wkup */
{ .start = 0x44c00000, .end = 0x44c00000 + 0x300000, },
/* omap4/5 and dra7 l4_cfg */
{ .start = 0x4a000000, .end = 0x4a000000 + 0x300000, },
/* omap4 l4_wkup */
{ .start = 0x4a300000, .end = 0x4a300000 + 0x30000, },
/* omap5 and dra7 l4_wkup without dra7 dcan segment */
{ .start = 0x4ae00000, .end = 0x4ae00000 + 0x30000, },
};
static atomic_t sysc_defer = ATOMIC_INIT(10);
/**
* sysc_defer_non_critical - defer non_critical interconnect probing
* @ddata: device driver data
*
* We want to probe l4_cfg and l4_wkup interconnect instances before any
* l4_per instances as l4_per instances depend on resources on l4_cfg and
* l4_wkup interconnects.
*/
static int sysc_defer_non_critical(struct sysc *ddata)
{
struct resource *res;
int i;
if (!atomic_read(&sysc_defer))
return 0;
for (i = 0; i < ARRAY_SIZE(early_bus_ranges); i++) {
res = &early_bus_ranges[i];
if (ddata->module_pa >= res->start &&
ddata->module_pa <= res->end) {
atomic_set(&sysc_defer, 0);
return 0;
}
}
atomic_dec_if_positive(&sysc_defer);
return -EPROBE_DEFER;
}
static struct device_node *stdout_path;
static void sysc_init_stdout_path(struct sysc *ddata)
@ -871,10 +826,6 @@ static int sysc_map_and_check_registers(struct sysc *ddata)
if (error)
return error;
error = sysc_defer_non_critical(ddata);
if (error)
return error;
sysc_check_children(ddata);
error = sysc_parse_registers(ddata);

View file

@ -429,6 +429,7 @@ static const char *const rk3036_critical_clocks[] __initconst = {
"hclk_peri",
"pclk_peri",
"pclk_ddrupctl",
"ddrphy",
};
static void __init rk3036_clk_init(struct device_node *np)

View file

@ -2599,8 +2599,10 @@ int cpufreq_boost_trigger_state(int state)
unsigned long flags;
int ret = 0;
if (cpufreq_driver->boost_enabled == state)
return 0;
/*
* Don't compare 'cpufreq_driver->boost_enabled' with 'state' here to
* make sure all policies are in sync with global boost flag.
*/
write_lock_irqsave(&cpufreq_driver_lock, flags);
cpufreq_driver->boost_enabled = state;

View file

@ -447,6 +447,9 @@ static int mv_cesa_skcipher_queue_req(struct skcipher_request *req,
struct mv_cesa_skcipher_req *creq = skcipher_request_ctx(req);
struct mv_cesa_engine *engine;
if (!req->cryptlen)
return 0;
ret = mv_cesa_skcipher_req_init(req, tmpl);
if (ret)
return ret;

View file

@ -630,7 +630,7 @@ static int mv_cesa_ahash_dma_req_init(struct ahash_request *req)
if (ret)
goto err_free_tdma;
if (iter.src.sg) {
if (iter.base.len > iter.src.op_offset) {
/*
* Add all the new data, inserting an operation block and
* launch command between each full SRAM block-worth of

View file

@ -1804,9 +1804,9 @@ static ssize_t altr_edac_a10_device_trig(struct file *file,
local_irq_save(flags);
if (trig_type == ALTR_UE_TRIGGER_CHAR)
writel(priv->ue_set_mask, set_addr);
writew(priv->ue_set_mask, set_addr);
else
writel(priv->ce_set_mask, set_addr);
writew(priv->ce_set_mask, set_addr);
/* Ensure the interrupt test bits are set */
wmb();
@ -1836,7 +1836,7 @@ static ssize_t altr_edac_a10_device_trig2(struct file *file,
local_irq_save(flags);
if (trig_type == ALTR_UE_TRIGGER_CHAR) {
writel(priv->ue_set_mask, set_addr);
writew(priv->ue_set_mask, set_addr);
} else {
/* Setup read/write of 4 bytes */
writel(ECC_WORD_WRITE, drvdata->base + ECC_BLK_DBYTECTRL_OFST);

View file

@ -112,6 +112,7 @@ EXPORT_SYMBOL_GPL(skx_adxl_get);
void skx_adxl_put(void)
{
adxl_component_count = 0;
kfree(adxl_values);
kfree(adxl_msg);
}

View file

@ -581,8 +581,10 @@ int __init psci_dt_init(void)
np = of_find_matching_node_and_match(NULL, psci_of_match, &matched_np);
if (!np || !of_device_is_available(np))
if (!np || !of_device_is_available(np)) {
of_node_put(np);
return -ENODEV;
}
init_fn = (psci_initcall_t)matched_np->data;
ret = init_fn(np);

View file

@ -944,8 +944,6 @@ static void gfx_v10_0_get_csb_buffer(struct amdgpu_device *adev,
PACKET3_SET_CONTEXT_REG_START);
for (i = 0; i < ext->reg_count; i++)
buffer[count++] = cpu_to_le32(ext->extent[i]);
} else {
return;
}
}
}

View file

@ -2901,8 +2901,6 @@ static void gfx_v6_0_get_csb_buffer(struct amdgpu_device *adev,
buffer[count++] = cpu_to_le32(ext->reg_index - 0xa000);
for (i = 0; i < ext->reg_count; i++)
buffer[count++] = cpu_to_le32(ext->extent[i]);
} else {
return;
}
}
}

View file

@ -3992,8 +3992,6 @@ static void gfx_v7_0_get_csb_buffer(struct amdgpu_device *adev,
buffer[count++] = cpu_to_le32(ext->reg_index - PACKET3_SET_CONTEXT_REG_START);
for (i = 0; i < ext->reg_count; i++)
buffer[count++] = cpu_to_le32(ext->extent[i]);
} else {
return;
}
}
}

View file

@ -1267,8 +1267,6 @@ static void gfx_v8_0_get_csb_buffer(struct amdgpu_device *adev,
PACKET3_SET_CONTEXT_REG_START);
for (i = 0; i < ext->reg_count; i++)
buffer[count++] = cpu_to_le32(ext->extent[i]);
} else {
return;
}
}
}

View file

@ -1472,8 +1472,6 @@ static void gfx_v9_0_get_csb_buffer(struct amdgpu_device *adev,
PACKET3_SET_CONTEXT_REG_START);
for (i = 0; i < ext->reg_count; i++)
buffer[count++] = cpu_to_le32(ext->extent[i]);
} else {
return;
}
}
}

View file

@ -387,6 +387,10 @@ static void update_mqd_sdma(struct mqd_manager *mm, void *mqd,
m->sdma_engine_id = q->sdma_engine_id;
m->sdma_queue_id = q->sdma_queue_id;
m->sdmax_rlcx_dummy_reg = SDMA_RLC_DUMMY_DEFAULT;
/* Allow context switch so we don't cross-process starve with a massive
* command buffer of long-running SDMA commands
*/
m->sdmax_rlcx_ib_cntl |= SDMA0_GFX_IB_CNTL__SWITCH_INSIDE_IB_MASK;
q->is_active = QUEUE_IS_ACTIVE(*q);
}

View file

@ -6505,16 +6505,20 @@ static int dm_force_atomic_commit(struct drm_connector *connector)
*/
conn_state = drm_atomic_get_connector_state(state, connector);
ret = PTR_ERR_OR_ZERO(conn_state);
if (ret)
/* Check for error in getting connector state */
if (IS_ERR(conn_state)) {
ret = PTR_ERR(conn_state);
goto out;
}
/* Attach crtc to drm_atomic_state*/
crtc_state = drm_atomic_get_crtc_state(state, &disconnected_acrtc->base);
ret = PTR_ERR_OR_ZERO(crtc_state);
if (ret)
/* Check for error in getting crtc state */
if (IS_ERR(crtc_state)) {
ret = PTR_ERR(crtc_state);
goto out;
}
/* force a restore */
crtc_state->mode_changed = true;
@ -6522,9 +6526,11 @@ static int dm_force_atomic_commit(struct drm_connector *connector)
/* Attach plane to drm_atomic_state */
plane_state = drm_atomic_get_plane_state(state, plane);
ret = PTR_ERR_OR_ZERO(plane_state);
if (ret)
/* Check for error in getting plane state */
if (IS_ERR(plane_state)) {
ret = PTR_ERR(plane_state);
goto out;
}
/* Call commit internally with the state we just constructed */
ret = drm_atomic_commit(state);

View file

@ -10,7 +10,7 @@ ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
DCN20 += dcn20_dsc.o
endif
CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -mhard-float -msse
CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := $(if $(CONFIG_CC_IS_GCC), -mhard-float) -msse
ifdef CONFIG_CC_IS_GCC
ifeq ($(call cc-ifversion, -lt, 0701, y), y)

View file

@ -3,7 +3,7 @@
DCN21 = dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o
CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse
CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := $(if $(CONFIG_CC_IS_GCC), -mhard-float) -msse
ifdef CONFIG_CC_IS_GCC
ifeq ($(call cc-ifversion, -lt, 0701, y), y)

View file

@ -24,7 +24,8 @@
# It provides the general basic services required by other DAL
# subcomponents.
dml_ccflags := -mhard-float -msse
dml_ccflags-$(CONFIG_CC_IS_GCC) := -mhard-float
dml_ccflags := $(dml_ccflags-y) -msse
ifdef CONFIG_CC_IS_GCC
ifeq ($(call cc-ifversion, -lt, 0701, y), y)

View file

@ -1735,10 +1735,10 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
* that we can get the current state of the GPIO.
*/
dp->irq = gpiod_to_irq(dp->hpd_gpiod);
irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING;
irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN;
} else {
dp->irq = platform_get_irq(pdev, 0);
irq_flags = 0;
irq_flags = IRQF_NO_AUTOEN;
}
if (dp->irq == -ENXIO) {
@ -1755,7 +1755,6 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
dev_err(&pdev->dev, "failed to request irq\n");
goto err_disable_clk;
}
disable_irq(dp->irq);
return dp;

View file

@ -88,7 +88,7 @@ static int a6xx_hfi_wait_for_ack(struct a6xx_gmu *gmu, u32 id, u32 seqnum,
/* Wait for a response */
ret = gmu_poll_timeout(gmu, REG_A6XX_GMU_GMU2HOST_INTR_INFO, val,
val & A6XX_GMU_GMU2HOST_INTR_INFO_MSGQ, 100, 5000);
val & A6XX_GMU_GMU2HOST_INTR_INFO_MSGQ, 100, 1000000);
if (ret) {
DRM_DEV_ERROR(gmu->dev,

View file

@ -107,11 +107,15 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c,
if (num == 0)
return num;
ret = pm_runtime_resume_and_get(&hdmi->pdev->dev);
if (ret)
return ret;
init_ddc(hdmi_i2c);
ret = ddc_clear_irq(hdmi_i2c);
if (ret)
return ret;
goto fail;
for (i = 0; i < num; i++) {
struct i2c_msg *p = &msgs[i];
@ -169,7 +173,7 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c,
hdmi_read(hdmi, REG_HDMI_DDC_SW_STATUS),
hdmi_read(hdmi, REG_HDMI_DDC_HW_STATUS),
hdmi_read(hdmi, REG_HDMI_DDC_INT_CTRL));
return ret;
goto fail;
}
ddc_status = hdmi_read(hdmi, REG_HDMI_DDC_SW_STATUS);
@ -202,7 +206,13 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c,
}
}
pm_runtime_put(&hdmi->pdev->dev);
return i;
fail:
pm_runtime_put(&hdmi->pdev->dev);
return ret;
}
static u32 msm_hdmi_i2c_func(struct i2c_adapter *adapter)

View file

@ -40,7 +40,7 @@
#include "nouveau_connector.h"
static struct ida bl_ida;
#define BL_NAME_SIZE 15 // 12 for name + 2 for digits + 1 for '\0'
#define BL_NAME_SIZE 24 // 12 for name + 11 for digits + 1 for '\0'
struct nouveau_backlight {
struct backlight_device *dev;

View file

@ -567,7 +567,7 @@ static int rcar_du_vsps_init(struct rcar_du_device *rcdu)
ret = of_parse_phandle_with_fixed_args(np, "vsps", cells, i,
&args);
if (ret < 0)
goto error;
goto done;
/*
* Add the VSP to the list or update the corresponding existing
@ -601,13 +601,11 @@ static int rcar_du_vsps_init(struct rcar_du_device *rcdu)
vsp->dev = rcdu;
ret = rcar_du_vsp_init(vsp, vsps[i].np, vsps[i].crtcs_mask);
if (ret < 0)
goto error;
if (ret)
goto done;
}
return 0;
error:
done:
for (i = 0; i < ARRAY_SIZE(vsps); ++i)
of_node_put(vsps[i].np);

View file

@ -211,6 +211,11 @@ static const struct drm_encoder_helper_funcs tegra_rgb_encoder_helper_funcs = {
.atomic_check = tegra_rgb_encoder_atomic_check,
};
static void tegra_dc_of_node_put(void *data)
{
of_node_put(data);
}
int tegra_dc_rgb_probe(struct tegra_dc *dc)
{
struct device_node *np;
@ -218,7 +223,14 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc)
int err;
np = of_get_child_by_name(dc->dev->of_node, "rgb");
if (!np || !of_device_is_available(np))
if (!np)
return -ENODEV;
err = devm_add_action_or_reset(dc->dev, tegra_dc_of_node_put, np);
if (err < 0)
return err;
if (!of_device_is_available(np))
return -ENODEV;
rgb = devm_kzalloc(dc->dev, sizeof(*rgb), GFP_KERNEL);

View file

@ -187,7 +187,7 @@ static int vkms_crtc_atomic_check(struct drm_crtc *crtc,
i++;
}
vkms_state->active_planes = kcalloc(i, sizeof(plane), GFP_KERNEL);
vkms_state->active_planes = kcalloc(i, sizeof(*vkms_state->active_planes), GFP_KERNEL);
if (!vkms_state->active_planes)
return -ENOMEM;
vkms_state->num_active_planes = i;

View file

@ -3621,6 +3621,23 @@ static int vmw_execbuf_tie_context(struct vmw_private *dev_priv,
return 0;
}
/*
* DMA fence callback to remove a seqno_waiter
*/
struct seqno_waiter_rm_context {
struct dma_fence_cb base;
struct vmw_private *dev_priv;
};
static void seqno_waiter_rm_cb(struct dma_fence *f, struct dma_fence_cb *cb)
{
struct seqno_waiter_rm_context *ctx =
container_of(cb, struct seqno_waiter_rm_context, base);
vmw_seqno_waiter_remove(ctx->dev_priv);
kfree(ctx);
}
int vmw_execbuf_process(struct drm_file *file_priv,
struct vmw_private *dev_priv,
void __user *user_commands, void *kernel_commands,
@ -3814,6 +3831,15 @@ int vmw_execbuf_process(struct drm_file *file_priv,
} else {
/* Link the fence with the FD created earlier */
fd_install(out_fence_fd, sync_file->file);
struct seqno_waiter_rm_context *ctx =
kmalloc(sizeof(*ctx), GFP_KERNEL);
ctx->dev_priv = dev_priv;
vmw_seqno_waiter_add(dev_priv);
if (dma_fence_add_callback(&fence->base, &ctx->base,
seqno_waiter_rm_cb) < 0) {
vmw_seqno_waiter_remove(dev_priv);
kfree(ctx);
}
}
}

View file

@ -197,7 +197,8 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
if (!input_device->hid_desc)
goto cleanup;
input_device->report_desc_size = desc->desc[0].wDescriptorLength;
input_device->report_desc_size = le16_to_cpu(
desc->rpt_desc.wDescriptorLength);
if (input_device->report_desc_size == 0) {
input_device->dev_info_status = -EINVAL;
goto cleanup;
@ -213,7 +214,7 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
memcpy(input_device->report_desc,
((unsigned char *)desc) + desc->bLength,
desc->desc[0].wDescriptorLength);
le16_to_cpu(desc->rpt_desc.wDescriptorLength));
/* Send the ack */
memset(&ack, 0, sizeof(struct mousevsc_prt_msg));

View file

@ -984,12 +984,11 @@ static int usbhid_parse(struct hid_device *hid)
struct usb_host_interface *interface = intf->cur_altsetting;
struct usb_device *dev = interface_to_usbdev (intf);
struct hid_descriptor *hdesc;
struct hid_class_descriptor *hcdesc;
u32 quirks = 0;
unsigned int rsize = 0;
char *rdesc;
int ret, n;
int num_descriptors;
size_t offset = offsetof(struct hid_descriptor, desc);
int ret;
quirks = hid_lookup_quirk(hid);
@ -1011,20 +1010,19 @@ static int usbhid_parse(struct hid_device *hid)
return -ENODEV;
}
if (hdesc->bLength < sizeof(struct hid_descriptor)) {
dbg_hid("hid descriptor is too short\n");
if (!hdesc->bNumDescriptors ||
hdesc->bLength != sizeof(*hdesc) +
(hdesc->bNumDescriptors - 1) * sizeof(*hcdesc)) {
dbg_hid("hid descriptor invalid, bLen=%hhu bNum=%hhu\n",
hdesc->bLength, hdesc->bNumDescriptors);
return -EINVAL;
}
hid->version = le16_to_cpu(hdesc->bcdHID);
hid->country = hdesc->bCountryCode;
num_descriptors = min_t(int, hdesc->bNumDescriptors,
(hdesc->bLength - offset) / sizeof(struct hid_class_descriptor));
for (n = 0; n < num_descriptors; n++)
if (hdesc->desc[n].bDescriptorType == HID_DT_REPORT)
rsize = le16_to_cpu(hdesc->desc[n].wDescriptorLength);
if (hdesc->rpt_desc.bDescriptorType == HID_DT_REPORT)
rsize = le16_to_cpu(hdesc->rpt_desc.wDescriptorLength);
if (!rsize || rsize > HID_MAX_DESCRIPTOR_SIZE) {
dbg_hid("weird size of report descriptor (%u)\n", rsize);
@ -1052,6 +1050,11 @@ static int usbhid_parse(struct hid_device *hid)
goto err;
}
if (hdesc->bNumDescriptors > 1)
hid_warn(intf,
"%u unsupported optional hid class descriptors\n",
(int)(hdesc->bNumDescriptors - 1));
hid->quirks |= quirks;
return 0;

View file

@ -406,12 +406,10 @@ static ssize_t occ_show_power_1(struct device *dev,
return snprintf(buf, PAGE_SIZE - 1, "%llu\n", val);
}
static u64 occ_get_powr_avg(u64 *accum, u32 *samples)
static u64 occ_get_powr_avg(u64 accum, u32 samples)
{
u64 divisor = get_unaligned_be32(samples);
return (divisor == 0) ? 0 :
div64_u64(get_unaligned_be64(accum) * 1000000ULL, divisor);
return (samples == 0) ? 0 :
mul_u64_u32_div(accum, 1000000UL, samples);
}
static ssize_t occ_show_power_2(struct device *dev,
@ -436,8 +434,8 @@ static ssize_t occ_show_power_2(struct device *dev,
get_unaligned_be32(&power->sensor_id),
power->function_id, power->apss_channel);
case 1:
val = occ_get_powr_avg(&power->accumulator,
&power->update_tag);
val = occ_get_powr_avg(get_unaligned_be64(&power->accumulator),
get_unaligned_be32(&power->update_tag));
break;
case 2:
val = (u64)get_unaligned_be32(&power->update_tag) *
@ -474,8 +472,8 @@ static ssize_t occ_show_power_a0(struct device *dev,
return snprintf(buf, PAGE_SIZE - 1, "%u_system\n",
get_unaligned_be32(&power->sensor_id));
case 1:
val = occ_get_powr_avg(&power->system.accumulator,
&power->system.update_tag);
val = occ_get_powr_avg(get_unaligned_be64(&power->system.accumulator),
get_unaligned_be32(&power->system.update_tag));
break;
case 2:
val = (u64)get_unaligned_be32(&power->system.update_tag) *
@ -488,8 +486,8 @@ static ssize_t occ_show_power_a0(struct device *dev,
return snprintf(buf, PAGE_SIZE - 1, "%u_proc\n",
get_unaligned_be32(&power->sensor_id));
case 5:
val = occ_get_powr_avg(&power->proc.accumulator,
&power->proc.update_tag);
val = occ_get_powr_avg(get_unaligned_be64(&power->proc.accumulator),
get_unaligned_be32(&power->proc.update_tag));
break;
case 6:
val = (u64)get_unaligned_be32(&power->proc.update_tag) *
@ -502,8 +500,8 @@ static ssize_t occ_show_power_a0(struct device *dev,
return snprintf(buf, PAGE_SIZE - 1, "%u_vdd\n",
get_unaligned_be32(&power->sensor_id));
case 9:
val = occ_get_powr_avg(&power->vdd.accumulator,
&power->vdd.update_tag);
val = occ_get_powr_avg(get_unaligned_be64(&power->vdd.accumulator),
get_unaligned_be32(&power->vdd.update_tag));
break;
case 10:
val = (u64)get_unaligned_be32(&power->vdd.update_tag) *
@ -516,8 +514,8 @@ static ssize_t occ_show_power_a0(struct device *dev,
return snprintf(buf, PAGE_SIZE - 1, "%u_vdn\n",
get_unaligned_be32(&power->sensor_id));
case 13:
val = occ_get_powr_avg(&power->vdn.accumulator,
&power->vdn.update_tag);
val = occ_get_powr_avg(get_unaligned_be64(&power->vdn.accumulator),
get_unaligned_be32(&power->vdn.update_tag));
break;
case 14:
val = (u64)get_unaligned_be32(&power->vdn.update_tag) *

View file

@ -96,7 +96,7 @@ static int i2c_dw_unreg_slave(struct i2c_client *slave)
dev->disable(dev);
synchronize_irq(dev->irq);
dev->slave = NULL;
pm_runtime_put(dev->dev);
pm_runtime_put_sync_suspend(dev->dev);
return 0;
}

View file

@ -151,7 +151,7 @@ static int ad7606_spi_reg_write(struct ad7606_state *st,
struct spi_device *spi = to_spi_device(st->dev);
st->d16[0] = cpu_to_be16((st->bops->rd_wr_cmd(addr, 1) << 8) |
(val & 0x1FF));
(val & 0xFF));
return spi_write(spi, &st->d16[0], sizeof(st->d16[0]));
}

View file

@ -41,7 +41,6 @@
#include <rdma/ib_umem.h>
#include <rdma/uverbs_ioctl.h>
#include "hnae3.h"
#include "hns_roce_common.h"
#include "hns_roce_device.h"
#include "hns_roce_cmd.h"

View file

@ -34,6 +34,7 @@
#define _HNS_ROCE_HW_V2_H
#include <linux/bitops.h>
#include "hnae3.h"
#define HNS_ROCE_VF_QPC_BT_NUM 256
#define HNS_ROCE_VF_SCCC_BT_NUM 64

View file

@ -4,7 +4,6 @@
#include <rdma/rdma_cm.h>
#include <rdma/restrack.h>
#include <uapi/rdma/rdma_netlink.h>
#include "hnae3.h"
#include "hns_roce_common.h"
#include "hns_roce_device.h"
#include "hns_roce_hw_v2.h"

View file

@ -845,6 +845,12 @@ static int ims_pcu_flash_firmware(struct ims_pcu *pcu,
addr = be32_to_cpu(rec->addr) / 2;
len = be16_to_cpu(rec->len);
if (len > sizeof(pcu->cmd_buf) - 1 - sizeof(*fragment)) {
dev_err(pcu->dev,
"Invalid record length in firmware: %d\n", len);
return -EINVAL;
}
fragment = (void *)&pcu->cmd_buf[1];
put_unaligned_le32(addr, &fragment->addr);
fragment->len = len;

View file

@ -74,9 +74,14 @@ static int bbc_spkr_event(struct input_dev *dev, unsigned int type, unsigned int
return -1;
switch (code) {
case SND_BELL: if (value) value = 1000;
case SND_TONE: break;
default: return -1;
case SND_BELL:
if (value)
value = 1000;
break;
case SND_TONE:
break;
default:
return -1;
}
if (value > 20 && value < 32767)
@ -112,9 +117,14 @@ static int grover_spkr_event(struct input_dev *dev, unsigned int type, unsigned
return -1;
switch (code) {
case SND_BELL: if (value) value = 1000;
case SND_TONE: break;
default: return -1;
case SND_BELL:
if (value)
value = 1000;
break;
case SND_TONE:
break;
default:
return -1;
}
if (value > 20 && value < 32767)

View file

@ -4,6 +4,7 @@
* Copyright (C) 2016 Zodiac Inflight Innovations
*/
#include "linux/device.h"
#include <linux/kernel.h>
#include <linux/rmi.h>
#include <linux/firmware.h>
@ -298,39 +299,30 @@ out:
return ret;
}
static int rmi_f34_status(struct rmi_function *fn)
{
struct f34_data *f34 = dev_get_drvdata(&fn->dev);
/*
* The status is the percentage complete, or once complete,
* zero for success or a negative return code.
*/
return f34->update_status;
}
static ssize_t rmi_driver_bootloader_id_show(struct device *dev,
struct device_attribute *dattr,
char *buf)
{
struct rmi_driver_data *data = dev_get_drvdata(dev);
struct rmi_function *fn = data->f34_container;
struct rmi_function *fn;
struct f34_data *f34;
if (fn) {
f34 = dev_get_drvdata(&fn->dev);
fn = data->f34_container;
if (!fn)
return -ENODEV;
if (f34->bl_version == 5)
return scnprintf(buf, PAGE_SIZE, "%c%c\n",
f34->bootloader_id[0],
f34->bootloader_id[1]);
else
return scnprintf(buf, PAGE_SIZE, "V%d.%d\n",
f34->bootloader_id[1],
f34->bootloader_id[0]);
}
f34 = dev_get_drvdata(&fn->dev);
if (!f34)
return -ENODEV;
return 0;
if (f34->bl_version == 5)
return sysfs_emit(buf, "%c%c\n",
f34->bootloader_id[0],
f34->bootloader_id[1]);
else
return sysfs_emit(buf, "V%d.%d\n",
f34->bootloader_id[1],
f34->bootloader_id[0]);
}
static DEVICE_ATTR(bootloader_id, 0444, rmi_driver_bootloader_id_show, NULL);
@ -343,13 +335,16 @@ static ssize_t rmi_driver_configuration_id_show(struct device *dev,
struct rmi_function *fn = data->f34_container;
struct f34_data *f34;
if (fn) {
f34 = dev_get_drvdata(&fn->dev);
fn = data->f34_container;
if (!fn)
return -ENODEV;
return scnprintf(buf, PAGE_SIZE, "%s\n", f34->configuration_id);
}
f34 = dev_get_drvdata(&fn->dev);
if (!f34)
return -ENODEV;
return 0;
return sysfs_emit(buf, "%s\n", f34->configuration_id);
}
static DEVICE_ATTR(configuration_id, 0444,
@ -365,10 +360,14 @@ static int rmi_firmware_update(struct rmi_driver_data *data,
if (!data->f34_container) {
dev_warn(dev, "%s: No F34 present!\n", __func__);
return -EINVAL;
return -ENODEV;
}
f34 = dev_get_drvdata(&data->f34_container->dev);
if (!f34) {
dev_warn(dev, "%s: No valid F34 present!\n", __func__);
return -ENODEV;
}
if (f34->bl_version == 7) {
if (data->pdt_props & HAS_BSR) {
@ -494,12 +493,20 @@ static ssize_t rmi_driver_update_fw_status_show(struct device *dev,
char *buf)
{
struct rmi_driver_data *data = dev_get_drvdata(dev);
int update_status = 0;
struct f34_data *f34;
int update_status = -ENODEV;
if (data->f34_container)
update_status = rmi_f34_status(data->f34_container);
/*
* The status is the percentage complete, or once complete,
* zero for success or a negative return code.
*/
if (data->f34_container) {
f34 = dev_get_drvdata(&data->f34_container->dev);
if (f34)
update_status = f34->update_status;
}
return scnprintf(buf, PAGE_SIZE, "%d\n", update_status);
return sysfs_emit(buf, "%d\n", update_status);
}
static DEVICE_ATTR(update_fw_status, 0444,
@ -517,33 +524,21 @@ static const struct attribute_group rmi_firmware_attr_group = {
.attrs = rmi_firmware_attrs,
};
static int rmi_f34_probe(struct rmi_function *fn)
static int rmi_f34v5_probe(struct f34_data *f34)
{
struct f34_data *f34;
unsigned char f34_queries[9];
struct rmi_function *fn = f34->fn;
u8 f34_queries[9];
bool has_config_id;
u8 version = fn->fd.function_version;
int ret;
f34 = devm_kzalloc(&fn->dev, sizeof(struct f34_data), GFP_KERNEL);
if (!f34)
return -ENOMEM;
f34->fn = fn;
dev_set_drvdata(&fn->dev, f34);
/* v5 code only supported version 0, try V7 probe */
if (version > 0)
return rmi_f34v7_probe(f34);
int error;
f34->bl_version = 5;
ret = rmi_read_block(fn->rmi_dev, fn->fd.query_base_addr,
f34_queries, sizeof(f34_queries));
if (ret) {
error = rmi_read_block(fn->rmi_dev, fn->fd.query_base_addr,
f34_queries, sizeof(f34_queries));
if (error) {
dev_err(&fn->dev, "%s: Failed to query properties\n",
__func__);
return ret;
return error;
}
snprintf(f34->bootloader_id, sizeof(f34->bootloader_id),
@ -569,11 +564,11 @@ static int rmi_f34_probe(struct rmi_function *fn)
f34->v5.config_blocks);
if (has_config_id) {
ret = rmi_read_block(fn->rmi_dev, fn->fd.control_base_addr,
f34_queries, sizeof(f34_queries));
if (ret) {
error = rmi_read_block(fn->rmi_dev, fn->fd.control_base_addr,
f34_queries, sizeof(f34_queries));
if (error) {
dev_err(&fn->dev, "Failed to read F34 config ID\n");
return ret;
return error;
}
snprintf(f34->configuration_id, sizeof(f34->configuration_id),
@ -582,12 +577,34 @@ static int rmi_f34_probe(struct rmi_function *fn)
f34_queries[2], f34_queries[3]);
rmi_dbg(RMI_DEBUG_FN, &fn->dev, "Configuration ID: %s\n",
f34->configuration_id);
f34->configuration_id);
}
return 0;
}
static int rmi_f34_probe(struct rmi_function *fn)
{
struct f34_data *f34;
u8 version = fn->fd.function_version;
int error;
f34 = devm_kzalloc(&fn->dev, sizeof(struct f34_data), GFP_KERNEL);
if (!f34)
return -ENOMEM;
f34->fn = fn;
/* v5 code only supported version 0 */
error = version == 0 ? rmi_f34v5_probe(f34) : rmi_f34v7_probe(f34);
if (error)
return error;
dev_set_drvdata(&fn->dev, f34);
return 0;
}
int rmi_f34_create_sysfs(struct rmi_device *rmi_dev)
{
return sysfs_create_group(&rmi_dev->dev.kobj, &rmi_firmware_attr_group);

View file

@ -128,10 +128,9 @@ static void queue_bio(struct mirror_set *ms, struct bio *bio, int rw)
spin_lock_irqsave(&ms->lock, flags);
should_wake = !(bl->head);
bio_list_add(bl, bio);
spin_unlock_irqrestore(&ms->lock, flags);
if (should_wake)
wakeup_mirrord(ms);
spin_unlock_irqrestore(&ms->lock, flags);
}
static void dispatch_bios(void *context, struct bio_list *bio_list)
@ -638,9 +637,9 @@ static void write_callback(unsigned long error, void *context)
if (!ms->failures.head)
should_wake = 1;
bio_list_add(&ms->failures, bio);
spin_unlock_irqrestore(&ms->lock, flags);
if (should_wake)
wakeup_mirrord(ms);
spin_unlock_irqrestore(&ms->lock, flags);
}
static void do_write(struct mirror_set *ms, struct bio *bio)

View file

@ -309,6 +309,10 @@ static int tc358743_get_detected_timings(struct v4l2_subdev *sd,
memset(timings, 0, sizeof(struct v4l2_dv_timings));
/* if HPD is low, ignore any video */
if (!(i2c_rd8(sd, HPD_CTL) & MASK_HPD_OUT0))
return -ENOLINK;
if (no_signal(sd)) {
v4l2_dbg(1, debug, sd, "%s: no valid signal\n", __func__);
return -ENOLINK;

View file

@ -164,6 +164,7 @@ int fimc_is_hw_change_mode(struct fimc_is *is)
if (WARN_ON(is->config_index >= ARRAY_SIZE(cmd)))
return -EINVAL;
fimc_is_hw_wait_intmsr0_intmsd0(is);
mcuctl_write(cmd[is->config_index], is, MCUCTL_REG_ISSR(0));
mcuctl_write(is->sensor_index, is, MCUCTL_REG_ISSR(1));
mcuctl_write(is->setfile.sub_index, is, MCUCTL_REG_ISSR(2));

View file

@ -520,12 +520,13 @@ static int hdcs_init(struct sd *sd)
static int hdcs_dump(struct sd *sd)
{
u16 reg, val;
int err = 0;
pr_info("Dumping sensor registers:\n");
for (reg = HDCS_IDENT; reg <= HDCS_ROWEXPH; reg++) {
stv06xx_read_sensor(sd, reg, &val);
for (reg = HDCS_IDENT; reg <= HDCS_ROWEXPH && !err; reg++) {
err = stv06xx_read_sensor(sd, reg, &val);
pr_info("reg 0x%02x = 0x%02x\n", reg, val);
}
return 0;
return (err < 0) ? err : 0;
}

View file

@ -1010,25 +1010,25 @@ int __video_register_device(struct video_device *vdev,
vdev->dev.class = &video_class;
vdev->dev.devt = MKDEV(VIDEO_MAJOR, vdev->minor);
vdev->dev.parent = vdev->dev_parent;
vdev->dev.release = v4l2_device_release;
dev_set_name(&vdev->dev, "%s%d", name_base, vdev->num);
/* Increase v4l2_device refcount */
v4l2_device_get(vdev->v4l2_dev);
mutex_lock(&videodev_lock);
ret = device_register(&vdev->dev);
if (ret < 0) {
mutex_unlock(&videodev_lock);
pr_err("%s: device_register failed\n", __func__);
goto cleanup;
put_device(&vdev->dev);
return ret;
}
/* Register the release callback that will be called when the last
reference to the device goes away. */
vdev->dev.release = v4l2_device_release;
if (nr != -1 && nr != vdev->num && warn_if_nr_in_use)
pr_warn("%s: requested %s%d, got %s\n", __func__,
name_base, nr, video_device_node_name(vdev));
/* Increase v4l2_device refcount */
v4l2_device_get(vdev->v4l2_dev);
/* Part 5: Register the entity. */
ret = video_register_media_controller(vdev);

View file

@ -144,7 +144,6 @@ static int exynos_lpass_remove(struct platform_device *pdev)
{
struct exynos_lpass *lpass = platform_get_drvdata(pdev);
exynos_lpass_disable(lpass);
pm_runtime_disable(&pdev->dev);
if (!pm_runtime_status_suspended(&pdev->dev))
exynos_lpass_disable(lpass);

View file

@ -129,7 +129,7 @@ static const struct spi_device_id stmpe_spi_id[] = {
{ "stmpe2403", STMPE2403 },
{ }
};
MODULE_DEVICE_TABLE(spi, stmpe_id);
MODULE_DEVICE_TABLE(spi, stmpe_spi_id);
static struct spi_driver stmpe_spi_driver = {
.driver = {

View file

@ -818,6 +818,7 @@ static int sunxi_nfc_hw_ecc_read_chunk(struct nand_chip *nand,
if (ret)
return ret;
sunxi_nfc_randomizer_config(nand, page, false);
sunxi_nfc_randomizer_enable(nand);
writel(NFC_DATA_TRANS | NFC_DATA_SWAP_METHOD | NFC_ECC_OP,
nfc->regs + NFC_REG_CMD);
@ -1045,6 +1046,7 @@ static int sunxi_nfc_hw_ecc_write_chunk(struct nand_chip *nand,
if (ret)
return ret;
sunxi_nfc_randomizer_config(nand, page, false);
sunxi_nfc_randomizer_enable(nand);
sunxi_nfc_hw_ecc_set_prot_oob_bytes(nand, oob, 0, bbm, page);

View file

@ -4320,7 +4320,11 @@ static int macb_probe(struct platform_device *pdev)
#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
if (GEM_BFEXT(DAW64, gem_readl(bp, DCFG6))) {
dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44));
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44));
if (err) {
dev_err(&pdev->dev, "failed to set DMA mask\n");
goto err_out_free_netdev;
}
bp->hw_dma_cap |= HW_DMA_CAP_64B;
}
#endif

View file

@ -155,6 +155,8 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent)
np->ioaddr = ioaddr;
np->chip_id = chip_idx;
np->pdev = pdev;
spin_lock_init(&np->stats_lock);
spin_lock_init (&np->tx_lock);
spin_lock_init (&np->rx_lock);
@ -875,7 +877,6 @@ tx_error (struct net_device *dev, int tx_status)
frame_id = (tx_status & 0xffff0000);
printk (KERN_ERR "%s: Transmit error, TxStatus %4.4x, FrameId %d.\n",
dev->name, tx_status, frame_id);
dev->stats.tx_errors++;
/* Ttransmit Underrun */
if (tx_status & 0x10) {
dev->stats.tx_fifo_errors++;
@ -912,9 +913,15 @@ tx_error (struct net_device *dev, int tx_status)
rio_set_led_mode(dev);
/* Let TxStartThresh stay default value */
}
spin_lock(&np->stats_lock);
/* Maximum Collisions */
if (tx_status & 0x08)
dev->stats.collisions++;
dev->stats.tx_errors++;
spin_unlock(&np->stats_lock);
/* Restart the Tx */
dw32(MACCtrl, dr16(MACCtrl) | TxEnable);
}
@ -1084,7 +1091,9 @@ get_stats (struct net_device *dev)
int i;
#endif
unsigned int stat_reg;
unsigned long flags;
spin_lock_irqsave(&np->stats_lock, flags);
/* All statistics registers need to be acknowledged,
else statistic overflow could cause problems */
@ -1134,6 +1143,9 @@ get_stats (struct net_device *dev)
dr16(TCPCheckSumErrors);
dr16(UDPCheckSumErrors);
dr16(IPCheckSumErrors);
spin_unlock_irqrestore(&np->stats_lock, flags);
return &dev->stats;
}

View file

@ -372,6 +372,8 @@ struct netdev_private {
struct pci_dev *pdev;
void __iomem *ioaddr;
void __iomem *eeprom_addr;
// To ensure synchronization when stats are updated.
spinlock_t stats_lock;
spinlock_t tx_lock;
spinlock_t rx_lock;
unsigned int rx_buf_sz; /* Based on MTU+slack. */

View file

@ -1608,7 +1608,7 @@ int be_cmd_get_stats(struct be_adapter *adapter, struct be_dma_mem *nonemb_cmd)
/* version 1 of the cmd is not supported only by BE2 */
if (BE2_chip(adapter))
hdr->version = 0;
if (BE3_chip(adapter) || lancer_chip(adapter))
else if (BE3_chip(adapter) || lancer_chip(adapter))
hdr->version = 1;
else
hdr->version = 2;

View file

@ -1322,10 +1322,11 @@ i40e_status i40e_pf_reset(struct i40e_hw *hw)
void i40e_clear_hw(struct i40e_hw *hw)
{
u32 num_queues, base_queue;
u32 num_pf_int;
u32 num_vf_int;
s32 num_pf_int;
s32 num_vf_int;
u32 num_vfs;
u32 i, j;
s32 i;
u32 j;
u32 val;
u32 eol = 0x7ff;

View file

@ -1456,8 +1456,8 @@ static void i40e_cleanup_reset_vf(struct i40e_vf *vf)
* @vf: pointer to the VF structure
* @flr: VFLR was issued or not
*
* Returns true if the VF is in reset, resets successfully, or resets
* are disabled and false otherwise.
* Return: True if reset was performed successfully or if resets are disabled.
* False if reset is already in progress.
**/
bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
{
@ -1476,7 +1476,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
/* If VF is being reset already we don't need to continue. */
if (test_and_set_bit(I40E_VF_STATE_RESETTING, &vf->vf_states))
return true;
return false;
i40e_trigger_vf_reset(vf, flr);
@ -4125,7 +4125,10 @@ int i40e_vc_process_vflr_event(struct i40e_pf *pf)
reg = rd32(hw, I40E_GLGEN_VFLRSTAT(reg_idx));
if (reg & BIT(bit_idx))
/* i40e_reset_vf will clear the bit in GLGEN_VFLRSTAT */
i40e_reset_vf(vf, true);
if (!i40e_reset_vf(vf, true)) {
/* At least one VF did not finish resetting, retry next time */
set_bit(__I40E_VFLR_EVENT_PENDING, pf->state);
}
}
return 0;

View file

@ -1188,16 +1188,16 @@ ice_sched_get_vsi_node(struct ice_hw *hw, struct ice_sched_node *tc_node,
/**
* ice_sched_calc_vsi_child_nodes - calculate number of VSI child nodes
* @hw: pointer to the HW struct
* @num_qs: number of queues
* @num_new_qs: number of new queues that will be added to the tree
* @num_nodes: num nodes array
*
* This function calculates the number of VSI child nodes based on the
* number of queues.
*/
static void
ice_sched_calc_vsi_child_nodes(struct ice_hw *hw, u16 num_qs, u16 *num_nodes)
ice_sched_calc_vsi_child_nodes(struct ice_hw *hw, u16 num_new_qs, u16 *num_nodes)
{
u16 num = num_qs;
u16 num = num_new_qs;
u8 i, qgl, vsil;
qgl = ice_sched_get_qgrp_layer(hw);
@ -1438,8 +1438,9 @@ ice_sched_update_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle,
if (status)
return status;
if (new_numqs)
ice_sched_calc_vsi_child_nodes(hw, new_numqs, new_num_nodes);
ice_sched_calc_vsi_child_nodes(hw, new_numqs - prev_numqs,
new_num_nodes);
/* Keep the max number of queue configuration all the time. Update the
* tree only if number of queues > previous number of queues. This may
* leave some extra nodes in the tree if number of queues < previous

View file

@ -251,7 +251,7 @@ static const struct ptp_clock_info mlx4_en_ptp_clock_info = {
static u32 freq_to_shift(u16 freq)
{
u32 freq_khz = freq * 1000;
u64 max_val_cycles = freq_khz * 1000 * MLX4_EN_WRAP_AROUND_SEC;
u64 max_val_cycles = freq_khz * 1000ULL * MLX4_EN_WRAP_AROUND_SEC;
u64 max_val_cycles_rounded = 1ULL << fls64(max_val_cycles - 1);
/* calculate max possible multiplier in order to fit in 64bit */
u64 max_mul = div64_u64(ULLONG_MAX, max_val_cycles_rounded);

View file

@ -1889,6 +1889,7 @@ static int mlx4_en_get_ts_info(struct net_device *dev,
if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_TS) {
info->so_timestamping |=
SOF_TIMESTAMPING_TX_HARDWARE |
SOF_TIMESTAMPING_TX_SOFTWARE |
SOF_TIMESTAMPING_RX_HARDWARE |
SOF_TIMESTAMPING_RAW_HARDWARE;

View file

@ -1716,6 +1716,7 @@ try_add_to_existing_fg(struct mlx5_flow_table *ft,
struct mlx5_flow_handle *rule;
struct match_list *iter;
bool take_write = false;
bool try_again = false;
struct fs_fte *fte;
u64 version;
int err;
@ -1768,11 +1769,14 @@ skip_search:
list_for_each_entry(iter, match_head, list) {
g = iter->g;
if (!g->node.active)
continue;
nested_down_write_ref_node(&g->node, FS_LOCK_PARENT);
if (!g->node.active) {
try_again = true;
up_write_ref_node(&g->node, false);
continue;
}
err = insert_fte(g, fte);
if (err) {
up_write_ref_node(&g->node, false);
@ -1790,7 +1794,8 @@ skip_search:
tree_put_node(&fte->node, false);
return rule;
}
rule = ERR_PTR(-ENOENT);
err = try_again ? -EAGAIN : -ENOENT;
rule = ERR_PTR(err);
out:
kmem_cache_free(steering->ftes_cache, fte);
return rule;

View file

@ -912,7 +912,7 @@ static int lan743x_mac_set_mtu(struct lan743x_adapter *adapter, int new_mtu)
}
/* PHY */
static int lan743x_phy_reset(struct lan743x_adapter *adapter)
static int lan743x_hw_reset_phy(struct lan743x_adapter *adapter)
{
u32 data;
@ -946,7 +946,7 @@ static void lan743x_phy_update_flowcontrol(struct lan743x_adapter *adapter,
static int lan743x_phy_init(struct lan743x_adapter *adapter)
{
return lan743x_phy_reset(adapter);
return lan743x_hw_reset_phy(adapter);
}
static void lan743x_phy_link_status_change(struct net_device *netdev)

View file

@ -565,7 +565,13 @@ int __mdiobus_read(struct mii_bus *bus, int addr, u32 regnum)
WARN_ON_ONCE(!mutex_is_locked(&bus->mdio_lock));
retval = bus->read(bus, addr, regnum);
if (addr >= PHY_MAX_ADDR)
return -ENXIO;
if (bus->read)
retval = bus->read(bus, addr, regnum);
else
retval = -EOPNOTSUPP;
trace_mdio_access(bus, 1, addr, regnum, retval, retval);
@ -590,7 +596,13 @@ int __mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val)
WARN_ON_ONCE(!mutex_is_locked(&bus->mdio_lock));
err = bus->write(bus, addr, regnum, val);
if (addr >= PHY_MAX_ADDR)
return -ENXIO;
if (bus->write)
err = bus->write(bus, addr, regnum, val);
else
err = -EOPNOTSUPP;
trace_mdio_access(bus, 0, addr, regnum, val, err);

View file

@ -30,11 +30,14 @@ static int aqc111_read_cmd_nopm(struct usbnet *dev, u8 cmd, u16 value,
ret = usbnet_read_cmd_nopm(dev, cmd, USB_DIR_IN | USB_TYPE_VENDOR |
USB_RECIP_DEVICE, value, index, data, size);
if (unlikely(ret < 0))
if (unlikely(ret < size)) {
netdev_warn(dev->net,
"Failed to read(0x%x) reg index 0x%04x: %d\n",
cmd, index, ret);
ret = ret < 0 ? ret : -ENODATA;
}
return ret;
}
@ -46,11 +49,14 @@ static int aqc111_read_cmd(struct usbnet *dev, u8 cmd, u16 value,
ret = usbnet_read_cmd(dev, cmd, USB_DIR_IN | USB_TYPE_VENDOR |
USB_RECIP_DEVICE, value, index, data, size);
if (unlikely(ret < 0))
if (unlikely(ret < size)) {
netdev_warn(dev->net,
"Failed to read(0x%x) reg index 0x%04x: %d\n",
cmd, index, ret);
ret = ret < 0 ? ret : -ENODATA;
}
return ret;
}

View file

@ -180,6 +180,7 @@ static int ch9200_mdio_read(struct net_device *netdev, int phy_id, int loc)
{
struct usbnet *dev = netdev_priv(netdev);
unsigned char buff[2];
int ret;
netdev_dbg(netdev, "ch9200_mdio_read phy_id:%02x loc:%02x\n",
phy_id, loc);
@ -187,8 +188,10 @@ static int ch9200_mdio_read(struct net_device *netdev, int phy_id, int loc)
if (phy_id != 0)
return -ENODEV;
control_read(dev, REQUEST_READ, 0, loc * 2, buff, 0x02,
CONTROL_TIMEOUT_MS);
ret = control_read(dev, REQUEST_READ, 0, loc * 2, buff, 0x02,
CONTROL_TIMEOUT_MS);
if (ret < 0)
return ret;
return (buff[0] | buff[1] << 8);
}

View file

@ -681,10 +681,10 @@ static int vxlan_fdb_append(struct vxlan_fdb *f,
if (rd == NULL)
return -ENOMEM;
if (dst_cache_init(&rd->dst_cache, GFP_ATOMIC)) {
kfree(rd);
return -ENOMEM;
}
/* The driver can work correctly without a dst cache, so do not treat
* dst cache initialization errors as fatal.
*/
dst_cache_init(&rd->dst_cache, GFP_ATOMIC | __GFP_NOWARN);
rd->remote_ip = *ip;
rd->remote_port = port;

View file

@ -290,6 +290,9 @@ void ath9k_htc_swba(struct ath9k_htc_priv *priv,
struct ath_common *common = ath9k_hw_common(priv->ah);
int slot;
if (!priv->cur_beacon_conf.enable_beacon)
return;
if (swba->beacon_pending != 0) {
priv->beacon.bmisscnt++;
if (priv->beacon.bmisscnt > BSTUCK_THRESHOLD) {

Some files were not shown because too many files have changed in this diff Show more