Linux 5.4.244
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.244 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/mach-sa1100/jornada720_ssp.c | 5 arch/m68k/kernel/signal.c | 14 arch/parisc/include/asm/cacheflush.h | 5 arch/parisc/kernel/cache.c | 5 arch/parisc/kernel/process.c | 11 arch/parisc/kernel/traps.c | 4 arch/powerpc/mm/book3s64/radix_pgtable.c | 4 arch/x86/include/asm/intel-family.h | 5 arch/x86/include/asm/kvm_host.h | 3 arch/x86/kernel/cpu/topology.c | 5 arch/x86/kernel/dumpstack.c | 7 arch/x86/kvm/svm.c | 3 arch/x86/kvm/vmx/vmx.c | 1 arch/x86/kvm/x86.c | 22 + arch/x86/mm/init.c | 25 + drivers/acpi/acpica/dbnames.c | 3 drivers/acpi/acpica/dswstate.c | 11 drivers/acpi/ec.c | 1 drivers/base/core.c | 7 drivers/base/regmap/regcache.c | 6 drivers/char/tpm/tpm_tis.c | 16 drivers/clk/tegra/clk-tegra20.c | 28 - drivers/firmware/arm_sdei.c | 37 + drivers/gpio/gpio-mockup.c | 2 drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 5 drivers/gpu/drm/drm_mipi_dsi.c | 2 drivers/gpu/drm/exynos/exynos_drm_g2d.h | 4 drivers/gpu/drm/tegra/sor.c | 2 drivers/hid/hid-logitech-hidpp.c | 53 ++ drivers/hid/wacom.h | 3 drivers/hid/wacom_sys.c | 2 drivers/hid/wacom_wac.c | 80 +++- drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 drivers/infiniband/core/user_mad.c | 23 - drivers/input/joystick/xpad.c | 5 drivers/iommu/arm-smmu-v3.c | 19 - drivers/mcb/mcb-pci.c | 27 + drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 drivers/media/radio/radio-shark.c | 10 drivers/media/radio/radio-shark2.c | 10 drivers/memstick/host/r592.c | 2 drivers/message/fusion/mptlan.c | 2 drivers/mfd/dln2.c | 1 drivers/net/bonding/bond_main.c | 8 drivers/net/can/kvaser_pciefd.c | 51 +- drivers/net/ethernet/3com/3c589_cs.c | 11 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 9 drivers/net/ethernet/freescale/fec_main.c | 13 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 15 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 4 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 5 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 5 drivers/net/ethernet/intel/igb/e1000_mac.c | 4 drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.c | 3 drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 drivers/net/ethernet/nvidia/forcedeth.c | 1 drivers/net/ethernet/pasemi/pasemi_mac.c | 2 drivers/net/ethernet/sun/cassini.c | 2 drivers/net/ipvlan/ipvlan_core.c | 6 drivers/net/tap.c | 10 drivers/net/team/team.c | 7 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 13 drivers/net/wireless/intel/iwlwifi/dvm/sta.c | 5 drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 10 drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 5 drivers/phy/st/phy-miphy28lp.c | 42 -- drivers/power/supply/bq27xxx_battery.c | 41 +- drivers/power/supply/bq27xxx_battery_i2c.c | 3 drivers/power/supply/power_supply_leds.c | 5 drivers/power/supply/sbs-charger.c | 2 drivers/s390/cio/qdio.h | 25 - drivers/s390/cio/qdio_main.c | 62 +-- drivers/scsi/lpfc/lpfc_debugfs.c | 7 drivers/spi/spi-fsl-cpm.c | 23 + drivers/spi/spi-fsl-spi.c | 53 +- drivers/spi/spi-imx.c | 24 - drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 5 drivers/target/iscsi/iscsi_target.c | 6 drivers/tty/serial/8250/8250_core.c | 1 drivers/tty/serial/8250/8250_pci.c | 5 drivers/tty/serial/arc_uart.c | 7 drivers/tty/vt/vc_screen.c | 57 ++- drivers/usb/class/usbtmc.c | 2 drivers/usb/core/usb.c | 76 ++++ drivers/usb/dwc3/debugfs.c | 109 +++++ drivers/usb/gadget/function/u_ether.c | 39 -- drivers/usb/host/uhci-pci.c | 10 drivers/usb/misc/sisusbvga/sisusb.c | 14 drivers/usb/storage/scsiglue.c | 28 + drivers/usb/typec/altmodes/displayport.c | 4 drivers/usb/typec/tcpm/tcpm.c | 16 drivers/video/fbdev/udlfb.c | 13 drivers/watchdog/sp5100_tco.c | 4 drivers/xen/pvcalls-back.c | 9 fs/btrfs/disk-io.c | 9 fs/btrfs/free-space-cache.c | 7 fs/btrfs/inode.c | 12 fs/ceph/snap.c | 13 fs/ext2/ext2.h | 1 fs/ext2/super.c | 7 fs/ext4/mballoc.c | 65 ++- fs/f2fs/checkpoint.c | 12 fs/f2fs/data.c | 3 fs/gfs2/glops.c | 3 fs/hfsplus/inode.c | 28 + fs/nilfs2/inode.c | 18 fs/statfs.c | 4 include/linux/cpuhotplug.h | 1 include/linux/device.h | 1 include/linux/dim.h | 3 include/linux/if_team.h | 1 include/linux/if_vlan.h | 17 include/linux/power/bq27xxx_battery.h | 1 include/linux/sched/task_stack.h | 2 include/linux/string_helpers.h | 15 include/linux/usb.h | 5 include/net/bonding.h | 1 include/net/ip6_tunnel.h | 2 include/net/ip_tunnels.h | 2 include/net/netfilter/nf_tables.h | 15 include/net/netfilter/nf_tables_core.h | 8 include/net/netfilter/nft_fib.h | 2 include/net/netfilter/nft_meta.h | 4 include/net/sock.h | 2 include/uapi/sound/skl-tplg-interface.h | 3 kernel/bpf/verifier.c | 2 lib/cpu_rmap.c | 5 lib/debugobjects.c | 2 lib/dim/dim.c | 5 lib/dim/net_dim.c | 3 lib/dim/rdma_dim.c | 3 net/8021q/vlan_dev.c | 4 net/bluetooth/l2cap_core.c | 1 net/bridge/br_forward.c | 2 net/bridge/netfilter/nft_meta_bridge.c | 5 net/can/j1939/socket.c | 2 net/core/datagram.c | 15 net/core/dev.c | 4 net/core/skbuff.c | 4 net/ipv4/ip_gre.c | 6 net/ipv4/netfilter/nft_dup_ipv4.c | 18 net/ipv4/udplite.c | 2 net/ipv6/exthdrs_core.c | 2 net/ipv6/ip6_gre.c | 36 + net/ipv6/netfilter/nft_dup_ipv6.c | 18 net/ipv6/udplite.c | 2 net/key/af_key.c | 12 net/netfilter/core.c | 6 net/netfilter/nf_conntrack_standalone.c | 3 net/netfilter/nf_tables_api.c | 228 +++++++----- net/netfilter/nft_bitwise.c | 14 net/netfilter/nft_byteorder.c | 14 net/netfilter/nft_cmp.c | 8 net/netfilter/nft_ct.c | 12 net/netfilter/nft_dup_netdev.c | 6 net/netfilter/nft_dynset.c | 12 net/netfilter/nft_exthdr.c | 14 net/netfilter/nft_fib.c | 5 net/netfilter/nft_fwd_netdev.c | 18 net/netfilter/nft_hash.c | 25 - net/netfilter/nft_immediate.c | 6 net/netfilter/nft_lookup.c | 14 net/netfilter/nft_masq.c | 18 net/netfilter/nft_meta.c | 8 net/netfilter/nft_nat.c | 35 - net/netfilter/nft_numgen.c | 15 net/netfilter/nft_objref.c | 6 net/netfilter/nft_osf.c | 8 net/netfilter/nft_payload.c | 10 net/netfilter/nft_queue.c | 12 net/netfilter/nft_range.c | 6 net/netfilter/nft_redir.c | 18 net/netfilter/nft_rt.c | 7 net/netfilter/nft_socket.c | 7 net/netfilter/nft_tproxy.c | 14 net/netfilter/nft_tunnel.c | 8 net/netfilter/nft_xfrm.c | 7 net/netlink/af_netlink.c | 8 net/nsh/nsh.c | 8 net/packet/af_packet.c | 6 net/socket.c | 2 net/unix/af_unix.c | 22 - net/vmw_vsock/af_vsock.c | 2 samples/bpf/hbm.c | 1 scripts/recordmcount.c | 6 sound/firewire/digi00x/digi00x-stream.c | 4 sound/pci/hda/hda_generic.c | 7 sound/pci/hda/patch_ca0132.c | 1 sound/pci/hda/patch_hdmi.c | 5 sound/pci/hda/patch_realtek.c | 4 sound/soc/fsl/fsl_micfil.c | 15 tools/power/cpupower/utils/idle_monitor/mperf_monitor.c | 31 - tools/testing/selftests/memfd/fuse_test.c | 1 tools/testing/selftests/net/fib_tests.sh | 2 198 files changed, 1657 insertions(+), 832 deletions(-)
Adam Stylinski (1):
ALSA: hda/ca0132: add quirk for EVGA X299 DARK
Ai Chao (1):
ALSA: hda/realtek: Add a quirk for HP EliteDesk 805
Alain Volmat (1):
phy: st: miphy28lp: use _poll_timeout functions for waits
Alan Stern (5):
USB: usbtmc: Fix direction for 0-length ioctl control messages
fbdev: udlfb: Fix endpoint check
USB: core: Add routines for endpoint checks in old drivers
USB: sisusbvga: Add endpoint checks
media: radio-shark: Add endpoint checks
Aleksandr Loktionov (1):
igb: fix bit_shift to be in [1..8] range
Alexander Stein (1):
regmap: cache: Return error in cache sync operations for REGCACHE_NONE
Andreas Gruenbacher (1):
gfs2: Fix inode height consistency check
Armin Wolf (1):
ACPI: EC: Fix oops when removing custom query handlers
Arnd Bergmann (2):
clk: tegra20: fix gcc-7 constant overflow warning drm/exynos: fix g2d_open/close helper function definitions
Badhri Jagan Sridharan (1):
usb: typec: altmodes/displayport: fix pin_assignment_show
Bastien Nocera (2):
HID: logitech-hidpp: Don't use the USB serial for USB devices
HID: logitech-hidpp: Reconcile USB and Unifying serials
Bin Li (1):
ALSA: hda/realtek: Enable headset onLenovo M70/M90
Cezary Rojewski (1):
ASoC: Intel: Skylake: Fix declaration of enum skl_ch_cfg
Chao Yu (1):
f2fs: fix to drop all dirty pages during umount() if cp_error is set
Christophe JAILLET (3):
cassini: Fix a memory leak in the error handling path of cas_init_one()
forcedeth: Fix an error handling path in nv_probe() 3c589_cs: Fix an error handling path in tc589_probe()
Christophe Leroy (2):
spi: fsl-spi: Re-organise transfer bits_per_word adaptation
spi: fsl-cpm: Use 16 bit mode for large transfers with even size
Daisuke Nojiri (1):
power: supply: sbs-charger: Fix INHIBITED bit for Status reg
Dan Carpenter (3):
ALSA: firewire-digi00x: prevent potential use after free
coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet() xen/pvcalls-back: fix double frees with pvcalls_new_active_socket()
Daniel Gabay (1):
wifi: iwlwifi: pcie: fix possible NULL pointer dereference
Dave Hansen (1):
x86/mm: Avoid incomplete Global INVLPG flushes
Dmitry Bogdanov (1):
scsi: target: iscsit: Free cmds before session free
Dong Chenchen (1):
net: nsh: Use correct mac_offset to unwind gso skb in nsh_gso_segment()
Duoming Zhou (1):
media: netup_unidvb: fix use-after-free at del_timer()
Eli Cohen (1):
lib: cpu_rmap: Avoid use after free on rmap->obj array entries
Eric Dumazet (5):
netlink: annotate accesses to nlk->cb_running
net: annotate sk->sk_err write from do_recvmmsg()
net: add vlan_get_protocol_and_depth() helper
net: datagram: fix data-races in datagram_poll()
vlan: fix a potential uninit-value in vlan_dev_hard_start_xmit()
Filipe Manana (1):
btrfs: fix space cache inconsistency after error loading it from disk
Finn Thain (1):
m68k: Move signal frame following exception on 68020/030
Florian Fainelli (2):
net: bcmgenet: Remove phy_stop() from bcmgenet_netif_stop()
net: bcmgenet: Restore phy_stop() depending upon suspend/close
Florian Westphal (1):
netfilter: conntrack: fix possible bug_on with enable_hooks=1
Frank Wang (1):
usb: typec: tcpm: fix multiple times discover svids error
Gavrilov Ilia (1):
ipv6: Fix out-of-bounds access in ipv6_find_tlv()
George Kennedy (1):
vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF
Greg Kroah-Hartman (1):
Linux 5.4.244
Gregory Oakes (1):
watchdog: sp5100_tco: Immediately trigger upon starting.
Gustavo A. R. Silva (1):
RDMA/core: Fix multiple -Warray-bounds warnings
Hans de Goede (5):
wifi: iwlwifi: dvm: Fix memcpy: detected field-spanning write backtrace
power: supply: leds: Fix blink to LED on transition
power: supply: bq27xxx: Fix bq27xxx_battery_update() race condition
power: supply: bq27xxx: Fix I2C IRQ race on remove
power: supply: bq27xxx: Fix poll_interval handling and races on remove
Hao Zeng (2):
samples/bpf: Fix fout leak in hbm's run_bpf_prog
recordmcount: Fix memory leaks in the uwrite function
Hardik Garg (1):
selftests/memfd: Fix unknown type name build failure
Hector Martin (1):
wifi: brcmfmac: cfg80211: Pass the PMK in binary instead of hex
Heiko Carstens (2):
s390/qdio: get rid of register asm s390/qdio: fix do_sqbs() inline assembly constraint
Helge Deller (3):
parisc: Handle kgdb breakpoints only in kernel context
parisc: Allow to reboot machine after system halt
parisc: Fix flush_dcache_page() for usage from irq context
Hyunwoo Kim (1):
wifi: iwlwifi: pcie: Fix integer overflow in iwl_write_to_user_buf
Ilya Leoshkevich (1):
statfs: enforce statfs[64] structure initialization
Ioana Ciornei (1):
driver core: add a helper to setup both the of_node and fwnode of a device
Jan Kara (1):
ext2: Check block size validity during mount
Jason Gerecke (2):
HID: wacom: generic: Set battery quirk only when we see battery data
HID: wacom: Force pen out of prox if no events have been received in a while
Jerry Snitselaar (1):
tpm/tpm_tis: Disable interrupts for more Lenovo devices
Jie Wang (1):
net: hns3: fix reset delay time to avoid configuration timeout
Jijie Shao (1):
net: hns3: fix sending pfc frames after reset issue
Jimmy Assarsson (6):
can: kvaser_pciefd: Set CAN_STATE_STOPPED in kvaser_pciefd_stop()
can: kvaser_pciefd: Call request_irq() before enabling interrupts
can: kvaser_pciefd: Empty SRB buffer in probe
can: kvaser_pciefd: Clear listen-only bit if not explicitly requested
can: kvaser_pciefd: Do not send EFLUSH command on TFD interrupt
can: kvaser_pciefd: Disable interrupts in probe error path
Jiri Slaby (1):
vc_screen: rewrite vcs_size to accept vc, not inode
Johannes Berg (1):
wifi: iwlwifi: mvm: don't trust firmware n_channels
Jon Hunter (1):
usb: gadget: u_ether: Convert prints to device prints
Josef Bacik (1):
btrfs: use nofs when cleaning up aborted transactions
Josh Poimboeuf (1):
sched: Fix KCSAN noinstr violation
Justin Tee (1):
scsi: lpfc: Prevent lpfc_debugfs_lockstat_write() buffer overflow
Ke Zhang (1):
serial: arc_uart: fix of_iomap leak in arc_serial_probe
Kemeng Shi (1):
ext4: set goal start correctly in ext4_mb_normalize_request
Kevin Groeneveld (1):
spi: spi-imx: fix MX51_ECSPI_* macros when cs > 3
Konrad Gräfe (1):
usb: gadget: u_ether: Fix host MAC address case
Kuniyuki Iwashima (4):
net: Fix load-tearing on sk->sk_stamp in sock_recv_cmsgs().
af_unix: Fix a data race of sk->sk_receive_queue->qlen.
af_unix: Fix data races around sk->sk_shutdown.
udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated().Luke D. Jones (1):
ALSA: hda/realtek: Add quirk for 2nd ASUS GU603
Maxime Bizon (1):
usb-storage: fix deadlock when a scsi command timeouts more than once
Menglong Dong (1):
net: tap: check vlan with eth_type_vlan() method
Michael Ellerman (1):
powerpc/64s/radix: Fix soft dirty tracking
Min Li (1):
Bluetooth: L2CAP: fix "bad unlock balance" in l2cap_disconnect_rsp
Nathan Chancellor (1):
net: pasemi: Fix return type of pasemi_mac_start_tx()
Nick Child (1):
net: Catch invalid index in XPS mapping
Nikhil Mahale (1):
ALSA: hda: Add NVIDIA codec IDs a3 through a7 to patch table
Nikolay Borisov (1):
btrfs: replace calls to btrfs_find_free_ino with btrfs_find_free_objectid
Nur Hussein (1):
drm/tegra: Avoid potential 32-bit integer overflow
Ojaswin Mujoo (1):
ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()
Oliver Hartkopp (1):
can: j1939: recvmsg(): allow MSG_CMSG_COMPAT flag
Pablo Greco (1):
mt76: mt7615: Fix build with older compilers
Pablo Neira Ayuso (9):
netfilter: nftables: add nft_parse_register_load() and use it
netfilter: nftables: add nft_parse_register_store() and use it
netfilter: nftables: statify nft_parse_register()
netfilter: nf_tables: validate registers coming from userspace.
netfilter: nf_tables: add nft_setelem_parse_key()
netfilter: nf_tables: allow up to 64 bytes in the set element data area
netfilter: nf_tables: stricter validation of element data
netfilter: nf_tables: validate NFTA_SET_ELEM_OBJREF based on NFT_SET_OBJECT flag
netfilter: nf_tables: hold mutex on netns pre_exit path
Paolo Bonzini (1):
KVM: x86: do not report a vCPU as preempted outside instruction boundaries
Peilin Ye (3):
ip6_gre: Fix skb_under_panic in __gre6_xmit()
ip6_gre: Make o_seqno start from 0 in native mode ip_gre, ip6_gre: Fix race condition on o_seqno in collect_md mode
Philipp Hortmann (1):
staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE
Pierre Gondois (1):
firmware: arm_sdei: Fix sleep from invalid context BUG
Ping Cheng (2):
HID: wacom: Add new Intuos Pro Small (PTH-460) device IDs
HID: wacom: add three styli to wacom_intuos_get_tool_type
Po-Hsu Lin (1):
selftests: fib_tests: mute cleanup error message
Pratyush Yadav (1):
net: fix skb leak in __skb_tstamp_tx()
Qiang Ning (1):
mfd: dln2: Fix memory leak in dln2_probe()
Randy Dunlap (1):
ARM: 9296/1: HP Jornada 7XX: fix kernel-doc warnings
Rodrigo Siqueira (1):
drm/amd/display: Use DC_LOG_DC in the trasform pixel function
Rodríguez Barbarin, José Javier (1):
mcb-pci: Reallocate memory region to avoid memory overlapping
Roi Dayan (1):
net/mlx5: Fix error message when failing to allocate device memory
Roy Novich (1):
linux/dim: Do nothing if no time delta between samples
Ryusuke Konishi (1):
nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()
Saravana Kannan (1):
drm/mipi-dsi: Set the fwnode for mipi_dsi_device
Shay Drory (1):
net/mlx5: Devcom, fix error flow in mlx5_devcom_register_device
Shengjiu Wang (1):
ASoC: fsl_micfil: register platform component before registering cpu dai
Taehee Yoo (1):
net: fix stack overflow when LRO is disabled for virtual interfaces
Takashi Iwai (1):
ALSA: hda: Fix Oops by 9.1 surround channel names
Tamir Duberstein (1):
ACPICA: Avoid undefined behavior: applying zero offset to null pointer
Tetsuo Handa (2):
fs: hfsplus: remove WARN_ON() from hfsplus_cat_{read,write}_inode()
debugobjects: Don't wake up kswapd from fill_pool()
Tobias Brunner (1):
af_key: Reject optional tunnel/BEET mode templates in outbound policies
Tomas Krcka (1):
iommu/arm-smmu-v3: Acknowledge pri/event queue overflow if any
Tony Lindgren (1):
serial: 8250: Reinit port->pm on port specific driver unbind
Udipto Goswami (1):
usb: dwc3: debugfs: Resume dwc3 before accessing registers
Uwe Kleine-König (1):
net: fec: Better handle pm_runtime_get() failing in .remove()
Vadim Pasternak (1):
lib/string_helpers: Introduce string_upper() and string_lower() helpers
Vernon Lovejoy (1):
x86/show_trace_log_lvl: Ensure stack pointer is aligned, again
Vicki Pfau (1):
Input: xpad - add constants for GIP interface numbers
Vitaliy Tomin (1):
serial: Add support for Advantech PCI-1611U card
Weitao Wang (1):
USB: UHCI: adjust zhaoxin UHCI controllers OverCurrent bit value
Will Deacon (1):
bpf: Fix mask generation for 32-bit narrow loads of 64-bit fields
Wyes Karny (1):
cpupower: Make TSC read per CPU for Mperf monitor
Xin Long (1):
erspan: get the proto with the md version for collect_md
Xiubo Li (1):
ceph: force updating the msg pointer in non-split case
Zev Weiss (1):
gpio: mockup: Fix mode of debugfs files
Zhang Rui (1):
x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms
Zheng Wang (2):
memstick: r592: Fix UAF bug in r592_remove due to race condition
scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition
Zhuang Shengen (1):
vsock: avoid to close connected socket after the timeout
t.feng (1):
ipvlan:Fix out-of-bounds caused by unclear skb->cb
void0red (1):
ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 243 +SUBLEVEL = 244 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm/mach-sa1100/jornada720_ssp.c +4 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-only -/** +/* * arch/arm/mac-sa1100/jornada720_ssp.c * * Copyright (C) 2006/2007 Kristoffer Ericson <[email protected]>
@@ -26,6 +26,7 @@ static unsigned long jornada_ssp_flags;/** * jornada_ssp_reverse - reverses input byte +* @byte: input byte to reverse * * we need to reverse all data we receive from the mcu due to its physical location * returns : 01110111 -> 11101110
@@ -46,6 +47,7 @@ EXPORT_SYMBOL(jornada_ssp_reverse);/** * jornada_ssp_byte - waits for ready ssp bus and sends byte +* @byte: input byte to transmit * * waits for fifo buffer to clear and then transmits, if it doesn't then we will * timeout after <timeout> rounds. Needs mcu running before its called.
@@ -77,6 +79,7 @@ EXPORT_SYMBOL(jornada_ssp_byte);/** * jornada_ssp_inout - decide if input is command or trading byte +* @byte: input byte to send (may be %TXDUMMY) * * returns : (jornada_ssp_byte(byte)) on success * : %-ETIMEDOUT on timeout failure
arch/m68k/kernel/signal.c +10 -4
@@ -883,11 +883,17 @@ static inline int rt_setup_ucontext(struct ucontext __user *uc, struct pt_regs * }static inline void __user * -get_sigframe (struct ksignal *ksig,size_t frame_size) +get_sigframe (struct ksignal *ksig,struct pt_regs *tregs,size_t frame_size) {unsigned long usp =sigsp (rdusp (), ksig); +unsigned long gap =0 ; -return (void __user *)((usp - frame_size) &-8UL ); +if (CPU_IS_020_OR_030 && tregs->format ==0xb ) { +/* USP is unreliable so use worst-case value */ + gap =256 ; + } + +return (void __user *)((usp - gap - frame_size) &-8UL ); } static int setup_frame(struct ksignal *ksig, sigset_t *set,
@@ -905,7 +911,7 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,return -EFAULT ; } - frame =get_sigframe (ksig,sizeof (*frame) + fsize); + frame =get_sigframe (ksig, tregs,sizeof (*frame) + fsize);if (fsize) err |=copy_to_user (frame +1 , regs +1 , fsize);
@@ -976,7 +982,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,return -EFAULT ; } - frame =get_sigframe (ksig,sizeof (*frame)); + frame =get_sigframe (ksig, tregs,sizeof (*frame));if (fsize) err |=copy_to_user (&frame->uc.uc_extra, regs +1 , fsize);
arch/parisc/include/asm/cacheflush.h +5 -0
@@ -57,6 +57,11 @@ extern void flush_dcache_page(struct page *page);#define flush_dcache_mmap_lock (mapping) xa_lock_irq(&mapping->i_pages)#define flush_dcache_mmap_unlock (mapping) xa_unlock_irq(&mapping->i_pages) +#define flush_dcache_mmap_lock_irqsave (mapping, flags) \ + xa_lock_irqsave(&mapping->i_pages, flags) +#define flush_dcache_mmap_unlock_irqrestore (mapping, flags) \ + xa_unlock_irqrestore(&mapping->i_pages, flags) +#define flush_icache_page (vma,page) do { \ flush_kernel_dcache_page(page); \
arch/parisc/kernel/cache.c +3 -2
@@ -328,6 +328,7 @@ void flush_dcache_page(struct page *page)struct vm_area_struct *mpnt;unsigned long offset;unsigned long addr, old_addr =0 ; +unsigned long flags;pgoff_t pgoff;if (mapping && !mapping_mapped (mapping)) {
@@ -347,7 +348,7 @@ void flush_dcache_page(struct page *page)* declared as MAP_PRIVATE or MAP_SHARED), so we only need * to flush one address here for them all to become coherent */ -flush_dcache_mmap_lock (mapping); +flush_dcache_mmap_lock_irqsave (mapping, flags); vma_interval_tree_foreach(mpnt, &mapping->i_mmap, pgoff, pgoff) { offset = (pgoff - mpnt->vm_pgoff) <<PAGE_SHIFT ; addr = mpnt->vm_start + offset;
@@ -370,7 +371,7 @@ void flush_dcache_page(struct page *page) old_addr = addr; } } -flush_dcache_mmap_unlock (mapping); +flush_dcache_mmap_unlock_irqrestore (mapping, flags); }EXPORT_SYMBOL (flush_dcache_page);
arch/parisc/kernel/process.c +8 -3
@@ -124,13 +124,18 @@ void machine_power_off(void)/* It seems we have no way to power the system off via * software. The user has to press the button himself. */ -printk (KERN_EMERG "System shut down completed.\n" -"Please power this system off now." ); +printk ("Power off or press RETURN to reboot.\n" );/* prevent soft lockup/stalled CPU messages for endless loop. */ rcu_sysrq_start ();lockup_detector_soft_poweroff (); -for (;;); +while (1 ) { +/* reboot if user presses RETURN key */ +if (pdc_iodc_getc () ==13 ) { +printk ("Rebooting...\n" ); +machine_restart (NULL ); + } + } }void (*pm_power_off)(void );
arch/parisc/kernel/traps.c +2 -2
@@ -305,8 +305,8 @@ static void handle_break(struct pt_regs *regs)#endif #ifdef CONFIG_KGDB -if (unlikely (iir ==PARISC_KGDB_COMPILED_BREAK_INSN || - iir ==PARISC_KGDB_BREAK_INSN )) { +if (unlikely ((iir ==PARISC_KGDB_COMPILED_BREAK_INSN || + iir ==PARISC_KGDB_BREAK_INSN )) && !user_mode (regs)) {kgdb_handle_exception (9 ,SIGTRAP ,0 , regs);return ; }
arch/powerpc/mm/book3s64/radix_pgtable.c +2 -2
@@ -1018,8 +1018,8 @@ void radix__ptep_set_access_flags(struct vm_area_struct *vma, pte_t *ptep, pte_t entry, unsigned long address, int psize) { struct mm_struct *mm = vma->vm_mm; -unsigned long set =pte_val (entry) & (_PAGE_DIRTY | _PAGE_ACCESSED | - _PAGE_RW | _PAGE_EXEC); +unsigned long set =pte_val (entry) & (_PAGE_DIRTY | _PAGE_SOFT_DIRTY | + _PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC);unsigned long change =pte_val (entry) ^pte_val (*ptep);/*
arch/x86/include/asm/intel-family.h +5 -0
@@ -96,6 +96,11 @@#define INTEL_FAM6_LAKEFIELD 0x8A#define INTEL_FAM6_ALDERLAKE 0x97#define INTEL_FAM6_ALDERLAKE_L 0x9A +#define INTEL_FAM6_ALDERLAKE_N 0xBE + +#define INTEL_FAM6_RAPTORLAKE 0xB7 +#define INTEL_FAM6_RAPTORLAKE_P 0xBA +#define INTEL_FAM6_RAPTORLAKE_S 0xBF/* "Small Core" Processors (Atom) */
arch/x86/include/asm/kvm_host.h +3 -0
@@ -563,6 +563,7 @@ struct kvm_vcpu_arch {u64 ia32_misc_enable_msr;u64 smbase;u64 smi_count; +bool at_instruction_boundary;bool tpr_access_reporting;u64 ia32_xss;u64 microcode_version;
@@ -981,6 +982,8 @@ struct kvm_vcpu_stat {u64 irq_injections;u64 nmi_injections;u64 req_event; +u64 preemption_reported; +u64 preemption_other; };struct x86_instruction_info ;
arch/x86/kernel/cpu/topology.c +3 -2
@@ -79,7 +79,7 @@ int detect_extended_topology_early(struct cpuinfo_x86 *c)* initial apic id, which also represents 32-bit extended x2apic id. */ c->initial_apicid = edx; - smp_num_siblings =LEVEL_MAX_SIBLINGS (ebx); + smp_num_siblings =max_t (int, smp_num_siblings,LEVEL_MAX_SIBLINGS (ebx));#endif return 0 ; }
@@ -107,7 +107,8 @@ int detect_extended_topology(struct cpuinfo_x86 *c)*/ cpuid_count (leaf,SMT_LEVEL , &eax, &ebx, &ecx, &edx); c->initial_apicid = edx; - core_level_siblings = smp_num_siblings =LEVEL_MAX_SIBLINGS (ebx); + core_level_siblings =LEVEL_MAX_SIBLINGS (ebx); + smp_num_siblings =max_t (int, smp_num_siblings,LEVEL_MAX_SIBLINGS (ebx)); core_plus_mask_width = ht_mask_width =BITS_SHIFT_NEXT_LEVEL (eax); die_level_siblings =LEVEL_MAX_SIBLINGS (ebx); die_plus_mask_width =BITS_SHIFT_NEXT_LEVEL (eax);
arch/x86/kernel/dumpstack.c +5 -2
@@ -171,7 +171,6 @@ void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,printk ("%sCall Trace:\n" , log_lvl);unwind_start (&state, task, regs, stack); - stack = stack ? :get_stack_pointer (task, regs); regs =unwind_get_entry_regs (&state, &partial);/*
@@ -190,9 +189,13 @@ void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,* - hardirq stack * - entry stack */ -for ( ; stack; stack =PTR_ALIGN (stack_info.next_sp,sizeof (long ))) { +for (stack = stack ?:get_stack_pointer (task, regs); + stack; + stack = stack_info.next_sp) {const char *stack_name; + stack =PTR_ALIGN (stack,sizeof (long )); +if (get_stack_info (stack, task, &stack_info, &visit_mask)) {/* * We weren't on a valid stack. It's possible that
arch/x86/kvm/svm.c +2 -1
@@ -6246,7 +6246,8 @@ static int svm_check_intercept(struct kvm_vcpu *vcpu,static void svm_handle_exit_irqoff (struct kvm_vcpu *vcpu) { - +if (to_svm (vcpu)->vmcb->control.exit_code ==SVM_EXIT_INTR ) + vcpu->arch.at_instruction_boundary = true; }static void svm_sched_in (struct kvm_vcpu *vcpu,int cpu)
arch/x86/kvm/vmx/vmx.c +1 -0
@@ -6358,6 +6358,7 @@ static void handle_external_interrupt_irqoff(struct kvm_vcpu *vcpu) );kvm_after_interrupt (vcpu); + vcpu->arch.at_instruction_boundary = true; }STACK_FRAME_NON_STANDARD (handle_external_interrupt_irqoff);
arch/x86/kvm/x86.c +22 -0
@@ -207,6 +207,8 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { { "nmi_injections", VCPU_STAT(nmi_injections) }, { "req_event", VCPU_STAT(req_event) }, { "l1d_flush", VCPU_STAT(l1d_flush) }, + { "preemption_reported", VCPU_STAT(preemption_reported) }, + { "preemption_other", VCPU_STAT(preemption_other) }, { "mmu_shadow_zapped", VM_STAT(mmu_shadow_zapped) }, { "mmu_pte_write", VM_STAT(mmu_pte_write) }, { "mmu_pde_zapped", VM_STAT(mmu_pde_zapped) },
@@ -3562,6 +3564,19 @@ static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu)struct kvm_host_map map;struct kvm_steal_time *st; +/* +* The vCPU can be marked preempted if and only if the VM-Exit was on +* an instruction boundary and will not trigger guest emulation of any +* kind (see vcpu_run). Vendor specific code controls (conservatively) +* when this is true, for example allowing the vCPU to be marked +* preempted if and only if the VM-Exit was due to a host interrupt. +*/ +if (!vcpu->arch.at_instruction_boundary) { + vcpu->stat.preemption_other++; +return ; + } + + vcpu->stat.preemption_reported++;if (!(vcpu->arch.st.msr_val &KVM_MSR_ENABLED ))return ;
@@ -8446,6 +8461,13 @@ static int vcpu_run(struct kvm_vcpu *vcpu) vcpu->arch.l1tf_flush_l1d = true;for (;;) { +/* +* If another guest vCPU requests a PV TLB flush in the middle +* of instruction emulation, the rest of the emulation could +* use a stale page translation. Assume that any code after +* this point can start executing an instruction. +*/ + vcpu->arch.at_instruction_boundary = false;if (kvm_vcpu_running (vcpu)) { r =vcpu_enter_guest (vcpu); }else {
arch/x86/mm/init.c +25 -0
@@ -9,6 +9,7 @@#include <linux/sched/task.h> #include <asm/set_memory.h> +#include <asm/cpu_device_id.h> #include <asm/e820/api.h> #include <asm/init.h> #include <asm/page.h>
@@ -208,6 +209,24 @@ static void __init probe_page_size_mask(void) } } +#define INTEL_MATCH (_model) { .vendor = X86_VENDOR_INTEL, \ + .family = 6, \ + .model = _model, \ + } +/* +* INVLPG may not properly flush Global entries +* on these CPUs when PCIDs are enabled. +*/ +static const struct x86_cpu_id invlpg_miss_ids[] = { +INTEL_MATCH (INTEL_FAM6_ALDERLAKE ), +INTEL_MATCH (INTEL_FAM6_ALDERLAKE_L ), +INTEL_MATCH (INTEL_FAM6_ALDERLAKE_N ), +INTEL_MATCH (INTEL_FAM6_RAPTORLAKE ), +INTEL_MATCH (INTEL_FAM6_RAPTORLAKE_P ), +INTEL_MATCH (INTEL_FAM6_RAPTORLAKE_S ), + {} +}; +static void setup_pcid (void ) {if (!IS_ENABLED (CONFIG_X86_64 ))
@@ -216,6 +235,12 @@ static void setup_pcid(void)if (!boot_cpu_has (X86_FEATURE_PCID ))return ; +if (x86_match_cpu (invlpg_miss_ids)) { +pr_info ("Incomplete global flushes, disabling PCID" ); +setup_clear_cpu_cap (X86_FEATURE_PCID ); +return ; + } +if (boot_cpu_has (X86_FEATURE_PGE )) {/* * This can't be cr4_set_bits_and_update_boot() -- the
drivers/acpi/acpica/dbnames.c +3 -0
@@ -571,6 +571,9 @@ acpi_status acpi_db_display_objects(char *obj_type_arg, char *display_count_arg) object_info =ACPI_ALLOCATE_ZEROED (sizeof (struct acpi_object_info )); +if (!object_info) +return (AE_NO_MEMORY ); +/* Walk the namespace from the root */ (void)acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
drivers/acpi/acpica/dswstate.c +8 -3
@@ -576,9 +576,14 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,ACPI_FUNCTION_TRACE (ds_init_aml_walk); walk_state->parser_state.aml = - walk_state->parser_state.aml_start = aml_start; - walk_state->parser_state.aml_end = - walk_state->parser_state.pkg_end = aml_start + aml_length; + walk_state->parser_state.aml_start = + walk_state->parser_state.aml_end = + walk_state->parser_state.pkg_end = aml_start; +/* Avoid undefined behavior: applying zero offset to null pointer */ +if (aml_length !=0 ) { + walk_state->parser_state.aml_end += aml_length; + walk_state->parser_state.pkg_end += aml_length; + }/* The next_op of the next_walk will be the beginning of the method */
drivers/acpi/ec.c +1 -0
@@ -1118,6 +1118,7 @@ static void acpi_ec_remove_query_handlers(struct acpi_ec *ec,void acpi_ec_remove_query_handler (struct acpi_ec *ec,u8 query_bit) {acpi_ec_remove_query_handlers (ec, false, query_bit); +flush_workqueue (ec_query_wq); }EXPORT_SYMBOL_GPL (acpi_ec_remove_query_handler);
drivers/base/core.c +7 -0
@@ -3474,6 +3474,13 @@ void device_set_of_node_from_dev(struct device *dev, const struct device *dev2) }EXPORT_SYMBOL_GPL (device_set_of_node_from_dev); +void device_set_node (struct device *dev,struct fwnode_handle *fwnode) +{ + dev->fwnode = fwnode; + dev->of_node =to_of_node (fwnode); +} +EXPORT_SYMBOL_GPL (device_set_node); +int device_match_name (struct device *dev,const void *name) {return sysfs_streq (dev_name (dev), name);
drivers/base/regmap/regcache.c +6 -0
@@ -343,6 +343,9 @@ int regcache_sync(struct regmap *map)const char *name;bool bypass; +if (WARN_ON (map->cache_type ==REGCACHE_NONE )) +return -EINVAL ; +BUG_ON (!map->cache_ops); map->lock (map->lock_arg);
@@ -412,6 +415,9 @@ int regcache_sync_region(struct regmap *map, unsigned int min,const char *name;bool bypass; +if (WARN_ON (map->cache_type ==REGCACHE_NONE )) +return -EINVAL ; +BUG_ON (!map->cache_ops); map->lock (map->lock_arg);
drivers/char/tpm/tpm_tis.c +16 -0
@@ -83,6 +83,22 @@ static const struct dmi_system_id tpm_tis_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T490s"), }, }, + { + .callback = tpm_tis_disable_irq, + .ident = "ThinkStation P360 Tiny", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkStation P360 Tiny"), + }, + }, + { + .callback = tpm_tis_disable_irq, + .ident = "ThinkPad L490", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L490"), + }, + }, {} };
drivers/clk/tegra/clk-tegra20.c +14 -14
@@ -18,24 +18,24 @@#define MISC_CLK_ENB 0x48#define OSC_CTRL 0x50 -#define OSC_CTRL_OSC_FREQ_MASK (3<<30) -#define OSC_CTRL_OSC_FREQ_13MHZ (0<<30) -#define OSC_CTRL_OSC_FREQ_19_2MHZ (1<<30) -#define OSC_CTRL_OSC_FREQ_12MHZ (2<<30) -#define OSC_CTRL_OSC_FREQ_26MHZ (3<<30) -#define OSC_CTRL_MASK (0x3f2 | OSC_CTRL_OSC_FREQ_MASK) - -#define OSC_CTRL_PLL_REF_DIV_MASK (3<<28) -#define OSC_CTRL_PLL_REF_DIV_1 (0<<28) -#define OSC_CTRL_PLL_REF_DIV_2 (1<<28) -#define OSC_CTRL_PLL_REF_DIV_4 (2<<28) +#define OSC_CTRL_OSC_FREQ_MASK (3u<<30) +#define OSC_CTRL_OSC_FREQ_13MHZ (0u<<30) +#define OSC_CTRL_OSC_FREQ_19_2MHZ (1u<<30) +#define OSC_CTRL_OSC_FREQ_12MHZ (2u<<30) +#define OSC_CTRL_OSC_FREQ_26MHZ (3u<<30) +#define OSC_CTRL_MASK (0x3f2u | OSC_CTRL_OSC_FREQ_MASK) + +#define OSC_CTRL_PLL_REF_DIV_MASK (3u<<28) +#define OSC_CTRL_PLL_REF_DIV_1 (0u<<28) +#define OSC_CTRL_PLL_REF_DIV_2 (1u<<28) +#define OSC_CTRL_PLL_REF_DIV_4 (2u<<28)#define OSC_FREQ_DET 0x58 -#define OSC_FREQ_DET_TRIG (1<<31) +#define OSC_FREQ_DET_TRIG (1u<<31)#define OSC_FREQ_DET_STATUS 0x5c -#define OSC_FREQ_DET_BUSY (1<<31) -#define OSC_FREQ_DET_CNT_MASK 0xFFFF +#define OSC_FREQ_DET_BUSYu (1<<31) +#define OSC_FREQ_DET_CNT_MASK 0xFFFFu#define TEGRA20_CLK_PERIPH_BANKS 3
drivers/firmware/arm_sdei.c +20 -17
@@ -44,6 +44,8 @@ static asmlinkage void (*sdei_firmware_call)(unsigned long function_id,/* entry point from firmware to arch asm code */ static unsigned long sdei_entry_point; +static int sdei_hp_state; +struct sdei_event {/* These three are protected by the sdei_list_lock */ struct list_head list;
@@ -305,8 +307,6 @@ int sdei_mask_local_cpu(void) {int err; -WARN_ON_ONCE (preemptible ()); - err =invoke_sdei_fn (SDEI_1_0_FN_SDEI_PE_MASK ,0 ,0 ,0 ,0 ,0 ,NULL );if (err && err != -EIO ) { pr_warn_once("failed to mask CPU[%u]: %d\n",
@@ -319,6 +319,7 @@ int sdei_mask_local_cpu(void)static void _ipi_mask_cpu (void *ignored) { +WARN_ON_ONCE (preemptible ());sdei_mask_local_cpu (); }
@@ -326,8 +327,6 @@ int sdei_unmask_local_cpu(void) {int err; -WARN_ON_ONCE (preemptible ()); - err =invoke_sdei_fn (SDEI_1_0_FN_SDEI_PE_UNMASK ,0 ,0 ,0 ,0 ,0 ,NULL );if (err && err != -EIO ) { pr_warn_once("failed to unmask CPU[%u]: %d\n",
@@ -340,6 +339,7 @@ int sdei_unmask_local_cpu(void)static void _ipi_unmask_cpu (void *ignored) { +WARN_ON_ONCE (preemptible ());sdei_unmask_local_cpu (); }
@@ -347,6 +347,8 @@ static void _ipi_private_reset(void *ignored) {int err; +WARN_ON_ONCE (preemptible ()); + err =invoke_sdei_fn (SDEI_1_0_FN_SDEI_PRIVATE_RESET ,0 ,0 ,0 ,0 ,0 ,NULL );if (err && err != -EIO )
@@ -393,8 +395,6 @@ static void _local_event_enable(void *data)int err;struct sdei_crosscall_args *arg = data; -WARN_ON_ONCE (preemptible ()); - err =sdei_api_event_enable (arg->event->event_num);sdei_cross_call_return (arg, err);
@@ -485,8 +485,6 @@ static void _local_event_unregister(void *data)int err;struct sdei_crosscall_args *arg = data; -WARN_ON_ONCE (preemptible ()); - err =sdei_api_event_unregister (arg->event->event_num);sdei_cross_call_return (arg, err);
@@ -575,8 +573,6 @@ static void _local_event_register(void *data)struct sdei_registered_event *reg;struct sdei_crosscall_args *arg = data; -WARN_ON (preemptible ()); - reg =per_cpu_ptr (arg->event->private_registered,smp_processor_id ()); err =sdei_api_event_register (arg->event->event_num, sdei_entry_point, reg,0 ,0 );
@@ -756,6 +752,8 @@ static int sdei_pm_notifier(struct notifier_block *nb, unsigned long action, {int rv; +WARN_ON_ONCE (preemptible ()); +switch (action) {case CPU_PM_ENTER : rv =sdei_mask_local_cpu ();
@@ -804,7 +802,7 @@ static int sdei_device_freeze(struct device *dev)int err;/* unregister private events */ -cpuhp_remove_state (CPUHP_AP_ARM_SDEI_STARTING ); +cpuhp_remove_state (sdei_entry_point); err =sdei_unregister_shared ();if (err)
@@ -825,12 +823,15 @@ static int sdei_device_thaw(struct device *dev)return err; } - err =cpuhp_setup_state (CPUHP_AP_ARM_SDEI_STARTING ,"SDEI" , + err =cpuhp_setup_state (CPUHP_AP_ONLINE_DYN ,"SDEI" , &sdei_cpuhp_up, &sdei_cpuhp_down); -if (err) +if (err <0 ) {pr_warn ("Failed to re-register CPU hotplug notifier...\n" ); +return err; + } -return err; + sdei_hp_state = err; +return 0 ; }static int sdei_device_restore (struct device *dev)
@@ -862,7 +863,7 @@ static int sdei_reboot_notifier(struct notifier_block *nb, unsigned long action,* We are going to reset the interface, after this there is no point * doing work when we take CPUs offline. */ -cpuhp_remove_state (CPUHP_AP_ARM_SDEI_STARTING ); +cpuhp_remove_state (sdei_hp_state);sdei_platform_reset ();
@@ -1044,13 +1045,15 @@ static int sdei_probe(struct platform_device *pdev) goto remove_cpupm; } - err =cpuhp_setup_state (CPUHP_AP_ARM_SDEI_STARTING ,"SDEI" , + err =cpuhp_setup_state (CPUHP_AP_ONLINE_DYN ,"SDEI" , &sdei_cpuhp_up, &sdei_cpuhp_down); -if (err) { +if (err <0 ) {pr_warn ("Failed to register CPU hotplug notifier...\n" ); goto remove_reboot; } + sdei_hp_state = err; +return 0 ; remove_reboot:
drivers/gpio/gpio-mockup.c +1 -1
@@ -339,7 +339,7 @@ static void gpio_mockup_debugfs_setup(struct device *dev, priv->offset = i; priv->desc = &gc->gpiodev->descs[i]; -debugfs_create_file (name,0200 , chip->dbg_dir, priv, +debugfs_create_file (name,0600 , chip->dbg_dir, priv, &gpio_mockup_debugfs_ops); }
drivers/gpu/drm/amd/display/dc/dce/dce_transform.c +2 -3
@@ -778,7 +778,7 @@ static void dce_transform_set_pixel_storage_depth( color_depth =COLOR_DEPTH_101010 ; pixel_depth =0 ; expan_mode =1 ; -BREAK_TO_DEBUGGER (); +DC_LOG_DC ("The pixel depth %d is not valid, set COLOR_DEPTH_101010 instead." , depth);break ; }
@@ -792,8 +792,7 @@ static void dce_transform_set_pixel_storage_depth(if (!(xfm_dce->lb_pixel_depth_supported & depth)) {/*we should use unsupported capabilities * unless it is required by w/a*/ -DC_LOG_WARNING ("%s: Capability not supported" , - __func__); +DC_LOG_DC ("%s: Capability not supported" , __func__); } }
drivers/gpu/drm/drm_mipi_dsi.c +1 -1
@@ -221,7 +221,7 @@ mipi_dsi_device_register_full(struct mipi_dsi_host *host,return dsi; } - dsi->dev.of_node = info->node; +device_set_node (&dsi->dev,of_fwnode_handle (info->node)); dsi->channel = info->channel;strlcpy (dsi->name, info->type,sizeof (dsi->name));
drivers/gpu/drm/exynos/exynos_drm_g2d.h +2 -2
@@ -34,11 +34,11 @@ static inline int exynos_g2d_exec_ioctl(struct drm_device *dev, void *data, return -ENODEV; } -int g2d_open (struct drm_device *drm_dev,struct drm_file *file) +static inline int g2d_open (struct drm_device *drm_dev,struct drm_file *file) {return 0 ; } -void g2d_close (struct drm_device *drm_dev,struct drm_file *file) +static inline void g2d_close (struct drm_device *drm_dev,struct drm_file *file) { }#endif
drivers/gpu/drm/tegra/sor.c +1 -1
@@ -906,7 +906,7 @@ static int tegra_sor_compute_config(struct tegra_sor *sor, struct drm_dp_link *link) {const u64 f =100000 , link_rate = link->rate *1000 ; -const u64 pclk = mode->clock *1000 ; +const u64 pclk = (u64 )mode->clock *1000 ;u64 input, output, watermark, num;struct tegra_sor_params params;u32 num_syms_per_line;
drivers/hid/hid-logitech-hidpp.c +51 -2
71 lines not on this page · raw message
drivers/hid/wacom.h +3 -0
@@ -91,6 +91,7 @@#include <linux/leds.h> #include <linux/usb/input.h> #include <linux/power_supply.h> +#include <linux/timer.h> #include <asm/unaligned.h> /*
@@ -167,6 +168,7 @@ struct wacom {struct delayed_work init_work;struct wacom_remote *remote;struct work_struct mode_change_work; +struct timer_list idleprox_timer;bool generic_has_leds;struct wacom_leds {struct wacom_group_leds *groups;
@@ -239,4 +241,5 @@ struct wacom_led *wacom_led_find(struct wacom *wacom, unsigned int group,struct wacom_led *wacom_led_next (struct wacom *wacom,struct wacom_led *cur);int wacom_equivalent_usage (int usage);int wacom_initialize_leds (struct wacom *wacom); +void wacom_idleprox_timeout (struct timer_list *list);#endif
drivers/hid/wacom_sys.c +2 -0
@@ -2781,6 +2781,7 @@ static int wacom_probe(struct hid_device *hdev,INIT_WORK (&wacom->battery_work, wacom_battery_work);INIT_WORK (&wacom->remote_work, wacom_remote_work);INIT_WORK (&wacom->mode_change_work, wacom_mode_change_work); +timer_setup (&wacom->idleprox_timer, &wacom_idleprox_timeout,TIMER_DEFERRABLE );/* ask for the report descriptor to be loaded by HID */ error =hid_parse (hdev);
@@ -2825,6 +2826,7 @@ static void wacom_remove(struct hid_device *hdev)cancel_work_sync (&wacom->battery_work);cancel_work_sync (&wacom->remote_work);cancel_work_sync (&wacom->mode_change_work); +del_timer_sync (&wacom->idleprox_timer);if (hdev->bus ==BUS_BLUETOOTH )device_remove_file (&hdev->dev, &dev_attr_speed);
drivers/hid/wacom_wac.c +58 -22
153 lines not on this page · raw message
drivers/hwtracing/coresight/coresight-tmc-etr.c +1 -1
@@ -909,7 +909,7 @@ tmc_etr_buf_insert_barrier_packet(struct etr_buf *etr_buf, u64 offset) len =tmc_etr_buf_get_data (etr_buf, offset,CORESIGHT_BARRIER_PKT_SIZE , &bufp); -if (WARN_ON (len <CORESIGHT_BARRIER_PKT_SIZE )) +if (WARN_ON (len <0 || len <CORESIGHT_BARRIER_PKT_SIZE ))return -EINVAL ;coresight_insert_barrier_packet (bufp);return offset +CORESIGHT_BARRIER_PKT_SIZE ;
drivers/infiniband/core/user_mad.c +14 -9
@@ -131,6 +131,11 @@ struct ib_umad_packet {struct ib_user_mad mad; }; +struct ib_rmpp_mad_hdr { +struct ib_mad_hdr mad_hdr; +struct ib_rmpp_hdr rmpp_hdr; +} __packed; +#define CREATE_TRACE_POINTS #include <trace/events/ib_umad.h>
@@ -494,11 +499,11 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf, size_t count, loff_t *pos) { struct ib_umad_file *file = filp->private_data; +struct ib_rmpp_mad_hdr *rmpp_mad_hdr;struct ib_umad_packet *packet;struct ib_mad_agent *agent;struct rdma_ah_attr ah_attr;struct ib_ah *ah; -struct ib_rmpp_mad *rmpp_mad;__be64 *tid;int ret, data_len, hdr_len, copy_offset, rmpp_active;u8 base_version;
@@ -506,7 +511,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,if (count <hdr_size (file) +IB_MGMT_RMPP_HDR )return -EINVAL ; - packet =kzalloc (sizeof *packet +IB_MGMT_RMPP_HDR ,GFP_KERNEL ); + packet =kzalloc (sizeof (*packet) +IB_MGMT_RMPP_HDR ,GFP_KERNEL );if (!packet)return -ENOMEM ;
@@ -560,13 +565,13 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf, goto err_up; } - rmpp_mad = (struct ib_rmpp_mad *) packet->mad.data; - hdr_len =ib_get_mad_data_offset (rmpp_mad->mad_hdr.mgmt_class); + rmpp_mad_hdr = (struct ib_rmpp_mad_hdr *)packet->mad.data; + hdr_len =ib_get_mad_data_offset (rmpp_mad_hdr->mad_hdr.mgmt_class); -if (ib_is_mad_class_rmpp (rmpp_mad->mad_hdr.mgmt_class) +if (ib_is_mad_class_rmpp (rmpp_mad_hdr->mad_hdr.mgmt_class) &&ib_mad_kernel_rmpp_agent (agent)) { copy_offset =IB_MGMT_RMPP_HDR ; - rmpp_active =ib_get_rmpp_flags (&rmpp_mad->rmpp_hdr) & + rmpp_active =ib_get_rmpp_flags (&rmpp_mad_hdr->rmpp_hdr) &IB_MGMT_RMPP_FLAG_ACTIVE ; }else { copy_offset =IB_MGMT_MAD_HDR ;
@@ -615,12 +620,12 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf, tid = &((struct ib_mad_hdr *) packet->msg->mad)->tid; *tid =cpu_to_be64 (((u64 ) agent->hi_tid) <<32 | (be64_to_cpup (tid) &0xffffffff )); - rmpp_mad->mad_hdr.tid = *tid; + rmpp_mad_hdr->mad_hdr.tid = *tid; }if (!ib_mad_kernel_rmpp_agent (agent) - &&ib_is_mad_class_rmpp (rmpp_mad->mad_hdr.mgmt_class) - && (ib_get_rmpp_flags (&rmpp_mad->rmpp_hdr) &IB_MGMT_RMPP_FLAG_ACTIVE )) { + &&ib_is_mad_class_rmpp (rmpp_mad_hdr->mad_hdr.mgmt_class) + && (ib_get_rmpp_flags (&rmpp_mad_hdr->rmpp_hdr) &IB_MGMT_RMPP_FLAG_ACTIVE )) {spin_lock_irq (&file->send_lock);list_add_tail (&packet->list, &file->send_list);spin_unlock_irq (&file->send_lock);
drivers/input/joystick/xpad.c +4 -1
@@ -489,6 +489,9 @@ struct xboxone_init_packet { } +#define GIP_WIRED_INTF_DATA 0 +#define GIP_WIRED_INTF_AUDIO 1 +/* * This packet is required for all Xbox One pads with 2015 * or later firmware installed (or present from the factory).
@@ -1813,7 +1816,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id }if (xpad->xtype ==XTYPE_XBOXONE && - intf->cur_altsetting->desc.bInterfaceNumber !=0 ) { + intf->cur_altsetting->desc.bInterfaceNumber !=GIP_WIRED_INTF_DATA ) {/* * The Xbox One controller lists three interfaces all with the * same interface class, subclass and protocol. Differentiate by
drivers/iommu/arm-smmu-v3.c +14 -5
@@ -760,6 +760,18 @@ static void queue_inc_cons(struct arm_smmu_ll_queue *q) q->cons =Q_OVF (q->cons) |Q_WRP (q, cons) |Q_IDX (q, cons); } +static void queue_sync_cons_ovf (struct arm_smmu_queue *q) +{ +struct arm_smmu_ll_queue *llq = &q->llq; + +if (likely (Q_OVF (llq->prod) ==Q_OVF (llq->cons))) +return ; + + llq->cons =Q_OVF (llq->prod) |Q_WRP (llq, llq->cons) | +Q_IDX (llq, llq->cons); +queue_sync_cons_out (q); +} +static int queue_sync_prod_in (struct arm_smmu_queue *q) {int ret =0 ;
@@ -1720,8 +1732,7 @@ static irqreturn_t arm_smmu_evtq_thread(int irq, void *dev) }while (!queue_empty (llq));/* Sync our overflow flag, as we believe we're up to speed */ - llq->cons =Q_OVF (llq->prod) |Q_WRP (llq, llq->cons) | -Q_IDX (llq, llq->cons); +queue_sync_cons_ovf (q);return IRQ_HANDLED ; }
@@ -1779,9 +1790,7 @@ static irqreturn_t arm_smmu_priq_thread(int irq, void *dev) }while (!queue_empty (llq));/* Sync our overflow flag, as we believe we're up to speed */ - llq->cons =Q_OVF (llq->prod) |Q_WRP (llq, llq->cons) | -Q_IDX (llq, llq->cons); -queue_sync_cons_out (q); +queue_sync_cons_ovf (q);return IRQ_HANDLED ; }
drivers/mcb/mcb-pci.c +25 -2
@@ -31,7 +31,7 @@ static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) {struct resource *res;struct priv *priv; -int ret; +int ret, table_size;unsigned long flags; priv =devm_kzalloc (&pdev->dev,sizeof (struct priv ),GFP_KERNEL );
@@ -90,7 +90,30 @@ static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)if (ret <0 ) goto out_mcb_bus; -dev_dbg (&pdev->dev,"Found %d cells\n" , ret); + table_size = ret; + +if (table_size <CHAM_HEADER_SIZE ) { +/* Release the previous resources */ +devm_iounmap (&pdev->dev, priv->base); +devm_release_mem_region (&pdev->dev, priv->mapbase,CHAM_HEADER_SIZE ); + +/* Then, allocate it again with the actual chameleon table size */ + res =devm_request_mem_region (&pdev->dev, priv->mapbase, + table_size, +KBUILD_MODNAME ); +if (!res) { +dev_err (&pdev->dev,"Failed to request PCI memory\n" ); + ret = -EBUSY ; + goto out_mcb_bus; + } + + priv->base =devm_ioremap (&pdev->dev, priv->mapbase, table_size); +if (!priv->base) { +dev_err (&pdev->dev,"Cannot ioremap\n" ); + ret = -ENOMEM ; + goto out_mcb_bus; + } + }mcb_bus_add_devices (priv->bus);
drivers/media/pci/netup_unidvb/netup_unidvb_core.c +1 -1
@@ -697,7 +697,7 @@ static void netup_unidvb_dma_fini(struct netup_unidvb_dev *ndev, int num)netup_unidvb_dma_enable (dma,0 );msleep (50 );cancel_work_sync (&dma->work); -del_timer (&dma->timeout); +del_timer_sync (&dma->timeout); }static int netup_unidvb_dma_setup (struct netup_unidvb_dev *ndev)
drivers/media/radio/radio-shark.c +10 -0
@@ -316,6 +316,16 @@ static int usb_shark_probe(struct usb_interface *intf, {struct shark_device *shark;int retval = -ENOMEM ; +static const u8 ep_addresses[] = { +SHARK_IN_EP |USB_DIR_IN , +SHARK_OUT_EP |USB_DIR_OUT , +0 }; + +/* Are the expected endpoints present? */ +if (!usb_check_int_endpoints (intf, ep_addresses)) { +dev_err (&intf->dev,"Invalid radioSHARK device\n" ); +return -EINVAL ; + } shark =kzalloc (sizeof (struct shark_device ),GFP_KERNEL );if (!shark)
drivers/media/radio/radio-shark2.c +10 -0
@@ -282,6 +282,16 @@ static int usb_shark_probe(struct usb_interface *intf, {struct shark_device *shark;int retval = -ENOMEM ; +static const u8 ep_addresses[] = { +SHARK_IN_EP |USB_DIR_IN , +SHARK_OUT_EP |USB_DIR_OUT , +0 }; + +/* Are the expected endpoints present? */ +if (!usb_check_int_endpoints (intf, ep_addresses)) { +dev_err (&intf->dev,"Invalid radioSHARK2 device\n" ); +return -EINVAL ; + } shark =kzalloc (sizeof (struct shark_device ),GFP_KERNEL );if (!shark)
drivers/memstick/host/r592.c +1 -1
@@ -828,7 +828,7 @@ static void r592_remove(struct pci_dev *pdev)/* Stop the processing thread. That ensures that we won't take any more requests */ kthread_stop (dev->io_thread); - +del_timer_sync (&dev->detect_timer);r592_enable_device (dev, false);while (!error && dev->req) {
drivers/message/fusion/mptlan.c +2 -0
@@ -1430,7 +1430,9 @@ mptlan_remove(struct pci_dev *pdev) {MPT_ADAPTER *ioc =pci_get_drvdata (pdev);struct net_device *dev = ioc->netdev; +struct mpt_lan_priv *priv =netdev_priv (dev); +cancel_delayed_work_sync (&priv->post_buckets_task);if (dev !=NULL ) {unregister_netdev (dev);free_netdev (dev);
drivers/mfd/dln2.c +1 -0
@@ -797,6 +797,7 @@ static int dln2_probe(struct usb_interface *interface,dln2_stop_rx_urbs (dln2); out_free: +usb_put_dev (dln2->usb_dev);dln2_free (dln2);return ret;
drivers/net/bonding/bond_main.c +7 -1
@@ -3239,7 +3239,11 @@ static int bond_slave_netdev_event(unsigned long event,unblock_netpoll_tx ();break ;case NETDEV_FEAT_CHANGE : -bond_compute_features (bond); +if (!bond->notifier_ctx) { + bond->notifier_ctx = true; +bond_compute_features (bond); + bond->notifier_ctx = false; + }break ;case NETDEV_RESEND_IGMP :/* Propagate to master device */
@@ -4878,6 +4882,8 @@ static int bond_init(struct net_device *bond_dev)if (!bond->wq)return -ENOMEM ; + bond->notifier_ctx = false; +spin_lock_init (&bond->stats_lock);lockdep_register_key (&bond->stats_lock_key);lockdep_set_class (&bond->stats_lock, &bond->stats_lock_key);
drivers/net/can/kvaser_pciefd.c +29 -22
145 lines not on this page · raw message
drivers/net/ethernet/3com/3c589_cs.c +10 -1
@@ -196,6 +196,7 @@ static int tc589_probe(struct pcmcia_device *link) {struct el3_private *lp;struct net_device *dev; +int ret;dev_dbg (&link->dev,"3c589_attach()\n" );
@@ -219,7 +220,15 @@ static int tc589_probe(struct pcmcia_device *link) dev->ethtool_ops = &netdev_ethtool_ops; -return tc589_config (link); + ret =tc589_config (link); +if (ret) + goto err_free_netdev; + +return 0 ; + +err_free_netdev: +free_netdev (dev); +return ret; }static void tc589_detach (struct pcmcia_device *link)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +5 -4
@@ -2973,7 +2973,7 @@ static int bcmgenet_open(struct net_device *dev)return ret; } -static void bcmgenet_netif_stop (struct net_device *dev) +static void bcmgenet_netif_stop (struct net_device *dev,bool stop_phy) {struct bcmgenet_priv *priv =netdev_priv (dev);
@@ -2988,7 +2988,8 @@ static void bcmgenet_netif_stop(struct net_device *dev)/* Disable MAC transmit. TX DMA disabled must be done before this */ umac_enable_set (priv,CMD_TX_EN , false); -phy_stop (dev->phydev); +if (stop_phy) +phy_stop (dev->phydev);bcmgenet_disable_rx_napi (priv);bcmgenet_intr_disable (priv);
@@ -3014,7 +3015,7 @@ static int bcmgenet_close(struct net_device *dev)netif_dbg (priv, ifdown, dev,"bcmgenet_close\n" ); -bcmgenet_netif_stop (dev); +bcmgenet_netif_stop (dev, false);/* Really kill the PHY state machine and disconnect from it */ phy_disconnect (dev->phydev);
@@ -3712,7 +3713,7 @@ static int bcmgenet_suspend(struct device *d)netif_device_detach (dev); -bcmgenet_netif_stop (dev); +bcmgenet_netif_stop (dev, true);if (!device_may_wakeup (d))phy_suspend (dev->phydev);
drivers/net/ethernet/freescale/fec_main.c +10 -3
@@ -3769,7 +3769,9 @@ fec_drv_remove(struct platform_device *pdev) ret =pm_runtime_get_sync (&pdev->dev);if (ret <0 ) -return ret; +dev_err (&pdev->dev, +"Failed to resume device in remove callback (%pe)\n" , +ERR_PTR (ret));cancel_work_sync (&fep->tx_timeout_work);fec_ptp_stop (pdev);
@@ -3782,8 +3784,13 @@ fec_drv_remove(struct platform_device *pdev)of_phy_deregister_fixed_link (np);of_node_put (fep->phy_node); -clk_disable_unprepare (fep->clk_ahb); -clk_disable_unprepare (fep->clk_ipg); +/* After pm_runtime_get_sync() failed, the clks are still off, so skip +* disabling them again. +*/ +if (ret >=0 ) { +clk_disable_unprepare (fep->clk_ahb); +clk_disable_unprepare (fep->clk_ipg); + }pm_runtime_put_noidle (&pdev->dev);pm_runtime_disable (&pdev->dev);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +9 -6
@@ -6688,12 +6688,15 @@ static void hclge_ae_stop(struct hnae3_handle *handle)/* If it is not PF reset or FLR, the firmware will disable the MAC, * so it only need to stop phy here. */ -if (test_bit (HCLGE_STATE_RST_HANDLING , &hdev->state) && - hdev->reset_type !=HNAE3_FUNC_RESET && - hdev->reset_type !=HNAE3_FLR_RESET ) { -hclge_mac_stop_phy (hdev); -hclge_update_link_status (hdev); -return ; +if (test_bit (HCLGE_STATE_RST_HANDLING , &hdev->state)) { +hclge_pfc_pause_en_cfg (hdev,HCLGE_PFC_TX_RX_DISABLE , +HCLGE_PFC_DISABLE ); +if (hdev->reset_type !=HNAE3_FUNC_RESET && + hdev->reset_type !=HNAE3_FLR_RESET ) { +hclge_mac_stop_phy (hdev); +hclge_update_link_status (hdev); +return ; + } }for (i =0 ; i < handle->kinfo.num_tqps; i++)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c +2 -2
@@ -170,8 +170,8 @@ int hclge_mac_pause_en_cfg(struct hclge_dev *hdev, bool tx, bool rx)return hclge_cmd_send (&hdev->hw, &desc,1 ); } -static int hclge_pfc_pause_en_cfg (struct hclge_dev *hdev,u8 tx_rx_bitmap, -u8 pfc_bitmap) +int hclge_pfc_pause_en_cfg (struct hclge_dev *hdev,u8 tx_rx_bitmap, +u8 pfc_bitmap) {struct hclge_desc desc;struct hclge_pfc_en_cmd *pfc = (struct hclge_pfc_en_cmd *)desc.data;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h +5 -0
@@ -109,6 +109,9 @@ struct hclge_bp_to_qs_map_cmd {u32 rsvd1; }; +#define HCLGE_PFC_DISABLE 0 +#define HCLGE_PFC_TX_RX_DISABLE 0 +struct hclge_pfc_en_cmd {u8 tx_rx_en_bitmap;u8 pri_en_bitmap;
@@ -150,6 +153,8 @@ void hclge_tm_schd_info_update(struct hclge_dev *hdev, u8 num_tc);void hclge_tm_pfc_info_update (struct hclge_dev *hdev);int hclge_tm_dwrr_cfg (struct hclge_dev *hdev);int hclge_tm_init_hw (struct hclge_dev *hdev,bool init); +int hclge_pfc_pause_en_cfg (struct hclge_dev *hdev,u8 tx_rx_bitmap, +u8 pfc_bitmap);int hclge_mac_pause_en_cfg (struct hclge_dev *hdev,bool tx,bool rx);int hclge_pause_addr_cfg (struct hclge_dev *hdev,const u8 *mac_addr);int hclge_pfc_rx_stats_get (struct hclge_dev *hdev,u64 *stats);
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +4 -1
@@ -1432,7 +1432,10 @@ static int hclgevf_reset_wait(struct hclgevf_dev *hdev)* might happen in case reset assertion was made by PF. Yes, this also * means we might end up waiting bit more even for VF reset. */ -msleep (5000 ); +if (hdev->reset_type ==HNAE3_VF_FULL_RESET ) +msleep (5000 ); +else +msleep (500 );return 0 ; }
drivers/net/ethernet/intel/igb/e1000_mac.c +2 -2
@@ -425,7 +425,7 @@ void igb_mta_set(struct e1000_hw *hw, u32 hash_value)static u32 igb_hash_mc_addr (struct e1000_hw *hw,u8 *mc_addr) {u32 hash_value, hash_mask; -u8 bit_shift =0 ; +u8 bit_shift =1 ;/* Register count multiplied by bits per register */ hash_mask = (hw->mac.mta_reg_count *32 ) -1 ;
@@ -433,7 +433,7 @@ static u32 igb_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr)/* For a mc_filter_type of 0, bit_shift is the number of left-shifts * where 0xFF would still fall within the hash mask. */ -while (hash_mask >> bit_shift !=0xFF ) +while (hash_mask >> bit_shift !=0xFF && bit_shift <4 ) bit_shift++;/* The portion of the address that is used for the hash table
drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.c +2 -1
@@ -110,7 +110,8 @@ struct mlx5_devcom *mlx5_devcom_register_device(struct mlx5_core_dev *dev) priv->devs[idx] = dev; devcom =mlx5_devcom_alloc (priv, idx);if (!devcom) { -kfree (priv); +if (new_priv) +kfree (priv);return ERR_PTR (-ENOMEM ); }
drivers/net/ethernet/mellanox/mlx5/core/main.c +1 -1
@@ -887,7 +887,7 @@ static int mlx5_init_once(struct mlx5_core_dev *dev) dev->dm =mlx5_dm_create (dev);if (IS_ERR (dev->dm)) -mlx5_core_warn (dev,"Failed to init device memory%d\n" , err); +mlx5_core_warn (dev,"Failed to init device memory %ld\n" ,PTR_ERR (dev->dm)); dev->tracer =mlx5_fw_tracer_create (dev); dev->hv_vhca =mlx5_hv_vhca_create (dev);
drivers/net/ethernet/nvidia/forcedeth.c +1 -0
@@ -6099,6 +6099,7 @@ static int nv_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)return 0 ; out_error: +nv_mgmt_release_sema (dev);if (phystate_orig)writel (phystate|NVREG_ADAPTCTL_RUNNING , base + NvRegAdapterControl); out_freering:
drivers/net/ethernet/pasemi/pasemi_mac.c +1 -1
@@ -1423,7 +1423,7 @@ static void pasemi_mac_queue_csdesc(const struct sk_buff *skb,write_dma_reg (PAS_DMA_TXCHAN_INCR (txring->chan.chno),2 ); } -static int pasemi_mac_start_tx (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t pasemi_mac_start_tx (struct sk_buff *skb,struct net_device *dev) {struct pasemi_mac *const mac =netdev_priv (dev);struct pasemi_mac_txring *const txring =tx_ring (mac);
drivers/net/ethernet/sun/cassini.c +2 -0
@@ -5138,6 +5138,8 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)cas_shutdown (cp);mutex_unlock (&cp->pm_mutex); +vfree (cp->fw_data); +pci_iounmap (pdev, cp->regs);
drivers/net/ipvlan/ipvlan_core.c +6 -0
@@ -437,6 +437,9 @@ static int ipvlan_process_v4_outbound(struct sk_buff *skb) goto err; }skb_dst_set (skb, &rt->dst); + +memset (IPCB (skb),0 ,sizeof (*IPCB (skb))); + err =ip_local_out (net, skb->sk, skb);if (unlikely (net_xmit_eval (err))) dev->stats.tx_errors++;
@@ -475,6 +478,9 @@ static int ipvlan_process_v6_outbound(struct sk_buff *skb) goto err; }skb_dst_set (skb, dst); + +memset (IP6CB (skb),0 ,sizeof (*IP6CB (skb))); + err =ip6_local_out (net, skb->sk, skb);if (unlikely (net_xmit_eval (err))) dev->stats.tx_errors++;
drivers/net/tap.c +4 -6
@@ -715,9 +715,8 @@ static ssize_t tap_get_user(struct tap_queue *q, void *msg_control,skb_probe_transport_header (skb);/* Move network header to the right position for VLAN tagged packets */ -if ((skb->protocol ==htons (ETH_P_8021Q ) || - skb->protocol ==htons (ETH_P_8021AD )) && -__vlan_get_protocol (skb, skb->protocol, &depth) !=0 ) +if (eth_type_vlan (skb->protocol) && +vlan_get_protocol_and_depth (skb, skb->protocol, &depth) !=0 )skb_set_network_header (skb, depth);rcu_read_lock ();
@@ -1177,9 +1176,8 @@ static int tap_get_user_xdp(struct tap_queue *q, struct xdp_buff *xdp) }/* Move network header to the right position for VLAN tagged packets */ -if ((skb->protocol ==htons (ETH_P_8021Q ) || - skb->protocol ==htons (ETH_P_8021AD )) && -__vlan_get_protocol (skb, skb->protocol, &depth) !=0 ) +if (eth_type_vlan (skb->protocol) && +vlan_get_protocol_and_depth (skb, skb->protocol, &depth) !=0 )skb_set_network_header (skb, depth);rcu_read_lock ();
drivers/net/team/team.c +6 -1
@@ -1624,6 +1624,7 @@ static int team_init(struct net_device *dev) team->dev = dev;team_set_no_mode (team); + team->notifier_ctx = false; team->pcpu_stats = netdev_alloc_pcpu_stats(struct team_pcpu_stats);if (!team->pcpu_stats)
@@ -3015,7 +3016,11 @@ static int team_device_event(struct notifier_block *unused,team_del_slave (port->team->dev, dev);break ;case NETDEV_FEAT_CHANGE : -team_compute_features (port->team); +if (!port->team->notifier_ctx) { + port->team->notifier_ctx = true; +team_compute_features (port->team); + port->team->notifier_ctx = false; + }break ;case NETDEV_PRECHANGEMTU :/* Forbid to change mtu of underlaying device */
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +7 -6
@@ -1269,13 +1269,14 @@ static int brcmf_set_pmk(struct brcmf_if *ifp, const u8 *pmk_data, u16 pmk_len) {struct brcmf_pub *drvr = ifp->drvr;struct brcmf_wsec_pmk_le pmk; -int i, err; +int err; + +memset (&pmk,0 ,sizeof (pmk)); -/* convert to firmware key format */ - pmk.key_len =cpu_to_le16 (pmk_len <<1 ); - pmk.flags =cpu_to_le16 (BRCMF_WSEC_PASSPHRASE ); -for (i =0 ; i < pmk_len; i++) -snprintf (&pmk.key[2 * i],3 ,"%02x" , pmk_data[i]); +/* pass pmk directly */ + pmk.key_len =cpu_to_le16 (pmk_len); + pmk.flags =cpu_to_le16 (0 ); +memcpy (pmk.key, pmk_data, pmk_len);/* store psk in firmware */ err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_WSEC_PMK,
drivers/net/wireless/intel/iwlwifi/dvm/sta.c +4 -1
@@ -1086,6 +1086,7 @@ static int iwlagn_send_sta_key(struct iwl_priv *priv, {__le16 key_flags;struct iwl_addsta_cmd sta_cmd; +size_t to_copy;int i;spin_lock_bh (&priv->sta_lock);
@@ -1105,7 +1106,9 @@ static int iwlagn_send_sta_key(struct iwl_priv *priv, sta_cmd.key.tkip_rx_tsc_byte2 = tkip_iv32;for (i =0 ; i <5 ; i++) sta_cmd.key.tkip_rx_ttak[i] =cpu_to_le16 (tkip_p1k[i]); -memcpy (sta_cmd.key.key, keyconf->key, keyconf->keylen); +/* keyconf may contain MIC rx/tx keys which iwl does not use */ + to_copy =min_t (size_t,sizeof (sta_cmd.key.key), keyconf->keylen); +memcpy (sta_cmd.key.key, keyconf->key, to_copy);break ;case WLAN_CIPHER_SUITE_WEP104 : key_flags |=STA_KEY_FLG_KEY_SIZE_MSK ;
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c +10 -0
@@ -508,6 +508,11 @@ iwl_mvm_update_mcc(struct iwl_mvm *mvm, const char *alpha2,struct iwl_mcc_update_resp *mcc_resp = (void *)pkt->data; n_channels =__le32_to_cpu (mcc_resp->n_channels); +if (iwl_rx_packet_payload_len (pkt) != +struct_size (mcc_resp, channels, n_channels)) { + resp_cp =ERR_PTR (-EINVAL ); + goto exit; + } resp_len =sizeof (struct iwl_mcc_update_resp ) + n_channels *sizeof (__le32); resp_cp =kmemdup (mcc_resp, resp_len,GFP_KERNEL );
@@ -519,6 +524,11 @@ iwl_mvm_update_mcc(struct iwl_mvm *mvm, const char *alpha2,struct iwl_mcc_update_resp_v3 *mcc_resp_v3 = (void *)pkt->data; n_channels =__le32_to_cpu (mcc_resp_v3->n_channels); +if (iwl_rx_packet_payload_len (pkt) != +struct_size (mcc_resp_v3, channels, n_channels)) { + resp_cp =ERR_PTR (-EINVAL ); + goto exit; + } resp_len =sizeof (struct iwl_mcc_update_resp ) + n_channels *sizeof (__le32); resp_cp =kzalloc (resp_len,GFP_KERNEL );
drivers/net/wireless/intel/iwlwifi/pcie/drv.c +3 -0
@@ -1173,6 +1173,9 @@ static void iwl_pci_remove(struct pci_dev *pdev) {struct iwl_trans *trans =pci_get_drvdata (pdev); +if (!trans) +return ; +iwl_drv_stop (trans->drv);iwl_trans_pcie_free (trans);
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +1 -1
@@ -2832,7 +2832,7 @@ static bool iwl_write_to_user_buf(char __user *user_buf, ssize_t count, void *buf, ssize_t *size, ssize_t *bytes_copied) { - int buf_size_left = count - *bytes_copied; + ssize_t buf_size_left = count - *bytes_copied; buf_size_left = buf_size_left - (buf_size_left %sizeof (u32));if (*size > buf_size_left)
drivers/net/wireless/mediatek/mt76/mt7615/mac.c +1 -4
@@ -13,10 +13,7 @@#include "../dma.h" #include "mac.h" -static inline s8 to_rssi (u32 field,u32 rxv) -{ -return (FIELD_GET (field, rxv) -220 ) /2 ; -} +#define to_rssi (field, rxv) ((FIELD_GET(field, rxv) - 220) / 2)static struct mt76_wcid *mt7615_rx_get_wcid (struct mt7615_dev *dev,u8 idx,bool unicast)
drivers/phy/st/phy-miphy28lp.c +10 -32
80 lines not on this page · raw message
drivers/power/supply/bq27xxx_battery.c +21 -20
75 lines not on this page · raw message
drivers/power/supply/bq27xxx_battery_i2c.c +2 -1
@@ -187,7 +187,7 @@ static int bq27xxx_battery_i2c_probe(struct i2c_client *client,i2c_set_clientdata (client, di);if (client->irq) { - ret =devm_request_threaded_irq (&client->dev, client->irq, + ret =request_threaded_irq (client->irq,NULL , bq27xxx_battery_irq_handler_thread,IRQF_ONESHOT , di->name, di);
@@ -217,6 +217,7 @@ static int bq27xxx_battery_i2c_remove(struct i2c_client *client) {struct bq27xxx_device_info *di =i2c_get_clientdata (client); +free_irq (client->irq, di);bq27xxx_battery_teardown (di);mutex_lock (&battery_mutex);
drivers/power/supply/power_supply_leds.c +3 -2
@@ -34,8 +34,9 @@ static void power_supply_update_bat_leds(struct power_supply *psy)led_trigger_event (psy->charging_full_trig,LED_FULL );led_trigger_event (psy->charging_trig,LED_OFF );led_trigger_event (psy->full_trig,LED_FULL ); -led_trigger_event (psy->charging_blink_full_solid_trig, -LED_FULL ); +/* Going from blink to LED on requires a LED_OFF event to stop blink */ +led_trigger_event (psy->charging_blink_full_solid_trig,LED_OFF ); +led_trigger_event (psy->charging_blink_full_solid_trig,LED_FULL );break ;case POWER_SUPPLY_STATUS_CHARGING :led_trigger_event (psy->charging_full_trig,LED_FULL );
drivers/power/supply/sbs-charger.c +1 -1
@@ -25,7 +25,7 @@#define SBS_CHARGER_REG_STATUS 0x13#define SBS_CHARGER_REG_ALARM_WARNING 0x16 -#define SBS_CHARGER_STATUS_CHARGE_INHIBITED BIT(1) +#define SBS_CHARGER_STATUS_CHARGE_INHIBITED BIT(0)#define SBS_CHARGER_STATUS_RES_COLD BIT(9)#define SBS_CHARGER_STATUS_RES_HOT BIT(10)#define SBS_CHARGER_STATUS_BATTERY_PRESENT BIT(14)
drivers/s390/cio/qdio.h +13 -12
@@ -88,15 +88,15 @@ enum qdio_irq_states {static inline int do_sqbs (u64 token,unsigned char state,int queue,int *start,int *count) { - register unsigned long _ccq asm ("0") = *count; - register unsigned long _token asm ("1") = token;unsigned long _queuestart = ((unsigned long )queue <<32 ) | *start; +unsigned long _ccq = *count; asmvolatile ( -" .insn rsy,0xeb000000008A,%1,0,0(%2)" - :"+d" (_ccq),"+d" (_queuestart) - :"d" ((unsigned long )state),"d" (_token) - :"memory" ,"cc" ); +" lgr 1,%[token]\n" +" .insn rsy,0xeb000000008a,%[qs],%[ccq],0(%[state])" + : [ccq]"+&d" (_ccq), [qs]"+&d" (_queuestart) + : [state]"a" ((unsigned long )state), [token]"d" (token) + :"memory" ,"cc" ,"1" ); *count = _ccq &0xff ; *start = _queuestart &0xff ;
@@ -106,16 +106,17 @@ static inline int do_sqbs(u64 token, unsigned char state, int queue,static inline int do_eqbs (u64 token,unsigned char *state,int queue,int *start,int *count,int ack) { - register unsigned long _ccq asm ("0") = *count; - register unsigned long _token asm ("1") = token;unsigned long _queuestart = ((unsigned long )queue <<32 ) | *start;unsigned long _state = (unsigned long )ack <<63 ; +unsigned long _ccq = *count; asmvolatile ( -" .insn rrf,0xB99c0000,%1,%2,0,0" - :"+d" (_ccq),"+d" (_queuestart),"+d" (_state) - :"d" (_token) - :"memory" ,"cc" ); +" lgr 1,%[token]\n" +" .insn rrf,0xb99c0000,%[qs],%[state],%[ccq],0" + : [ccq]"+&d" (_ccq), [qs]"+&d" (_queuestart), + [state]"+&d" (_state) + : [token]"d" (token) + :"memory" ,"cc" ,"1" ); *count = _ccq &0xff ; *start = _queuestart &0xff ; *state = _state &0xff ;
drivers/s390/cio/qdio_main.c +33 -29
94 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_debugfs.c +5 -2
@@ -2046,6 +2046,7 @@ lpfc_debugfs_lockstat_write(struct file *file, const char __user *buf,char mybuf[64 ];char *pbuf;int i; +size_t bsize;/* Protect copy from user */ if (!access_ok (buf, nbytes))
@@ -2053,7 +2054,9 @@ lpfc_debugfs_lockstat_write(struct file *file, const char __user *buf,memset (mybuf,0 ,sizeof (mybuf)); -if (copy_from_user (mybuf, buf, nbytes)) + bsize =min (nbytes, (sizeof (mybuf) -1 )); + +if (copy_from_user (mybuf, buf, bsize))return -EFAULT ; pbuf = &mybuf[0 ];
@@ -2074,7 +2077,7 @@ lpfc_debugfs_lockstat_write(struct file *file, const char __user *buf, qp->lock_conflict.wq_access = 0; } } -return nbytes; +return bsize; }#endif
drivers/spi/spi-fsl-cpm.c +23 -0
@@ -21,6 +21,7 @@#include <linux/spi/spi.h> #include <linux/types.h> #include <linux/platform_device.h> +#include <linux/byteorder/generic.h> #include "spi-fsl-cpm.h" #include "spi-fsl-lib.h"
@@ -120,6 +121,21 @@ int fsl_spi_cpm_bufs(struct mpc8xxx_spi *mspi, mspi->rx_dma = mspi->dma_dummy_rx; mspi->map_rx_dma =0 ; } +if (t->bits_per_word ==16 && t->tx_buf) { +const u16 *src = t->tx_buf; +u16 *dst; +int i; + + dst =kmalloc (t->len,GFP_KERNEL ); +if (!dst) +return -ENOMEM ; + +for (i =0 ; i < t->len >>1 ; i++) + dst[i] =cpu_to_le16p (src + i); + + mspi->tx = dst; + mspi->map_tx_dma =1 ; + }if (mspi->map_tx_dma) {void *nonconst_tx = (void *)mspi->tx;/* shut up gcc */
@@ -173,6 +189,13 @@ void fsl_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi)if (mspi->map_rx_dma)dma_unmap_single (dev, mspi->rx_dma, t->len,DMA_FROM_DEVICE ); mspi->xfer_in_progress =NULL ; + +if (t->bits_per_word ==16 && t->rx_buf) { +int i; + +for (i =0 ; i < t->len; i +=2 ) +le16_to_cpus (t->rx_buf + i); + } }EXPORT_SYMBOL_GPL (fsl_spi_cpm_bufs_complete);
drivers/spi/spi-fsl-spi.c +26 -27
83 lines not on this page · raw message
drivers/spi/spi-imx.c +18 -6
@@ -239,6 +239,18 @@ static bool spi_imx_can_dma(struct spi_master *master, struct spi_device *spi,return true; } +/* +* Note the number of natively supported chip selects for MX51 is 4. Some +* devices may have less actual SS pins but the register map supports 4. When +* using gpio chip selects the cs values passed into the macros below can go +* outside the range 0 - 3. We therefore need to limit the cs value to avoid +* corrupting bits outside the allocated locations. +* +* The simplest way to do this is to just mask the cs bits to 2 bits. This +* still allows all 4 native chip selects to work as well as gpio chip selects +* (which can use any of the 4 chip select configurations). +*/ +#define MX51_ECSPI_CTRL 0x08#define MX51_ECSPI_CTRL_ENABLE (1 << 0)#define MX51_ECSPI_CTRL_XCH (1 << 2)
@@ -247,16 +259,16 @@ static bool spi_imx_can_dma(struct spi_master *master, struct spi_device *spi,#define MX51_ECSPI_CTRL_DRCTL (drctl) ((drctl) << 16)#define MX51_ECSPI_CTRL_POSTDIV_OFFSET 8#define MX51_ECSPI_CTRL_PREDIV_OFFSET 12 -#define MX51_ECSPI_CTRL_CS (cs) ((cs) << 18) +#define MX51_ECSPI_CTRL_CS (cs) ((cs & 3) << 18)#define MX51_ECSPI_CTRL_BL_OFFSET 20#define MX51_ECSPI_CTRL_BL_MASK (0xfff << 20)#define MX51_ECSPI_CONFIG 0x0c -#define MX51_ECSPI_CONFIG_SCLKPHA (cs) (1 << ((cs) + 0)) -#define MX51_ECSPI_CONFIG_SCLKPOL (cs) (1 << ((cs) + 4)) -#define MX51_ECSPI_CONFIG_SBBCTRL (cs) (1 << ((cs) + 8)) -#define MX51_ECSPI_CONFIG_SSBPOL (cs) (1 << ((cs) + 12)) -#define MX51_ECSPI_CONFIG_SCLKCTL (cs) (1 << ((cs) + 20)) +#define MX51_ECSPI_CONFIG_SCLKPHA (cs) (1 << ((cs & 3) + 0)) +#define MX51_ECSPI_CONFIG_SCLKPOL (cs) (1 << ((cs & 3) + 4)) +#define MX51_ECSPI_CONFIG_SBBCTRL (cs) (1 << ((cs & 3) + 8)) +#define MX51_ECSPI_CONFIG_SSBPOL (cs) (1 << ((cs & 3) + 12)) +#define MX51_ECSPI_CONFIG_SCLKCTL (cs) (1 << ((cs & 3) + 20))#define MX51_ECSPI_INT 0x10#define MX51_ECSPI_INT_TEEN (1 << 0)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +3 -3
@@ -50,9 +50,9 @@ static const struct rtl819x_ops rtl819xp_ops = { };static struct pci_device_id rtl8192_pci_id_tbl[] = { - {RTL_PCI_DEVICE (0x10ec ,0x8192 , rtl819xp_ops)}, - {RTL_PCI_DEVICE (0x07aa ,0x0044 , rtl819xp_ops)}, - {RTL_PCI_DEVICE (0x07aa ,0x0047 , rtl819xp_ops)}, + {PCI_DEVICE (0x10ec ,0x8192 )}, + {PCI_DEVICE (0x07aa ,0x0044 )}, + {PCI_DEVICE (0x07aa ,0x0047 )}, {} };
drivers/staging/rtl8192e/rtl8192e/rtl_core.h +0 -5
@@ -55,11 +55,6 @@#define IS_HARDWARE_TYPE_8192SE (_priv) \ (((struct r8192_priv *)rtllib_priv(dev))->card_8192 == NIC_8192SE) -#define RTL_PCI_DEVICE (vend, dev, cfg) \ - .vendor = (vend), .device = (dev), \ - .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, \ - .driver_data = (kernel_ulong_t)&(cfg) -#define TOTAL_CAM_ENTRY 32#define CAM_CONTENT_COUNT 8
drivers/target/iscsi/iscsi_target.c +3 -3
@@ -4385,6 +4385,9 @@ int iscsit_close_session(struct iscsi_session *sess)iscsit_stop_time2retain_timer (sess);spin_unlock_bh (&se_tpg->session_lock); +if (sess->sess_ops->ErrorRecoveryLevel ==2 ) +iscsit_free_connection_recovery_entries (sess); +/* * transport_deregister_session_configfs() will clear the * struct se_node_acl->nacl_sess pointer now as a iscsi_np process context
@@ -4413,9 +4416,6 @@ int iscsit_close_session(struct iscsi_session *sess)transport_deregister_session (sess->se_sess); -if (sess->sess_ops->ErrorRecoveryLevel ==2 ) -iscsit_free_connection_recovery_entries (sess); -iscsit_free_all_ooo_cmdsns (sess);spin_lock_bh (&se_tpg->session_lock);
drivers/tty/serial/8250/8250_core.c +1 -0
@@ -1138,6 +1138,7 @@ void serial8250_unregister_port(int line) uart->port.type =PORT_UNKNOWN ; uart->port.dev = &serial8250_isa_devs->dev; uart->capabilities =0 ; +serial8250_init_port (uart);serial8250_apply_quirks (uart);uart_add_one_port (&serial8250_reg, &uart->port); }else {
drivers/tty/serial/8250/8250_pci.c +5 -0
@@ -1837,6 +1837,8 @@ pci_moxa_setup(struct serial_private *priv,#define PCI_SUBDEVICE_ID_SIIG_DUAL_30 0x2530#define PCI_VENDOR_ID_ADVANTECH 0x13fe#define PCI_DEVICE_ID_INTEL_CE4100_UART 0x2e66 +#define PCI_DEVICE_ID_ADVANTECH_PCI1600 0x1600 +#define PCI_DEVICE_ID_ADVANTECH_PCI1600_1611 0x1611#define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620#define PCI_DEVICE_ID_ADVANTECH_PCI3618 0x3618#define PCI_DEVICE_ID_ADVANTECH_PCIf618 0xf618
@@ -4157,6 +4159,9 @@ static SIMPLE_DEV_PM_OPS(pciserial_pm_ops, pciserial_suspend_one, pciserial_resume_one);static const struct pci_device_id serial_pci_tbl[] = { + {PCI_VENDOR_ID_ADVANTECH ,PCI_DEVICE_ID_ADVANTECH_PCI1600 , +PCI_DEVICE_ID_ADVANTECH_PCI1600_1611 ,PCI_ANY_ID ,0 ,0 , + pbn_b0_4_921600 },/* Advantech use PCI_DEVICE_ID_ADVANTECH_PCI3620 (0x3620) as 'PCI_SUBVENDOR_ID' */ {PCI_VENDOR_ID_ADVANTECH ,PCI_DEVICE_ID_ADVANTECH_PCI3620 ,PCI_DEVICE_ID_ADVANTECH_PCI3620 ,0x0001 ,0 ,0 ,
drivers/tty/serial/arc_uart.c +4 -3
@@ -613,10 +613,11 @@ static int arc_serial_probe(struct platform_device *pdev) } uart->baud = val; - port->membase =of_iomap (np,0 ); -if (!port->membase) + port->membase =devm_platform_ioremap_resource (pdev,0 ); +if (IS_ERR (port->membase)) {/* No point of dev_err since UART itself is hosed here */ -return -ENXIO ; +return PTR_ERR (port->membase); + } port->irq =irq_of_parse_and_map (np,0 );
drivers/tty/vt/vc_screen.c +38 -19
102 lines not on this page · raw message
drivers/usb/class/usbtmc.c +2 -0
@@ -1898,6 +1898,8 @@ static int usbtmc_ioctl_request(struct usbtmc_device_data *data,if (request.req.wLength >USBTMC_BUFSIZE )return -EMSGSIZE ; +if (request.req.wLength ==0 )/* Length-0 requests are never IN */ + request.req.bRequestType &= ~USB_DIR_IN ; is_in = request.req.bRequestType &USB_DIR_IN ;
drivers/usb/core/usb.c +76 -0
82 lines not on this page · raw message
drivers/usb/dwc3/debugfs.c +109 -0
321 lines not on this page · raw message
drivers/usb/gadget/function/u_ether.c +4 -35
@@ -17,6 +17,8 @@#include <linux/etherdevice.h> #include <linux/ethtool.h> #include <linux/if_vlan.h> +#include <linux/string_helpers.h> +#include <linux/usb/composite.h> #include "u_ether.h"
@@ -102,41 +104,6 @@ static inline int qlen(struct usb_gadget *gadget, unsigned qmult)/*-------------------------------------------------------------------------*/ -/* REVISIT there must be a better way than having two sets -* of debug calls ... -*/ - -#undef DBG -#undef VDBG -#undef ERROR -#undef INFO - -#define xprintk(d, level, fmt, args...) \ - printk(level "%s: " fmt , (d)->net->name , ## args) - -#ifdef DEBUG -#undef DEBUG -#define DBG(dev, fmt, args...) \ - xprintk(dev , KERN_DEBUG , fmt , ## args) -#else -#define DBG(dev, fmt, args...) \ - do { } while (0) -#endif /* DEBUG */ - -#ifdef VERBOSE_DEBUG -#define VDBG DBG -#else -#define VDBG(dev, fmt, args...) \ - do { } while (0) -#endif /* DEBUG */ - -#define ERROR(dev, fmt, args...) \ - xprintk(dev , KERN_ERR , fmt , ## args) -#define INFO(dev, fmt, args...) \ - xprintk(dev , KERN_INFO , fmt , ## args) - -/*-------------------------------------------------------------------------*/ -/* NETWORK DRIVER HOOKUP (to the layer above this driver) */ static void eth_get_drvinfo (struct net_device *net,struct ethtool_drvinfo *p)
@@ -974,6 +941,8 @@ int gether_get_host_addr_cdc(struct net_device *net, char *host_addr, int len) dev =netdev_priv (net);snprintf (host_addr, len,"%pm" , dev->host_mac); +string_upper (host_addr, host_addr); +return strlen (host_addr); }EXPORT_SYMBOL_GPL (gether_get_host_addr_cdc);
drivers/usb/host/uhci-pci.c +6 -4
@@ -119,11 +119,13 @@ static int uhci_pci_init(struct usb_hcd *hcd) uhci->rh_numports =uhci_count_ports (hcd); -/* Intel controllers report the OverCurrent bit active on. -* VIA controllers report it active off, so we'll adjust the -* bit value. (It's not standardized in the UHCI spec.) +/* +* Intel controllers report the OverCurrent bit active on. VIA +* and ZHAOXIN controllers report it active off, so we'll adjust +* the bit value. (It's not standardized in the UHCI spec.) */ -if (to_pci_dev (uhci_dev (uhci))->vendor ==PCI_VENDOR_ID_VIA ) +if (to_pci_dev (uhci_dev (uhci))->vendor ==PCI_VENDOR_ID_VIA || +to_pci_dev (uhci_dev (uhci))->vendor ==PCI_VENDOR_ID_ZHAOXIN ) uhci->oc_low =1 ;/* HP's server management chip requires a longer port reset delay. */
drivers/usb/misc/sisusbvga/sisusb.c +14 -0
@@ -3014,6 +3014,20 @@ static int sisusb_probe(struct usb_interface *intf,struct usb_device *dev =interface_to_usbdev (intf);struct sisusb_usb_data *sisusb;int retval =0 , i; +static const u8 ep_addresses[] = { +SISUSB_EP_GFX_IN |USB_DIR_IN , +SISUSB_EP_GFX_OUT |USB_DIR_OUT , +SISUSB_EP_GFX_BULK_OUT |USB_DIR_OUT , +SISUSB_EP_GFX_LBULK_OUT |USB_DIR_OUT , +SISUSB_EP_BRIDGE_IN |USB_DIR_IN , +SISUSB_EP_BRIDGE_OUT |USB_DIR_OUT , +0 }; + +/* Are the expected endpoints present? */ +if (!usb_check_bulk_endpoints (intf, ep_addresses)) { +dev_err (&intf->dev,"Invalid USB2VGA device\n" ); +return -EINVAL ; + }dev_info (&dev->dev,"USB2VGA dongle found at address %d\n" , dev->devnum);
drivers/usb/storage/scsiglue.c +21 -7
@@ -407,22 +407,25 @@ static DEF_SCSI_QCMD(queuecommand)***********************************************************************/ /* Command timeout and abort */ -static int command_abort (struct scsi_cmnd *srb) +static int command_abort_matching (struct us_data *us,struct scsi_cmnd *srb_match) { -struct us_data *us =host_to_us (srb->device->host); - -usb_stor_dbg (us,"%s called\n" , __func__); -/* * us->srb together with the TIMED_OUT, RESETTING, and ABORTING * bits are protected by the host lock. */ scsi_lock (us_to_host (us)); -/* Is this command still active? */ -if (us->srb != srb) { +/* is there any active pending command to abort ? */ +if (!us->srb) {scsi_unlock (us_to_host (us));usb_stor_dbg (us,"-- nothing to abort\n" ); +return SUCCESS ; + } + +/* Does the command match the passed srb if any ? */ +if (srb_match && us->srb != srb_match) { +scsi_unlock (us_to_host (us)); +usb_stor_dbg (us,"-- pending command mismatch\n" );return FAILED ; }
@@ -445,6 +448,14 @@ static int command_abort(struct scsi_cmnd *srb)return SUCCESS ; } +static int command_abort (struct scsi_cmnd *srb) +{ +struct us_data *us =host_to_us (srb->device->host); + +usb_stor_dbg (us,"%s called\n" , __func__); +return command_abort_matching (us, srb); +} +/* * This invokes the transport reset mechanism to reset the state of the * device
@@ -456,6 +467,9 @@ static int device_reset(struct scsi_cmnd *srb)usb_stor_dbg (us,"%s called\n" , __func__); +/* abort any pending command before reset */ +command_abort_matching (us,NULL ); +/* lock the device pointers and do the reset */ mutex_lock (&(us->dev_mutex)); result = us->transport_reset (us);
drivers/usb/typec/altmodes/displayport.c +4 -0
@@ -501,6 +501,10 @@ static ssize_t pin_assignment_show(struct device *dev,mutex_unlock (&dp->lock); +/* get_current_pin_assignments can return 0 when no matching pin assignments are found */ +if (len ==0 ) + len++; + buf[len -1 ] ='\n' ;return len; }
drivers/usb/typec/tcpm/tcpm.c +15 -1
@@ -1018,7 +1018,21 @@ static bool svdm_consume_svids(struct tcpm_port *port, const __le32 *payload, pmdata->svids[pmdata->nsvids++] = svid;tcpm_log (port,"SVID %d: 0x%x" , pmdata->nsvids, svid); } -return true; + +/* +* PD3.0 Spec 6.4.4.3.2: The SVIDs are returned 2 per VDO (see Table +* 6-43), and can be returned maximum 6 VDOs per response (see Figure +* 6-19). If the Respondersupports 12 or more SVID then the Discover +* SVIDs Command Shall be executed multiple times until a Discover +* SVIDs VDO is returned ending either with a SVID value of 0x0000 in +* the last part of the last VDO or with a VDO containing two SVIDs +* with values of 0x0000. +* +* However, some odd dockers support SVIDs less than 12 but without +* 0x0000 in the last VDO, so we need to break the Discover SVIDs +* request and return false here. +*/ +return cnt ==7 ; abort:tcpm_log (port,"SVID_DISCOVERY_MAX(%d) too low!" ,SVID_DISCOVERY_MAX );return false;
drivers/video/fbdev/udlfb.c +8 -5
@@ -27,6 +27,8 @@#include <video/udlfb.h> #include "edid.h" +#define OUT_EP_NUM 1/* The endpoint number we will use */ +static const struct fb_fix_screeninfo dlfb_fix = { .id ="udlfb" , .type =FB_TYPE_PACKED_PIXELS ,
@@ -1652,7 +1654,7 @@ static int dlfb_usb_probe(struct usb_interface *intf,struct fb_info *info;int retval;struct usb_device *usbdev =interface_to_usbdev (intf); -struct usb_endpoint_descriptor *out; +static u8 out_ep[] = {OUT_EP_NUM +USB_DIR_OUT ,0 };/* usb initialization */ dlfb =kzalloc (sizeof (*dlfb),GFP_KERNEL );
@@ -1666,9 +1668,9 @@ static int dlfb_usb_probe(struct usb_interface *intf, dlfb->udev =usb_get_dev (usbdev);usb_set_intfdata (intf, dlfb); - retval =usb_find_common_endpoints (intf->cur_altsetting,NULL , &out,NULL ,NULL ); -if (retval) { -dev_err (&intf->dev,"Device should have at lease 1 bulk endpoint!\n" ); +if (!usb_check_bulk_endpoints (intf, out_ep)) { +dev_err (&intf->dev,"Invalid DisplayLink device!\n" ); + retval = -EINVAL ; goto error; }
@@ -1927,7 +1929,8 @@ static int dlfb_alloc_urb_list(struct dlfb_data *dlfb, int count, size_t size) }/* urb->transfer_buffer_length set to actual before submit */ -usb_fill_bulk_urb (urb, dlfb->udev,usb_sndbulkpipe (dlfb->udev,1 ), +usb_fill_bulk_urb (urb, dlfb->udev, +usb_sndbulkpipe (dlfb->udev,OUT_EP_NUM ), buf, size, dlfb_urb_completion, unode); urb->transfer_flags |=URB_NO_TRANSFER_DMA_MAP ;
drivers/watchdog/sp5100_tco.c +4 -0
@@ -98,6 +98,10 @@ static int tco_timer_start(struct watchdog_device *wdd) val |=SP5100_WDT_START_STOP_BIT ;writel (val,SP5100_WDT_CONTROL (tco->tcobase)); +/* This must be a distinct write. */ + val |=SP5100_WDT_TRIGGER_BIT ; +writel (val,SP5100_WDT_CONTROL (tco->tcobase)); +return 0 ; }
drivers/xen/pvcalls-back.c +4 -5
@@ -321,8 +321,10 @@ static struct sock_mapping *pvcalls_new_active_socket(void *page; map =kzalloc (sizeof (*map),GFP_KERNEL ); -if (map ==NULL ) +if (map ==NULL ) { +sock_release (sock);return NULL ; + } map->fedata = fedata; map->sock = sock;
@@ -414,10 +416,8 @@ static int pvcalls_back_connect(struct xenbus_device *dev, req->u.connect.ref, req->u.connect.evtchn, sock); -if (!map) { +if (!map) ret = -EFAULT ; -sock_release (sock); - } out: rsp =RING_GET_RESPONSE (&fedata->ring, fedata->ring.rsp_prod_pvt++);
@@ -558,7 +558,6 @@ static void __pvcalls_back_accept(struct work_struct *work) sock);if (!map) { ret = -EFAULT ; -sock_release (sock); goto out_error; }
fs/btrfs/disk-io.c +9 -0
@@ -4408,7 +4408,11 @@ static void btrfs_destroy_delalloc_inodes(struct btrfs_root *root)*/ inode =igrab (&btrfs_inode->vfs_inode);if (inode) { +unsigned int nofs_flag; + + nofs_flag =memalloc_nofs_save ();invalidate_inode_pages2 (inode->i_mapping); +memalloc_nofs_restore (nofs_flag);iput (inode); }spin_lock (&root->delalloc_lock);
@@ -4526,7 +4530,12 @@ static void btrfs_cleanup_bg_io(struct btrfs_block_group_cache *cache) inode = cache->io_ctl.inode;if (inode) { +unsigned int nofs_flag; + + nofs_flag =memalloc_nofs_save ();invalidate_inode_pages2 (inode->i_mapping); +memalloc_nofs_restore (nofs_flag); +BTRFS_I (inode)->generation =0 ; cache->io_ctl.inode =NULL ;iput (inode);
fs/btrfs/free-space-cache.c +4 -3
@@ -784,15 +784,16 @@ static int __load_free_space_cache(struct btrfs_root *root, struct inode *inode, }spin_lock (&ctl->tree_lock); ret =link_free_space (ctl, e); - ctl->total_bitmaps++; - ctl->op->recalc_thresholds (ctl);
Lines of this file are not shown. View the raw message.
fs/ext4/mballoc.c +41 -24
65 lines not on this page · raw message
include/uapi/sound/skl-tplg-interface.h +2 -1
Lines of this file are not shown. View the raw message.
net/netfilter/nf_conntrack_standalone.c +2 -1
Lines of this file are not shown. View the raw message.
net/netfilter/nf_tables_api.c +148 -80
228 lines not on this page · raw message
sound/firewire/digi00x/digi00x-stream.c +3 -1
Lines of this file are not shown. View the raw message.
tools/power/cpupower/utils/idle_monitor/mperf_monitor.c +14 -17
Lines of this file are not shown. View the raw message.
tools/testing/selftests/memfd/fuse_test.c +1 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/fib_tests.sh +1 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.