Linux 5.10.71
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.71 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.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/mips/net/bpf_jit.c | 57 +++++-- arch/x86/events/intel/core.c | 1 arch/x86/include/asm/kvm_page_track.h | 2 arch/x86/include/asm/kvmclock.h | 14 + arch/x86/kernel/kvmclock.c | 13 - arch/x86/kvm/ioapic.c | 10 - arch/x86/kvm/mmu/page_track.c | 4 arch/x86/kvm/svm/nested.c | 1 arch/x86/kvm/vmx/evmcs.c | 12 + arch/x86/kvm/vmx/vmx.c | 9 - arch/x86/kvm/x86.c | 7 arch/x86/net/bpf_jit_comp.c | 53 ++++-- block/bfq-iosched.c | 16 - drivers/acpi/nfit/core.c | 12 + drivers/cpufreq/cpufreq_governor_attr_set.c | 2 drivers/crypto/ccp/ccp-ops.c | 14 - drivers/gpio/gpio-pca953x.c | 11 - drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 drivers/gpu/drm/i915/i915_request.c | 11 - drivers/hid/hid-betopff.c | 13 + drivers/hid/hid-u2fzero.c | 4 drivers/hid/usbhid/hid-core.c | 13 + drivers/hwmon/mlxreg-fan.c | 12 + drivers/hwmon/pmbus/mp2975.c | 2 drivers/hwmon/tmp421.c | 71 ++++---- drivers/hwmon/w83791d.c | 29 +-- drivers/hwmon/w83792d.c | 28 +-- drivers/hwmon/w83793.c | 26 +-- drivers/infiniband/core/cma.c | 28 ++- drivers/infiniband/hw/hns/hns_roce_alloc.c | 4 drivers/infiniband/hw/hns/hns_roce_cq.c | 35 ++-- drivers/infiniband/hw/hns/hns_roce_hem.c | 18 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 30 +-- drivers/infiniband/hw/hns/hns_roce_mr.c | 10 - drivers/infiniband/hw/hns/hns_roce_pd.c | 2 drivers/infiniband/hw/hns/hns_roce_qp.c | 61 ++++--- drivers/infiniband/hw/hns/hns_roce_srq.c | 37 ++-- drivers/ipack/devices/ipoctal.c | 63 +++++-- drivers/media/rc/ir_toy.c | 21 ++ drivers/net/dsa/mv88e6xxx/chip.c | 17 +- drivers/net/dsa/mv88e6xxx/chip.h | 1 drivers/net/dsa/mv88e6xxx/global1.c | 2 drivers/net/dsa/mv88e6xxx/port.c | 2 drivers/net/ethernet/freescale/enetc/enetc_pf.c | 3 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 5 drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 105 ++++++++----- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 7 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 19 +- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 52 +++--- drivers/net/ethernet/intel/e100.c | 22 +- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 drivers/net/ethernet/micrel/Makefile | 6 drivers/net/ethernet/micrel/ks8851_common.c | 8 drivers/net/phy/bcm7xxx.c | 114 +++++++++++++- drivers/net/usb/hso.c | 6 drivers/net/usb/smsc95xx.c | 3 drivers/net/wireless/mac80211_hwsim.c | 4 drivers/nvme/host/core.c | 4 drivers/nvme/host/nvme.h | 6 drivers/nvme/host/pci.c | 3 drivers/scsi/csiostor/csio_init.c | 1 drivers/scsi/qla2xxx/qla_def.h | 1 drivers/scsi/qla2xxx/qla_isr.c | 2 drivers/scsi/qla2xxx/qla_nvme.c | 40 ++-- drivers/scsi/ufs/ufshcd.c | 3 drivers/tty/vt/vt.c | 21 ++ drivers/usb/cdns3/gadget.c | 14 + fs/binfmt_elf.c | 2 fs/debugfs/inode.c | 2 fs/ext4/dir.c | 6 fs/ext4/extents.c | 19 +- fs/ext4/fast_commit.c | 6 fs/ext4/inode.c | 5 fs/ext4/super.c | 16 + fs/verity/enable.c | 2 fs/verity/open.c | 2 include/linux/bpf.h | 2 include/net/ip_fib.h | 2 include/net/nexthop.h | 2 include/net/sock.h | 2 kernel/bpf/bpf_struct_ops.c | 7 kernel/bpf/core.c | 2 kernel/entry/kvm.c | 4 kernel/rseq.c | 13 + kernel/sched/cpufreq_schedutil.c | 16 + mm/util.c | 4 net/core/sock.c | 32 +++ net/ipv4/fib_semantics.c | 16 + net/ipv4/udp.c | 10 - net/ipv6/route.c | 5 net/ipv6/udp.c | 2 net/mac80211/mesh_ps.c | 3 net/mac80211/tx.c | 12 + net/mac80211/wpa.c | 6 net/mptcp/mptcp_diag.c | 2 net/mptcp/protocol.h | 2 net/mptcp/subflow.c | 2 net/mptcp/syncookies.c | 13 - net/mptcp/token.c | 11 - net/mptcp/token_test.c | 14 - net/netfilter/ipset/ip_set_hash_gen.h | 4 net/netfilter/ipvs/ip_vs_conn.c | 4 net/netfilter/nf_conntrack_core.c | 70 ++++---- net/netfilter/nf_tables_api.c | 2 net/sched/cls_flower.c | 6 net/sctp/input.c | 2 net/unix/af_unix.c | 34 +++- sound/pci/hda/patch_realtek.c | 129 ++++++++++++++++ sound/soc/soc-dapm.c | 13 + tools/testing/selftests/bpf/Makefile | 3 tools/testing/selftests/bpf/test_lwt_ip_encap.sh | 13 - 114 files changed, 1203 insertions(+), 563 deletions(-)
Aaro Koskinen (1):
smsc95xx: fix stalled rx after link change
Andrea Claudi (1):
ipvs: check that ip_vs_conn_tab_bits is between 8 and 20
Andrej Shadura (1):
HID: u2fzero: ignore incomplete packets without data
Andrew Lunn (3):
dsa: mv88e6xxx: 6161: Use chip wide MAX MTU
dsa: mv88e6xxx: Fix MTU definition
dsa: mv88e6xxx: Include tagger overhead when setting MTU for DSA and CPU ports
Andrey Gusakov (1):
gpio: pca953x: do not ignore i2c errors
Anirudh Rayabharam (1):
HID: usbhid: free raw_report buffers in usbhid_stop
Arnd Bergmann (1):
net: ks8851: fix link error
Cameron Berkenpas (1):
ALSA: hda/realtek: Quirks to enable speaker output for Lenovo Legion 7i 15IMHG05, Yoga 7i 14ITL5/15ITL5, and 13s Gen2 laptops.
Charlene Liu (1):
drm/amd/display: Pass PCI deviceid into DC
Chen Jingwen (1):
elf: don't use MAP_FIXED_NOREPLACE for elf interpreter mappings
Chih-Kang Chang (1):
mac80211: Fix ieee80211_amsdu_aggregate frag_tail bug
Christoph Lameter (1):
IB/cma: Do not send IGMP leaves for sendonly Multicast groups
Dan Carpenter (1):
crypto: ccp - fix resource leaks in ccp_run_aes_gcm_cmd()
Dongliang Mu (1):
usb: hso: remove the bailout parameter
Eric Biggers (1):
fs-verity: fix signed integer overflow with i_size near S64_MAX
Eric Dumazet (3):
af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
net: udp: annotate data race around udp_sk(sk)->corkflag
netfilter: conntrack: serialize hash resizes and cleanups
F.A.Sulaiman (1):
HID: betop: fix slab-out-of-bounds Write in betop_probe
Feng Zhou (1):
ixgbe: Fix NULL pointer dereference in ixgbe_xdp_setup
Florian Fainelli (1):
net: phy: bcm7xxx: Fixed indirect MMD operations
Florian Westphal (1):
mptcp: don't return sockets in foreign netns
Greg Kroah-Hartman (1):
Linux 5.10.71
Guangbin Huang (1):
net: hns3: fix always enable rx vlan filter problem after selftest
Haimin Zhang (1):
KVM: x86: Handle SRCU initialization failure during page track init
Hawking Zhang (1):
drm/amdgpu: correct initial cp_hqd_quantum for gfx9
Hou Tao (2):
bpf: Handle return value of BPF_PROG_TYPE_STRUCT_OPS prog
ext4: limit the number of blocks in one ADD_RANGE TLV
Huazhong Tan (1):
net: hns3: fix prototype warning
Igor Matheus Andrade Torrente (1):
tty: Fix out-of-bound vmalloc access in imageblit
Jacob Keller (2):
e100: fix length calculation in e100_get_regs_len
e100: fix buffer overrun in e100_get_regs
James Morse (1):
cpufreq: schedutil: Destroy mutex before kobject_put() frees the memory
Jason Gunthorpe (1):
RDMA/cma: Do not change route.addr.src_addr.ss_family
Jeffle Xu (1):
ext4: fix reserved space counter leakage
Jens Axboe (1):
Revert "block, bfq: honor already-setup queue merges"
Jia He (1):
ACPI: NFIT: Use fallback node id when numa info in NFIT table is incorrect
Jian Shen (3):
net: hns3: do not allow call hns3_nic_net_open repeatedly
net: hns3: fix mixed flag HCLGE_FLAG_MQPRIO_ENABLE and HCLGE_FLAG_DCB_ENABLE
net: hns3: fix show wrong state when add existing uc mac address
Jiri Benc (2):
selftests, bpf: Fix makefile dependencies on libbpf selftests, bpf: test_lwt_ip_encap: Really disable rp_filter
Johan Hovold (5):
ipack: ipoctal: fix stack information leak
ipack: ipoctal: fix tty registration race
ipack: ipoctal: fix tty-registration error handling
ipack: ipoctal: fix missing allocation-failure check
ipack: ipoctal: fix module reference leak
Johannes Berg (3):
mac80211: fix use-after-free in CCMP/GCMP RX
mac80211: mesh: fix potentially unaligned access
mac80211-hwsim: fix late beacon hrtimer handling
Jonathan Hsu (1):
scsi: ufs: Fix illegal offset in UPIU event trace
Jozsef Kadlecsik (1):
netfilter: ipset: Fix oversized kvmalloc() calls
Kan Liang (1):
perf/x86/intel: Update event constraints for ICX
Keith Busch (1):
nvme: add command id quirk for apple controllers
Kevin Hao (1):
cpufreq: schedutil: Use kobject release() method to free sugov_tunables
Linus Torvalds (1):
mm: don't allow oversized kvmalloc() calls
Lorenz Bauer (1):
bpf: Exempt CAP_BPF from checks against bpf_jit_limit
Lorenzo Bianconi (1):
mac80211: limit injected vht mcs/nss in ieee80211_parse_tx_radiotap
Matthew Auld (1):
drm/i915/request: fix early tracepoints
Maxim Levitsky (1):
KVM: x86: nSVM: don't copy virt_ext from vmcb12
Nadezda Lutovinova (3):
hwmon: (w83793) Fix NULL pointer dereference by removing unnecessary structure field
hwmon: (w83792d) Fix NULL pointer dereference by removing unnecessary structure field
hwmon: (w83791d) Fix NULL pointer dereference by removing unnecessary structure field
Nirmoy Das (1):
debugfs: debugfs_create_file_size(): use IS_ERR to check for error
Pablo Neira Ayuso (1):
netfilter: nf_tables: Fix oversized kvmalloc() calls
Paul Fertser (3):
hwmon: (tmp421) handle I2C errors
hwmon: (tmp421) report /PVLD condition as fault
hwmon: (tmp421) fix rounding for negative values
Pawel Laszczak (1):
usb: cdns3: fix race condition before setting doorbell
Peng Li (1):
net: hns3: reconstruct function hns3_self_test
Piotr Krysiuk (1):
bpf, mips: Validate conditional branch offsets
Rahul Lakkireddy (1):
scsi: csiostor: Add module softdep on cxgb4
Ritesh Harjani (1):
ext4: fix loff_t overflow in ext4_max_bitmap_size()
Saurav Kashyap (1):
scsi: qla2xxx: Changes to support kdump kernel for NVMe BFS
Sean Christopherson (1):
KVM: rseq: Update rseq when processing NOTIFY_RESUME on xfer to KVM guest
Sean Young (1):
media: ir_toy: prevent device from hanging during transmit
Shuming Fan (1):
ASoC: dapm: use component prefix when checking widget names
Tao Liu (1):
RDMA/cma: Fix listener leak in rdma_cma_listen_on_all() failure
Theodore Ts'o (1):
ext4: add error checking to ext4_ext_replay_set_iblocks()
Vadim Pasternak (2):
hwmon: (mlxreg-fan) Return non-zero value when fan current state is enforced from sysfs
hwmon: (pmbus/mp2975) Add missed POUT attribute for page 1 mp2975 controller
Vitaly Kuznetsov (2):
KVM: x86: Fix stack-out-of-bounds memory access from ioapic_write_indirect()
KVM: nVMX: Filter out all unsupported controls when eVMCS was activated
Vlad Buslov (1):
net: sched: flower: protect fl_walk() with rcu
Vladimir Oltean (1):
net: enetc: fix the incorrect clearing of IF_MODE bits
Xiao Liang (1):
net: ipv4: Fix rtnexthop len when RTA_FLOW is present
Xin Long (1):
sctp: break out if skb_header_pointer returns NULL in sctp_rcv_ootb
Yixing Liu (1):
RDMA/hns: Fix inaccurate prints
Yonglong Liu (1):
net: hns3: keep MAC pause mode when multiple TCs are enabled
Zelin Deng (1):
x86/kvmclock: Move this_cpu_pvti into kvmclock.h
yangerkun (1):
ext4: fix potential infinite loop in ext4_dx_readdir()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 70 +SUBLEVEL = 71 EXTRAVERSION = NAME = Dare mighty things
arch/mips/net/bpf_jit.c +43 -14
121 lines not on this page · raw message
arch/x86/events/intel/core.c +1 -0
@@ -263,6 +263,7 @@ static struct event_constraint intel_icl_event_constraints[] = {INTEL_EVENT_CONSTRAINT_RANGE (0xa8 ,0xb0 ,0xf ),INTEL_EVENT_CONSTRAINT_RANGE (0xb7 ,0xbd ,0xf ),INTEL_EVENT_CONSTRAINT_RANGE (0xd0 ,0xe6 ,0xf ), +INTEL_EVENT_CONSTRAINT (0xef ,0xf ),INTEL_EVENT_CONSTRAINT_RANGE (0xf0 ,0xf4 ,0xf ), EVENT_CONSTRAINT_END };
arch/x86/include/asm/kvm_page_track.h +1 -1
@@ -46,7 +46,7 @@ struct kvm_page_track_notifier_node { struct kvm_page_track_notifier_node *node); }; -void kvm_page_track_init (struct kvm *kvm); +int kvm_page_track_init (struct kvm *kvm);void kvm_page_track_cleanup (struct kvm *kvm);void kvm_page_track_free_memslot (struct kvm_memory_slot *slot);
arch/x86/include/asm/kvmclock.h +14 -0
@@ -2,6 +2,20 @@#ifndef _ASM_X86_KVM_CLOCK_H#define _ASM_X86_KVM_CLOCK_H +#include <linux/percpu.h> +extern struct clocksource kvm_clock; +DECLARE_PER_CPU(struct pvclock_vsyscall_time_info *, hv_clock_per_cpu); + +static inline struct pvclock_vcpu_time_info *this_cpu_pvti (void ) +{ +return &this_cpu_read (hv_clock_per_cpu)->pvti; +} + +static inline struct pvclock_vsyscall_time_info *this_cpu_hvclock (void ) +{ +return this_cpu_read (hv_clock_per_cpu); +} +#endif /* _ASM_X86_KVM_CLOCK_H */
arch/x86/kernel/kvmclock.c +2 -11
@@ -50,18 +50,9 @@ early_param("no-kvmclock-vsyscall", parse_no_kvmclock_vsyscall);static struct pvclock_vsyscall_time_info hv_clock_boot[HVC_BOOT_ARRAY_SIZE] __bss_decrypted __aligned(PAGE_SIZE); static struct pvclock_wall_clock wall_clock __bss_decrypted; -static DEFINE_PER_CPU(struct pvclock_vsyscall_time_info *, hv_clock_per_cpu);static struct pvclock_vsyscall_time_info *hvclock_mem; - -static inline struct pvclock_vcpu_time_info *this_cpu_pvti (void ) -{ -return &this_cpu_read (hv_clock_per_cpu)->pvti; -} - -static inline struct pvclock_vsyscall_time_info *this_cpu_hvclock (void ) -{ -return this_cpu_read (hv_clock_per_cpu); -} +DEFINE_PER_CPU(struct pvclock_vsyscall_time_info *, hv_clock_per_cpu); +EXPORT_PER_CPU_SYMBOL_GPL (hv_clock_per_cpu);/* * The wallclock is the time of day when we booted. Since then, some time may
arch/x86/kvm/ioapic.c +5 -5
@@ -319,8 +319,8 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val)unsigned index;bool mask_before, mask_after;union kvm_ioapic_redirect_entry *e; -unsigned long vcpu_bitmap;int old_remote_irr, old_delivery_status, old_dest_id, old_dest_mode; +DECLARE_BITMAP (vcpu_bitmap,KVM_MAX_VCPUS );switch (ioapic->ioregsel) {case IOAPIC_REG_VERSION :
@@ -384,9 +384,9 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val) irq.shorthand =APIC_DEST_NOSHORT ; irq.dest_id = e->fields.dest_id; irq.msi_redir_hint = false; -bitmap_zero (&vcpu_bitmap,16 ); +bitmap_zero (vcpu_bitmap,KVM_MAX_VCPUS );kvm_bitmap_or_dest_vcpus (ioapic->kvm, &irq, - &vcpu_bitmap); + vcpu_bitmap);if (old_dest_mode != e->fields.dest_mode || old_dest_id != e->fields.dest_id) {/*
@@ -399,10 +399,10 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val)kvm_lapic_irq_dest_mode ( !!e->fields.dest_mode);kvm_bitmap_or_dest_vcpus (ioapic->kvm, &irq, - &vcpu_bitmap); + vcpu_bitmap); }kvm_make_scan_ioapic_request_mask (ioapic->kvm, - &vcpu_bitmap); + vcpu_bitmap); }else {kvm_make_scan_ioapic_request (ioapic->kvm); }
arch/x86/kvm/mmu/page_track.c +2 -2
@@ -163,13 +163,13 @@ void kvm_page_track_cleanup(struct kvm *kvm)cleanup_srcu_struct (&head->track_srcu); } -void kvm_page_track_init (struct kvm *kvm) +int kvm_page_track_init (struct kvm *kvm) {struct kvm_page_track_notifier_head *head; head = &kvm->arch.track_notifier_head; -init_srcu_struct (&head->track_srcu);INIT_HLIST_HEAD (&head->track_notifier_list); +return init_srcu_struct (&head->track_srcu); }/*
arch/x86/kvm/svm/nested.c +0 -1
@@ -447,7 +447,6 @@ static void nested_prepare_vmcb_control(struct vcpu_svm *svm) (svm->nested.ctl.int_ctl & int_ctl_vmcb12_bits) | (svm->nested.hsave->control.int_ctl & int_ctl_vmcb01_bits); - svm->vmcb->control.virt_ext = svm->nested.ctl.virt_ext; svm->vmcb->control.int_vector = svm->nested.ctl.int_vector; svm->vmcb->control.int_state = svm->nested.ctl.int_state; svm->vmcb->control.event_inj = svm->nested.ctl.event_inj;
arch/x86/kvm/vmx/evmcs.c +9 -3
@@ -352,14 +352,20 @@ void nested_evmcs_filter_control_msr(u32 msr_index, u64 *pdata)switch (msr_index) {case MSR_IA32_VMX_EXIT_CTLS :case MSR_IA32_VMX_TRUE_EXIT_CTLS : - ctl_high &= ~VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL ; + ctl_high &= ~EVMCS1_UNSUPPORTED_VMEXIT_CTRL ;break ;case MSR_IA32_VMX_ENTRY_CTLS :case MSR_IA32_VMX_TRUE_ENTRY_CTLS : - ctl_high &= ~VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL ; + ctl_high &= ~EVMCS1_UNSUPPORTED_VMENTRY_CTRL ;break ;case MSR_IA32_VMX_PROCBASED_CTLS2 : - ctl_high &= ~SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES ; + ctl_high &= ~EVMCS1_UNSUPPORTED_2NDEXEC ; +break ; +case MSR_IA32_VMX_PINBASED_CTLS : + ctl_high &= ~EVMCS1_UNSUPPORTED_PINCTRL ; +break ; +case MSR_IA32_VMX_VMFUNC : + ctl_low &= ~EVMCS1_UNSUPPORTED_VMFUNC ;break ; }
arch/x86/kvm/vmx/vmx.c +5 -4
@@ -1867,10 +1867,11 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) &msr_info->data))return 1 ;/* -* Enlightened VMCS v1 doesn't have certain fields, but buggy -* Hyper-V versions are still trying to use corresponding -* features when they are exposed. Filter out the essential -* minimum. +* Enlightened VMCS v1 doesn't have certain VMCS fields but +* instead of just ignoring the features, different Hyper-V +* versions are either trying to use them and fail or do some +* sanity checking and refuse to boot. Filter all unsupported +* features out. */ if (!msr_info->host_initiated && vmx->nested.enlightened_vmcs_enabled)
arch/x86/kvm/x86.c +6 -1
@@ -10392,9 +10392,15 @@ void kvm_arch_free_vm(struct kvm *kvm)int kvm_arch_init_vm (struct kvm *kvm,unsigned long type) { +int ret; +if (type)return -EINVAL ; + ret =kvm_page_track_init (kvm); +if (ret) +return ret; +INIT_HLIST_HEAD (&kvm->arch.mask_notifier_list);INIT_LIST_HEAD (&kvm->arch.active_mmu_pages);INIT_LIST_HEAD (&kvm->arch.zapped_obsolete_pages);
@@ -10421,7 +10427,6 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)INIT_DELAYED_WORK (&kvm->arch.kvmclock_sync_work, kvmclock_sync_fn);kvm_hv_init_vm (kvm); -kvm_page_track_init (kvm);kvm_mmu_init_vm (kvm);return kvm_x86_ops.vm_init (kvm);
arch/x86/net/bpf_jit_comp.c +40 -13
117 lines not on this page · raw message
block/bfq-iosched.c +3 -13
@@ -2526,15 +2526,6 @@ bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq)* are likely to increase the throughput. */ bfqq->new_bfqq = new_bfqq; -/* -* The above assignment schedules the following redirections: -* each time some I/O for bfqq arrives, the process that -* generated that I/O is disassociated from bfqq and -* associated with new_bfqq. Here we increases new_bfqq->ref -* in advance, adding the number of processes that are -* expected to be associated with new_bfqq as they happen to -* issue I/O. -*/ new_bfqq->ref += process_refs;return new_bfqq; }
@@ -2594,10 +2585,6 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq, {struct bfq_queue *in_service_bfqq, *new_bfqq; -/* if a merge has already been setup, then proceed with that first */ -if (bfqq->new_bfqq) -return bfqq->new_bfqq; -/* * Do not perform queue merging if the device is non * rotational and performs internal queueing. In fact, such a
@@ -2652,6 +2639,9 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq,if (bfq_too_late_for_merging (bfqq))return NULL ; +if (bfqq->new_bfqq) +return bfqq->new_bfqq; +if (!io_struct ||unlikely (bfqq == &bfqd->oom_bfqq))return NULL ;
drivers/acpi/nfit/core.c +12 -0
@@ -3018,6 +3018,18 @@ static int acpi_nfit_register_region(struct acpi_nfit_desc *acpi_desc, ndr_desc->target_node =NUMA_NO_NODE ; } +/* Fallback to address based numa information if node lookup failed */ +if (ndr_desc->numa_node ==NUMA_NO_NODE ) { + ndr_desc->numa_node =memory_add_physaddr_to_nid (spa->address); +dev_info (acpi_desc->dev,"changing numa node from %d to %d for nfit region [%pa-%pa]" , +NUMA_NO_NODE , ndr_desc->numa_node, &res.start, &res.end); + } +if (ndr_desc->target_node ==NUMA_NO_NODE ) { + ndr_desc->target_node =phys_to_target_node (spa->address); +dev_info (acpi_desc->dev,"changing target node from %d to %d for nfit region [%pa-%pa]" , +NUMA_NO_NODE , ndr_desc->numa_node, &res.start, &res.end); + } +/* * Persistence domain bits are hierarchical, if * ACPI_NFIT_CAPABILITY_CACHE_FLUSH is set then
drivers/cpufreq/cpufreq_governor_attr_set.c +1 -1
@@ -74,8 +74,8 @@ unsigned int gov_attr_set_put(struct gov_attr_set *attr_set, struct list_head *lif (count)return count; -kobject_put (&attr_set->kobj);mutex_destroy (&attr_set->update_lock); +kobject_put (&attr_set->kobj);return 0 ; }EXPORT_SYMBOL_GPL (gov_attr_set_put);
drivers/crypto/ccp/ccp-ops.c +8 -6
@@ -778,7 +778,7 @@ ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) in_place ?DMA_BIDIRECTIONAL : DMA_TO_DEVICE);if (ret) - goto e_ctx; + goto e_aad;if (in_place) { dst = src;
@@ -863,7 +863,7 @@ ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) op.u.aes.size =0 ; ret = cmd_q->ccp->vdata->perform->aes (&op);if (ret) - goto e_dst; + goto e_final_wa;if (aes->action ==CCP_AES_ACTION_ENCRYPT ) {/* Put the ciphered tag after the ciphertext. */
@@ -873,17 +873,19 @@ ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) ret =ccp_init_dm_workarea (&tag, cmd_q, authsize,DMA_BIDIRECTIONAL );if (ret) - goto e_tag; + goto e_final_wa; ret =ccp_set_dm_area (&tag,0 , p_tag,0 , authsize); -if (ret) - goto e_tag; +if (ret) { +ccp_dm_free (&tag); + goto e_final_wa; + } ret =crypto_memneq (tag.address, final_wa.address, authsize) ? -EBADMSG :0 ;ccp_dm_free (&tag); } -e_tag: +e_final_wa:ccp_dm_free (&final_wa); e_dst:
drivers/gpio/gpio-pca953x.c +2 -9
@@ -467,15 +467,8 @@ static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off)mutex_lock (&chip->i2c_lock); ret =regmap_read (chip->regmap, inreg, ®_val);mutex_unlock (&chip->i2c_lock); -if (ret <0 ) { -/* -* NOTE: -* diagnostic already emitted; that's all we should -* do unless gpio_*_value_cansleep() calls become different -* from their nonsleeping siblings (and report faults). -*/ -return 0 ; - } +if (ret <0 ) +return ret;return !!(reg_val & bit); }
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -1
@@ -3542,7 +3542,7 @@ static int gfx_v9_0_mqd_init(struct amdgpu_ring *ring)/* set static priority for a queue/ring */ gfx_v9_0_mqd_set_priority (ring, mqd); - mqd->cp_hqd_quantum =RREG32 (mmCP_HQD_QUANTUM); + mqd->cp_hqd_quantum =RREG32_SOC15 (GC ,0 , mmCP_HQD_QUANTUM);/* map_queues packet doesn't need activate the queue, * so only kiq need set this field.
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
@@ -951,6 +951,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) init_data.asic_id.pci_revision_id = adev->pdev->revision; init_data.asic_id.hw_internal_rev = adev->external_rev_id; + init_data.asic_id.chip_id = adev->pdev->device; init_data.asic_id.vram_width = adev->gmc.vram_width;/* TODO: initialize init_data.asic_id.vram_type here!!!! */
drivers/gpu/drm/i915/i915_request.c +2 -9
@@ -776,8 +776,6 @@ static void __i915_request_ctor(void *arg)i915_sw_fence_init (&rq->submit, submit_notify);i915_sw_fence_init (&rq->semaphore, semaphore_notify); -dma_fence_init (&rq->fence, &i915_fence_ops, &rq->lock,0 ,0 ); - rq->capture_list =NULL ;init_llist_head (&rq->execute_cb);
@@ -840,17 +838,12 @@ __i915_request_create(struct intel_context *ce, gfp_t gfp) rq->ring = ce->ring; rq->execution_mask = ce->engine->mask; -kref_init (&rq->fence.refcount); - rq->fence.flags =0 ; - rq->fence.error =0 ; -INIT_LIST_HEAD (&rq->fence.cb_list); - ret =intel_timeline_get_seqno (tl, rq, &seqno);if (ret) goto err_free; - rq->fence.context = tl->fence_context; - rq->fence.seqno = seqno; +dma_fence_init (&rq->fence, &i915_fence_ops, &rq->lock, + tl->fence_context, seqno);RCU_INIT_POINTER (rq->timeline, tl);RCU_INIT_POINTER (rq->hwsp_cacheline, tl->hwsp_cacheline);
drivers/hid/hid-betopff.c +10 -3
@@ -56,15 +56,22 @@ static int betopff_init(struct hid_device *hid) {struct betopff_device *betopff;struct hid_report *report; -struct hid_input *hidinput = - list_first_entry(&hid->inputs, struct hid_input, list); +struct hid_input *hidinput;struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT ].report_list; -struct input_dev *dev = hidinput->input; +struct input_dev *dev;int field_count =0 ;int error;int i, j; +if (list_empty (&hid->inputs)) { +hid_err (hid,"no inputs found\n" ); +return -ENODEV ; + } + + hidinput = list_first_entry(&hid->inputs, struct hid_input, list); + dev = hidinput->input; +if (list_empty (report_list)) {hid_err (hid,"no output reports found\n" );return -ENODEV ;
drivers/hid/hid-u2fzero.c +3 -1
@@ -198,7 +198,9 @@ static int u2fzero_rng_read(struct hwrng *rng, void *data, } ret =u2fzero_recv (dev, &req, &resp); -if (ret <0 ) + +/* ignore errors or packets without data */ + if (ret < offsetof(struct u2f_hid_msg, init.data))return 0 ;/* only take the minimum amount of data it is safe to take */
drivers/hid/usbhid/hid-core.c +12 -1
@@ -503,7 +503,7 @@ static void hid_ctrl(struct urb *urb)if (unplug) { usbhid->ctrltail = usbhid->ctrlhead; - }else { + }else if (usbhid->ctrlhead != usbhid->ctrltail) { usbhid->ctrltail = (usbhid->ctrltail +1 ) & (HID_CONTROL_FIFO_SIZE -1 ); if (usbhid->ctrlhead != usbhid->ctrltail &&
@@ -1221,9 +1221,20 @@ static void usbhid_stop(struct hid_device *hid)mutex_lock (&usbhid->mutex);clear_bit (HID_STARTED , &usbhid->iofl); +spin_lock_irq (&usbhid->lock);/* Sync with error and led handlers */ set_bit (HID_DISCONNECTED , &usbhid->iofl); +while (usbhid->ctrltail != usbhid->ctrlhead) { +if (usbhid->ctrl[usbhid->ctrltail].dir ==USB_DIR_OUT ) { +kfree (usbhid->ctrl[usbhid->ctrltail].raw_report); + usbhid->ctrl[usbhid->ctrltail].raw_report =NULL ; + } + + usbhid->ctrltail = (usbhid->ctrltail +1 ) & + (HID_CONTROL_FIFO_SIZE -1 ); + }spin_unlock_irq (&usbhid->lock); +usb_kill_urb (usbhid->urbin);usb_kill_urb (usbhid->urbout);usb_kill_urb (usbhid->urbctrl);
drivers/hwmon/mlxreg-fan.c +9 -3
@@ -291,8 +291,8 @@ static int mlxreg_fan_set_cur_state(struct thermal_cooling_device *cdev, {struct mlxreg_fan *fan = cdev->devdata;unsigned long cur_state; +int i, config =0 ;u32 regval; -int i;int err;/*
@@ -305,6 +305,12 @@ static int mlxreg_fan_set_cur_state(struct thermal_cooling_device *cdev,* overwritten. */ if (state >=MLXREG_FAN_SPEED_MIN && state <=MLXREG_FAN_SPEED_MAX ) { +/* +* This is configuration change, which is only supported through sysfs. +* For configuration non-zero value is to be returned to avoid thermal +* statistics update. +*/ + config =1 ; state -=MLXREG_FAN_MAX_STATE ;for (i =0 ; i < state; i++) fan->cooling_levels[i] = state;
@@ -319,7 +325,7 @@ static int mlxreg_fan_set_cur_state(struct thermal_cooling_device *cdev, cur_state =MLXREG_FAN_PWM_DUTY2STATE (regval);if (state < cur_state) -return 0 ; +return config; state = cur_state; }
@@ -335,7 +341,7 @@ static int mlxreg_fan_set_cur_state(struct thermal_cooling_device *cdev,dev_err (fan->dev,"Failed to write PWM duty\n" );return err; } -return 0 ; +return config; }static const struct thermal_cooling_device_ops mlxreg_fan_cooling_ops = {
drivers/hwmon/pmbus/mp2975.c +1 -1
@@ -54,7 +54,7 @@#define MP2975_RAIL2_FUNC (PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT | \ PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT | \ - PMBUS_PHASE_VIRTUAL) + PMBUS_HAVE_POUT | PMBUS_PHASE_VIRTUAL)struct mp2975_data {struct pmbus_driver_info info;
drivers/hwmon/tmp421.c +39 -32
119 lines not on this page · raw message
drivers/hwmon/w83791d.c +11 -18
@@ -273,9 +273,6 @@ struct w83791d_data {char valid;/* !=0 if following fields are valid */ unsigned long last_updated;/* In jiffies */ -/* array of 2 pointers to subclients */ -struct i2c_client *lm75[2 ]; -/* volts */ u8 in[NUMBER_OF_VIN ];/* Register value */ u8 in_max[NUMBER_OF_VIN ];/* Register value */
@@ -1257,7 +1254,6 @@ static const struct attribute_group w83791d_group_fanpwm45 = {static int w83791d_detect_subclients (struct i2c_client *client) {struct i2c_adapter *adapter = client->adapter; -struct w83791d_data *data =i2c_get_clientdata (client);int address = client->addr;int i, id;u8 val;
@@ -1280,22 +1276,19 @@ static int w83791d_detect_subclients(struct i2c_client *client) } val =w83791d_read (client,W83791D_REG_I2C_SUBADDR ); -if (!(val &0x08 )) - data->lm75[0 ] =devm_i2c_new_dummy_device (&client->dev, adapter, -0x48 + (val &0x7 )); -if (!(val &0x80 )) { -if (!IS_ERR (data->lm75[0 ]) && - ((val &0x7 ) == ((val >>4 ) &0x7 ))) { -dev_err (&client->dev, -"duplicate addresses 0x%x, " -"use force_subclient\n" , - data->lm75[0 ]->addr); -return -ENODEV ; - } - data->lm75[1 ] =devm_i2c_new_dummy_device (&client->dev, adapter, -0x48 + ((val >>4 ) &0x7 )); + +if (!(val &0x88 ) && (val &0x7 ) == ((val >>4 ) &0x7 )) { +dev_err (&client->dev, +"duplicate addresses 0x%x, use force_subclient\n" ,0x48 + (val &0x7 )); +return -ENODEV ; } +if (!(val &0x08 )) +devm_i2c_new_dummy_device (&client->dev, adapter,0x48 + (val &0x7 )); + +if (!(val &0x80 )) +devm_i2c_new_dummy_device (&client->dev, adapter,0x48 + ((val >>4 ) &0x7 )); +return 0 ; }
drivers/hwmon/w83792d.c +11 -17
@@ -264,9 +264,6 @@ struct w83792d_data {char valid;/* !=0 if following fields are valid */ unsigned long last_updated;/* In jiffies */ -/* array of 2 pointers to subclients */ -struct i2c_client *lm75[2 ]; -u8 in[9 ];/* Register value */ u8 in_max[9 ];/* Register value */ u8 in_min[9 ];/* Register value */
@@ -927,7 +924,6 @@ w83792d_detect_subclients(struct i2c_client *new_client)int address = new_client->addr;u8 val;struct i2c_adapter *adapter = new_client->adapter; -struct w83792d_data *data =i2c_get_clientdata (new_client); id =i2c_adapter_id (adapter);if (force_subclients[0 ] == id && force_subclients[1 ] == address) {
@@ -946,21 +942,19 @@ w83792d_detect_subclients(struct i2c_client *new_client) } val =w83792d_read_value (new_client,W83792D_REG_I2C_SUBADDR ); -if (!(val &0x08 )) - data->lm75[0 ] =devm_i2c_new_dummy_device (&new_client->dev, adapter, -0x48 + (val &0x7 )); -if (!(val &0x80 )) { -if (!IS_ERR (data->lm75[0 ]) && - ((val &0x7 ) == ((val >>4 ) &0x7 ))) { -dev_err (&new_client->dev, -"duplicate addresses 0x%x, use force_subclient\n" , - data->lm75[0 ]->addr); -return -ENODEV ; - } - data->lm75[1 ] =devm_i2c_new_dummy_device (&new_client->dev, adapter, -0x48 + ((val >>4 ) &0x7 )); + +if (!(val &0x88 ) && (val &0x7 ) == ((val >>4 ) &0x7 )) { +dev_err (&new_client->dev, +"duplicate addresses 0x%x, use force_subclient\n" ,0x48 + (val &0x7 )); +return -ENODEV ; } +if (!(val &0x08 )) +devm_i2c_new_dummy_device (&new_client->dev, adapter,0x48 + (val &0x7 )); + +if (!(val &0x80 )) +devm_i2c_new_dummy_device (&new_client->dev, adapter,0x48 + ((val >>4 ) &0x7 )); +return 0 ; }
drivers/hwmon/w83793.c +11 -15
@@ -202,7 +202,6 @@ static inline s8 TEMP_TO_REG(long val, s8 min, s8 max) }struct w83793_data { -struct i2c_client *lm75[2 ];struct device *hwmon_dev;struct mutex update_lock;char valid;/* !=0 if following fields are valid */
@@ -1566,7 +1565,6 @@ w83793_detect_subclients(struct i2c_client *client)int address = client->addr;u8 tmp;struct i2c_adapter *adapter = client->adapter; -struct w83793_data *data =i2c_get_clientdata (client); id =i2c_adapter_id (adapter);if (force_subclients[0 ] == id && force_subclients[1 ] == address) {
@@ -1586,21 +1584,19 @@ w83793_detect_subclients(struct i2c_client *client) } tmp =w83793_read_value (client,W83793_REG_I2C_SUBADDR ); -if (!(tmp &0x08 )) - data->lm75[0 ] =devm_i2c_new_dummy_device (&client->dev, adapter, -0x48 + (tmp &0x7 )); -if (!(tmp &0x80 )) { -if (!IS_ERR (data->lm75[0 ]) - && ((tmp &0x7 ) == ((tmp >>4 ) &0x7 ))) { -dev_err (&client->dev, -"duplicate addresses 0x%x, " -"use force_subclients\n" , data->lm75[0 ]->addr); -return -ENODEV ; - } - data->lm75[1 ] =devm_i2c_new_dummy_device (&client->dev, adapter, -0x48 + ((tmp >>4 ) &0x7 )); + +if (!(tmp &0x88 ) && (tmp &0x7 ) == ((tmp >>4 ) &0x7 )) { +dev_err (&client->dev, +"duplicate addresses 0x%x, use force_subclient\n" ,0x48 + (tmp &0x7 )); +return -ENODEV ; } +if (!(tmp &0x08 )) +devm_i2c_new_dummy_device (&client->dev, adapter,0x48 + (tmp &0x7 )); + +if (!(tmp &0x80 )) +devm_i2c_new_dummy_device (&client->dev, adapter,0x48 + ((tmp >>4 ) &0x7 )); +return 0 ; }
drivers/infiniband/core/cma.c +22 -6
@@ -1750,15 +1750,16 @@ static void cma_cancel_route(struct rdma_id_private *id_priv) } } -static void cma_cancel_listens (struct rdma_id_private *id_priv) +static void _cma_cancel_listens (struct rdma_id_private *id_priv) {struct rdma_id_private *dev_id_priv; +lockdep_assert_held (&lock); +/* * Remove from listen_any_list to prevent added devices from spawning * additional listen requests. */ -mutex_lock (&lock);list_del (&id_priv->list);while (!list_empty (&id_priv->listen_list)) {
@@ -1772,6 +1773,12 @@ static void cma_cancel_listens(struct rdma_id_private *id_priv)rdma_destroy_id (&dev_id_priv->id);mutex_lock (&lock); } +} + +static void cma_cancel_listens (struct rdma_id_private *id_priv) +{ +mutex_lock (&lock); +_cma_cancel_listens (id_priv);mutex_unlock (&lock); }
@@ -1814,6 +1821,8 @@ static void cma_release_port(struct rdma_id_private *id_priv)static void destroy_mc (struct rdma_id_private *id_priv,struct cma_multicast *mc) { +bool send_only = mc->join_state ==BIT (SENDONLY_FULLMEMBER_JOIN ); +if (rdma_cap_ib_mcast (id_priv->id.device, id_priv->id.port_num))ib_sa_free_multicast (mc->sa_mc);
@@ -1830,7 +1839,10 @@ static void destroy_mc(struct rdma_id_private *id_priv,cma_set_mgid (id_priv, (struct sockaddr *)&mc->addr, &mgid); -cma_igmp_send (ndev, &mgid, false); + +if (!send_only) +cma_igmp_send (ndev, &mgid, false); +dev_put (ndev); }
@@ -2577,7 +2589,7 @@ static int cma_listen_on_all(struct rdma_id_private *id_priv)return 0 ; err_listen: -list_del (&id_priv->list); +_cma_cancel_listens (id_priv);mutex_unlock (&lock);if (to_destroy)rdma_destroy_id (&to_destroy->id);
@@ -3732,9 +3744,13 @@ int rdma_listen(struct rdma_cm_id *id, int backlog)int ret; if (!cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND, RDMA_CM_LISTEN)) { + struct sockaddr_in any_in = { + .sin_family = AF_INET, + .sin_addr.s_addr = htonl(INADDR_ANY), + }; + /* For a well behaved ULP state will be RDMA_CM_IDLE */ - id->route.addr.src_addr.ss_family = AF_INET; - ret = rdma_bind_addr(id, cma_src_addr(id_priv)); + ret = rdma_bind_addr(id, (struct sockaddr *)&any_in); if (ret) return ret; if (WARN_ON(!cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND,
drivers/infiniband/hw/hns/hns_roce_alloc.c +2 -2
@@ -240,7 +240,7 @@ int hns_roce_get_kmem_bufs(struct hns_roce_dev *hr_dev, dma_addr_t *bufs, end = start + buf_cnt;if (end > buf->npages) {dev_err (hr_dev->dev, -"Failed to check kmem bufs, end %d + %d total %d!\n" , +"failed to check kmem bufs, end %d + %d total %u!\n" , start, buf_cnt, buf->npages);return -EINVAL ; }
@@ -262,7 +262,7 @@ int hns_roce_get_umem_bufs(struct hns_roce_dev *hr_dev, dma_addr_t *bufs,u64 addr;if (page_shift <HNS_HW_PAGE_SHIFT ) { -dev_err (hr_dev->dev,"Failed to check umem page shift %d!\n" , +dev_err (hr_dev->dev,"failed to check umem page shift %u!\n" , page_shift);return -EINVAL ; }
drivers/infiniband/hw/hns/hns_roce_cq.c +18 -17
@@ -50,29 +50,29 @@ static int alloc_cqc(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq) ret =hns_roce_mtr_find (hr_dev, &hr_cq->mtr,0 , mtts,ARRAY_SIZE (mtts), &dma_handle); -if (ret <1 ) { -ibdev_err (ibdev,"Failed to find CQ mtr\n" ); +if (!ret) { +ibdev_err (ibdev,"failed to find CQ mtr, ret = %d.\n" , ret);return -EINVAL ; } cq_table = &hr_dev->cq_table; ret =hns_roce_bitmap_alloc (&cq_table->bitmap, &hr_cq->cqn);if (ret) { -ibdev_err (ibdev,"Failed to alloc CQ bitmap, err %d\n" , ret); +ibdev_err (ibdev,"failed to alloc CQ bitmap, ret = %d.\n" , ret);return ret; }/* Get CQC memory HEM(Hardware Entry Memory) table */ ret =hns_roce_table_get (hr_dev, &cq_table->table, hr_cq->cqn);if (ret) { -ibdev_err (ibdev,"Failed to get CQ(0x%lx) context, err %d\n" , +ibdev_err (ibdev,"failed to get CQ(0x%lx) context, ret = %d.\n" , hr_cq->cqn, ret); goto err_out; } ret =xa_err (xa_store (&cq_table->array, hr_cq->cqn, hr_cq,GFP_KERNEL ));if (ret) { -ibdev_err (ibdev,"Failed to xa_store CQ\n" ); +ibdev_err (ibdev,"failed to xa_store CQ, ret = %d.\n" , ret); goto err_put; }
@@ -91,7 +91,7 @@ static int alloc_cqc(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq)hns_roce_free_cmd_mailbox (hr_dev, mailbox);if (ret) {ibdev_err (ibdev, -"Failed to send create cmd for CQ(0x%lx), err %d\n" , +"failed to send create cmd for CQ(0x%lx), ret = %d.\n" , hr_cq->cqn, ret); goto err_xa; }
@@ -147,7 +147,7 @@ static int alloc_cq_buf(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq, {struct ib_device *ibdev = &hr_dev->ib_dev;struct hns_roce_buf_attr buf_attr = {}; -int err; +int ret; buf_attr.page_shift = hr_dev->caps.cqe_buf_pg_sz +HNS_HW_PAGE_SHIFT ; buf_attr.region[0 ].size = hr_cq->cq_depth * hr_cq->cqe_size;
@@ -155,13 +155,13 @@ static int alloc_cq_buf(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq, buf_attr.region_count =1 ; buf_attr.fixed_page = true; - err =hns_roce_mtr_create (hr_dev, &hr_cq->mtr, &buf_attr, + ret =hns_roce_mtr_create (hr_dev, &hr_cq->mtr, &buf_attr, hr_dev->caps.cqe_ba_pg_sz +HNS_HW_PAGE_SHIFT , udata, addr); -if (err) -ibdev_err (ibdev,"Failed to alloc CQ mtr, err %d\n" , err); +if (ret) +ibdev_err (ibdev,"failed to alloc CQ mtr, ret = %d.\n" , ret); -return err; +return ret; }static void free_cq_buf (struct hns_roce_dev *hr_dev,struct hns_roce_cq *hr_cq)
@@ -252,13 +252,13 @@ int hns_roce_create_cq(struct ib_cq *ib_cq, const struct ib_cq_init_attr *attr,int ret;if (cq_entries <1 || cq_entries > hr_dev->caps.max_cqes) { -ibdev_err (ibdev,"Failed to check CQ count %d max=%d\n" , +ibdev_err (ibdev,"failed to check CQ count %u, max = %u.\n" , cq_entries, hr_dev->caps.max_cqes);return -EINVAL ; }if (vector >= hr_dev->caps.num_comp_vectors) { -ibdev_err (ibdev,"Failed to check CQ vector=%d max=%d\n" , +ibdev_err (ibdev,"failed to check CQ vector = %d, max = %d.\n" , vector, hr_dev->caps.num_comp_vectors);return -EINVAL ; }
@@ -276,7 +276,7 @@ int hns_roce_create_cq(struct ib_cq *ib_cq, const struct ib_cq_init_attr *attr, ret =ib_copy_from_udata (&ucmd, udata,min (udata->inlen,sizeof (ucmd)));if (ret) { -ibdev_err (ibdev,"Failed to copy CQ udata, err %d\n" , +ibdev_err (ibdev,"failed to copy CQ udata, ret = %d.\n" , ret);return ret; }
@@ -286,19 +286,20 @@ int hns_roce_create_cq(struct ib_cq *ib_cq, const struct ib_cq_init_attr *attr, ret =alloc_cq_buf (hr_dev, hr_cq, udata, ucmd.buf_addr);if (ret) { -ibdev_err (ibdev,"Failed to alloc CQ buf, err %d\n" , ret); +ibdev_err (ibdev,"failed to alloc CQ buf, ret = %d.\n" , ret);return ret; } ret =alloc_cq_db (hr_dev, hr_cq, udata, ucmd.db_addr, &resp);if (ret) { -ibdev_err (ibdev,"Failed to alloc CQ db, err %d\n" , ret); +ibdev_err (ibdev,"failed to alloc CQ db, ret = %d.\n" , ret); goto err_cq_buf; } ret =alloc_cqc (hr_dev, hr_cq);if (ret) { -ibdev_err (ibdev,"Failed to alloc CQ context, err %d\n" , ret); +ibdev_err (ibdev, +"failed to alloc CQ context, ret = %d.\n" , ret); goto err_cq_db; }
drivers/infiniband/hw/hns/hns_roce_hem.c +9 -9
@@ -184,7 +184,7 @@ static int get_hem_table_config(struct hns_roce_dev *hr_dev, mhop->hop_num = hr_dev->caps.srqc_hop_num;break ;default : -dev_err (dev,"Table %d not support multi-hop addressing!\n" , +dev_err (dev,"table %u not support multi-hop addressing!\n" , type);return -EINVAL ; }
@@ -232,8 +232,8 @@ int hns_roce_calc_hem_mhop(struct hns_roce_dev *hr_dev, mhop->l0_idx = table_idx;break ;default : -dev_err (dev,"Table %d not support hop_num = %d!\n" , - table->type, mhop->hop_num); +dev_err (dev,"table %u not support hop_num = %u!\n" , + table->type, mhop->hop_num);return -EINVAL ; }if (mhop->l0_idx >= mhop->ba_l0_num)
@@ -438,13 +438,13 @@ static int calc_hem_config(struct hns_roce_dev *hr_dev, index->buf = l0_idx;break ;default : -ibdev_err (ibdev,"Table %d not support mhop.hop_num = %d!\n" , +ibdev_err (ibdev,"table %u not support mhop.hop_num = %u!\n" , table->type, mhop->hop_num);return -EINVAL ; }if (unlikely (index->buf >= table->num_hem)) { -ibdev_err (ibdev,"Table %d exceed hem limt idx %llu,max %lu!\n" , +ibdev_err (ibdev,"table %u exceed hem limt idx %llu, max %lu!\n" , table->type, index->buf, table->num_hem);return -EINVAL ; }
@@ -714,15 +714,15 @@ static void clear_mhop_hem(struct hns_roce_dev *hr_dev, step_idx = hop_num;if (hr_dev->hw->clear_hem (hr_dev, table, obj, step_idx)) -ibdev_warn (ibdev,"Clear hop%d HEM failed.\n" , hop_num); +ibdev_warn (ibdev,"failed to clear hop%u HEM.\n" , hop_num);if (index->inited &HEM_INDEX_L1 )if (hr_dev->hw->clear_hem (hr_dev, table, obj,1 )) -ibdev_warn (ibdev,"Clear HEM step 1 failed.\n" ); +ibdev_warn (ibdev,"failed to clear HEM step 1.\n" );if (index->inited &HEM_INDEX_L0 )if (hr_dev->hw->clear_hem (hr_dev, table, obj,0 )) -ibdev_warn (ibdev,"Clear HEM step 0 failed.\n" ); +ibdev_warn (ibdev,"failed to clear HEM step 0.\n" ); } }
@@ -1234,7 +1234,7 @@ static int hem_list_alloc_mid_bt(struct hns_roce_dev *hr_dev, }if (offset < r->offset) { -dev_err (hr_dev->dev,"invalid offset %d,min %d!\n" , +dev_err (hr_dev->dev,"invalid offset %d, min %u!\n" , offset, r->offset);return -EINVAL ; }
drivers/infiniband/hw/hns/hns_roce_hw_v2.c +15 -15
@@ -361,7 +361,7 @@ static int check_send_valid(struct hns_roce_dev *hr_dev, }else if (unlikely (hr_qp->state ==IB_QPS_RESET || hr_qp->state ==IB_QPS_INIT || hr_qp->state ==IB_QPS_RTR )) { -ibdev_err (ibdev,"failed to post WQE, QP state %d!\n" , +ibdev_err (ibdev,"failed to post WQE, QP state %hhu!\n" , hr_qp->state);return -EINVAL ; }else if (unlikely (hr_dev->state >=HNS_ROCE_DEVICE_STATE_RST_DOWN )) {
@@ -665,7 +665,7 @@ static int hns_roce_v2_post_send(struct ib_qp *ibqp, wqe_idx = (qp->sq.head + nreq) & (qp->sq.wqe_cnt -1 );if (unlikely (wr->num_sge > qp->sq.max_gs)) { -ibdev_err (ibdev,"num_sge=%d > qp->sq.max_gs=%d\n" , +ibdev_err (ibdev,"num_sge = %d > qp->sq.max_gs = %u.\n" , wr->num_sge, qp->sq.max_gs); ret = -EINVAL ; *bad_wr = wr;
@@ -750,7 +750,7 @@ static int hns_roce_v2_post_recv(struct ib_qp *ibqp, wqe_idx = (hr_qp->rq.head + nreq) & (hr_qp->rq.wqe_cnt -1 );if (unlikely (wr->num_sge > hr_qp->rq.max_gs)) { -ibdev_err (ibdev,"rq:num_sge=%d >= qp->sq.max_gs=%d\n" , +ibdev_err (ibdev,"num_sge = %d >= max_sge = %u.\n" , wr->num_sge, hr_qp->rq.max_gs); ret = -EINVAL ; *bad_wr = wr;
@@ -1920,8 +1920,8 @@ static void calc_pg_sz(int obj_num, int obj_size, int hop_num, int ctx_bt_num, obj_per_chunk = ctx_bt_num * obj_per_chunk_default;break ;default : -pr_err ("Table %d not support hop_num = %d!\n" , hem_type, - hop_num); +pr_err ("table %u not support hop_num = %u!\n" , hem_type, + hop_num);return ; }
@@ -3562,7 +3562,7 @@ static int get_op_for_set_hem(struct hns_roce_dev *hr_dev, u32 type,break ;default :dev_warn (hr_dev->dev, -"Table %d not to be written by mailbox!\n" , type); +"table %u not to be written by mailbox!\n" , type);return -EINVAL ; }
@@ -3681,7 +3681,7 @@ static int hns_roce_v2_clear_hem(struct hns_roce_dev *hr_dev, op =HNS_ROCE_CMD_DESTROY_SRQC_BT0 ;break ;default : -dev_warn (dev,"Table %d not to be destroyed by mailbox!\n" , +dev_warn (dev,"table %u not to be destroyed by mailbox!\n" , table->type);return 0 ; }
@@ -4318,7 +4318,7 @@ static int modify_qp_rtr_to_rts(struct ib_qp *ibqp, ret =config_qp_sq_buf (hr_dev, hr_qp, context, qpc_mask);if (ret) { -ibdev_err (ibdev,"failed to config sq buf, ret %d\n" , ret); +ibdev_err (ibdev,"failed to config sq buf, ret = %d.\n" , ret);return ret; }
@@ -4804,7 +4804,7 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ibqp,/* SW pass context to HW */ ret =hns_roce_v2_qp_modify (hr_dev, context, qpc_mask, hr_qp);if (ret) { -ibdev_err (ibdev,"failed to modify QP, ret = %d\n" , ret); +ibdev_err (ibdev,"failed to modify QP, ret = %d.\n" , ret); goto out; }
@@ -4897,7 +4897,7 @@ static int hns_roce_v2_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr, ret =hns_roce_v2_query_qpc (hr_dev, hr_qp, &context);if (ret) { -ibdev_err (ibdev,"failed to query QPC, ret = %d\n" , ret); +ibdev_err (ibdev,"failed to query QPC, ret = %d.\n" , ret); ret = -EINVAL ; goto out; }
@@ -5018,7 +5018,7 @@ static int hns_roce_v2_destroy_qp_common(struct hns_roce_dev *hr_dev, hr_qp->state, IB_QPS_RESET);if (ret)ibdev_err (ibdev, -"failed to modify QP to RST, ret = %d\n" , +"failed to modify QP to RST, ret = %d.\n" , ret); }
@@ -5057,7 +5057,7 @@ static int hns_roce_v2_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata) ret =hns_roce_v2_destroy_qp_common (hr_dev, hr_qp, udata);if (ret)ibdev_err (&hr_dev->ib_dev, -"failed to destroy QP 0x%06lx, ret = %d\n" , +"failed to destroy QP, QPN = 0x%06lx, ret = %d.\n" , hr_qp->qpn, ret);hns_roce_qp_destroy (hr_dev, hr_qp, udata);
@@ -5080,7 +5080,7 @@ static int hns_roce_v2_qp_flow_control_init(struct hns_roce_dev *hr_dev,hns_roce_cmq_setup_basic_desc (&desc,HNS_ROCE_OPC_RESET_SCCC , false); ret =hns_roce_cmq_send (hr_dev, &desc,1 );if (ret) { -ibdev_err (ibdev,"failed to reset SCC ctx, ret = %d\n" , ret); +ibdev_err (ibdev,"failed to reset SCC ctx, ret = %d.\n" , ret); goto out; }
@@ -5090,7 +5090,7 @@ static int hns_roce_v2_qp_flow_control_init(struct hns_roce_dev *hr_dev, clr->qpn =cpu_to_le32 (hr_qp->qpn); ret =hns_roce_cmq_send (hr_dev, &desc,1 );if (ret) { -ibdev_err (ibdev,"failed to clear SCC ctx, ret = %d\n" , ret); +ibdev_err (ibdev,"failed to clear SCC ctx, ret = %d.\n" , ret); goto out; }
@@ -5339,7 +5339,7 @@ static int hns_roce_v2_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period)hns_roce_free_cmd_mailbox (hr_dev, mailbox);if (ret)ibdev_err (&hr_dev->ib_dev, -"failed to process cmd when modifying CQ, ret = %d\n" , +"failed to process cmd when modifying CQ, ret = %d.\n" , ret);return ret;
drivers/infiniband/hw/hns/hns_roce_mr.c +5 -5
@@ -185,14 +185,14 @@ static int hns_roce_mr_enable(struct hns_roce_dev *hr_dev,else ret = hr_dev->hw->frmr_write_mtpt (hr_dev, mailbox->buf, mr);if (ret) { -dev_err (dev,"Write mtpt fail!\n" ); +dev_err (dev,"failed to write mtpt, ret = %d.\n" , ret); goto err_page; } ret =hns_roce_hw_create_mpt (hr_dev, mailbox, mtpt_idx & (hr_dev->caps.num_mtpts -1 ));if (ret) { -dev_err (dev,"CREATE_MPT failed (%d)\n" , ret); +dev_err (dev,"failed to create mpt, ret = %d.\n" , ret); goto err_page; }
@@ -495,7 +495,7 @@ int hns_roce_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents, ret =ib_sg_to_pages (ibmr, sg, sg_nents, sg_offset, hns_roce_set_page);if (ret <1 ) { -ibdev_err (ibdev,"failed to store sg pages %d %d, cnt = %d.\n" , +ibdev_err (ibdev,"failed to store sg pages %u %u, cnt = %d.\n" , mr->npages, mr->pbl_mtr.hem_cfg.buf_pg_count, ret); goto err_page_list; }
@@ -862,7 +862,7 @@ int hns_roce_mtr_map(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr,if (r->offset + r->count > page_cnt) { err = -EINVAL ;ibdev_err (ibdev, -"Failed to check mtr%d end %d + %d, max %d\n" , +"failed to check mtr%u end %u + %u, max %u.\n" , i, r->offset, r->count, page_cnt);return err; }
@@ -870,7 +870,7 @@ int hns_roce_mtr_map(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, err =mtr_map_region (hr_dev, mtr, &pages[r->offset], r);if (err) {ibdev_err (ibdev, -"Failed to map mtr%d offset %d, err %d\n" , +"failed to map mtr%u offset %u, ret = %d.\n" , i, r->offset, err);return err; }
drivers/infiniband/hw/hns/hns_roce_pd.c +1 -1
@@ -65,7 +65,7 @@ int hns_roce_alloc_pd(struct ib_pd *ibpd, struct ib_udata *udata) ret =hns_roce_pd_alloc (to_hr_dev (ib_dev), &pd->pdn);if (ret) { -ibdev_err (ib_dev,"failed to alloc pd, ret = %d\n" , ret); +ibdev_err (ib_dev,"failed to alloc pd, ret = %d.\n" , ret);return ret; }
drivers/infiniband/hw/hns/hns_roce_qp.c +35 -26
181 lines not on this page · raw message
drivers/infiniband/hw/hns/hns_roce_srq.c +22 -15
@@ -93,7 +93,8 @@ static int alloc_srqc(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq, ret =hns_roce_mtr_find (hr_dev, &srq->buf_mtr,0 , mtts_wqe,ARRAY_SIZE (mtts_wqe), &dma_handle_wqe);if (ret <1 ) { -ibdev_err (ibdev,"Failed to find mtr for SRQ WQE\n" ); +ibdev_err (ibdev,"failed to find mtr for SRQ WQE, ret = %d.\n" , + ret);return -ENOBUFS ; }
@@ -101,32 +102,34 @@ static int alloc_srqc(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq, ret =hns_roce_mtr_find (hr_dev, &srq->idx_que.mtr,0 , mtts_idx,ARRAY_SIZE (mtts_idx), &dma_handle_idx);if (ret <1 ) { -ibdev_err (ibdev,"Failed to find mtr for SRQ idx\n" ); +ibdev_err (ibdev,"failed to find mtr for SRQ idx, ret = %d.\n" , + ret);return -ENOBUFS ; } ret =hns_roce_bitmap_alloc (&srq_table->bitmap, &srq->srqn);if (ret) { -ibdev_err (ibdev,"Failed to alloc SRQ number, err %d\n" , ret); +ibdev_err (ibdev, +"failed to alloc SRQ number, ret = %d.\n" , ret);return -ENOMEM ; } ret =hns_roce_table_get (hr_dev, &srq_table->table, srq->srqn);if (ret) { -ibdev_err (ibdev,"Failed to get SRQC table, err %d\n" , ret); +ibdev_err (ibdev,"failed to get SRQC table, ret = %d.\n" , ret); goto err_out; } ret =xa_err (xa_store (&srq_table->xa, srq->srqn, srq,GFP_KERNEL ));if (ret) { -ibdev_err (ibdev,"Failed to store SRQC, err %d\n" , ret); +ibdev_err (ibdev,"failed to store SRQC, ret = %d.\n" , ret); goto err_put; } mailbox =hns_roce_alloc_cmd_mailbox (hr_dev);if (IS_ERR_OR_NULL (mailbox)) { ret = -ENOMEM ; -ibdev_err (ibdev,"Failed to alloc mailbox for SRQC\n" ); +ibdev_err (ibdev,"failed to alloc mailbox for SRQC.\n" ); goto err_xa; }
@@ -137,7 +140,7 @@ static int alloc_srqc(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq, ret =hns_roce_hw_create_srq (hr_dev, mailbox, srq->srqn);hns_roce_free_cmd_mailbox (hr_dev, mailbox);if (ret) { -ibdev_err (ibdev,"Failed to config SRQC, err %d\n" , ret); +ibdev_err (ibdev,"failed to config SRQC, ret = %d.\n" , ret); goto err_xa; }
@@ -198,7 +201,8 @@ static int alloc_srq_buf(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq, hr_dev->caps.srqwqe_ba_pg_sz + HNS_HW_PAGE_SHIFT, udata, addr);if (err) -ibdev_err (ibdev,"Failed to alloc SRQ buf mtr, err %d\n" , err); +ibdev_err (ibdev, +"failed to alloc SRQ buf mtr, ret = %d.\n" , err);return err; }
@@ -229,14 +233,15 @@ static int alloc_srq_idx(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq, hr_dev->caps.idx_ba_pg_sz +HNS_HW_PAGE_SHIFT , udata, addr);if (err) { -ibdev_err (ibdev,"Failed to alloc SRQ idx mtr, err %d\n" , err); +ibdev_err (ibdev, +"failed to alloc SRQ idx mtr, ret = %d.\n" , err);return err; }if (!udata) { idx_que->bitmap =bitmap_zalloc (srq->wqe_cnt,GFP_KERNEL );if (!idx_que->bitmap) { -ibdev_err (ibdev,"Failed to alloc SRQ idx bitmap\n" ); +ibdev_err (ibdev,"failed to alloc SRQ idx bitmap.\n" ); err = -ENOMEM ; goto err_idx_mtr; }
@@ -303,7 +308,7 @@ int hns_roce_create_srq(struct ib_srq *ib_srq, ret =ib_copy_from_udata (&ucmd, udata,min (udata->inlen,sizeof (ucmd)));if (ret) { -ibdev_err (ibdev,"Failed to copy SRQ udata, err %d\n" , +ibdev_err (ibdev,"failed to copy SRQ udata, ret = %d.\n" , ret);return ret; }
@@ -311,20 +316,21 @@ int hns_roce_create_srq(struct ib_srq *ib_srq, ret =alloc_srq_buf (hr_dev, srq, udata, ucmd.buf_addr);if (ret) { -ibdev_err (ibdev,"Failed to alloc SRQ buffer, err %d\n" , ret); +ibdev_err (ibdev, +"failed to alloc SRQ buffer, ret = %d.\n" , ret);return ret; } ret =alloc_srq_idx (hr_dev, srq, udata, ucmd.que_addr);if (ret) { -ibdev_err (ibdev,"Failed to alloc SRQ idx, err %d\n" , ret); +ibdev_err (ibdev,"failed to alloc SRQ idx, ret = %d.\n" , ret); goto err_buf_alloc; }if (!udata) { ret =alloc_srq_wrid (hr_dev, srq);if (ret) { -ibdev_err (ibdev,"Failed to alloc SRQ wrid, err %d\n" , +ibdev_err (ibdev,"failed to alloc SRQ wrid, ret = %d.\n" , ret); goto err_idx_alloc; }
@@ -336,7 +342,8 @@ int hns_roce_create_srq(struct ib_srq *ib_srq, ret =alloc_srqc (hr_dev, srq,to_hr_pd (ib_srq->pd)->pdn, cqn,0 ,0 );if (ret) { -ibdev_err (ibdev,"Failed to alloc SRQ context, err %d\n" , ret); +ibdev_err (ibdev, +"failed to alloc SRQ context, ret = %d.\n" , ret); goto err_wrid_alloc; }
drivers/ipack/devices/ipoctal.c +47 -16
142 lines not on this page · raw message
drivers/media/rc/ir_toy.c +20 -1
@@ -24,6 +24,7 @@ static const u8 COMMAND_VERSION[] = { 'v' };// End transmit and repeat reset command so we exit sump mode static const u8 COMMAND_RESET [] = {0xff ,0xff ,0 ,0 ,0 ,0 ,0 };static const u8 COMMAND_SMODE_ENTER [] = {'s' }; +static const u8 COMMAND_SMODE_EXIT [] = {0 };static const u8 COMMAND_TXSTART [] = {0x26 ,0x24 ,0x25 ,0x03 };#define REPLY_XMITCOUNT 't'
@@ -309,12 +310,30 @@ static int irtoy_tx(struct rc_dev *rc, uint *txbuf, uint count) buf[i] =cpu_to_be16 (v); } - buf[count] =cpu_to_be16 (0xffff ); + buf[count] =0xffff ; irtoy->tx_buf = buf; irtoy->tx_len = size; irtoy->emitted =0 ; +// There is an issue where if the unit is receiving IR while the +// first TXSTART command is sent, the device might end up hanging +// with its led on. It does not respond to any command when this +// happens. To work around this, re-enter sample mode. + err =irtoy_command (irtoy,COMMAND_SMODE_EXIT , +sizeof (COMMAND_SMODE_EXIT ),STATE_RESET ); +if (err) { +dev_err (irtoy->dev,"exit sample mode: %d\n" , err); +return err; + } + + err =irtoy_command (irtoy,COMMAND_SMODE_ENTER , +sizeof (COMMAND_SMODE_ENTER ),STATE_COMMAND ); +if (err) { +dev_err (irtoy->dev,"enter sample mode: %d\n" , err); +return err; + } + err =irtoy_command (irtoy,COMMAND_TXSTART ,sizeof (COMMAND_TXSTART ),STATE_TX );kfree (buf);
drivers/net/dsa/mv88e6xxx/chip.c +10 -7
@@ -2613,8 +2613,8 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)if (err)return err; -/* Port Control 2: don't force a good FCS, set the maximum frame size to -* 10240 bytes, disable 802.1q tags checking, don't discard tagged or +/* Port Control 2: don't force a good FCS, set the MTU size to +* 10222 bytes, disable 802.1q tags checking, don't discard tagged or * untagged frames on this port, do a destination address lookup on all * received packets as usual, disable ARP mirroring and don't send a * copy of all transmitted/received frames on this port to the CPU.
@@ -2633,7 +2633,7 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)return err;if (chip->info->ops->port_set_jumbo_size) { - err = chip->info->ops->port_set_jumbo_size (chip, port,10240 ); + err = chip->info->ops->port_set_jumbo_size (chip, port,10218 );if (err)return err; }
@@ -2718,10 +2718,10 @@ static int mv88e6xxx_get_max_mtu(struct dsa_switch *ds, int port)struct mv88e6xxx_chip *chip = ds->priv;if (chip->info->ops->port_set_jumbo_size) -return 10240 ; +return 10240 -VLAN_ETH_HLEN -EDSA_HLEN -ETH_FCS_LEN ;else if (chip->info->ops->set_max_frame_size) -return 1632 ; -return 1522 ; +return 1632 -VLAN_ETH_HLEN -EDSA_HLEN -ETH_FCS_LEN ; +return 1522 -VLAN_ETH_HLEN -EDSA_HLEN -ETH_FCS_LEN ; }static int mv88e6xxx_change_mtu (struct dsa_switch *ds,int port,int new_mtu)
@@ -2729,6 +2729,9 @@ static int mv88e6xxx_change_mtu(struct dsa_switch *ds, int port, int new_mtu)struct mv88e6xxx_chip *chip = ds->priv;int ret =0 ; +if (dsa_is_dsa_port (ds, port) ||dsa_is_cpu_port (ds, port)) + new_mtu +=EDSA_HLEN ; +mv88e6xxx_reg_lock (chip);if (chip->info->ops->port_set_jumbo_size) ret = chip->info->ops->port_set_jumbo_size (chip, port, new_mtu);
@@ -3455,7 +3458,6 @@ static const struct mv88e6xxx_ops mv88e6161_ops = { .port_set_frame_mode = mv88e6351_port_set_frame_mode, .port_set_egress_floods = mv88e6352_port_set_egress_floods, .port_set_ether_type = mv88e6351_port_set_ether_type, - .port_set_jumbo_size = mv88e6165_port_set_jumbo_size, .port_egress_rate_limiting = mv88e6097_port_egress_rate_limiting, .port_pause_limit = mv88e6097_port_pause_limit, .port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit,
@@ -3480,6 +3482,7 @@ static const struct mv88e6xxx_ops mv88e6161_ops = { .avb_ops = &mv88e6165_avb_ops, .ptp_ops = &mv88e6165_ptp_ops, .phylink_validate = mv88e6185_phylink_validate, + .set_max_frame_size = mv88e6185_g1_set_max_frame_size, };static const struct mv88e6xxx_ops mv88e6165_ops = {
drivers/net/dsa/mv88e6xxx/chip.h +1 -0
@@ -18,6 +18,7 @@#include <linux/timecounter.h> #include <net/dsa.h> +#define EDSA_HLEN 8#define MV88E6XXX_N_FID 4096/* PVT limits for 4-bit port and 5-bit switch */
drivers/net/dsa/mv88e6xxx/global1.c +2 -0
@@ -232,6 +232,8 @@ int mv88e6185_g1_set_max_frame_size(struct mv88e6xxx_chip *chip, int mtu)u16 val;int err; + mtu +=ETH_HLEN +ETH_FCS_LEN ; + err =mv88e6xxx_g1_read (chip,MV88E6XXX_G1_CTL1 , &val);if (err)return err;
drivers/net/dsa/mv88e6xxx/port.c +2 -0
@@ -1082,6 +1082,8 @@ int mv88e6165_port_set_jumbo_size(struct mv88e6xxx_chip *chip, int port,u16 reg;int err; + size +=VLAN_ETH_HLEN +ETH_FCS_LEN ; + err =mv88e6xxx_port_read (chip, port,MV88E6XXX_PORT_CTL2 , ®);if (err)return err;
drivers/net/ethernet/freescale/enetc/enetc_pf.c +1 -2
@@ -504,8 +504,7 @@ static void enetc_mac_config(struct enetc_hw *hw, phy_interface_t phy_mode)if (phy_interface_mode_is_rgmii (phy_mode)) { val =enetc_port_rd (hw,ENETC_PM0_IF_MODE ); - val &= ~ENETC_PM0_IFM_EN_AUTO ; - val &=ENETC_PM0_IFM_IFMODE_MASK ; + val &= ~(ENETC_PM0_IFM_EN_AUTO |ENETC_PM0_IFM_IFMODE_MASK ); val |=ENETC_PM0_IFM_IFMODE_GMII |ENETC_PM0_IFM_RG ;enetc_port_wr (hw,ENETC_PM0_IF_MODE , val); }
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +5 -0
@@ -444,6 +444,11 @@ static int hns3_nic_net_open(struct net_device *netdev)if (hns3_nic_resetting (netdev))return -EBUSY ; +if (!test_bit (HNS3_NIC_STATE_DOWN , &priv->state)) { +netdev_warn (netdev,"net open repeatedly!\n" ); +return 0 ; + } +netif_carrier_off (netdev); ret =hns3_nic_set_real_num_queue (netdev);
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +67 -38
140 lines not on this page · raw message
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c +5 -2
@@ -248,6 +248,10 @@ static int hclge_ieee_setets(struct hnae3_handle *h, struct ieee_ets *ets) }hclge_tm_schd_info_update (hdev, num_tc); +if (num_tc >1 ) + hdev->flag |=HCLGE_FLAG_DCB_ENABLE ; +else + hdev->flag &= ~HCLGE_FLAG_DCB_ENABLE ; ret =hclge_ieee_ets_to_tm_info (hdev, ets);if (ret)
@@ -313,8 +317,7 @@ static int hclge_ieee_setpfc(struct hnae3_handle *h, struct ieee_pfc *pfc)u8 i, j, pfc_map, *prio_tc;int ret; -if (!(hdev->dcbx_cap &DCB_CAP_DCBX_VER_IEEE ) || - hdev->flag &HCLGE_FLAG_MQPRIO_ENABLE ) +if (!(hdev->dcbx_cap &DCB_CAP_DCBX_VER_IEEE ))return -EINVAL ;if (pfc->pfc_en == hdev->tm_info.pfc_en)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +9 -10
@@ -7581,15 +7581,8 @@ int hclge_add_uc_addr_common(struct hclge_vport *vport, }/* check if we just hit the duplicate */ -if (!ret) { -dev_warn (&hdev->pdev->dev,"VF %u mac(%pM) exists\n" , - vport->vport_id, addr); -return 0 ; - } - -dev_err (&hdev->pdev->dev, -"PF failed to add unicast entry(%pM) in the MAC table\n" , - addr); +if (!ret) +return -EEXIST ;return ret; }
@@ -7743,7 +7736,13 @@ static void hclge_sync_vport_mac_list(struct hclge_vport *vport, }else {set_bit (HCLGE_VPORT_STATE_MAC_TBL_CHANGE , &vport->state); -break ; + +/* If one unicast mac address is existing in hardware, +* we need to try whether other unicast mac addresses +* are new addresses that can be added. +*/ +if (ret != -EEXIST ) +break ; } } }
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c +26 -26
91 lines not on this page · raw message
drivers/net/ethernet/intel/e100.c +15 -7
@@ -2431,11 +2431,15 @@ static void e100_get_drvinfo(struct net_device *netdev, sizeof(info->bus_info)); } -#define E100_PHY_REGS 0x1C +#define E100_PHY_REGS 0x1Dstatic int e100_get_regs_len (struct net_device *netdev) {struct nic *nic =netdev_priv (netdev); -return 1 +E100_PHY_REGS +sizeof (nic->mem->dump_buf); + +/* We know the number of registers, and the size of the dump buffer. +* Calculate the total size in bytes. +*/ +return (1 +E100_PHY_REGS ) *sizeof (u32) +sizeof (nic->mem->dump_buf); } static void e100_get_regs(struct net_device *netdev,
@@ -2449,14 +2453,18 @@ static void e100_get_regs(struct net_device *netdev, buff[0 ] =ioread8 (&nic->csr->scb.cmd_hi) <<24 |ioread8 (&nic->csr->scb.cmd_lo) <<16 |ioread16 (&nic->csr->scb.status); -for (i =E100_PHY_REGS ; i >=0 ; i--) - buff[1 +E100_PHY_REGS - i] = -mdio_read (netdev, nic->mii.phy_id, i); +for (i =0 ; i <E100_PHY_REGS ; i++) +/* Note that we read the registers in reverse order. This +* ordering is the ABI apparently used by ethtool and other +* applications. +*/ + buff[1 + i] =mdio_read (netdev, nic->mii.phy_id, +E100_PHY_REGS -1 - i);memset (nic->mem->dump_buf,0 ,sizeof (nic->mem->dump_buf));e100_exec_cb (nic,NULL , e100_dump);msleep (10 ); -memcpy (&buff[2 +E100_PHY_REGS ], nic->mem->dump_buf, -sizeof (nic->mem->dump_buf)); +memcpy (&buff[1 +E100_PHY_REGS ], nic->mem->dump_buf, +sizeof (nic->mem->dump_buf)); }static void e100_get_wol (struct net_device *netdev,struct ethtool_wolinfo *wol)
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +1 -1
@@ -3216,7 +3216,7 @@ static unsigned int ixgbe_max_channels(struct ixgbe_adapter *adapter) max_combined =ixgbe_max_rss_indices (adapter); } -return max_combined; +return min_t (int, max_combined,num_online_cpus ()); } static void ixgbe_get_channels(struct net_device *dev,
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +6 -2
@@ -10123,6 +10123,7 @@ static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog)struct ixgbe_adapter *adapter =netdev_priv (dev);struct bpf_prog *old_prog;bool need_reset; +int num_queues;if (adapter->flags &IXGBE_FLAG_SRIOV_ENABLED )return -EINVAL ;
@@ -10172,11 +10173,14 @@ static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog)/* Kick start the NAPI context if there is an AF_XDP socket open * on that queue id. This so that receiving will start. */ -if (need_reset && prog) -for (i =0 ; i < adapter->num_rx_queues; i++) +if (need_reset && prog) { + num_queues =min_t (int, adapter->num_rx_queues, + adapter->num_xdp_queues); +for (i =0 ; i < num_queues; i++)if (adapter->xdp_ring[i]->xsk_pool) (void )ixgbe_xsk_wakeup (adapter->netdev, i,XDP_WAKEUP_RX ); + }return 0 ; }
drivers/net/ethernet/micrel/Makefile +2 -4
@@ -4,8 +4,6 @@ # obj-$(CONFIG_KS8842) += ks8842.o -obj-$(CONFIG_KS8851) += ks8851.o -ks8851-objs = ks8851_common.o ks8851_spi.o -obj-$(CONFIG_KS8851_MLL) += ks8851_mll.o -ks8851_mll-objs = ks8851_common.o ks8851_par.o +obj-$(CONFIG_KS8851) += ks8851_common.o ks8851_spi.o +obj-$(CONFIG_KS8851_MLL) += ks8851_common.o ks8851_par.o obj-$(CONFIG_KSZ884X_PCI) += ksz884x.o
drivers/net/ethernet/micrel/ks8851_common.c +8 -0
@@ -1031,6 +1031,7 @@ int ks8851_suspend(struct device *dev)return 0 ; } +EXPORT_SYMBOL_GPL (ks8851_suspend);int ks8851_resume (struct device *dev) {
@@ -1044,6 +1045,7 @@ int ks8851_resume(struct device *dev)return 0 ; } +EXPORT_SYMBOL_GPL (ks8851_resume);#endif int ks8851_probe_common(struct net_device *netdev, struct device *dev,
@@ -1175,6 +1177,7 @@ int ks8851_probe_common(struct net_device *netdev, struct device *dev, err_reg_io:return ret; } +EXPORT_SYMBOL_GPL (ks8851_probe_common);int ks8851_remove_common (struct device *dev) {
@@ -1191,3 +1194,8 @@ int ks8851_remove_common(struct device *dev)return 0 ; } +EXPORT_SYMBOL_GPL (ks8851_remove_common); + +MODULE_DESCRIPTION ("KS8851 Network driver" ); +MODULE_AUTHOR ("Ben Dooks <[email protected]>" ); +MODULE_LICENSE ("GPL" );
drivers/net/phy/bcm7xxx.c +110 -4
154 lines not on this page · raw message
drivers/net/usb/hso.c +3 -3
@@ -2354,7 +2354,7 @@ static int remove_net_device(struct hso_device *hso_dev) }/* Frees our network device */ -static void hso_free_net_device (struct hso_device *hso_dev,bool bailout) +static void hso_free_net_device (struct hso_device *hso_dev) {int i;struct hso_net *hso_net =dev2net (hso_dev);
@@ -2377,7 +2377,7 @@ static void hso_free_net_device(struct hso_device *hso_dev, bool bailout)kfree (hso_net->mux_bulk_tx_buf); hso_net->mux_bulk_tx_buf =NULL ; -if (hso_net->net && !bailout) +if (hso_net->net)free_netdev (hso_net->net);kfree (hso_dev);
@@ -3137,7 +3137,7 @@ static void hso_free_interface(struct usb_interface *interface)rfkill_unregister (rfk);rfkill_destroy (rfk); } -hso_free_net_device (network_table[i], false); +hso_free_net_device (network_table[i]); } } }
drivers/net/usb/smsc95xx.c +3 -0
@@ -1178,7 +1178,10 @@ static void smsc95xx_unbind(struct usbnet *dev, struct usb_interface *intf)static void smsc95xx_handle_link_change (struct net_device *net) { +struct usbnet *dev =netdev_priv (net); +phy_print_status (net->phydev); +usbnet_defer_kevent (dev,EVENT_LINK_CHANGE ); }static int smsc95xx_start_phy (struct usbnet *dev)
drivers/net/wireless/mac80211_hwsim.c +2 -2
@@ -1795,8 +1795,8 @@ mac80211_hwsim_beacon(struct hrtimer *timer) bcn_int -= data->bcn_delta; data->bcn_delta =0 ; } -hrtimer_forward (&data->beacon_timer,hrtimer_get_expires (timer), -ns_to_ktime (bcn_int *NSEC_PER_USEC )); +hrtimer_forward_now (&data->beacon_timer, +ns_to_ktime (bcn_int *NSEC_PER_USEC ));return HRTIMER_RESTART ; }
drivers/nvme/host/core.c +3 -1
@@ -831,6 +831,7 @@ EXPORT_SYMBOL_GPL(nvme_cleanup_cmd);blk_status_t nvme_setup_cmd (struct nvme_ns *ns,struct request *req,struct nvme_command *cmd) { +struct nvme_ctrl *ctrl =nvme_req (req)->ctrl;blk_status_t ret =BLK_STS_OK ;nvme_clear_nvme_request (req);
@@ -877,7 +878,8 @@ blk_status_t nvme_setup_cmd(struct nvme_ns *ns, struct request *req,return BLK_STS_IOERR ; } -nvme_req (req)->genctr++; +if (!(ctrl->quirks &NVME_QUIRK_SKIP_CID_GEN )) +nvme_req (req)->genctr++; cmd->common.command_id =nvme_cid (req);trace_nvme_setup_cmd (req, cmd);return ret;
drivers/nvme/host/nvme.h +6 -0
@@ -144,6 +144,12 @@ enum nvme_quirks {* NVMe 1.3 compliance. */ NVME_QUIRK_NO_NS_DESC_LIST = (1 <<15 ), + +/* +* The controller requires the command_id value be be limited, so skip +* encoding the generation sequence number. +*/ + NVME_QUIRK_SKIP_CID_GEN = (1 << 17), };/*
drivers/nvme/host/pci.c +2 -1
@@ -3259,7 +3259,8 @@ static const struct pci_device_id nvme_id_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2005), .driver_data =NVME_QUIRK_SINGLE_VECTOR |NVME_QUIRK_128_BYTES_SQES | - NVME_QUIRK_SHARED_TAGS }, +NVME_QUIRK_SHARED_TAGS | + NVME_QUIRK_SKIP_CID_GEN }, { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) }, { 0, }
drivers/scsi/csiostor/csio_init.c +1 -0
@@ -1254,3 +1254,4 @@ MODULE_DEVICE_TABLE(pci, csio_pci_tbl);MODULE_VERSION (CSIO_DRV_VERSION );MODULE_FIRMWARE (FW_FNAME_T5 );MODULE_FIRMWARE (FW_FNAME_T6 ); +MODULE_SOFTDEP ("pre: cxgb4" );
drivers/scsi/qla2xxx/qla_def.h +0 -1
@@ -3913,7 +3913,6 @@ struct qla_hw_data { uint32_t scm_supported_f:1;/* Enabled in Driver */ uint32_t scm_enabled:1; - uint32_t max_req_queue_warned:1; uint32_t plogi_template_valid:1; } flags;
drivers/scsi/qla2xxx/qla_isr.c +2 -0
@@ -4158,6 +4158,8 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp)ql_dbg (ql_dbg_init, vha,0x0125 ,"INTa mode: Enabled.\n" ); ha->flags.mr_intr_valid =1 ; +/* Set max_qpair to 0, as MSI-X and MSI in not enabled */ + ha->max_qpairs =0 ; } clear_risc_ints:
drivers/scsi/qla2xxx/qla_nvme.c +18 -22
@@ -109,19 +109,24 @@ static int qla_nvme_alloc_queue(struct nvme_fc_local_port *lport,return -EINVAL ; } -if (ha->queue_pair_map[qidx]) { - *handle = ha->queue_pair_map[qidx]; -ql_log (ql_log_info, vha,0x2121 , -"Returning existing qpair of %p for idx=%x\n" , - *handle, qidx); -return 0 ; - } +/* Use base qpair if max_qpairs is 0 */ +if (!ha->max_qpairs) { + qpair = ha->base_qpair; + }else { +if (ha->queue_pair_map[qidx]) { + *handle = ha->queue_pair_map[qidx]; +ql_log (ql_log_info, vha,0x2121 , +"Returning existing qpair of %p for idx=%x\n" , + *handle, qidx); +return 0 ; + } - qpair =qla2xxx_create_qpair (vha,5 , vha->vp_idx, true); -if (qpair ==NULL ) { -ql_log (ql_log_warn, vha,0x2122 , -"Failed to allocate qpair\n" ); -return -EINVAL ; + qpair =qla2xxx_create_qpair (vha,5 , vha->vp_idx, true); +if (!qpair) { +ql_log (ql_log_warn, vha,0x2122 , +"Failed to allocate qpair\n" ); +return -EINVAL ; + } } *handle = qpair;
@@ -715,18 +720,9 @@ int qla_nvme_register_hba(struct scsi_qla_host *vha)WARN_ON (vha->nvme_local_port); -if (ha->max_req_queues <3 ) { -if (!ha->flags.max_req_queue_warned) -ql_log (ql_log_info, vha,0x2120 , -"%s: Disabling FC-NVME due to lack of free queue pairs (%d).\n" , - __func__, ha->max_req_queues); - ha->flags.max_req_queue_warned =1 ; -return ret; - } - qla_nvme_fc_transport.max_hw_queues =min ((uint8_t )(qla_nvme_fc_transport.max_hw_queues), - (uint8_t )(ha->max_req_queues -2 )); + (uint8_t )(ha->max_qpairs ? ha->max_qpairs :1 )); pinfo.node_name =wwn_to_u64 (vha->node_name); pinfo.port_name =wwn_to_u64 (vha->port_name);
drivers/scsi/ufs/ufshcd.c +1 -2
@@ -318,8 +318,7 @@ static void ufshcd_add_query_upiu_trace(struct ufs_hba *hba, unsigned int tag,static void ufshcd_add_tm_upiu_trace (struct ufs_hba *hba,unsigned int tag,const char *str) { -int off = (int )tag - hba->nutrs; -struct utp_task_req_desc *descp = &hba->utmrdl_base_addr[off]; +struct utp_task_req_desc *descp = &hba->utmrdl_base_addr[tag];trace_ufshcd_upiu (dev_name (hba->dev), str, &descp->req_header, &descp->input_param1);
drivers/tty/vt/vt.c +19 -2
@@ -1220,8 +1220,25 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc, new_row_size = new_cols <<1 ; new_screen_size = new_row_size * new_rows; -if (new_cols == vc->vc_cols && new_rows == vc->vc_rows) -return 0 ; +if (new_cols == vc->vc_cols && new_rows == vc->vc_rows) { +/* +* This function is being called here to cover the case +* where the userspace calls the FBIOPUT_VSCREENINFO twice, +* passing the same fb_var_screeninfo containing the fields +* yres/xres equal to a number non-multiple of vc_font.height +* and yres_virtual/xres_virtual equal to number lesser than the +* vc_font.height and yres/xres. +* In the second call, the struct fb_var_screeninfo isn't +* being modified by the underlying driver because of the +* if above, and this causes the fbcon_display->vrows to become +* negative and it eventually leads to out-of-bound +* access by the imageblit function. +* To give the correct values to the struct and to not have +* to deal with possible errors from the code below, we call +* the resize_screen here as well. +*/ +return resize_screen (vc, new_cols, new_rows, user); + }if (new_screen_size >KMALLOC_MAX_SIZE || !new_screen_size)return -EINVAL ;
drivers/usb/cdns3/gadget.c +14 -0
@@ -1101,6 +1101,19 @@ static int cdns3_ep_run_stream_transfer(struct cdns3_endpoint *priv_ep,return 0 ; } +static void cdns3_rearm_drdy_if_needed (struct cdns3_endpoint *priv_ep) +{ +struct cdns3_device *priv_dev = priv_ep->cdns3_dev; + +if (priv_dev->dev_ver <DEV_VER_V3 ) +return ; + +if (readl (&priv_dev->regs->ep_sts) &EP_STS_TRBERR ) { +writel (EP_STS_TRBERR , &priv_dev->regs->ep_sts); +writel (EP_CMD_DRDY , &priv_dev->regs->ep_cmd); + } +} +/** * cdns3_ep_run_transfer - start transfer on no-default endpoint hardware * @priv_ep: endpoint object
@@ -1352,6 +1365,7 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep,/*clearing TRBERR and EP_STS_DESCMIS before seting DRDY*/ writel (EP_STS_TRBERR |EP_STS_DESCMIS , &priv_dev->regs->ep_sts);writel (EP_CMD_DRDY , &priv_dev->regs->ep_cmd); +cdns3_rearm_drdy_if_needed (priv_ep);trace_cdns3_doorbell_epx (priv_ep->name,readl (&priv_dev->regs->ep_traddr)); }
fs/binfmt_elf.c +1 -1
@@ -627,7 +627,7 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, vaddr = eppnt->p_vaddr;if (interp_elf_ex->e_type ==ET_EXEC || load_addr_set) - elf_type |=MAP_FIXED_NOREPLACE ; + elf_type |=MAP_FIXED ;else if (no_base && interp_elf_ex->e_type ==ET_DYN ) load_addr = -vaddr;
fs/debugfs/inode.c +1 -1
@@ -524,7 +524,7 @@ void debugfs_create_file_size(const char *name, umode_t mode, {struct dentry *de =debugfs_create_file (name, mode, parent, data, fops); -if (de) +if (!IS_ERR (de))d_inode (de)->i_size = file_size; }EXPORT_SYMBOL_GPL (debugfs_create_file_size);
fs/ext4/dir.c +3 -3
@@ -534,7 +534,7 @@ static int ext4_dx_readdir(struct file *file, struct dir_context *ctx)struct dir_private_info *info = file->private_data;struct inode *inode =file_inode (file);struct fname *fname; -int ret; +int ret =0 ;if (!info) { info =ext4_htree_create_dir_info (file, ctx->pos);
@@ -582,7 +582,7 @@ static int ext4_dx_readdir(struct file *file, struct dir_context *ctx) info->curr_minor_hash, &info->next_hash);if (ret <0 ) -return ret; + goto finished;if (ret ==0 ) { ctx->pos =ext4_get_htree_eof (file);break ;
@@ -613,7 +613,7 @@ static int ext4_dx_readdir(struct file *file, struct dir_context *ctx) } finished: info->last_pos = ctx->pos; -return 0 ; +return ret <0 ? ret :0 ; }static int ext4_dir_open (struct inode * inode,struct file * filp)
fs/ext4/extents.c +14 -5
@@ -5907,7 +5907,7 @@ void ext4_ext_replay_shrink_inode(struct inode *inode, ext4_lblk_t end) }/* Check if *cur is a hole and if it is, skip it */ -static void skip_hole (struct inode *inode,ext4_lblk_t *cur) +static int skip_hole (struct inode *inode,ext4_lblk_t *cur) {int ret;struct ext4_map_blocks map;
@@ -5916,9 +5916,12 @@ static void skip_hole(struct inode *inode, ext4_lblk_t *cur) map.m_len = ((inode->i_size) >> inode->i_sb->s_blocksize_bits) - *cur; ret =ext4_map_blocks (NULL , inode, &map,0 ); +if (ret <0 ) +return ret;if (ret !=0 ) -return ; +return 0 ; *cur = *cur + map.m_len; +return 0 ; }/* Count number of blocks used by this inode and update i_blocks */
@@ -5967,7 +5970,9 @@ int ext4_ext_replay_set_iblocks(struct inode *inode)* iblocks by total number of differences found. */ cur =0 ; -skip_hole (inode, &cur); + ret =skip_hole (inode, &cur); +if (ret <0 ) + goto out; path =ext4_find_extent (inode, cur,NULL ,0 );if (IS_ERR (path)) goto out;
@@ -5986,8 +5991,12 @@ int ext4_ext_replay_set_iblocks(struct inode *inode) } cur =max (cur +1 ,le32_to_cpu (ex->ee_block) +ext4_ext_get_actual_len (ex)); -skip_hole (inode, &cur); - + ret =skip_hole (inode, &cur); +if (ret <0 ) { +ext4_ext_drop_refs (path); +kfree (path); +break ; + } path2 =ext4_find_extent (inode, cur,NULL ,0 );if (IS_ERR (path2)) {ext4_ext_drop_refs (path);
fs/ext4/fast_commit.c +6 -0
@@ -832,6 +832,12 @@ static int ext4_fc_write_inode_data(struct inode *inode, u32 *crc) sizeof(lrange), (u8 *)&lrange, crc))return -ENOSPC ; }else { +unsigned int max = (map.m_flags &EXT4_MAP_UNWRITTEN ) ? +EXT_UNWRITTEN_MAX_LEN :EXT_INIT_MAX_LEN ; + +/* Limit the number of blocks in one extent */ + map.m_len =min (max, map.m_len); + fc_ext.fc_ino =cpu_to_le32 (inode->i_ino); ex = (struct ext4_extent *)&fc_ext.fc_ex; ex->ee_block =cpu_to_le32 (map.m_lblk);
fs/ext4/inode.c +5 -0
@@ -1641,6 +1641,7 @@ static int ext4_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk)struct ext4_sb_info *sbi =EXT4_SB (inode->i_sb);int ret;bool allocated = false; +bool reserved = false;/* * If the cluster containing lblk is shared with a delayed,
@@ -1657,6 +1658,7 @@ static int ext4_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk) ret =ext4_da_reserve_space (inode);if (ret !=0 )/* ENOSPC */ goto errout; + reserved = true; } else { /* bigalloc */ if (!ext4_es_scan_clu(inode, &ext4_es_is_delonly, lblk)) { if (!ext4_es_scan_clu(inode,
@@ -1669,6 +1671,7 @@ static int ext4_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk) ret =ext4_da_reserve_space (inode);if (ret !=0 )/* ENOSPC */ goto errout; + reserved = true; }else { allocated = true; }
@@ -1679,6 +1682,8 @@ static int ext4_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk) } ret =ext4_es_insert_delayed_block (inode, lblk, allocated); +if (ret && reserved) +ext4_da_release_space (inode,1 ); errout:return ret;
fs/ext4/super.c +11 -5
@@ -1356,6 +1356,12 @@ static void ext4_destroy_inode(struct inode *inode) true);dump_stack (); } + +if (EXT4_I (inode)->i_reserved_data_blocks) +ext4_msg (inode->i_sb,KERN_ERR , +"Inode %lu (%p): i_reserved_data_blocks (%u) not cleared!" , + inode->i_ino,EXT4_I (inode), +EXT4_I (inode)->i_reserved_data_blocks); }static void init_once (void *foo)
@@ -3194,17 +3200,17 @@ static loff_t ext4_max_size(int blkbits, int has_huge_files)*/ static loff_t ext4_max_bitmap_size (int bits,int has_huge_files) { -loff_t res =EXT4_NDIR_BLOCKS ; +unsigned long long upper_limit, res =EXT4_NDIR_BLOCKS ;int meta_blocks; -loff_t upper_limit; -/* This is calculated to be the largest file size for a dense, block + +/* +* This is calculated to be the largest file size for a dense, block * mapped file such that the file's total number of 512-byte sectors, * including data and all indirect blocks, does not exceed (2^48 - 1). * * __u32 i_blocks_lo and _u16 i_blocks_high represent the total * number of 512-byte sectors of the file. */ -if (!has_huge_files) {/* * !has_huge_files or implies that the inode i_block field
@@ -3247,7 +3253,7 @@ static loff_t ext4_max_bitmap_size(int bits, int has_huge_files)if (res >MAX_LFS_FILESIZE ) res =MAX_LFS_FILESIZE ; -return res; +return (loff_t )res; } static ext4_fsblk_t descriptor_loc(struct super_block *sb,
fs/verity/enable.c +1 -1
@@ -177,7 +177,7 @@ static int build_merkle_tree(struct file *filp,* (level 0) and ascending to the root node (level 'num_levels - 1'). * Then at the end (level 'num_levels'), calculate the root hash. */ - blocks = (inode->i_size + params->block_size -1 ) >> + blocks = ((u64 )inode->i_size + params->block_size -1 ) >> params->log_blocksize;for (level =0 ; level <= params->num_levels; level++) { err = build_merkle_tree_level(filp, level, blocks, params,
fs/verity/open.c +1 -1
@@ -89,7 +89,7 @@ int fsverity_init_merkle_tree_params(struct merkle_tree_params *params,*/ /* Compute number of levels and the number of blocks in each level */ - blocks = (inode->i_size + params->block_size -1 ) >> log_blocksize; + blocks = ((u64 )inode->i_size + params->block_size -1 ) >> log_blocksize;pr_debug ("Data is %lld bytes (%llu blocks)\n" , inode->i_size, blocks);while (blocks >1 ) {if (params->num_levels >=FS_VERITY_MAX_LEVELS ) {
include/linux/bpf.h +2 -0
@@ -526,6 +526,8 @@ struct btf_func_model {* programs only. Should not be used with normal calls and indirect calls. */ #define BPF_TRAMP_F_SKIP_FRAME BIT(2) +/* Return the return value of fentry prog. Only used by bpf_struct_ops. */ +#define BPF_TRAMP_F_RET_FENTRY_RET BIT(4)/* Each call __bpf_prog_enter + call bpf_func + call __bpf_prog_exit is ~50 * bytes on x86. Pick a number to fit into BPF_IMAGE_SIZE / 2
include/net/ip_fib.h +1 -1
@@ -553,5 +553,5 @@ int ip_valid_fib_dump_req(struct net *net, const struct nlmsghdr *nlh,int fib_nexthop_info (struct sk_buff *skb,const struct fib_nh_common *nh,u8 rt_family,unsigned char *flags,bool skip_oif);int fib_add_nexthop (struct sk_buff *skb,const struct fib_nh_common *nh, -int nh_weight,u8 rt_family); +int nh_weight,u8 rt_family,u32 nh_tclassid);#endif /* _NET_FIB_H */
include/net/nexthop.h +1 -1
@@ -211,7 +211,7 @@ int nexthop_mpath_fill_node(struct sk_buff *skb, struct nexthop *nh,struct fib_nh_common *nhc = &nhi->fib_nhc;int weight = nhg->nh_entries[i].weight; -if (fib_add_nexthop (skb, nhc, weight, rt_family) <0 ) +if (fib_add_nexthop (skb, nhc, weight, rt_family,0 ) <0 )return -EMSGSIZE ; }
include/net/sock.h +2 -0
@@ -479,8 +479,10 @@ struct sock {u32 sk_ack_backlog;u32 sk_max_ack_backlog;kuid_t sk_uid; +spinlock_t sk_peer_lock;struct pid *sk_peer_pid;const struct cred *sk_peer_cred; +long sk_rcvtimeo;ktime_t sk_stamp;#if BITS_PER_LONG ==32
kernel/bpf/bpf_struct_ops.c +5 -2
@@ -367,6 +367,7 @@ static int bpf_struct_ops_map_update_elem(struct bpf_map *map, void *key,const struct btf_type *mtype, *ptype;struct bpf_prog *prog;u32 moff; +u32 flags; moff =btf_member_bit_offset (t, member) /8 ; ptype =btf_type_resolve_ptr (btf_vmlinux, member->type,NULL );
@@ -430,10 +431,12 @@ static int bpf_struct_ops_map_update_elem(struct bpf_map *map, void *key, tprogs[BPF_TRAMP_FENTRY ].progs[0 ] = prog; tprogs[BPF_TRAMP_FENTRY ].nr_progs =1 ; + flags = st_ops->func_models[i].ret_size >0 ? +BPF_TRAMP_F_RET_FENTRY_RET :0 ; err =arch_prepare_bpf_trampoline (NULL , image, st_map->image +PAGE_SIZE , - &st_ops->func_models[i],0 , - tprogs,NULL ); + &st_ops->func_models[i], + flags, tprogs,NULL );if (err <0 ) goto reset_unlock;
kernel/bpf/core.c +1 -1
@@ -831,7 +831,7 @@ int bpf_jit_charge_modmem(u32 pages) {if (atomic_long_add_return (pages, &bpf_jit_current) > (bpf_jit_limit >>PAGE_SHIFT )) { -if (!capable (CAP_SYS_ADMIN )) { +if (!bpf_capable ()) {atomic_long_sub (pages, &bpf_jit_current);return -EPERM ; }
kernel/entry/kvm.c +3 -1
@@ -16,8 +16,10 @@ static int xfer_to_guest_mode_work(struct kvm_vcpu *vcpu, unsigned long ti_work)if (ti_work & _TIF_NEED_RESCHED)schedule (); -if (ti_work & _TIF_NOTIFY_RESUME) +if (ti_work & _TIF_NOTIFY_RESUME) {tracehook_notify_resume (NULL ); +rseq_handle_notify_resume (NULL ,NULL ); + } ret =arch_xfer_to_guest_mode_handle_work (vcpu, ti_work);if (ret)
kernel/rseq.c +10 -3
@@ -268,9 +268,16 @@ void __rseq_handle_notify_resume(struct ksignal *ksig, struct pt_regs *regs)return ;if (unlikely (!access_ok (t->rseq,sizeof (*t->rseq)))) goto error; - ret =rseq_ip_fixup (regs); -if (unlikely (ret <0 )) - goto error; +/* +* regs is NULL if and only if the caller is in a syscall path. Skip +* fixup and leave rseq_cs as is so that rseq_sycall() will detect and +* kill a misbehaving userspace on debug kernels. +*/ +if (regs) { + ret =rseq_ip_fixup (regs); +if (unlikely (ret <0 )) + goto error; + }if (unlikely (rseq_update_cpu_id (t))) goto error;return ;
kernel/sched/cpufreq_schedutil.c +11 -5
@@ -610,9 +610,17 @@ static struct attribute *sugov_attrs[] = { };ATTRIBUTE_GROUPS (sugov); +static void sugov_tunables_free (struct kobject *kobj) +{ + struct gov_attr_set *attr_set = container_of(kobj, struct gov_attr_set, kobj); + +kfree (to_sugov_tunables (attr_set)); +} +static struct kobj_type sugov_tunables_ktype = { .default_groups = sugov_groups, .sysfs_ops = &governor_sysfs_ops, + .release = &sugov_tunables_free, };/********************** cpufreq governor interface *********************/
Lines of this file are not shown. View the raw message.
net/netfilter/nf_conntrack_core.c +37 -33
70 lines not on this page · raw message
sound/pci/hda/patch_realtek.c +129 -0
129 lines not on this page · raw message
tools/testing/selftests/bpf/test_lwt_ip_encap.sh +8 -5
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.