Merge 4.9.124 into android-4.9
Changes in 4.9.124 x86/entry/64: Remove %ebx handling from error_entry/exit ARC: Explicitly add -mmedium-calls to CFLAGS usb: dwc3: of-simple: fix use-after-free on remove netfilter: ipv6: nf_defrag: reduce struct net memory waste selftests: pstore: return Kselftest Skip code for skipped tests selftests: static_keys: return Kselftest Skip code for skipped tests selftests: user: return Kselftest Skip code for skipped tests selftests: zram: return Kselftest Skip code for skipped tests selftests: sync: add config fragment for testing sync framework ARM: dts: NSP: Fix i2c controller interrupt type ARM: dts: NSP: Fix PCIe controllers interrupt types ARM: dts: Cygnus: Fix I2C controller interrupt type ARM: dts: Cygnus: Fix PCIe controller interrupt type arm64: dts: ns2: Fix I2C controller interrupt type drm: mali-dp: Enable Global SE interrupts mask for DP500 IB/rxe: Fix missing completion for mem_reg work requests libahci: Fix possible Spectre-v1 pmp indexing in ahci_led_store() usb: dwc2: fix isoc split in transfer with no data usb: gadget: composite: fix delayed_status race condition when set_interface usb: gadget: dwc2: fix memory leak in gadget_init() xen: add error handling for xenbus_printf scsi: xen-scsifront: add error handling for xenbus_printf xen/scsiback: add error handling for xenbus_printf arm64: make secondary_start_kernel() notrace qed: Add sanity check for SIMD fastpath handler. enic: initialize enic->rfs_h.lock in enic_probe net: hamradio: use eth_broadcast_addr net: propagate dev_get_valid_name return code net: stmmac: socfpga: add additional ocp reset line for Stratix10 nvmet: reset keep alive timer in controller enable ARC: Enable machine_desc->init_per_cpu for !CONFIG_SMP net: davinci_emac: match the mdio device against its compatible if possible KVM: arm/arm64: Drop resource size check for GICV window locking/lockdep: Do not record IRQ state within lockdep code ipv6: mcast: fix unsolicited report interval after receiving querys Smack: Mark inode instant in smack_task_to_inode batman-adv: Fix bat_ogm_iv best gw refcnt after netlink dump batman-adv: Fix bat_v best gw refcnt after netlink dump cxgb4: when disabling dcb set txq dcb priority to 0 iio: pressure: bmp280: fix relative humidity unit brcmfmac: stop watchdog before detach and free everything ARM: dts: am437x: make edt-ft5x06 a wakeup source ALSA: seq: Fix UBSAN warning at SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT ioctl usb: xhci: remove the code build warning usb: xhci: increase CRS timeout value NFC: pn533: Fix wrong GFP flag usage perf test session topology: Fix test on s390 perf report powerpc: Fix crash if callchain is empty perf bench: Fix numa report output code netfilter: nf_log: fix uninit read in nf_log_proc_dostring ceph: fix dentry leak in splice_dentry() selftests/x86/sigreturn/64: Fix spurious failures on AMD CPUs selftests/x86/sigreturn: Do minor cleanups ARM: dts: da850: Fix interrups property for gpio dmaengine: pl330: report BURST residue granularity dmaengine: k3dma: Off by one in k3_of_dma_simple_xlate() md/raid10: fix that replacement cannot complete recovery after reassemble nl80211: relax ht operation checks for mesh drm/exynos: gsc: Fix support for NV16/61, YUV420/YVU420 and YUV422 modes drm/exynos: decon5433: Fix per-plane global alpha for XRGB modes drm/exynos: decon5433: Fix WINCONx reset value bpf, s390: fix potential memleak when later bpf_jit_prog fails PCI: xilinx: Add missing of_node_put() PCI: xilinx-nwl: Add missing of_node_put() bnx2x: Fix receiving tx-timeout in error or recovery state. acpi/nfit: fix cmd_rc for acpi_nfit_ctl to always return a value m68k: fix "bad page state" oops on ColdFire boot objtool: Support GCC 8 '-fnoreorder-functions' ipvlan: call dev_change_flags when ipvlan mode is reset HID: wacom: Correct touch maximum XY of 2nd-gen Intuos ARM: imx_v6_v7_defconfig: Select ULPI support ARM: imx_v4_v5_defconfig: Select ULPI support tracing: Use __printf markup to silence compiler kasan: fix shadow_size calculation error in kasan_module_alloc smsc75xx: Add workaround for gigabit link up hardware errata. samples/bpf: add missing <linux/if_vlan.h> samples/bpf: Check the error of write() and read() ieee802154: 6lowpan: set IFLA_LINK netfilter: x_tables: set module owner for icmp(6) matches ipv6: make ipv6_renew_options() interrupt/kernel safe net: qrtr: Broadcast messages only from control port sh_eth: fix invalid context bug while calling auto-negotiation by ethtool sh_eth: fix invalid context bug while changing link options by ethtool ravb: fix invalid context bug while calling auto-negotiation by ethtool ravb: fix invalid context bug while changing link options by ethtool ARM: pxa: irq: fix handling of ICMR registers in suspend/resume net/sched: act_tunnel_key: fix NULL dereference when 'goto chain' is used ieee802154: at86rf230: switch from BUG_ON() to WARN_ON() on problem ieee802154: at86rf230: use __func__ macro for debug messages ieee802154: fakelb: switch from BUG_ON() to WARN_ON() on problem drm/armada: fix colorkey mode property netfilter: nf_conntrack: Fix possible possible crash on module loading. ARC: Improve cmpxchg syscall implementation bnxt_en: Always set output parameters in bnxt_get_max_rings(). bnxt_en: Fix for system hang if request_irq fails perf llvm-utils: Remove bashism from kernel include fetch script nfit: fix unchecked dereference in acpi_nfit_ctl RDMA/mlx5: Fix memory leak in mlx5_ib_create_srq() error path ARM: 8780/1: ftrace: Only set kernel memory back to read-only after boot ARM: DRA7/OMAP5: Enable ACTLR[0] (Enable invalidates of BTB) for secondary cores ARM: dts: am3517.dtsi: Disable reference to OMAP3 OTG controller ixgbe: Be more careful when modifying MAC filters tools: build: Use HOSTLDFLAGS with fixdep packet: reset network header if packet shorter than ll reserved space qlogic: check kstrtoul() for errors tcp: remove DELAYED ACK events in DCTCP pinctrl: nsp: off by ones in nsp_pinmux_enable() pinctrl: nsp: Fix potential NULL dereference drm/nouveau/gem: off by one bugs in nouveau_gem_pushbuf_reloc_apply() net/ethernet/freescale/fman: fix cross-build error net: usb: rtl8150: demote allmulti message to dev_dbg() PCI: OF: Fix I/O space page leak PCI: versatile: Fix I/O space page leak net: qca_spi: Avoid packet drop during initial sync net: qca_spi: Make sure the QCA7000 reset is triggered net: qca_spi: Fix log level if probe fails tcp: identify cryptic messages as TCP seq # bugs KVM: irqfd: fix race between EPOLLHUP and irq_bypass_register_consumer ext4: fix spectre gadget in ext4_mb_regular_allocator() parisc: Remove ordered stores from syscall.S xfrm_user: prevent leaking 2 bytes of kernel memory netfilter: conntrack: dccp: treat SYNC/SYNCACK as invalid if no prior state packet: refine ring v3 block size test to hold one frame parisc: Remove unnecessary barriers from spinlock.h PCI: hotplug: Don't leak pci_slot on registration failure PCI: Skip MPS logic for Virtual Functions (VFs) PCI: pciehp: Fix use-after-free on unplug PCI: pciehp: Fix unprotected list iteration in IRQ handler i2c: imx: Fix race condition in dma read reiserfs: fix broken xattr handling (heap corruption, bad retval) Linux 4.9.124 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 123
|
||||
SUBLEVEL = 124
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ endif
|
||||
|
||||
KBUILD_DEFCONFIG := nsim_700_defconfig
|
||||
|
||||
cflags-y += -fno-common -pipe -fno-builtin -D__linux__
|
||||
cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
|
||||
cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
|
||||
cflags-$(CONFIG_ISA_ARCV2) += -mcpu=archs
|
||||
|
||||
@@ -141,16 +141,3 @@ dtbs: scripts
|
||||
|
||||
archclean:
|
||||
$(Q)$(MAKE) $(clean)=$(boot)
|
||||
|
||||
# Hacks to enable final link due to absence of link-time branch relexation
|
||||
# and gcc choosing optimal(shorter) branches at -O3
|
||||
#
|
||||
# vineetg Feb 2010: -mlong-calls switched off for overall kernel build
|
||||
# However lib/decompress_inflate.o (.init.text) calls
|
||||
# zlib_inflate_workspacesize (.text) causing relocation errors.
|
||||
# Thus forcing all exten calls in this file to be long calls
|
||||
export CFLAGS_decompress_inflate.o = -mmedium-calls
|
||||
export CFLAGS_initramfs.o = -mmedium-calls
|
||||
ifdef CONFIG_SMP
|
||||
export CFLAGS_core.o = -mmedium-calls
|
||||
endif
|
||||
|
||||
@@ -34,9 +34,7 @@ struct machine_desc {
|
||||
const char *name;
|
||||
const char **dt_compat;
|
||||
void (*init_early)(void);
|
||||
#ifdef CONFIG_SMP
|
||||
void (*init_per_cpu)(unsigned int);
|
||||
#endif
|
||||
void (*init_machine)(void);
|
||||
void (*init_late)(void);
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@ void __init init_IRQ(void)
|
||||
/* a SMP H/w block could do IPI IRQ request here */
|
||||
if (plat_smp_ops.init_per_cpu)
|
||||
plat_smp_ops.init_per_cpu(smp_processor_id());
|
||||
#endif
|
||||
|
||||
if (machine_desc->init_per_cpu)
|
||||
machine_desc->init_per_cpu(smp_processor_id());
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -44,7 +44,8 @@ SYSCALL_DEFINE0(arc_gettls)
|
||||
SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
|
||||
{
|
||||
struct pt_regs *regs = current_pt_regs();
|
||||
int uval = -EFAULT;
|
||||
u32 uval;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* This is only for old cores lacking LLOCK/SCOND, which by defintion
|
||||
@@ -57,23 +58,47 @@ SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
|
||||
/* Z indicates to userspace if operation succeded */
|
||||
regs->status32 &= ~STATUS_Z_MASK;
|
||||
|
||||
if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
|
||||
return -EFAULT;
|
||||
ret = access_ok(VERIFY_WRITE, uaddr, sizeof(*uaddr));
|
||||
if (!ret)
|
||||
goto fail;
|
||||
|
||||
again:
|
||||
preempt_disable();
|
||||
|
||||
if (__get_user(uval, uaddr))
|
||||
goto done;
|
||||
ret = __get_user(uval, uaddr);
|
||||
if (ret)
|
||||
goto fault;
|
||||
|
||||
if (uval == expected) {
|
||||
if (!__put_user(new, uaddr))
|
||||
regs->status32 |= STATUS_Z_MASK;
|
||||
}
|
||||
if (uval != expected)
|
||||
goto out;
|
||||
|
||||
done:
|
||||
ret = __put_user(new, uaddr);
|
||||
if (ret)
|
||||
goto fault;
|
||||
|
||||
regs->status32 |= STATUS_Z_MASK;
|
||||
|
||||
out:
|
||||
preempt_enable();
|
||||
return uval;
|
||||
|
||||
fault:
|
||||
preempt_enable();
|
||||
|
||||
return uval;
|
||||
if (unlikely(ret != -EFAULT))
|
||||
goto fail;
|
||||
|
||||
down_read(¤t->mm->mmap_sem);
|
||||
ret = fixup_user_fault(current, current->mm, (unsigned long) uaddr,
|
||||
FAULT_FLAG_WRITE, NULL);
|
||||
up_read(¤t->mm->mmap_sem);
|
||||
|
||||
if (likely(!ret))
|
||||
goto again;
|
||||
|
||||
fail:
|
||||
force_sig(SIGSEGV, current);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void arch_cpu_idle(void)
|
||||
|
||||
@@ -74,6 +74,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
/* Table Table 5-79 of the TRM shows 480ab000 is reserved */
|
||||
&usb_otg_hs {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&iva {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -533,6 +533,8 @@
|
||||
|
||||
touchscreen-size-x = <480>;
|
||||
touchscreen-size-y = <272>;
|
||||
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
tlv320aic3106: tlv320aic3106@1b {
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
reg = <0x18008000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 85 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <100000>;
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -157,7 +157,7 @@
|
||||
reg = <0x1800b000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <100000>;
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_NONE>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
linux,pci-domain = <0>;
|
||||
|
||||
@@ -190,10 +190,10 @@
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 96 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 97 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 98 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 99 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_NONE>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
linux,pci-domain = <1>;
|
||||
|
||||
@@ -225,10 +225,10 @@
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 102 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 103 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 104 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 105 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
reg = <0x38000 0x50>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <100000>;
|
||||
};
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 131 IRQ_TYPE_NONE>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
linux,pci-domain = <0>;
|
||||
|
||||
@@ -397,10 +397,10 @@
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 127 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 128 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 129 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 130 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
|
||||
brcm,pcie-msi-inten;
|
||||
};
|
||||
};
|
||||
@@ -411,7 +411,7 @@
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 137 IRQ_TYPE_NONE>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
linux,pci-domain = <1>;
|
||||
|
||||
@@ -433,10 +433,10 @@
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 133 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 134 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 135 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 136 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
|
||||
brcm,pcie-msi-inten;
|
||||
};
|
||||
};
|
||||
@@ -447,7 +447,7 @@
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 143 IRQ_TYPE_NONE>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
linux,pci-domain = <2>;
|
||||
|
||||
@@ -469,10 +469,10 @@
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 139 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 140 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 141 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 142 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
|
||||
brcm,pcie-msi-inten;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -377,11 +377,7 @@
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
reg = <0x226000 0x1000>;
|
||||
interrupts = <42 IRQ_TYPE_EDGE_BOTH
|
||||
43 IRQ_TYPE_EDGE_BOTH 44 IRQ_TYPE_EDGE_BOTH
|
||||
45 IRQ_TYPE_EDGE_BOTH 46 IRQ_TYPE_EDGE_BOTH
|
||||
47 IRQ_TYPE_EDGE_BOTH 48 IRQ_TYPE_EDGE_BOTH
|
||||
49 IRQ_TYPE_EDGE_BOTH 50 IRQ_TYPE_EDGE_BOTH>;
|
||||
interrupts = <42 43 44 45 46 47 48 49 50>;
|
||||
ti,ngpio = <144>;
|
||||
ti,davinci-gpio-unbanked = <0>;
|
||||
status = "disabled";
|
||||
|
||||
@@ -145,9 +145,11 @@ CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_CHIPIDEA=y
|
||||
CONFIG_USB_CHIPIDEA_UDC=y
|
||||
CONFIG_USB_CHIPIDEA_HOST=y
|
||||
CONFIG_USB_CHIPIDEA_ULPI=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_ETH=m
|
||||
CONFIG_USB_ULPI_BUS=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
|
||||
@@ -271,6 +271,7 @@ CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_CHIPIDEA=y
|
||||
CONFIG_USB_CHIPIDEA_UDC=y
|
||||
CONFIG_USB_CHIPIDEA_HOST=y
|
||||
CONFIG_USB_CHIPIDEA_ULPI=y
|
||||
CONFIG_USB_SERIAL=m
|
||||
CONFIG_USB_SERIAL_GENERIC=y
|
||||
CONFIG_USB_SERIAL_FTDI_SIO=m
|
||||
@@ -307,6 +308,7 @@ CONFIG_USB_GADGETFS=m
|
||||
CONFIG_USB_FUNCTIONFS=m
|
||||
CONFIG_USB_MASS_STORAGE=m
|
||||
CONFIG_USB_G_SERIAL=m
|
||||
CONFIG_USB_ULPI_BUS=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
|
||||
@@ -104,6 +104,45 @@ void omap5_erratum_workaround_801819(void)
|
||||
static inline void omap5_erratum_workaround_801819(void) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HARDEN_BRANCH_PREDICTOR
|
||||
/*
|
||||
* Configure ACR and enable ACTLR[0] (Enable invalidates of BTB with
|
||||
* ICIALLU) to activate the workaround for secondary Core.
|
||||
* NOTE: it is assumed that the primary core's configuration is done
|
||||
* by the boot loader (kernel will detect a misconfiguration and complain
|
||||
* if this is not done).
|
||||
*
|
||||
* In General Purpose(GP) devices, ACR bit settings can only be done
|
||||
* by ROM code in "secure world" using the smc call and there is no
|
||||
* option to update the "firmware" on such devices. This also works for
|
||||
* High security(HS) devices, as a backup option in case the
|
||||
* "update" is not done in the "security firmware".
|
||||
*/
|
||||
static void omap5_secondary_harden_predictor(void)
|
||||
{
|
||||
u32 acr, acr_mask;
|
||||
|
||||
asm volatile ("mrc p15, 0, %0, c1, c0, 1" : "=r" (acr));
|
||||
|
||||
/*
|
||||
* ACTLR[0] (Enable invalidates of BTB with ICIALLU)
|
||||
*/
|
||||
acr_mask = BIT(0);
|
||||
|
||||
/* Do we already have it done.. if yes, skip expensive smc */
|
||||
if ((acr & acr_mask) == acr_mask)
|
||||
return;
|
||||
|
||||
acr |= acr_mask;
|
||||
omap_smc1(OMAP5_DRA7_MON_SET_ACR_INDEX, acr);
|
||||
|
||||
pr_debug("%s: ARM ACR setup for CVE_2017_5715 applied on CPU%d\n",
|
||||
__func__, smp_processor_id());
|
||||
}
|
||||
#else
|
||||
static inline void omap5_secondary_harden_predictor(void) { }
|
||||
#endif
|
||||
|
||||
static void omap4_secondary_init(unsigned int cpu)
|
||||
{
|
||||
/*
|
||||
@@ -126,6 +165,8 @@ static void omap4_secondary_init(unsigned int cpu)
|
||||
set_cntfreq();
|
||||
/* Configure ACR to disable streaming WA for 801819 */
|
||||
omap5_erratum_workaround_801819();
|
||||
/* Enable ACR to allow for ICUALLU workaround */
|
||||
omap5_secondary_harden_predictor();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -185,7 +185,7 @@ static int pxa_irq_suspend(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
|
||||
for (i = 0; i < DIV_ROUND_UP(pxa_internal_irq_nr, 32); i++) {
|
||||
void __iomem *base = irq_base(i);
|
||||
|
||||
saved_icmr[i] = __raw_readl(base + ICMR);
|
||||
@@ -204,7 +204,7 @@ static void pxa_irq_resume(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
|
||||
for (i = 0; i < DIV_ROUND_UP(pxa_internal_irq_nr, 32); i++) {
|
||||
void __iomem *base = irq_base(i);
|
||||
|
||||
__raw_writel(saved_icmr[i], base + ICMR);
|
||||
|
||||
@@ -722,19 +722,28 @@ int __mark_rodata_ro(void *unused)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int kernel_set_to_readonly __read_mostly;
|
||||
|
||||
void mark_rodata_ro(void)
|
||||
{
|
||||
kernel_set_to_readonly = 1;
|
||||
stop_machine(__mark_rodata_ro, NULL, NULL);
|
||||
}
|
||||
|
||||
void set_kernel_text_rw(void)
|
||||
{
|
||||
if (!kernel_set_to_readonly)
|
||||
return;
|
||||
|
||||
set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), false,
|
||||
current->active_mm);
|
||||
}
|
||||
|
||||
void set_kernel_text_ro(void)
|
||||
{
|
||||
if (!kernel_set_to_readonly)
|
||||
return;
|
||||
|
||||
set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), true,
|
||||
current->active_mm);
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@
|
||||
reg = <0x66080000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 394 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 394 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <100000>;
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -421,7 +421,7 @@
|
||||
reg = <0x660b0000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 395 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <100000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -210,7 +210,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
|
||||
* This is the secondary CPU boot entry. We're using this CPUs
|
||||
* idle thread stack, but a set of temporary page tables.
|
||||
*/
|
||||
asmlinkage void secondary_start_kernel(void)
|
||||
asmlinkage notrace void secondary_start_kernel(void)
|
||||
{
|
||||
struct mm_struct *mm = &init_mm;
|
||||
unsigned int cpu;
|
||||
|
||||
@@ -43,6 +43,7 @@ extern inline pmd_t *pmd_alloc_kernel(pgd_t *pgd, unsigned long address)
|
||||
static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t page,
|
||||
unsigned long address)
|
||||
{
|
||||
pgtable_page_dtor(page);
|
||||
__free_page(page);
|
||||
}
|
||||
|
||||
@@ -73,8 +74,9 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm,
|
||||
return page;
|
||||
}
|
||||
|
||||
extern inline void pte_free(struct mm_struct *mm, struct page *page)
|
||||
static inline void pte_free(struct mm_struct *mm, struct page *page)
|
||||
{
|
||||
pgtable_page_dtor(page);
|
||||
__free_page(page);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ static inline void arch_spin_lock_flags(arch_spinlock_t *x,
|
||||
{
|
||||
volatile unsigned int *a;
|
||||
|
||||
mb();
|
||||
a = __ldcw_align(x);
|
||||
while (__ldcw(a) == 0)
|
||||
while (*a == 0)
|
||||
@@ -36,16 +35,15 @@ static inline void arch_spin_lock_flags(arch_spinlock_t *x,
|
||||
local_irq_disable();
|
||||
} else
|
||||
cpu_relax();
|
||||
mb();
|
||||
}
|
||||
|
||||
static inline void arch_spin_unlock(arch_spinlock_t *x)
|
||||
{
|
||||
volatile unsigned int *a;
|
||||
mb();
|
||||
|
||||
a = __ldcw_align(x);
|
||||
*a = 1;
|
||||
mb();
|
||||
*a = 1;
|
||||
}
|
||||
|
||||
static inline int arch_spin_trylock(arch_spinlock_t *x)
|
||||
@@ -53,10 +51,8 @@ static inline int arch_spin_trylock(arch_spinlock_t *x)
|
||||
volatile unsigned int *a;
|
||||
int ret;
|
||||
|
||||
mb();
|
||||
a = __ldcw_align(x);
|
||||
ret = __ldcw(a) != 0;
|
||||
mb();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -629,12 +629,12 @@ cas_action:
|
||||
stw %r1, 4(%sr2,%r20)
|
||||
#endif
|
||||
/* The load and store could fail */
|
||||
1: ldw,ma 0(%r26), %r28
|
||||
1: ldw 0(%r26), %r28
|
||||
sub,<> %r28, %r25, %r0
|
||||
2: stw,ma %r24, 0(%r26)
|
||||
2: stw %r24, 0(%r26)
|
||||
/* Free lock */
|
||||
sync
|
||||
stw,ma %r20, 0(%sr2,%r20)
|
||||
stw %r20, 0(%sr2,%r20)
|
||||
#if ENABLE_LWS_DEBUG
|
||||
/* Clear thread register indicator */
|
||||
stw %r0, 4(%sr2,%r20)
|
||||
@@ -798,30 +798,30 @@ cas2_action:
|
||||
ldo 1(%r0),%r28
|
||||
|
||||
/* 8bit CAS */
|
||||
13: ldb,ma 0(%r26), %r29
|
||||
13: ldb 0(%r26), %r29
|
||||
sub,= %r29, %r25, %r0
|
||||
b,n cas2_end
|
||||
14: stb,ma %r24, 0(%r26)
|
||||
14: stb %r24, 0(%r26)
|
||||
b cas2_end
|
||||
copy %r0, %r28
|
||||
nop
|
||||
nop
|
||||
|
||||
/* 16bit CAS */
|
||||
15: ldh,ma 0(%r26), %r29
|
||||
15: ldh 0(%r26), %r29
|
||||
sub,= %r29, %r25, %r0
|
||||
b,n cas2_end
|
||||
16: sth,ma %r24, 0(%r26)
|
||||
16: sth %r24, 0(%r26)
|
||||
b cas2_end
|
||||
copy %r0, %r28
|
||||
nop
|
||||
nop
|
||||
|
||||
/* 32bit CAS */
|
||||
17: ldw,ma 0(%r26), %r29
|
||||
17: ldw 0(%r26), %r29
|
||||
sub,= %r29, %r25, %r0
|
||||
b,n cas2_end
|
||||
18: stw,ma %r24, 0(%r26)
|
||||
18: stw %r24, 0(%r26)
|
||||
b cas2_end
|
||||
copy %r0, %r28
|
||||
nop
|
||||
@@ -829,10 +829,10 @@ cas2_action:
|
||||
|
||||
/* 64bit CAS */
|
||||
#ifdef CONFIG_64BIT
|
||||
19: ldd,ma 0(%r26), %r29
|
||||
19: ldd 0(%r26), %r29
|
||||
sub,*= %r29, %r25, %r0
|
||||
b,n cas2_end
|
||||
20: std,ma %r24, 0(%r26)
|
||||
20: std %r24, 0(%r26)
|
||||
copy %r0, %r28
|
||||
#else
|
||||
/* Compare first word */
|
||||
@@ -851,7 +851,7 @@ cas2_action:
|
||||
cas2_end:
|
||||
/* Free lock */
|
||||
sync
|
||||
stw,ma %r20, 0(%sr2,%r20)
|
||||
stw %r20, 0(%sr2,%r20)
|
||||
/* Enable interrupts */
|
||||
ssm PSW_SM_I, %r0
|
||||
/* Return to userspace, set no error */
|
||||
|
||||
@@ -1386,6 +1386,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
|
||||
goto free_addrs;
|
||||
}
|
||||
if (bpf_jit_prog(&jit, fp)) {
|
||||
bpf_jit_binary_free(header);
|
||||
fp = orig_fp;
|
||||
goto free_addrs;
|
||||
}
|
||||
|
||||
@@ -769,7 +769,7 @@ ENTRY(\sym)
|
||||
|
||||
call \do_sym
|
||||
|
||||
jmp error_exit /* %ebx: no swapgs flag */
|
||||
jmp error_exit
|
||||
.endif
|
||||
END(\sym)
|
||||
.endm
|
||||
@@ -1038,7 +1038,6 @@ END(paranoid_exit)
|
||||
|
||||
/*
|
||||
* Save all registers in pt_regs, and switch gs if needed.
|
||||
* Return: EBX=0: came from user mode; EBX=1: otherwise
|
||||
*/
|
||||
ENTRY(error_entry)
|
||||
cld
|
||||
@@ -1051,7 +1050,6 @@ ENTRY(error_entry)
|
||||
* the kernel CR3 here.
|
||||
*/
|
||||
SWITCH_KERNEL_CR3
|
||||
xorl %ebx, %ebx
|
||||
testb $3, CS+8(%rsp)
|
||||
jz .Lerror_kernelspace
|
||||
|
||||
@@ -1082,7 +1080,6 @@ ENTRY(error_entry)
|
||||
* for these here too.
|
||||
*/
|
||||
.Lerror_kernelspace:
|
||||
incl %ebx
|
||||
leaq native_irq_return_iret(%rip), %rcx
|
||||
cmpq %rcx, RIP+8(%rsp)
|
||||
je .Lerror_bad_iret
|
||||
@@ -1114,28 +1111,19 @@ ENTRY(error_entry)
|
||||
|
||||
/*
|
||||
* Pretend that the exception came from user mode: set up pt_regs
|
||||
* as if we faulted immediately after IRET and clear EBX so that
|
||||
* error_exit knows that we will be returning to user mode.
|
||||
* as if we faulted immediately after IRET.
|
||||
*/
|
||||
mov %rsp, %rdi
|
||||
call fixup_bad_iret
|
||||
mov %rax, %rsp
|
||||
decl %ebx
|
||||
jmp .Lerror_entry_from_usermode_after_swapgs
|
||||
END(error_entry)
|
||||
|
||||
|
||||
/*
|
||||
* On entry, EBX is a "return to kernel mode" flag:
|
||||
* 1: already in kernel mode, don't need SWAPGS
|
||||
* 0: user gsbase is loaded, we need SWAPGS and standard preparation for return to usermode
|
||||
*/
|
||||
ENTRY(error_exit)
|
||||
movl %ebx, %eax
|
||||
DISABLE_INTERRUPTS(CLBR_NONE)
|
||||
TRACE_IRQS_OFF
|
||||
testl %eax, %eax
|
||||
jnz retint_kernel
|
||||
testb $3, CS(%rsp)
|
||||
jz retint_kernel
|
||||
jmp retint_user
|
||||
END(error_exit)
|
||||
|
||||
|
||||
@@ -201,6 +201,8 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
|
||||
const u8 *uuid;
|
||||
int rc, i;
|
||||
|
||||
if (cmd_rc)
|
||||
*cmd_rc = -EINVAL;
|
||||
func = cmd;
|
||||
if (cmd == ND_CMD_CALL) {
|
||||
call_pkg = buf;
|
||||
@@ -288,6 +290,8 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
|
||||
* If we return an error (like elsewhere) then caller wouldn't
|
||||
* be able to rely upon data returned to make calculation.
|
||||
*/
|
||||
if (cmd_rc)
|
||||
*cmd_rc = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/nospec.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/interrupt.h>
|
||||
@@ -1124,10 +1125,12 @@ static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
|
||||
|
||||
/* get the slot number from the message */
|
||||
pmp = (state & EM_MSG_LED_PMP_SLOT) >> 8;
|
||||
if (pmp < EM_MAX_SLOTS)
|
||||
if (pmp < EM_MAX_SLOTS) {
|
||||
pmp = array_index_nospec(pmp, EM_MAX_SLOTS);
|
||||
emp = &pp->em_priv[pmp];
|
||||
else
|
||||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* mask off the activity bits if we are in sw_activity
|
||||
* mode, user should turn off sw_activity before setting
|
||||
|
||||
@@ -792,7 +792,7 @@ static struct dma_chan *k3_of_dma_simple_xlate(struct of_phandle_args *dma_spec,
|
||||
struct k3_dma_dev *d = ofdma->of_dma_data;
|
||||
unsigned int request = dma_spec->args[0];
|
||||
|
||||
if (request > d->dma_requests)
|
||||
if (request >= d->dma_requests)
|
||||
return NULL;
|
||||
|
||||
return dma_get_slave_channel(&(d->chans[request].vc.chan));
|
||||
|
||||
@@ -2951,7 +2951,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
pd->src_addr_widths = PL330_DMA_BUSWIDTHS;
|
||||
pd->dst_addr_widths = PL330_DMA_BUSWIDTHS;
|
||||
pd->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
|
||||
pd->residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;
|
||||
pd->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
|
||||
pd->max_burst = ((pl330->quirks & PL330_QUIRK_BROKEN_NO_FLUSHP) ?
|
||||
1 : PL330_MAX_BURST);
|
||||
|
||||
|
||||
@@ -432,7 +432,8 @@ const struct malidp_hw_device malidp_device[MALIDP_MAX_DEVICES] = {
|
||||
.vsync_irq = MALIDP500_DE_IRQ_VSYNC,
|
||||
},
|
||||
.se_irq_map = {
|
||||
.irq_mask = MALIDP500_SE_IRQ_CONF_MODE,
|
||||
.irq_mask = MALIDP500_SE_IRQ_CONF_MODE |
|
||||
MALIDP500_SE_IRQ_GLOBAL,
|
||||
.vsync_irq = 0,
|
||||
},
|
||||
.dc_irq_map = {
|
||||
|
||||
@@ -160,6 +160,7 @@ enum {
|
||||
CFG_ALPHAM_GRA = 0x1 << 16,
|
||||
CFG_ALPHAM_CFG = 0x2 << 16,
|
||||
CFG_ALPHA_MASK = 0xff << 8,
|
||||
#define CFG_ALPHA(x) ((x) << 8)
|
||||
CFG_PIXCMD_MASK = 0xff,
|
||||
};
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ struct armada_ovl_plane_properties {
|
||||
uint16_t contrast;
|
||||
uint16_t saturation;
|
||||
uint32_t colorkey_mode;
|
||||
uint32_t colorkey_enable;
|
||||
};
|
||||
|
||||
struct armada_ovl_plane {
|
||||
@@ -62,11 +63,13 @@ armada_ovl_update_attr(struct armada_ovl_plane_properties *prop,
|
||||
writel_relaxed(0x00002000, dcrtc->base + LCD_SPU_CBSH_HUE);
|
||||
|
||||
spin_lock_irq(&dcrtc->irq_lock);
|
||||
armada_updatel(prop->colorkey_mode | CFG_ALPHAM_GRA,
|
||||
CFG_CKMODE_MASK | CFG_ALPHAM_MASK | CFG_ALPHA_MASK,
|
||||
dcrtc->base + LCD_SPU_DMA_CTRL1);
|
||||
|
||||
armada_updatel(ADV_GRACOLORKEY, 0, dcrtc->base + LCD_SPU_ADV_REG);
|
||||
armada_updatel(prop->colorkey_mode,
|
||||
CFG_CKMODE_MASK | CFG_ALPHAM_MASK | CFG_ALPHA_MASK,
|
||||
dcrtc->base + LCD_SPU_DMA_CTRL1);
|
||||
if (dcrtc->variant->has_spu_adv_reg)
|
||||
armada_updatel(prop->colorkey_enable,
|
||||
ADV_GRACOLORKEY | ADV_VIDCOLORKEY,
|
||||
dcrtc->base + LCD_SPU_ADV_REG);
|
||||
spin_unlock_irq(&dcrtc->irq_lock);
|
||||
}
|
||||
|
||||
@@ -340,8 +343,17 @@ static int armada_ovl_plane_set_property(struct drm_plane *plane,
|
||||
dplane->prop.colorkey_vb |= K2B(val);
|
||||
update_attr = true;
|
||||
} else if (property == priv->colorkey_mode_prop) {
|
||||
dplane->prop.colorkey_mode &= ~CFG_CKMODE_MASK;
|
||||
dplane->prop.colorkey_mode |= CFG_CKMODE(val);
|
||||
if (val == CKMODE_DISABLE) {
|
||||
dplane->prop.colorkey_mode =
|
||||
CFG_CKMODE(CKMODE_DISABLE) |
|
||||
CFG_ALPHAM_CFG | CFG_ALPHA(255);
|
||||
dplane->prop.colorkey_enable = 0;
|
||||
} else {
|
||||
dplane->prop.colorkey_mode =
|
||||
CFG_CKMODE(val) |
|
||||
CFG_ALPHAM_GRA | CFG_ALPHA(0);
|
||||
dplane->prop.colorkey_enable = ADV_GRACOLORKEY;
|
||||
}
|
||||
update_attr = true;
|
||||
} else if (property == priv->brightness_prop) {
|
||||
dplane->prop.brightness = val - 256;
|
||||
@@ -470,7 +482,9 @@ int armada_overlay_plane_create(struct drm_device *dev, unsigned long crtcs)
|
||||
dplane->prop.colorkey_yr = 0xfefefe00;
|
||||
dplane->prop.colorkey_ug = 0x01010100;
|
||||
dplane->prop.colorkey_vb = 0x01010100;
|
||||
dplane->prop.colorkey_mode = CFG_CKMODE(CKMODE_RGB);
|
||||
dplane->prop.colorkey_mode = CFG_CKMODE(CKMODE_RGB) |
|
||||
CFG_ALPHAM_GRA | CFG_ALPHA(0);
|
||||
dplane->prop.colorkey_enable = ADV_GRACOLORKEY;
|
||||
dplane->prop.brightness = 0;
|
||||
dplane->prop.contrast = 0x4000;
|
||||
dplane->prop.saturation = 0x4000;
|
||||
|
||||
@@ -199,7 +199,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
|
||||
unsigned long val;
|
||||
|
||||
val = readl(ctx->addr + DECON_WINCONx(win));
|
||||
val &= ~WINCONx_BPPMODE_MASK;
|
||||
val &= WINCONx_ENWIN_F;
|
||||
|
||||
switch (fb->pixel_format) {
|
||||
case DRM_FORMAT_XRGB1555:
|
||||
@@ -291,8 +291,8 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
|
||||
COORDINATE_Y(state->crtc.y + state->crtc.h - 1);
|
||||
writel(val, ctx->addr + DECON_VIDOSDxB(win));
|
||||
|
||||
val = VIDOSD_Wx_ALPHA_R_F(0x0) | VIDOSD_Wx_ALPHA_G_F(0x0) |
|
||||
VIDOSD_Wx_ALPHA_B_F(0x0);
|
||||
val = VIDOSD_Wx_ALPHA_R_F(0xff) | VIDOSD_Wx_ALPHA_G_F(0xff) |
|
||||
VIDOSD_Wx_ALPHA_B_F(0xff);
|
||||
writel(val, ctx->addr + DECON_VIDOSDxC(win));
|
||||
|
||||
val = VIDOSD_Wx_ALPHA_R_F(0x0) | VIDOSD_Wx_ALPHA_G_F(0x0) |
|
||||
|
||||
@@ -532,21 +532,25 @@ static int gsc_src_set_fmt(struct device *dev, u32 fmt)
|
||||
GSC_IN_CHROMA_ORDER_CRCB);
|
||||
break;
|
||||
case DRM_FORMAT_NV21:
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CRCB | GSC_IN_YUV420_2P);
|
||||
break;
|
||||
case DRM_FORMAT_NV61:
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CRCB |
|
||||
GSC_IN_YUV420_2P);
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CRCB | GSC_IN_YUV422_2P);
|
||||
break;
|
||||
case DRM_FORMAT_YUV422:
|
||||
cfg |= GSC_IN_YUV422_3P;
|
||||
break;
|
||||
case DRM_FORMAT_YUV420:
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CBCR | GSC_IN_YUV420_3P);
|
||||
break;
|
||||
case DRM_FORMAT_YVU420:
|
||||
cfg |= GSC_IN_YUV420_3P;
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CRCB | GSC_IN_YUV420_3P);
|
||||
break;
|
||||
case DRM_FORMAT_NV12:
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CBCR | GSC_IN_YUV420_2P);
|
||||
break;
|
||||
case DRM_FORMAT_NV16:
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CBCR |
|
||||
GSC_IN_YUV420_2P);
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CBCR | GSC_IN_YUV422_2P);
|
||||
break;
|
||||
default:
|
||||
dev_err(ippdrv->dev, "invalid target yuv order 0x%x.\n", fmt);
|
||||
@@ -806,18 +810,25 @@ static int gsc_dst_set_fmt(struct device *dev, u32 fmt)
|
||||
GSC_OUT_CHROMA_ORDER_CRCB);
|
||||
break;
|
||||
case DRM_FORMAT_NV21:
|
||||
case DRM_FORMAT_NV61:
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CRCB | GSC_OUT_YUV420_2P);
|
||||
break;
|
||||
case DRM_FORMAT_NV61:
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CRCB | GSC_OUT_YUV422_2P);
|
||||
break;
|
||||
case DRM_FORMAT_YUV422:
|
||||
cfg |= GSC_OUT_YUV422_3P;
|
||||
break;
|
||||
case DRM_FORMAT_YUV420:
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CBCR | GSC_OUT_YUV420_3P);
|
||||
break;
|
||||
case DRM_FORMAT_YVU420:
|
||||
cfg |= GSC_OUT_YUV420_3P;
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CRCB | GSC_OUT_YUV420_3P);
|
||||
break;
|
||||
case DRM_FORMAT_NV12:
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CBCR | GSC_OUT_YUV420_2P);
|
||||
break;
|
||||
case DRM_FORMAT_NV16:
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CBCR |
|
||||
GSC_OUT_YUV420_2P);
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CBCR | GSC_OUT_YUV422_2P);
|
||||
break;
|
||||
default:
|
||||
dev_err(ippdrv->dev, "invalid target yuv order 0x%x.\n", fmt);
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
#define GSC_OUT_YUV420_3P (3 << 4)
|
||||
#define GSC_OUT_YUV422_1P (4 << 4)
|
||||
#define GSC_OUT_YUV422_2P (5 << 4)
|
||||
#define GSC_OUT_YUV422_3P (6 << 4)
|
||||
#define GSC_OUT_YUV444 (7 << 4)
|
||||
#define GSC_OUT_TILE_TYPE_MASK (1 << 2)
|
||||
#define GSC_OUT_TILE_C_16x8 (0 << 2)
|
||||
|
||||
@@ -601,7 +601,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
|
||||
struct nouveau_bo *nvbo;
|
||||
uint32_t data;
|
||||
|
||||
if (unlikely(r->bo_index > req->nr_buffers)) {
|
||||
if (unlikely(r->bo_index >= req->nr_buffers)) {
|
||||
NV_PRINTK(err, cli, "reloc bo index invalid\n");
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
@@ -611,7 +611,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
|
||||
if (b->presumed.valid)
|
||||
continue;
|
||||
|
||||
if (unlikely(r->reloc_bo_index > req->nr_buffers)) {
|
||||
if (unlikely(r->reloc_bo_index >= req->nr_buffers)) {
|
||||
NV_PRINTK(err, cli, "reloc container bo index invalid\n");
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
|
||||
@@ -2429,8 +2429,14 @@ void wacom_setup_device_quirks(struct wacom *wacom)
|
||||
if (features->type >= INTUOSHT && features->type <= BAMBOO_PT)
|
||||
features->device_type |= WACOM_DEVICETYPE_PAD;
|
||||
|
||||
features->x_max = 4096;
|
||||
features->y_max = 4096;
|
||||
if (features->type == INTUOSHT2) {
|
||||
features->x_max = features->x_max / 10;
|
||||
features->y_max = features->y_max / 10;
|
||||
}
|
||||
else {
|
||||
features->x_max = 4096;
|
||||
features->y_max = 4096;
|
||||
}
|
||||
}
|
||||
else if (features->pktlen == WACOM_PKGLEN_BBTOUCH) {
|
||||
features->device_type |= WACOM_DEVICETYPE_PAD;
|
||||
|
||||
@@ -665,9 +665,6 @@ static int i2c_imx_dma_read(struct imx_i2c_struct *i2c_imx,
|
||||
struct imx_i2c_dma *dma = i2c_imx->dma;
|
||||
struct device *dev = &i2c_imx->adapter.dev;
|
||||
|
||||
temp = imx_i2c_read_reg(i2c_imx, IMX_I2C_I2CR);
|
||||
temp |= I2CR_DMAEN;
|
||||
imx_i2c_write_reg(temp, i2c_imx, IMX_I2C_I2CR);
|
||||
|
||||
dma->chan_using = dma->chan_rx;
|
||||
dma->dma_transfer_dir = DMA_DEV_TO_MEM;
|
||||
@@ -780,6 +777,7 @@ static int i2c_imx_read(struct imx_i2c_struct *i2c_imx, struct i2c_msg *msgs, bo
|
||||
int i, result;
|
||||
unsigned int temp;
|
||||
int block_data = msgs->flags & I2C_M_RECV_LEN;
|
||||
int use_dma = i2c_imx->dma && msgs->len >= DMA_THRESHOLD && !block_data;
|
||||
|
||||
dev_dbg(&i2c_imx->adapter.dev,
|
||||
"<%s> write slave address: addr=0x%x\n",
|
||||
@@ -806,12 +804,14 @@ static int i2c_imx_read(struct imx_i2c_struct *i2c_imx, struct i2c_msg *msgs, bo
|
||||
*/
|
||||
if ((msgs->len - 1) || block_data)
|
||||
temp &= ~I2CR_TXAK;
|
||||
if (use_dma)
|
||||
temp |= I2CR_DMAEN;
|
||||
imx_i2c_write_reg(temp, i2c_imx, IMX_I2C_I2CR);
|
||||
imx_i2c_read_reg(i2c_imx, IMX_I2C_I2DR); /* dummy read */
|
||||
|
||||
dev_dbg(&i2c_imx->adapter.dev, "<%s> read data\n", __func__);
|
||||
|
||||
if (i2c_imx->dma && msgs->len >= DMA_THRESHOLD && !block_data)
|
||||
if (use_dma)
|
||||
return i2c_imx_dma_read(i2c_imx, msgs, is_lastmsg);
|
||||
|
||||
/* read data */
|
||||
|
||||
@@ -347,10 +347,9 @@ static int bmp280_read_humid(struct bmp280_data *data, int *val, int *val2)
|
||||
adc_humidity = be16_to_cpu(tmp);
|
||||
comp_humidity = bmp280_compensate_humidity(data, adc_humidity);
|
||||
|
||||
*val = comp_humidity;
|
||||
*val2 = 1024;
|
||||
*val = comp_humidity * 1000 / 1024;
|
||||
|
||||
return IIO_VAL_FRACTIONAL;
|
||||
return IIO_VAL_INT;
|
||||
}
|
||||
|
||||
static int bmp280_read_raw(struct iio_dev *indio_dev,
|
||||
|
||||
@@ -268,18 +268,24 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd,
|
||||
|
||||
desc_size = sizeof(struct mlx5_wqe_srq_next_seg) +
|
||||
srq->msrq.max_gs * sizeof(struct mlx5_wqe_data_seg);
|
||||
if (desc_size == 0 || srq->msrq.max_gs > desc_size)
|
||||
return ERR_PTR(-EINVAL);
|
||||
if (desc_size == 0 || srq->msrq.max_gs > desc_size) {
|
||||
err = -EINVAL;
|
||||
goto err_srq;
|
||||
}
|
||||
desc_size = roundup_pow_of_two(desc_size);
|
||||
desc_size = max_t(size_t, 32, desc_size);
|
||||
if (desc_size < sizeof(struct mlx5_wqe_srq_next_seg))
|
||||
return ERR_PTR(-EINVAL);
|
||||
if (desc_size < sizeof(struct mlx5_wqe_srq_next_seg)) {
|
||||
err = -EINVAL;
|
||||
goto err_srq;
|
||||
}
|
||||
srq->msrq.max_avail_gather = (desc_size - sizeof(struct mlx5_wqe_srq_next_seg)) /
|
||||
sizeof(struct mlx5_wqe_data_seg);
|
||||
srq->msrq.wqe_shift = ilog2(desc_size);
|
||||
buf_size = srq->msrq.max * desc_size;
|
||||
if (buf_size < desc_size)
|
||||
return ERR_PTR(-EINVAL);
|
||||
if (buf_size < desc_size) {
|
||||
err = -EINVAL;
|
||||
goto err_srq;
|
||||
}
|
||||
in.type = init_attr->srq_type;
|
||||
|
||||
if (pd->uobject)
|
||||
|
||||
@@ -648,6 +648,9 @@ next_wqe:
|
||||
} else {
|
||||
goto exit;
|
||||
}
|
||||
if ((wqe->wr.send_flags & IB_SEND_SIGNALED) ||
|
||||
qp->sq_sig_type == IB_SIGNAL_ALL_WR)
|
||||
rxe_run_task(&qp->comp.task, 1);
|
||||
qp->req.wqe_index = next_index(qp->sq.queue,
|
||||
qp->req.wqe_index);
|
||||
goto next_wqe;
|
||||
|
||||
@@ -3734,6 +3734,13 @@ static int raid10_run(struct mddev *mddev)
|
||||
disk->rdev->saved_raid_disk < 0)
|
||||
conf->fullsync = 1;
|
||||
}
|
||||
|
||||
if (disk->replacement &&
|
||||
!test_bit(In_sync, &disk->replacement->flags) &&
|
||||
disk->replacement->saved_raid_disk < 0) {
|
||||
conf->fullsync = 1;
|
||||
}
|
||||
|
||||
disk->recovery_disabled = mddev->recovery_disabled - 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1529,6 +1529,7 @@ struct bnx2x {
|
||||
struct link_vars link_vars;
|
||||
u32 link_cnt;
|
||||
struct bnx2x_link_report_data last_reported_link;
|
||||
bool force_link_down;
|
||||
|
||||
struct mdio_if_info mdio;
|
||||
|
||||
|
||||
@@ -1265,6 +1265,11 @@ void __bnx2x_link_report(struct bnx2x *bp)
|
||||
{
|
||||
struct bnx2x_link_report_data cur_data;
|
||||
|
||||
if (bp->force_link_down) {
|
||||
bp->link_vars.link_up = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* reread mf_cfg */
|
||||
if (IS_PF(bp) && !CHIP_IS_E1(bp))
|
||||
bnx2x_read_mf_cfg(bp);
|
||||
@@ -2822,6 +2827,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
|
||||
bp->pending_max = 0;
|
||||
}
|
||||
|
||||
bp->force_link_down = false;
|
||||
if (bp->port.pmf) {
|
||||
rc = bnx2x_initial_phy_init(bp, load_mode);
|
||||
if (rc)
|
||||
|
||||
@@ -10279,6 +10279,12 @@ static void bnx2x_sp_rtnl_task(struct work_struct *work)
|
||||
bp->sp_rtnl_state = 0;
|
||||
smp_mb();
|
||||
|
||||
/* Immediately indicate link as down */
|
||||
bp->link_vars.link_up = 0;
|
||||
bp->force_link_down = true;
|
||||
netif_carrier_off(bp->dev);
|
||||
BNX2X_ERR("Indicating link is down due to Tx-timeout\n");
|
||||
|
||||
bnx2x_nic_unload(bp, UNLOAD_NORMAL, true);
|
||||
bnx2x_nic_load(bp, LOAD_NORMAL);
|
||||
|
||||
|
||||
@@ -5560,7 +5560,7 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
|
||||
rc = bnxt_request_irq(bp);
|
||||
if (rc) {
|
||||
netdev_err(bp->dev, "bnxt_request_irq err: %x\n", rc);
|
||||
goto open_err;
|
||||
goto open_err_irq;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5593,6 +5593,8 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
|
||||
|
||||
open_err:
|
||||
bnxt_disable_napi(bp);
|
||||
|
||||
open_err_irq:
|
||||
bnxt_del_napi(bp);
|
||||
|
||||
open_err_free_mem:
|
||||
@@ -6862,11 +6864,11 @@ int bnxt_get_max_rings(struct bnxt *bp, int *max_rx, int *max_tx, bool shared)
|
||||
int rx, tx, cp;
|
||||
|
||||
_bnxt_get_max_rings(bp, &rx, &tx, &cp);
|
||||
*max_rx = rx;
|
||||
*max_tx = tx;
|
||||
if (!rx || !tx || !cp)
|
||||
return -ENOMEM;
|
||||
|
||||
*max_rx = rx;
|
||||
*max_tx = tx;
|
||||
return bnxt_trim_rings(bp, max_rx, max_tx, cp, shared);
|
||||
}
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ static void dcb_tx_queue_prio_enable(struct net_device *dev, int enable)
|
||||
"Can't %s DCB Priority on port %d, TX Queue %d: err=%d\n",
|
||||
enable ? "set" : "unset", pi->port_id, i, -err);
|
||||
else
|
||||
txq->dcb_prio = value;
|
||||
txq->dcb_prio = enable ? value : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,6 @@ void enic_rfs_flw_tbl_init(struct enic *enic)
|
||||
enic->rfs_h.max = enic->config.num_arfs;
|
||||
enic->rfs_h.free = enic->rfs_h.max;
|
||||
enic->rfs_h.toclean = 0;
|
||||
enic_rfs_timer_start(enic);
|
||||
}
|
||||
|
||||
void enic_rfs_flw_tbl_free(struct enic *enic)
|
||||
@@ -87,7 +86,6 @@ void enic_rfs_flw_tbl_free(struct enic *enic)
|
||||
|
||||
enic_rfs_timer_stop(enic);
|
||||
spin_lock_bh(&enic->rfs_h.lock);
|
||||
enic->rfs_h.free = 0;
|
||||
for (i = 0; i < (1 << ENIC_RFS_FLW_BITSHIFT); i++) {
|
||||
struct hlist_head *hhead;
|
||||
struct hlist_node *tmp;
|
||||
@@ -98,6 +96,7 @@ void enic_rfs_flw_tbl_free(struct enic *enic)
|
||||
enic_delfltr(enic, n->fltr_id);
|
||||
hlist_del(&n->node);
|
||||
kfree(n);
|
||||
enic->rfs_h.free++;
|
||||
}
|
||||
}
|
||||
spin_unlock_bh(&enic->rfs_h.lock);
|
||||
|
||||
@@ -1760,7 +1760,7 @@ static int enic_open(struct net_device *netdev)
|
||||
vnic_intr_unmask(&enic->intr[i]);
|
||||
|
||||
enic_notify_timer_start(enic);
|
||||
enic_rfs_flw_tbl_init(enic);
|
||||
enic_rfs_timer_start(enic);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -2692,6 +2692,7 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
enic->notify_timer.function = enic_notify_timer;
|
||||
enic->notify_timer.data = (unsigned long)enic;
|
||||
|
||||
enic_rfs_flw_tbl_init(enic);
|
||||
enic_set_rx_coal_setting(enic);
|
||||
INIT_WORK(&enic->reset, enic_reset);
|
||||
INIT_WORK(&enic->tx_hang_reset, enic_tx_hang_reset);
|
||||
|
||||
@@ -1847,7 +1847,12 @@ s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
|
||||
if (enable_addr != 0)
|
||||
rar_high |= IXGBE_RAH_AV;
|
||||
|
||||
/* Record lower 32 bits of MAC address and then make
|
||||
* sure that write is flushed to hardware before writing
|
||||
* the upper 16 bits and setting the valid bit.
|
||||
*/
|
||||
IXGBE_WRITE_REG(hw, IXGBE_RAL(index), rar_low);
|
||||
IXGBE_WRITE_FLUSH(hw);
|
||||
IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high);
|
||||
|
||||
return 0;
|
||||
@@ -1879,8 +1884,13 @@ s32 ixgbe_clear_rar_generic(struct ixgbe_hw *hw, u32 index)
|
||||
rar_high = IXGBE_READ_REG(hw, IXGBE_RAH(index));
|
||||
rar_high &= ~(0x0000FFFF | IXGBE_RAH_AV);
|
||||
|
||||
IXGBE_WRITE_REG(hw, IXGBE_RAL(index), 0);
|
||||
/* Clear the address valid bit and upper 16 bits of the address
|
||||
* before clearing the lower bits. This way we aren't updating
|
||||
* a live filter.
|
||||
*/
|
||||
IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high);
|
||||
IXGBE_WRITE_FLUSH(hw);
|
||||
IXGBE_WRITE_REG(hw, IXGBE_RAL(index), 0);
|
||||
|
||||
/* clear VMDq pool/queue selection for this RAR */
|
||||
hw->mac.ops.clear_vmdq(hw, index, IXGBE_CLEAR_VMDQ_ALL);
|
||||
|
||||
@@ -502,8 +502,16 @@ static irqreturn_t qed_single_int(int irq, void *dev_instance)
|
||||
/* Fastpath interrupts */
|
||||
for (j = 0; j < 64; j++) {
|
||||
if ((0x2ULL << j) & status) {
|
||||
hwfn->simd_proto_handler[j].func(
|
||||
hwfn->simd_proto_handler[j].token);
|
||||
struct qed_simd_fp_handler *p_handler =
|
||||
&hwfn->simd_proto_handler[j];
|
||||
|
||||
if (p_handler->func)
|
||||
p_handler->func(p_handler->token);
|
||||
else
|
||||
DP_NOTICE(hwfn,
|
||||
"Not calling fastpath handler as it is NULL [handler #%d, status 0x%llx]\n",
|
||||
j, status);
|
||||
|
||||
status &= ~(0x2ULL << j);
|
||||
rc = IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -1128,6 +1128,8 @@ static ssize_t qlcnic_83xx_sysfs_flash_write_handler(struct file *filp,
|
||||
struct qlcnic_adapter *adapter = dev_get_drvdata(dev);
|
||||
|
||||
ret = kstrtoul(buf, 16, &data);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
switch (data) {
|
||||
case QLC_83XX_FLASH_SECTOR_ERASE_CMD:
|
||||
|
||||
@@ -635,7 +635,7 @@ qcaspi_netdev_open(struct net_device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
netif_start_queue(qca->net_dev);
|
||||
/* SPI thread takes care of TX queue */
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -739,6 +739,9 @@ qcaspi_netdev_tx_timeout(struct net_device *dev)
|
||||
qca->net_dev->stats.tx_errors++;
|
||||
/* Trigger tx queue flush and QCA7000 reset */
|
||||
qca->sync = QCASPI_SYNC_UNKNOWN;
|
||||
|
||||
if (qca->spi_thread)
|
||||
wake_up_process(qca->spi_thread);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -865,22 +868,22 @@ qca_spi_probe(struct spi_device *spi)
|
||||
|
||||
if ((qcaspi_clkspeed < QCASPI_CLK_SPEED_MIN) ||
|
||||
(qcaspi_clkspeed > QCASPI_CLK_SPEED_MAX)) {
|
||||
dev_info(&spi->dev, "Invalid clkspeed: %d\n",
|
||||
qcaspi_clkspeed);
|
||||
dev_err(&spi->dev, "Invalid clkspeed: %d\n",
|
||||
qcaspi_clkspeed);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((qcaspi_burst_len < QCASPI_BURST_LEN_MIN) ||
|
||||
(qcaspi_burst_len > QCASPI_BURST_LEN_MAX)) {
|
||||
dev_info(&spi->dev, "Invalid burst len: %d\n",
|
||||
qcaspi_burst_len);
|
||||
dev_err(&spi->dev, "Invalid burst len: %d\n",
|
||||
qcaspi_burst_len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((qcaspi_pluggable < QCASPI_PLUGGABLE_MIN) ||
|
||||
(qcaspi_pluggable > QCASPI_PLUGGABLE_MAX)) {
|
||||
dev_info(&spi->dev, "Invalid pluggable: %d\n",
|
||||
qcaspi_pluggable);
|
||||
dev_err(&spi->dev, "Invalid pluggable: %d\n",
|
||||
qcaspi_pluggable);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -941,8 +944,8 @@ qca_spi_probe(struct spi_device *spi)
|
||||
}
|
||||
|
||||
if (register_netdev(qcaspi_devs)) {
|
||||
dev_info(&spi->dev, "Unable to register net device %s\n",
|
||||
qcaspi_devs->name);
|
||||
dev_err(&spi->dev, "Unable to register net device %s\n",
|
||||
qcaspi_devs->name);
|
||||
free_netdev(qcaspi_devs);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
@@ -955,6 +955,13 @@ static void ravb_adjust_link(struct net_device *ndev)
|
||||
struct ravb_private *priv = netdev_priv(ndev);
|
||||
struct phy_device *phydev = ndev->phydev;
|
||||
bool new_state = false;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
|
||||
/* Disable TX and RX right over here, if E-MAC change is ignored */
|
||||
if (priv->no_avb_link)
|
||||
ravb_rcv_snd_disable(ndev);
|
||||
|
||||
if (phydev->link) {
|
||||
if (phydev->duplex != priv->duplex) {
|
||||
@@ -972,18 +979,21 @@ static void ravb_adjust_link(struct net_device *ndev)
|
||||
ravb_modify(ndev, ECMR, ECMR_TXF, 0);
|
||||
new_state = true;
|
||||
priv->link = phydev->link;
|
||||
if (priv->no_avb_link)
|
||||
ravb_rcv_snd_enable(ndev);
|
||||
}
|
||||
} else if (priv->link) {
|
||||
new_state = true;
|
||||
priv->link = 0;
|
||||
priv->speed = 0;
|
||||
priv->duplex = -1;
|
||||
if (priv->no_avb_link)
|
||||
ravb_rcv_snd_disable(ndev);
|
||||
}
|
||||
|
||||
/* Enable TX and RX right over here, if E-MAC change is ignored */
|
||||
if (priv->no_avb_link && phydev->link)
|
||||
ravb_rcv_snd_enable(ndev);
|
||||
|
||||
mmiowb();
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
|
||||
if (new_state && netif_msg_link(priv))
|
||||
phy_print_status(phydev);
|
||||
}
|
||||
@@ -1085,52 +1095,18 @@ static int ravb_get_link_ksettings(struct net_device *ndev,
|
||||
static int ravb_set_link_ksettings(struct net_device *ndev,
|
||||
const struct ethtool_link_ksettings *cmd)
|
||||
{
|
||||
struct ravb_private *priv = netdev_priv(ndev);
|
||||
unsigned long flags;
|
||||
int error;
|
||||
|
||||
if (!ndev->phydev)
|
||||
return -ENODEV;
|
||||
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
|
||||
/* Disable TX and RX */
|
||||
ravb_rcv_snd_disable(ndev);
|
||||
|
||||
error = phy_ethtool_ksettings_set(ndev->phydev, cmd);
|
||||
if (error)
|
||||
goto error_exit;
|
||||
|
||||
if (cmd->base.duplex == DUPLEX_FULL)
|
||||
priv->duplex = 1;
|
||||
else
|
||||
priv->duplex = 0;
|
||||
|
||||
ravb_set_duplex(ndev);
|
||||
|
||||
error_exit:
|
||||
mdelay(1);
|
||||
|
||||
/* Enable TX and RX */
|
||||
ravb_rcv_snd_enable(ndev);
|
||||
|
||||
mmiowb();
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
|
||||
return error;
|
||||
return phy_ethtool_ksettings_set(ndev->phydev, cmd);
|
||||
}
|
||||
|
||||
static int ravb_nway_reset(struct net_device *ndev)
|
||||
{
|
||||
struct ravb_private *priv = netdev_priv(ndev);
|
||||
int error = -ENODEV;
|
||||
unsigned long flags;
|
||||
|
||||
if (ndev->phydev) {
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
if (ndev->phydev)
|
||||
error = phy_start_aneg(ndev->phydev);
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -1743,8 +1743,15 @@ static void sh_eth_adjust_link(struct net_device *ndev)
|
||||
{
|
||||
struct sh_eth_private *mdp = netdev_priv(ndev);
|
||||
struct phy_device *phydev = ndev->phydev;
|
||||
unsigned long flags;
|
||||
int new_state = 0;
|
||||
|
||||
spin_lock_irqsave(&mdp->lock, flags);
|
||||
|
||||
/* Disable TX and RX right over here, if E-MAC change is ignored */
|
||||
if (mdp->cd->no_psr || mdp->no_ether_link)
|
||||
sh_eth_rcv_snd_disable(ndev);
|
||||
|
||||
if (phydev->link) {
|
||||
if (phydev->duplex != mdp->duplex) {
|
||||
new_state = 1;
|
||||
@@ -1763,18 +1770,21 @@ static void sh_eth_adjust_link(struct net_device *ndev)
|
||||
sh_eth_modify(ndev, ECMR, ECMR_TXF, 0);
|
||||
new_state = 1;
|
||||
mdp->link = phydev->link;
|
||||
if (mdp->cd->no_psr || mdp->no_ether_link)
|
||||
sh_eth_rcv_snd_enable(ndev);
|
||||
}
|
||||
} else if (mdp->link) {
|
||||
new_state = 1;
|
||||
mdp->link = 0;
|
||||
mdp->speed = 0;
|
||||
mdp->duplex = -1;
|
||||
if (mdp->cd->no_psr || mdp->no_ether_link)
|
||||
sh_eth_rcv_snd_disable(ndev);
|
||||
}
|
||||
|
||||
/* Enable TX and RX right over here, if E-MAC change is ignored */
|
||||
if ((mdp->cd->no_psr || mdp->no_ether_link) && phydev->link)
|
||||
sh_eth_rcv_snd_enable(ndev);
|
||||
|
||||
mmiowb();
|
||||
spin_unlock_irqrestore(&mdp->lock, flags);
|
||||
|
||||
if (new_state && netif_msg_link(mdp))
|
||||
phy_print_status(phydev);
|
||||
}
|
||||
@@ -1856,39 +1866,10 @@ static int sh_eth_get_link_ksettings(struct net_device *ndev,
|
||||
static int sh_eth_set_link_ksettings(struct net_device *ndev,
|
||||
const struct ethtool_link_ksettings *cmd)
|
||||
{
|
||||
struct sh_eth_private *mdp = netdev_priv(ndev);
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
if (!ndev->phydev)
|
||||
return -ENODEV;
|
||||
|
||||
spin_lock_irqsave(&mdp->lock, flags);
|
||||
|
||||
/* disable tx and rx */
|
||||
sh_eth_rcv_snd_disable(ndev);
|
||||
|
||||
ret = phy_ethtool_ksettings_set(ndev->phydev, cmd);
|
||||
if (ret)
|
||||
goto error_exit;
|
||||
|
||||
if (cmd->base.duplex == DUPLEX_FULL)
|
||||
mdp->duplex = 1;
|
||||
else
|
||||
mdp->duplex = 0;
|
||||
|
||||
if (mdp->cd->set_duplex)
|
||||
mdp->cd->set_duplex(ndev);
|
||||
|
||||
error_exit:
|
||||
mdelay(1);
|
||||
|
||||
/* enable tx and rx */
|
||||
sh_eth_rcv_snd_enable(ndev);
|
||||
|
||||
spin_unlock_irqrestore(&mdp->lock, flags);
|
||||
|
||||
return ret;
|
||||
return phy_ethtool_ksettings_set(ndev->phydev, cmd);
|
||||
}
|
||||
|
||||
/* If it is ever necessary to increase SH_ETH_REG_DUMP_MAX_REGS, the
|
||||
@@ -2079,18 +2060,10 @@ static void sh_eth_get_regs(struct net_device *ndev, struct ethtool_regs *regs,
|
||||
|
||||
static int sh_eth_nway_reset(struct net_device *ndev)
|
||||
{
|
||||
struct sh_eth_private *mdp = netdev_priv(ndev);
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
if (!ndev->phydev)
|
||||
return -ENODEV;
|
||||
|
||||
spin_lock_irqsave(&mdp->lock, flags);
|
||||
ret = phy_start_aneg(ndev->phydev);
|
||||
spin_unlock_irqrestore(&mdp->lock, flags);
|
||||
|
||||
return ret;
|
||||
return phy_start_aneg(ndev->phydev);
|
||||
}
|
||||
|
||||
static u32 sh_eth_get_msglevel(struct net_device *ndev)
|
||||
|
||||
@@ -83,7 +83,7 @@ config DWMAC_ROCKCHIP
|
||||
config DWMAC_SOCFPGA
|
||||
tristate "SOCFPGA dwmac support"
|
||||
default ARCH_SOCFPGA
|
||||
depends on OF && (ARCH_SOCFPGA || COMPILE_TEST)
|
||||
depends on OF && (ARCH_SOCFPGA || ARCH_STRATIX10 || COMPILE_TEST)
|
||||
select MFD_SYSCON
|
||||
help
|
||||
Support for ethernet controller on Altera SOCFPGA
|
||||
|
||||
@@ -55,6 +55,7 @@ struct socfpga_dwmac {
|
||||
struct device *dev;
|
||||
struct regmap *sys_mgr_base_addr;
|
||||
struct reset_control *stmmac_rst;
|
||||
struct reset_control *stmmac_ocp_rst;
|
||||
void __iomem *splitter_base;
|
||||
bool f2h_ptp_ref_clk;
|
||||
struct tse_pcs pcs;
|
||||
@@ -262,8 +263,8 @@ static int socfpga_dwmac_set_phy_mode(struct socfpga_dwmac *dwmac)
|
||||
val = SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII;
|
||||
|
||||
/* Assert reset to the enet controller before changing the phy mode */
|
||||
if (dwmac->stmmac_rst)
|
||||
reset_control_assert(dwmac->stmmac_rst);
|
||||
reset_control_assert(dwmac->stmmac_ocp_rst);
|
||||
reset_control_assert(dwmac->stmmac_rst);
|
||||
|
||||
regmap_read(sys_mgr_base_addr, reg_offset, &ctrl);
|
||||
ctrl &= ~(SYSMGR_EMACGRP_CTRL_PHYSEL_MASK << reg_shift);
|
||||
@@ -285,8 +286,8 @@ static int socfpga_dwmac_set_phy_mode(struct socfpga_dwmac *dwmac)
|
||||
/* Deassert reset for the phy configuration to be sampled by
|
||||
* the enet controller, and operation to start in requested mode
|
||||
*/
|
||||
if (dwmac->stmmac_rst)
|
||||
reset_control_deassert(dwmac->stmmac_rst);
|
||||
reset_control_deassert(dwmac->stmmac_ocp_rst);
|
||||
reset_control_deassert(dwmac->stmmac_rst);
|
||||
if (phymode == PHY_INTERFACE_MODE_SGMII) {
|
||||
if (tse_pcs_init(dwmac->pcs.tse_pcs_base, &dwmac->pcs) != 0) {
|
||||
dev_err(dwmac->dev, "Unable to initialize TSE PCS");
|
||||
@@ -321,6 +322,15 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
|
||||
goto err_remove_config_dt;
|
||||
}
|
||||
|
||||
dwmac->stmmac_ocp_rst = devm_reset_control_get_optional(dev, "stmmaceth-ocp");
|
||||
if (IS_ERR(dwmac->stmmac_ocp_rst)) {
|
||||
ret = PTR_ERR(dwmac->stmmac_ocp_rst);
|
||||
dev_err(dev, "error getting reset control of ocp %d\n", ret);
|
||||
goto err_remove_config_dt;
|
||||
}
|
||||
|
||||
reset_control_deassert(dwmac->stmmac_ocp_rst);
|
||||
|
||||
ret = socfpga_dwmac_parse_data(dwmac, dev);
|
||||
if (ret) {
|
||||
dev_err(dev, "Unable to parse OF data\n");
|
||||
|
||||
@@ -1387,6 +1387,10 @@ static int emac_devioctl(struct net_device *ndev, struct ifreq *ifrq, int cmd)
|
||||
|
||||
static int match_first_device(struct device *dev, void *data)
|
||||
{
|
||||
if (dev->parent && dev->parent->of_node)
|
||||
return of_device_is_compatible(dev->parent->of_node,
|
||||
"ti,davinci_mdio");
|
||||
|
||||
return !strncmp(dev_name(dev), "davinci_mdio", 12);
|
||||
}
|
||||
|
||||
|
||||
@@ -89,10 +89,6 @@
|
||||
static const char banner[] __initconst = KERN_INFO \
|
||||
"AX.25: bpqether driver version 004\n";
|
||||
|
||||
static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
|
||||
|
||||
static char bpq_eth_addr[6];
|
||||
|
||||
static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *);
|
||||
static int bpq_device_event(struct notifier_block *, unsigned long, void *);
|
||||
|
||||
@@ -515,8 +511,8 @@ static int bpq_new_device(struct net_device *edev)
|
||||
bpq->ethdev = edev;
|
||||
bpq->axdev = ndev;
|
||||
|
||||
memcpy(bpq->dest_addr, bcast_addr, sizeof(bpq_eth_addr));
|
||||
memcpy(bpq->acpt_addr, bcast_addr, sizeof(bpq_eth_addr));
|
||||
eth_broadcast_addr(bpq->dest_addr);
|
||||
eth_broadcast_addr(bpq->acpt_addr);
|
||||
|
||||
err = register_netdevice(ndev);
|
||||
if (err)
|
||||
|
||||
@@ -941,7 +941,7 @@ at86rf230_xmit(struct ieee802154_hw *hw, struct sk_buff *skb)
|
||||
static int
|
||||
at86rf230_ed(struct ieee802154_hw *hw, u8 *level)
|
||||
{
|
||||
BUG_ON(!level);
|
||||
WARN_ON(!level);
|
||||
*level = 0xbe;
|
||||
return 0;
|
||||
}
|
||||
@@ -1117,8 +1117,7 @@ at86rf230_set_hw_addr_filt(struct ieee802154_hw *hw,
|
||||
if (changed & IEEE802154_AFILT_SADDR_CHANGED) {
|
||||
u16 addr = le16_to_cpu(filt->short_addr);
|
||||
|
||||
dev_vdbg(&lp->spi->dev,
|
||||
"at86rf230_set_hw_addr_filt called for saddr\n");
|
||||
dev_vdbg(&lp->spi->dev, "%s called for saddr\n", __func__);
|
||||
__at86rf230_write(lp, RG_SHORT_ADDR_0, addr);
|
||||
__at86rf230_write(lp, RG_SHORT_ADDR_1, addr >> 8);
|
||||
}
|
||||
@@ -1126,8 +1125,7 @@ at86rf230_set_hw_addr_filt(struct ieee802154_hw *hw,
|
||||
if (changed & IEEE802154_AFILT_PANID_CHANGED) {
|
||||
u16 pan = le16_to_cpu(filt->pan_id);
|
||||
|
||||
dev_vdbg(&lp->spi->dev,
|
||||
"at86rf230_set_hw_addr_filt called for pan id\n");
|
||||
dev_vdbg(&lp->spi->dev, "%s called for pan id\n", __func__);
|
||||
__at86rf230_write(lp, RG_PAN_ID_0, pan);
|
||||
__at86rf230_write(lp, RG_PAN_ID_1, pan >> 8);
|
||||
}
|
||||
@@ -1136,15 +1134,13 @@ at86rf230_set_hw_addr_filt(struct ieee802154_hw *hw,
|
||||
u8 i, addr[8];
|
||||
|
||||
memcpy(addr, &filt->ieee_addr, 8);
|
||||
dev_vdbg(&lp->spi->dev,
|
||||
"at86rf230_set_hw_addr_filt called for IEEE addr\n");
|
||||
dev_vdbg(&lp->spi->dev, "%s called for IEEE addr\n", __func__);
|
||||
for (i = 0; i < 8; i++)
|
||||
__at86rf230_write(lp, RG_IEEE_ADDR_0 + i, addr[i]);
|
||||
}
|
||||
|
||||
if (changed & IEEE802154_AFILT_PANC_CHANGED) {
|
||||
dev_vdbg(&lp->spi->dev,
|
||||
"at86rf230_set_hw_addr_filt called for panc change\n");
|
||||
dev_vdbg(&lp->spi->dev, "%s called for panc change\n", __func__);
|
||||
if (filt->pan_coord)
|
||||
at86rf230_write_subreg(lp, SR_AACK_I_AM_COORD, 1);
|
||||
else
|
||||
@@ -1248,7 +1244,6 @@ at86rf230_set_cca_mode(struct ieee802154_hw *hw,
|
||||
return at86rf230_write_subreg(lp, SR_CCA_MODE, val);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
at86rf230_set_cca_ed_level(struct ieee802154_hw *hw, s32 mbm)
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ struct fakelb_phy {
|
||||
|
||||
static int fakelb_hw_ed(struct ieee802154_hw *hw, u8 *level)
|
||||
{
|
||||
BUG_ON(!level);
|
||||
WARN_ON(!level);
|
||||
*level = 0xbe;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -63,10 +63,23 @@ static int ipvlan_set_port_mode(struct ipvl_port *port, u16 nval)
|
||||
{
|
||||
struct ipvl_dev *ipvlan;
|
||||
struct net_device *mdev = port->dev;
|
||||
int err = 0;
|
||||
unsigned int flags;
|
||||
int err;
|
||||
|
||||
ASSERT_RTNL();
|
||||
if (port->mode != nval) {
|
||||
list_for_each_entry(ipvlan, &port->ipvlans, pnode) {
|
||||
flags = ipvlan->dev->flags;
|
||||
if (nval == IPVLAN_MODE_L3 || nval == IPVLAN_MODE_L3S) {
|
||||
err = dev_change_flags(ipvlan->dev,
|
||||
flags | IFF_NOARP);
|
||||
} else {
|
||||
err = dev_change_flags(ipvlan->dev,
|
||||
flags & ~IFF_NOARP);
|
||||
}
|
||||
if (unlikely(err))
|
||||
goto fail;
|
||||
}
|
||||
if (nval == IPVLAN_MODE_L3S) {
|
||||
/* New mode is L3S */
|
||||
err = ipvlan_register_nf_hook();
|
||||
@@ -74,21 +87,28 @@ static int ipvlan_set_port_mode(struct ipvl_port *port, u16 nval)
|
||||
mdev->l3mdev_ops = &ipvl_l3mdev_ops;
|
||||
mdev->priv_flags |= IFF_L3MDEV_MASTER;
|
||||
} else
|
||||
return err;
|
||||
goto fail;
|
||||
} else if (port->mode == IPVLAN_MODE_L3S) {
|
||||
/* Old mode was L3S */
|
||||
mdev->priv_flags &= ~IFF_L3MDEV_MASTER;
|
||||
ipvlan_unregister_nf_hook();
|
||||
mdev->l3mdev_ops = NULL;
|
||||
}
|
||||
list_for_each_entry(ipvlan, &port->ipvlans, pnode) {
|
||||
if (nval == IPVLAN_MODE_L3 || nval == IPVLAN_MODE_L3S)
|
||||
ipvlan->dev->flags |= IFF_NOARP;
|
||||
else
|
||||
ipvlan->dev->flags &= ~IFF_NOARP;
|
||||
}
|
||||
port->mode = nval;
|
||||
}
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
/* Undo the flags changes that have been done so far. */
|
||||
list_for_each_entry_continue_reverse(ipvlan, &port->ipvlans, pnode) {
|
||||
flags = ipvlan->dev->flags;
|
||||
if (port->mode == IPVLAN_MODE_L3 ||
|
||||
port->mode == IPVLAN_MODE_L3S)
|
||||
dev_change_flags(ipvlan->dev, flags | IFF_NOARP);
|
||||
else
|
||||
dev_change_flags(ipvlan->dev, flags & ~IFF_NOARP);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -681,7 +681,7 @@ static void rtl8150_set_multicast(struct net_device *netdev)
|
||||
(netdev->flags & IFF_ALLMULTI)) {
|
||||
rx_creg &= 0xfffe;
|
||||
rx_creg |= 0x0002;
|
||||
dev_info(&netdev->dev, "%s: allmulti set\n", netdev->name);
|
||||
dev_dbg(&netdev->dev, "%s: allmulti set\n", netdev->name);
|
||||
} else {
|
||||
/* ~RX_MULTICAST, ~RX_PROMISCUOUS */
|
||||
rx_creg &= 0x00fc;
|
||||
|
||||
@@ -82,6 +82,9 @@ static bool turbo_mode = true;
|
||||
module_param(turbo_mode, bool, 0644);
|
||||
MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction");
|
||||
|
||||
static int smsc75xx_link_ok_nopm(struct usbnet *dev);
|
||||
static int smsc75xx_phy_gig_workaround(struct usbnet *dev);
|
||||
|
||||
static int __must_check __smsc75xx_read_reg(struct usbnet *dev, u32 index,
|
||||
u32 *data, int in_pm)
|
||||
{
|
||||
@@ -852,6 +855,9 @@ static int smsc75xx_phy_initialize(struct usbnet *dev)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
/* phy workaround for gig link */
|
||||
smsc75xx_phy_gig_workaround(dev);
|
||||
|
||||
smsc75xx_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE,
|
||||
ADVERTISE_ALL | ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP |
|
||||
ADVERTISE_PAUSE_ASYM);
|
||||
@@ -990,6 +996,62 @@ static int smsc75xx_wait_ready(struct usbnet *dev, int in_pm)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int smsc75xx_phy_gig_workaround(struct usbnet *dev)
|
||||
{
|
||||
struct mii_if_info *mii = &dev->mii;
|
||||
int ret = 0, timeout = 0;
|
||||
u32 buf, link_up = 0;
|
||||
|
||||
/* Set the phy in Gig loopback */
|
||||
smsc75xx_mdio_write(dev->net, mii->phy_id, MII_BMCR, 0x4040);
|
||||
|
||||
/* Wait for the link up */
|
||||
do {
|
||||
link_up = smsc75xx_link_ok_nopm(dev);
|
||||
usleep_range(10000, 20000);
|
||||
timeout++;
|
||||
} while ((!link_up) && (timeout < 1000));
|
||||
|
||||
if (timeout >= 1000) {
|
||||
netdev_warn(dev->net, "Timeout waiting for PHY link up\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
/* phy reset */
|
||||
ret = smsc75xx_read_reg(dev, PMT_CTL, &buf);
|
||||
if (ret < 0) {
|
||||
netdev_warn(dev->net, "Failed to read PMT_CTL: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
buf |= PMT_CTL_PHY_RST;
|
||||
|
||||
ret = smsc75xx_write_reg(dev, PMT_CTL, buf);
|
||||
if (ret < 0) {
|
||||
netdev_warn(dev->net, "Failed to write PMT_CTL: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
timeout = 0;
|
||||
do {
|
||||
usleep_range(10000, 20000);
|
||||
ret = smsc75xx_read_reg(dev, PMT_CTL, &buf);
|
||||
if (ret < 0) {
|
||||
netdev_warn(dev->net, "Failed to read PMT_CTL: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
timeout++;
|
||||
} while ((buf & PMT_CTL_PHY_RST) && (timeout < 100));
|
||||
|
||||
if (timeout >= 100) {
|
||||
netdev_warn(dev->net, "timeout waiting for PHY Reset\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int smsc75xx_reset(struct usbnet *dev)
|
||||
{
|
||||
struct smsc75xx_priv *pdata = (struct smsc75xx_priv *)(dev->data[0]);
|
||||
|
||||
@@ -4229,6 +4229,13 @@ void brcmf_sdio_remove(struct brcmf_sdio *bus)
|
||||
brcmf_dbg(TRACE, "Enter\n");
|
||||
|
||||
if (bus) {
|
||||
/* Stop watchdog task */
|
||||
if (bus->watchdog_tsk) {
|
||||
send_sig(SIGTERM, bus->watchdog_tsk, 1);
|
||||
kthread_stop(bus->watchdog_tsk);
|
||||
bus->watchdog_tsk = NULL;
|
||||
}
|
||||
|
||||
/* De-register interrupt handler */
|
||||
brcmf_sdiod_intr_unregister(bus->sdiodev);
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ static void pn533_recv_response(struct urb *urb)
|
||||
struct sk_buff *skb = NULL;
|
||||
|
||||
if (!urb->status) {
|
||||
skb = alloc_skb(urb->actual_length, GFP_KERNEL);
|
||||
skb = alloc_skb(urb->actual_length, GFP_ATOMIC);
|
||||
if (!skb) {
|
||||
nfc_err(&phy->udev->dev, "failed to alloc memory\n");
|
||||
} else {
|
||||
@@ -180,7 +180,7 @@ static int pn533_usb_send_frame(struct pn533 *dev,
|
||||
|
||||
if (dev->protocol_type == PN533_PROTO_REQ_RESP) {
|
||||
/* request for response for sent packet directly */
|
||||
rc = pn533_submit_urb_for_response(phy, GFP_ATOMIC);
|
||||
rc = pn533_submit_urb_for_response(phy, GFP_KERNEL);
|
||||
if (rc)
|
||||
goto error;
|
||||
} else if (dev->protocol_type == PN533_PROTO_REQ_ACK_RESP) {
|
||||
|
||||
@@ -578,6 +578,14 @@ static void nvmet_start_ctrl(struct nvmet_ctrl *ctrl)
|
||||
}
|
||||
|
||||
ctrl->csts = NVME_CSTS_RDY;
|
||||
|
||||
/*
|
||||
* Controllers that are not yet enabled should not really enforce the
|
||||
* keep alive timeout, but we still want to track a timeout and cleanup
|
||||
* in case a host died before it enabled the controller. Hence, simply
|
||||
* reset the keep alive timer when the controller is enabled.
|
||||
*/
|
||||
mod_delayed_work(system_wq, &ctrl->ka_work, ctrl->kato * HZ);
|
||||
}
|
||||
|
||||
static void nvmet_clear_ctrl(struct nvmet_ctrl *ctrl)
|
||||
|
||||
@@ -45,7 +45,7 @@ static int gen_pci_parse_request_of_pci_ranges(struct device *dev,
|
||||
|
||||
switch (resource_type(res)) {
|
||||
case IORESOURCE_IO:
|
||||
err = pci_remap_iospace(res, iobase);
|
||||
err = devm_pci_remap_iospace(dev, res, iobase);
|
||||
if (err) {
|
||||
dev_warn(dev, "error %d: failed to map resource %pR\n",
|
||||
err, res);
|
||||
|
||||
@@ -89,7 +89,7 @@ static int versatile_pci_parse_request_of_pci_ranges(struct device *dev,
|
||||
|
||||
switch (resource_type(res)) {
|
||||
case IORESOURCE_IO:
|
||||
err = pci_remap_iospace(res, iobase);
|
||||
err = devm_pci_remap_iospace(dev, res, iobase);
|
||||
if (err) {
|
||||
dev_warn(dev, "error %d: failed to map resource %pR\n",
|
||||
err, res);
|
||||
|
||||
@@ -1102,7 +1102,7 @@ static int rcar_pcie_parse_request_of_pci_ranges(struct rcar_pcie *pci)
|
||||
struct resource *res = win->res;
|
||||
|
||||
if (resource_type(res) == IORESOURCE_IO) {
|
||||
err = pci_remap_iospace(res, iobase);
|
||||
err = devm_pci_remap_iospace(dev, res, iobase);
|
||||
if (err) {
|
||||
dev_warn(dev, "error %d: failed to map resource %pR\n",
|
||||
err, res);
|
||||
|
||||
@@ -532,7 +532,7 @@ static int nwl_pcie_init_irq_domain(struct nwl_pcie *pcie)
|
||||
INTX_NUM,
|
||||
&legacy_domain_ops,
|
||||
pcie);
|
||||
|
||||
of_node_put(legacy_intc_node);
|
||||
if (!pcie->legacy_irq_domain) {
|
||||
dev_err(dev, "failed to create IRQ domain\n");
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -527,6 +527,7 @@ static int xilinx_pcie_init_irq_domain(struct xilinx_pcie_port *port)
|
||||
port->leg_domain = irq_domain_add_linear(pcie_intc_node, 4,
|
||||
&intx_domain_ops,
|
||||
port);
|
||||
of_node_put(pcie_intc_node);
|
||||
if (!port->leg_domain) {
|
||||
dev_err(dev, "Failed to get a INTx IRQ domain\n");
|
||||
return -ENODEV;
|
||||
|
||||
@@ -455,8 +455,17 @@ int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus,
|
||||
list_add(&slot->slot_list, &pci_hotplug_slot_list);
|
||||
|
||||
result = fs_add_slot(pci_slot);
|
||||
if (result)
|
||||
goto err_list_del;
|
||||
|
||||
kobject_uevent(&pci_slot->kobj, KOBJ_ADD);
|
||||
dbg("Added slot %s to the list\n", name);
|
||||
goto out;
|
||||
|
||||
err_list_del:
|
||||
list_del(&slot->slot_list);
|
||||
pci_slot->hotplug = NULL;
|
||||
pci_destroy_slot(pci_slot);
|
||||
out:
|
||||
mutex_unlock(&pci_hp_mutex);
|
||||
return result;
|
||||
|
||||
@@ -132,6 +132,7 @@ int pciehp_unconfigure_device(struct slot *p_slot);
|
||||
void pciehp_queue_pushbutton_work(struct work_struct *work);
|
||||
struct controller *pcie_init(struct pcie_device *dev);
|
||||
int pcie_init_notification(struct controller *ctrl);
|
||||
void pcie_shutdown_notification(struct controller *ctrl);
|
||||
int pciehp_enable_slot(struct slot *p_slot);
|
||||
int pciehp_disable_slot(struct slot *p_slot);
|
||||
void pcie_reenable_notification(struct controller *ctrl);
|
||||
|
||||
@@ -76,6 +76,12 @@ static int reset_slot(struct hotplug_slot *slot, int probe);
|
||||
*/
|
||||
static void release_slot(struct hotplug_slot *hotplug_slot)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
/* queued work needs hotplug_slot name */
|
||||
cancel_delayed_work(&slot->work);
|
||||
drain_workqueue(slot->wq);
|
||||
|
||||
kfree(hotplug_slot->ops);
|
||||
kfree(hotplug_slot->info);
|
||||
kfree(hotplug_slot);
|
||||
@@ -278,6 +284,7 @@ static void pciehp_remove(struct pcie_device *dev)
|
||||
{
|
||||
struct controller *ctrl = get_service_data(dev);
|
||||
|
||||
pcie_shutdown_notification(ctrl);
|
||||
cleanup_slot(ctrl);
|
||||
pciehp_release_ctrl(ctrl);
|
||||
}
|
||||
|
||||
@@ -562,8 +562,6 @@ static irqreturn_t pciehp_isr(int irq, void *dev_id)
|
||||
{
|
||||
struct controller *ctrl = (struct controller *)dev_id;
|
||||
struct pci_dev *pdev = ctrl_dev(ctrl);
|
||||
struct pci_bus *subordinate = pdev->subordinate;
|
||||
struct pci_dev *dev;
|
||||
struct slot *slot = ctrl->slot;
|
||||
u16 status, events;
|
||||
u8 present;
|
||||
@@ -611,14 +609,9 @@ static irqreturn_t pciehp_isr(int irq, void *dev_id)
|
||||
wake_up(&ctrl->queue);
|
||||
}
|
||||
|
||||
if (subordinate) {
|
||||
list_for_each_entry(dev, &subordinate->devices, bus_list) {
|
||||
if (dev->ignore_hotplug) {
|
||||
ctrl_dbg(ctrl, "ignoring hotplug event %#06x (%s requested no hotplug)\n",
|
||||
events, pci_name(dev));
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
}
|
||||
if (pdev->ignore_hotplug) {
|
||||
ctrl_dbg(ctrl, "ignoring hotplug event %#06x\n", events);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
/* Check Attention Button Pressed */
|
||||
@@ -786,7 +779,7 @@ int pcie_init_notification(struct controller *ctrl)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void pcie_shutdown_notification(struct controller *ctrl)
|
||||
void pcie_shutdown_notification(struct controller *ctrl)
|
||||
{
|
||||
if (ctrl->notification_enabled) {
|
||||
pcie_disable_notification(ctrl);
|
||||
@@ -821,7 +814,7 @@ abort:
|
||||
static void pcie_cleanup_slot(struct controller *ctrl)
|
||||
{
|
||||
struct slot *slot = ctrl->slot;
|
||||
cancel_delayed_work(&slot->work);
|
||||
|
||||
destroy_workqueue(slot->wq);
|
||||
kfree(slot);
|
||||
}
|
||||
@@ -902,7 +895,6 @@ abort:
|
||||
|
||||
void pciehp_release_ctrl(struct controller *ctrl)
|
||||
{
|
||||
pcie_shutdown_notification(ctrl);
|
||||
pcie_cleanup_slot(ctrl);
|
||||
kfree(ctrl);
|
||||
}
|
||||
|
||||
@@ -3407,6 +3407,44 @@ void pci_unmap_iospace(struct resource *res)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void devm_pci_unmap_iospace(struct device *dev, void *ptr)
|
||||
{
|
||||
struct resource **res = ptr;
|
||||
|
||||
pci_unmap_iospace(*res);
|
||||
}
|
||||
|
||||
/**
|
||||
* devm_pci_remap_iospace - Managed pci_remap_iospace()
|
||||
* @dev: Generic device to remap IO address for
|
||||
* @res: Resource describing the I/O space
|
||||
* @phys_addr: physical address of range to be mapped
|
||||
*
|
||||
* Managed pci_remap_iospace(). Map is automatically unmapped on driver
|
||||
* detach.
|
||||
*/
|
||||
int devm_pci_remap_iospace(struct device *dev, const struct resource *res,
|
||||
phys_addr_t phys_addr)
|
||||
{
|
||||
const struct resource **ptr;
|
||||
int error;
|
||||
|
||||
ptr = devres_alloc(devm_pci_unmap_iospace, sizeof(*ptr), GFP_KERNEL);
|
||||
if (!ptr)
|
||||
return -ENOMEM;
|
||||
|
||||
error = pci_remap_iospace(res, phys_addr);
|
||||
if (error) {
|
||||
devres_free(ptr);
|
||||
} else {
|
||||
*ptr = res;
|
||||
devres_add(dev, ptr);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL(devm_pci_remap_iospace);
|
||||
|
||||
static void __pci_set_master(struct pci_dev *dev, bool enable)
|
||||
{
|
||||
u16 old_cmd, cmd;
|
||||
|
||||
@@ -1363,6 +1363,10 @@ static void pci_configure_mps(struct pci_dev *dev)
|
||||
if (!pci_is_pcie(dev) || !bridge || !pci_is_pcie(bridge))
|
||||
return;
|
||||
|
||||
/* MPS and MRRS fields are of type 'RsvdP' for VFs, short-circuit out */
|
||||
if (dev->is_virtfn)
|
||||
return;
|
||||
|
||||
mps = pcie_get_mps(dev);
|
||||
p_mps = pcie_get_mps(bridge);
|
||||
|
||||
|
||||
@@ -460,8 +460,8 @@ static int nsp_pinmux_enable(struct pinctrl_dev *pctrl_dev,
|
||||
const struct nsp_pin_function *func;
|
||||
const struct nsp_pin_group *grp;
|
||||
|
||||
if (grp_select > pinctrl->num_groups ||
|
||||
func_select > pinctrl->num_functions)
|
||||
if (grp_select >= pinctrl->num_groups ||
|
||||
func_select >= pinctrl->num_functions)
|
||||
return -EINVAL;
|
||||
|
||||
func = &pinctrl->functions[func_select];
|
||||
@@ -577,6 +577,8 @@ static int nsp_pinmux_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(pinctrl->base0);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
if (!res)
|
||||
return -EINVAL;
|
||||
pinctrl->base1 = devm_ioremap_nocache(&pdev->dev, res->start,
|
||||
resource_size(res));
|
||||
if (!pinctrl->base1) {
|
||||
|
||||
@@ -676,10 +676,17 @@ static int scsifront_dev_reset_handler(struct scsi_cmnd *sc)
|
||||
static int scsifront_sdev_configure(struct scsi_device *sdev)
|
||||
{
|
||||
struct vscsifrnt_info *info = shost_priv(sdev->host);
|
||||
int err;
|
||||
|
||||
if (info && current == info->curr)
|
||||
xenbus_printf(XBT_NIL, info->dev->nodename,
|
||||
if (info && current == info->curr) {
|
||||
err = xenbus_printf(XBT_NIL, info->dev->nodename,
|
||||
info->dev_state_path, "%d", XenbusStateConnected);
|
||||
if (err) {
|
||||
xenbus_dev_error(info->dev, err,
|
||||
"%s: writing dev_state_path", __func__);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -687,10 +694,15 @@ static int scsifront_sdev_configure(struct scsi_device *sdev)
|
||||
static void scsifront_sdev_destroy(struct scsi_device *sdev)
|
||||
{
|
||||
struct vscsifrnt_info *info = shost_priv(sdev->host);
|
||||
int err;
|
||||
|
||||
if (info && current == info->curr)
|
||||
xenbus_printf(XBT_NIL, info->dev->nodename,
|
||||
if (info && current == info->curr) {
|
||||
err = xenbus_printf(XBT_NIL, info->dev->nodename,
|
||||
info->dev_state_path, "%d", XenbusStateClosed);
|
||||
if (err)
|
||||
xenbus_dev_error(info->dev, err,
|
||||
"%s: writing dev_state_path", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
static struct scsi_host_template scsifront_sht = {
|
||||
@@ -1025,9 +1037,12 @@ static void scsifront_do_lun_hotplug(struct vscsifrnt_info *info, int op)
|
||||
|
||||
if (scsi_add_device(info->host, chn, tgt, lun)) {
|
||||
dev_err(&dev->dev, "scsi_add_device\n");
|
||||
xenbus_printf(XBT_NIL, dev->nodename,
|
||||
err = xenbus_printf(XBT_NIL, dev->nodename,
|
||||
info->dev_state_path,
|
||||
"%d", XenbusStateClosed);
|
||||
if (err)
|
||||
xenbus_dev_error(dev, err,
|
||||
"%s: writing dev_state_path", __func__);
|
||||
}
|
||||
break;
|
||||
case VSCSIFRONT_OP_DEL_LUN:
|
||||
@@ -1041,10 +1056,14 @@ static void scsifront_do_lun_hotplug(struct vscsifrnt_info *info, int op)
|
||||
}
|
||||
break;
|
||||
case VSCSIFRONT_OP_READD_LUN:
|
||||
if (device_state == XenbusStateConnected)
|
||||
xenbus_printf(XBT_NIL, dev->nodename,
|
||||
if (device_state == XenbusStateConnected) {
|
||||
err = xenbus_printf(XBT_NIL, dev->nodename,
|
||||
info->dev_state_path,
|
||||
"%d", XenbusStateConnected);
|
||||
if (err)
|
||||
xenbus_dev_error(dev, err,
|
||||
"%s: writing dev_state_path", __func__);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -3948,9 +3948,11 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
|
||||
}
|
||||
|
||||
ret = usb_add_gadget_udc(dev, &hsotg->gadget);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
dwc2_hsotg_ep_free_request(&hsotg->eps_out[0]->ep,
|
||||
hsotg->ctrl_req);
|
||||
return ret;
|
||||
|
||||
}
|
||||
dwc2_hsotg_dump(hsotg);
|
||||
|
||||
return 0;
|
||||
@@ -3963,6 +3965,7 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
|
||||
int dwc2_hsotg_remove(struct dwc2_hsotg *hsotg)
|
||||
{
|
||||
usb_del_gadget_udc(&hsotg->gadget);
|
||||
dwc2_hsotg_ep_free_request(&hsotg->eps_out[0]->ep, hsotg->ctrl_req);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -922,9 +922,8 @@ static int dwc2_xfercomp_isoc_split_in(struct dwc2_hsotg *hsotg,
|
||||
frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index];
|
||||
len = dwc2_get_actual_xfer_length(hsotg, chan, chnum, qtd,
|
||||
DWC2_HC_XFER_COMPLETE, NULL);
|
||||
if (!len) {
|
||||
if (!len && !qtd->isoc_split_offset) {
|
||||
qtd->complete_split = 0;
|
||||
qtd->isoc_split_offset = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -132,8 +132,9 @@ static int dwc3_of_simple_remove(struct platform_device *pdev)
|
||||
|
||||
of_platform_depopulate(dev);
|
||||
|
||||
pm_runtime_put_sync(dev);
|
||||
pm_runtime_disable(dev);
|
||||
pm_runtime_put_noidle(dev);
|
||||
pm_runtime_set_suspended(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1712,6 +1712,8 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
|
||||
*/
|
||||
if (w_value && !f->get_alt)
|
||||
break;
|
||||
|
||||
spin_lock(&cdev->lock);
|
||||
value = f->set_alt(f, w_index, w_value);
|
||||
if (value == USB_GADGET_DELAYED_STATUS) {
|
||||
DBG(cdev,
|
||||
@@ -1721,6 +1723,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
|
||||
DBG(cdev, "delayed_status count %d\n",
|
||||
cdev->delayed_status);
|
||||
}
|
||||
spin_unlock(&cdev->lock);
|
||||
break;
|
||||
case USB_REQ_GET_INTERFACE:
|
||||
if (ctrl->bRequestType != (USB_DIR_IN|USB_RECIP_INTERFACE))
|
||||
|
||||
@@ -482,7 +482,7 @@ static void tegra_xusb_mbox_handle(struct tegra_xusb *tegra,
|
||||
unsigned long mask;
|
||||
unsigned int port;
|
||||
bool idle, enable;
|
||||
int err;
|
||||
int err = 0;
|
||||
|
||||
memset(&rsp, 0, sizeof(rsp));
|
||||
|
||||
|
||||
@@ -1056,8 +1056,13 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
|
||||
command = readl(&xhci->op_regs->command);
|
||||
command |= CMD_CRS;
|
||||
writel(command, &xhci->op_regs->command);
|
||||
/*
|
||||
* Some controllers take up to 55+ ms to complete the controller
|
||||
* restore so setting the timeout to 100ms. Xhci specification
|
||||
* doesn't mention any timeout value.
|
||||
*/
|
||||
if (xhci_handshake(&xhci->op_regs->status,
|
||||
STS_RESTORE, 0, 10 * 1000)) {
|
||||
STS_RESTORE, 0, 100 * 1000)) {
|
||||
xhci_warn(xhci, "WARN: xHC restore state timeout\n");
|
||||
spin_unlock_irq(&xhci->lock);
|
||||
return -ETIMEDOUT;
|
||||
|
||||
@@ -291,8 +291,15 @@ static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
|
||||
return;
|
||||
}
|
||||
|
||||
if (sysrq_key != '\0')
|
||||
xenbus_printf(xbt, "control", "sysrq", "%c", '\0');
|
||||
if (sysrq_key != '\0') {
|
||||
err = xenbus_printf(xbt, "control", "sysrq", "%c", '\0');
|
||||
if (err) {
|
||||
pr_err("%s: Error %d writing sysrq in control/sysrq\n",
|
||||
__func__, err);
|
||||
xenbus_transaction_end(xbt, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
err = xenbus_transaction_end(xbt, 0);
|
||||
if (err == -EAGAIN)
|
||||
@@ -344,7 +351,12 @@ static int setup_shutdown_watcher(void)
|
||||
continue;
|
||||
snprintf(node, FEATURE_PATH_SIZE, "feature-%s",
|
||||
shutdown_handlers[idx].command);
|
||||
xenbus_printf(XBT_NIL, "control", node, "%u", 1);
|
||||
err = xenbus_printf(XBT_NIL, "control", node, "%u", 1);
|
||||
if (err) {
|
||||
pr_err("%s: Error %d writing %s\n", __func__,
|
||||
err, node);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1014,6 +1014,7 @@ static void scsiback_do_add_lun(struct vscsibk_info *info, const char *state,
|
||||
{
|
||||
struct v2p_entry *entry;
|
||||
unsigned long flags;
|
||||
int err;
|
||||
|
||||
if (try) {
|
||||
spin_lock_irqsave(&info->v2p_lock, flags);
|
||||
@@ -1029,8 +1030,11 @@ static void scsiback_do_add_lun(struct vscsibk_info *info, const char *state,
|
||||
scsiback_del_translation_entry(info, vir);
|
||||
}
|
||||
} else if (!try) {
|
||||
xenbus_printf(XBT_NIL, info->dev->nodename, state,
|
||||
err = xenbus_printf(XBT_NIL, info->dev->nodename, state,
|
||||
"%d", XenbusStateClosed);
|
||||
if (err)
|
||||
xenbus_dev_error(info->dev, err,
|
||||
"%s: writing %s", __func__, state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1069,8 +1073,11 @@ static void scsiback_do_1lun_hotplug(struct vscsibk_info *info, int op,
|
||||
snprintf(str, sizeof(str), "vscsi-devs/%s/p-dev", ent);
|
||||
val = xenbus_read(XBT_NIL, dev->nodename, str, NULL);
|
||||
if (IS_ERR(val)) {
|
||||
xenbus_printf(XBT_NIL, dev->nodename, state,
|
||||
err = xenbus_printf(XBT_NIL, dev->nodename, state,
|
||||
"%d", XenbusStateClosed);
|
||||
if (err)
|
||||
xenbus_dev_error(info->dev, err,
|
||||
"%s: writing %s", __func__, state);
|
||||
return;
|
||||
}
|
||||
strlcpy(phy, val, VSCSI_NAMELEN);
|
||||
@@ -1081,8 +1088,11 @@ static void scsiback_do_1lun_hotplug(struct vscsibk_info *info, int op,
|
||||
err = xenbus_scanf(XBT_NIL, dev->nodename, str, "%u:%u:%u:%u",
|
||||
&vir.hst, &vir.chn, &vir.tgt, &vir.lun);
|
||||
if (XENBUS_EXIST_ERR(err)) {
|
||||
xenbus_printf(XBT_NIL, dev->nodename, state,
|
||||
err = xenbus_printf(XBT_NIL, dev->nodename, state,
|
||||
"%d", XenbusStateClosed);
|
||||
if (err)
|
||||
xenbus_dev_error(info->dev, err,
|
||||
"%s: writing %s", __func__, state);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1077,6 +1077,7 @@ static struct dentry *splice_dentry(struct dentry *dn, struct inode *in)
|
||||
if (IS_ERR(realdn)) {
|
||||
pr_err("splice_dentry error %ld %p inode %p ino %llx.%llx\n",
|
||||
PTR_ERR(realdn), dn, in, ceph_vinop(in));
|
||||
dput(dn);
|
||||
dn = realdn; /* note realdn contains the error */
|
||||
goto out;
|
||||
} else if (realdn) {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <linux/log2.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/nospec.h>
|
||||
#include <linux/backing-dev.h>
|
||||
#include <trace/events/ext4.h>
|
||||
|
||||
@@ -2144,7 +2145,8 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
|
||||
* This should tell if fe_len is exactly power of 2
|
||||
*/
|
||||
if ((ac->ac_g_ex.fe_len & (~(1 << (i - 1)))) == 0)
|
||||
ac->ac_2order = i - 1;
|
||||
ac->ac_2order = array_index_nospec(i - 1,
|
||||
sb->s_blocksize_bits + 2);
|
||||
}
|
||||
|
||||
/* if stream allocation is enabled, use global goal */
|
||||
|
||||
@@ -791,8 +791,10 @@ static int listxattr_filler(struct dir_context *ctx, const char *name,
|
||||
return 0;
|
||||
size = namelen + 1;
|
||||
if (b->buf) {
|
||||
if (size > b->size)
|
||||
if (b->pos + size > b->size) {
|
||||
b->pos = -ERANGE;
|
||||
return -ERANGE;
|
||||
}
|
||||
memcpy(b->buf + b->pos, name, namelen);
|
||||
b->buf[b->pos + namelen] = 0;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#define __FSL_GUTS_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
/**
|
||||
* Global Utility Registers.
|
||||
|
||||
@@ -1190,6 +1190,8 @@ int pci_register_io_range(phys_addr_t addr, resource_size_t size);
|
||||
unsigned long pci_address_to_pio(phys_addr_t addr);
|
||||
phys_addr_t pci_pio_to_address(unsigned long pio);
|
||||
int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr);
|
||||
int devm_pci_remap_iospace(struct device *dev, const struct resource *res,
|
||||
phys_addr_t phys_addr);
|
||||
void pci_unmap_iospace(struct resource *res);
|
||||
|
||||
static inline pci_bus_addr_t pci_bus_address(struct pci_dev *pdev, int bar)
|
||||
|
||||
@@ -312,14 +312,7 @@ struct ipv6_txoptions *ipv6_dup_options(struct sock *sk,
|
||||
struct ipv6_txoptions *ipv6_renew_options(struct sock *sk,
|
||||
struct ipv6_txoptions *opt,
|
||||
int newtype,
|
||||
struct ipv6_opt_hdr __user *newopt,
|
||||
int newoptlen);
|
||||
struct ipv6_txoptions *
|
||||
ipv6_renew_options_kern(struct sock *sk,
|
||||
struct ipv6_txoptions *opt,
|
||||
int newtype,
|
||||
struct ipv6_opt_hdr *newopt,
|
||||
int newoptlen);
|
||||
struct ipv6_opt_hdr *newopt);
|
||||
struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space,
|
||||
struct ipv6_txoptions *opt);
|
||||
|
||||
|
||||
@@ -116,6 +116,7 @@ struct net {
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
|
||||
struct netns_nf_frag nf_frag;
|
||||
struct ctl_table_header *nf_frag_frags_hdr;
|
||||
#endif
|
||||
struct sock *nfnl;
|
||||
struct sock *nfnl_stash;
|
||||
|
||||
@@ -89,7 +89,6 @@ struct netns_ipv6 {
|
||||
|
||||
#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
|
||||
struct netns_nf_frag {
|
||||
struct netns_sysctl_ipv6 sysctl;
|
||||
struct netns_frags frags;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
struct tcf_tunnel_key_params {
|
||||
struct rcu_head rcu;
|
||||
int tcft_action;
|
||||
int action;
|
||||
struct metadata_dst *tcft_enc_metadata;
|
||||
};
|
||||
|
||||
|
||||
@@ -851,8 +851,6 @@ enum tcp_ca_event {
|
||||
CA_EVENT_LOSS, /* loss timeout */
|
||||
CA_EVENT_ECN_NO_CE, /* ECT set, but not CE marked */
|
||||
CA_EVENT_ECN_IS_CE, /* received CE marked IP packet */
|
||||
CA_EVENT_DELAYED_ACK, /* Delayed ack is sent */
|
||||
CA_EVENT_NON_DELAYED_ACK,
|
||||
};
|
||||
|
||||
/* Information about inbound ACK, passed to cong_ops->in_ack_event() */
|
||||
|
||||
@@ -1240,11 +1240,11 @@ unsigned long lockdep_count_forward_deps(struct lock_class *class)
|
||||
this.parent = NULL;
|
||||
this.class = class;
|
||||
|
||||
local_irq_save(flags);
|
||||
raw_local_irq_save(flags);
|
||||
arch_spin_lock(&lockdep_lock);
|
||||
ret = __lockdep_count_forward_deps(&this);
|
||||
arch_spin_unlock(&lockdep_lock);
|
||||
local_irq_restore(flags);
|
||||
raw_local_irq_restore(flags);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1267,11 +1267,11 @@ unsigned long lockdep_count_backward_deps(struct lock_class *class)
|
||||
this.parent = NULL;
|
||||
this.class = class;
|
||||
|
||||
local_irq_save(flags);
|
||||
raw_local_irq_save(flags);
|
||||
arch_spin_lock(&lockdep_lock);
|
||||
ret = __lockdep_count_backward_deps(&this);
|
||||
arch_spin_unlock(&lockdep_lock);
|
||||
local_irq_restore(flags);
|
||||
raw_local_irq_restore(flags);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -4273,7 +4273,7 @@ void debug_check_no_locks_freed(const void *mem_from, unsigned long mem_len)
|
||||
if (unlikely(!debug_locks))
|
||||
return;
|
||||
|
||||
local_irq_save(flags);
|
||||
raw_local_irq_save(flags);
|
||||
for (i = 0; i < curr->lockdep_depth; i++) {
|
||||
hlock = curr->held_locks + i;
|
||||
|
||||
@@ -4284,7 +4284,7 @@ void debug_check_no_locks_freed(const void *mem_from, unsigned long mem_len)
|
||||
print_freed_lock_bug(curr, mem_from, mem_from + mem_len, hlock);
|
||||
break;
|
||||
}
|
||||
local_irq_restore(flags);
|
||||
raw_local_irq_restore(flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(debug_check_no_locks_freed);
|
||||
|
||||
|
||||
@@ -2546,6 +2546,7 @@ out_nobuffer:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(trace_vbprintk);
|
||||
|
||||
__printf(3, 0)
|
||||
static int
|
||||
__trace_array_vprintk(struct ring_buffer *buffer,
|
||||
unsigned long ip, const char *fmt, va_list args)
|
||||
@@ -2600,12 +2601,14 @@ out_nobuffer:
|
||||
return len;
|
||||
}
|
||||
|
||||
__printf(3, 0)
|
||||
int trace_array_vprintk(struct trace_array *tr,
|
||||
unsigned long ip, const char *fmt, va_list args)
|
||||
{
|
||||
return __trace_array_vprintk(tr->trace_buffer.buffer, ip, fmt, args);
|
||||
}
|
||||
|
||||
__printf(3, 0)
|
||||
int trace_array_printk(struct trace_array *tr,
|
||||
unsigned long ip, const char *fmt, ...)
|
||||
{
|
||||
@@ -2621,6 +2624,7 @@ int trace_array_printk(struct trace_array *tr,
|
||||
return ret;
|
||||
}
|
||||
|
||||
__printf(3, 4)
|
||||
int trace_array_printk_buf(struct ring_buffer *buffer,
|
||||
unsigned long ip, const char *fmt, ...)
|
||||
{
|
||||
@@ -2636,6 +2640,7 @@ int trace_array_printk_buf(struct ring_buffer *buffer,
|
||||
return ret;
|
||||
}
|
||||
|
||||
__printf(2, 0)
|
||||
int trace_vprintk(unsigned long ip, const char *fmt, va_list args)
|
||||
{
|
||||
return trace_array_vprintk(&global_trace, ip, fmt, args);
|
||||
|
||||
@@ -671,12 +671,13 @@ void kasan_kfree_large(const void *ptr)
|
||||
int kasan_module_alloc(void *addr, size_t size)
|
||||
{
|
||||
void *ret;
|
||||
size_t scaled_size;
|
||||
size_t shadow_size;
|
||||
unsigned long shadow_start;
|
||||
|
||||
shadow_start = (unsigned long)kasan_mem_to_shadow(addr);
|
||||
shadow_size = round_up(size >> KASAN_SHADOW_SCALE_SHIFT,
|
||||
PAGE_SIZE);
|
||||
scaled_size = (size + KASAN_SHADOW_MASK) >> KASAN_SHADOW_SCALE_SHIFT;
|
||||
shadow_size = round_up(scaled_size, PAGE_SIZE);
|
||||
|
||||
if (WARN_ON(!PAGE_ALIGNED(shadow_start)))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -2704,7 +2704,7 @@ static int batadv_iv_gw_dump_entry(struct sk_buff *msg, u32 portid, u32 seq,
|
||||
{
|
||||
struct batadv_neigh_ifinfo *router_ifinfo = NULL;
|
||||
struct batadv_neigh_node *router;
|
||||
struct batadv_gw_node *curr_gw;
|
||||
struct batadv_gw_node *curr_gw = NULL;
|
||||
int ret = 0;
|
||||
void *hdr;
|
||||
|
||||
@@ -2752,6 +2752,8 @@ static int batadv_iv_gw_dump_entry(struct sk_buff *msg, u32 portid, u32 seq,
|
||||
ret = 0;
|
||||
|
||||
out:
|
||||
if (curr_gw)
|
||||
batadv_gw_node_put(curr_gw);
|
||||
if (router_ifinfo)
|
||||
batadv_neigh_ifinfo_put(router_ifinfo);
|
||||
if (router)
|
||||
|
||||
@@ -919,7 +919,7 @@ static int batadv_v_gw_dump_entry(struct sk_buff *msg, u32 portid, u32 seq,
|
||||
{
|
||||
struct batadv_neigh_ifinfo *router_ifinfo = NULL;
|
||||
struct batadv_neigh_node *router;
|
||||
struct batadv_gw_node *curr_gw;
|
||||
struct batadv_gw_node *curr_gw = NULL;
|
||||
int ret = 0;
|
||||
void *hdr;
|
||||
|
||||
@@ -987,6 +987,8 @@ static int batadv_v_gw_dump_entry(struct sk_buff *msg, u32 portid, u32 seq,
|
||||
ret = 0;
|
||||
|
||||
out:
|
||||
if (curr_gw)
|
||||
batadv_gw_node_put(curr_gw);
|
||||
if (router_ifinfo)
|
||||
batadv_neigh_ifinfo_put(router_ifinfo);
|
||||
if (router)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user