mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
Linux 4.19.131
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE4n5dijQDou9mhzu83qZv95d3LNwFAl78APEACgkQ3qZv95d3 LNyt+w/+PkFP8++ZsiI6GegXraxVbGuY4ndXroXAiTYa0uZjdsIhqJpgyVsJ/pbq jU/Hcfv8a0UGme7Hqy61KwN6aaCpM27zxE3aV/N9othtJWn59hiB51CyCcKMrjxK Mj6PN+yHxLPzCNBszEvOsICsBQt9HtJB11gcbJQPJ2skriVxSER0QrZi2s5jJuoS vVbxfRngXCnzTsxmpbYjMh1sE9/z/dNpCuyQ13f1MPAPpWFP1SxmMUfknXEO8gkF ThRIhI6uHDucAQxhP42McBsuoP64KfB90fKzFEuWmlit4OCmqW9subTeaI8V1muK CxkPqwRnyYmqbAM9auRwbJxtYfT0ONtDZj4zbLulq4qMTJF650968RQNIW+B1K3C jika93Am0YbNPOyq3m9Ac96NaTFjjhpIzu13P6xUQNf3/ydPKY9PHif2CnWCHPsX BO9fap7gsWHa88khjEGYXwcQCOC+UzQlcsT6CsWPTUTmcLObHiv863Rqm7LpXjit 9gjKlNHdP6U0q+bz5aiiEtoNJ/2ZDwoz1I+srbrk7QMdVzAn+uRRtLRQxmJtryw1 oTnJJu0iv9Zspn/PFXwlrpsYDDEBFfXFWvC+izfz8nm8CPFKgH9G96XNefcXlI9e 3qxjDpkFb74R6ovnWKtJY8pR1qX/5TRC0/+/WpbZBILqW4Z0k5w= =YVa/ -----END PGP SIGNATURE----- Merge 4.19.131 into android-4.19-stable Changes in 4.19.131 net: be more gentle about silly gso requests coming from user block/bio-integrity: don't free 'buf' if bio_integrity_add_page() failed fanotify: fix ignore mask logic for events on child and on dir mtd: rawnand: marvell: Fix the condition on a return code net: bcmgenet: remove HFB_CTRL access net: sched: export __netdev_watchdog_up() EDAC/amd64: Add Family 17h Model 30h PCI IDs i2c: tegra: Cleanup kerneldoc comments i2c: tegra: Add missing kerneldoc for some fields i2c: tegra: Fix Maximum transfer size fix a braino in "sparc32: fix register window handling in genregs32_[gs]et()" ALSA: hda/realtek - Enable the headset of ASUS B9450FA with ALC294 ALSA: hda/realtek: Enable mute LED on an HP system ALSA: hda/realtek - Enable micmute LED on and HP system apparmor: don't try to replace stale label in ptraceme check ibmveth: Fix max MTU limit mld: fix memory leak in ipv6_mc_destroy_dev() net: bridge: enfore alignment for ethernet address net: fix memleak in register_netdevice() net: place xmit recursion in softnet data net: use correct this_cpu primitive in dev_recursion_level net: increment xmit_recursion level in dev_direct_xmit() net: usb: ax88179_178a: fix packet alignment padding rocker: fix incorrect error handling in dma_rings_init rxrpc: Fix notification call on completion of discarded calls sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket tcp: don't ignore ECN CWR on pure ACK tcp: grow window for OOO packets only for SACK flows tg3: driver sleeps indefinitely when EEH errors exceed eeh_max_freezes ip6_gre: fix use-after-free in ip6gre_tunnel_lookup() net: phy: Check harder for errors in get_phy_id() ip_tunnel: fix use-after-free in ip_tunnel_lookup() sch_cake: don't try to reallocate or unshare skb unconditionally sch_cake: fix a few style nits tcp_cubic: fix spurious HYSTART_DELAY exit upon drop in min RTT sch_cake: don't call diffserv parsing code when it is not needed net: Fix the arp error in some cases net: Do not clear the sock TX queue in sk_set_socket() net: core: reduce recursion limit value USB: ohci-sm501: Add missed iounmap() in remove usb: dwc2: Postponed gadget registration to the udc class driver usb: add USB_QUIRK_DELAY_INIT for Logitech C922 USB: ehci: reopen solution for Synopsys HC bug usb: host: xhci-mtk: avoid runtime suspend when removing hcd xhci: Poll for U0 after disabling USB2 LPM usb: host: ehci-exynos: Fix error check in exynos_ehci_probe() usb: typec: tcpci_rt1711h: avoid screaming irq causing boot hangs ALSA: usb-audio: add quirk for Denon DCD-1500RE ALSA: usb-audio: add quirk for Samsung USBC Headset (AKG) ALSA: usb-audio: Fix OOB access of mixer element list scsi: zfcp: Fix panic on ERP timeout for previously dismissed ERP action xhci: Fix incorrect EP_STATE_MASK xhci: Fix enumeration issue when setting max packet size for FS devices. xhci: Return if xHCI doesn't support LPM cdc-acm: Add DISABLE_ECHO quirk for Microchip/SMSC chip loop: replace kill_bdev with invalidate_bdev IB/mad: Fix use after free when destroying MAD agent cifs/smb3: Fix data inconsistent when punch hole cifs/smb3: Fix data inconsistent when zero file range xfrm: Fix double ESP trailer insertion in IPsec crypto offload. ASoC: q6asm: handle EOS correctly efi/esrt: Fix reference count leak in esre_create_sysfs_entry. regualtor: pfuze100: correct sw1a/sw2 on pfuze3000 ASoC: fsl_ssi: Fix bclk calculation for mono channel ARM: dts: Fix duovero smsc interrupt for suspend x86/resctrl: Fix a NULL vs IS_ERR() static checker warning in rdt_cdp_peer_get() regmap: Fix memory leak from regmap_register_patch ARM: dts: NSP: Correct FA2 mailbox node rxrpc: Fix handling of rwind from an ACK packet RDMA/qedr: Fix KASAN: use-after-free in ucma_event_handler+0x532 RDMA/cma: Protect bind_list and listen_list while finding matching cm id ASoC: rockchip: Fix a reference count leak. RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads() net: qed: fix left elements count calculation net: qed: fix NVMe login fails over VFs net: qed: fix excessive QM ILT lines consumption cxgb4: move handling L2T ARP failures to caller ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram() usb: gadget: udc: Potential Oops in error handling code netfilter: ipset: fix unaligned atomic access net: bcmgenet: use hardware padding of runt frames i2c: fsi: Fix the port number field in status register i2c: core: check returned size of emulated smbus block read sched/deadline: Initialize ->dl_boosted sched/core: Fix PI boosting between RT and DEADLINE tasks sata_rcar: handle pm_runtime_get_sync failure cases ata/libata: Fix usage of page address by page_address in ata_scsi_mode_select_xlat function drm/amd/display: Use kfree() to free rgb_user in calculate_user_regamma_ramp() riscv/atomic: Fix sign extension for RV64I hwrng: ks-sa - Fix runtime PM imbalance on error ibmvnic: Harden device login requests net: alx: fix race condition in alx_remove s390/ptrace: fix setting syscall number s390/vdso: fix vDSO clock_getres() arm64: sve: Fix build failure when ARM64_SVE=y and SYSCTL=n kbuild: improve cc-option to clean up all temporary files blktrace: break out of blktrace setup on concurrent calls RISC-V: Don't allow write+exec only page mapping request in mmap ALSA: hda: Add NVIDIA codec IDs 9a & 9d through a0 to patch table ALSA: hda/realtek - Add quirk for MSI GE63 laptop ACPI: sysfs: Fix pm_profile_attr type erofs: fix partially uninitialized misuse in z_erofs_onlinepage_fixup KVM: X86: Fix MSR range of APIC registers in X2APIC mode KVM: nVMX: Plumb L2 GPA through to PML emulation x86/asm/64: Align start of __clear_user() loop to 16-bytes btrfs: fix data block group relocation failure due to concurrent scrub btrfs: fix failure of RWF_NOWAIT write into prealloc extent beyond eof mm/slab: use memzero_explicit() in kzfree() ocfs2: avoid inode removal while nfsd is accessing it ocfs2: load global_inode_alloc ocfs2: fix value of OCFS2_INVALID_SLOT ocfs2: fix panic on nfs server over ocfs2 arm64: perf: Report the PC value in REGS_ABI_32 mode tracing: Fix event trigger to accept redundant spaces ring-buffer: Zero out time extend if it is nested and not absolute drm: rcar-du: Fix build error drm/radeon: fix fb_div check in ni_init_smc_spll_table() Staging: rtl8723bs: prevent buffer overflow in update_sta_support_rate() sunrpc: fixed rollback in rpc_gssd_dummy_populate() SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment() pNFS/flexfiles: Fix list corruption if the mirror count changes NFSv4 fix CLOSE not waiting for direct IO compeletion dm writecache: correct uncommitted_block when discarding uncommitted entry dm writecache: add cond_resched to loop in persistent_memory_claim() xfs: add agf freeblocks verify in xfs_agf_verify Revert "tty: hvc: Fix data abort due to race in hvc_open" Linux 4.19.131 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I2c5abdfc2979e50d441bb0e0bcd499e03c61cefd
This commit is contained in:
commit
b3293788b9
2
Makefile
2
Makefile
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 130
|
||||
SUBLEVEL = 131
|
||||
EXTRAVERSION =
|
||||
NAME = "People's Front"
|
||||
|
||||
|
|
|
|||
|
|
@ -249,10 +249,10 @@ amac2: ethernet@24000 {
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ &gpmc {
|
|||
ethernet@gpmc {
|
||||
reg = <5 0 0xff>;
|
||||
interrupt-parent = <&gpio2>;
|
||||
interrupts = <12 IRQ_TYPE_EDGE_FALLING>; /* gpio_44 */
|
||||
interrupts = <12 IRQ_TYPE_LEVEL_LOW>; /* gpio_44 */
|
||||
|
||||
phy-mode = "mii";
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ static unsigned int find_supported_vector_length(unsigned int vl)
|
|||
return sve_vl_from_vq(bit_to_vq(bit));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
#if defined(CONFIG_ARM64_SVE) && defined(CONFIG_SYSCTL)
|
||||
|
||||
static int sve_proc_do_default_vl(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
|
|
@ -350,9 +350,9 @@ static int __init sve_sysctl_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#else /* ! CONFIG_SYSCTL */
|
||||
#else /* ! (CONFIG_ARM64_SVE && CONFIG_SYSCTL) */
|
||||
static int __init sve_sysctl_init(void) { return 0; }
|
||||
#endif /* ! CONFIG_SYSCTL */
|
||||
#endif /* ! (CONFIG_ARM64_SVE && CONFIG_SYSCTL) */
|
||||
|
||||
#define ZREG(sve_state, vq, n) ((char *)(sve_state) + \
|
||||
(SVE_SIG_ZREG_OFFSET(vq, n) - SVE_SIG_REGS_OFFSET))
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@
|
|||
" bnez %1, 0b\n" \
|
||||
"1:\n" \
|
||||
: "=&r" (__ret), "=&r" (__rc), "+A" (*__ptr) \
|
||||
: "rJ" (__old), "rJ" (__new) \
|
||||
: "rJ" ((long)__old), "rJ" (__new) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
case 8: \
|
||||
|
|
@ -232,7 +232,7 @@
|
|||
RISCV_ACQUIRE_BARRIER \
|
||||
"1:\n" \
|
||||
: "=&r" (__ret), "=&r" (__rc), "+A" (*__ptr) \
|
||||
: "rJ" (__old), "rJ" (__new) \
|
||||
: "rJ" ((long)__old), "rJ" (__new) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
case 8: \
|
||||
|
|
@ -278,7 +278,7 @@
|
|||
" bnez %1, 0b\n" \
|
||||
"1:\n" \
|
||||
: "=&r" (__ret), "=&r" (__rc), "+A" (*__ptr) \
|
||||
: "rJ" (__old), "rJ" (__new) \
|
||||
: "rJ" ((long)__old), "rJ" (__new) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
case 8: \
|
||||
|
|
@ -324,7 +324,7 @@
|
|||
" fence rw, rw\n" \
|
||||
"1:\n" \
|
||||
: "=&r" (__ret), "=&r" (__rc), "+A" (*__ptr) \
|
||||
: "rJ" (__old), "rJ" (__new) \
|
||||
: "rJ" ((long)__old), "rJ" (__new) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
case 8: \
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include <linux/syscalls.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm-generic/mman-common.h>
|
||||
|
||||
static long riscv_sys_mmap(unsigned long addr, unsigned long len,
|
||||
unsigned long prot, unsigned long flags,
|
||||
|
|
@ -24,6 +25,11 @@ static long riscv_sys_mmap(unsigned long addr, unsigned long len,
|
|||
{
|
||||
if (unlikely(offset & (~PAGE_MASK >> page_shift_offset)))
|
||||
return -EINVAL;
|
||||
|
||||
if ((prot & PROT_WRITE) && (prot & PROT_EXEC))
|
||||
if (unlikely(!(prot & PROT_READ)))
|
||||
return -EINVAL;
|
||||
|
||||
return ksys_mmap_pgoff(addr, len, prot, flags, fd,
|
||||
offset >> (PAGE_SHIFT - page_shift_offset));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ struct vdso_data {
|
|||
__u32 tk_shift; /* Shift used for xtime_nsec 0x60 */
|
||||
__u32 ts_dir; /* TOD steering direction 0x64 */
|
||||
__u64 ts_end; /* TOD steering end 0x68 */
|
||||
__u32 hrtimer_res; /* hrtimer resolution 0x70 */
|
||||
};
|
||||
|
||||
struct vdso_per_cpu_data {
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ int main(void)
|
|||
OFFSET(__VDSO_TK_SHIFT, vdso_data, tk_shift);
|
||||
OFFSET(__VDSO_TS_DIR, vdso_data, ts_dir);
|
||||
OFFSET(__VDSO_TS_END, vdso_data, ts_end);
|
||||
OFFSET(__VDSO_CLOCK_REALTIME_RES, vdso_data, hrtimer_res);
|
||||
OFFSET(__VDSO_ECTG_BASE, vdso_per_cpu_data, ectg_timer_base);
|
||||
OFFSET(__VDSO_ECTG_USER, vdso_per_cpu_data, ectg_user_time);
|
||||
OFFSET(__VDSO_CPU_NR, vdso_per_cpu_data, cpu_nr);
|
||||
|
|
@ -86,7 +87,6 @@ int main(void)
|
|||
DEFINE(__CLOCK_REALTIME_COARSE, CLOCK_REALTIME_COARSE);
|
||||
DEFINE(__CLOCK_MONOTONIC_COARSE, CLOCK_MONOTONIC_COARSE);
|
||||
DEFINE(__CLOCK_THREAD_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID);
|
||||
DEFINE(__CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC);
|
||||
DEFINE(__CLOCK_COARSE_RES, LOW_RES_NSEC);
|
||||
BLANK();
|
||||
/* idle data offsets */
|
||||
|
|
|
|||
|
|
@ -325,6 +325,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.
|
||||
|
|
@ -336,7 +355,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
|
||||
*/
|
||||
|
|
@ -354,7 +375,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)) {
|
||||
/*
|
||||
|
|
@ -720,6 +745,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -310,6 +310,7 @@ void update_vsyscall(struct timekeeper *tk)
|
|||
|
||||
vdso_data->tk_mult = tk->tkr_mono.mult;
|
||||
vdso_data->tk_shift = tk->tkr_mono.shift;
|
||||
vdso_data->hrtimer_res = hrtimer_resolution;
|
||||
smp_wmb();
|
||||
++vdso_data->tb_update_count;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,12 +17,14 @@
|
|||
.type __kernel_clock_getres,@function
|
||||
__kernel_clock_getres:
|
||||
CFI_STARTPROC
|
||||
larl %r1,4f
|
||||
larl %r1,3f
|
||||
lg %r0,0(%r1)
|
||||
cghi %r2,__CLOCK_REALTIME_COARSE
|
||||
je 0f
|
||||
cghi %r2,__CLOCK_MONOTONIC_COARSE
|
||||
je 0f
|
||||
larl %r1,3f
|
||||
larl %r1,_vdso_data
|
||||
llgf %r0,__VDSO_CLOCK_REALTIME_RES(%r1)
|
||||
cghi %r2,__CLOCK_REALTIME
|
||||
je 0f
|
||||
cghi %r2,__CLOCK_MONOTONIC
|
||||
|
|
@ -36,7 +38,6 @@ __kernel_clock_getres:
|
|||
jz 2f
|
||||
0: ltgr %r3,%r3
|
||||
jz 1f /* res == NULL */
|
||||
lg %r0,0(%r1)
|
||||
xc 0(8,%r3),0(%r3) /* set tp->tv_sec to zero */
|
||||
stg %r0,8(%r3) /* store tp->tv_usec */
|
||||
1: lghi %r2,0
|
||||
|
|
@ -45,6 +46,5 @@ __kernel_clock_getres:
|
|||
svc 0
|
||||
br %r14
|
||||
CFI_ENDPROC
|
||||
3: .quad __CLOCK_REALTIME_RES
|
||||
4: .quad __CLOCK_COARSE_RES
|
||||
3: .quad __CLOCK_COARSE_RES
|
||||
.size __kernel_clock_getres,.-__kernel_clock_getres
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -1099,7 +1099,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;
|
||||
|
|
|
|||
|
|
@ -1035,6 +1035,7 @@ static int rdt_cdp_peer_get(struct rdt_resource *r, struct rdt_domain *d,
|
|||
_d_cdp = rdt_find_domain(_r_cdp, d->id, NULL);
|
||||
if (WARN_ON(IS_ERR_OR_NULL(_d_cdp))) {
|
||||
_r_cdp = NULL;
|
||||
_d_cdp = NULL;
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1732,10 +1732,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,7 +215,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)(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 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker,
|
|||
(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)
|
||||
|
|
|
|||
|
|
@ -13845,11 +13845,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;
|
||||
|
||||
|
|
@ -13870,7 +13869,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))
|
||||
|
|
|
|||
|
|
@ -2499,7 +2499,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);
|
||||
|
|
@ -2797,7 +2797,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:
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ unsigned long __clear_user(void __user *addr, unsigned long size)
|
|||
asm volatile(
|
||||
" testq %[size8],%[size8]\n"
|
||||
" jz 4f\n"
|
||||
" .align 16\n"
|
||||
"0: movq $0,(%[dst])\n"
|
||||
" addq $8,%[dst]\n"
|
||||
" decl %%ecx ; jnz 0b\n"
|
||||
|
|
|
|||
|
|
@ -293,7 +293,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -935,13 +935,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,
|
||||
|
|
|
|||
|
|
@ -3995,12 +3995,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");
|
||||
|
||||
|
|
@ -4034,12 +4035,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
|
||||
|
|
|
|||
|
|
@ -909,7 +909,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
|
|||
pm_runtime_enable(dev);
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
if (ret < 0)
|
||||
goto err_pm_disable;
|
||||
goto err_pm_put;
|
||||
|
||||
host = ata_host_alloc(dev, 1);
|
||||
if (!host) {
|
||||
|
|
@ -940,7 +940,6 @@ static int sata_rcar_probe(struct platform_device *pdev)
|
|||
|
||||
err_pm_put:
|
||||
pm_runtime_put(dev);
|
||||
err_pm_disable:
|
||||
pm_runtime_disable(dev);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -994,8 +993,10 @@ static int sata_rcar_resume(struct device *dev)
|
|||
int ret;
|
||||
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
pm_runtime_put(dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (priv->type == RCAR_GEN3_SATA) {
|
||||
sata_rcar_init_module(priv);
|
||||
|
|
@ -1020,8 +1021,10 @@ static int sata_rcar_restore(struct device *dev)
|
|||
int ret;
|
||||
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
pm_runtime_put(dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
sata_rcar_setup_port(host);
|
||||
|
||||
|
|
|
|||
|
|
@ -1336,6 +1336,7 @@ void regmap_exit(struct regmap *map)
|
|||
if (map->hwlock)
|
||||
hwspin_lock_free(map->hwlock);
|
||||
kfree_const(map->name);
|
||||
kfree(map->patch);
|
||||
kfree(map);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(regmap_exit);
|
||||
|
|
|
|||
|
|
@ -1250,7 +1250,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 */
|
||||
|
|
@ -1526,11 +1526,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",
|
||||
|
|
|
|||
|
|
@ -216,6 +216,7 @@ static int ks_sa_rng_probe(struct platform_device *pdev)
|
|||
ret = pm_runtime_get_sync(dev);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "Failed to enable SA power-domain\n");
|
||||
pm_runtime_put_noidle(dev);
|
||||
pm_runtime_disable(dev);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2209,6 +2209,15 @@ static struct amd64_family_type family_types[] = {
|
|||
.dbam_to_cs = f17_base_addr_to_cs_size,
|
||||
}
|
||||
},
|
||||
[F17_M30H_CPUS] = {
|
||||
.ctl_name = "F17h_M30h",
|
||||
.f0_id = PCI_DEVICE_ID_AMD_17H_M30H_DF_F0,
|
||||
.f6_id = PCI_DEVICE_ID_AMD_17H_M30H_DF_F6,
|
||||
.ops = {
|
||||
.early_channel_count = f17_early_channel_count,
|
||||
.dbam_to_cs = f17_base_addr_to_cs_size,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -3212,6 +3221,10 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt)
|
|||
fam_type = &family_types[F17_M10H_CPUS];
|
||||
pvt->ops = &family_types[F17_M10H_CPUS].ops;
|
||||
break;
|
||||
} else if (pvt->model >= 0x30 && pvt->model <= 0x3f) {
|
||||
fam_type = &family_types[F17_M30H_CPUS];
|
||||
pvt->ops = &family_types[F17_M30H_CPUS].ops;
|
||||
break;
|
||||
}
|
||||
fam_type = &family_types[F17_CPUS];
|
||||
pvt->ops = &family_types[F17_CPUS].ops;
|
||||
|
|
|
|||
|
|
@ -117,6 +117,8 @@
|
|||
#define PCI_DEVICE_ID_AMD_17H_DF_F6 0x1466
|
||||
#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F0 0x15e8
|
||||
#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F6 0x15ee
|
||||
#define PCI_DEVICE_ID_AMD_17H_M30H_DF_F0 0x1490
|
||||
#define PCI_DEVICE_ID_AMD_17H_M30H_DF_F6 0x1496
|
||||
|
||||
/*
|
||||
* Function 1 - Address Map
|
||||
|
|
@ -284,6 +286,7 @@ enum amd_families {
|
|||
F16_M30H_CPUS,
|
||||
F17_CPUS,
|
||||
F17_M10H_CPUS,
|
||||
F17_M30H_CPUS,
|
||||
NUM_FAMILIES,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1561,7 +1561,7 @@ bool calculate_user_regamma_ramp(struct dc_transfer_func *output_tf,
|
|||
|
||||
kfree(rgb_regamma);
|
||||
rgb_regamma_alloc_fail:
|
||||
kvfree(rgb_user);
|
||||
kfree(rgb_user);
|
||||
rgb_user_alloc_fail:
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ config DRM_RCAR_DW_HDMI
|
|||
config DRM_RCAR_LVDS
|
||||
tristate "R-Car DU LVDS Encoder Support"
|
||||
depends on DRM && DRM_BRIDGE && OF
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_PANEL
|
||||
select OF_FLATTREE
|
||||
select OF_OVERLAY
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@
|
|||
#define I2C_STAT_DAT_REQ BIT(25)
|
||||
#define I2C_STAT_CMD_COMP BIT(24)
|
||||
#define I2C_STAT_STOP_ERR BIT(23)
|
||||
#define I2C_STAT_MAX_PORT GENMASK(19, 16)
|
||||
#define I2C_STAT_MAX_PORT GENMASK(22, 16)
|
||||
#define I2C_STAT_ANY_INT BIT(15)
|
||||
#define I2C_STAT_SCL_IN BIT(11)
|
||||
#define I2C_STAT_SDA_IN BIT(10)
|
||||
|
|
|
|||
|
|
@ -145,8 +145,8 @@ enum msg_end_type {
|
|||
* @has_continue_xfer_support: Continue transfer supports.
|
||||
* @has_per_pkt_xfer_complete_irq: Has enable/disable capability for transfer
|
||||
* complete interrupt per packet basis.
|
||||
* @has_single_clk_source: The i2c controller has single clock source. Tegra30
|
||||
* and earlier Socs has two clock sources i.e. div-clk and
|
||||
* @has_single_clk_source: The I2C controller has single clock source. Tegra30
|
||||
* and earlier SoCs have two clock sources i.e. div-clk and
|
||||
* fast-clk.
|
||||
* @has_config_load_reg: Has the config load register to load the new
|
||||
* configuration.
|
||||
|
|
@ -154,8 +154,19 @@ enum msg_end_type {
|
|||
* @clk_divisor_std_fast_mode: Clock divisor in standard/fast mode. It is
|
||||
* applicable if there is no fast clock source i.e. single clock
|
||||
* source.
|
||||
* @clk_divisor_fast_plus_mode: Clock divisor in fast mode plus. It is
|
||||
* applicable if there is no fast clock source (i.e. single
|
||||
* clock source).
|
||||
* @has_multi_master_mode: The I2C controller supports running in single-master
|
||||
* or multi-master mode.
|
||||
* @has_slcg_override_reg: The I2C controller supports a register that
|
||||
* overrides the second level clock gating.
|
||||
* @has_mst_fifo: The I2C controller contains the new MST FIFO interface that
|
||||
* provides additional features and allows for longer messages to
|
||||
* be transferred in one go.
|
||||
* @quirks: i2c adapter quirks for limiting write/read transfer size and not
|
||||
* allowing 0 length transfers.
|
||||
*/
|
||||
|
||||
struct tegra_i2c_hw_feature {
|
||||
bool has_continue_xfer_support;
|
||||
bool has_per_pkt_xfer_complete_irq;
|
||||
|
|
@ -167,25 +178,31 @@ struct tegra_i2c_hw_feature {
|
|||
bool has_multi_master_mode;
|
||||
bool has_slcg_override_reg;
|
||||
bool has_mst_fifo;
|
||||
const struct i2c_adapter_quirks *quirks;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct tegra_i2c_dev - per device i2c context
|
||||
* struct tegra_i2c_dev - per device I2C context
|
||||
* @dev: device reference for power management
|
||||
* @hw: Tegra i2c hw feature.
|
||||
* @adapter: core i2c layer adapter information
|
||||
* @div_clk: clock reference for div clock of i2c controller.
|
||||
* @fast_clk: clock reference for fast clock of i2c controller.
|
||||
* @hw: Tegra I2C HW feature
|
||||
* @adapter: core I2C layer adapter information
|
||||
* @div_clk: clock reference for div clock of I2C controller
|
||||
* @fast_clk: clock reference for fast clock of I2C controller
|
||||
* @rst: reset control for the I2C controller
|
||||
* @base: ioremapped registers cookie
|
||||
* @cont_id: i2c controller id, used for for packet header
|
||||
* @irq: irq number of transfer complete interrupt
|
||||
* @is_dvc: identifies the DVC i2c controller, has a different register layout
|
||||
* @cont_id: I2C controller ID, used for packet header
|
||||
* @irq: IRQ number of transfer complete interrupt
|
||||
* @irq_disabled: used to track whether or not the interrupt is enabled
|
||||
* @is_dvc: identifies the DVC I2C controller, has a different register layout
|
||||
* @msg_complete: transfer completion notifier
|
||||
* @msg_err: error code for completed message
|
||||
* @msg_buf: pointer to current message data
|
||||
* @msg_buf_remaining: size of unsent data in the message buffer
|
||||
* @msg_read: identifies read transfers
|
||||
* @bus_clk_rate: current i2c bus clock rate
|
||||
* @bus_clk_rate: current I2C bus clock rate
|
||||
* @clk_divisor_non_hs_mode: clock divider for non-high-speed modes
|
||||
* @is_multimaster_mode: track if I2C controller is in multi-master mode
|
||||
* @xfer_lock: lock to serialize transfer submission and processing
|
||||
*/
|
||||
struct tegra_i2c_dev {
|
||||
struct device *dev;
|
||||
|
|
@ -833,6 +850,10 @@ static const struct i2c_adapter_quirks tegra_i2c_quirks = {
|
|||
.max_write_len = 4096 - 12,
|
||||
};
|
||||
|
||||
static const struct i2c_adapter_quirks tegra194_i2c_quirks = {
|
||||
.flags = I2C_AQ_NO_ZERO_LEN,
|
||||
};
|
||||
|
||||
static const struct tegra_i2c_hw_feature tegra20_i2c_hw = {
|
||||
.has_continue_xfer_support = false,
|
||||
.has_per_pkt_xfer_complete_irq = false,
|
||||
|
|
@ -844,6 +865,7 @@ static const struct tegra_i2c_hw_feature tegra20_i2c_hw = {
|
|||
.has_multi_master_mode = false,
|
||||
.has_slcg_override_reg = false,
|
||||
.has_mst_fifo = false,
|
||||
.quirks = &tegra_i2c_quirks,
|
||||
};
|
||||
|
||||
static const struct tegra_i2c_hw_feature tegra30_i2c_hw = {
|
||||
|
|
@ -857,6 +879,7 @@ static const struct tegra_i2c_hw_feature tegra30_i2c_hw = {
|
|||
.has_multi_master_mode = false,
|
||||
.has_slcg_override_reg = false,
|
||||
.has_mst_fifo = false,
|
||||
.quirks = &tegra_i2c_quirks,
|
||||
};
|
||||
|
||||
static const struct tegra_i2c_hw_feature tegra114_i2c_hw = {
|
||||
|
|
@ -870,6 +893,7 @@ static const struct tegra_i2c_hw_feature tegra114_i2c_hw = {
|
|||
.has_multi_master_mode = false,
|
||||
.has_slcg_override_reg = false,
|
||||
.has_mst_fifo = false,
|
||||
.quirks = &tegra_i2c_quirks,
|
||||
};
|
||||
|
||||
static const struct tegra_i2c_hw_feature tegra124_i2c_hw = {
|
||||
|
|
@ -883,6 +907,7 @@ static const struct tegra_i2c_hw_feature tegra124_i2c_hw = {
|
|||
.has_multi_master_mode = false,
|
||||
.has_slcg_override_reg = true,
|
||||
.has_mst_fifo = false,
|
||||
.quirks = &tegra_i2c_quirks,
|
||||
};
|
||||
|
||||
static const struct tegra_i2c_hw_feature tegra210_i2c_hw = {
|
||||
|
|
@ -896,6 +921,7 @@ static const struct tegra_i2c_hw_feature tegra210_i2c_hw = {
|
|||
.has_multi_master_mode = true,
|
||||
.has_slcg_override_reg = true,
|
||||
.has_mst_fifo = false,
|
||||
.quirks = &tegra_i2c_quirks,
|
||||
};
|
||||
|
||||
static const struct tegra_i2c_hw_feature tegra194_i2c_hw = {
|
||||
|
|
@ -909,6 +935,7 @@ static const struct tegra_i2c_hw_feature tegra194_i2c_hw = {
|
|||
.has_multi_master_mode = true,
|
||||
.has_slcg_override_reg = true,
|
||||
.has_mst_fifo = true,
|
||||
.quirks = &tegra194_i2c_quirks,
|
||||
};
|
||||
|
||||
/* Match table for of_platform binding */
|
||||
|
|
@ -960,7 +987,6 @@ static int tegra_i2c_probe(struct platform_device *pdev)
|
|||
i2c_dev->base = base;
|
||||
i2c_dev->div_clk = div_clk;
|
||||
i2c_dev->adapter.algo = &tegra_i2c_algo;
|
||||
i2c_dev->adapter.quirks = &tegra_i2c_quirks;
|
||||
i2c_dev->irq = irq;
|
||||
i2c_dev->cont_id = pdev->id;
|
||||
i2c_dev->dev = &pdev->dev;
|
||||
|
|
@ -976,6 +1002,7 @@ static int tegra_i2c_probe(struct platform_device *pdev)
|
|||
i2c_dev->hw = of_device_get_match_data(&pdev->dev);
|
||||
i2c_dev->is_dvc = of_device_is_compatible(pdev->dev.of_node,
|
||||
"nvidia,tegra20-i2c-dvc");
|
||||
i2c_dev->adapter.quirks = i2c_dev->hw->quirks;
|
||||
init_completion(&i2c_dev->msg_complete);
|
||||
spin_lock_init(&i2c_dev->xfer_lock);
|
||||
|
||||
|
|
|
|||
|
|
@ -497,6 +497,13 @@ static s32 i2c_smbus_xfer_emulated(struct i2c_adapter *adapter, u16 addr,
|
|||
break;
|
||||
case I2C_SMBUS_BLOCK_DATA:
|
||||
case I2C_SMBUS_BLOCK_PROC_CALL:
|
||||
if (msg[1].buf[0] > I2C_SMBUS_BLOCK_MAX) {
|
||||
dev_err(&adapter->dev,
|
||||
"Invalid block size returned: %d\n",
|
||||
msg[1].buf[0]);
|
||||
status = -EPROTO;
|
||||
goto cleanup;
|
||||
}
|
||||
for (i = 0; i < msg[1].buf[0] + 1; i++)
|
||||
data->block[i] = msg[1].buf[i];
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1507,6 +1507,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);
|
||||
|
||||
|
|
@ -1552,6 +1554,7 @@ cma_ib_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
|
||||
|
|
@ -1593,6 +1596,7 @@ cma_ib_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;
|
||||
|
|
@ -2346,6 +2350,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;
|
||||
|
||||
|
|
@ -3081,6 +3087,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);
|
||||
|
||||
|
|
@ -3109,6 +3117,8 @@ static int cma_alloc_port(enum rdma_ucm_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;
|
||||
|
|
@ -3135,6 +3145,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);
|
||||
|
|
@ -3174,6 +3186,8 @@ static int cma_alloc_any_port(enum rdma_ucm_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;
|
||||
|
|
@ -3221,6 +3235,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)
|
||||
|
|
@ -3251,6 +3267,8 @@ static int cma_use_port(enum rdma_ucm_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;
|
||||
|
|
|
|||
|
|
@ -615,10 +615,10 @@ static void unregister_mad_agent(struct ib_mad_agent_private *mad_agent_priv)
|
|||
idr_unlock(&ib_mad_clients);
|
||||
|
||||
flush_workqueue(port_priv->wq);
|
||||
ib_cancel_rmpp_recvs(mad_agent_priv);
|
||||
|
||||
deref_mad_agent(mad_agent_priv);
|
||||
wait_for_completion(&mad_agent_priv->comp);
|
||||
ib_cancel_rmpp_recvs(mad_agent_priv);
|
||||
|
||||
ib_mad_agent_security_cleanup(&mad_agent_priv->agent);
|
||||
|
||||
|
|
@ -2920,6 +2920,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,8 +128,17 @@ qedr_iw_issue_event(void *context,
|
|||
if (params->cm_info) {
|
||||
event.ird = params->cm_info->ird;
|
||||
event.ord = params->cm_info->ord;
|
||||
event.private_data_len = params->cm_info->private_data_len;
|
||||
event.private_data = (void *)params->cm_info->private_data;
|
||||
/* Only connect_request and reply have valid private data
|
||||
* the rest of the events this may be left overs from
|
||||
* connection establishment. CONNECT_REQUEST is issued via
|
||||
* qedr_iw_mpa_request
|
||||
*/
|
||||
if (event_type == IW_CM_EVENT_CONNECT_REPLY) {
|
||||
event.private_data_len =
|
||||
params->cm_info->private_data_len;
|
||||
event.private_data =
|
||||
(void *)params->cm_info->private_data;
|
||||
}
|
||||
}
|
||||
|
||||
if (ep->cm_id)
|
||||
|
|
|
|||
|
|
@ -281,6 +281,8 @@ static int persistent_memory_claim(struct dm_writecache *wc)
|
|||
while (daa-- && i < p) {
|
||||
pages[i++] = pfn_t_to_page(pfn);
|
||||
pfn.val++;
|
||||
if (!(i & 15))
|
||||
cond_resched();
|
||||
}
|
||||
} while (i < p);
|
||||
wc->memory_map = vmap(pages, p, VM_MAP, PAGE_KERNEL);
|
||||
|
|
@ -811,6 +813,8 @@ static void writecache_discard(struct dm_writecache *wc, sector_t start, sector_
|
|||
writecache_wait_for_ios(wc, WRITE);
|
||||
discarded_something = true;
|
||||
}
|
||||
if (!writecache_entry_is_committed(wc, e))
|
||||
wc->uncommitted_blocks--;
|
||||
writecache_free_entry(wc, e);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -637,7 +637,7 @@ static int marvell_nfc_wait_op(struct nand_chip *chip, unsigned int timeout_ms)
|
|||
* In case the interrupt was not served in the required time frame,
|
||||
* check if the ISR was not served or if something went actually wrong.
|
||||
*/
|
||||
if (ret && !pending) {
|
||||
if (!ret && !pending) {
|
||||
dev_err(nfc->dev, "Timeout waiting for RB signal\n");
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1250,8 +1250,12 @@ static int __alx_open(struct alx_priv *alx, bool resume)
|
|||
|
||||
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);
|
||||
}
|
||||
|
|
@ -1861,9 +1865,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);
|
||||
|
||||
|
|
|
|||
|
|
@ -1593,11 +1593,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
|
||||
*/
|
||||
|
|
@ -1646,6 +1641,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)
|
||||
|
|
|
|||
|
|
@ -191,10 +191,6 @@ void bcmgenet_wol_power_up_cfg(struct bcmgenet_priv *priv,
|
|||
reg &= ~MPD_EN;
|
||||
bcmgenet_umac_writel(priv, reg, UMAC_MPD_CTRL);
|
||||
|
||||
reg = bcmgenet_hfb_reg_readl(priv, HFB_CTRL);
|
||||
reg &= ~(RBUF_HFB_EN | RBUF_ACPI_EN);
|
||||
bcmgenet_hfb_reg_writel(priv, reg, HFB_CTRL);
|
||||
|
||||
/* Disable CRC Forward */
|
||||
reg = bcmgenet_umac_readl(priv, UMAC_CMD);
|
||||
reg &= ~CMD_CRC_FWD;
|
||||
|
|
|
|||
|
|
@ -18229,8 +18229,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 */
|
||||
|
|
|
|||
|
|
@ -507,41 +507,20 @@ u64 cxgb4_select_ntuple(struct net_device *dev,
|
|||
}
|
||||
EXPORT_SYMBOL(cxgb4_select_ntuple);
|
||||
|
||||
/*
|
||||
* Called when address resolution fails for an L2T entry to handle packets
|
||||
* on the arpq head. If a packet specifies a failure handler it is invoked,
|
||||
* otherwise the packet is sent to the device.
|
||||
*/
|
||||
static void handle_failed_resolution(struct adapter *adap, struct l2t_entry *e)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
|
||||
while ((skb = __skb_dequeue(&e->arpq)) != NULL) {
|
||||
const struct l2t_skb_cb *cb = L2T_SKB_CB(skb);
|
||||
|
||||
spin_unlock(&e->lock);
|
||||
if (cb->arp_err_handler)
|
||||
cb->arp_err_handler(cb->handle, skb);
|
||||
else
|
||||
t4_ofld_send(adap, skb);
|
||||
spin_lock(&e->lock);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Called when the host's neighbor layer makes a change to some entry that is
|
||||
* loaded into the HW L2 table.
|
||||
*/
|
||||
void t4_l2t_update(struct adapter *adap, struct neighbour *neigh)
|
||||
{
|
||||
struct l2t_entry *e;
|
||||
struct sk_buff_head *arpq = NULL;
|
||||
struct l2t_data *d = adap->l2t;
|
||||
unsigned int addr_len = neigh->tbl->key_len;
|
||||
u32 *addr = (u32 *) neigh->primary_key;
|
||||
int ifidx = neigh->dev->ifindex;
|
||||
int hash = addr_hash(d, addr, addr_len, ifidx);
|
||||
int hash, ifidx = neigh->dev->ifindex;
|
||||
struct sk_buff_head *arpq = NULL;
|
||||
struct l2t_data *d = adap->l2t;
|
||||
struct l2t_entry *e;
|
||||
|
||||
hash = addr_hash(d, addr, addr_len, ifidx);
|
||||
read_lock_bh(&d->lock);
|
||||
for (e = d->l2tab[hash].first; e; e = e->next)
|
||||
if (!addreq(e, addr) && e->ifindex == ifidx) {
|
||||
|
|
@ -574,8 +553,25 @@ void t4_l2t_update(struct adapter *adap, struct neighbour *neigh)
|
|||
write_l2e(adap, e, 0);
|
||||
}
|
||||
|
||||
if (arpq)
|
||||
handle_failed_resolution(adap, e);
|
||||
if (arpq) {
|
||||
struct sk_buff *skb;
|
||||
|
||||
/* Called when address resolution fails for an L2T
|
||||
* entry to handle packets on the arpq head. If a
|
||||
* packet specifies a failure handler it is invoked,
|
||||
* otherwise the packet is sent to the device.
|
||||
*/
|
||||
while ((skb = __skb_dequeue(&e->arpq)) != NULL) {
|
||||
const struct l2t_skb_cb *cb = L2T_SKB_CB(skb);
|
||||
|
||||
spin_unlock(&e->lock);
|
||||
if (cb->arp_err_handler)
|
||||
cb->arp_err_handler(cb->handle, skb);
|
||||
else
|
||||
t4_ofld_send(adap, skb);
|
||||
spin_lock(&e->lock);
|
||||
}
|
||||
}
|
||||
spin_unlock_bh(&e->lock);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -792,12 +792,13 @@ static int ibmvnic_login(struct net_device *netdev)
|
|||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
unsigned long timeout = msecs_to_jiffies(30000);
|
||||
int retry_count = 0;
|
||||
int retries = 10;
|
||||
bool retry;
|
||||
int rc;
|
||||
|
||||
do {
|
||||
retry = false;
|
||||
if (retry_count > IBMVNIC_MAX_QUEUES) {
|
||||
if (retry_count > retries) {
|
||||
netdev_warn(netdev, "Login attempts exceeded\n");
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -812,11 +813,23 @@ static int ibmvnic_login(struct net_device *netdev)
|
|||
|
||||
if (!wait_for_completion_timeout(&adapter->init_done,
|
||||
timeout)) {
|
||||
netdev_warn(netdev, "Login timed out\n");
|
||||
return -1;
|
||||
netdev_warn(netdev, "Login timed out, retrying...\n");
|
||||
retry = true;
|
||||
adapter->init_done_rc = 0;
|
||||
retry_count++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (adapter->init_done_rc == PARTIALSUCCESS) {
|
||||
if (adapter->init_done_rc == ABORTED) {
|
||||
netdev_warn(netdev, "Login aborted, retrying...\n");
|
||||
retry = true;
|
||||
adapter->init_done_rc = 0;
|
||||
retry_count++;
|
||||
/* FW or device may be busy, so
|
||||
* wait a bit before retrying login
|
||||
*/
|
||||
msleep(500);
|
||||
} else if (adapter->init_done_rc == PARTIALSUCCESS) {
|
||||
retry_count++;
|
||||
release_sub_crqs(adapter, 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -397,7 +397,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;
|
||||
|
|
|
|||
|
|
@ -606,8 +606,10 @@ static int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id,
|
|||
|
||||
/* Grab the bits from PHYIR2, and put them in the lower half */
|
||||
phy_reg = mdiobus_read(bus, addr, MII_PHYSID2);
|
||||
if (phy_reg < 0)
|
||||
return -EIO;
|
||||
if (phy_reg < 0) {
|
||||
/* returning -ENODEV doesn't stop bus scanning */
|
||||
return (phy_reg == -EIO || phy_reg == -ENODEV) ? -ENODEV : -EIO;
|
||||
}
|
||||
|
||||
*phy_id |= (phy_reg & 0xffff);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -196,6 +196,19 @@ static const struct regulator_ops pfuze100_swb_regulator_ops = {
|
|||
|
||||
};
|
||||
|
||||
static const struct regulator_ops pfuze3000_sw_regulator_ops = {
|
||||
.enable = regulator_enable_regmap,
|
||||
.disable = regulator_disable_regmap,
|
||||
.is_enabled = regulator_is_enabled_regmap,
|
||||
.list_voltage = regulator_list_voltage_table,
|
||||
.map_voltage = regulator_map_voltage_ascend,
|
||||
.set_voltage_sel = regulator_set_voltage_sel_regmap,
|
||||
.get_voltage_sel = regulator_get_voltage_sel_regmap,
|
||||
.set_voltage_time_sel = regulator_set_voltage_time_sel,
|
||||
.set_ramp_delay = pfuze100_set_ramp_delay,
|
||||
|
||||
};
|
||||
|
||||
#define PFUZE100_FIXED_REG(_chip, _name, base, voltage) \
|
||||
[_chip ## _ ## _name] = { \
|
||||
.desc = { \
|
||||
|
|
@ -305,23 +318,28 @@ static const struct regulator_ops pfuze100_swb_regulator_ops = {
|
|||
.stby_mask = 0x20, \
|
||||
}
|
||||
|
||||
|
||||
#define PFUZE3000_SW2_REG(_chip, _name, base, min, max, step) { \
|
||||
.desc = { \
|
||||
.name = #_name,\
|
||||
.n_voltages = ((max) - (min)) / (step) + 1, \
|
||||
.ops = &pfuze100_sw_regulator_ops, \
|
||||
.type = REGULATOR_VOLTAGE, \
|
||||
.id = _chip ## _ ## _name, \
|
||||
.owner = THIS_MODULE, \
|
||||
.min_uV = (min), \
|
||||
.uV_step = (step), \
|
||||
.vsel_reg = (base) + PFUZE100_VOL_OFFSET, \
|
||||
.vsel_mask = 0x7, \
|
||||
}, \
|
||||
.stby_reg = (base) + PFUZE100_STANDBY_OFFSET, \
|
||||
.stby_mask = 0x7, \
|
||||
}
|
||||
/* No linar case for the some switches of PFUZE3000 */
|
||||
#define PFUZE3000_SW_REG(_chip, _name, base, mask, voltages) \
|
||||
[_chip ## _ ## _name] = { \
|
||||
.desc = { \
|
||||
.name = #_name, \
|
||||
.n_voltages = ARRAY_SIZE(voltages), \
|
||||
.ops = &pfuze3000_sw_regulator_ops, \
|
||||
.type = REGULATOR_VOLTAGE, \
|
||||
.id = _chip ## _ ## _name, \
|
||||
.owner = THIS_MODULE, \
|
||||
.volt_table = voltages, \
|
||||
.vsel_reg = (base) + PFUZE100_VOL_OFFSET, \
|
||||
.vsel_mask = (mask), \
|
||||
.enable_reg = (base) + PFUZE100_MODE_OFFSET, \
|
||||
.enable_mask = 0xf, \
|
||||
.enable_val = 0x8, \
|
||||
.enable_time = 500, \
|
||||
}, \
|
||||
.stby_reg = (base) + PFUZE100_STANDBY_OFFSET, \
|
||||
.stby_mask = (mask), \
|
||||
.sw_reg = true, \
|
||||
}
|
||||
|
||||
#define PFUZE3000_SW3_REG(_chip, _name, base, min, max, step) { \
|
||||
.desc = { \
|
||||
|
|
@ -377,9 +395,9 @@ static struct pfuze_regulator pfuze200_regulators[] = {
|
|||
};
|
||||
|
||||
static struct pfuze_regulator pfuze3000_regulators[] = {
|
||||
PFUZE100_SWB_REG(PFUZE3000, SW1A, PFUZE100_SW1ABVOL, 0x1f, pfuze3000_sw1a),
|
||||
PFUZE3000_SW_REG(PFUZE3000, SW1A, PFUZE100_SW1ABVOL, 0x1f, pfuze3000_sw1a),
|
||||
PFUZE100_SW_REG(PFUZE3000, SW1B, PFUZE100_SW1CVOL, 700000, 1475000, 25000),
|
||||
PFUZE100_SWB_REG(PFUZE3000, SW2, PFUZE100_SW2VOL, 0x7, pfuze3000_sw2lo),
|
||||
PFUZE3000_SW_REG(PFUZE3000, SW2, PFUZE100_SW2VOL, 0x7, pfuze3000_sw2lo),
|
||||
PFUZE3000_SW3_REG(PFUZE3000, SW3, PFUZE100_SW3AVOL, 900000, 1650000, 50000),
|
||||
PFUZE100_SWB_REG(PFUZE3000, SWBST, PFUZE100_SWBSTCON1, 0x3, pfuze100_swbst),
|
||||
PFUZE100_SWB_REG(PFUZE3000, VSNVS, PFUZE100_VSNVSVOL, 0x7, pfuze100_vsnvs),
|
||||
|
|
@ -393,8 +411,8 @@ static struct pfuze_regulator pfuze3000_regulators[] = {
|
|||
};
|
||||
|
||||
static struct pfuze_regulator pfuze3001_regulators[] = {
|
||||
PFUZE100_SWB_REG(PFUZE3001, SW1, PFUZE100_SW1ABVOL, 0x1f, pfuze3000_sw1a),
|
||||
PFUZE100_SWB_REG(PFUZE3001, SW2, PFUZE100_SW2VOL, 0x7, pfuze3000_sw2lo),
|
||||
PFUZE3000_SW_REG(PFUZE3001, SW1, PFUZE100_SW1ABVOL, 0x1f, pfuze3000_sw1a),
|
||||
PFUZE3000_SW_REG(PFUZE3001, SW2, PFUZE100_SW2VOL, 0x7, pfuze3000_sw2lo),
|
||||
PFUZE3000_SW3_REG(PFUZE3001, SW3, PFUZE100_SW3AVOL, 900000, 1650000, 50000),
|
||||
PFUZE100_SWB_REG(PFUZE3001, VSNVS, PFUZE100_VSNVSVOL, 0x7, pfuze100_vsnvs),
|
||||
PFUZE100_VGEN_REG(PFUZE3001, VLDO1, PFUZE100_VGEN1VOL, 1800000, 3300000, 100000),
|
||||
|
|
|
|||
|
|
@ -592,7 +592,10 @@ static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act)
|
|||
ZFCP_STATUS_ERP_TIMEDOUT)) {
|
||||
req->status |= ZFCP_STATUS_FSFREQ_DISMISSED;
|
||||
zfcp_dbf_rec_run("erscf_1", act);
|
||||
req->erp_action = NULL;
|
||||
/* lock-free concurrent access with
|
||||
* zfcp_erp_timeout_handler()
|
||||
*/
|
||||
WRITE_ONCE(req->erp_action, NULL);
|
||||
}
|
||||
if (act->status & ZFCP_STATUS_ERP_TIMEDOUT)
|
||||
zfcp_dbf_rec_run("erscf_2", act);
|
||||
|
|
@ -628,8 +631,14 @@ void zfcp_erp_notify(struct zfcp_erp_action *erp_action, unsigned long set_mask)
|
|||
void zfcp_erp_timeout_handler(struct timer_list *t)
|
||||
{
|
||||
struct zfcp_fsf_req *fsf_req = from_timer(fsf_req, t, timer);
|
||||
struct zfcp_erp_action *act = fsf_req->erp_action;
|
||||
struct zfcp_erp_action *act;
|
||||
|
||||
if (fsf_req->status & ZFCP_STATUS_FSFREQ_DISMISSED)
|
||||
return;
|
||||
/* lock-free concurrent access with zfcp_erp_strategy_check_fsfreq() */
|
||||
act = READ_ONCE(fsf_req->erp_action);
|
||||
if (!act)
|
||||
return;
|
||||
zfcp_erp_notify(act, ZFCP_STATUS_ERP_TIMEDOUT);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -169,22 +169,22 @@ static inline void z_erofs_onlinepage_init(struct page *page)
|
|||
static inline void z_erofs_onlinepage_fixup(struct page *page,
|
||||
uintptr_t index, bool down)
|
||||
{
|
||||
unsigned long *p, o, v, id;
|
||||
repeat:
|
||||
p = &page_private(page);
|
||||
o = READ_ONCE(*p);
|
||||
union z_erofs_onlinepage_converter u = { .v = &page_private(page) };
|
||||
int orig, orig_index, val;
|
||||
|
||||
id = o >> Z_EROFS_ONLINEPAGE_INDEX_SHIFT;
|
||||
if (id) {
|
||||
repeat:
|
||||
orig = atomic_read(u.o);
|
||||
orig_index = orig >> Z_EROFS_ONLINEPAGE_INDEX_SHIFT;
|
||||
if (orig_index) {
|
||||
if (!index)
|
||||
return;
|
||||
|
||||
BUG_ON(id != index);
|
||||
DBG_BUGON(orig_index != index);
|
||||
}
|
||||
|
||||
v = (index << Z_EROFS_ONLINEPAGE_INDEX_SHIFT) |
|
||||
((o & Z_EROFS_ONLINEPAGE_COUNT_MASK) + (unsigned)down);
|
||||
if (cmpxchg(p, o, v) != o)
|
||||
val = (index << Z_EROFS_ONLINEPAGE_INDEX_SHIFT) |
|
||||
((orig & Z_EROFS_ONLINEPAGE_COUNT_MASK) + (unsigned int)down);
|
||||
if (atomic_cmpxchg(u.o, orig, val) != orig)
|
||||
goto repeat;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1856,12 +1856,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)
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -75,8 +75,6 @@ static LIST_HEAD(hvc_structs);
|
|||
*/
|
||||
static DEFINE_MUTEX(hvc_structs_mutex);
|
||||
|
||||
/* 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
|
||||
|
|
@ -348,24 +346,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);
|
||||
|
||||
|
|
@ -393,8 +383,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1721,6 +1721,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 */
|
||||
|
|
|
|||
|
|
@ -218,11 +218,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 },
|
||||
|
|
|
|||
|
|
@ -4759,12 +4759,6 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg)
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -492,6 +492,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:
|
||||
|
|
|
|||
|
|
@ -2313,7 +2313,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:
|
||||
|
|
|
|||
|
|
@ -188,9 +188,8 @@ static int exynos_ehci_probe(struct platform_device *pdev)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -216,6 +216,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 */
|
||||
|
|
|
|||
|
|
@ -196,6 +196,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);
|
||||
|
|
|
|||
|
|
@ -592,6 +592,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;
|
||||
device_init_wakeup(&dev->dev, false);
|
||||
|
|
@ -602,8 +605,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1405,6 +1405,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));
|
||||
|
||||
|
|
@ -4304,6 +4305,9 @@ static int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd,
|
|||
int hird, exit_latency;
|
||||
int ret;
|
||||
|
||||
if (xhci->quirks & XHCI_HW_LPM_DISABLE)
|
||||
return -EPERM;
|
||||
|
||||
if (hcd->speed >= HCD_USB3 || !xhci->hw_lpm_support ||
|
||||
!udev->lpm_capable)
|
||||
return -EPERM;
|
||||
|
|
@ -4326,7 +4330,7 @@ static int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd,
|
|||
xhci_dbg(xhci, "%s port %d USB2 hardware LPM\n",
|
||||
enable ? "enable" : "disable", port_num + 1);
|
||||
|
||||
if (enable && !(xhci->quirks & XHCI_HW_LPM_DISABLE)) {
|
||||
if (enable) {
|
||||
/* Host supports BESL timeout instead of HIRD */
|
||||
if (udev->usb2_hw_lpm_besl_capable) {
|
||||
/* if device doesn't have a preferred BESL value use a
|
||||
|
|
@ -4385,6 +4389,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(ports[port_num]->addr, pm_val,
|
||||
(pm_val & PORT_PLS_MASK) == XDEV_U0,
|
||||
100, 10000);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -716,7 +716,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
|
||||
|
|
|
|||
|
|
@ -179,26 +179,6 @@ static irqreturn_t rt1711h_irq(int irq, void *dev_id)
|
|||
return tcpci_irq(chip->tcpci);
|
||||
}
|
||||
|
||||
static int rt1711h_init_alert(struct rt1711h_chip *chip,
|
||||
struct i2c_client *client)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Disable chip interrupts before requesting irq */
|
||||
ret = rt1711h_write16(chip, TCPC_ALERT_MASK, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = devm_request_threaded_irq(chip->dev, client->irq, NULL,
|
||||
rt1711h_irq,
|
||||
IRQF_ONESHOT | IRQF_TRIGGER_LOW,
|
||||
dev_name(chip->dev), chip);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
enable_irq_wake(client->irq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rt1711h_sw_reset(struct rt1711h_chip *chip)
|
||||
{
|
||||
int ret;
|
||||
|
|
@ -260,7 +240,8 @@ static int rt1711h_probe(struct i2c_client *client,
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = rt1711h_init_alert(chip, client);
|
||||
/* Disable chip interrupts before requesting irq */
|
||||
ret = rt1711h_write16(chip, TCPC_ALERT_MASK, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
@ -271,6 +252,14 @@ static int rt1711h_probe(struct i2c_client *client,
|
|||
if (IS_ERR_OR_NULL(chip->tcpci))
|
||||
return PTR_ERR(chip->tcpci);
|
||||
|
||||
ret = devm_request_threaded_irq(chip->dev, client->irq, NULL,
|
||||
rt1711h_irq,
|
||||
IRQF_ONESHOT | IRQF_TRIGGER_LOW,
|
||||
dev_name(chip->dev), chip);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
enable_irq_wake(client->irq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -977,6 +977,7 @@ static noinline int cow_file_range(struct inode *inode,
|
|||
u64 num_bytes;
|
||||
unsigned long ram_size;
|
||||
u64 cur_alloc_size = 0;
|
||||
u64 min_alloc_size;
|
||||
u64 blocksize = fs_info->sectorsize;
|
||||
struct btrfs_key ins;
|
||||
struct extent_map *em;
|
||||
|
|
@ -1028,10 +1029,26 @@ static noinline int cow_file_range(struct inode *inode,
|
|||
btrfs_drop_extent_cache(BTRFS_I(inode), start,
|
||||
start + num_bytes - 1, 0);
|
||||
|
||||
/*
|
||||
* Relocation relies on the relocated extents to have exactly the same
|
||||
* size as the original extents. Normally writeback for relocation data
|
||||
* extents follows a NOCOW path because relocation preallocates the
|
||||
* extents. However, due to an operation such as scrub turning a block
|
||||
* group to RO mode, it may fallback to COW mode, so we must make sure
|
||||
* an extent allocated during COW has exactly the requested size and can
|
||||
* not be split into smaller extents, otherwise relocation breaks and
|
||||
* fails during the stage where it updates the bytenr of file extent
|
||||
* items.
|
||||
*/
|
||||
if (root->root_key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID)
|
||||
min_alloc_size = num_bytes;
|
||||
else
|
||||
min_alloc_size = fs_info->sectorsize;
|
||||
|
||||
while (num_bytes > 0) {
|
||||
cur_alloc_size = num_bytes;
|
||||
ret = btrfs_reserve_extent(root, cur_alloc_size, cur_alloc_size,
|
||||
fs_info->sectorsize, 0, alloc_hint,
|
||||
min_alloc_size, 0, alloc_hint,
|
||||
&ins, 1, 1);
|
||||
if (ret < 0)
|
||||
goto out_unlock;
|
||||
|
|
@ -8639,9 +8656,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);
|
||||
|
|
|
|||
|
|
@ -2180,6 +2180,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) {
|
||||
|
|
@ -2248,6 +2254,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -915,9 +915,8 @@ ff_layout_pg_init_write(struct nfs_pageio_descriptor *pgio,
|
|||
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);
|
||||
|
|
@ -936,11 +935,15 @@ ff_layout_pg_init_write(struct nfs_pageio_descriptor *pgio,
|
|||
}
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -114,6 +114,10 @@ static bool fanotify_should_send_event(struct fsnotify_iter_info *iter_info,
|
|||
if (!fsnotify_iter_should_report_type(iter_info, type))
|
||||
continue;
|
||||
mark = iter_info->marks[type];
|
||||
|
||||
/* Apply ignore mask regardless of ISDIR and ON_CHILD flags */
|
||||
marks_ignored_mask |= mark->ignored_mask;
|
||||
|
||||
/*
|
||||
* If the event is for a child and this mark doesn't care about
|
||||
* events on a child, don't send it!
|
||||
|
|
@ -124,7 +128,6 @@ static bool fanotify_should_send_event(struct fsnotify_iter_info *iter_info,
|
|||
continue;
|
||||
|
||||
marks_mask |= mark->mask;
|
||||
marks_ignored_mask |= mark->ignored_mask;
|
||||
}
|
||||
|
||||
if (d_is_dir(path->dentry) &&
|
||||
|
|
|
|||
|
|
@ -682,6 +682,12 @@ static void ocfs2_nfs_sync_lock_res_init(struct ocfs2_lock_res *res,
|
|||
&ocfs2_nfs_sync_lops, osb);
|
||||
}
|
||||
|
||||
static void ocfs2_nfs_sync_lock_init(struct ocfs2_super *osb)
|
||||
{
|
||||
ocfs2_nfs_sync_lock_res_init(&osb->osb_nfs_sync_lockres, osb);
|
||||
init_rwsem(&osb->nfs_sync_rwlock);
|
||||
}
|
||||
|
||||
void ocfs2_trim_fs_lock_res_init(struct ocfs2_super *osb)
|
||||
{
|
||||
struct ocfs2_lock_res *lockres = &osb->osb_trim_fs_lockres;
|
||||
|
|
@ -2851,6 +2857,11 @@ int ocfs2_nfs_sync_lock(struct ocfs2_super *osb, int ex)
|
|||
if (ocfs2_is_hard_readonly(osb))
|
||||
return -EROFS;
|
||||
|
||||
if (ex)
|
||||
down_write(&osb->nfs_sync_rwlock);
|
||||
else
|
||||
down_read(&osb->nfs_sync_rwlock);
|
||||
|
||||
if (ocfs2_mount_local(osb))
|
||||
return 0;
|
||||
|
||||
|
|
@ -2869,6 +2880,10 @@ void ocfs2_nfs_sync_unlock(struct ocfs2_super *osb, int ex)
|
|||
if (!ocfs2_mount_local(osb))
|
||||
ocfs2_cluster_unlock(osb, lockres,
|
||||
ex ? LKM_EXMODE : LKM_PRMODE);
|
||||
if (ex)
|
||||
up_write(&osb->nfs_sync_rwlock);
|
||||
else
|
||||
up_read(&osb->nfs_sync_rwlock);
|
||||
}
|
||||
|
||||
int ocfs2_trim_fs_lock(struct ocfs2_super *osb,
|
||||
|
|
@ -3314,7 +3329,7 @@ int ocfs2_dlm_init(struct ocfs2_super *osb)
|
|||
local:
|
||||
ocfs2_super_lock_res_init(&osb->osb_super_lockres, osb);
|
||||
ocfs2_rename_lock_res_init(&osb->osb_rename_lockres, osb);
|
||||
ocfs2_nfs_sync_lock_res_init(&osb->osb_nfs_sync_lockres, osb);
|
||||
ocfs2_nfs_sync_lock_init(osb);
|
||||
ocfs2_orphan_scan_lock_res_init(&osb->osb_orphan_scan.os_lockres, osb);
|
||||
|
||||
osb->cconn = conn;
|
||||
|
|
|
|||
|
|
@ -406,6 +406,7 @@ struct ocfs2_super
|
|||
struct ocfs2_lock_res osb_super_lockres;
|
||||
struct ocfs2_lock_res osb_rename_lockres;
|
||||
struct ocfs2_lock_res osb_nfs_sync_lockres;
|
||||
struct rw_semaphore nfs_sync_rwlock;
|
||||
struct ocfs2_lock_res osb_trim_fs_lockres;
|
||||
struct ocfs2_dlm_debug *osb_dlm_debug;
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -2841,9 +2841,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. */
|
||||
|
|
|
|||
|
|
@ -2596,6 +2596,13 @@ xfs_agf_verify(
|
|||
be32_to_cpu(agf->agf_flcount) <= xfs_agfl_size(mp)))
|
||||
return __this_address;
|
||||
|
||||
if (be32_to_cpu(agf->agf_length) > mp->m_sb.sb_dblocks)
|
||||
return __this_address;
|
||||
|
||||
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 __this_address;
|
||||
|
||||
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 ||
|
||||
|
|
@ -2607,6 +2614,10 @@ xfs_agf_verify(
|
|||
be32_to_cpu(agf->agf_levels[XFS_BTNUM_RMAP]) > XFS_BTREE_MAXLEVELS))
|
||||
return __this_address;
|
||||
|
||||
if (xfs_sb_version_hasrmapbt(&mp->m_sb) &&
|
||||
be32_to_cpu(agf->agf_rmap_blocks) > be32_to_cpu(agf->agf_length))
|
||||
return __this_address;
|
||||
|
||||
/*
|
||||
* during growfs operations, the perag is not fully initialised,
|
||||
* so we can't use it for any useful checking. growfs ensures we can't
|
||||
|
|
@ -2620,6 +2631,11 @@ xfs_agf_verify(
|
|||
be32_to_cpu(agf->agf_btreeblks) > be32_to_cpu(agf->agf_length))
|
||||
return __this_address;
|
||||
|
||||
if (xfs_sb_version_hasreflink(&mp->m_sb) &&
|
||||
be32_to_cpu(agf->agf_refcount_blocks) >
|
||||
be32_to_cpu(agf->agf_length))
|
||||
return __this_address;
|
||||
|
||||
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))
|
||||
|
|
|
|||
|
|
@ -2672,14 +2672,6 @@ void netdev_freemem(struct net_device *dev);
|
|||
void synchronize_net(void);
|
||||
int init_dummy_netdev(struct net_device *dev);
|
||||
|
||||
DECLARE_PER_CPU(int, xmit_recursion);
|
||||
#define XMIT_RECURSION_LIMIT 10
|
||||
|
||||
static inline int dev_recursion_level(void)
|
||||
{
|
||||
return this_cpu_read(xmit_recursion);
|
||||
}
|
||||
|
||||
struct net_device *dev_get_by_index(struct net *net, int ifindex);
|
||||
struct net_device *__dev_get_by_index(struct net *net, int ifindex);
|
||||
struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
|
||||
|
|
@ -3023,6 +3015,11 @@ struct softnet_data {
|
|||
#ifdef CONFIG_XFRM_OFFLOAD
|
||||
struct sk_buff_head xfrm_backlog;
|
||||
#endif
|
||||
/* written and read only by owning cpu: */
|
||||
struct {
|
||||
u16 recursion;
|
||||
u8 more;
|
||||
} xmit;
|
||||
#ifdef CONFIG_RPS
|
||||
/* input_queue_head should be written by cpu owning this struct,
|
||||
* and only read by other cpus. Worth using a cache line.
|
||||
|
|
@ -3058,6 +3055,28 @@ static inline void input_queue_tail_incr_save(struct softnet_data *sd,
|
|||
|
||||
DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data);
|
||||
|
||||
static inline int dev_recursion_level(void)
|
||||
{
|
||||
return this_cpu_read(softnet_data.xmit.recursion);
|
||||
}
|
||||
|
||||
#define XMIT_RECURSION_LIMIT 8
|
||||
static inline bool dev_xmit_recursion(void)
|
||||
{
|
||||
return unlikely(__this_cpu_read(softnet_data.xmit.recursion) >
|
||||
XMIT_RECURSION_LIMIT);
|
||||
}
|
||||
|
||||
static inline void dev_xmit_recursion_inc(void)
|
||||
{
|
||||
__this_cpu_inc(softnet_data.xmit.recursion);
|
||||
}
|
||||
|
||||
static inline void dev_xmit_recursion_dec(void)
|
||||
{
|
||||
__this_cpu_dec(softnet_data.xmit.recursion);
|
||||
}
|
||||
|
||||
void __netif_schedule(struct Qdisc *q);
|
||||
void netif_schedule_queue(struct netdev_queue *txq);
|
||||
|
||||
|
|
@ -4371,6 +4390,11 @@ static inline netdev_tx_t __netdev_start_xmit(const struct net_device_ops *ops,
|
|||
return ops->ndo_start_xmit(skb, dev);
|
||||
}
|
||||
|
||||
static inline bool netdev_xmit_more(void)
|
||||
{
|
||||
return __this_cpu_read(softnet_data.xmit.more);
|
||||
}
|
||||
|
||||
static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_device *dev,
|
||||
struct netdev_queue *txq, bool more)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,16 +109,17 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb,
|
|||
|
||||
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. */
|
||||
|
|
|
|||
|
|
@ -1785,7 +1785,6 @@ static inline int sk_rx_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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1083,6 +1083,7 @@ struct xfrm_offload {
|
|||
#define XFRM_GRO 32
|
||||
#define XFRM_ESP_NO_TRAILER 64
|
||||
#define XFRM_DEV_RESUME 128
|
||||
#define XFRM_XMIT 256
|
||||
|
||||
__u32 status;
|
||||
#define CRYPTO_SUCCESS 1
|
||||
|
|
|
|||
|
|
@ -4471,7 +4471,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
|
||||
|
|
|
|||
|
|
@ -2689,6 +2689,7 @@ void __dl_clear_params(struct task_struct *p)
|
|||
dl_se->dl_bw = 0;
|
||||
dl_se->dl_density = 0;
|
||||
|
||||
dl_se->dl_boosted = 0;
|
||||
dl_se->dl_throttled = 0;
|
||||
dl_se->dl_yielded = 0;
|
||||
dl_se->dl_non_contending = 0;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
* Copyright (C) 2006 Jens Axboe <axboe@kernel.dk>
|
||||
*
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/blktrace_api.h>
|
||||
|
|
@ -495,6 +498,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;
|
||||
|
|
|
|||
|
|
@ -2333,7 +2333,7 @@ rb_update_event(struct ring_buffer_per_cpu *cpu_buffer,
|
|||
if (unlikely(info->add_timestamp)) {
|
||||
bool abs = ring_buffer_time_stamp_abs(cpu_buffer->buffer);
|
||||
|
||||
event = rb_add_time_stamp(event, info->delta, abs);
|
||||
event = rb_add_time_stamp(event, abs ? info->delta : delta, abs);
|
||||
length -= RB_LEN_TIME_EXTEND;
|
||||
delta = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -211,11 +211,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);
|
||||
|
|
@ -624,8 +630,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);
|
||||
|
||||
|
|
@ -1361,6 +1373,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)
|
||||
|
|
|
|||
|
|
@ -1561,7 +1561,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);
|
||||
|
|
|
|||
|
|
@ -202,8 +202,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
|
||||
|
|
|
|||
|
|
@ -3534,9 +3534,6 @@ static void skb_update_prio(struct sk_buff *skb)
|
|||
#define skb_update_prio(skb)
|
||||
#endif
|
||||
|
||||
DEFINE_PER_CPU(int, xmit_recursion);
|
||||
EXPORT_SYMBOL(xmit_recursion);
|
||||
|
||||
/**
|
||||
* dev_loopback_xmit - loop back @skb
|
||||
* @net: network namespace this loopback is happening in
|
||||
|
|
@ -3827,8 +3824,7 @@ static int __dev_queue_xmit(struct sk_buff *skb, struct net_device *sb_dev)
|
|||
int cpu = smp_processor_id(); /* ok because BHs are off */
|
||||
|
||||
if (txq->xmit_lock_owner != cpu) {
|
||||
if (unlikely(__this_cpu_read(xmit_recursion) >
|
||||
XMIT_RECURSION_LIMIT))
|
||||
if (dev_xmit_recursion())
|
||||
goto recursion_alert;
|
||||
|
||||
skb = validate_xmit_skb(skb, dev, &again);
|
||||
|
|
@ -3838,9 +3834,9 @@ static int __dev_queue_xmit(struct sk_buff *skb, struct net_device *sb_dev)
|
|||
HARD_TX_LOCK(dev, txq, cpu);
|
||||
|
||||
if (!netif_xmit_stopped(txq)) {
|
||||
__this_cpu_inc(xmit_recursion);
|
||||
dev_xmit_recursion_inc();
|
||||
skb = dev_hard_start_xmit(skb, dev, txq, &rc);
|
||||
__this_cpu_dec(xmit_recursion);
|
||||
dev_xmit_recursion_dec();
|
||||
if (dev_xmit_complete(rc)) {
|
||||
HARD_TX_UNLOCK(dev, txq);
|
||||
goto out;
|
||||
|
|
@ -3903,10 +3899,12 @@ int dev_direct_xmit(struct sk_buff *skb, u16 queue_id)
|
|||
|
||||
local_bh_disable();
|
||||
|
||||
dev_xmit_recursion_inc();
|
||||
HARD_TX_LOCK(dev, txq, smp_processor_id());
|
||||
if (!netif_xmit_frozen_or_drv_stopped(txq))
|
||||
ret = netdev_start_xmit(skb, dev, txq, false);
|
||||
HARD_TX_UNLOCK(dev, txq);
|
||||
dev_xmit_recursion_dec();
|
||||
|
||||
local_bh_enable();
|
||||
|
||||
|
|
@ -8770,6 +8768,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
|
||||
|
|
|
|||
|
|
@ -2002,7 +2002,7 @@ static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb)
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (unlikely(__this_cpu_read(xmit_recursion) > XMIT_RECURSION_LIMIT)) {
|
||||
if (dev_xmit_recursion()) {
|
||||
net_crit_ratelimited("bpf: recursion limit reached on datapath, buggy bpf program?\n");
|
||||
kfree_skb(skb);
|
||||
return -ENETDOWN;
|
||||
|
|
@ -2011,9 +2011,9 @@ static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb)
|
|||
skb->dev = dev;
|
||||
skb->tstamp = 0;
|
||||
|
||||
__this_cpu_inc(xmit_recursion);
|
||||
dev_xmit_recursion_inc();
|
||||
ret = dev_queue_xmit(skb);
|
||||
__this_cpu_dec(xmit_recursion);
|
||||
dev_xmit_recursion_dec();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -640,7 +640,7 @@ bool sk_mc_loop(struct sock *sk)
|
|||
return inet6_sk(sk)->mc_loop;
|
||||
#endif
|
||||
}
|
||||
WARN_ON(1);
|
||||
WARN_ON_ONCE(1);
|
||||
return true;
|
||||
}
|
||||
EXPORT_SYMBOL(sk_mc_loop);
|
||||
|
|
@ -1540,6 +1540,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;
|
||||
|
|
@ -1747,6 +1748,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)
|
||||
|
|
|
|||
|
|
@ -831,7 +831,7 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_nh *nh,
|
|||
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)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user