Linux 5.4.36
Greg KH
maintainerI'm announcing the release of the 5.4.36 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
------------
Documentation/admin-guide/kernel-parameters.txt | 3 Documentation/arm64/silicon-errata.rst | 2 Makefile | 2 arch/arm/mach-imx/Makefile | 2 arch/arm64/Kconfig | 16 arch/arm64/include/asm/cache.h | 3 arch/arm64/include/asm/compat.h | 5 arch/arm64/include/asm/cpucaps.h | 3 arch/arm64/kernel/cpu_errata.c | 32 + arch/arm64/kernel/sys_compat.c | 11 arch/arm64/kernel/traps.c | 9 arch/powerpc/kernel/entry_32.S | 2 arch/powerpc/kernel/setup_64.c | 2 arch/powerpc/kernel/time.c | 44 -- arch/powerpc/platforms/Kconfig.cputype | 2 arch/powerpc/platforms/pseries/ras.c | 11 arch/s390/kvm/kvm-s390.c | 3 arch/s390/lib/uaccess.c | 4 arch/s390/mm/pgalloc.c | 16 arch/x86/kvm/vmx/vmx.c | 2 drivers/block/loop.c | 42 +- drivers/block/virtio_blk.c | 9 drivers/char/tpm/tpm-interface.c | 2 drivers/char/tpm/tpm_ibmvtpm.c | 136 +++---- drivers/char/tpm/tpm_tis_core.c | 8 drivers/fpga/dfl-pci.c | 6 drivers/gpu/drm/amd/display/dc/core/dc.c | 38 +- drivers/iio/adc/stm32-adc.c | 31 + drivers/iio/adc/ti-ads8344.c | 6 drivers/iio/adc/xilinx-xadc-core.c | 95 +++-- drivers/iio/common/st_sensors/st_sensors_core.c | 2 drivers/net/dsa/b53/b53_common.c | 38 +- drivers/net/dsa/b53/b53_regs.h | 8 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 3 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 27 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c | 27 - drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 3 drivers/net/ethernet/mellanox/mlx4/en_tx.c | 14 drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c | 4 drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c | 4 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 2 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c | 4 drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 1 drivers/net/geneve.c | 2 drivers/net/macsec.c | 12 drivers/net/macvlan.c | 2 drivers/net/team/team.c | 4 drivers/net/vrf.c | 10 drivers/net/vxlan.c | 6 drivers/net/wireless/intel/iwlegacy/3945-rs.c | 2 drivers/net/wireless/intel/iwlegacy/4965-rs.c | 2 drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 2 drivers/net/wireless/intel/iwlwifi/fw/api/txq.h | 6 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 6 drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 2 drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 13 drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 9 drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 3 drivers/net/wireless/realtek/rtlwifi/rc.c | 2 drivers/nvme/host/core.c | 27 + drivers/nvme/host/multipath.c | 4 drivers/nvme/host/tcp.c | 13 drivers/pci/hotplug/pciehp.h | 6 drivers/pci/hotplug/pciehp_core.c | 11 drivers/pci/hotplug/pciehp_ctrl.c | 4 drivers/pci/hotplug/pciehp_hpc.c | 59 ++- drivers/pci/pci-driver.c | 11 drivers/pci/pci.c | 142 +++++++ drivers/pci/pci.h | 1 drivers/pci/pcie/aspm.c | 18 drivers/pwm/pwm-bcm2835.c | 1 drivers/pwm/pwm-rcar.c | 10 drivers/pwm/pwm-renesas-tpu.c | 9 drivers/s390/cio/device.c | 13 drivers/s390/cio/vfio_ccw_drv.c | 5 drivers/scsi/libfc/fc_rport.c | 8 drivers/scsi/lpfc/lpfc_nvme.c | 14 drivers/scsi/lpfc/lpfc_sli.c | 7 drivers/scsi/scsi_transport_iscsi.c | 4 drivers/scsi/smartpqi/smartpqi.h | 10 drivers/scsi/smartpqi/smartpqi_init.c | 225 ++++++------ drivers/scsi/smartpqi/smartpqi_sas_transport.c | 2 drivers/staging/comedi/comedi_fops.c | 4 drivers/staging/comedi/drivers/dt2815.c | 3 drivers/staging/gasket/gasket_sysfs.c | 3 drivers/staging/gasket/gasket_sysfs.h | 4 drivers/staging/vt6656/int.c | 3 drivers/staging/vt6656/key.c | 14 drivers/staging/vt6656/main_usb.c | 31 - drivers/tty/hvc/hvc_console.c | 23 - drivers/tty/rocket.c | 25 - drivers/tty/serial/owl-uart.c | 7 drivers/tty/serial/sh-sci.c | 13 drivers/tty/serial/xilinx_uartps.c | 211 ++--------- drivers/tty/vt/vt.c | 7 drivers/usb/class/cdc-acm.c | 36 + drivers/usb/class/cdc-acm.h | 5 drivers/usb/core/hub.c | 18 drivers/usb/core/message.c | 9 drivers/usb/core/quirks.c | 4 drivers/usb/dwc3/gadget.c | 12 drivers/usb/early/xhci-dbc.c | 8 drivers/usb/early/xhci-dbc.h | 18 drivers/usb/gadget/function/f_fs.c | 4 drivers/usb/host/xhci-hub.c | 70 +++ drivers/usb/host/xhci-mem.c | 1 drivers/usb/host/xhci-ring.c | 47 ++ drivers/usb/host/xhci.c | 14 drivers/usb/host/xhci.h | 6 drivers/usb/misc/sisusbvga/sisusb.c | 20 - drivers/usb/misc/sisusbvga/sisusb_init.h | 14 drivers/usb/storage/uas.c | 46 ++ drivers/usb/storage/unusual_devs.h | 7 drivers/usb/typec/bus.c | 5 drivers/usb/typec/tcpm/tcpm.c | 26 + drivers/watchdog/watchdog_dev.c | 1 fs/ceph/caps.c | 8 fs/ceph/export.c | 5 fs/cifs/smb2ops.c | 5 fs/coredump.c | 2 fs/ext4/extents.c | 47 +- fs/f2fs/xattr.c | 14 fs/nfsd/nfs4callback.c | 4 fs/proc/vmcore.c | 5 include/linux/iio/iio.h | 2 include/linux/kvm_host.h | 2 include/linux/vmalloc.h | 2 include/net/mac80211.h | 4 include/net/tcp.h | 2 ipc/util.c | 2 kernel/audit.c | 3 kernel/dma/direct.c | 3 kernel/events/core.c | 9 kernel/gcov/fs.c | 2 kernel/signal.c | 6 lib/raid6/test/Makefile | 6 mm/hugetlb.c | 14 mm/ksm.c | 12 mm/vmalloc.c | 16 net/ipv4/fib_semantics.c | 6 net/ipv4/ip_tunnel.c | 6 net/ipv4/xfrm4_output.c | 2 net/ipv6/ipv6_sockglue.c | 13 net/ipv6/xfrm6_output.c | 2 net/mac80211/main.c | 5 net/mac80211/rate.c | 15 net/mac80211/rate.h | 23 + net/mac80211/rc80211_minstrel_ht.c | 19 - net/netrom/nr_route.c | 1 net/openvswitch/conntrack.c | 3 net/openvswitch/datapath.c | 4 net/sched/sch_etf.c | 7 net/sunrpc/svc_xprt.c | 2 net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 2 net/sunrpc/xprtsock.c | 1 net/x25/x25_dev.c | 4 samples/vfio-mdev/mdpy.c | 2 scripts/kconfig/qconf.cc | 13 security/keys/internal.h | 12 security/keys/keyctl.c | 58 ++- sound/pci/hda/hda_intel.c | 1 sound/pci/hda/patch_hdmi.c | 9 sound/pci/hda/patch_realtek.c | 11 sound/soc/intel/atom/sst-atom-controls.c | 2 sound/soc/intel/boards/bytcr_rt5640.c | 11 sound/soc/soc-dapm.c | 20 - sound/soc/sof/trace.c | 7 sound/usb/format.c | 52 ++ sound/usb/mixer.c | 37 + sound/usb/mixer.h | 10 sound/usb/mixer_maps.c | 37 + sound/usb/mixer_quirks.c | 12 sound/usb/quirks-table.h | 56 ++ sound/usb/usx2y/usbusx2yaudio.c | 2 tools/lib/bpf/Makefile | 4 tools/testing/nvdimm/Kbuild | 4 tools/testing/nvdimm/test/Kbuild | 4 tools/testing/nvdimm/test/nfit.c | 2 tools/testing/selftests/ftrace/settings | 1 tools/testing/selftests/kmod/kmod.sh | 13 tools/testing/selftests/net/fib_nexthops.sh | 23 + tools/testing/selftests/net/fib_tests.sh | 10 tools/vm/Makefile | 2 183 files changed, 1952 insertions(+), 843 deletions(-)
Ahmad Fatoum (1):
ARM: imx: provide v7_cpu_resume() only on ARM_CPU_SUSPEND=y
Alan Stern (4):
USB: core: Fix free-while-in-use bug in the USB S-Glibrary
USB: hub: Fix handling of connect changes during sleep
USB: hub: Revert commit bd0e6c9614b9 ("usb: hub: try old enumeration scheme first for high speed devices")
usb-storage: Add unusual_devs entry for JMicron JMS566
Alexander Tsoy (1):
ALSA: usb-audio: Filter out unsupported sample rates on Focusrite devices
Alexandre Belloni (1):
iio: adc: ti-ads8344: properly byte swap value
Amit Singh Tomar (1):
tty: serial: owl: add "much needed" clk_prepare_enable()
Andrew Melnychenko (1):
tty: hvc: fix buffer overflow during hvc_alloc().
Arnd Bergmann (1):
compat: ARM64: always include asm-generic/compat.h
Aurelien Jarno (1):
libbpf: Fix readelf output parsing on powerpc with recent binutils
Badhri Jagan Sridharan (1):
usb: typec: tcpm: Ignore CC and vbus changes in PORT_RESET change
Catalin Marinas (1):
arm64: Silence clang warning on mismatched value/register sizes
Changming Liu (1):
USB: sisusbvga: Change port variable from signed to unsigned
Chris Packham (1):
powerpc/setup_64: Set cache-line-size based on cache-block-size
Christian Borntraeger (1):
s390/mm: fix page table upgrade vs 2ndary address mode accesses
Christophe Leroy (1):
powerpc/mm: Fix CONFIG_PPC_KUAP_DEBUG on PPC32
Chuck Lever (1):
SUNRPC: Fix backchannel RPC soft lockups
Cornelia Huck (2):
s390/cio: generate delayed uevent for vfio-ccw subchannels s390/cio: avoid duplicated 'ADD' uevents
Dan Carpenter (1):
mlxsw: Fix some IS_ERR() vs NULL bugs
David Ahern (5):
ipv4: Update fib_select_default to handle nexthop objects
selftests: Fix suppress test in fib_tests.sh
vrf: Fix IPv6 with qdisc and xfrm
xfrm: Always set XFRM_TRANSFORMED in xfrm{4,6}_output_finish
vrf: Check skb for XFRM_TRANSFORMED flag
Dmitry Monakhov (1):
ext4: fix extent_status fragmentation for plain files
Doug Berger (1):
net: bcmgenet: correct per TX/RX ring statistics
Eric Biggers (1):
selftests: kmod: fix handling test numbers above 9
Eric Dumazet (3):
net/mlx4_en: avoid indirect call in TX completion
sched: etf: do not assume all sockets are full blown
tcp: cache line align MAX_TCP_HEADER
Eric W. Biederman (1):
signal: Avoid corrupting si_pid and si_uid in do_notify_parent
Evan Green (1):
loop: Better discard support for block devices
Florian Fainelli (6):
pwm: bcm2835: Dynamically allocate base
net: dsa: b53: Lookup VID in ARL searches when VLAN is enabled
net: dsa: b53: Fix valid setting for MDB entries
net: dsa: b53: Fix ARL register definitions
net: dsa: b53: Rework ARL bin logic
net: dsa: b53: b53_arl_rw_op() needs to select IVL or SVL
František Kučera (1):
ALSA: usb-audio: Add Pioneer DJ DJM-250MK2 quirk
Ganesh Goudar (1):
powerpc/pseries: Fix MCE handling on pseries
Geert Uytterhoeven (2):
pwm: rcar: Fix late Runtime PM enablement
pwm: renesas-tpu: Fix late Runtime PM enablement
George Wilson (1):
tpm: ibmvtpm: retry on H_CLOSED in tpm_ibmvtpm_send()
Greg Kroah-Hartman (1):
Linux 5.4.36
Gyeongtaek Lee (1):
ASoC: dapm: fixup dapm kcontrol widget
Halil Pasic (1):
virtio-blk: improve virtqueue error to BLK_STS
Hans de Goede (2):
ASoC: Intel: atom: Take the drv->lock mutex before calling sst_send_slot_map()
ASoC: Intel: bytcr_rt5640: Add quirk for MPMAN MPWIN895CL tablet
Heiner Kallweit (1):
PCI/ASPM: Allow re-enabling Clock PM
Ian Abbott (1):
staging: comedi: dt2815: fix writing hi byte of analog output
Ilan Peer (1):
iwlwifi: mvm: Do not declare support for ACK Enabled Aggregation
Isabel Zhang (1):
drm/amd/display: Update stream adjust in dc_stream_adjust_vmin_vmax
James Morse (3):
arm64: errata: Hide CTR_EL0.DIC on systems affected by Neoverse-N1 #1542419
arm64: Fake the IminLine size on systems affected by Neoverse-N1 #1542419
arm64: compat: Workaround Neoverse-N1 #1542419 for compat user-space
James Smart (3):
scsi: lpfc: Fix kasan slab-out-of-bounds error in lpfc_unreg_login
scsi: lpfc: Fix crash after handling a pci error
scsi: lpfc: Fix crash in target side cable pulls hitting WAIT_FOR_UNREG
Jan Kara (1):
tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT
Jann Horn (2):
USB: early: Handle AMD's spec-compliant identifiers, too
vmalloc: fix remap_vmalloc_range() bounds checks
Jarkko Sakkinen (1):
tpm/tpm_tis: Free IRQ if probing fails
Javed Hasan (1):
scsi: libfc: If PRLI rejected, move rport to PLOGI state
Jiri Olsa (1):
perf/core: Disable page faults when getting phys address
Jiri Slaby (1):
tty: rocket, avoid OOB access
Johannes Berg (4):
mac80211: populate debugfs only after cfg80211 init
iwlwifi: pcie: actually release queue memory in TVQM
iwlwifi: mvm: limit maximum queue appropriately
iwlwifi: mvm: fix inactive TID removal return value usage
John Haxby (1):
ipv6: fix restrict IPV6_ADDRFORM operation
Jonathan Cox (1):
USB: Add USB_QUIRK_DELAY_CTRL_MSG and USB_QUIRK_DELAY_INIT for Corsair K70 RGB RAPIDFIRE
Kai Vehmanen (1):
ASoC: SOF: trace: fix unconditional free in trace release
Kai-Heng Feng (2):
xhci: Ensure link state is U3 after setting USB_SS_PORT_LS_U3
xhci: Wait until link state trainsits to U0 after setting USB_SS_PORT_LS_U0
Kailang Yang (1):
ALSA: hda/realtek - Add new codec supported for ALC245
Kazuhiro Fujita (1):
serial: sh-sci: Make sure status register SCxSR is read in correct sequence
Kevin Barnett (2):
scsi: smartpqi: fix controller lockup observed during force reboot
scsi: smartpqi: fix problem with unique ID for physical device
Kishon Vijay Abraham I (1):
dma-direct: fix data truncation in dma_direct_get_required_mask()
Lars Engebretsen (1):
iio: core: remove extra semi-colon from devm_iio_device_register() macro
Lars-Peter Clausen (4):
iio: xilinx-xadc: Fix ADC-B powerdown
iio: xilinx-xadc: Fix clearing interrupt when enabling trigger
iio: xilinx-xadc: Fix sequencer configuration for aux channels in simultaneous mode
iio: xilinx-xadc: Make sure not exceed maximum samplerate
Lary Gibaud (1):
iio: st_sensors: rely on odr mask to know if odr can be set
Longpeng (1):
mm/hugetlb: fix a addressing exception caused by huge_pte_offset
Lucas Stach (1):
tools/vm: fix cross-compile build
Luis Mendes (1):
staging: gasket: Fix incongruency in handling of sysfs entries creation
Malcolm Priestley (5):
staging: vt6656: Don't set RCR_MULTICAST or RCR_BROADCAST by default.
staging: vt6656: Fix calling conditions of vnt_set_bss_mode
staging: vt6656: Fix drivers TBTT timing counter.
staging: vt6656: Fix pairwise key entry save.
staging: vt6656: Power save stop wake_up_count wrap around.
Marc Zyngier (1):
net: stmmac: dwmac-meson8b: Add missing boundary to RGMII TX clock array
Masahiro Yamada (1):
lib/raid6/test: fix build on distros whose /bin/sh is not bash
Mathias Nyman (4):
xhci: Finetune host initiated USB3 rootport link suspend and resume
xhci: Fix handling halted endpoint even if endpoint ring appears empty
xhci: prevent bus suspend if a roothub port detected a over-current condition
xhci: Don't clear hub TT buffer on ep0 protocol stall
Mauro Carvalho Chehab (1):
kconfig: qconf: Fix a few alignment issues
Michael Ellerman (1):
powerpc/kuap: PPC_KUAP_DEBUG should depend on PPC_KUAP
Michal Simek (7):
Revert "serial: uartps: Fix uartps_major handling"
Revert "serial: uartps: Use the same dynamic major number for all ports" Revert "serial: uartps: Fix error path when alloc failed" Revert "serial: uartps: Do not allow use aliases >= MAX_UART_INSTANCES" Revert "serial: uartps: Change uart ID port allocation" Revert "serial: uartps: Move Port ID to device data structure" Revert "serial: uartps: Register own uart console and driver structures"
Mika Westerberg (3):
PCI/PM: Add pcie_wait_for_link_delay()
PCI: pciehp: Prevent deadlock on disconnect PCI/PM: Add missing link delays required by the PCIe spec
Mordechay Goodstein (1):
iwlwifi: mvm: beacon statistics shouldn't go backwards
Muchun Song (1):
mm/ksm: fix NULL pointer dereference when KSM zero page is enabled
Murthy Bhat (1):
scsi: smartpqi: fix call trace in device discovery
Naoki Kiryu (1):
usb: typec: altmode: Fix typec_altmode_get_partner sometimes returning an invalid pointer
Nicholas Kazlauskas (1):
drm/amd/display: Calculate scaling ratios on every medium/full update
Nicholas Piggin (1):
Revert "powerpc/64: irq_work avoid interrupt when called with hardware irqs enabled"
Nick Bowler (1):
nvme: fix compat address handling in several ioctls
Nicolas Pitre (2):
vt: don't hardcode the mem allocation upper bound
vt: don't use kmalloc() for the unicode screen buffer
Oliver Neukum (4):
cdc-acm: close race betrween suspend() and acm_softint
cdc-acm: introduce a cool down
UAS: no use logging any details in case of ENODEV
UAS: fix deadlock in error handling and PM flushing work
Olivier Moysan (1):
iio: adc: stm32-adc: fix sleep in atomic context
Paul Moore (1):
audit: check the length of userspace generated audit records
Paulo Alcantara (1):
cifs: fix uninitialised lease_key in open_shroot()
Qiujun Huang (1):
ceph: return ceph_mdsc_do_request() errors from __get_parent()
Rahul Lakkireddy (1):
cxgb4: fix large delays in PTP synchronization
Randall Huang (1):
f2fs: fix to avoid memory leakage in f2fs_listxattr
Sabrina Dubroca (2):
vxlan: use the correct nlattr array in NL_SET_ERR_MSG_ATTR
geneve: use the correct nlattr array in NL_SET_ERR_MSG_ATTR
Sagi Grimberg (2):
nvme-tcp: fix possible crash in write_zeroes processing
nvme: fix deadlock caused by ANA update wrong locking
Santosh Sivaraj (1):
tools/test/nvdimm: Fix out of tree build
Sean Christopherson (2):
KVM: s390: Return last valid slot if approx index is out-of-bounds
KVM: Check validity of resolved slot when searching memslots
Steven Rostedt (VMware) (1):
tracing/selftests: Turn off timeout setting
Sudip Mukherjee (1):
coredump: fix null pointer dereference on coredump
Taehee Yoo (3):
macsec: avoid to set wrong mtu
macvlan: fix null dereference in macvlan_device_event()
team: fix hang in team_mode_get()
Takashi Iwai (6):
ALSA: hda: Remove ASUS ROG Zenith from the blacklist
ALSA: usb-audio: Add static mapping table for ALC1220-VB-based mobos
ALSA: usb-audio: Add connector notifier delegation
ALSA: usx2y: Fix potential NULL dereference
ALSA: hda/realtek - Fix unexpected init_amp override
ALSA: hda/hdmi: Add module option to disable audio component binding
Tero Kristo (1):
watchdog: reset last_hw_keepalive time at start
Thinh Nguyen (1):
usb: dwc3: gadget: Fix request completion check
Tianjia Zhang (1):
tpm: fix wrong return value in tpm_pcr_extend
Tonghao Zhang (1):
net: openvswitch: ovs_ct_exit to be done under ovs_lock
Udipto Goswami (1):
usb: f_fs: Clear OS Extended descriptor counts to zero in ffs_data_reset()
Uros Bizjak (1):
KVM: VMX: Enable machine check support for 32bit targets
Vasily Averin (2):
kernel/gcov/fs.c: gcov_seq_next() should increase position index ipc/util.c: sysvipc_find_ipc() should increase position index
Vishal Kulkarni (1):
cxgb4: fix adapter crash due to wrong MC size
Waiman Long (1):
KEYS: Avoid false positive ENOMEM error on key read
William Dauchy (1):
net, ip_tunnel: fix interface lookup with no key
Wu Bo (1):
scsi: iscsi: Report unbind session event when the target has been removed
Xiyu Yang (4):
net: netrom: Fix potential nr_neigh refcnt leak in nr_add_node net/x25: Fix x25_neigh refcnt leak when receiving frame
ALSA: usb-audio: Fix usb audio refcnt leak when getting spdif
staging: comedi: Fix comedi_device refcnt leak in comedi_open
Xu Yilun (1):
fpga: dfl: pci: fix return value of cci_pci_sriov_configure
Yan, Zheng (1):
ceph: don't skip updating wanted caps when cap is stale
Yongqiang Sun (1):
drm/amd/display: Not doing optimize bandwidth if flip pending.
Greg KH
maintainerDocumentation/admin-guide/kernel-parameters.txt +1 -2
@@ -5005,8 +5005,7 @@ usbcore.old_scheme_first= [USB] Start with the old device initialization - scheme, applies only to low and full-speed devices - (default 0 = off). + scheme (default 0 = off). usbcore.usbfs_memory_mb= [USB] Memory limit (in MB) for buffers allocated by
Documentation/arm64/silicon-errata.rst +2 -0
@@ -88,6 +88,8 @@ stable kernels. +----------------+-----------------+-----------------+-----------------------------+ | ARM | Neoverse-N1 | #1349291 | N/A | +----------------+-----------------+-----------------+-----------------------------+ +| ARM | Neoverse-N1 | #1542419 | ARM64_ERRATUM_1542419 | ++----------------+-----------------+-----------------+-----------------------------+ | ARM | MMU-500 | #841119,826419 | N/A | +----------------+-----------------+-----------------+-----------------------------+ +----------------+-----------------+-----------------+-----------------------------+
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 35 +SUBLEVEL = 36 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm/mach-imx/Makefile +2 -0
@@ -91,8 +91,10 @@ AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o obj-$(CONFIG_SOC_IMX53) += suspend-imx53.o endif +ifeq ($(CONFIG_ARM_CPU_SUSPEND),y) AFLAGS_resume-imx6.o :=-Wa,-march=armv7-a obj-$(CONFIG_SOC_IMX6) += resume-imx6.o +endif obj-$(CONFIG_SOC_IMX6) += pm-imx6.o obj-$(CONFIG_SOC_IMX1) += mach-imx1.o
arch/arm64/Kconfig +16 -0
@@ -559,6 +559,22 @@ config ARM64_ERRATUM_1463225 If unsure, say Y. +config ARM64_ERRATUM_1542419 + bool "Neoverse-N1: workaround mis-ordering of instruction fetches" + default y + help + This option adds a workaround for ARM Neoverse-N1 erratum + 1542419. + + Affected Neoverse-N1 cores could execute a stale instruction when + modified by another CPU. The workaround depends on a firmware + counterpart. + + Workaround the issue by hiding the DIC feature from EL0. This + forces user-space to perform cache maintenance. + + If unsure, say Y. + config CAVIUM_ERRATUM_22375 bool "Cavium erratum 22375, 24313" default y
arch/arm64/include/asm/cache.h +2 -1
@@ -11,6 +11,7 @@#define CTR_L1IP_MASK 3#define CTR_DMINLINE_SHIFT 16#define CTR_IMINLINE_SHIFT 0 +#define CTR_IMINLINE_MASK 0xf#define CTR_ERG_SHIFT 20#define CTR_CWG_SHIFT 24#define CTR_CWG_MASK 15
@@ -18,7 +19,7 @@#define CTR_DIC_SHIFT 29#define CTR_CACHE_MINLINE_MASK \ - (0xf << CTR_DMINLINE_SHIFT | 0xf << CTR_IMINLINE_SHIFT) + (0xf << CTR_DMINLINE_SHIFT | CTR_IMINLINE_MASK << CTR_IMINLINE_SHIFT)#define CTR_L1IP (ctr) (((ctr) >> CTR_L1IP_SHIFT) & CTR_L1IP_MASK)
arch/arm64/include/asm/compat.h +3 -2
@@ -4,6 +4,9 @@*/ #ifndef __ASM_COMPAT_H#define __ASM_COMPAT_H + +#include <asm-generic/compat.h> +#ifdef CONFIG_COMPAT /*
@@ -13,8 +16,6 @@#include <linux/sched.h> #include <linux/sched/task_stack.h> -#include <asm-generic/compat.h> -#define COMPAT_USER_HZ 100#ifdef __AARCH64EB__#define COMPAT_UTS_MACHINE "armv8b\0\0"
arch/arm64/include/asm/cpucaps.h +2 -1
@@ -54,7 +54,8 @@#define ARM64_WORKAROUND_1463225 44#define ARM64_WORKAROUND_CAVIUM_TX2_219_TVM 45#define ARM64_WORKAROUND_CAVIUM_TX2_219_PRFM 46 +#define ARM64_WORKAROUND_1542419 47 -#define ARM64_NCAPS 47 +#define ARM64_NCAPS 48#endif /* __ASM_CPUCAPS_H */
arch/arm64/kernel/cpu_errata.c +31 -1
@@ -88,13 +88,21 @@ has_mismatched_cache_type(const struct arm64_cpu_capabilities *entry, }static void -cpu_enable_trap_ctr_access (const struct arm64_cpu_capabilities *__unused) +cpu_enable_trap_ctr_access (const struct arm64_cpu_capabilities *cap) {u64 mask = arm64_ftr_reg_ctrel0.strict_mask; +bool enable_uct_trap = false;/* Trap CTR_EL0 access on this CPU, only if it has a mismatch */ if ((read_cpuid_cachetype () & mask) != (arm64_ftr_reg_ctrel0.sys_val & mask)) + enable_uct_trap = true; + +/* ... or if the system is affected by an erratum */ +if (cap->capability ==ARM64_WORKAROUND_1542419 ) + enable_uct_trap = true; + +if (enable_uct_trap)sysreg_clear_set (sctlr_el1,SCTLR_EL1_UCT ,0 ); }
@@ -651,6 +659,18 @@ needs_tx2_tvm_workaround(const struct arm64_cpu_capabilities *entry,return false; } +static bool __maybe_unused +has_neoverse_n1_erratum_1542419 (const struct arm64_cpu_capabilities *entry, +int scope) +{ +u32 midr =read_cpuid_id (); +bool has_dic =read_cpuid_cachetype () &BIT (CTR_DIC_SHIFT ); +const struct midr_range range =MIDR_ALL_VERSIONS (MIDR_NEOVERSE_N1 ); + +WARN_ON (scope !=SCOPE_LOCAL_CPU ||preemptible ()); +return is_midr_in_range (midr, &range) && has_dic; +} +#ifdef CONFIG_HARDEN_EL2_VECTORS static const struct midr_range arm64_harden_el2_vectors[] = {
@@ -927,6 +947,16 @@ const struct arm64_cpu_capabilities arm64_errata[] = { .capability = ARM64_WORKAROUND_CAVIUM_TX2_219_PRFM, ERRATA_MIDR_RANGE_LIST(tx2_family_cpus), }, +#endif +#ifdef CONFIG_ARM64_ERRATUM_1542419 + { + /* we depend on the firmware portion for correctness */ + .desc = "ARM erratum 1542419 (kernel portion)", + .capability = ARM64_WORKAROUND_1542419, + .type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM, + .matches = has_neoverse_n1_erratum_1542419, + .cpu_enable = cpu_enable_trap_ctr_access, + }, #endif { }
arch/arm64/kernel/sys_compat.c +11 -0
@@ -8,6 +8,7 @@*/ #include <linux/compat.h> +#include <linux/cpufeature.h> #include <linux/personality.h> #include <linux/sched.h> #include <linux/sched/signal.h>
@@ -17,6 +18,7 @@#include <asm/cacheflush.h> #include <asm/system_misc.h> +#include <asm/tlbflush.h> #include <asm/unistd.h> static long
@@ -30,6 +32,15 @@ __do_compat_cache_op(unsigned long start, unsigned long end)if (fatal_signal_pending (current))return 0 ; +if (cpus_have_const_cap (ARM64_WORKAROUND_1542419 )) { +/* +* The workaround requires an inner-shareable tlbi. +* We pick the reserved-ASID to minimise the impact. +*/ +__tlbi (aside1is,__TLBI_VADDR (0 ,0 )); +dsb (ish); + } + ret =__flush_cache_user_range (start, start + chunk);if (ret)return ret;
arch/arm64/kernel/traps.c +9 -0
@@ -470,6 +470,15 @@ static void ctr_read_handler(unsigned int esr, struct pt_regs *regs)int rt =ESR_ELx_SYS64_ISS_RT (esr);unsigned long val =arm64_ftr_reg_user_value (&arm64_ftr_reg_ctrel0); +if (cpus_have_const_cap (ARM64_WORKAROUND_1542419 )) { +/* Hide DIC so that we can trap the unnecessary maintenance...*/ + val &= ~BIT (CTR_DIC_SHIFT ); + +/* ... and fake IminLine to reduce the number of traps. */ + val &= ~CTR_IMINLINE_MASK ; + val |= (PAGE_SHIFT -2 ) &CTR_IMINLINE_MASK ; + } +pt_regs_write_reg (regs, rt, val);arm64_skip_faulting_instruction (regs,AARCH64_INSN_SIZE );
arch/powerpc/kernel/entry_32.S +1 -1
@@ -705,7 +705,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_SPE) stw r10,_CCR(r1) stw r1,KSP(r3) /* Set old stack pointer */ - kuap_check r2, r4 + kuap_check r2, r0 #ifdef CONFIG_SMP /* We need a sync somewhere here to make sure that if the * previous task gets rescheduled on another CPU, it sees all
arch/powerpc/kernel/setup_64.c +2 -0
@@ -541,6 +541,8 @@ static bool __init parse_cache_info(struct device_node *np, lsizep =of_get_property (np, propnames[3 ],NULL );if (bsizep ==NULL ) bsizep = lsizep; +if (lsizep ==NULL ) + lsizep = bsizep;if (lsizep !=NULL ) lsize =be32_to_cpu (*lsizep);if (bsizep !=NULL )
arch/powerpc/kernel/time.c +13 -31
64 lines not on this page · raw message
arch/powerpc/platforms/Kconfig.cputype +1 -1
@@ -389,7 +389,7 @@ config PPC_KUAP config PPC_KUAP_DEBUG bool "Extra debugging for Kernel Userspace Access Protection" - depends on PPC_HAVE_KUAP && (PPC_RADIX_MMU || PPC_32) + depends on PPC_KUAP && (PPC_RADIX_MMU || PPC32) help Add extra debugging for Kernel Userspace Access Protection (KUAP) If you're unsure, say N.
arch/powerpc/platforms/pseries/ras.c +11 -0
@@ -683,6 +683,17 @@ static int mce_handle_error(struct pt_regs *regs, struct rtas_error_log *errp)#endif out: +/* +* Enable translation as we will be accessing per-cpu variables +* in save_mce_event() which may fall outside RMO region, also +* leave it enabled because subsequently we will be queuing work +* to workqueues where again per-cpu variables accessed, besides +* fwnmi_release_errinfo() crashes when called in realmode on +* pseries. +* Note: All the realmode handling like flushing SLB entries for +* SLB multihit is done by now. +*/ +mtmsr (mfmsr () |MSR_IR |MSR_DR );save_mce_event (regs, disposition ==RTAS_DISP_FULLY_RECOVERED , &mce_err, regs->nip, eaddr, paddr);
arch/s390/kvm/kvm-s390.c +3 -0
@@ -1932,6 +1932,9 @@ static int gfn_to_memslot_approx(struct kvm_memslots *slots, gfn_t gfn) start = slot +1 ; } +if (start >= slots->used_slots) +return slots->used_slots -1 ; +if (gfn >= memslots[start].base_gfn && gfn < memslots[start].base_gfn + memslots[start].npages) {atomic_set (&slots->lru_slot, start);
arch/s390/lib/uaccess.c +4 -0
@@ -64,10 +64,13 @@ mm_segment_t enable_sacf_uaccess(void) {mm_segment_t old_fs;unsigned long asce, cr; +unsigned long flags; old_fs = current->thread.mm_segment;if (old_fs &1 )return old_fs; +/* protect against a concurrent page table upgrade */ +local_irq_save (flags); current->thread.mm_segment |=1 ; asce = S390_lowcore.kernel_asce;if (likely (old_fs ==USER_DS )) {
@@ -83,6 +86,7 @@ mm_segment_t enable_sacf_uaccess(void)__ctl_load (asce,7 ,7 );set_cpu_flag (CIF_ASCE_SECONDARY ); } +local_irq_restore (flags);return old_fs; }EXPORT_SYMBOL (enable_sacf_uaccess);
arch/s390/mm/pgalloc.c +14 -2
@@ -70,8 +70,20 @@ static void __crst_table_upgrade(void *arg) {struct mm_struct *mm = arg; -if (current->active_mm == mm) -set_user_asce (mm); +/* we must change all active ASCEs to avoid the creation of new TLBs */ +if (current->active_mm == mm) { + S390_lowcore.user_asce = mm->context.asce; +if (current->thread.mm_segment ==USER_DS ) { +__ctl_load (S390_lowcore.user_asce,1 ,1 ); +/* Mark user-ASCE present in CR1 */ +clear_cpu_flag (CIF_ASCE_PRIMARY ); + } +if (current->thread.mm_segment ==USER_DS_SACF ) { +__ctl_load (S390_lowcore.user_asce,7 ,7 ); +/* enable_sacf_uaccess does all or nothing */ +WARN_ON (!test_cpu_flag (CIF_ASCE_SECONDARY )); + } + }__tlb_flush_local (); }
arch/x86/kvm/vmx/vmx.c +1 -1
@@ -4566,7 +4566,7 @@ static int handle_rmode_exception(struct kvm_vcpu *vcpu,*/ static void kvm_machine_check (void ) { -#if defined(CONFIG_X86_MCE ) && defined(CONFIG_X86_64 ) +#if defined(CONFIG_X86_MCE )struct pt_regs regs = { .cs =3 ,/* Fake ring 3 no matter what the guest ran on */ .flags = X86_EFLAGS_IF,
drivers/block/loop.c +31 -11
70 lines not on this page · raw message
drivers/block/virtio_blk.c +7 -2
@@ -345,9 +345,14 @@ static blk_status_t virtio_queue_rq(struct blk_mq_hw_ctx *hctx,if (err == -ENOSPC )blk_mq_stop_hw_queue (hctx);spin_unlock_irqrestore (&vblk->vqs[qid].lock, flags); -if (err == -ENOMEM || err == -ENOSPC ) +switch (err) { +case -ENOSPC :return BLK_STS_DEV_RESOURCE ; -return BLK_STS_IOERR ; +case -ENOMEM : +return BLK_STS_RESOURCE ; +default : +return BLK_STS_IOERR ; + } }if (bd->last &&virtqueue_kick_prepare (vblk->vqs[qid].vq))
drivers/char/tpm/tpm-interface.c +1 -1
@@ -322,7 +322,7 @@ int tpm_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,for (i =0 ; i < chip->nr_allocated_banks; i++) {if (digests[i].alg_id != chip->allocated_banks[i].alg_id) { - rc =EINVAL ; + rc = -EINVAL ; goto out; } }
drivers/char/tpm/tpm_ibmvtpm.c +73 -63
179 lines not on this page · raw message
drivers/char/tpm/tpm_tis_core.c +7 -1
@@ -433,6 +433,9 @@ static void disable_interrupts(struct tpm_chip *chip)u32 intmask;int rc; +if (priv->irq ==0 ) +return ; + rc =tpm_tis_read32 (priv,TPM_INT_ENABLE (priv->locality), &intmask);if (rc <0 ) intmask =0 ;
@@ -983,9 +986,12 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,if (irq) {tpm_tis_probe_irq_single (chip, intmask,IRQF_SHARED , irq); -if (!(chip->flags &TPM_CHIP_FLAG_IRQ )) +if (!(chip->flags &TPM_CHIP_FLAG_IRQ )) {dev_err (&chip->dev,FW_BUG "TPM interrupt not working, polling instead\n" ); + +disable_interrupts (chip); + } }else {tpm_tis_probe_irq (chip, intmask); }
drivers/fpga/dfl-pci.c +4 -2
@@ -248,11 +248,13 @@ static int cci_pci_sriov_configure(struct pci_dev *pcidev, int num_vfs)return ret; ret =pci_enable_sriov (pcidev, num_vfs); -if (ret) +if (ret) {dfl_fpga_cdev_config_ports_pf (cdev); +return ret; + } } -return ret; +return num_vfs; }static void cci_pci_remove (struct pci_dev *pcidev)
drivers/gpu/drm/amd/display/dc/core/dc.c +37 -1
@@ -283,6 +283,8 @@ bool dc_stream_adjust_vmin_vmax(struct dc *dc,int i =0 ;bool ret = false; + stream->adjust = *adjust; +for (i =0 ; i <MAX_PIPES ; i++) {struct pipe_ctx *pipe = &dc->current_state->res_ctx.pipe_ctx[i];
@@ -1180,6 +1182,26 @@ bool dc_commit_state(struct dc *dc, struct dc_state *context)return (result ==DC_OK ); } +static bool is_flip_pending_in_pipes (struct dc *dc,struct dc_state *context) +{ +int i; +struct pipe_ctx *pipe; + +for (i =0 ; i <MAX_PIPES ; i++) { + pipe = &context->res_ctx.pipe_ctx[i]; + +if (!pipe->plane_state) +continue ; + +/* Must set to false to start with, due to OR in update function */ + pipe->plane_state->status.is_flip_pending = false; + dc->hwss.update_pending_status (pipe); +if (pipe->plane_state->status.is_flip_pending) +return true; + } +return false; +} +bool dc_post_update_surfaces_to_stream (struct dc *dc) {int i;
@@ -1190,6 +1212,9 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)post_surface_trace (dc); +if (is_flip_pending_in_pipes (dc, context)) +return true; +for (i =0 ; i < dc->res_pool->pipe_count; i++)if (context->res_ctx.pipe_ctx[i].stream ==NULL || context->res_ctx.pipe_ctx[i].plane_state ==NULL ) {
@@ -2152,7 +2177,7 @@ void dc_commit_updates_for_stream(struct dc *dc,enum surface_update_type update_type;struct dc_state *context;struct dc_context *dc_ctx = dc->ctx; -int i; +int i, j; stream_status =dc_stream_get_status (stream); context = dc->current_state;
@@ -2190,6 +2215,17 @@ void dc_commit_updates_for_stream(struct dc *dc,copy_surface_update_to_plane (surface, &srf_updates[i]); +if (update_type >=UPDATE_TYPE_MED ) { +for (j =0 ; j < dc->res_pool->pipe_count; j++) { +struct pipe_ctx *pipe_ctx = + &context->res_ctx.pipe_ctx[j]; + +if (pipe_ctx->plane_state != surface) +continue ; + +resource_build_scaling_params (pipe_ctx); + } + } }copy_stream_update_to_stream (dc, context, stream, stream_update);
drivers/iio/adc/stm32-adc.c +28 -3
@@ -1367,8 +1367,30 @@ static unsigned int stm32_adc_dma_residue(struct stm32_adc *adc)static void stm32_adc_dma_buffer_done (void *data) {struct iio_dev *indio_dev = data; +struct stm32_adc *adc =iio_priv (indio_dev); +int residue =stm32_adc_dma_residue (adc); + +/* +* In DMA mode the trigger services of IIO are not used +* (e.g. no call to iio_trigger_poll). +* Calling irq handler associated to the hardware trigger is not +* relevant as the conversions have already been done. Data +* transfers are performed directly in DMA callback instead. +* This implementation avoids to call trigger irq handler that +* may sleep, in an atomic context (DMA irq handler context). +*/ +dev_dbg (&indio_dev->dev,"%s bufi=%d\n" , __func__, adc->bufi); -iio_trigger_poll_chained (indio_dev->trig); +while (residue >= indio_dev->scan_bytes) { +u16 *buffer = (u16 *)&adc->rx_buf[adc->bufi]; + +iio_push_to_buffers (indio_dev, buffer); + + residue -= indio_dev->scan_bytes; + adc->bufi += indio_dev->scan_bytes; +if (adc->bufi >= adc->rx_buf_sz) + adc->bufi =0 ; + } }static int stm32_adc_dma_start (struct iio_dev *indio_dev)
@@ -1778,6 +1800,7 @@ static int stm32_adc_probe(struct platform_device *pdev) {struct iio_dev *indio_dev;struct device *dev = &pdev->dev; +irqreturn_t (*handler)(int irq,void *p) =NULL ;struct stm32_adc *adc;int ret;
@@ -1843,9 +1866,11 @@ static int stm32_adc_probe(struct platform_device *pdev)if (ret <0 )return ret; +if (!adc->dma_chan) + handler = &stm32_adc_trigger_handler; + ret =iio_triggered_buffer_setup (indio_dev, - &iio_pollfunc_store_time, - &stm32_adc_trigger_handler, + &iio_pollfunc_store_time, handler, &stm32_adc_buffer_setup_ops);if (ret) {dev_err (&pdev->dev,"buffer setup failed\n" );
drivers/iio/adc/ti-ads8344.c +3 -3
@@ -29,7 +29,7 @@ struct ads8344 {struct mutex lock;u8 tx_buf____cacheline_aligned ; -u16 rx_buf; +u8 rx_buf[3 ]; };#define ADS8344_VOLTAGE_CHANNEL (chan, si) \
@@ -89,11 +89,11 @@ static int ads8344_adc_conversion(struct ads8344 *adc, int channel,udelay (9 ); - ret =spi_read (spi, &adc->rx_buf,2 ); + ret =spi_read (spi, adc->rx_buf,sizeof (adc->rx_buf));if (ret)return ret; -return adc->rx_buf; +return adc->rx_buf[0 ] <<9 | adc->rx_buf[1 ] <<1 | adc->rx_buf[2 ] >>7 ; } static int ads8344_read_raw(struct iio_dev *iio,
drivers/iio/adc/xilinx-xadc-core.c +74 -21
177 lines not on this page · raw message
drivers/iio/common/st_sensors/st_sensors_core.c +1 -1
@@ -80,7 +80,7 @@ int st_sensors_set_odr(struct iio_dev *indio_dev, unsigned int odr)struct st_sensor_odr_avl odr_out = {0 ,0 };struct st_sensor_data *sdata =iio_priv (indio_dev); -if (!sdata->sensor_settings->odr.addr) +if (!sdata->sensor_settings->odr.mask)return 0 ; err =st_sensors_match_odr (sdata->sensor_settings, odr, &odr_out);
drivers/net/dsa/b53/b53_common.c +33 -5
@@ -1441,6 +1441,10 @@ static int b53_arl_rw_op(struct b53_device *dev, unsigned int op) reg |=ARLTBL_RW ; else reg &= ~ARLTBL_RW; +if (dev->vlan_enabled) + reg &= ~ARLTBL_IVL_SVL_SELECT ; +else + reg |=ARLTBL_IVL_SVL_SELECT ;b53_write8 (dev,B53_ARLIO_PAGE ,B53_ARLTBL_RW_CTRL , reg);return b53_arl_op_wait (dev);
@@ -1450,6 +1454,7 @@ static int b53_arl_read(struct b53_device *dev, u64 mac, u16 vid, struct b53_arl_entry *ent, u8 *idx, bool is_valid) { +DECLARE_BITMAP (free_bins ,B53_ARLTBL_MAX_BIN_ENTRIES );unsigned int i;int ret;
@@ -1457,6 +1462,8 @@ static int b53_arl_read(struct b53_device *dev, u64 mac,if (ret)return ret; +bitmap_zero (free_bins, dev->num_arl_entries); +/* Read the bins */ for (i =0 ; i < dev->num_arl_entries; i++) {u64 mac_vid;
@@ -1468,13 +1475,24 @@ static int b53_arl_read(struct b53_device *dev, u64 mac, B53_ARLTBL_DATA_ENTRY(i), &fwd_entry);b53_arl_to_entry (ent, mac_vid, fwd_entry); -if (!(fwd_entry &ARLTBL_VALID )) +if (!(fwd_entry &ARLTBL_VALID )) { +set_bit (i, free_bins);continue ; + }if ((mac_vid &ARLTBL_MAC_MASK ) != mac)continue ; +if (dev->vlan_enabled && + ((mac_vid >>ARLTBL_VID_S ) &ARLTBL_VID_MASK ) != vid) +continue ; *idx = i; +return 0 ; } +if (bitmap_weight (free_bins, dev->num_arl_entries) ==0 ) +return -ENOSPC ; + + *idx =find_first_bit (free_bins, dev->num_arl_entries); +return -ENOENT ; }
@@ -1504,15 +1522,25 @@ static int b53_arl_op(struct b53_device *dev, int op, int port,if (op)return ret; -/* We could not find a matching MAC, so reset to a new entry */ -if (ret) { +switch (ret) { +case -ENOSPC : +dev_dbg (dev->dev,"{%pM,%.4d} no space left in ARL\n" , + addr, vid); +return is_valid ? ret :0 ; +case -ENOENT : +/* We could not find a matching MAC, so reset to a new entry */ +dev_dbg (dev->dev,"{%pM,%.4d} not found, using idx: %d\n" , + addr, vid, idx); fwd_entry =0 ; - idx =1 ; +break ; +default : +dev_dbg (dev->dev,"{%pM,%.4d} found, using idx: %d\n" , + addr, vid, idx); +break ; }memset (&ent,0 ,sizeof (ent)); ent.port = port; - ent.is_valid = is_valid; ent.vid = vid; ent.is_static = true;memcpy (ent.mac, addr,ETH_ALEN );
drivers/net/dsa/b53/b53_regs.h +6 -2
@@ -292,6 +292,7 @@/* ARL Table Read/Write Register (8 bit) */ #define B53_ARLTBL_RW_CTRL 0x00#define ARLTBL_RW BIT(0) +#define ARLTBL_IVL_SVL_SELECT BIT(6)#define ARLTBL_START_DONE BIT(7)/* MAC Address Index Register (48 bit) */
@@ -304,7 +305,7 @@* * BCM5325 and BCM5365 share most definitions below */ -#define B53_ARLTBL_MAC_VID_ENTRY (n) (0x10 * (n)) +#define B53_ARLTBL_MAC_VID_ENTRY (n) ((0x10 * (n)) + 0x10)#define ARLTBL_MAC_MASK 0xffffffffffffULL#define ARLTBL_VID_S 48#define ARLTBL_VID_MASK_25 0xff
@@ -316,13 +317,16 @@#define ARLTBL_VALID_25 BIT(63)/* ARL Table Data Entry N Registers (32 bit) */ -#define B53_ARLTBL_DATA_ENTRY (n) ((0x10 * (n)) + 0x08) +#define B53_ARLTBL_DATA_ENTRY (n) ((0x10 * (n)) + 0x18)#define ARLTBL_DATA_PORT_ID_MASK 0x1ff#define ARLTBL_TC (tc) ((3 & tc) << 11)#define ARLTBL_AGE BIT(14)#define ARLTBL_STATIC BIT(15)#define ARLTBL_VALID BIT(16) +/* Maximum number of bin entries in the ARL for all switches */ +#define B53_ARLTBL_MAX_BIN_ENTRIES 4 +/* ARL Search Control Register (8 bit) */ #define B53_ARL_SRCH_CTL 0x50#define B53_ARL_SRCH_CTL_25 0x20
drivers/net/ethernet/broadcom/genet/bcmgenet.c +3 -0
@@ -995,6 +995,8 @@ static void bcmgenet_get_ethtool_stats(struct net_device *dev,if (netif_running (dev))bcmgenet_update_mib_counters (priv); + dev->netdev_ops->ndo_get_stats (dev); +for (i =0 ; i <BCMGENET_STATS_LEN ; i++) {const struct bcmgenet_stats *s;char *p;
@@ -3204,6 +3206,7 @@ static struct net_device_stats *bcmgenet_get_stats(struct net_device *dev) dev->stats.rx_packets = rx_packets; dev->stats.rx_errors = rx_errors; dev->stats.rx_missed_errors = rx_errors; + dev->stats.rx_dropped = rx_dropped;return &dev->stats; }
drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c +20 -7
@@ -1054,9 +1054,9 @@ static void cudbg_t4_fwcache(struct cudbg_init *pdbg_init, } } -static unsigned long cudbg_mem_region_size (struct cudbg_init *pdbg_init, -struct cudbg_error *cudbg_err, -u8 mem_type) +static int cudbg_mem_region_size (struct cudbg_init *pdbg_init, +struct cudbg_error *cudbg_err, +u8 mem_type,unsigned long *region_size) {struct adapter *padap = pdbg_init->adap;struct cudbg_meminfo mem_info;
@@ -1065,15 +1065,23 @@ static unsigned long cudbg_mem_region_size(struct cudbg_init *pdbg_init,memset (&mem_info,0 ,sizeof (struct cudbg_meminfo )); rc =cudbg_fill_meminfo (padap, &mem_info); -if (rc) +if (rc) { + cudbg_err->sys_err = rc;return rc; + }cudbg_t4_fwcache (pdbg_init, cudbg_err); rc =cudbg_meminfo_get_mem_index (padap, &mem_info, mem_type, &mc_idx); -if (rc) +if (rc) { + cudbg_err->sys_err = rc;return rc; + } + +if (region_size) + *region_size = mem_info.avail[mc_idx].limit - + mem_info.avail[mc_idx].base; -return mem_info.avail[mc_idx].limit - mem_info.avail[mc_idx].base; +return 0 ; } static int cudbg_collect_mem_region(struct cudbg_init *pdbg_init,
@@ -1081,7 +1089,12 @@ static int cudbg_collect_mem_region(struct cudbg_init *pdbg_init, struct cudbg_error *cudbg_err, u8 mem_type) { -unsigned long size =cudbg_mem_region_size (pdbg_init, cudbg_err, mem_type); +unsigned long size =0 ; +int rc; + + rc =cudbg_mem_region_size (pdbg_init, cudbg_err, mem_type, &size); +if (rc) +return rc;return cudbg_read_fw_mem (pdbg_init, dbg_buff, mem_type, size, cudbg_err);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c +6 -21
@@ -311,32 +311,17 @@ static int cxgb4_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)*/ static int cxgb4_ptp_gettime (struct ptp_clock_info *ptp,struct timespec64 *ts) { -struct adapter *adapter = (struct adapter *)container_of (ptp, - struct adapter, ptp_clock_info); -struct fw_ptp_cmd c; + struct adapter *adapter = container_of(ptp, struct adapter, + ptp_clock_info);u64 ns; -int err; - -memset (&c,0 ,sizeof (c)); - c.op_to_portid =cpu_to_be32 (FW_CMD_OP_V (FW_PTP_CMD ) | -FW_CMD_REQUEST_F | -FW_CMD_READ_F | -FW_PTP_CMD_PORTID_V (0 )); - c.retval_len16 =cpu_to_be32 (FW_CMD_LEN16_V (sizeof (c) /16 )); - c.u.ts.sc =FW_PTP_SC_GET_TIME ; - err =t4_wr_mbox (adapter, adapter->mbox, &c,sizeof (c), &c); -if (err <0 ) { -dev_err (adapter->pdev_dev, -"PTP: %s error %d\n" , __func__, -err); -return err; - } + ns =t4_read_reg (adapter,T5_PORT_REG (0 ,MAC_PORT_PTP_SUM_LO_A )); + ns |= (u64 )t4_read_reg (adapter, +T5_PORT_REG (0 ,MAC_PORT_PTP_SUM_HI_A )) <<32 ;/* convert to timespec*/ - ns =be64_to_cpu (c.u.ts.tm); *ts =ns_to_timespec64 (ns); - -return err; +return 0 ; }/**
drivers/net/ethernet/chelsio/cxgb4/t4_regs.h +3 -0
@@ -1900,6 +1900,9 @@#define MAC_PORT_CFG2_A 0x818 +#define MAC_PORT_PTP_SUM_LO_A 0x990 +#define MAC_PORT_PTP_SUM_HI_A 0x994 +#define MPS_CMN_CTL_A 0x9000#define COUNTPAUSEMCRX_S 5
drivers/net/ethernet/mellanox/mlx4/en_tx.c +13 -1
@@ -43,6 +43,7 @@#include <linux/ip.h> #include <linux/ipv6.h> #include <linux/moduleparam.h> +#include <linux/indirect_call_wrapper.h> #include "mlx4_en.h"
@@ -261,6 +262,10 @@ static void mlx4_en_stamp_wqe(struct mlx4_en_priv *priv, } } +INDIRECT_CALLABLE_DECLARE(u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv, +struct mlx4_en_tx_ring *ring, +int index,u64 timestamp, +int napi_mode)); u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv, struct mlx4_en_tx_ring *ring,
@@ -329,6 +334,11 @@ u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv,return tx_info->nr_txbb; } +INDIRECT_CALLABLE_DECLARE(u32 mlx4_en_recycle_tx_desc(struct mlx4_en_priv *priv, +struct mlx4_en_tx_ring *ring, +int index,u64 timestamp, +int napi_mode)); + u32 mlx4_en_recycle_tx_desc(struct mlx4_en_priv *priv, struct mlx4_en_tx_ring *ring, int index, u64 timestamp,
@@ -449,7 +459,9 @@ bool mlx4_en_process_tx_cq(struct net_device *dev, timestamp =mlx4_en_get_cqe_ts (cqe);/* free next descriptor */ - last_nr_txbb = ring->free_tx_desc ( + last_nr_txbb =INDIRECT_CALL_2 (ring->free_tx_desc, + mlx4_en_free_tx_desc, + mlx4_en_recycle_tx_desc, priv, ring, ring_index, timestamp, napi_budget);
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c +2 -2
@@ -316,7 +316,7 @@ struct mlxsw_afa_block *mlxsw_afa_block_create(struct mlxsw_afa *mlxsw_afa) block =kzalloc (sizeof (*block),GFP_KERNEL );if (!block) -return NULL ; +return ERR_PTR (-ENOMEM );INIT_LIST_HEAD (&block->resource_list); block->afa = mlxsw_afa;
@@ -344,7 +344,7 @@ struct mlxsw_afa_block *mlxsw_afa_block_create(struct mlxsw_afa *mlxsw_afa)mlxsw_afa_set_destroy (block->first_set); err_first_set_create:kfree (block); -return NULL ; +return ERR_PTR (-ENOMEM ); }EXPORT_SYMBOL (mlxsw_afa_block_create);
drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c +2 -2
@@ -88,8 +88,8 @@ static int mlxsw_sp2_acl_tcam_init(struct mlxsw_sp *mlxsw_sp, void *priv,* to be written using PEFA register to all indexes for all regions. */ afa_block =mlxsw_afa_block_create (mlxsw_sp->afa); -if (!afa_block) { - err = -ENOMEM ; +if (IS_ERR (afa_block)) { + err =PTR_ERR (afa_block); goto err_afa_block; } err =mlxsw_afa_block_continue (afa_block);
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c +1 -1
@@ -444,7 +444,7 @@ mlxsw_sp_acl_rulei_create(struct mlxsw_sp_acl *acl, rulei =kzalloc (sizeof (*rulei),GFP_KERNEL );if (!rulei) -return NULL ; +return ERR_PTR (-ENOMEM );if (afa_block) { rulei->act_block = afa_block;
drivers/net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c +2 -2
@@ -199,8 +199,8 @@ mlxsw_sp_mr_tcam_afa_block_create(struct mlxsw_sp *mlxsw_sp,int err; afa_block =mlxsw_afa_block_create (mlxsw_sp->afa); -if (!afa_block) -return ERR_PTR (-ENOMEM ); +if (IS_ERR (afa_block)) +return afa_block; err =mlxsw_afa_block_append_allocated_counter (afa_block, counter_index);
drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c +1 -0
@@ -119,6 +119,7 @@ static int meson8b_init_rgmii_tx_clk(struct meson8b_dwmac *dwmac) { .div = 5, .val = 5, }, { .div = 6, .val = 6, }, { .div = 7, .val = 7, }, + { /* end of array */ } }; clk_configs = devm_kzalloc(dev, sizeof(*clk_configs), GFP_KERNEL);
drivers/net/geneve.c +1 -1
@@ -1207,7 +1207,7 @@ static int geneve_validate(struct nlattr *tb[], struct nlattr *data[],enum ifla_geneve_df df =nla_get_u8 (data[IFLA_GENEVE_DF ]);if (df <0 || df >GENEVE_DF_MAX ) { -NL_SET_ERR_MSG_ATTR (extack, tb[IFLA_GENEVE_DF ], +NL_SET_ERR_MSG_ATTR (extack, data[IFLA_GENEVE_DF ],"Invalid DF attribute" );return -EINVAL ; }
drivers/net/macsec.c +8 -4
@@ -3226,11 +3226,11 @@ static int macsec_newlink(struct net *net, struct net_device *dev, struct netlink_ext_ack *extack) {struct macsec_dev *macsec =macsec_priv (dev); +rx_handler_func_t *rx_handler; +u8 icv_len =DEFAULT_ICV_LEN ;struct net_device *real_dev; -int err; +int err, mtu;sci_t sci; -u8 icv_len =DEFAULT_ICV_LEN ; -rx_handler_func_t *rx_handler;if (!tb[IFLA_LINK ])return -EINVAL ;
@@ -3246,7 +3246,11 @@ static int macsec_newlink(struct net *net, struct net_device *dev,if (data && data[IFLA_MACSEC_ICV_LEN ]) icv_len =nla_get_u8 (data[IFLA_MACSEC_ICV_LEN ]); - dev->mtu = real_dev->mtu - icv_len -macsec_extra_len (true); + mtu = real_dev->mtu - icv_len -macsec_extra_len (true); +if (mtu <0 ) + dev->mtu =0 ; +else + dev->mtu = mtu; rx_handler =rtnl_dereference (real_dev->rx_handler);if (rx_handler && rx_handler != macsec_handle_frame)
drivers/net/macvlan.c +1 -1
@@ -1704,7 +1704,7 @@ static int macvlan_device_event(struct notifier_block *unused, struct macvlan_dev, list); -if (macvlan_sync_address (vlan->dev, dev->dev_addr)) +if (vlan &&macvlan_sync_address (vlan->dev, dev->dev_addr))return NOTIFY_BAD ;break ;
drivers/net/team/team.c +4 -0
@@ -468,6 +468,9 @@ static const struct team_mode *team_mode_get(const char *kind)struct team_mode_item *mitem;const struct team_mode *mode =NULL ; +if (!try_module_get (THIS_MODULE )) +return NULL ; +spin_lock (&mode_list_lock); mitem =__find_mode (kind);if (!mitem) {
@@ -483,6 +486,7 @@ static const struct team_mode *team_mode_get(const char *kind) }spin_unlock (&mode_list_lock); +module_put (THIS_MODULE );return mode; }
drivers/net/vrf.c +6 -4
@@ -188,8 +188,8 @@ static netdev_tx_t vrf_process_v6_outbound(struct sk_buff *skb, fl6.flowi6_proto = iph->nexthdr; fl6.flowi6_flags =FLOWI_FLAG_SKIP_NH_OIF ; - dst =ip6_route_output (net,NULL , &fl6); -if (dst == dst_null) + dst =ip6_dst_lookup_flow (net,NULL , &fl6,NULL ); +if (IS_ERR (dst) || dst == dst_null) goto err;skb_dst_drop (skb);
@@ -474,7 +474,8 @@ static struct sk_buff *vrf_ip6_out(struct net_device *vrf_dev,if (rt6_need_strict (&ipv6_hdr (skb)->daddr))return skb; -if (qdisc_tx_is_default (vrf_dev)) +if (qdisc_tx_is_default (vrf_dev) || +IP6CB (skb)->flags &IP6SKB_XFRM_TRANSFORMED )return vrf_ip6_out_direct (vrf_dev, sk, skb);return vrf_ip6_out_redirect (vrf_dev, skb);
@@ -686,7 +687,8 @@ static struct sk_buff *vrf_ip_out(struct net_device *vrf_dev, ipv4_is_lbcast(ip_hdr(skb)->daddr))return skb; -if (qdisc_tx_is_default (vrf_dev)) +if (qdisc_tx_is_default (vrf_dev) || +IPCB (skb)->flags &IPSKB_XFRM_TRANSFORMED )return vrf_ip_out_direct (vrf_dev, sk, skb);return vrf_ip_out_redirect (vrf_dev, skb);
drivers/net/vxlan.c +3 -3
@@ -3144,7 +3144,7 @@ static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[],u32 id =nla_get_u32 (data[IFLA_VXLAN_ID ]);if (id >=VXLAN_N_VID ) { -NL_SET_ERR_MSG_ATTR (extack, tb[IFLA_VXLAN_ID ], +NL_SET_ERR_MSG_ATTR (extack, data[IFLA_VXLAN_ID ],"VXLAN ID must be lower than 16777216" );return -ERANGE ; }
@@ -3155,7 +3155,7 @@ static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[], = nla_data(data[IFLA_VXLAN_PORT_RANGE]);if (ntohs (p->high) <ntohs (p->low)) { -NL_SET_ERR_MSG_ATTR (extack, tb[IFLA_VXLAN_PORT_RANGE ], +NL_SET_ERR_MSG_ATTR (extack, data[IFLA_VXLAN_PORT_RANGE ],"Invalid source port range" );return -EINVAL ; }
@@ -3165,7 +3165,7 @@ static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[],enum ifla_vxlan_df df =nla_get_u8 (data[IFLA_VXLAN_DF ]);if (df <0 || df >VXLAN_DF_MAX ) { -NL_SET_ERR_MSG_ATTR (extack, tb[IFLA_VXLAN_DF ], +NL_SET_ERR_MSG_ATTR (extack, data[IFLA_VXLAN_DF ],"Invalid DF attribute" );return -EINVAL ; }
drivers/net/wireless/intel/iwlegacy/3945-rs.c +1 -1
@@ -374,7 +374,7 @@ il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id) }static void * -il3945_rs_alloc (struct ieee80211_hw *hw,struct dentry *debugfsdir) +il3945_rs_alloc (struct ieee80211_hw *hw) {return hw->priv; }
drivers/net/wireless/intel/iwlegacy/4965-rs.c +1 -1
@@ -2474,7 +2474,7 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta, }static void * -il4965_rs_alloc (struct ieee80211_hw *hw,struct dentry *debugfsdir) +il4965_rs_alloc (struct ieee80211_hw *hw) {return hw->priv; }
drivers/net/wireless/intel/iwlwifi/dvm/rs.c +1 -1
@@ -3019,7 +3019,7 @@ static void rs_fill_link_cmd(struct iwl_priv *priv,cpu_to_le16 (priv->lib->bt_params->agg_time_limit); } -static void *rs_alloc (struct ieee80211_hw *hw,struct dentry *debugfsdir) +static void *rs_alloc (struct ieee80211_hw *hw) {return hw->priv; }
drivers/net/wireless/intel/iwlwifi/fw/api/txq.h +3 -3
@@ -8,7 +8,7 @@* Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH -* Copyright(c) 2019 Intel Corporation +* Copyright(c) 2019 - 2020 Intel Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -31,7 +31,7 @@* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH -* Copyright(c) 2019 Intel Corporation +* Copyright(c) 2019 - 2020 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -99,7 +99,7 @@ enum iwl_mvm_dqa_txq {IWL_MVM_DQA_MAX_MGMT_QUEUE =8 ,IWL_MVM_DQA_AP_PROBE_RESP_QUEUE =9 ,IWL_MVM_DQA_MIN_DATA_QUEUE =10 , - IWL_MVM_DQA_MAX_DATA_QUEUE = 31, + IWL_MVM_DQA_MAX_DATA_QUEUE = 30, }; enum iwl_mvm_tx_fifo {
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +2 -4
@@ -525,8 +525,7 @@ static struct ieee80211_sband_iftype_data iwl_he_capa[] = {IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US | IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8, .mac_cap_info[2 ] = -IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP | - IEEE80211_HE_MAC_CAP2_ACK_EN, + IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP, .mac_cap_info[3 ] =IEEE80211_HE_MAC_CAP3_OMI_CONTROL | IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
@@ -610,8 +609,7 @@ static struct ieee80211_sband_iftype_data iwl_he_capa[] = {IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US | IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8, .mac_cap_info[2 ] = -IEEE80211_HE_MAC_CAP2_BSR | - IEEE80211_HE_MAC_CAP2_ACK_EN, + IEEE80211_HE_MAC_CAP2_BSR, .mac_cap_info[3 ] =IEEE80211_HE_MAC_CAP3_OMI_CONTROL | IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
drivers/net/wireless/intel/iwlwifi/mvm/rs.c +1 -1
@@ -3663,7 +3663,7 @@ static void rs_fill_lq_cmd(struct iwl_mvm *mvm,cpu_to_le16 (iwl_mvm_coex_agg_time_limit (mvm, sta)); } -static void *rs_alloc (struct ieee80211_hw *hw,struct dentry *debugfsdir) +static void *rs_alloc (struct ieee80211_hw *hw) {return hw->priv; }
drivers/net/wireless/intel/iwlwifi/mvm/rx.c +11 -2
@@ -8,7 +8,7 @@* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH -* Copyright(c) 2018 - 2019 Intel Corporation +* Copyright(c) 2018 - 2020 Intel Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -31,7 +31,7 @@* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH -* Copyright(c) 2018 - 2019 Intel Corporation +* Copyright(c) 2018 - 2020 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -566,6 +566,7 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi,struct iwl_mvm_stat_data {struct iwl_mvm *mvm; +__le32 flags;__le32 mac_id;u8 beacon_filter_average_energy;void *general;
@@ -606,6 +607,13 @@ static void iwl_mvm_stat_iterator(void *_data, u8 *mac, -general->beacon_average_energy[vif_id]; } +/* make sure that beacon statistics don't go backwards with TCM +* request to clear statistics +*/ +if (le32_to_cpu (data->flags) &IWL_STATISTICS_REPLY_FLG_CLEAR ) + mvmvif->beacon_stats.accu_num_beacons += + mvmvif->beacon_stats.num_beacons; +if (mvmvif->id != id)return ;
@@ -763,6 +771,7 @@ void iwl_mvm_handle_rx_statistics(struct iwl_mvm *mvm, flags = stats->flag; } + data.flags = flags;iwl_mvm_rx_stats_check_trigger (mvm, pkt);
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +7 -2
@@ -722,6 +722,11 @@ static int iwl_mvm_find_free_queue(struct iwl_mvm *mvm, u8 sta_id,lockdep_assert_held (&mvm->mutex); +if (WARN (maxq >= mvm->trans->trans_cfg->base_params->num_of_queues, +"max queue %d >= num_of_queues (%d)" , maxq, + mvm->trans->trans_cfg->base_params->num_of_queues)) + maxq = mvm->trans->trans_cfg->base_params->num_of_queues -1 ; +/* This should not be hit with new TX path */ if (WARN_ON (iwl_mvm_has_new_tx_api (mvm)))return -ENOSPC ;
@@ -1164,9 +1169,9 @@ static int iwl_mvm_inactivity_check(struct iwl_mvm *mvm, u8 alloc_for_sta) inactive_tid_bitmap, &unshare_queues, &changetid_queues); -if (ret >=0 && free_queue <0 ) { +if (ret && free_queue <0 ) { queue_owner = sta; - free_queue = ret; + free_queue = i; }/* only unlock sta lock - we still need the queue info lock */ spin_unlock_bh (&mvmsta->lock);
drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c +3 -0
@@ -1283,6 +1283,9 @@ void iwl_trans_pcie_dyn_txq_free(struct iwl_trans *trans, int queue)iwl_pcie_gen2_txq_unmap (trans, queue); +iwl_pcie_gen2_txq_free_memory (trans, trans_pcie->txq[queue]); + trans_pcie->txq[queue] =NULL ; +IWL_DEBUG_TX_QUEUES (trans,"Deactivate queue %d\n" , queue); }
drivers/net/wireless/realtek/rtlwifi/rc.c +1 -1
@@ -261,7 +261,7 @@ static void rtl_rate_update(void *ppriv, { } -static void *rtl_rate_alloc (struct ieee80211_hw *hw,struct dentry *debugfsdir) +static void *rtl_rate_alloc (struct ieee80211_hw *hw) {struct rtl_priv *rtlpriv =rtl_priv (hw);return rtlpriv;
drivers/nvme/host/core.c +20 -7
@@ -6,6 +6,7 @@#include <linux/blkdev.h> #include <linux/blk-mq.h> +#include <linux/compat.h> #include <linux/delay.h> #include <linux/errno.h> #include <linux/hdreg.h>
@@ -1244,6 +1245,18 @@ static void nvme_enable_aen(struct nvme_ctrl *ctrl)queue_work (nvme_wq, &ctrl->async_event_work); } +/* +* Convert integer values from ioctl structures to user pointers, silently +* ignoring the upper bits in the compat case to match behaviour of 32-bit +* kernels. +*/ +static void __user *nvme_to_user_ptr (uintptr_t ptrval) +{ +if (in_compat_syscall ()) + ptrval = (compat_uptr_t )ptrval; +return (void __user *)ptrval; +} +static int nvme_submit_io (struct nvme_ns *ns,struct nvme_user_io __user *uio) {struct nvme_user_io io;
@@ -1267,7 +1280,7 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio) length = (io.nblocks +1 ) << ns->lba_shift; meta_len = (io.nblocks +1 ) * ns->ms; - metadata = (void __user *)(uintptr_t )io.metadata; + metadata =nvme_to_user_ptr (io.metadata);if (ns->ext) { length += meta_len;
@@ -1290,7 +1303,7 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio) c.rw.appmask =cpu_to_le16 (io.appmask);return nvme_submit_user_cmd (ns->queue, &c, - (void __user *)(uintptr_t )io.addr, length, +nvme_to_user_ptr (io.addr), length, metadata, meta_len,lower_32_bits (io.slba),NULL ,0 ); }
@@ -1410,9 +1423,9 @@ static int nvme_user_cmd(struct nvme_ctrl *ctrl, struct nvme_ns *ns, effects =nvme_passthru_start (ctrl, ns, cmd.opcode); status =nvme_submit_user_cmd (ns ? ns->queue : ctrl->admin_q, &c, - (void __user *)(uintptr_t )cmd.addr, cmd.data_len, - (void __user *)(uintptr_t )cmd.metadata, - cmd.metadata_len,0 , &result, timeout); +nvme_to_user_ptr (cmd.addr), cmd.data_len, +nvme_to_user_ptr (cmd.metadata), cmd.metadata_len, +0 , &result, timeout);nvme_passthru_end (ctrl, effects);if (status >=0 ) {
@@ -1457,8 +1470,8 @@ static int nvme_user_cmd64(struct nvme_ctrl *ctrl, struct nvme_ns *ns, effects =nvme_passthru_start (ctrl, ns, cmd.opcode); status =nvme_submit_user_cmd (ns ? ns->queue : ctrl->admin_q, &c, - (void __user *)(uintptr_t )cmd.addr, cmd.data_len, - (void __user *)(uintptr_t )cmd.metadata, cmd.metadata_len, +nvme_to_user_ptr (cmd.addr), cmd.data_len, +nvme_to_user_ptr (cmd.metadata), cmd.metadata_len,0 , &cmd.result, timeout);nvme_passthru_end (ctrl, effects);
drivers/nvme/host/multipath.c +2 -2
@@ -510,7 +510,7 @@ static int nvme_update_ana_state(struct nvme_ctrl *ctrl,if (!nr_nsids)return 0 ; -down_write (&ctrl->namespaces_rwsem); +down_read (&ctrl->namespaces_rwsem);list_for_each_entry (ns, &ctrl->namespaces, list) {unsigned nsid =le32_to_cpu (desc->nsids[n]);
@@ -521,7 +521,7 @@ static int nvme_update_ana_state(struct nvme_ctrl *ctrl,if (++n == nr_nsids)break ; } -up_write (&ctrl->namespaces_rwsem); +up_read (&ctrl->namespaces_rwsem);return 0 ; }
drivers/nvme/host/tcp.c +7 -6
@@ -164,16 +164,14 @@ static inline bool nvme_tcp_async_req(struct nvme_tcp_request *req)static inline bool nvme_tcp_has_inline_data (struct nvme_tcp_request *req) {struct request *rq; -unsigned int bytes;if (unlikely (nvme_tcp_async_req (req)))return false;/* async events don't have a request */ rq =blk_mq_rq_from_pdu (req); - bytes =blk_rq_payload_bytes (rq); -return rq_data_dir (rq) ==WRITE && bytes && - bytes <=nvme_tcp_inline_data_size (req->queue); +return rq_data_dir (rq) ==WRITE && req->data_len && + req->data_len <=nvme_tcp_inline_data_size (req->queue); }static inline struct page *nvme_tcp_req_cur_page (struct nvme_tcp_request *req)
@@ -2090,7 +2088,9 @@ static blk_status_t nvme_tcp_map_data(struct nvme_tcp_queue *queue, c->common.flags |=NVME_CMD_SGL_METABUF ; -if (rq_data_dir (rq) ==WRITE && req->data_len && +if (!blk_rq_nr_phys_segments (rq)) +nvme_tcp_set_sg_null (c); +else if (rq_data_dir (rq) ==WRITE && req->data_len <=nvme_tcp_inline_data_size (queue))nvme_tcp_set_sg_inline (queue, c, req->data_len);else
@@ -2117,7 +2117,8 @@ static blk_status_t nvme_tcp_setup_cmd_pdu(struct nvme_ns *ns, req->data_sent =0 ; req->pdu_len =0 ; req->pdu_sent =0 ; - req->data_len =blk_rq_payload_bytes (rq); + req->data_len =blk_rq_nr_phys_segments (rq) ? +blk_rq_payload_bytes (rq) :0 ; req->curr_bio = rq->bio; if (rq_data_dir(rq) == WRITE &&
drivers/pci/hotplug/pciehp.h +3 -3
@@ -174,10 +174,10 @@ void pciehp_set_indicators(struct controller *ctrl, int pwr, int attn);void pciehp_get_latch_status (struct controller *ctrl,u8 *status);int pciehp_query_power_fault (struct controller *ctrl); -bool pciehp_card_present (struct controller *ctrl); -bool pciehp_card_present_or_link_active (struct controller *ctrl); +int pciehp_card_present (struct controller *ctrl); +int pciehp_card_present_or_link_active (struct controller *ctrl);int pciehp_check_link_status (struct controller *ctrl); -bool pciehp_check_link_active (struct controller *ctrl); +int pciehp_check_link_active (struct controller *ctrl);void pciehp_release_ctrl (struct controller *ctrl);int pciehp_sysfs_enable_slot (struct hotplug_slot *hotplug_slot);
drivers/pci/hotplug/pciehp_core.c +8 -3
@@ -139,10 +139,15 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value) {struct controller *ctrl =to_ctrl (hotplug_slot);struct pci_dev *pdev = ctrl->pcie->port; +int ret;pci_config_pm_runtime_get (pdev); - *value =pciehp_card_present_or_link_active (ctrl); + ret =pciehp_card_present_or_link_active (ctrl);pci_config_pm_runtime_put (pdev); +if (ret <0 ) +return ret; + + *value = ret;return 0 ; }
@@ -158,13 +163,13 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value)*/ static void pciehp_check_presence (struct controller *ctrl) { -bool occupied; +int occupied;down_read (&ctrl->reset_lock);mutex_lock (&ctrl->state_lock); occupied =pciehp_card_present_or_link_active (ctrl); -if ((occupied && (ctrl->state ==OFF_STATE || +if ((occupied >0 && (ctrl->state ==OFF_STATE || ctrl->state ==BLINKINGON_STATE )) || (!occupied && (ctrl->state ==ON_STATE || ctrl->state ==BLINKINGOFF_STATE )))
drivers/pci/hotplug/pciehp_ctrl.c +2 -2
@@ -226,7 +226,7 @@ void pciehp_handle_disable_request(struct controller *ctrl)void pciehp_handle_presence_or_link_change (struct controller *ctrl,u32 events) { -bool present, link_active; +int present, link_active;/* * If the slot is on and presence or link has changed, turn it off.
@@ -257,7 +257,7 @@ void pciehp_handle_presence_or_link_change(struct controller *ctrl, u32 events)mutex_lock (&ctrl->state_lock); present =pciehp_card_present (ctrl); link_active =pciehp_check_link_active (ctrl); -if (!present && !link_active) { +if (present <=0 && link_active <=0 ) {mutex_unlock (&ctrl->state_lock);return ; }
drivers/pci/hotplug/pciehp_hpc.c +48 -11
88 lines not on this page · raw message
drivers/pci/pci-driver.c +10 -1
@@ -919,6 +919,8 @@ static int pci_pm_resume_noirq(struct device *dev)struct pci_dev *pci_dev =to_pci_dev (dev);struct device_driver *drv = dev->driver;int error =0 ; +pci_power_t prev_state = pci_dev->current_state; +bool skip_bus_pm = pci_dev->skip_bus_pm;if (dev_pm_may_skip_resume (dev))return 0 ;
@@ -937,12 +939,15 @@ static int pci_pm_resume_noirq(struct device *dev)* configuration here and attempting to put them into D0 again is * pointless, so avoid doing that. */ -if (!(pci_dev->skip_bus_pm &&pm_suspend_no_platform ())) +if (!(skip_bus_pm &&pm_suspend_no_platform ()))pci_pm_default_resume_early (pci_dev);pci_fixup_device (pci_fixup_resume_early, pci_dev);pcie_pme_root_status_cleanup (pci_dev); +if (!skip_bus_pm && prev_state == PCI_D3cold) +pci_bridge_wait_for_secondary_bus (pci_dev); +if (pci_has_legacy_pm_support (pci_dev))return pci_legacy_resume_early (dev);
@@ -1333,6 +1338,7 @@ static int pci_pm_runtime_resume(struct device *dev)int rc =0 ;struct pci_dev *pci_dev =to_pci_dev (dev);const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm :NULL ; +pci_power_t prev_state = pci_dev->current_state;/* * Restoring config space is necessary even if the device is not bound
@@ -1348,6 +1354,9 @@ static int pci_pm_runtime_resume(struct device *dev)pci_enable_wake (pci_dev,PCI_D0 , false);pci_fixup_device (pci_fixup_resume, pci_dev); +if (prev_state == PCI_D3cold) +pci_bridge_wait_for_secondary_bus (pci_dev); +if (pm && pm->runtime_resume) rc = pm->runtime_resume (dev);
drivers/pci/pci.c +137 -5
172 lines not on this page · raw message
drivers/pci/pci.h +1 -0
@@ -107,6 +107,7 @@ void pci_allocate_cap_save_buffers(struct pci_dev *dev);void pci_free_cap_save_buffers (struct pci_dev *dev);bool pci_bridge_d3_possible (struct pci_dev *dev);void pci_bridge_d3_update (struct pci_dev *dev); +void pci_bridge_wait_for_secondary_bus (struct pci_dev *dev);static inline void pci_wakeup_event (struct pci_dev *dev) {
drivers/pci/pcie/aspm.c +11 -7
@@ -64,6 +64,7 @@ struct pcie_link_state { u32 clkpm_capable:1; /* Clock PM capable? */ u32 clkpm_enabled:1; /* Current Clock PM state */ u32 clkpm_default:1; /* Default Clock PM state by BIOS */ + u32 clkpm_disable:1; /* Clock PM disabled *//* Exit latencies */ struct aspm_latency latency_up;/* Upstream direction exit latency */
@@ -161,8 +162,11 @@ static void pcie_set_clkpm_nocheck(struct pcie_link_state *link, int enable)static void pcie_set_clkpm (struct pcie_link_state *link,int enable) { -/* Don't enable Clock PM if the link is not Clock PM capable */ -if (!link->clkpm_capable) +/* +* Don't enable Clock PM if the link is not Clock PM capable +* or Clock PM is disabled +*/ +if (!link->clkpm_capable || link->clkpm_disable) enable =0 ;/* Need nothing if the specified equals to current state */ if (link->clkpm_enabled == enable)
@@ -192,7 +196,8 @@ static void pcie_clkpm_cap_init(struct pcie_link_state *link, int blacklist) } link->clkpm_enabled = enabled; link->clkpm_default = enabled; - link->clkpm_capable = (blacklist) ?0 : capable; + link->clkpm_capable = capable; + link->clkpm_disable = blacklist ?1 :0 ; }static bool pcie_retrain_link (struct pcie_link_state *link)
@@ -1097,10 +1102,9 @@ static int __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem) link->aspm_disable |=ASPM_STATE_L1 ;pcie_config_aspm_link (link,policy_to_aspm_state (link)); -if (state &PCIE_LINK_STATE_CLKPM ) { - link->clkpm_capable =0 ; -pcie_set_clkpm (link,0 ); - } +if (state &PCIE_LINK_STATE_CLKPM ) + link->clkpm_disable =1 ; +pcie_set_clkpm (link,policy_to_clkpm_state (link));mutex_unlock (&aspm_lock);if (sem)up_read (&pci_bus_sem);
drivers/pwm/pwm-bcm2835.c +1 -0
@@ -166,6 +166,7 @@ static int bcm2835_pwm_probe(struct platform_device *pdev) pc->chip.dev = &pdev->dev; pc->chip.ops = &bcm2835_pwm_ops; + pc->chip.base =-1 ; pc->chip.npwm =2 ; pc->chip.of_xlate = of_pwm_xlate_with_flags; pc->chip.of_pwm_n_cells =3 ;
drivers/pwm/pwm-rcar.c +7 -3
@@ -228,24 +228,28 @@ static int rcar_pwm_probe(struct platform_device *pdev) rcar_pwm->chip.base =-1 ; rcar_pwm->chip.npwm =1 ; +pm_runtime_enable (&pdev->dev); + ret =pwmchip_add (&rcar_pwm->chip);if (ret <0 ) {dev_err (&pdev->dev,"failed to register PWM chip: %d\n" , ret); +pm_runtime_disable (&pdev->dev);return ret; } -pm_runtime_enable (&pdev->dev); -return 0 ; }static int rcar_pwm_remove (struct platform_device *pdev) {struct rcar_pwm_chip *rcar_pwm =platform_get_drvdata (pdev); +int ret; + + ret =pwmchip_remove (&rcar_pwm->chip);pm_runtime_disable (&pdev->dev); -return pwmchip_remove (&rcar_pwm->chip); +return ret; }static const struct of_device_id rcar_pwm_of_table[] = {
drivers/pwm/pwm-renesas-tpu.c +4 -5
@@ -415,16 +415,17 @@ static int tpu_probe(struct platform_device *pdev) tpu->chip.base =-1 ; tpu->chip.npwm =TPU_CHANNEL_MAX ; +pm_runtime_enable (&pdev->dev); + ret =pwmchip_add (&tpu->chip);if (ret <0 ) {dev_err (&pdev->dev,"failed to register PWM chip\n" ); +pm_runtime_disable (&pdev->dev);return ret; }dev_info (&pdev->dev,"TPU PWM %d registered\n" , tpu->pdev->id); -pm_runtime_enable (&pdev->dev); -return 0 ; }
@@ -434,12 +435,10 @@ static int tpu_remove(struct platform_device *pdev)int ret; ret =pwmchip_remove (&tpu->chip); -if (ret) -return ret;pm_runtime_disable (&pdev->dev); -return 0 ; +return ret; }#ifdef CONFIG_OF
drivers/s390/cio/device.c +9 -4
@@ -849,8 +849,10 @@ static void io_subchannel_register(struct ccw_device *cdev)* Now we know this subchannel will stay, we can throw * our delayed uevent. */ -dev_set_uevent_suppress (&sch->dev,0 ); -kobject_uevent (&sch->dev.kobj,KOBJ_ADD ); +if (dev_get_uevent_suppress (&sch->dev)) { +dev_set_uevent_suppress (&sch->dev,0 ); +kobject_uevent (&sch->dev.kobj,KOBJ_ADD ); + }/* make it known to the system */ ret =ccw_device_add (cdev);if (ret) {
@@ -1058,8 +1060,11 @@ static int io_subchannel_probe(struct subchannel *sch)* Throw the delayed uevent for the subchannel, register * the ccw_device and exit. */ -dev_set_uevent_suppress (&sch->dev,0 ); -kobject_uevent (&sch->dev.kobj,KOBJ_ADD ); +if (dev_get_uevent_suppress (&sch->dev)) { +/* should always be the case for the console */ +dev_set_uevent_suppress (&sch->dev,0 ); +kobject_uevent (&sch->dev.kobj,KOBJ_ADD ); + } cdev =sch_get_cdev (sch); rc =ccw_device_add (cdev);if (rc) {
drivers/s390/cio/vfio_ccw_drv.c +5 -0
@@ -167,6 +167,11 @@ static int vfio_ccw_sch_probe(struct subchannel *sch)if (ret) goto out_disable; +if (dev_get_uevent_suppress (&sch->dev)) { +dev_set_uevent_suppress (&sch->dev,0 ); +kobject_uevent (&sch->dev.kobj,KOBJ_ADD ); + } +VFIO_CCW_MSG_EVENT (4 ,"bound to subchannel %x.%x.%04x\n" , sch->schid.cssid, sch->schid.ssid, sch->schid.sch_no);
drivers/scsi/libfc/fc_rport.c +7 -1
@@ -1208,9 +1208,15 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp, rjt =fc_frame_payload_get (fp,sizeof (*rjt));if (!rjt)FC_RPORT_DBG (rdata,"PRLI bad response\n" ); -else +else {FC_RPORT_DBG (rdata,"PRLI ELS rejected, reason %x expl %x\n" , rjt->er_reason, rjt->er_explan); +if (rjt->er_reason ==ELS_RJT_UNAB && + rjt->er_explan ==ELS_EXPL_PLOGI_REQD ) { +fc_rport_enter_plogi (rdata); + goto out; + } + }fc_rport_error_retry (rdata,FC_EX_ELS_RJT ); }
drivers/scsi/lpfc/lpfc_nvme.c +8 -6
@@ -342,13 +342,15 @@ lpfc_nvme_remoteport_delete(struct nvme_fc_remote_port *remoteport)if (ndlp->upcall_flags &NLP_WAIT_FOR_UNREG ) { ndlp->nrport =NULL ; ndlp->upcall_flags &= ~NLP_WAIT_FOR_UNREG ; - } -spin_unlock_irq (&vport->phba->hbalock); +spin_unlock_irq (&vport->phba->hbalock); -/* Remove original register reference. The host transport -* won't reference this rport/remoteport any further. -*/ -lpfc_nlp_put (ndlp); +/* Remove original register reference. The host transport +* won't reference this rport/remoteport any further. +*/ +lpfc_nlp_put (ndlp); + }else { +spin_unlock_irq (&vport->phba->hbalock); + } rport_err:return ;
drivers/scsi/lpfc/lpfc_sli.c +7 -0
@@ -2481,6 +2481,8 @@ lpfc_sli_def_mbox_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) !pmb->u.mb.mbxStatus) { rpi = pmb->u.mb.un.varWords[0 ]; vpi = pmb->u.mb.un.varRegLogin.vpi; +if (phba->sli_rev ==LPFC_SLI_REV4 ) + vpi -= phba->sli4_hba.max_cfg_param.vpi_base;lpfc_unreg_login (phba, vpi, rpi, pmb); pmb->vport = vport; pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
@@ -4011,6 +4013,11 @@ lpfc_sli_flush_io_rings(struct lpfc_hba *phba)struct lpfc_iocbq *piocb, *next_iocb;spin_lock_irq (&phba->hbalock); +if (phba->hba_flag &HBA_IOQ_FLUSH || + !phba->sli4_hba.hdwq) { +spin_unlock_irq (&phba->hbalock); +return ; + }/* Indicate the I/O queues are flushed */ phba->hba_flag |=HBA_IOQ_FLUSH ;spin_unlock_irq (&phba->hbalock);
drivers/scsi/scsi_transport_iscsi.c +3 -1
@@ -2012,7 +2012,7 @@ static void __iscsi_unbind_session(struct work_struct *work)if (session->target_id ==ISCSI_MAX_TARGET ) {spin_unlock_irqrestore (&session->lock, flags);mutex_unlock (&ihost->mutex); -return ; + goto unbind_session_exit; } target_id = session->target_id;
@@ -2024,6 +2024,8 @@ static void __iscsi_unbind_session(struct work_struct *work)ida_simple_remove (&iscsi_sess_ida, target_id);scsi_remove_target (&session->dev); + +unbind_session_exit:iscsi_session_event (session,ISCSI_KEVENT_UNBIND_SESSION );ISCSI_DBG_TRANS_SESSION (session,"Completed target removal\n" ); }
drivers/scsi/smartpqi/smartpqi.h +8 -2
@@ -907,7 +907,6 @@ struct pqi_scsi_dev {u8 scsi3addr[8 ];__be64 wwid;u8 volume_id[16 ]; -u8 unique_id[16 ]; u8 is_physical_device : 1; u8 is_external_raid_device : 1; u8 is_expander_smp_device : 1;
@@ -1130,8 +1129,9 @@ struct pqi_ctrl_info {struct mutex ofa_mutex;/* serialize ofa */ bool controller_online;bool block_requests; -bool in_shutdown; +bool block_device_reset;bool in_ofa; +bool in_shutdown; u8 inbound_spanning_supported : 1; u8 outbound_spanning_supported : 1; u8 pqi_mode_enabled : 1;
@@ -1173,6 +1173,7 @@ struct pqi_ctrl_info {struct pqi_ofa_memory *pqi_ofa_mem_virt_addr;dma_addr_t pqi_ofa_mem_dma_handle;void **pqi_ofa_chunk_virt_addr; +atomic_t sync_cmds_outstanding; };enum pqi_ctrl_mode {
@@ -1423,6 +1424,11 @@ static inline bool pqi_ctrl_blocked(struct pqi_ctrl_info *ctrl_info)return ctrl_info->block_requests; } +static inline bool pqi_device_reset_blocked (struct pqi_ctrl_info *ctrl_info) +{ +return ctrl_info->block_device_reset; +} +void pqi_sas_smp_handler (struct bsg_job *job,struct Scsi_Host *shost,struct sas_rphy *rphy);
drivers/scsi/smartpqi/smartpqi_init.c +119 -106
357 lines not on this page · raw message
drivers/scsi/smartpqi/smartpqi_sas_transport.c +1 -1
@@ -45,9 +45,9 @@ static void pqi_free_sas_phy(struct pqi_sas_phy *pqi_sas_phy)struct sas_phy *phy = pqi_sas_phy->phy;sas_port_delete_phy (pqi_sas_phy->parent_port->port, phy); -sas_phy_free (phy);if (pqi_sas_phy->added_to_port)list_del (&pqi_sas_phy->phy_list_entry); +sas_phy_delete (phy);kfree (pqi_sas_phy); }
drivers/staging/comedi/comedi_fops.c +3 -1
@@ -2725,8 +2725,10 @@ static int comedi_open(struct inode *inode, struct file *file) } cfp =kzalloc (sizeof (*cfp),GFP_KERNEL ); -if (!cfp) +if (!cfp) { +comedi_dev_put (dev);return -ENOMEM ; + } cfp->dev = dev;
drivers/staging/comedi/drivers/dt2815.c +3 -0
@@ -92,6 +92,7 @@ static int dt2815_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s,int ret;for (i =0 ; i < insn->n; i++) { +/* FIXME: lo bit 0 chooses voltage output or current output */ lo = ((data[i] &0x0f ) <<4 ) | (chan <<1 ) |0x01 ; hi = (data[i] &0xff0 ) >>4 ;
@@ -105,6 +106,8 @@ static int dt2815_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s,if (ret)return ret; +outb (hi, dev->iobase +DT2815_DATA ); + devpriv->ao_readback[chan] = data[i]; }return i;
drivers/staging/gasket/gasket_sysfs.c +1 -2
@@ -228,8 +228,7 @@ int gasket_sysfs_create_entries(struct device *device, }mutex_lock (&mapping->mutex); -for (i =0 ;strcmp (attrs[i].attr.attr.name,GASKET_ARRAY_END_MARKER ); - i++) { +for (i =0 ; attrs[i].attr.attr.name !=NULL ; i++) {if (mapping->attribute_count ==GASKET_SYSFS_MAX_NODES ) {dev_err (device,"Maximum number of sysfs nodes reached for device\n" );
drivers/staging/gasket/gasket_sysfs.h +0 -4
@@ -30,10 +30,6 @@*/ #define GASKET_SYSFS_MAX_NODES 196 -/* End markers for sysfs struct arrays. */ -#define GASKET_ARRAY_END_TOKEN GASKET_RESERVED_ARRAY_END -#define GASKET_ARRAY_END_MARKER __stringify(GASKET_ARRAY_END_TOKEN) -/* * Terminator struct for a gasket_sysfs_attr array. Must be at the end of * all gasket_sysfs_attribute arrays.
drivers/staging/vt6656/int.c +2 -1
@@ -145,7 +145,8 @@ void vnt_int_process_data(struct vnt_private *priv) priv->wake_up_count = priv->hw->conf.listen_interval; - --priv->wake_up_count; +if (priv->wake_up_count) + --priv->wake_up_count;/* Turn on wake up to listen next beacon */ if (priv->wake_up_count ==1 )
drivers/staging/vt6656/key.c +3 -11
@@ -83,9 +83,6 @@ static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr,case VNT_KEY_PAIRWISE : key_mode |= mode; key_inx =4 ; -/* Don't save entry for pairwise key for station mode */ -if (priv->op_mode ==NL80211_IFTYPE_STATION ) -clear_bit (entry, &priv->key_entry_inuse);break ;default :return -EINVAL ;
@@ -109,7 +106,6 @@ static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr,int vnt_set_keys (struct ieee80211_hw *hw,struct ieee80211_sta *sta,struct ieee80211_vif *vif,struct ieee80211_key_conf *key) { -struct ieee80211_bss_conf *conf = &vif->bss_conf;struct vnt_private *priv = hw->priv;u8 *mac_addr =NULL ;u8 key_dec_mode =0 ;
@@ -151,16 +147,12 @@ int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta, key->flags |=IEEE80211_KEY_FLAG_GENERATE_IV ; } -if (key->flags &IEEE80211_KEY_FLAG_PAIRWISE ) { +if (key->flags &IEEE80211_KEY_FLAG_PAIRWISE )vnt_set_keymode (hw, mac_addr, key,VNT_KEY_PAIRWISE , key_dec_mode, true); - }else { -vnt_set_keymode (hw, mac_addr, key,VNT_KEY_DEFAULTKEY , +else +vnt_set_keymode (hw, mac_addr, key,VNT_KEY_GROUP_ADDRESS , key_dec_mode, true); -vnt_set_keymode (hw, (u8 *)conf->bssid, key, -VNT_KEY_GROUP_ADDRESS , key_dec_mode, true); - } -return 0 ; }
drivers/staging/vt6656/main_usb.c +17 -14
@@ -633,8 +633,6 @@ static int vnt_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) priv->op_mode = vif->type; -vnt_set_bss_mode (priv); -/* LED blink on TX */ vnt_mac_set_led (priv,LEDSTS_STS ,LEDSTS_INTER );
@@ -721,7 +719,6 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, priv->basic_rates = conf->basic_rates;vnt_update_top_rates (priv); -vnt_set_bss_mode (priv);dev_dbg (&priv->usb->dev,"basic rates %x\n" , conf->basic_rates); }
@@ -750,11 +747,14 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, priv->short_slot_time = false;vnt_set_short_slot_time (priv); -vnt_update_ifs (priv);vnt_set_vga_gain_offset (priv, priv->bb_vga[0 ]);vnt_update_pre_ed_threshold (priv, false); } +if (changed & (BSS_CHANGED_BASIC_RATES |BSS_CHANGED_ERP_PREAMBLE | +BSS_CHANGED_ERP_SLOT )) +vnt_set_bss_mode (priv); +if (changed &BSS_CHANGED_TXPOWER )vnt_rf_setpower (priv, priv->current_rate, conf->chandef.chan->hw_value);
@@ -778,12 +778,15 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,vnt_mac_reg_bits_on (priv,MAC_REG_TFTCTL ,TFTCTL_TSFCNTREN ); -vnt_adjust_tsf (priv, conf->beacon_rate->hw_value, - conf->sync_tsf, priv->current_tsf); -vnt_mac_set_beacon_interval (priv, conf->beacon_int);vnt_reset_next_tbtt (priv, conf->beacon_int); + +vnt_adjust_tsf (priv, conf->beacon_rate->hw_value, + conf->sync_tsf, priv->current_tsf); + +vnt_update_next_tbtt (priv, + conf->sync_tsf, conf->beacon_int); }else {vnt_clear_current_tsf (priv);
@@ -818,15 +821,11 @@ static void vnt_configure(struct ieee80211_hw *hw, {struct vnt_private *priv = hw->priv;u8 rx_mode =0 ; -int rc; *total_flags &=FIF_ALLMULTI |FIF_OTHER_BSS |FIF_BCN_PRBRESP_PROMISC ; - rc =vnt_control_in (priv,MESSAGE_TYPE_READ ,MAC_REG_RCR , -MESSAGE_REQUEST_MACREG ,sizeof (u8), &rx_mode); - -if (!rc) - rx_mode =RCR_MULTICAST |RCR_BROADCAST ; +vnt_control_in (priv,MESSAGE_TYPE_READ ,MAC_REG_RCR , +MESSAGE_REQUEST_MACREG ,sizeof (u8), &rx_mode);dev_dbg (&priv->usb->dev,"rx mode in = %x\n" , rx_mode);
@@ -867,8 +866,12 @@ static int vnt_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,return -EOPNOTSUPP ;break ;case DISABLE_KEY : -if (test_bit (key->hw_key_idx, &priv->key_entry_inuse)) +if (test_bit (key->hw_key_idx, &priv->key_entry_inuse)) {clear_bit (key->hw_key_idx, &priv->key_entry_inuse); + +vnt_mac_disable_keyentry (priv, key->hw_key_idx); + } +default :break ; }
drivers/tty/hvc/hvc_console.c +14 -9
@@ -302,10 +302,6 @@ int hvc_instantiate(uint32_t vtermno, int index, const struct hv_ops *ops) vtermnos[index] = vtermno; cons_ops[index] = ops; -/* reserve all indices up to and including this index */ -if (last_hvc < index) - last_hvc = index; -/* check if we need to re-register the kernel console */ hvc_check_console (index);
@@ -960,13 +956,22 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data, cons_ops[i] == hp->ops)break ; -/* no matching slot, just use a counter */ -if (i >=MAX_NR_HVC_CONSOLES ) - i = ++last_hvc; +if (i >=MAX_NR_HVC_CONSOLES ) { + +/* find 'empty' slot for console */ +for (i =0 ; i <MAX_NR_HVC_CONSOLES && vtermnos[i] !=-1 ; i++) { + } + +/* no matching slot, just use a counter */ +if (i ==MAX_NR_HVC_CONSOLES ) + i = ++last_hvc +MAX_NR_HVC_CONSOLES ; + } hp->index = i; - cons_ops[i] = ops; - vtermnos[i] = vtermno; +if (i <MAX_NR_HVC_CONSOLES ) { + cons_ops[i] = ops; + vtermnos[i] = vtermno; + }list_add_tail (&(hp->next), &hvc_structs);mutex_unlock (&hvc_structs_mutex);
drivers/tty/rocket.c +14 -11
@@ -632,18 +632,21 @@ init_r_port(int board, int aiop, int chan, struct pci_dev *pci_dev)tty_port_init (&info->port); info->port.ops = &rocket_port_ops; info->flags &= ~ROCKET_MODE_MASK ; -switch (pc104[board][line]) { -case 422 : - info->flags |=ROCKET_MODE_RS422 ; -break ; -case 485 : - info->flags |=ROCKET_MODE_RS485 ; -break ; -case 232 : -default : +if (board <ARRAY_SIZE (pc104) && line <ARRAY_SIZE (pc104_1)) +switch (pc104[board][line]) { +case 422 : + info->flags |=ROCKET_MODE_RS422 ; +break ; +case 485 : + info->flags |=ROCKET_MODE_RS485 ; +break ; +case 232 : +default : + info->flags |=ROCKET_MODE_RS232 ; +break ; + } +else info->flags |=ROCKET_MODE_RS232 ; -break ; - } info->intmask =RXF_TRIG |TXFIFO_MT |SRC_INT |DELTA_CD |DELTA_CTS |DELTA_DSR ;if (sInitChan (ctlp, &info->channel, aiop, chan) ==0 ) {
drivers/tty/serial/owl-uart.c +7 -0
@@ -680,6 +680,12 @@ static int owl_uart_probe(struct platform_device *pdev)return PTR_ERR (owl_port->clk); } + ret =clk_prepare_enable (owl_port->clk); +if (ret) { +dev_err (&pdev->dev,"could not enable clk\n" ); +return ret; + } + owl_port->port.dev = &pdev->dev; owl_port->port.line = pdev->id; owl_port->port.type =PORT_OWL ;
@@ -712,6 +718,7 @@ static int owl_uart_remove(struct platform_device *pdev)uart_remove_one_port (&owl_uart_driver, &owl_port->port); owl_uart_ports[pdev->id] =NULL ; +clk_disable_unprepare (owl_port->clk);return 0 ; }
drivers/tty/serial/sh-sci.c +10 -3
@@ -873,9 +873,16 @@ static void sci_receive_chars(struct uart_port *port)tty_insert_flip_char (tport, c,TTY_NORMAL ); }else {for (i =0 ; i < count; i++) { -char c =serial_port_in (port, SCxRDR); - - status =serial_port_in (port, SCxSR); +char c; + +if (port->type ==PORT_SCIF || + port->type ==PORT_HSCIF ) { + status =serial_port_in (port, SCxSR); + c =serial_port_in (port, SCxRDR); + }else { + c =serial_port_in (port, SCxRDR); + status =serial_port_in (port, SCxSR); + }if (uart_handle_sysrq_char (port, c)) { count--; i--;continue ;
drivers/tty/serial/xilinx_uartps.c +49 -162
45 lines not on this page · raw message
drivers/usb/host/xhci-hub.c +60 -10
70 lines not on this page · raw message
drivers/usb/host/xhci-ring.c +41 -6
47 lines not on this page · raw message
drivers/usb/misc/sisusbvga/sisusb_init.h +7 -7
Lines of this file are not shown. View the raw message.
drivers/usb/storage/uas.c +43 -3
46 lines not on this page · raw message
fs/ext4/extents.c +27 -20
47 lines not on this page · raw message
net/sunrpc/xprtrdma/svc_rdma_backchannel.c +2 -0
Lines of this file are not shown. View the raw message.
security/keys/keyctl.c +43 -15
58 lines not on this page · raw message
sound/soc/intel/atom/sst-atom-controls.c +2 -0
Lines of this file are not shown. View the raw message.
sound/usb/format.c +52 -0
52 lines not on this page · raw message
sound/usb/quirks-table.h +56 -0
56 lines not on this page · raw message
tools/testing/selftests/ftrace/settings new file +1 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/fib_nexthops.sh +23 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/fib_tests.sh +8 -2
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.