Merge remote-tracking branch 'kernel-common/android-4.14-stable' into q
* kernel-common/android-4.14-stable: ANDROID: GKI: scripts: Makefile: update the lz4 command (#2) Linux 4.14.187 Revert "tty: hvc: Fix data abort due to race in hvc_open" xfs: add agf freeblocks verify in xfs_agf_verify NFSv4 fix CLOSE not waiting for direct IO compeletion pNFS/flexfiles: Fix list corruption if the mirror count changes SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment() sunrpc: fixed rollback in rpc_gssd_dummy_populate() Staging: rtl8723bs: prevent buffer overflow in update_sta_support_rate() drm/radeon: fix fb_div check in ni_init_smc_spll_table() tracing: Fix event trigger to accept redundant spaces arm64: perf: Report the PC value in REGS_ABI_32 mode ocfs2: fix panic on nfs server over ocfs2 ocfs2: fix value of OCFS2_INVALID_SLOT ocfs2: load global_inode_alloc mm/slab: use memzero_explicit() in kzfree() btrfs: fix failure of RWF_NOWAIT write into prealloc extent beyond eof KVM: nVMX: Plumb L2 GPA through to PML emulation KVM: X86: Fix MSR range of APIC registers in X2APIC mode ACPI: sysfs: Fix pm_profile_attr type ALSA: hda: Add NVIDIA codec IDs 9a & 9d through a0 to patch table blktrace: break out of blktrace setup on concurrent calls kbuild: improve cc-option to clean up all temporary files s390/ptrace: fix setting syscall number net: alx: fix race condition in alx_remove ata/libata: Fix usage of page address by page_address in ata_scsi_mode_select_xlat function sched/core: Fix PI boosting between RT and DEADLINE tasks net: bcmgenet: use hardware padding of runt frames netfilter: ipset: fix unaligned atomic access usb: gadget: udc: Potential Oops in error handling code ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram() net: qed: fix excessive QM ILT lines consumption net: qed: fix NVMe login fails over VFs net: qed: fix left elements count calculation RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads() ASoC: rockchip: Fix a reference count leak. RDMA/cma: Protect bind_list and listen_list while finding matching cm id rxrpc: Fix handling of rwind from an ACK packet ARM: dts: NSP: Correct FA2 mailbox node efi/esrt: Fix reference count leak in esre_create_sysfs_entry. cifs/smb3: Fix data inconsistent when zero file range cifs/smb3: Fix data inconsistent when punch hole xhci: Poll for U0 after disabling USB2 LPM ALSA: usb-audio: Fix OOB access of mixer element list ALSA: usb-audio: Clean up mixer element list traverse ALSA: usb-audio: uac1: Invalidate ctl on interrupt loop: replace kill_bdev with invalidate_bdev cdc-acm: Add DISABLE_ECHO quirk for Microchip/SMSC chip xhci: Fix enumeration issue when setting max packet size for FS devices. xhci: Fix incorrect EP_STATE_MASK ALSA: usb-audio: add quirk for Denon DCD-1500RE usb: host: ehci-exynos: Fix error check in exynos_ehci_probe() usb: host: xhci-mtk: avoid runtime suspend when removing hcd USB: ehci: reopen solution for Synopsys HC bug usb: add USB_QUIRK_DELAY_INIT for Logitech C922 usb: dwc2: Postponed gadget registration to the udc class driver USB: ohci-sm501: Add missed iounmap() in remove net: core: reduce recursion limit value net: Do not clear the sock TX queue in sk_set_socket() net: Fix the arp error in some cases ip6_gre: fix use-after-free in ip6gre_tunnel_lookup() tcp_cubic: fix spurious HYSTART_DELAY exit upon drop in min RTT ip_tunnel: fix use-after-free in ip_tunnel_lookup() tg3: driver sleeps indefinitely when EEH errors exceed eeh_max_freezes tcp: grow window for OOO packets only for SACK flows sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket rxrpc: Fix notification call on completion of discarded calls rocker: fix incorrect error handling in dma_rings_init net: usb: ax88179_178a: fix packet alignment padding net: fix memleak in register_netdevice() net: bridge: enfore alignment for ethernet address mld: fix memory leak in ipv6_mc_destroy_dev() ibmveth: Fix max MTU limit apparmor: don't try to replace stale label in ptraceme check fix a braino in "sparc32: fix register window handling in genregs32_[gs]et()" net: sched: export __netdev_watchdog_up() block/bio-integrity: don't free 'buf' if bio_integrity_add_page() failed net: be more gentle about silly gso requests coming from user scsi: scsi_devinfo: handle non-terminated strings Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 186
|
||||
SUBLEVEL = 187
|
||||
EXTRAVERSION =
|
||||
NAME = Petit Gorille
|
||||
|
||||
|
||||
@@ -249,10 +249,10 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mailbox: mailbox@25000 {
|
||||
mailbox: mailbox@25c00 {
|
||||
compatible = "brcm,iproc-fa2-mbox";
|
||||
reg = <0x25000 0x445>;
|
||||
interrupts = <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg = <0x25c00 0x400>;
|
||||
interrupts = <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#mbox-cells = <1>;
|
||||
brcm,rx-status-len = <32>;
|
||||
brcm,use-bcm-hdr;
|
||||
|
||||
@@ -301,14 +301,14 @@ static int __init imx_suspend_alloc_ocram(
|
||||
if (!ocram_pool) {
|
||||
pr_warn("%s: ocram pool unavailable!\n", __func__);
|
||||
ret = -ENODEV;
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
ocram_base = gen_pool_alloc(ocram_pool, size);
|
||||
if (!ocram_base) {
|
||||
pr_warn("%s: unable to alloc ocram!\n", __func__);
|
||||
ret = -ENOMEM;
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
phys = gen_pool_virt_to_phys(ocram_pool, ocram_base);
|
||||
@@ -318,6 +318,8 @@ static int __init imx_suspend_alloc_ocram(
|
||||
if (virt_out)
|
||||
*virt_out = virt;
|
||||
|
||||
put_device:
|
||||
put_device(&pdev->dev);
|
||||
put_node:
|
||||
of_node_put(node);
|
||||
|
||||
|
||||
@@ -15,15 +15,34 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Compat (i.e. 32 bit) mode:
|
||||
* - PC has been set in the pt_regs struct in kernel_entry,
|
||||
* - Handle SP and LR here.
|
||||
* Our handling of compat tasks (PERF_SAMPLE_REGS_ABI_32) is weird, but
|
||||
* we're stuck with it for ABI compatability reasons.
|
||||
*
|
||||
* For a 32-bit consumer inspecting a 32-bit task, then it will look at
|
||||
* the first 16 registers (see arch/arm/include/uapi/asm/perf_regs.h).
|
||||
* These correspond directly to a prefix of the registers saved in our
|
||||
* 'struct pt_regs', with the exception of the PC, so we copy that down
|
||||
* (x15 corresponds to SP_hyp in the architecture).
|
||||
*
|
||||
* So far, so good.
|
||||
*
|
||||
* The oddity arises when a 64-bit consumer looks at a 32-bit task and
|
||||
* asks for registers beyond PERF_REG_ARM_MAX. In this case, we return
|
||||
* SP_usr, LR_usr and PC in the positions where the AArch64 SP, LR and
|
||||
* PC registers would normally live. The initial idea was to allow a
|
||||
* 64-bit unwinder to unwind a 32-bit task and, although it's not clear
|
||||
* how well that works in practice, somebody might be relying on it.
|
||||
*
|
||||
* At the time we make a sample, we don't know whether the consumer is
|
||||
* 32-bit or 64-bit, so we have to cater for both possibilities.
|
||||
*/
|
||||
if (compat_user_mode(regs)) {
|
||||
if ((u32)idx == PERF_REG_ARM64_SP)
|
||||
return regs->compat_sp;
|
||||
if ((u32)idx == PERF_REG_ARM64_LR)
|
||||
return regs->compat_lr;
|
||||
if (idx == 15)
|
||||
return regs->pc;
|
||||
}
|
||||
|
||||
if ((u32)idx == PERF_REG_ARM64_SP)
|
||||
|
||||
@@ -322,6 +322,25 @@ static inline void __poke_user_per(struct task_struct *child,
|
||||
child->thread.per_user.end = data;
|
||||
}
|
||||
|
||||
static void fixup_int_code(struct task_struct *child, addr_t data)
|
||||
{
|
||||
struct pt_regs *regs = task_pt_regs(child);
|
||||
int ilc = regs->int_code >> 16;
|
||||
u16 insn;
|
||||
|
||||
if (ilc > 6)
|
||||
return;
|
||||
|
||||
if (ptrace_access_vm(child, regs->psw.addr - (regs->int_code >> 16),
|
||||
&insn, sizeof(insn), FOLL_FORCE) != sizeof(insn))
|
||||
return;
|
||||
|
||||
/* double check that tracee stopped on svc instruction */
|
||||
if ((insn >> 8) != 0xa)
|
||||
return;
|
||||
|
||||
regs->int_code = 0x20000 | (data & 0xffff);
|
||||
}
|
||||
/*
|
||||
* Write a word to the user area of a process at location addr. This
|
||||
* operation does have an additional problem compared to peek_user.
|
||||
@@ -333,7 +352,9 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data)
|
||||
struct user *dummy = NULL;
|
||||
addr_t offset;
|
||||
|
||||
|
||||
if (addr < (addr_t) &dummy->regs.acrs) {
|
||||
struct pt_regs *regs = task_pt_regs(child);
|
||||
/*
|
||||
* psw and gprs are stored on the stack
|
||||
*/
|
||||
@@ -351,7 +372,11 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data)
|
||||
/* Invalid addressing mode bits */
|
||||
return -EINVAL;
|
||||
}
|
||||
*(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr) = data;
|
||||
|
||||
if (test_pt_regs_flag(regs, PIF_SYSCALL) &&
|
||||
addr == offsetof(struct user, regs.gprs[2]))
|
||||
fixup_int_code(child, data);
|
||||
*(addr_t *)((addr_t) ®s->psw + addr) = data;
|
||||
|
||||
} else if (addr < (addr_t) (&dummy->regs.orig_gpr2)) {
|
||||
/*
|
||||
@@ -717,6 +742,10 @@ static int __poke_user_compat(struct task_struct *child,
|
||||
regs->psw.mask = (regs->psw.mask & ~PSW_MASK_BA) |
|
||||
(__u64)(tmp & PSW32_ADDR_AMODE);
|
||||
} else {
|
||||
|
||||
if (test_pt_regs_flag(regs, PIF_SYSCALL) &&
|
||||
addr == offsetof(struct compat_user, regs.gprs[2]))
|
||||
fixup_int_code(child, data);
|
||||
/* gpr 0-15 */
|
||||
*(__u32*)((addr_t) ®s->psw + addr*2 + 4) = tmp;
|
||||
}
|
||||
|
||||
@@ -168,12 +168,17 @@ static int genregs32_set(struct task_struct *target,
|
||||
if (ret || !count)
|
||||
return ret;
|
||||
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
|
||||
®s->y,
|
||||
®s->npc,
|
||||
34 * sizeof(u32), 35 * sizeof(u32));
|
||||
if (ret || !count)
|
||||
return ret;
|
||||
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
|
||||
®s->y,
|
||||
35 * sizeof(u32), 36 * sizeof(u32));
|
||||
if (ret || !count)
|
||||
return ret;
|
||||
return user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
|
||||
35 * sizeof(u32), 38 * sizeof(u32));
|
||||
36 * sizeof(u32), 38 * sizeof(u32));
|
||||
}
|
||||
|
||||
static int fpregs32_get(struct task_struct *target,
|
||||
|
||||
@@ -1060,7 +1060,7 @@ struct kvm_x86_ops {
|
||||
void (*enable_log_dirty_pt_masked)(struct kvm *kvm,
|
||||
struct kvm_memory_slot *slot,
|
||||
gfn_t offset, unsigned long mask);
|
||||
int (*write_log_dirty)(struct kvm_vcpu *vcpu);
|
||||
int (*write_log_dirty)(struct kvm_vcpu *vcpu, gpa_t l2_gpa);
|
||||
|
||||
/* pmu operations of sub-arch */
|
||||
const struct kvm_pmu_ops *pmu_ops;
|
||||
|
||||
@@ -1713,10 +1713,10 @@ void kvm_arch_mmu_enable_log_dirty_pt_masked(struct kvm *kvm,
|
||||
* Emulate arch specific page modification logging for the
|
||||
* nested hypervisor
|
||||
*/
|
||||
int kvm_arch_write_log_dirty(struct kvm_vcpu *vcpu)
|
||||
int kvm_arch_write_log_dirty(struct kvm_vcpu *vcpu, gpa_t l2_gpa)
|
||||
{
|
||||
if (kvm_x86_ops->write_log_dirty)
|
||||
return kvm_x86_ops->write_log_dirty(vcpu);
|
||||
return kvm_x86_ops->write_log_dirty(vcpu, l2_gpa);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ void kvm_mmu_gfn_disallow_lpage(struct kvm_memory_slot *slot, gfn_t gfn);
|
||||
void kvm_mmu_gfn_allow_lpage(struct kvm_memory_slot *slot, gfn_t gfn);
|
||||
bool kvm_mmu_slot_gfn_write_protect(struct kvm *kvm,
|
||||
struct kvm_memory_slot *slot, u64 gfn);
|
||||
int kvm_arch_write_log_dirty(struct kvm_vcpu *vcpu);
|
||||
int kvm_arch_write_log_dirty(struct kvm_vcpu *vcpu, gpa_t l2_gpa);
|
||||
|
||||
int kvm_mmu_post_init_vm(struct kvm *kvm);
|
||||
void kvm_mmu_pre_destroy_vm(struct kvm *kvm);
|
||||
|
||||
@@ -202,7 +202,7 @@ static inline unsigned FNAME(gpte_access)(struct kvm_vcpu *vcpu, u64 gpte)
|
||||
static int FNAME(update_accessed_dirty_bits)(struct kvm_vcpu *vcpu,
|
||||
struct kvm_mmu *mmu,
|
||||
struct guest_walker *walker,
|
||||
int write_fault)
|
||||
gpa_t addr, int write_fault)
|
||||
{
|
||||
unsigned level, index;
|
||||
pt_element_t pte, orig_pte;
|
||||
@@ -227,7 +227,7 @@ static int FNAME(update_accessed_dirty_bits)(struct kvm_vcpu *vcpu,
|
||||
!(pte & PT_GUEST_DIRTY_MASK)) {
|
||||
trace_kvm_mmu_set_dirty_bit(table_gfn, index, sizeof(pte));
|
||||
#if PTTYPE == PTTYPE_EPT
|
||||
if (kvm_arch_write_log_dirty(vcpu))
|
||||
if (kvm_arch_write_log_dirty(vcpu, addr))
|
||||
return -EINVAL;
|
||||
#endif
|
||||
pte |= PT_GUEST_DIRTY_MASK;
|
||||
@@ -424,7 +424,8 @@ retry_walk:
|
||||
(PT_GUEST_DIRTY_SHIFT - PT_GUEST_ACCESSED_SHIFT);
|
||||
|
||||
if (unlikely(!accessed_dirty)) {
|
||||
ret = FNAME(update_accessed_dirty_bits)(vcpu, mmu, walker, write_fault);
|
||||
ret = FNAME(update_accessed_dirty_bits)(vcpu, mmu, walker,
|
||||
addr, write_fault);
|
||||
if (unlikely(ret < 0))
|
||||
goto error;
|
||||
else if (ret)
|
||||
|
||||
@@ -12462,11 +12462,10 @@ static void vmx_flush_log_dirty(struct kvm *kvm)
|
||||
kvm_flush_pml_buffers(kvm);
|
||||
}
|
||||
|
||||
static int vmx_write_pml_buffer(struct kvm_vcpu *vcpu)
|
||||
static int vmx_write_pml_buffer(struct kvm_vcpu *vcpu, gpa_t gpa)
|
||||
{
|
||||
struct vmcs12 *vmcs12;
|
||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||
gpa_t gpa;
|
||||
struct page *page = NULL;
|
||||
u64 *pml_address;
|
||||
|
||||
@@ -12487,7 +12486,7 @@ static int vmx_write_pml_buffer(struct kvm_vcpu *vcpu)
|
||||
return 1;
|
||||
}
|
||||
|
||||
gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS) & ~0xFFFull;
|
||||
gpa &= ~0xFFFull;
|
||||
|
||||
page = kvm_vcpu_gpa_to_page(vcpu, vmcs12->pml_address);
|
||||
if (is_error_page(page))
|
||||
|
||||
@@ -2344,7 +2344,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
return kvm_mtrr_set_msr(vcpu, msr, data);
|
||||
case MSR_IA32_APICBASE:
|
||||
return kvm_set_apic_base(vcpu, msr_info);
|
||||
case APIC_BASE_MSR ... APIC_BASE_MSR + 0x3ff:
|
||||
case APIC_BASE_MSR ... APIC_BASE_MSR + 0xff:
|
||||
return kvm_x2apic_msr_write(vcpu, msr, data);
|
||||
case MSR_IA32_TSCDEADLINE:
|
||||
kvm_set_lapic_tscdeadline_msr(vcpu, data);
|
||||
@@ -2629,7 +2629,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
case MSR_IA32_APICBASE:
|
||||
msr_info->data = kvm_get_apic_base(vcpu);
|
||||
break;
|
||||
case APIC_BASE_MSR ... APIC_BASE_MSR + 0x3ff:
|
||||
case APIC_BASE_MSR ... APIC_BASE_MSR + 0xff:
|
||||
return kvm_x2apic_msr_read(vcpu, msr_info->index, &msr_info->data);
|
||||
break;
|
||||
case MSR_IA32_TSCDEADLINE:
|
||||
|
||||
@@ -315,7 +315,6 @@ bool bio_integrity_prep(struct bio *bio)
|
||||
|
||||
if (ret == 0) {
|
||||
printk(KERN_ERR "could not attach integrity payload\n");
|
||||
kfree(buf);
|
||||
status = BLK_STS_RESOURCE;
|
||||
goto err_end_io;
|
||||
}
|
||||
|
||||
@@ -944,13 +944,13 @@ static void __exit interrupt_stats_exit(void)
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
acpi_show_profile(struct device *dev, struct device_attribute *attr,
|
||||
acpi_show_profile(struct kobject *kobj, struct kobj_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sprintf(buf, "%d\n", acpi_gbl_FADT.preferred_profile);
|
||||
}
|
||||
|
||||
static const struct device_attribute pm_profile_attr =
|
||||
static const struct kobj_attribute pm_profile_attr =
|
||||
__ATTR(pm_profile, S_IRUGO, acpi_show_profile, NULL);
|
||||
|
||||
static ssize_t hotplug_enabled_show(struct kobject *kobj,
|
||||
|
||||
@@ -3996,12 +3996,13 @@ static unsigned int ata_scsi_mode_select_xlat(struct ata_queued_cmd *qc)
|
||||
{
|
||||
struct scsi_cmnd *scmd = qc->scsicmd;
|
||||
const u8 *cdb = scmd->cmnd;
|
||||
const u8 *p;
|
||||
u8 pg, spg;
|
||||
unsigned six_byte, pg_len, hdr_len, bd_len;
|
||||
int len;
|
||||
u16 fp = (u16)-1;
|
||||
u8 bp = 0xff;
|
||||
u8 buffer[64];
|
||||
const u8 *p = buffer;
|
||||
|
||||
VPRINTK("ENTER\n");
|
||||
|
||||
@@ -4035,12 +4036,14 @@ static unsigned int ata_scsi_mode_select_xlat(struct ata_queued_cmd *qc)
|
||||
if (!scsi_sg_count(scmd) || scsi_sglist(scmd)->length < len)
|
||||
goto invalid_param_len;
|
||||
|
||||
p = page_address(sg_page(scsi_sglist(scmd)));
|
||||
|
||||
/* Move past header and block descriptors. */
|
||||
if (len < hdr_len)
|
||||
goto invalid_param_len;
|
||||
|
||||
if (!sg_copy_to_buffer(scsi_sglist(scmd), scsi_sg_count(scmd),
|
||||
buffer, sizeof(buffer)))
|
||||
goto invalid_param_len;
|
||||
|
||||
if (six_byte)
|
||||
bd_len = p[3];
|
||||
else
|
||||
|
||||
@@ -1112,7 +1112,7 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info)
|
||||
if (lo->lo_offset != info->lo_offset ||
|
||||
lo->lo_sizelimit != info->lo_sizelimit) {
|
||||
sync_blockdev(lo->lo_device);
|
||||
kill_bdev(lo->lo_device);
|
||||
invalidate_bdev(lo->lo_device);
|
||||
}
|
||||
|
||||
/* I/O need to be drained during transfer transition */
|
||||
@@ -1384,11 +1384,11 @@ static int loop_set_block_size(struct loop_device *lo, unsigned long arg)
|
||||
return 0;
|
||||
|
||||
sync_blockdev(lo->lo_device);
|
||||
kill_bdev(lo->lo_device);
|
||||
invalidate_bdev(lo->lo_device);
|
||||
|
||||
blk_mq_freeze_queue(lo->lo_queue);
|
||||
|
||||
/* kill_bdev should have truncated all the pages */
|
||||
/* invalidate_bdev should have truncated all the pages */
|
||||
if (lo->lo_device->bd_inode->i_mapping->nrpages) {
|
||||
err = -EAGAIN;
|
||||
pr_warn("%s: loop%d (%s) has still dirty pages (nrpages=%lu)\n",
|
||||
|
||||
@@ -180,7 +180,7 @@ static int esre_create_sysfs_entry(void *esre, int entry_num)
|
||||
rc = kobject_init_and_add(&entry->kobj, &esre1_ktype, NULL,
|
||||
"entry%d", entry_num);
|
||||
if (rc) {
|
||||
kfree(entry);
|
||||
kobject_put(&entry->kobj);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2126,7 +2126,7 @@ static int ni_init_smc_spll_table(struct radeon_device *rdev)
|
||||
if (clk_s & ~(SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_MASK >> SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_SHIFT))
|
||||
ret = -EINVAL;
|
||||
|
||||
if (clk_s & ~(SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_MASK >> SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_SHIFT))
|
||||
if (fb_div & ~(SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_MASK >> SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_SHIFT))
|
||||
ret = -EINVAL;
|
||||
|
||||
if (clk_v & ~(SMC_NISLANDS_SPLL_DIV_TABLE_CLKV_MASK >> SMC_NISLANDS_SPLL_DIV_TABLE_CLKV_SHIFT))
|
||||
|
||||
@@ -1482,6 +1482,8 @@ static struct rdma_id_private *cma_find_listener(
|
||||
{
|
||||
struct rdma_id_private *id_priv, *id_priv_dev;
|
||||
|
||||
lockdep_assert_held(&lock);
|
||||
|
||||
if (!bind_list)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
@@ -1530,6 +1532,7 @@ static struct rdma_id_private *cma_id_from_event(struct ib_cm_id *cm_id,
|
||||
}
|
||||
}
|
||||
|
||||
mutex_lock(&lock);
|
||||
/*
|
||||
* Net namespace might be getting deleted while route lookup,
|
||||
* cm_id lookup is in progress. Therefore, perform netdevice
|
||||
@@ -1571,6 +1574,7 @@ static struct rdma_id_private *cma_id_from_event(struct ib_cm_id *cm_id,
|
||||
id_priv = cma_find_listener(bind_list, cm_id, ib_event, &req, *net_dev);
|
||||
err:
|
||||
rcu_read_unlock();
|
||||
mutex_unlock(&lock);
|
||||
if (IS_ERR(id_priv) && *net_dev) {
|
||||
dev_put(*net_dev);
|
||||
*net_dev = NULL;
|
||||
@@ -2287,6 +2291,8 @@ static void cma_listen_on_dev(struct rdma_id_private *id_priv,
|
||||
struct net *net = id_priv->id.route.addr.dev_addr.net;
|
||||
int ret;
|
||||
|
||||
lockdep_assert_held(&lock);
|
||||
|
||||
if (cma_family(id_priv) == AF_IB && !rdma_cap_ib_cm(cma_dev->device, 1))
|
||||
return;
|
||||
|
||||
@@ -2993,6 +2999,8 @@ static void cma_bind_port(struct rdma_bind_list *bind_list,
|
||||
u64 sid, mask;
|
||||
__be16 port;
|
||||
|
||||
lockdep_assert_held(&lock);
|
||||
|
||||
addr = cma_src_addr(id_priv);
|
||||
port = htons(bind_list->port);
|
||||
|
||||
@@ -3021,6 +3029,8 @@ static int cma_alloc_port(enum rdma_port_space ps,
|
||||
struct rdma_bind_list *bind_list;
|
||||
int ret;
|
||||
|
||||
lockdep_assert_held(&lock);
|
||||
|
||||
bind_list = kzalloc(sizeof *bind_list, GFP_KERNEL);
|
||||
if (!bind_list)
|
||||
return -ENOMEM;
|
||||
@@ -3047,6 +3057,8 @@ static int cma_port_is_unique(struct rdma_bind_list *bind_list,
|
||||
struct sockaddr *saddr = cma_src_addr(id_priv);
|
||||
__be16 dport = cma_port(daddr);
|
||||
|
||||
lockdep_assert_held(&lock);
|
||||
|
||||
hlist_for_each_entry(cur_id, &bind_list->owners, node) {
|
||||
struct sockaddr *cur_daddr = cma_dst_addr(cur_id);
|
||||
struct sockaddr *cur_saddr = cma_src_addr(cur_id);
|
||||
@@ -3086,6 +3098,8 @@ static int cma_alloc_any_port(enum rdma_port_space ps,
|
||||
unsigned int rover;
|
||||
struct net *net = id_priv->id.route.addr.dev_addr.net;
|
||||
|
||||
lockdep_assert_held(&lock);
|
||||
|
||||
inet_get_local_port_range(net, &low, &high);
|
||||
remaining = (high - low) + 1;
|
||||
rover = prandom_u32() % remaining + low;
|
||||
@@ -3133,6 +3147,8 @@ static int cma_check_port(struct rdma_bind_list *bind_list,
|
||||
struct rdma_id_private *cur_id;
|
||||
struct sockaddr *addr, *cur_addr;
|
||||
|
||||
lockdep_assert_held(&lock);
|
||||
|
||||
addr = cma_src_addr(id_priv);
|
||||
hlist_for_each_entry(cur_id, &bind_list->owners, node) {
|
||||
if (id_priv == cur_id)
|
||||
@@ -3163,6 +3179,8 @@ static int cma_use_port(enum rdma_port_space ps,
|
||||
unsigned short snum;
|
||||
int ret;
|
||||
|
||||
lockdep_assert_held(&lock);
|
||||
|
||||
snum = ntohs(cma_port(cma_src_addr(id_priv)));
|
||||
if (snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE))
|
||||
return -EACCES;
|
||||
|
||||
@@ -2907,6 +2907,7 @@ static int ib_mad_post_receive_mads(struct ib_mad_qp_info *qp_info,
|
||||
DMA_FROM_DEVICE);
|
||||
if (unlikely(ib_dma_mapping_error(qp_info->port_priv->device,
|
||||
sg_list.addr))) {
|
||||
kfree(mad_priv);
|
||||
ret = -ENOMEM;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1250,8 +1250,12 @@ out_disable_adv_intr:
|
||||
|
||||
static void __alx_stop(struct alx_priv *alx)
|
||||
{
|
||||
alx_halt(alx);
|
||||
alx_free_irq(alx);
|
||||
|
||||
cancel_work_sync(&alx->link_check_wk);
|
||||
cancel_work_sync(&alx->reset_wk);
|
||||
|
||||
alx_halt(alx);
|
||||
alx_free_rings(alx);
|
||||
alx_free_napis(alx);
|
||||
}
|
||||
@@ -1863,9 +1867,6 @@ static void alx_remove(struct pci_dev *pdev)
|
||||
struct alx_priv *alx = pci_get_drvdata(pdev);
|
||||
struct alx_hw *hw = &alx->hw;
|
||||
|
||||
cancel_work_sync(&alx->link_check_wk);
|
||||
cancel_work_sync(&alx->reset_wk);
|
||||
|
||||
/* restore permanent mac address */
|
||||
alx_set_macaddr(hw, hw->perm_addr);
|
||||
|
||||
|
||||
@@ -1567,11 +1567,6 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (skb_padto(skb, ETH_ZLEN)) {
|
||||
ret = NETDEV_TX_OK;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Retain how many bytes will be sent on the wire, without TSB inserted
|
||||
* by transmit checksum offload
|
||||
*/
|
||||
@@ -1621,6 +1616,9 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
len_stat = (size << DMA_BUFLENGTH_SHIFT) |
|
||||
(priv->hw_params->qtag_mask << DMA_TX_QTAG_SHIFT);
|
||||
|
||||
/* Note: if we ever change from DMA_TX_APPEND_CRC below we
|
||||
* will need to restore software padding of "runt" packets
|
||||
*/
|
||||
if (!i) {
|
||||
len_stat |= DMA_TX_APPEND_CRC | DMA_SOP;
|
||||
if (skb->ip_summed == CHECKSUM_PARTIAL)
|
||||
|
||||
@@ -18179,8 +18179,8 @@ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,
|
||||
|
||||
rtnl_lock();
|
||||
|
||||
/* We probably don't have netdev yet */
|
||||
if (!netdev || !netif_running(netdev))
|
||||
/* Could be second call or maybe we don't have netdev yet */
|
||||
if (!netdev || tp->pcierr_recovery || !netif_running(netdev))
|
||||
goto done;
|
||||
|
||||
/* We needn't recover from permanent error */
|
||||
|
||||
@@ -1695,7 +1695,7 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
|
||||
}
|
||||
|
||||
netdev->min_mtu = IBMVETH_MIN_MTU;
|
||||
netdev->max_mtu = ETH_MAX_MTU;
|
||||
netdev->max_mtu = ETH_MAX_MTU - IBMVETH_BUFF_OH;
|
||||
|
||||
memcpy(netdev->dev_addr, mac_addr_p, ETH_ALEN);
|
||||
|
||||
|
||||
@@ -396,7 +396,7 @@ static void qed_cxt_qm_iids(struct qed_hwfn *p_hwfn,
|
||||
vf_tids += segs[NUM_TASK_PF_SEGMENTS].count;
|
||||
}
|
||||
|
||||
iids->vf_cids += vf_cids * p_mngr->vf_count;
|
||||
iids->vf_cids = vf_cids;
|
||||
iids->tids += vf_tids * p_mngr->vf_count;
|
||||
|
||||
DP_VERBOSE(p_hwfn, QED_MSG_ILT,
|
||||
|
||||
@@ -81,12 +81,17 @@ static void qed_vf_pf_req_end(struct qed_hwfn *p_hwfn, int req_status)
|
||||
mutex_unlock(&(p_hwfn->vf_iov_info->mutex));
|
||||
}
|
||||
|
||||
#define QED_VF_CHANNEL_USLEEP_ITERATIONS 90
|
||||
#define QED_VF_CHANNEL_USLEEP_DELAY 100
|
||||
#define QED_VF_CHANNEL_MSLEEP_ITERATIONS 10
|
||||
#define QED_VF_CHANNEL_MSLEEP_DELAY 25
|
||||
|
||||
static int qed_send_msg2pf(struct qed_hwfn *p_hwfn, u8 *done, u32 resp_size)
|
||||
{
|
||||
union vfpf_tlvs *p_req = p_hwfn->vf_iov_info->vf2pf_request;
|
||||
struct ustorm_trigger_vf_zone trigger;
|
||||
struct ustorm_vf_zone *zone_data;
|
||||
int rc = 0, time = 100;
|
||||
int iter, rc = 0;
|
||||
|
||||
zone_data = (struct ustorm_vf_zone *)PXP_VF_BAR0_START_USDM_ZONE_B;
|
||||
|
||||
@@ -126,11 +131,19 @@ static int qed_send_msg2pf(struct qed_hwfn *p_hwfn, u8 *done, u32 resp_size)
|
||||
REG_WR(p_hwfn, (uintptr_t)&zone_data->trigger, *((u32 *)&trigger));
|
||||
|
||||
/* When PF would be done with the response, it would write back to the
|
||||
* `done' address. Poll until then.
|
||||
* `done' address from a coherent DMA zone. Poll until then.
|
||||
*/
|
||||
while ((!*done) && time) {
|
||||
msleep(25);
|
||||
time--;
|
||||
|
||||
iter = QED_VF_CHANNEL_USLEEP_ITERATIONS;
|
||||
while (!*done && iter--) {
|
||||
udelay(QED_VF_CHANNEL_USLEEP_DELAY);
|
||||
dma_rmb();
|
||||
}
|
||||
|
||||
iter = QED_VF_CHANNEL_MSLEEP_ITERATIONS;
|
||||
while (!*done && iter--) {
|
||||
msleep(QED_VF_CHANNEL_MSLEEP_DELAY);
|
||||
dma_rmb();
|
||||
}
|
||||
|
||||
if (!*done) {
|
||||
|
||||
@@ -651,10 +651,10 @@ static int rocker_dma_rings_init(struct rocker *rocker)
|
||||
err_dma_event_ring_bufs_alloc:
|
||||
rocker_dma_ring_destroy(rocker, &rocker->event_ring);
|
||||
err_dma_event_ring_create:
|
||||
rocker_dma_cmd_ring_waits_free(rocker);
|
||||
err_dma_cmd_ring_waits_alloc:
|
||||
rocker_dma_ring_bufs_free(rocker, &rocker->cmd_ring,
|
||||
PCI_DMA_BIDIRECTIONAL);
|
||||
err_dma_cmd_ring_waits_alloc:
|
||||
rocker_dma_cmd_ring_waits_free(rocker);
|
||||
err_dma_cmd_ring_bufs_alloc:
|
||||
rocker_dma_ring_destroy(rocker, &rocker->cmd_ring);
|
||||
return err;
|
||||
|
||||
@@ -1400,10 +1400,10 @@ static int ax88179_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
||||
}
|
||||
|
||||
if (pkt_cnt == 0) {
|
||||
/* Skip IP alignment psudo header */
|
||||
skb_pull(skb, 2);
|
||||
skb->len = pkt_len;
|
||||
skb_set_tail_pointer(skb, pkt_len);
|
||||
/* Skip IP alignment pseudo header */
|
||||
skb_pull(skb, 2);
|
||||
skb_set_tail_pointer(skb, skb->len);
|
||||
skb->truesize = pkt_len + sizeof(struct sk_buff);
|
||||
ax88179_rx_checksum(skb, pkt_hdr);
|
||||
return 1;
|
||||
@@ -1412,8 +1412,9 @@ static int ax88179_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
||||
ax_skb = skb_clone(skb, GFP_ATOMIC);
|
||||
if (ax_skb) {
|
||||
ax_skb->len = pkt_len;
|
||||
ax_skb->data = skb->data + 2;
|
||||
skb_set_tail_pointer(ax_skb, pkt_len);
|
||||
/* Skip IP alignment pseudo header */
|
||||
skb_pull(ax_skb, 2);
|
||||
skb_set_tail_pointer(ax_skb, ax_skb->len);
|
||||
ax_skb->truesize = pkt_len + sizeof(struct sk_buff);
|
||||
ax88179_rx_checksum(ax_skb, pkt_hdr);
|
||||
usbnet_skb_return(dev, ax_skb);
|
||||
|
||||
@@ -449,7 +449,8 @@ static struct scsi_dev_info_list *scsi_dev_info_list_find(const char *vendor,
|
||||
/*
|
||||
* vendor strings must be an exact match
|
||||
*/
|
||||
if (vmax != strlen(devinfo->vendor) ||
|
||||
if (vmax != strnlen(devinfo->vendor,
|
||||
sizeof(devinfo->vendor)) ||
|
||||
memcmp(devinfo->vendor, vskip, vmax))
|
||||
continue;
|
||||
|
||||
@@ -457,7 +458,7 @@ static struct scsi_dev_info_list *scsi_dev_info_list_find(const char *vendor,
|
||||
* @model specifies the full string, and
|
||||
* must be larger or equal to devinfo->model
|
||||
*/
|
||||
mlen = strlen(devinfo->model);
|
||||
mlen = strnlen(devinfo->model, sizeof(devinfo->model));
|
||||
if (mmax < mlen || memcmp(devinfo->model, mskip, mlen))
|
||||
continue;
|
||||
return devinfo;
|
||||
|
||||
@@ -1904,12 +1904,14 @@ int update_sta_support_rate(struct adapter *padapter, u8 *pvar_ie, uint var_ie_l
|
||||
pIE = (struct ndis_80211_var_ie *)rtw_get_ie(pvar_ie, _SUPPORTEDRATES_IE_, &ie_len, var_ie_len);
|
||||
if (pIE == NULL)
|
||||
return _FAIL;
|
||||
if (ie_len > sizeof(pmlmeinfo->FW_sta_info[cam_idx].SupportedRates))
|
||||
return _FAIL;
|
||||
|
||||
memcpy(pmlmeinfo->FW_sta_info[cam_idx].SupportedRates, pIE->data, ie_len);
|
||||
supportRateNum = ie_len;
|
||||
|
||||
pIE = (struct ndis_80211_var_ie *)rtw_get_ie(pvar_ie, _EXT_SUPPORTEDRATES_IE_, &ie_len, var_ie_len);
|
||||
if (pIE)
|
||||
if (pIE && (ie_len <= sizeof(pmlmeinfo->FW_sta_info[cam_idx].SupportedRates) - supportRateNum))
|
||||
memcpy((pmlmeinfo->FW_sta_info[cam_idx].SupportedRates + supportRateNum), pIE->data, ie_len);
|
||||
|
||||
return _SUCCESS;
|
||||
|
||||
@@ -88,8 +88,6 @@ static LIST_HEAD(hvc_structs);
|
||||
*/
|
||||
static DEFINE_SPINLOCK(hvc_structs_lock);
|
||||
|
||||
/* Mutex to serialize hvc_open */
|
||||
static DEFINE_MUTEX(hvc_open_mutex);
|
||||
/*
|
||||
* This value is used to assign a tty->index value to a hvc_struct based
|
||||
* upon order of exposure via hvc_probe(), when we can not match it to
|
||||
@@ -334,24 +332,16 @@ static int hvc_install(struct tty_driver *driver, struct tty_struct *tty)
|
||||
*/
|
||||
static int hvc_open(struct tty_struct *tty, struct file * filp)
|
||||
{
|
||||
struct hvc_struct *hp;
|
||||
struct hvc_struct *hp = tty->driver_data;
|
||||
unsigned long flags;
|
||||
int rc = 0;
|
||||
|
||||
mutex_lock(&hvc_open_mutex);
|
||||
|
||||
hp = tty->driver_data;
|
||||
if (!hp) {
|
||||
rc = -EIO;
|
||||
goto out;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&hp->port.lock, flags);
|
||||
/* Check and then increment for fast path open. */
|
||||
if (hp->port.count++ > 0) {
|
||||
spin_unlock_irqrestore(&hp->port.lock, flags);
|
||||
hvc_kick();
|
||||
goto out;
|
||||
return 0;
|
||||
} /* else count == 0 */
|
||||
spin_unlock_irqrestore(&hp->port.lock, flags);
|
||||
|
||||
@@ -379,8 +369,6 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
|
||||
/* Force wakeup of the polling thread */
|
||||
hvc_kick();
|
||||
|
||||
out:
|
||||
mutex_unlock(&hvc_open_mutex);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
@@ -1734,6 +1734,8 @@ static int acm_pre_reset(struct usb_interface *intf)
|
||||
|
||||
static const struct usb_device_id acm_ids[] = {
|
||||
/* quirky and broken devices */
|
||||
{ USB_DEVICE(0x0424, 0x274e), /* Microchip Technology, Inc. (formerly SMSC) */
|
||||
.driver_info = DISABLE_ECHO, }, /* DISABLE ECHO in termios flag */
|
||||
{ USB_DEVICE(0x076d, 0x0006), /* Denso Cradle CU-321 */
|
||||
.driver_info = NO_UNION_NORMAL, },/* has no union descriptor */
|
||||
{ USB_DEVICE(0x17ef, 0x7000), /* Lenovo USB modem */
|
||||
|
||||
@@ -73,11 +73,12 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
/* Logitech HD Webcam C270 */
|
||||
{ USB_DEVICE(0x046d, 0x0825), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
/* Logitech HD Pro Webcams C920, C920-C, C925e and C930e */
|
||||
/* Logitech HD Pro Webcams C920, C920-C, C922, C925e and C930e */
|
||||
{ USB_DEVICE(0x046d, 0x082d), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
{ USB_DEVICE(0x046d, 0x0841), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
{ USB_DEVICE(0x046d, 0x0843), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
{ USB_DEVICE(0x046d, 0x085b), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
{ USB_DEVICE(0x046d, 0x085c), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
|
||||
/* Logitech ConferenceCam CC3000e */
|
||||
{ USB_DEVICE(0x046d, 0x0847), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
|
||||
@@ -4723,12 +4723,6 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
|
||||
epnum, 0);
|
||||
}
|
||||
|
||||
ret = usb_add_gadget_udc(dev, &hsotg->gadget);
|
||||
if (ret) {
|
||||
dwc2_hsotg_ep_free_request(&hsotg->eps_out[0]->ep,
|
||||
hsotg->ctrl_req);
|
||||
return ret;
|
||||
}
|
||||
dwc2_hsotg_dump(hsotg);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -452,6 +452,17 @@ static int dwc2_driver_probe(struct platform_device *dev)
|
||||
if (hsotg->dr_mode == USB_DR_MODE_PERIPHERAL)
|
||||
dwc2_lowlevel_hw_disable(hsotg);
|
||||
|
||||
#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \
|
||||
IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
|
||||
/* Postponed adding a new gadget to the udc class driver list */
|
||||
if (hsotg->gadget_enabled) {
|
||||
retval = usb_add_gadget_udc(hsotg->dev, &hsotg->gadget);
|
||||
if (retval) {
|
||||
dwc2_hsotg_remove(hsotg);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
||||
@@ -2317,7 +2317,8 @@ static int mv_udc_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
|
||||
err_create_workqueue:
|
||||
destroy_workqueue(udc->qwork);
|
||||
if (udc->qwork)
|
||||
destroy_workqueue(udc->qwork);
|
||||
err_destroy_dma:
|
||||
dma_pool_destroy(udc->dtd_pool);
|
||||
err_free_dma:
|
||||
|
||||
@@ -199,9 +199,8 @@ skip_phy:
|
||||
hcd->rsrc_len = resource_size(res);
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (!irq) {
|
||||
dev_err(&pdev->dev, "Failed to get IRQ\n");
|
||||
err = -ENODEV;
|
||||
if (irq < 0) {
|
||||
err = irq;
|
||||
goto fail_io;
|
||||
}
|
||||
|
||||
|
||||
@@ -229,6 +229,13 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
|
||||
ehci_info(ehci, "applying MosChip frame-index workaround\n");
|
||||
ehci->frame_index_bug = 1;
|
||||
break;
|
||||
case PCI_VENDOR_ID_HUAWEI:
|
||||
/* Synopsys HC bug */
|
||||
if (pdev->device == 0xa239) {
|
||||
ehci_info(ehci, "applying Synopsys HC workaround\n");
|
||||
ehci->has_synopsys_hc_bug = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/* optional debug port, normally in the first BAR */
|
||||
|
||||
@@ -195,6 +195,7 @@ static int ohci_hcd_sm501_drv_remove(struct platform_device *pdev)
|
||||
struct resource *mem;
|
||||
|
||||
usb_remove_hcd(hcd);
|
||||
iounmap(hcd->regs);
|
||||
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
|
||||
usb_put_hcd(hcd);
|
||||
dma_release_declared_memory(&pdev->dev);
|
||||
|
||||
@@ -726,6 +726,9 @@ static int xhci_mtk_remove(struct platform_device *dev)
|
||||
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
|
||||
struct usb_hcd *shared_hcd = xhci->shared_hcd;
|
||||
|
||||
pm_runtime_put_noidle(&dev->dev);
|
||||
pm_runtime_disable(&dev->dev);
|
||||
|
||||
usb_remove_hcd(shared_hcd);
|
||||
xhci->shared_hcd = NULL;
|
||||
xhci_mtk_phy_power_off(mtk);
|
||||
@@ -738,8 +741,6 @@ static int xhci_mtk_remove(struct platform_device *dev)
|
||||
xhci_mtk_sch_exit(mtk);
|
||||
xhci_mtk_clks_disable(mtk);
|
||||
xhci_mtk_ldos_disable(mtk);
|
||||
pm_runtime_put_sync(&dev->dev);
|
||||
pm_runtime_disable(&dev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1381,6 +1381,7 @@ static int xhci_check_maxpacket(struct xhci_hcd *xhci, unsigned int slot_id,
|
||||
xhci->devs[slot_id]->out_ctx, ep_index);
|
||||
|
||||
ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index);
|
||||
ep_ctx->ep_info &= cpu_to_le32(~EP_STATE_MASK);/* must clear */
|
||||
ep_ctx->ep_info2 &= cpu_to_le32(~MAX_PACKET_MASK);
|
||||
ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet_size));
|
||||
|
||||
@@ -4260,6 +4261,9 @@ static int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd,
|
||||
mutex_lock(hcd->bandwidth_mutex);
|
||||
xhci_change_max_exit_latency(xhci, udev, 0);
|
||||
mutex_unlock(hcd->bandwidth_mutex);
|
||||
readl_poll_timeout(port_array[port_num], pm_val,
|
||||
(pm_val & PORT_PLS_MASK) == XDEV_U0,
|
||||
100, 10000);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -718,7 +718,7 @@ struct xhci_ep_ctx {
|
||||
* 4 - TRB error
|
||||
* 5-7 - reserved
|
||||
*/
|
||||
#define EP_STATE_MASK (0xf)
|
||||
#define EP_STATE_MASK (0x7)
|
||||
#define EP_STATE_DISABLED 0
|
||||
#define EP_STATE_RUNNING 1
|
||||
#define EP_STATE_HALTED 2
|
||||
|
||||
@@ -8947,9 +8947,6 @@ static ssize_t btrfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
|
||||
dio_data.overwrite = 1;
|
||||
inode_unlock(inode);
|
||||
relock = true;
|
||||
} else if (iocb->ki_flags & IOCB_NOWAIT) {
|
||||
ret = -EAGAIN;
|
||||
goto out;
|
||||
}
|
||||
ret = btrfs_delalloc_reserve_space(inode, &data_reserved,
|
||||
offset, count);
|
||||
|
||||
@@ -1755,6 +1755,12 @@ static long smb3_zero_range(struct file *file, struct cifs_tcon *tcon,
|
||||
inode = d_inode(cfile->dentry);
|
||||
cifsi = CIFS_I(inode);
|
||||
|
||||
/*
|
||||
* We zero the range through ioctl, so we need remove the page caches
|
||||
* first, otherwise the data may be inconsistent with the server.
|
||||
*/
|
||||
truncate_pagecache_range(inode, offset, offset + len - 1);
|
||||
|
||||
/* if file not oplocked can't be sure whether asking to extend size */
|
||||
if (!CIFS_CACHE_READ(cifsi))
|
||||
if (keep_size == false) {
|
||||
@@ -1824,6 +1830,12 @@ static long smb3_punch_hole(struct file *file, struct cifs_tcon *tcon,
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* We implement the punch hole through ioctl, so we need remove the page
|
||||
* caches first, otherwise the data may be inconsistent with the server.
|
||||
*/
|
||||
truncate_pagecache_range(inode, offset, offset + len - 1);
|
||||
|
||||
cifs_dbg(FYI, "offset %lld len %lld", offset, len);
|
||||
|
||||
fsctl_buf.FileOffset = cpu_to_le64(offset);
|
||||
|
||||
@@ -396,8 +396,6 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq)
|
||||
{
|
||||
struct inode *inode = dreq->inode;
|
||||
|
||||
inode_dio_end(inode);
|
||||
|
||||
if (dreq->iocb) {
|
||||
long res = (long) dreq->error;
|
||||
if (dreq->count != 0) {
|
||||
@@ -409,7 +407,10 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq)
|
||||
|
||||
complete(&dreq->completion);
|
||||
|
||||
igrab(inode);
|
||||
nfs_direct_req_release(dreq);
|
||||
inode_dio_end(inode);
|
||||
iput(inode);
|
||||
}
|
||||
|
||||
static void nfs_direct_read_completion(struct nfs_pgio_header *hdr)
|
||||
@@ -539,8 +540,10 @@ static ssize_t nfs_direct_read_schedule_iovec(struct nfs_direct_req *dreq,
|
||||
* generic layer handle the completion.
|
||||
*/
|
||||
if (requested_bytes == 0) {
|
||||
inode_dio_end(inode);
|
||||
igrab(inode);
|
||||
nfs_direct_req_release(dreq);
|
||||
inode_dio_end(inode);
|
||||
iput(inode);
|
||||
return result < 0 ? result : -EIO;
|
||||
}
|
||||
|
||||
@@ -957,8 +960,10 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
|
||||
* generic layer handle the completion.
|
||||
*/
|
||||
if (requested_bytes == 0) {
|
||||
inode_dio_end(inode);
|
||||
igrab(inode);
|
||||
nfs_direct_req_release(dreq);
|
||||
inode_dio_end(inode);
|
||||
iput(inode);
|
||||
return result < 0 ? result : -EIO;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ nfs_file_release(struct inode *inode, struct file *filp)
|
||||
dprintk("NFS: release(%pD2)\n", filp);
|
||||
|
||||
nfs_inc_stats(inode, NFSIOS_VFSRELEASE);
|
||||
inode_dio_wait(inode);
|
||||
nfs_file_clear_open_context(filp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -921,9 +921,8 @@ retry:
|
||||
goto out_mds;
|
||||
|
||||
/* Use a direct mapping of ds_idx to pgio mirror_idx */
|
||||
if (WARN_ON_ONCE(pgio->pg_mirror_count !=
|
||||
FF_LAYOUT_MIRROR_COUNT(pgio->pg_lseg)))
|
||||
goto out_mds;
|
||||
if (pgio->pg_mirror_count != FF_LAYOUT_MIRROR_COUNT(pgio->pg_lseg))
|
||||
goto out_eagain;
|
||||
|
||||
for (i = 0; i < pgio->pg_mirror_count; i++) {
|
||||
ds = nfs4_ff_layout_prepare_ds(pgio->pg_lseg, i, true);
|
||||
@@ -942,11 +941,15 @@ retry:
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
out_eagain:
|
||||
pnfs_generic_pg_cleanup(pgio);
|
||||
pgio->pg_error = -EAGAIN;
|
||||
return;
|
||||
out_mds:
|
||||
pnfs_put_lseg(pgio->pg_lseg);
|
||||
pgio->pg_lseg = NULL;
|
||||
nfs_pageio_reset_write_mds(pgio);
|
||||
pgio->pg_error = -EAGAIN;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
#define OCFS2_MAX_SLOTS 255
|
||||
|
||||
/* Slot map indicator for an empty slot */
|
||||
#define OCFS2_INVALID_SLOT -1
|
||||
#define OCFS2_INVALID_SLOT ((u16)-1)
|
||||
|
||||
#define OCFS2_VOL_UUID_LEN 16
|
||||
#define OCFS2_MAX_VOL_LABEL_LEN 64
|
||||
@@ -339,8 +339,8 @@ struct ocfs2_system_inode_info {
|
||||
enum {
|
||||
BAD_BLOCK_SYSTEM_INODE = 0,
|
||||
GLOBAL_INODE_ALLOC_SYSTEM_INODE,
|
||||
#define OCFS2_FIRST_ONLINE_SYSTEM_INODE GLOBAL_INODE_ALLOC_SYSTEM_INODE
|
||||
SLOT_MAP_SYSTEM_INODE,
|
||||
#define OCFS2_FIRST_ONLINE_SYSTEM_INODE SLOT_MAP_SYSTEM_INODE
|
||||
HEARTBEAT_SYSTEM_INODE,
|
||||
GLOBAL_BITMAP_SYSTEM_INODE,
|
||||
USER_QUOTA_SYSTEM_INODE,
|
||||
|
||||
@@ -2891,9 +2891,12 @@ int ocfs2_test_inode_bit(struct ocfs2_super *osb, u64 blkno, int *res)
|
||||
goto bail;
|
||||
}
|
||||
|
||||
inode_alloc_inode =
|
||||
ocfs2_get_system_file_inode(osb, INODE_ALLOC_SYSTEM_INODE,
|
||||
suballoc_slot);
|
||||
if (suballoc_slot == (u16)OCFS2_INVALID_SLOT)
|
||||
inode_alloc_inode = ocfs2_get_system_file_inode(osb,
|
||||
GLOBAL_INODE_ALLOC_SYSTEM_INODE, suballoc_slot);
|
||||
else
|
||||
inode_alloc_inode = ocfs2_get_system_file_inode(osb,
|
||||
INODE_ALLOC_SYSTEM_INODE, suballoc_slot);
|
||||
if (!inode_alloc_inode) {
|
||||
/* the error code could be inaccurate, but we are not able to
|
||||
* get the correct one. */
|
||||
|
||||
@@ -2529,6 +2529,13 @@ xfs_agf_verify(
|
||||
be32_to_cpu(agf->agf_flcount) <= xfs_agfl_size(mp)))
|
||||
return false;
|
||||
|
||||
if (be32_to_cpu(agf->agf_length) > mp->m_sb.sb_dblocks)
|
||||
return false;
|
||||
|
||||
if (be32_to_cpu(agf->agf_freeblks) < be32_to_cpu(agf->agf_longest) ||
|
||||
be32_to_cpu(agf->agf_freeblks) > be32_to_cpu(agf->agf_length))
|
||||
return false;
|
||||
|
||||
if (be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNO]) < 1 ||
|
||||
be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNT]) < 1 ||
|
||||
be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNO]) > XFS_BTREE_MAXLEVELS ||
|
||||
@@ -2540,6 +2547,10 @@ xfs_agf_verify(
|
||||
be32_to_cpu(agf->agf_levels[XFS_BTNUM_RMAP]) > XFS_BTREE_MAXLEVELS))
|
||||
return false;
|
||||
|
||||
if (xfs_sb_version_hasrmapbt(&mp->m_sb) &&
|
||||
be32_to_cpu(agf->agf_rmap_blocks) > be32_to_cpu(agf->agf_length))
|
||||
return false;
|
||||
|
||||
/*
|
||||
* during growfs operations, the perag is not fully initialised,
|
||||
* so we can't use it for any useful checking. growfs ensures we can't
|
||||
@@ -2553,6 +2564,11 @@ xfs_agf_verify(
|
||||
be32_to_cpu(agf->agf_btreeblks) > be32_to_cpu(agf->agf_length))
|
||||
return false;
|
||||
|
||||
if (xfs_sb_version_hasreflink(&mp->m_sb) &&
|
||||
be32_to_cpu(agf->agf_refcount_blocks) >
|
||||
be32_to_cpu(agf->agf_length))
|
||||
return false;
|
||||
|
||||
if (xfs_sb_version_hasreflink(&mp->m_sb) &&
|
||||
(be32_to_cpu(agf->agf_refcount_level) < 1 ||
|
||||
be32_to_cpu(agf->agf_refcount_level) > XFS_BTREE_MAXLEVELS))
|
||||
|
||||
@@ -2483,7 +2483,7 @@ void synchronize_net(void);
|
||||
int init_dummy_netdev(struct net_device *dev);
|
||||
|
||||
DECLARE_PER_CPU(int, xmit_recursion);
|
||||
#define XMIT_RECURSION_LIMIT 10
|
||||
#define XMIT_RECURSION_LIMIT 8
|
||||
|
||||
static inline int dev_recursion_level(void)
|
||||
{
|
||||
|
||||
@@ -207,28 +207,34 @@ static inline u32 qed_chain_get_cons_idx_u32(struct qed_chain *p_chain)
|
||||
|
||||
static inline u16 qed_chain_get_elem_left(struct qed_chain *p_chain)
|
||||
{
|
||||
u16 elem_per_page = p_chain->elem_per_page;
|
||||
u32 prod = p_chain->u.chain16.prod_idx;
|
||||
u32 cons = p_chain->u.chain16.cons_idx;
|
||||
u16 used;
|
||||
|
||||
used = (u16) (((u32)0x10000 +
|
||||
(u32)p_chain->u.chain16.prod_idx) -
|
||||
(u32)p_chain->u.chain16.cons_idx);
|
||||
if (prod < cons)
|
||||
prod += (u32)U16_MAX + 1;
|
||||
|
||||
used = (u16)(prod - cons);
|
||||
if (p_chain->mode == QED_CHAIN_MODE_NEXT_PTR)
|
||||
used -= p_chain->u.chain16.prod_idx / p_chain->elem_per_page -
|
||||
p_chain->u.chain16.cons_idx / p_chain->elem_per_page;
|
||||
used -= prod / elem_per_page - cons / elem_per_page;
|
||||
|
||||
return (u16)(p_chain->capacity - used);
|
||||
}
|
||||
|
||||
static inline u32 qed_chain_get_elem_left_u32(struct qed_chain *p_chain)
|
||||
{
|
||||
u16 elem_per_page = p_chain->elem_per_page;
|
||||
u64 prod = p_chain->u.chain32.prod_idx;
|
||||
u64 cons = p_chain->u.chain32.cons_idx;
|
||||
u32 used;
|
||||
|
||||
used = (u32) (((u64)0x100000000ULL +
|
||||
(u64)p_chain->u.chain32.prod_idx) -
|
||||
(u64)p_chain->u.chain32.cons_idx);
|
||||
if (prod < cons)
|
||||
prod += (u64)U32_MAX + 1;
|
||||
|
||||
used = (u32)(prod - cons);
|
||||
if (p_chain->mode == QED_CHAIN_MODE_NEXT_PTR)
|
||||
used -= p_chain->u.chain32.prod_idx / p_chain->elem_per_page -
|
||||
p_chain->u.chain32.cons_idx / p_chain->elem_per_page;
|
||||
used -= (u32)(prod / elem_per_page - cons / elem_per_page);
|
||||
|
||||
return p_chain->capacity - used;
|
||||
}
|
||||
|
||||
@@ -107,16 +107,17 @@ retry:
|
||||
|
||||
if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
|
||||
u16 gso_size = __virtio16_to_cpu(little_endian, hdr->gso_size);
|
||||
struct skb_shared_info *shinfo = skb_shinfo(skb);
|
||||
|
||||
if (skb->len - p_off <= gso_size)
|
||||
return -EINVAL;
|
||||
/* Too small packets are not really GSO ones. */
|
||||
if (skb->len - p_off > gso_size) {
|
||||
shinfo->gso_size = gso_size;
|
||||
shinfo->gso_type = gso_type;
|
||||
|
||||
skb_shinfo(skb)->gso_size = gso_size;
|
||||
skb_shinfo(skb)->gso_type = gso_type;
|
||||
|
||||
/* Header must be checked, and gso_segs computed. */
|
||||
skb_shinfo(skb)->gso_type |= SKB_GSO_DODGY;
|
||||
skb_shinfo(skb)->gso_segs = 0;
|
||||
/* Header must be checked, and gso_segs computed. */
|
||||
shinfo->gso_type |= SKB_GSO_DODGY;
|
||||
shinfo->gso_segs = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -361,11 +361,13 @@ enum {
|
||||
ipv4_is_anycast_6to4(a))
|
||||
|
||||
/* Flags used for the bind address copy functions. */
|
||||
#define SCTP_ADDR6_ALLOWED 0x00000001 /* IPv6 address is allowed by
|
||||
#define SCTP_ADDR4_ALLOWED 0x00000001 /* IPv4 address is allowed by
|
||||
local sock family */
|
||||
#define SCTP_ADDR4_PEERSUPP 0x00000002 /* IPv4 address is supported by
|
||||
#define SCTP_ADDR6_ALLOWED 0x00000002 /* IPv6 address is allowed by
|
||||
local sock family */
|
||||
#define SCTP_ADDR4_PEERSUPP 0x00000004 /* IPv4 address is supported by
|
||||
peer */
|
||||
#define SCTP_ADDR6_PEERSUPP 0x00000004 /* IPv6 address is supported by
|
||||
#define SCTP_ADDR6_PEERSUPP 0x00000008 /* IPv6 address is supported by
|
||||
peer */
|
||||
|
||||
/* Reasons to retransmit. */
|
||||
|
||||
@@ -1688,7 +1688,6 @@ static inline int sk_tx_queue_get(const struct sock *sk)
|
||||
|
||||
static inline void sk_set_socket(struct sock *sk, struct socket *sock)
|
||||
{
|
||||
sk_tx_queue_clear(sk);
|
||||
sk->sk_socket = sock;
|
||||
}
|
||||
|
||||
|
||||
@@ -3930,7 +3930,8 @@ void rt_mutex_setprio(struct task_struct *p, struct task_struct *pi_task)
|
||||
*/
|
||||
if (dl_prio(prio)) {
|
||||
if (!dl_prio(p->normal_prio) ||
|
||||
(pi_task && dl_entity_preempt(&pi_task->dl, &p->dl))) {
|
||||
(pi_task && dl_prio(pi_task->prio) &&
|
||||
dl_entity_preempt(&pi_task->dl, &p->dl))) {
|
||||
p->dl.dl_boosted = 1;
|
||||
queue_flag |= ENQUEUE_REPLENISH;
|
||||
} else
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/blktrace_api.h>
|
||||
@@ -504,6 +507,16 @@ static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
|
||||
*/
|
||||
strreplace(buts->name, '/', '_');
|
||||
|
||||
/*
|
||||
* bdev can be NULL, as with scsi-generic, this is a helpful as
|
||||
* we can be.
|
||||
*/
|
||||
if (q->blk_trace) {
|
||||
pr_warn("Concurrent blktraces are not allowed on %s\n",
|
||||
buts->name);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
bt = kzalloc(sizeof(*bt), GFP_KERNEL);
|
||||
if (!bt)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -223,11 +223,17 @@ static int event_trigger_regex_open(struct inode *inode, struct file *file)
|
||||
|
||||
static int trigger_process_regex(struct trace_event_file *file, char *buff)
|
||||
{
|
||||
char *command, *next = buff;
|
||||
char *command, *next;
|
||||
struct event_command *p;
|
||||
int ret = -EINVAL;
|
||||
|
||||
next = buff = skip_spaces(buff);
|
||||
command = strsep(&next, ": \t");
|
||||
if (next) {
|
||||
next = skip_spaces(next);
|
||||
if (!*next)
|
||||
next = NULL;
|
||||
}
|
||||
command = (command[0] != '!') ? command : command + 1;
|
||||
|
||||
mutex_lock(&trigger_cmd_mutex);
|
||||
@@ -630,8 +636,14 @@ event_trigger_callback(struct event_command *cmd_ops,
|
||||
int ret;
|
||||
|
||||
/* separate the trigger from the filter (t:n [if filter]) */
|
||||
if (param && isdigit(param[0]))
|
||||
if (param && isdigit(param[0])) {
|
||||
trigger = strsep(¶m, " \t");
|
||||
if (param) {
|
||||
param = skip_spaces(param);
|
||||
if (!*param)
|
||||
param = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
trigger_ops = cmd_ops->get_trigger_ops(cmd, trigger);
|
||||
|
||||
@@ -1342,6 +1354,11 @@ int event_enable_trigger_func(struct event_command *cmd_ops,
|
||||
trigger = strsep(¶m, " \t");
|
||||
if (!trigger)
|
||||
return -EINVAL;
|
||||
if (param) {
|
||||
param = skip_spaces(param);
|
||||
if (!*param)
|
||||
param = NULL;
|
||||
}
|
||||
|
||||
system = strsep(&trigger, ":");
|
||||
if (!trigger)
|
||||
|
||||
@@ -1470,7 +1470,7 @@ void kzfree(const void *p)
|
||||
if (unlikely(ZERO_OR_NULL_PTR(mem)))
|
||||
return;
|
||||
ks = ksize(mem);
|
||||
memset(mem, 0, ks);
|
||||
memzero_explicit(mem, ks);
|
||||
kfree(mem);
|
||||
}
|
||||
EXPORT_SYMBOL(kzfree);
|
||||
|
||||
@@ -190,8 +190,8 @@ struct net_bridge_port_group {
|
||||
struct rcu_head rcu;
|
||||
struct timer_list timer;
|
||||
struct br_ip addr;
|
||||
unsigned char eth_addr[ETH_ALEN] __aligned(2);
|
||||
unsigned char flags;
|
||||
unsigned char eth_addr[ETH_ALEN];
|
||||
};
|
||||
|
||||
struct net_bridge_mdb_entry
|
||||
|
||||
@@ -7770,6 +7770,13 @@ int register_netdevice(struct net_device *dev)
|
||||
rcu_barrier();
|
||||
|
||||
dev->reg_state = NETREG_UNREGISTERED;
|
||||
/* We should put the kobject that hold in
|
||||
* netdev_unregister_kobject(), otherwise
|
||||
* the net device cannot be freed when
|
||||
* driver calls free_netdev(), because the
|
||||
* kobject is being hold.
|
||||
*/
|
||||
kobject_put(&dev->dev.kobj);
|
||||
}
|
||||
/*
|
||||
* Prevent userspace races by waiting until the network
|
||||
|
||||
@@ -1538,6 +1538,7 @@ struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
|
||||
cgroup_sk_alloc(&sk->sk_cgrp_data);
|
||||
sock_update_classid(&sk->sk_cgrp_data);
|
||||
sock_update_netprioidx(&sk->sk_cgrp_data);
|
||||
sk_tx_queue_clear(sk);
|
||||
}
|
||||
|
||||
return sk;
|
||||
@@ -1740,6 +1741,7 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
|
||||
*/
|
||||
sk_refcnt_debug_inc(newsk);
|
||||
sk_set_socket(newsk, NULL);
|
||||
sk_tx_queue_clear(newsk);
|
||||
newsk->sk_wq = NULL;
|
||||
|
||||
if (newsk->sk_prot->sockets_allocated)
|
||||
|
||||
@@ -839,7 +839,7 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
|
||||
if (fl4.flowi4_scope < RT_SCOPE_LINK)
|
||||
fl4.flowi4_scope = RT_SCOPE_LINK;
|
||||
|
||||
if (cfg->fc_table)
|
||||
if (cfg->fc_table && cfg->fc_table != RT_TABLE_MAIN)
|
||||
tbl = fib_get_table(net, cfg->fc_table);
|
||||
|
||||
if (tbl)
|
||||
|
||||
@@ -98,9 +98,10 @@ struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn,
|
||||
__be32 remote, __be32 local,
|
||||
__be32 key)
|
||||
{
|
||||
unsigned int hash;
|
||||
struct ip_tunnel *t, *cand = NULL;
|
||||
struct hlist_head *head;
|
||||
struct net_device *ndev;
|
||||
unsigned int hash;
|
||||
|
||||
hash = ip_tunnel_hash(key, remote);
|
||||
head = &itn->tunnels[hash];
|
||||
@@ -175,8 +176,9 @@ struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn,
|
||||
if (t && t->dev->flags & IFF_UP)
|
||||
return t;
|
||||
|
||||
if (itn->fb_tunnel_dev && itn->fb_tunnel_dev->flags & IFF_UP)
|
||||
return netdev_priv(itn->fb_tunnel_dev);
|
||||
ndev = READ_ONCE(itn->fb_tunnel_dev);
|
||||
if (ndev && ndev->flags & IFF_UP)
|
||||
return netdev_priv(ndev);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -1211,9 +1213,9 @@ void ip_tunnel_uninit(struct net_device *dev)
|
||||
struct ip_tunnel_net *itn;
|
||||
|
||||
itn = net_generic(net, tunnel->ip_tnl_net_id);
|
||||
/* fb_tunnel_dev will be unregisted in net-exit call. */
|
||||
if (itn->fb_tunnel_dev != dev)
|
||||
ip_tunnel_del(itn, netdev_priv(dev));
|
||||
ip_tunnel_del(itn, netdev_priv(dev));
|
||||
if (itn->fb_tunnel_dev == dev)
|
||||
WRITE_ONCE(itn->fb_tunnel_dev, NULL);
|
||||
|
||||
dst_cache_reset(&tunnel->dst_cache);
|
||||
}
|
||||
|
||||
@@ -403,6 +403,8 @@ static void hystart_update(struct sock *sk, u32 delay)
|
||||
|
||||
if (hystart_detect & HYSTART_DELAY) {
|
||||
/* obtain the minimum delay of more than sampling packets */
|
||||
if (ca->curr_rtt > delay)
|
||||
ca->curr_rtt = delay;
|
||||
if (ca->sample_cnt < HYSTART_MIN_SAMPLES) {
|
||||
if (ca->curr_rtt == 0 || ca->curr_rtt > delay)
|
||||
ca->curr_rtt = delay;
|
||||
|
||||
@@ -4507,7 +4507,11 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
|
||||
if (tcp_ooo_try_coalesce(sk, tp->ooo_last_skb,
|
||||
skb, &fragstolen)) {
|
||||
coalesce_done:
|
||||
tcp_grow_window(sk, skb);
|
||||
/* For non sack flows, do not grow window to force DUPACK
|
||||
* and trigger fast retransmit.
|
||||
*/
|
||||
if (tcp_is_sack(tp))
|
||||
tcp_grow_window(sk, skb);
|
||||
kfree_skb_partial(skb, fragstolen);
|
||||
skb = NULL;
|
||||
goto add_sack;
|
||||
@@ -4591,7 +4595,11 @@ add_sack:
|
||||
tcp_sack_new_ofo_skb(sk, seq, end_seq);
|
||||
end:
|
||||
if (skb) {
|
||||
tcp_grow_window(sk, skb);
|
||||
/* For non sack flows, do not grow window to force DUPACK
|
||||
* and trigger fast retransmit.
|
||||
*/
|
||||
if (tcp_is_sack(tp))
|
||||
tcp_grow_window(sk, skb);
|
||||
skb_condense(skb);
|
||||
skb_set_owner_r(skb, sk);
|
||||
}
|
||||
|
||||
@@ -124,6 +124,7 @@ static struct ip6_tnl *ip6gre_tunnel_lookup(struct net_device *dev,
|
||||
int dev_type = (gre_proto == htons(ETH_P_TEB)) ?
|
||||
ARPHRD_ETHER : ARPHRD_IP6GRE;
|
||||
int score, cand_score = 4;
|
||||
struct net_device *ndev;
|
||||
|
||||
for_each_ip_tunnel_rcu(t, ign->tunnels_r_l[h0 ^ h1]) {
|
||||
if (!ipv6_addr_equal(local, &t->parms.laddr) ||
|
||||
@@ -226,9 +227,9 @@ static struct ip6_tnl *ip6gre_tunnel_lookup(struct net_device *dev,
|
||||
if (cand)
|
||||
return cand;
|
||||
|
||||
dev = ign->fb_tunnel_dev;
|
||||
if (dev->flags & IFF_UP)
|
||||
return netdev_priv(dev);
|
||||
ndev = READ_ONCE(ign->fb_tunnel_dev);
|
||||
if (ndev && ndev->flags & IFF_UP)
|
||||
return netdev_priv(ndev);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -364,6 +365,8 @@ static void ip6gre_tunnel_uninit(struct net_device *dev)
|
||||
struct ip6gre_net *ign = net_generic(t->net, ip6gre_net_id);
|
||||
|
||||
ip6gre_tunnel_unlink(ign, t);
|
||||
if (ign->fb_tunnel_dev == dev)
|
||||
WRITE_ONCE(ign->fb_tunnel_dev, NULL);
|
||||
dst_cache_reset(&t->dst_cache);
|
||||
dev_put(dev);
|
||||
}
|
||||
|
||||
@@ -2599,6 +2599,7 @@ void ipv6_mc_destroy_dev(struct inet6_dev *idev)
|
||||
idev->mc_list = i->next;
|
||||
|
||||
write_unlock_bh(&idev->lock);
|
||||
ip6_mc_clear_src(i);
|
||||
ma_put(i);
|
||||
write_lock_bh(&idev->lock);
|
||||
}
|
||||
|
||||
@@ -381,6 +381,8 @@ ip_set_elem_len(struct ip_set *set, struct nlattr *tb[], size_t len,
|
||||
for (id = 0; id < IPSET_EXT_ID_MAX; id++) {
|
||||
if (!add_extension(id, cadt_flags, tb))
|
||||
continue;
|
||||
if (align < ip_set_extensions[id].align)
|
||||
align = ip_set_extensions[id].align;
|
||||
len = ALIGN(len, ip_set_extensions[id].align);
|
||||
set->offset[id] = len;
|
||||
set->extensions |= ip_set_extensions[id].type;
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
#include <net/ip.h>
|
||||
#include "ar-internal.h"
|
||||
|
||||
static void rxrpc_dummy_notify(struct sock *sk, struct rxrpc_call *call,
|
||||
unsigned long user_call_ID)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Preallocate a single service call, connection and peer and, if possible,
|
||||
* give them a user ID and attach the user's side of the ID to them.
|
||||
@@ -227,6 +232,8 @@ void rxrpc_discard_prealloc(struct rxrpc_sock *rx)
|
||||
if (rx->discard_new_call) {
|
||||
_debug("discard %lx", call->user_call_ID);
|
||||
rx->discard_new_call(call, call->user_call_ID);
|
||||
if (call->notify_rx)
|
||||
call->notify_rx = rxrpc_dummy_notify;
|
||||
rxrpc_put_call(call, rxrpc_call_put_kernel);
|
||||
}
|
||||
rxrpc_call_completed(call);
|
||||
|
||||
@@ -664,13 +664,12 @@ static void rxrpc_input_ackinfo(struct rxrpc_call *call, struct sk_buff *skb,
|
||||
ntohl(ackinfo->rxMTU), ntohl(ackinfo->maxMTU),
|
||||
rwind, ntohl(ackinfo->jumbo_max));
|
||||
|
||||
if (rwind > RXRPC_RXTX_BUFF_SIZE - 1)
|
||||
rwind = RXRPC_RXTX_BUFF_SIZE - 1;
|
||||
if (call->tx_winsize != rwind) {
|
||||
if (rwind > RXRPC_RXTX_BUFF_SIZE - 1)
|
||||
rwind = RXRPC_RXTX_BUFF_SIZE - 1;
|
||||
if (rwind > call->tx_winsize)
|
||||
wake = true;
|
||||
trace_rxrpc_rx_rwind_change(call, sp->hdr.serial,
|
||||
ntohl(ackinfo->rwind), wake);
|
||||
trace_rxrpc_rx_rwind_change(call, sp->hdr.serial, rwind, wake);
|
||||
call->tx_winsize = rwind;
|
||||
}
|
||||
|
||||
|
||||
@@ -341,6 +341,7 @@ void __netdev_watchdog_up(struct net_device *dev)
|
||||
dev_hold(dev);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__netdev_watchdog_up);
|
||||
|
||||
static void dev_watchdog_up(struct net_device *dev)
|
||||
{
|
||||
|
||||
@@ -1598,12 +1598,15 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *asoc, unsigned int len)
|
||||
int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *asoc,
|
||||
enum sctp_scope scope, gfp_t gfp)
|
||||
{
|
||||
struct sock *sk = asoc->base.sk;
|
||||
int flags;
|
||||
|
||||
/* Use scoping rules to determine the subset of addresses from
|
||||
* the endpoint.
|
||||
*/
|
||||
flags = (PF_INET6 == asoc->base.sk->sk_family) ? SCTP_ADDR6_ALLOWED : 0;
|
||||
flags = (PF_INET6 == sk->sk_family) ? SCTP_ADDR6_ALLOWED : 0;
|
||||
if (!inet_v6_ipv6only(sk))
|
||||
flags |= SCTP_ADDR4_ALLOWED;
|
||||
if (asoc->peer.ipv4_address)
|
||||
flags |= SCTP_ADDR4_PEERSUPP;
|
||||
if (asoc->peer.ipv6_address)
|
||||
|
||||
@@ -453,6 +453,7 @@ static int sctp_copy_one_addr(struct net *net, struct sctp_bind_addr *dest,
|
||||
* well as the remote peer.
|
||||
*/
|
||||
if ((((AF_INET == addr->sa.sa_family) &&
|
||||
(flags & SCTP_ADDR4_ALLOWED) &&
|
||||
(flags & SCTP_ADDR4_PEERSUPP))) ||
|
||||
(((AF_INET6 == addr->sa.sa_family) &&
|
||||
(flags & SCTP_ADDR6_ALLOWED) &&
|
||||
|
||||
@@ -213,7 +213,8 @@ int sctp_copy_local_addr_list(struct net *net, struct sctp_bind_addr *bp,
|
||||
* sock as well as the remote peer.
|
||||
*/
|
||||
if (addr->a.sa.sa_family == AF_INET &&
|
||||
!(copy_flags & SCTP_ADDR4_PEERSUPP))
|
||||
(!(copy_flags & SCTP_ADDR4_ALLOWED) ||
|
||||
!(copy_flags & SCTP_ADDR4_PEERSUPP)))
|
||||
continue;
|
||||
if (addr->a.sa.sa_family == AF_INET6 &&
|
||||
(!(copy_flags & SCTP_ADDR6_ALLOWED) ||
|
||||
|
||||
@@ -1347,6 +1347,7 @@ rpc_gssd_dummy_populate(struct dentry *root, struct rpc_pipe *pipe_data)
|
||||
q.len = strlen(gssd_dummy_clnt_dir[0].name);
|
||||
clnt_dentry = d_hash_and_lookup(gssd_dentry, &q);
|
||||
if (!clnt_dentry) {
|
||||
__rpc_depopulate(gssd_dentry, gssd_dummy_clnt_dir, 0, 1);
|
||||
pipe_dentry = ERR_PTR(-ENOENT);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -1036,6 +1036,7 @@ xdr_buf_subsegment(struct xdr_buf *buf, struct xdr_buf *subbuf,
|
||||
base = 0;
|
||||
} else {
|
||||
base -= buf->head[0].iov_len;
|
||||
subbuf->head[0].iov_base = buf->head[0].iov_base;
|
||||
subbuf->head[0].iov_len = 0;
|
||||
}
|
||||
|
||||
@@ -1048,6 +1049,8 @@ xdr_buf_subsegment(struct xdr_buf *buf, struct xdr_buf *subbuf,
|
||||
base = 0;
|
||||
} else {
|
||||
base -= buf->page_len;
|
||||
subbuf->pages = buf->pages;
|
||||
subbuf->page_base = 0;
|
||||
subbuf->page_len = 0;
|
||||
}
|
||||
|
||||
@@ -1059,6 +1062,7 @@ xdr_buf_subsegment(struct xdr_buf *buf, struct xdr_buf *subbuf,
|
||||
base = 0;
|
||||
} else {
|
||||
base -= buf->tail[0].iov_len;
|
||||
subbuf->tail[0].iov_base = buf->tail[0].iov_base;
|
||||
subbuf->tail[0].iov_len = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,20 +82,21 @@ cc-cross-prefix = \
|
||||
fi)))
|
||||
|
||||
# output directory for tests below
|
||||
TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
|
||||
TMPOUT = $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_$$$$
|
||||
|
||||
# try-run
|
||||
# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
|
||||
# Exit code chooses option. "$$TMP" serves as a temporary file and is
|
||||
# automatically cleaned up.
|
||||
try-run = $(shell set -e; \
|
||||
TMP="$(TMPOUT).$$$$.tmp"; \
|
||||
TMPO="$(TMPOUT).$$$$.o"; \
|
||||
TMP=$(TMPOUT)/tmp; \
|
||||
TMPO=$(TMPOUT)/tmp.o; \
|
||||
mkdir -p $(TMPOUT); \
|
||||
trap "rm -rf $(TMPOUT)" EXIT; \
|
||||
if ($(1)) >/dev/null 2>&1; \
|
||||
then echo "$(2)"; \
|
||||
else echo "$(3)"; \
|
||||
fi; \
|
||||
rm -f "$$TMP" "$$TMPO")
|
||||
fi)
|
||||
|
||||
# as-option
|
||||
# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
|
||||
|
||||
@@ -381,7 +381,7 @@ cmd_lzo = (cat $(filter-out FORCE,$^) | \
|
||||
|
||||
quiet_cmd_lz4 = LZ4 $@
|
||||
cmd_lz4 = (cat $(filter-out FORCE,$^) | \
|
||||
lz4 -c -l -12 --favor-decSpeed stdin stdout && \
|
||||
lz4 -l -12 --favor-decSpeed stdin stdout && \
|
||||
$(call size_append, $(filter-out FORCE,$^))) > $@ || \
|
||||
(rm -f $@ ; false)
|
||||
|
||||
|
||||
@@ -123,11 +123,11 @@ static int apparmor_ptrace_traceme(struct task_struct *parent)
|
||||
struct aa_label *tracer, *tracee;
|
||||
int error;
|
||||
|
||||
tracee = begin_current_label_crit_section();
|
||||
tracee = __begin_current_label_crit_section();
|
||||
tracer = aa_get_task_label(parent);
|
||||
error = aa_may_ptrace(tracer, tracee, AA_PTRACE_TRACE);
|
||||
aa_put_label(tracer);
|
||||
end_current_label_crit_section(tracee);
|
||||
__end_current_label_crit_section(tracee);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -3861,6 +3861,11 @@ HDA_CODEC_ENTRY(0x10de0095, "GPU 95 HDMI/DP", patch_nvhdmi),
|
||||
HDA_CODEC_ENTRY(0x10de0097, "GPU 97 HDMI/DP", patch_nvhdmi),
|
||||
HDA_CODEC_ENTRY(0x10de0098, "GPU 98 HDMI/DP", patch_nvhdmi),
|
||||
HDA_CODEC_ENTRY(0x10de0099, "GPU 99 HDMI/DP", patch_nvhdmi),
|
||||
HDA_CODEC_ENTRY(0x10de009a, "GPU 9a HDMI/DP", patch_nvhdmi),
|
||||
HDA_CODEC_ENTRY(0x10de009d, "GPU 9d HDMI/DP", patch_nvhdmi),
|
||||
HDA_CODEC_ENTRY(0x10de009e, "GPU 9e HDMI/DP", patch_nvhdmi),
|
||||
HDA_CODEC_ENTRY(0x10de009f, "GPU 9f HDMI/DP", patch_nvhdmi),
|
||||
HDA_CODEC_ENTRY(0x10de00a0, "GPU a0 HDMI/DP", patch_nvhdmi),
|
||||
HDA_CODEC_ENTRY(0x10de8001, "MCP73 HDMI", patch_nvhdmi_2ch),
|
||||
HDA_CODEC_ENTRY(0x10de8067, "MCP67/68 HDMI", patch_nvhdmi_2ch),
|
||||
HDA_CODEC_ENTRY(0x11069f80, "VX900 HDMI/DP", patch_via_hdmi),
|
||||
|
||||
@@ -478,8 +478,10 @@ static int rockchip_pdm_resume(struct device *dev)
|
||||
int ret;
|
||||
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
pm_runtime_put(dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = regcache_sync(pdm->regmap);
|
||||
|
||||
|
||||
@@ -603,8 +603,9 @@ static int check_matrix_bitmap(unsigned char *bmap,
|
||||
* if failed, give up and free the control instance.
|
||||
*/
|
||||
|
||||
int snd_usb_mixer_add_control(struct usb_mixer_elem_list *list,
|
||||
struct snd_kcontrol *kctl)
|
||||
int snd_usb_mixer_add_list(struct usb_mixer_elem_list *list,
|
||||
struct snd_kcontrol *kctl,
|
||||
bool is_std_info)
|
||||
{
|
||||
struct usb_mixer_interface *mixer = list->mixer;
|
||||
int err;
|
||||
@@ -617,6 +618,7 @@ int snd_usb_mixer_add_control(struct usb_mixer_elem_list *list,
|
||||
return err;
|
||||
}
|
||||
list->kctl = kctl;
|
||||
list->is_std_info = is_std_info;
|
||||
list->next_id_elem = mixer->id_elems[list->id];
|
||||
mixer->id_elems[list->id] = list;
|
||||
return 0;
|
||||
@@ -2750,15 +2752,23 @@ void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer, int unitid)
|
||||
{
|
||||
struct usb_mixer_elem_list *list;
|
||||
|
||||
for (list = mixer->id_elems[unitid]; list; list = list->next_id_elem)
|
||||
for_each_mixer_elem(list, mixer, unitid) {
|
||||
struct usb_mixer_elem_info *info;
|
||||
|
||||
if (!list->is_std_info)
|
||||
continue;
|
||||
info = mixer_elem_list_to_info(list);
|
||||
/* invalidate cache, so the value is read from the device */
|
||||
info->cached = 0;
|
||||
snd_ctl_notify(mixer->chip->card, SNDRV_CTL_EVENT_MASK_VALUE,
|
||||
&list->kctl->id);
|
||||
}
|
||||
}
|
||||
|
||||
static void snd_usb_mixer_dump_cval(struct snd_info_buffer *buffer,
|
||||
struct usb_mixer_elem_list *list)
|
||||
{
|
||||
struct usb_mixer_elem_info *cval = (struct usb_mixer_elem_info *)list;
|
||||
struct usb_mixer_elem_info *cval = mixer_elem_list_to_info(list);
|
||||
static char *val_types[] = {"BOOLEAN", "INV_BOOLEAN",
|
||||
"S8", "U8", "S16", "U16"};
|
||||
snd_iprintf(buffer, " Info: id=%i, control=%i, cmask=0x%x, "
|
||||
@@ -2784,8 +2794,7 @@ static void snd_usb_mixer_proc_read(struct snd_info_entry *entry,
|
||||
mixer->ignore_ctl_error);
|
||||
snd_iprintf(buffer, "Card: %s\n", chip->card->longname);
|
||||
for (unitid = 0; unitid < MAX_ID_ELEMS; unitid++) {
|
||||
for (list = mixer->id_elems[unitid]; list;
|
||||
list = list->next_id_elem) {
|
||||
for_each_mixer_elem(list, mixer, unitid) {
|
||||
snd_iprintf(buffer, " Unit: %i\n", list->id);
|
||||
if (list->kctl)
|
||||
snd_iprintf(buffer,
|
||||
@@ -2815,19 +2824,21 @@ static void snd_usb_mixer_interrupt_v2(struct usb_mixer_interface *mixer,
|
||||
return;
|
||||
}
|
||||
|
||||
for (list = mixer->id_elems[unitid]; list; list = list->next_id_elem)
|
||||
for_each_mixer_elem(list, mixer, unitid)
|
||||
count++;
|
||||
|
||||
if (count == 0)
|
||||
return;
|
||||
|
||||
for (list = mixer->id_elems[unitid]; list; list = list->next_id_elem) {
|
||||
for_each_mixer_elem(list, mixer, unitid) {
|
||||
struct usb_mixer_elem_info *info;
|
||||
|
||||
if (!list->kctl)
|
||||
continue;
|
||||
if (!list->is_std_info)
|
||||
continue;
|
||||
|
||||
info = (struct usb_mixer_elem_info *)list;
|
||||
info = mixer_elem_list_to_info(list);
|
||||
if (count > 1 && info->control != control)
|
||||
continue;
|
||||
|
||||
@@ -3050,7 +3061,7 @@ int snd_usb_mixer_suspend(struct usb_mixer_interface *mixer)
|
||||
|
||||
static int restore_mixer_value(struct usb_mixer_elem_list *list)
|
||||
{
|
||||
struct usb_mixer_elem_info *cval = (struct usb_mixer_elem_info *)list;
|
||||
struct usb_mixer_elem_info *cval = mixer_elem_list_to_info(list);
|
||||
int c, err, idx;
|
||||
|
||||
if (cval->cmask) {
|
||||
@@ -3086,8 +3097,7 @@ int snd_usb_mixer_resume(struct usb_mixer_interface *mixer, bool reset_resume)
|
||||
if (reset_resume) {
|
||||
/* restore cached mixer values */
|
||||
for (id = 0; id < MAX_ID_ELEMS; id++) {
|
||||
for (list = mixer->id_elems[id]; list;
|
||||
list = list->next_id_elem) {
|
||||
for_each_mixer_elem(list, mixer, id) {
|
||||
if (list->resume) {
|
||||
err = list->resume(list);
|
||||
if (err < 0)
|
||||
|
||||
@@ -49,10 +49,17 @@ struct usb_mixer_elem_list {
|
||||
struct usb_mixer_elem_list *next_id_elem; /* list of controls with same id */
|
||||
struct snd_kcontrol *kctl;
|
||||
unsigned int id;
|
||||
bool is_std_info;
|
||||
usb_mixer_elem_dump_func_t dump;
|
||||
usb_mixer_elem_resume_func_t resume;
|
||||
};
|
||||
|
||||
/* iterate over mixer element list of the given unit id */
|
||||
#define for_each_mixer_elem(list, mixer, id) \
|
||||
for ((list) = (mixer)->id_elems[id]; (list); (list) = (list)->next_id_elem)
|
||||
#define mixer_elem_list_to_info(list) \
|
||||
container_of(list, struct usb_mixer_elem_info, head)
|
||||
|
||||
struct usb_mixer_elem_info {
|
||||
struct usb_mixer_elem_list head;
|
||||
unsigned int control; /* CS or ICN (high byte) */
|
||||
@@ -80,8 +87,12 @@ void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer, int unitid);
|
||||
int snd_usb_mixer_set_ctl_value(struct usb_mixer_elem_info *cval,
|
||||
int request, int validx, int value_set);
|
||||
|
||||
int snd_usb_mixer_add_control(struct usb_mixer_elem_list *list,
|
||||
struct snd_kcontrol *kctl);
|
||||
int snd_usb_mixer_add_list(struct usb_mixer_elem_list *list,
|
||||
struct snd_kcontrol *kctl,
|
||||
bool is_std_info);
|
||||
|
||||
#define snd_usb_mixer_add_control(list, kctl) \
|
||||
snd_usb_mixer_add_list(list, kctl, true)
|
||||
|
||||
void snd_usb_mixer_elem_init_std(struct usb_mixer_elem_list *list,
|
||||
struct usb_mixer_interface *mixer,
|
||||
|
||||
@@ -169,7 +169,8 @@ static int add_single_ctl_with_resume(struct usb_mixer_interface *mixer,
|
||||
return -ENOMEM;
|
||||
}
|
||||
kctl->private_free = snd_usb_mixer_elem_free;
|
||||
return snd_usb_mixer_add_control(list, kctl);
|
||||
/* don't use snd_usb_mixer_add_control() here, this is a special list element */
|
||||
return snd_usb_mixer_add_list(list, kctl, false);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1171,7 +1172,7 @@ void snd_emuusb_set_samplerate(struct snd_usb_audio *chip,
|
||||
int unitid = 12; /* SamleRate ExtensionUnit ID */
|
||||
|
||||
list_for_each_entry(mixer, &chip->mixer_list, list) {
|
||||
cval = (struct usb_mixer_elem_info *)mixer->id_elems[unitid];
|
||||
cval = mixer_elem_list_to_info(mixer->id_elems[unitid]);
|
||||
if (cval) {
|
||||
snd_usb_mixer_set_ctl_value(cval, UAC_SET_CUR,
|
||||
cval->control << 8,
|
||||
|
||||
@@ -287,8 +287,7 @@ static int scarlett_ctl_switch_put(struct snd_kcontrol *kctl,
|
||||
|
||||
static int scarlett_ctl_resume(struct usb_mixer_elem_list *list)
|
||||
{
|
||||
struct usb_mixer_elem_info *elem =
|
||||
container_of(list, struct usb_mixer_elem_info, head);
|
||||
struct usb_mixer_elem_info *elem = mixer_elem_list_to_info(list);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < elem->channels; i++)
|
||||
@@ -447,8 +446,7 @@ static int scarlett_ctl_enum_put(struct snd_kcontrol *kctl,
|
||||
|
||||
static int scarlett_ctl_enum_resume(struct usb_mixer_elem_list *list)
|
||||
{
|
||||
struct usb_mixer_elem_info *elem =
|
||||
container_of(list, struct usb_mixer_elem_info, head);
|
||||
struct usb_mixer_elem_info *elem = mixer_elem_list_to_info(list);
|
||||
|
||||
if (elem->cached)
|
||||
snd_usb_set_cur_mix_value(elem, 0, 0, *elem->cache_val);
|
||||
|
||||
@@ -1164,6 +1164,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
|
||||
static bool is_itf_usb_dsd_2alts_dac(unsigned int id)
|
||||
{
|
||||
switch (id) {
|
||||
case USB_ID(0x154e, 0x1002): /* Denon DCD-1500RE */
|
||||
case USB_ID(0x154e, 0x1003): /* Denon DA-300USB */
|
||||
case USB_ID(0x154e, 0x3005): /* Marantz HD-DAC1 */
|
||||
case USB_ID(0x154e, 0x3006): /* Marantz SA-14S1 */
|
||||
|
||||
Reference in New Issue
Block a user