Merge remote-tracking branch 'common/android-4.9-q' into android-msm-pixel-4.9
* common/android-4.9-q: Linux 4.9.332 can: rcar_canfd: rcar_canfd_handle_global_receive(): fix IRQ storm on global FIFO receive net: ehea: fix possible memory leak in ehea_register_port() openvswitch: switch from WARN to pr_warn ALSA: aoa: Fix I2S device accounting ALSA: aoa: i2sbus: fix possible memory leak in i2sbus_add_dev() net: ksz884x: fix missing pci_disable_device() on error in pcidev_init() i40e: Fix ethtool rx-flow-hash setting for X722 media: videodev2.h: V4L2_DV_BT_BLANKING_HEIGHT should check 'interlaced' media: v4l2-dv-timings: add sanity checks for blanking values media: vivid: dev->bitmap_cap wasn't freed in all cases media: vivid: s_fbuf: add more sanity checks can: mscan: mpc5xxx: mpc5xxx_can_probe(): add missing put_clock() in error path tcp: fix indefinite deferral of RTO with SACK reneging net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY kcm: annotate data-races around kcm->rx_wait kcm: annotate data-races around kcm->rx_psock ALSA: ac97: fix possible memory leak in snd_ac97_dev_register() arc: iounmap() arg is volatile drm/msm: Fix return type of mdp4_lvds_connector_mode_valid net: ieee802154: fix error return code in dgram_bind() mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages xen/gntdev: Prevent leaking grants Xen/gntdev: don't ignore kernel unmapping error s390/futex: add missing EX_TABLE entry to __futex_atomic_op() kernfs: fix use-after-free in __kernfs_remove mmc: core: Fix kernel panic when remove non-standard SDIO card drm/msm/hdmi: fix memory corruption with too many bridges mac802154: Fix LQI recording fbdev: smscufx: Fix several use-after-free bugs tools: iio: iio_utils: fix digit calculation xhci: Remove device endpoints from bandwidth list when freeing the device usb: bdc: change state when port disconnected USB: add RESET_RESUME quirk for NVIDIA Jetson devices in RCM ALSA: au88x0: use explicitly signed char ALSA: Use del_timer_sync() before freeing timer ACPI: video: Force backlight native for more TongFang devices net: hns: fix possible memory leak in hnae_ae_register() net/atm: fix proc_mpc_write incorrect return value HID: magicmouse: Do not set BTN_MOUSE on double report arm64: errata: Remove AES hwcap for COMPAT tasks ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_PORTS ata: ahci-imx: Fix MODULE_ALIAS ocfs2: fix BUG when iput after ocfs2_mknod fails ocfs2: clear dinode links count in case of error Linux 4.9.331 gcov: support GCC 12.1 and newer compilers thermal: intel_powerclamp: Use first online CPU as control_cpu inet: fully convert sk->sk_rx_dst to RCU rules ext4: continue to expand file system when the target size doesn't reach net/ieee802154: don't warn zero-sized raw_sendmsg() net: ieee802154: return -EINVAL for unknown addr type perf intel-pt: Fix segfault in intel_pt_print_info() with uClibc usb: idmouse: fix an uninit-value in idmouse_open Revert "usb: storage: Add quirk for Samsung Fit flash" usb: musb: Fix musb_gadget.c rxstate overflow bug usb: host: xhci: Fix potential memory leak in xhci_alloc_stream_info() HID: roccat: Fix use-after-free in roccat_read() scsi: 3w-9xxx: Avoid disabling device if failing to enable it media: cx88: Fix a null-ptr-deref bug in buffer_prepare() ARM: dts: imx6sl: add missing properties for sram ARM: dts: imx6qp: add missing properties for sram ARM: dts: imx6dl: add missing properties for sram ARM: dts: imx6q: add missing properties for sram ARM: dts: imx7d-sdb: config the max pressure for tsc2046 drm/amdgpu: fix initial connector audio value platform/x86: msi-laptop: Change DMI match / alias strings to fix module autoloading drm: Prevent drm_copy_field() to attempt copying a NULL pointer drm: Use size_t type for len variable in drm_copy_field() r8152: Rate limit overflow messages Bluetooth: L2CAP: Fix user-after-free wifi: rt2x00: don't run Rt5592 IQ calibration on MT7620 can: bcm: check the result of can_send() in bcm_can_tx() Bluetooth: hci_sysfs: Fix attempting to call device_add multiple times Bluetooth: L2CAP: initialize delayed works at l2cap_chan_create() xfrm: Update ipcomp_scratches with NULL when freed tcp: annotate data-race around tcp_md5sig_pool_populated openvswitch: Fix overreporting of drops in dropwatch openvswitch: Fix double reporting of drops in dropwatch thermal: intel_powerclamp: Use get_cpu() instead of smp_processor_id() to avoid crash powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue MIPS: BCM47XX: Cast memcmp() of function to (void *) ACPI: video: Add Toshiba Satellite/Portege Z830 quirk f2fs: fix race condition on setting FI_NO_EXTENT flag iommu/omap: Fix buffer overflow in debugfs powerpc: Fix SPE Power ISA properties for e500v1 platforms powerpc/pci_dn: Add missing of_node_put() powerpc/math_emu/efp: Include module.h clk: ti: dra7-atl: Fix reference leak in of_dra7_atl_clk_probe clk: bcm2835: fix bcm2835_clock_rate_from_divisor declaration dmaengine: ioat: stop mod_timer from resurrecting deleted timer in __cleanup() mfd: sm501: Add check for platform_driver_register() mfd: lp8788: Fix an error handling path in lp8788_irq_init() and lp8788_irq_init() mfd: lp8788: Fix an error handling path in lp8788_probe() mfd: intel_soc_pmic: Fix an error handling path in intel_soc_pmic_i2c_probe() serial: 8250: Fix restoring termios speed after suspend firmware: google: Test spinlock on panic path to avoid lockups drivers: serial: jsm: fix some leaks in probe ata: fix ata_id_has_dipm() ata: fix ata_id_has_ncq_autosense() ata: fix ata_id_has_devslp() ata: fix ata_id_sense_reporting_enabled() and ata_id_has_sense_reporting() dyndbg: let query-modname override actual module name dyndbg: fix module.dyndbg handling RDMA/rxe: Fix the error caused by qp->sk RDMA/rxe: Fix "kernel NULL pointer dereference" error media: xilinx: vipp: Fix refcount leak in xvip_graph_dma_init tty: xilinx_uartps: Fix the ignore_status media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop HSI: omap_ssi_port: Fix dma_map_sg error check HSI: omap_ssi: Fix refcount leak in ssi_probe clk: tegra20: Fix refcount leak in tegra20_clock_init clk: tegra: Fix refcount leak in tegra114_clock_init clk: tegra: Fix refcount leak in tegra210_clock_init iio: ABI: Fix wrong format of differential capacitance channel ABI. iio: inkern: only release the device node when done with it iio: adc: at91-sama5d2_adc: fix AT91_SAMA5D2_MR_TRACKTIM_MAX ARM: dts: exynos: fix polarity of VBUS GPIO of Origen ARM: Drop CMDLINE_* dependency on ATAGS ARM: dts: kirkwood: lsxl: remove first ethernet port ARM: dts: kirkwood: lsxl: fix serial line soc: qcom: smem_state: Add refcounting for the 'state->of_node' soc: qcom: smsm: Fix refcount leak bugs in qcom_smsm_probe() memory: of: Fix refcount leak bug in of_get_ddr_timings() ALSA: dmaengine: increment buffer pointer atomically ASoC: eureka-tlv320: Hold reference returned from of_find_xxx API mmc: au1xmmc: Fix an error handling path in au1xmmc_probe() platform/x86: msi-laptop: Fix old-ec check for backlight registering drm/mipi-dsi: Detach devices when removing the host bnx2x: fix potential memory leak in bnx2x_tpa_stop() net: rds: don't hold sock lock when cancelling work from rds_tcp_reset_callbacks() tcp: fix tcp_cwnd_validate() to not forget is_cwnd_limited mISDN: fix use-after-free bugs in l1oip timer handlers spi/omap100k:Fix PM disable depth imbalance in omap1_spi100k_probe net: fs_enet: Fix wrong check in do_pd_setup wifi: rtl8xxxu: gen2: Fix mistake in path B IQ calibration spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime() spi: qup: add missing clk_disable_unprepare on error in spi_qup_resume() wifi: rtl8xxxu: tighten bounds checking in rtl8xxxu_read_efuse() wifi: mac80211: allow bw change during channel switch in mesh wifi: ath10k: add peer map clean up for peer delete in ath10k_sta_state() sh: machvec: Use char[] for section boundaries selinux: use "grep -E" instead of "egrep" KVM: x86/emulator: Fix handing of POP SS to correctly set interruptibility ring-buffer: Fix race between reset page and reading page ring-buffer: Check pending waiters when doing wake ups as well ring-buffer: Allow splice to read previous partially read pages ext4: place buffer head allocation before handle start ext4: make ext4_lazyinit_thread freezable ext4: fix null-ptr-deref in ext4_write_info ext4: avoid crash when inline data creation follows DIO write nilfs2: fix use-after-free bug of struct nilfs_root fbdev: smscufx: Fix use-after-free in ufx_ops_open() PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK parisc: fbdev/stifb: Align graphics memory size to 4MB regulator: qcom_rpm: Fix circular deferral regression quota: Check next/prev free block number after reading from quota file fs: dlm: handle -EBUSY first in lock arg validation fs: dlm: fix race between test_bit() and queue_work() iio: dac: ad5593r: Fix i2c read protocol requirements ALSA: usb-audio: Fix NULL dererence at error path ALSA: usb-audio: Fix potential memory leaks ALSA: rawmidi: Drop register_mutex in snd_rawmidi_free() ALSA: oss: Fix potential deadlock at unregistration random: use expired timer rather than wq for mixing fast pool Input: xpad - fix wireless 360 controller breaking after suspend Input: xpad - add supported devices as contributed on github random: restore O_NONBLOCK support wifi: mac80211_hwsim: avoid mac80211 warning on bad rate random: avoid reading two cache lines on irq randomness USB: serial: qcserial: add new usb-id for Dell branded EM7455 scsi: stex: Properly zero out the passthrough command structure ALSA: hda: Fix position reporting on Poulsbo random: clamp credited irq bits to maximum mixed ceph: don't truncate file in atomic_open nilfs2: replace WARN_ONs by nilfs_error for checkpoint acquisition failure nilfs2: fix leak of nilfs_root in case of writer thread creation failure nilfs2: fix NULL pointer dereference at nilfs_bmap_lookup_at_level() USB: serial: ftdi_sio: fix 300 bps rate for SIO usb: mon: make mmapped memory read only um: Cleanup compiler warning in arch/x86/um/tls_32.c um: Cleanup syscall_handler_t cast in syscalls_32.h net/ieee802154: fix uninit value bug in dgram_sendmsg ARM: dts: fix Moxa SDIO 'compatible', remove 'sdhci' misnomer dmaengine: xilinx_dma: Report error in case of dma_set_mask_and_coherent API failure dmaengine: xilinx_dma: cleanup for fetching xlnx,num-fstores property fs: fix UAF/GPF bug in nilfs_mdt_destroy ARM: fix function graph tracer and unwinder dependencies Makefile.extrawarn: Move -Wcast-function-type-strict to W=1 clk: iproc: Do not rely on node name for correct PLL setup clk: iproc: Minor tidy up of iproc pll data structures selftests: Fix the if conditions of in test_extra_filter() nvme: Fix IOC_PR_CLEAR and IOC_PR_RELEASE ioctls for nvme devices nvme: add new line after variable declatation usbnet: Fix memory leak in usbnet_disconnect() Input: melfas_mip4 - fix return value check in mip4_probe() Revert "drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time" mm: prevent page_frag_alloc() from corrupting the memory mmc: moxart: fix 4-bit bus width and remove 8-bit bus width ntfs: fix BUG_ON in ntfs_lookup_inode_by_name() net: usb: qmi_wwan: Add new usb-id for Dell branded EM7455 uas: ignore UAS for Thinkplus chips usb-storage: Add Hiksemi USB3-FW to IGNORE_UAS uas: add no-uas quirk for Hiksemi usb_disk Conflicts: net/ipv4/udp.c Change-Id: Iaca1b0be9e0b4d12ab4f9d08219668a25c130123
This commit is contained in:
@@ -125,7 +125,7 @@ Description:
|
||||
Raw capacitance measurement from channel Y. Units after
|
||||
application of scale and offset are nanofarads.
|
||||
|
||||
What: /sys/.../iio:deviceX/in_capacitanceY-in_capacitanceZ_raw
|
||||
What: /sys/.../iio:deviceX/in_capacitanceY-capacitanceZ_raw
|
||||
KernelVersion: 3.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
|
||||
@@ -53,7 +53,9 @@ stable kernels.
|
||||
| ARM | Cortex-A57 | #832075 | ARM64_ERRATUM_832075 |
|
||||
| ARM | Cortex-A57 | #852523 | N/A |
|
||||
| ARM | Cortex-A57 | #834220 | ARM64_ERRATUM_834220 |
|
||||
| ARM | Cortex-A57 | #1742098 | ARM64_ERRATUM_1742098 |
|
||||
| ARM | Cortex-A72 | #853709 | N/A |
|
||||
| ARM | Cortex-A72 | #1655431 | ARM64_ERRATUM_1742098 |
|
||||
| ARM | Cortex-A55 | #1024718 | ARM64_ERRATUM_1024718 |
|
||||
| ARM | Cortex-A76 | #1188873 | ARM64_ERRATUM_1188873 |
|
||||
| ARM | MMU-500 | #841119,#826419 | N/A |
|
||||
|
||||
@@ -34,8 +34,8 @@ Example:
|
||||
Use specific request line passing from dma
|
||||
For example, MMC request line is 5
|
||||
|
||||
sdhci: sdhci@98e00000 {
|
||||
compatible = "moxa,moxart-sdhci";
|
||||
mmc: mmc@98e00000 {
|
||||
compatible = "moxa,moxart-mmc";
|
||||
reg = <0x98e00000 0x5C>;
|
||||
interrupts = <5 0>;
|
||||
clocks = <&clk_apb>;
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 330
|
||||
SUBLEVEL = 332
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ static inline void ioport_unmap(void __iomem *addr)
|
||||
{
|
||||
}
|
||||
|
||||
extern void iounmap(const void __iomem *addr);
|
||||
extern void iounmap(const volatile void __iomem *addr);
|
||||
|
||||
#define ioremap_nocache(phy, sz) ioremap(phy, sz)
|
||||
#define ioremap_wc(phy, sz) ioremap(phy, sz)
|
||||
|
||||
@@ -95,7 +95,7 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,
|
||||
EXPORT_SYMBOL(ioremap_prot);
|
||||
|
||||
|
||||
void iounmap(const void __iomem *addr)
|
||||
void iounmap(const volatile void __iomem *addr)
|
||||
{
|
||||
/* weird double cast to handle phys_addr_t > 32 bits */
|
||||
if (arc_uncached_addr_space((phys_addr_t)(u32)addr))
|
||||
|
||||
@@ -54,7 +54,7 @@ config ARM
|
||||
select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU
|
||||
select HAVE_EXIT_THREAD
|
||||
select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL)
|
||||
select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL)
|
||||
select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL && !CC_IS_CLANG)
|
||||
select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
|
||||
select HAVE_FUTEX_CMPXCHG if FUTEX
|
||||
select HAVE_GCC_PLUGINS
|
||||
@@ -2061,7 +2061,6 @@ config CMDLINE
|
||||
choice
|
||||
prompt "Kernel command line type" if CMDLINE != ""
|
||||
default CMDLINE_FROM_BOOTLOADER
|
||||
depends on ATAGS
|
||||
|
||||
config CMDLINE_FROM_BOOTLOADER
|
||||
bool "Use bootloader kernel arguments if available"
|
||||
|
||||
@@ -17,8 +17,8 @@ config ARM_PTDUMP
|
||||
|
||||
choice
|
||||
prompt "Choose kernel unwinder"
|
||||
default UNWINDER_ARM if AEABI && !FUNCTION_GRAPH_TRACER
|
||||
default UNWINDER_FRAME_POINTER if !AEABI || FUNCTION_GRAPH_TRACER
|
||||
default UNWINDER_ARM if AEABI
|
||||
default UNWINDER_FRAME_POINTER if !AEABI
|
||||
help
|
||||
This determines which method will be used for unwinding kernel stack
|
||||
traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack,
|
||||
@@ -35,7 +35,7 @@ config UNWINDER_FRAME_POINTER
|
||||
|
||||
config UNWINDER_ARM
|
||||
bool "ARM EABI stack unwinder"
|
||||
depends on AEABI
|
||||
depends on AEABI && !FUNCTION_GRAPH_TRACER
|
||||
select ARM_UNWIND
|
||||
help
|
||||
This option enables stack unwinding support in the kernel
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
};
|
||||
|
||||
&ehci {
|
||||
samsung,vbus-gpio = <&gpx3 5 1>;
|
||||
samsung,vbus-gpio = <&gpx3 5 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
|
||||
port@1{
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
ocram: sram@00900000 {
|
||||
compatible = "mmio-sram";
|
||||
reg = <0x00900000 0x20000>;
|
||||
ranges = <0 0x00900000 0x20000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
clocks = <&clks IMX6QDL_CLK_OCRAM>;
|
||||
};
|
||||
|
||||
|
||||
@@ -82,6 +82,9 @@
|
||||
ocram: sram@00900000 {
|
||||
compatible = "mmio-sram";
|
||||
reg = <0x00900000 0x40000>;
|
||||
ranges = <0 0x00900000 0x40000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
clocks = <&clks IMX6QDL_CLK_OCRAM>;
|
||||
};
|
||||
|
||||
|
||||
@@ -47,12 +47,18 @@
|
||||
ocram2: sram@00940000 {
|
||||
compatible = "mmio-sram";
|
||||
reg = <0x00940000 0x20000>;
|
||||
ranges = <0 0x00940000 0x20000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
clocks = <&clks IMX6QDL_CLK_OCRAM>;
|
||||
};
|
||||
|
||||
ocram3: sram@00960000 {
|
||||
compatible = "mmio-sram";
|
||||
reg = <0x00960000 0x20000>;
|
||||
ranges = <0 0x00960000 0x20000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
clocks = <&clks IMX6QDL_CLK_OCRAM>;
|
||||
};
|
||||
|
||||
|
||||
@@ -102,6 +102,9 @@
|
||||
ocram: sram@00900000 {
|
||||
compatible = "mmio-sram";
|
||||
reg = <0x00900000 0x20000>;
|
||||
ranges = <0 0x00900000 0x20000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
clocks = <&clks IMX6SL_CLK_OCRAM>;
|
||||
};
|
||||
|
||||
|
||||
@@ -126,12 +126,7 @@
|
||||
interrupt-parent = <&gpio2>;
|
||||
interrupts = <29 0>;
|
||||
pendown-gpio = <&gpio2 29 GPIO_ACTIVE_HIGH>;
|
||||
ti,x-min = /bits/ 16 <0>;
|
||||
ti,x-max = /bits/ 16 <0>;
|
||||
ti,y-min = /bits/ 16 <0>;
|
||||
ti,y-max = /bits/ 16 <0>;
|
||||
ti,pressure-max = /bits/ 16 <0>;
|
||||
ti,x-plate-ohms = /bits/ 16 <400>;
|
||||
touchscreen-max-pressure = <255>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
|
||||
ocp@f1000000 {
|
||||
pinctrl: pin-controller@10000 {
|
||||
/* Non-default UART pins */
|
||||
pmx_uart0: pmx-uart0 {
|
||||
marvell,pins = "mpp4", "mpp5";
|
||||
};
|
||||
|
||||
pmx_power_hdd: pmx-power-hdd {
|
||||
marvell,pins = "mpp10";
|
||||
marvell,function = "gpo";
|
||||
@@ -212,22 +217,11 @@
|
||||
&mdio {
|
||||
status = "okay";
|
||||
|
||||
ethphy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
ethphy1: ethernet-phy@8 {
|
||||
reg = <8>;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
ethernet0-port@0 {
|
||||
phy-handle = <ðphy0>;
|
||||
};
|
||||
};
|
||||
|
||||
ð1 {
|
||||
status = "okay";
|
||||
ethernet1-port@0 {
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
clocks = <&ref12>;
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
&mmc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -91,8 +91,8 @@
|
||||
clocks = <&clk_apb>;
|
||||
};
|
||||
|
||||
sdhci: sdhci@98e00000 {
|
||||
compatible = "moxa,moxart-sdhci";
|
||||
mmc: mmc@98e00000 {
|
||||
compatible = "moxa,moxart-mmc";
|
||||
reg = <0x98e00000 0x5C>;
|
||||
interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk_apb>;
|
||||
|
||||
@@ -466,6 +466,22 @@ config ARM64_ERRATUM_1188873
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config ARM64_ERRATUM_1742098
|
||||
bool "Cortex-A57/A72: 1742098: ELR recorded incorrectly on interrupt taken between cryptographic instructions in a sequence"
|
||||
depends on COMPAT
|
||||
default y
|
||||
help
|
||||
This option removes the AES hwcap for aarch32 user-space to
|
||||
workaround erratum 1742098 on Cortex-A57 and Cortex-A72.
|
||||
|
||||
Affected parts may corrupt the AES state if an interrupt is
|
||||
taken between a pair of AES instructions. These instructions
|
||||
are only present if the cryptography extensions are present.
|
||||
All software should have a fallback implementation for CPUs
|
||||
that don't implement the cryptography extensions.
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config CAVIUM_ERRATUM_22375
|
||||
bool "Cavium erratum 22375, 24313"
|
||||
default y
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
#define ARM64_MISMATCHED_CACHE_TYPE 19
|
||||
#define ARM64_WORKAROUND_1188873 20
|
||||
#define ARM64_SPECTRE_BHB 21
|
||||
#define ARM64_WORKAROUND_1742098 22
|
||||
|
||||
#define ARM64_NCAPS 22
|
||||
#define ARM64_NCAPS 23
|
||||
|
||||
#endif /* __ASM_CPUCAPS_H */
|
||||
|
||||
@@ -473,6 +473,14 @@ static const struct midr_range arm64_bp_harden_smccc_cpus_qti[] = {
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARM64_ERRATUM_1742098
|
||||
static struct midr_range broken_aarch32_aes[] = {
|
||||
MIDR_RANGE(MIDR_CORTEX_A57, 0, 1, 0xf, 0xf),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A72),
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
|
||||
const struct arm64_cpu_capabilities arm64_errata[] = {
|
||||
#if defined(CONFIG_ARM64_ERRATUM_826319) || \
|
||||
defined(CONFIG_ARM64_ERRATUM_827319) || \
|
||||
@@ -601,6 +609,14 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
|
||||
.cpu_enable = spectre_bhb_enable_mitigation,
|
||||
#endif
|
||||
},
|
||||
#ifdef CONFIG_ARM64_ERRATUM_1742098
|
||||
{
|
||||
.desc = "ARM erratum 1742098",
|
||||
.capability = ARM64_WORKAROUND_1742098,
|
||||
CAP_MIDR_RANGE_LIST(broken_aarch32_aes),
|
||||
.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/cpufeature.h>
|
||||
#include <asm/cpu_ops.h>
|
||||
#include <asm/hwcap.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/scs.h>
|
||||
@@ -894,6 +895,14 @@ static void cpu_copy_el2regs(const struct arm64_cpu_capabilities *__unused)
|
||||
write_sysreg(read_sysreg(tpidr_el1), tpidr_el2);
|
||||
}
|
||||
|
||||
static void elf_hwcap_fixup(void)
|
||||
{
|
||||
#ifdef CONFIG_ARM64_ERRATUM_1742098
|
||||
if (cpus_have_const_cap(ARM64_WORKAROUND_1742098))
|
||||
compat_elf_hwcap2 &= ~COMPAT_HWCAP2_AES;
|
||||
#endif /* ARM64_ERRATUM_1742098 */
|
||||
}
|
||||
|
||||
static const struct arm64_cpu_capabilities arm64_features[] = {
|
||||
{
|
||||
.desc = "GIC system register CPU interface",
|
||||
@@ -1318,8 +1327,10 @@ void __init setup_cpu_features(void)
|
||||
mark_const_caps_ready();
|
||||
setup_elf_hwcaps(arm64_elf_hwcaps);
|
||||
|
||||
if (system_supports_32bit_el0())
|
||||
if (system_supports_32bit_el0()) {
|
||||
setup_elf_hwcaps(compat_elf_hwcaps);
|
||||
elf_hwcap_fixup();
|
||||
}
|
||||
|
||||
/* Advertise that we have computed the system capabilities */
|
||||
set_sys_caps_initialised();
|
||||
|
||||
@@ -85,7 +85,7 @@ static __init void prom_init_mem(void)
|
||||
pr_debug("Assume 128MB RAM\n");
|
||||
break;
|
||||
}
|
||||
if (!memcmp(prom_init, prom_init + mem, 32))
|
||||
if (!memcmp((void *)prom_init, (void *)prom_init + mem, 32))
|
||||
break;
|
||||
}
|
||||
lowmem = mem;
|
||||
@@ -162,7 +162,7 @@ void __init bcm47xx_prom_highmem_init(void)
|
||||
|
||||
off = EXTVBASE + __pa(off);
|
||||
for (extmem = 128 << 20; extmem < 512 << 20; extmem <<= 1) {
|
||||
if (!memcmp(prom_init, (void *)(off + extmem), 16))
|
||||
if (!memcmp((void *)prom_init, (void *)(off + extmem), 16))
|
||||
break;
|
||||
}
|
||||
extmem -= lowmem;
|
||||
|
||||
51
arch/powerpc/boot/dts/fsl/e500v1_power_isa.dtsi
Normal file
51
arch/powerpc/boot/dts/fsl/e500v1_power_isa.dtsi
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* e500v1 Power ISA Device Tree Source (include)
|
||||
*
|
||||
* Copyright 2012 Freescale Semiconductor Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Freescale Semiconductor nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* ALTERNATIVELY, this software may be distributed under the terms of the
|
||||
* GNU General Public License ("GPL") as published by the Free Software
|
||||
* Foundation, either version 2 of that License or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/ {
|
||||
cpus {
|
||||
power-isa-version = "2.03";
|
||||
power-isa-b; // Base
|
||||
power-isa-e; // Embedded
|
||||
power-isa-atb; // Alternate Time Base
|
||||
power-isa-cs; // Cache Specification
|
||||
power-isa-e.le; // Embedded.Little-Endian
|
||||
power-isa-e.pm; // Embedded.Performance Monitor
|
||||
power-isa-ecl; // Embedded Cache Locking
|
||||
power-isa-mmc; // Memory Coherence
|
||||
power-isa-sp; // Signal Processing Engine
|
||||
power-isa-sp.fs; // SPE.Embedded Float Scalar Single
|
||||
power-isa-sp.fv; // SPE.Embedded Float Vector
|
||||
mmu-type = "power-embedded";
|
||||
};
|
||||
};
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "e500v2_power_isa.dtsi"
|
||||
/include/ "e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "MPC8540ADS";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "e500v2_power_isa.dtsi"
|
||||
/include/ "e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "MPC8541CDS";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "e500v2_power_isa.dtsi"
|
||||
/include/ "e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "MPC8555CDS";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "e500v2_power_isa.dtsi"
|
||||
/include/ "e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "MPC8560ADS";
|
||||
|
||||
@@ -355,6 +355,7 @@ struct pci_dn *pci_add_device_node_info(struct pci_controller *hose,
|
||||
INIT_LIST_HEAD(&pdn->list);
|
||||
parent = of_get_parent(dn);
|
||||
pdn->parent = parent ? PCI_DN(parent) : NULL;
|
||||
of_node_put(parent);
|
||||
if (pdn->parent)
|
||||
list_add_tail(&pdn->list, &pdn->parent->child_list);
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/prctl.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/reg.h>
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
"3: jl 1b\n" \
|
||||
" lhi %0,0\n" \
|
||||
"4: sacf 768\n" \
|
||||
EX_TABLE(0b,4b) EX_TABLE(2b,4b) EX_TABLE(3b,4b) \
|
||||
EX_TABLE(0b,4b) EX_TABLE(1b,4b) \
|
||||
EX_TABLE(2b,4b) EX_TABLE(3b,4b) \
|
||||
: "=d" (ret), "=&d" (oldval), "=&d" (newval), \
|
||||
"=m" (*uaddr) \
|
||||
: "0" (-EFAULT), "d" (oparg), "a" (uaddr), \
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <asm-generic/sections.h>
|
||||
|
||||
extern long __machvec_start, __machvec_end;
|
||||
extern char __machvec_start[], __machvec_end[];
|
||||
extern char __uncached_start, __uncached_end;
|
||||
extern char __start_eh_frame[], __stop_eh_frame[];
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#define MV_NAME_SIZE 32
|
||||
|
||||
#define for_each_mv(mv) \
|
||||
for ((mv) = (struct sh_machine_vector *)&__machvec_start; \
|
||||
(mv) && (unsigned long)(mv) < (unsigned long)&__machvec_end; \
|
||||
for ((mv) = (struct sh_machine_vector *)__machvec_start; \
|
||||
(mv) && (unsigned long)(mv) < (unsigned long)__machvec_end; \
|
||||
(mv)++)
|
||||
|
||||
static struct sh_machine_vector * __init get_mv_byname(const char *name)
|
||||
@@ -89,8 +89,8 @@ void __init sh_mv_setup(void)
|
||||
if (!machvec_selected) {
|
||||
unsigned long machvec_size;
|
||||
|
||||
machvec_size = ((unsigned long)&__machvec_end -
|
||||
(unsigned long)&__machvec_start);
|
||||
machvec_size = ((unsigned long)__machvec_end -
|
||||
(unsigned long)__machvec_start);
|
||||
|
||||
/*
|
||||
* Sanity check for machvec section alignment. Ensure
|
||||
@@ -104,7 +104,7 @@ void __init sh_mv_setup(void)
|
||||
* vector (usually the only one) from .machvec.init.
|
||||
*/
|
||||
if (machvec_size >= sizeof(struct sh_machine_vector))
|
||||
sh_mv = *(struct sh_machine_vector *)&__machvec_start;
|
||||
sh_mv = *(struct sh_machine_vector *)__machvec_start;
|
||||
}
|
||||
|
||||
printk(KERN_NOTICE "Booting machvec: %s\n", get_system_type());
|
||||
|
||||
@@ -81,7 +81,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
|
||||
|
||||
static void *c_start(struct seq_file *m, loff_t *pos)
|
||||
{
|
||||
return *pos < NR_CPUS ? cpu_data + *pos : NULL;
|
||||
return *pos < nr_cpu_ids ? cpu_data + *pos : NULL;
|
||||
}
|
||||
|
||||
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
|
||||
|
||||
@@ -1980,7 +1980,7 @@ static int em_pop_sreg(struct x86_emulate_ctxt *ctxt)
|
||||
if (rc != X86EMUL_CONTINUE)
|
||||
return rc;
|
||||
|
||||
if (ctxt->modrm_reg == VCPU_SREG_SS)
|
||||
if (seg == VCPU_SREG_SS)
|
||||
ctxt->interruptibility = KVM_X86_SHADOW_INT_MOV_SS;
|
||||
if (ctxt->op_bytes > 2)
|
||||
rsp_increment(ctxt, ctxt->op_bytes - 2);
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
#include <asm/unistd.h>
|
||||
#include <sysdep/ptrace.h>
|
||||
|
||||
typedef long syscall_handler_t(struct pt_regs);
|
||||
typedef long syscall_handler_t(struct syscall_args);
|
||||
|
||||
extern syscall_handler_t *sys_call_table[];
|
||||
|
||||
#define EXECUTE_SYSCALL(syscall, regs) \
|
||||
((long (*)(struct syscall_args)) \
|
||||
(*sys_call_table[syscall]))(SYSCALL_ARGS(®s->regs))
|
||||
((*sys_call_table[syscall]))(SYSCALL_ARGS(®s->regs))
|
||||
|
||||
@@ -65,9 +65,6 @@ static int get_free_idx(struct task_struct* task)
|
||||
struct thread_struct *t = &task->thread;
|
||||
int idx;
|
||||
|
||||
if (!t->arch.tls_array)
|
||||
return GDT_ENTRY_TLS_MIN;
|
||||
|
||||
for (idx = 0; idx < GDT_ENTRY_TLS_ENTRIES; idx++)
|
||||
if (!t->arch.tls_array[idx].present)
|
||||
return idx + GDT_ENTRY_TLS_MIN;
|
||||
@@ -242,9 +239,6 @@ static int get_tls_entry(struct task_struct *task, struct user_desc *info,
|
||||
{
|
||||
struct thread_struct *t = &task->thread;
|
||||
|
||||
if (!t->arch.tls_array)
|
||||
goto clear;
|
||||
|
||||
if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@@ -485,6 +485,22 @@ static struct dmi_system_id video_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE R830"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_disable_backlight_sysfs_if,
|
||||
.ident = "Toshiba Satellite Z830",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE Z830"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_disable_backlight_sysfs_if,
|
||||
.ident = "Toshiba Portege Z830",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE Z830"),
|
||||
},
|
||||
},
|
||||
/*
|
||||
* Some machine's _DOD IDs don't have bit 31(Device ID Scheme) set
|
||||
* but the IDs actually follow the Device ID Scheme.
|
||||
|
||||
@@ -226,6 +226,70 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "PF5LUXG"),
|
||||
},
|
||||
},
|
||||
/*
|
||||
* More Tongfang devices with the same issue as the Clevo NL5xRU and
|
||||
* NL5xNU/TUXEDO Aura 15 Gen1 and Gen2. See the description above.
|
||||
*/
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
.ident = "TongFang GKxNRxx",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GKxNRxx"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
.ident = "TongFang GKxNRxx",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "POLARIS1501A1650TI"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
.ident = "TongFang GKxNRxx",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "POLARIS1501A2060"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
.ident = "TongFang GKxNRxx",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "POLARIS1701A1650TI"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
.ident = "TongFang GKxNRxx",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "POLARIS1701A2060"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
.ident = "TongFang GMxNGxx",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GMxNGxx"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
.ident = "TongFang GMxZGxx",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GMxZGxx"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
.ident = "TongFang GMxRGxx",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"),
|
||||
},
|
||||
},
|
||||
/*
|
||||
* These models have a working acpi_video backlight control, and using
|
||||
* native backlight causes a regression where backlight does not work
|
||||
|
||||
@@ -257,7 +257,7 @@ enum {
|
||||
ICH_MAP = 0x90, /* ICH MAP register */
|
||||
|
||||
/* em constants */
|
||||
EM_MAX_SLOTS = 8,
|
||||
EM_MAX_SLOTS = SATA_PMP_MAX_PORTS,
|
||||
EM_MAX_RETRY = 5,
|
||||
|
||||
/* em_ctl bits */
|
||||
|
||||
@@ -691,4 +691,4 @@ module_platform_driver(imx_ahci_driver);
|
||||
MODULE_DESCRIPTION("Freescale i.MX AHCI SATA platform driver");
|
||||
MODULE_AUTHOR("Richard Zhu <Hong-Xing.Zhu@freescale.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("ahci:imx");
|
||||
MODULE_ALIAS("platform:" DRV_NAME);
|
||||
|
||||
@@ -891,10 +891,10 @@ void __init add_bootloader_randomness(const void *buf, size_t len)
|
||||
}
|
||||
|
||||
struct fast_pool {
|
||||
struct work_struct mix;
|
||||
unsigned long pool[4];
|
||||
unsigned long last;
|
||||
unsigned int count;
|
||||
struct timer_list mix;
|
||||
};
|
||||
|
||||
static DEFINE_PER_CPU(struct fast_pool, irq_randomness) = {
|
||||
@@ -946,9 +946,9 @@ int __cold random_online_cpu(unsigned int cpu)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void mix_interrupt_randomness(struct work_struct *work)
|
||||
static void mix_interrupt_randomness(unsigned long data)
|
||||
{
|
||||
struct fast_pool *fast_pool = container_of(work, struct fast_pool, mix);
|
||||
struct fast_pool *fast_pool = (struct fast_pool *)data;
|
||||
/*
|
||||
* The size of the copied stack pool is explicitly 2 longs so that we
|
||||
* only ever ingest half of the siphash output each time, retaining
|
||||
@@ -977,7 +977,7 @@ static void mix_interrupt_randomness(struct work_struct *work)
|
||||
local_irq_enable();
|
||||
|
||||
mix_pool_bytes(pool, sizeof(pool));
|
||||
credit_init_bits(max(1u, (count & U16_MAX) / 64));
|
||||
credit_init_bits(clamp_t(unsigned int, (count & U16_MAX) / 64, 1, sizeof(pool) * 8));
|
||||
|
||||
memzero_explicit(pool, sizeof(pool));
|
||||
}
|
||||
@@ -1000,10 +1000,14 @@ void add_interrupt_randomness(int irq)
|
||||
if (new_count < 1024 && !time_is_before_jiffies(fast_pool->last + HZ))
|
||||
return;
|
||||
|
||||
if (unlikely(!fast_pool->mix.func))
|
||||
INIT_WORK(&fast_pool->mix, mix_interrupt_randomness);
|
||||
if (unlikely(!fast_pool->mix.data))
|
||||
setup_timer(&fast_pool->mix, mix_interrupt_randomness, (unsigned long)fast_pool);
|
||||
|
||||
fast_pool->count |= MIX_INFLIGHT;
|
||||
queue_work_on(raw_smp_processor_id(), system_highpri_wq, &fast_pool->mix);
|
||||
if (!timer_pending(&fast_pool->mix)) {
|
||||
fast_pool->mix.expires = jiffies;
|
||||
add_timer_on(&fast_pool->mix, raw_smp_processor_id());
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(add_interrupt_randomness);
|
||||
|
||||
@@ -1295,6 +1299,10 @@ static ssize_t random_read_iter(struct kiocb *kiocb, struct iov_iter *iter)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!crng_ready() &&
|
||||
(kiocb->ki_filp->f_flags & O_NONBLOCK))
|
||||
return -EAGAIN;
|
||||
|
||||
ret = wait_for_random_bytes();
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
@@ -902,9 +902,9 @@ static u32 bcm2835_clock_choose_div(struct clk_hw *hw,
|
||||
return div;
|
||||
}
|
||||
|
||||
static long bcm2835_clock_rate_from_divisor(struct bcm2835_clock *clock,
|
||||
unsigned long parent_rate,
|
||||
u32 div)
|
||||
static unsigned long bcm2835_clock_rate_from_divisor(struct bcm2835_clock *clock,
|
||||
unsigned long parent_rate,
|
||||
u32 div)
|
||||
{
|
||||
const struct bcm2835_clock_data *data = clock->data;
|
||||
u64 temp;
|
||||
|
||||
@@ -69,16 +69,6 @@ enum vco_freq_range {
|
||||
VCO_MAX = 4000000000U,
|
||||
};
|
||||
|
||||
struct iproc_pll;
|
||||
|
||||
struct iproc_clk {
|
||||
struct clk_hw hw;
|
||||
const char *name;
|
||||
struct iproc_pll *pll;
|
||||
unsigned long rate;
|
||||
const struct iproc_clk_ctrl *ctrl;
|
||||
};
|
||||
|
||||
struct iproc_pll {
|
||||
void __iomem *status_base;
|
||||
void __iomem *control_base;
|
||||
@@ -88,9 +78,12 @@ struct iproc_pll {
|
||||
const struct iproc_pll_ctrl *ctrl;
|
||||
const struct iproc_pll_vco_param *vco_param;
|
||||
unsigned int num_vco_entries;
|
||||
};
|
||||
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct iproc_clk *clks;
|
||||
struct iproc_clk {
|
||||
struct clk_hw hw;
|
||||
struct iproc_pll *pll;
|
||||
const struct iproc_clk_ctrl *ctrl;
|
||||
};
|
||||
|
||||
#define to_iproc_clk(hw) container_of(hw, struct iproc_clk, hw)
|
||||
@@ -263,6 +256,7 @@ static int pll_set_rate(struct iproc_clk *clk, unsigned int rate_index,
|
||||
u32 val;
|
||||
enum kp_band kp_index;
|
||||
unsigned long ref_freq;
|
||||
const char *clk_name = clk_hw_get_name(&clk->hw);
|
||||
|
||||
/*
|
||||
* reference frequency = parent frequency / PDIV
|
||||
@@ -285,19 +279,19 @@ static int pll_set_rate(struct iproc_clk *clk, unsigned int rate_index,
|
||||
kp_index = KP_BAND_HIGH_HIGH;
|
||||
} else {
|
||||
pr_err("%s: pll: %s has invalid rate: %lu\n", __func__,
|
||||
clk->name, rate);
|
||||
clk_name, rate);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
kp = get_kp(ref_freq, kp_index);
|
||||
if (kp < 0) {
|
||||
pr_err("%s: pll: %s has invalid kp\n", __func__, clk->name);
|
||||
pr_err("%s: pll: %s has invalid kp\n", __func__, clk_name);
|
||||
return kp;
|
||||
}
|
||||
|
||||
ret = __pll_enable(pll);
|
||||
if (ret) {
|
||||
pr_err("%s: pll: %s fails to enable\n", __func__, clk->name);
|
||||
pr_err("%s: pll: %s fails to enable\n", __func__, clk_name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -354,7 +348,7 @@ static int pll_set_rate(struct iproc_clk *clk, unsigned int rate_index,
|
||||
|
||||
ret = pll_wait_for_lock(pll);
|
||||
if (ret < 0) {
|
||||
pr_err("%s: pll: %s failed to lock\n", __func__, clk->name);
|
||||
pr_err("%s: pll: %s failed to lock\n", __func__, clk_name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -390,16 +384,15 @@ static unsigned long iproc_pll_recalc_rate(struct clk_hw *hw,
|
||||
u32 val;
|
||||
u64 ndiv, ndiv_int, ndiv_frac;
|
||||
unsigned int pdiv;
|
||||
unsigned long rate;
|
||||
|
||||
if (parent_rate == 0)
|
||||
return 0;
|
||||
|
||||
/* PLL needs to be locked */
|
||||
val = readl(pll->status_base + ctrl->status.offset);
|
||||
if ((val & (1 << ctrl->status.shift)) == 0) {
|
||||
clk->rate = 0;
|
||||
if ((val & (1 << ctrl->status.shift)) == 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* PLL output frequency =
|
||||
@@ -421,14 +414,14 @@ static unsigned long iproc_pll_recalc_rate(struct clk_hw *hw,
|
||||
val = readl(pll->control_base + ctrl->pdiv.offset);
|
||||
pdiv = (val >> ctrl->pdiv.shift) & bit_mask(ctrl->pdiv.width);
|
||||
|
||||
clk->rate = (ndiv * parent_rate) >> 20;
|
||||
rate = (ndiv * parent_rate) >> 20;
|
||||
|
||||
if (pdiv == 0)
|
||||
clk->rate *= 2;
|
||||
rate *= 2;
|
||||
else
|
||||
clk->rate /= pdiv;
|
||||
rate /= pdiv;
|
||||
|
||||
return clk->rate;
|
||||
return rate;
|
||||
}
|
||||
|
||||
static long iproc_pll_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
@@ -518,6 +511,7 @@ static unsigned long iproc_clk_recalc_rate(struct clk_hw *hw,
|
||||
struct iproc_pll *pll = clk->pll;
|
||||
u32 val;
|
||||
unsigned int mdiv;
|
||||
unsigned long rate;
|
||||
|
||||
if (parent_rate == 0)
|
||||
return 0;
|
||||
@@ -528,11 +522,11 @@ static unsigned long iproc_clk_recalc_rate(struct clk_hw *hw,
|
||||
mdiv = 256;
|
||||
|
||||
if (ctrl->flags & IPROC_CLK_MCLK_DIV_BY_2)
|
||||
clk->rate = parent_rate / (mdiv * 2);
|
||||
rate = parent_rate / (mdiv * 2);
|
||||
else
|
||||
clk->rate = parent_rate / mdiv;
|
||||
rate = parent_rate / mdiv;
|
||||
|
||||
return clk->rate;
|
||||
return rate;
|
||||
}
|
||||
|
||||
static long iproc_clk_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
@@ -583,10 +577,6 @@ static int iproc_clk_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
val |= div << ctrl->mdiv.shift;
|
||||
}
|
||||
iproc_pll_write(pll, pll->control_base, ctrl->mdiv.offset, val);
|
||||
if (ctrl->flags & IPROC_CLK_MCLK_DIV_BY_2)
|
||||
clk->rate = parent_rate / (div * 2);
|
||||
else
|
||||
clk->rate = parent_rate / div;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -629,6 +619,9 @@ void __init iproc_pll_clk_setup(struct device_node *node,
|
||||
struct iproc_clk *iclk;
|
||||
struct clk_init_data init;
|
||||
const char *parent_name;
|
||||
struct iproc_clk *iclk_array;
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
const char *clk_name;
|
||||
|
||||
if (WARN_ON(!pll_ctrl) || WARN_ON(!clk_ctrl))
|
||||
return;
|
||||
@@ -637,14 +630,14 @@ void __init iproc_pll_clk_setup(struct device_node *node,
|
||||
if (WARN_ON(!pll))
|
||||
return;
|
||||
|
||||
pll->clk_data = kzalloc(sizeof(*pll->clk_data->hws) * num_clks +
|
||||
sizeof(*pll->clk_data), GFP_KERNEL);
|
||||
if (WARN_ON(!pll->clk_data))
|
||||
clk_data = kzalloc(sizeof(*clk_data->hws) * num_clks +
|
||||
sizeof(*clk_data), GFP_KERNEL);
|
||||
if (WARN_ON(!clk_data))
|
||||
goto err_clk_data;
|
||||
pll->clk_data->num = num_clks;
|
||||
clk_data->num = num_clks;
|
||||
|
||||
pll->clks = kcalloc(num_clks, sizeof(*pll->clks), GFP_KERNEL);
|
||||
if (WARN_ON(!pll->clks))
|
||||
iclk_array = kcalloc(num_clks, sizeof(struct iproc_clk), GFP_KERNEL);
|
||||
if (WARN_ON(!iclk_array))
|
||||
goto err_clks;
|
||||
|
||||
pll->control_base = of_iomap(node, 0);
|
||||
@@ -674,11 +667,15 @@ void __init iproc_pll_clk_setup(struct device_node *node,
|
||||
/* initialize and register the PLL itself */
|
||||
pll->ctrl = pll_ctrl;
|
||||
|
||||
iclk = &pll->clks[0];
|
||||
iclk = &iclk_array[0];
|
||||
iclk->pll = pll;
|
||||
iclk->name = node->name;
|
||||
|
||||
init.name = node->name;
|
||||
ret = of_property_read_string_index(node, "clock-output-names",
|
||||
0, &clk_name);
|
||||
if (WARN_ON(ret))
|
||||
goto err_pll_register;
|
||||
|
||||
init.name = clk_name;
|
||||
init.ops = &iproc_pll_ops;
|
||||
init.flags = 0;
|
||||
parent_name = of_clk_get_parent_name(node, 0);
|
||||
@@ -697,22 +694,19 @@ void __init iproc_pll_clk_setup(struct device_node *node,
|
||||
if (WARN_ON(ret))
|
||||
goto err_pll_register;
|
||||
|
||||
pll->clk_data->hws[0] = &iclk->hw;
|
||||
clk_data->hws[0] = &iclk->hw;
|
||||
parent_name = clk_name;
|
||||
|
||||
/* now initialize and register all leaf clocks */
|
||||
for (i = 1; i < num_clks; i++) {
|
||||
const char *clk_name;
|
||||
|
||||
memset(&init, 0, sizeof(init));
|
||||
parent_name = node->name;
|
||||
|
||||
ret = of_property_read_string_index(node, "clock-output-names",
|
||||
i, &clk_name);
|
||||
if (WARN_ON(ret))
|
||||
goto err_clk_register;
|
||||
|
||||
iclk = &pll->clks[i];
|
||||
iclk->name = clk_name;
|
||||
iclk = &iclk_array[i];
|
||||
iclk->pll = pll;
|
||||
iclk->ctrl = &clk_ctrl[i];
|
||||
|
||||
@@ -727,11 +721,10 @@ void __init iproc_pll_clk_setup(struct device_node *node,
|
||||
if (WARN_ON(ret))
|
||||
goto err_clk_register;
|
||||
|
||||
pll->clk_data->hws[i] = &iclk->hw;
|
||||
clk_data->hws[i] = &iclk->hw;
|
||||
}
|
||||
|
||||
ret = of_clk_add_hw_provider(node, of_clk_hw_onecell_get,
|
||||
pll->clk_data);
|
||||
ret = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
if (WARN_ON(ret))
|
||||
goto err_clk_register;
|
||||
|
||||
@@ -739,7 +732,7 @@ void __init iproc_pll_clk_setup(struct device_node *node,
|
||||
|
||||
err_clk_register:
|
||||
while (--i >= 0)
|
||||
clk_hw_unregister(pll->clk_data->hws[i]);
|
||||
clk_hw_unregister(clk_data->hws[i]);
|
||||
|
||||
err_pll_register:
|
||||
if (pll->status_base != pll->control_base)
|
||||
@@ -756,10 +749,10 @@ err_asiu_iomap:
|
||||
iounmap(pll->control_base);
|
||||
|
||||
err_pll_iomap:
|
||||
kfree(pll->clks);
|
||||
kfree(iclk_array);
|
||||
|
||||
err_clks:
|
||||
kfree(pll->clk_data);
|
||||
kfree(clk_data);
|
||||
|
||||
err_clk_data:
|
||||
kfree(pll);
|
||||
|
||||
@@ -1342,6 +1342,7 @@ static void __init tegra114_clock_init(struct device_node *np)
|
||||
}
|
||||
|
||||
pmc_base = of_iomap(node, 0);
|
||||
of_node_put(node);
|
||||
if (!pmc_base) {
|
||||
pr_err("Can't map pmc registers\n");
|
||||
WARN_ON(1);
|
||||
|
||||
@@ -1101,6 +1101,7 @@ static void __init tegra20_clock_init(struct device_node *np)
|
||||
}
|
||||
|
||||
pmc_base = of_iomap(node, 0);
|
||||
of_node_put(node);
|
||||
if (!pmc_base) {
|
||||
pr_err("Can't map pmc registers\n");
|
||||
BUG();
|
||||
|
||||
@@ -2706,6 +2706,7 @@ static void __init tegra210_clock_init(struct device_node *np)
|
||||
}
|
||||
|
||||
pmc_base = of_iomap(node, 0);
|
||||
of_node_put(node);
|
||||
if (!pmc_base) {
|
||||
pr_err("Can't map pmc registers\n");
|
||||
WARN_ON(1);
|
||||
|
||||
@@ -249,14 +249,16 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
|
||||
if (rc) {
|
||||
pr_err("%s: failed to lookup atl clock %d\n", __func__,
|
||||
i);
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto pm_put;
|
||||
}
|
||||
|
||||
clk = of_clk_get_from_provider(&clkspec);
|
||||
if (IS_ERR(clk)) {
|
||||
pr_err("%s: failed to get atl clock %d from provider\n",
|
||||
__func__, i);
|
||||
return PTR_ERR(clk);
|
||||
ret = PTR_ERR(clk);
|
||||
goto pm_put;
|
||||
}
|
||||
|
||||
cdesc = to_atl_desc(__clk_get_hw(clk));
|
||||
@@ -289,8 +291,9 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
|
||||
if (cdesc->enabled)
|
||||
atl_clk_enable(__clk_get_hw(clk));
|
||||
}
|
||||
pm_runtime_put_sync(cinfo->dev);
|
||||
|
||||
pm_put:
|
||||
pm_runtime_put_sync(cinfo->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -663,7 +663,7 @@ static void __cleanup(struct ioatdma_chan *ioat_chan, dma_addr_t phys_complete)
|
||||
if (active - i == 0) {
|
||||
dev_dbg(to_dev(ioat_chan), "%s: cancel completion timeout\n",
|
||||
__func__);
|
||||
mod_timer(&ioat_chan->timer, jiffies + IDLE_TIMEOUT);
|
||||
mod_timer_pending(&ioat_chan->timer, jiffies + IDLE_TIMEOUT);
|
||||
}
|
||||
|
||||
/* 5 microsecond delay per pending descriptor */
|
||||
@@ -685,7 +685,7 @@ static void ioat_cleanup(struct ioatdma_chan *ioat_chan)
|
||||
|
||||
if (chanerr &
|
||||
(IOAT_CHANERR_HANDLE_MASK | IOAT_CHANERR_RECOVER_MASK)) {
|
||||
mod_timer(&ioat_chan->timer, jiffies + IDLE_TIMEOUT);
|
||||
mod_timer_pending(&ioat_chan->timer, jiffies + IDLE_TIMEOUT);
|
||||
ioat_eh(ioat_chan);
|
||||
}
|
||||
}
|
||||
@@ -877,7 +877,7 @@ static void check_active(struct ioatdma_chan *ioat_chan)
|
||||
}
|
||||
|
||||
if (test_and_clear_bit(IOAT_CHAN_ACTIVE, &ioat_chan->state))
|
||||
mod_timer(&ioat_chan->timer, jiffies + IDLE_TIMEOUT);
|
||||
mod_timer_pending(&ioat_chan->timer, jiffies + IDLE_TIMEOUT);
|
||||
}
|
||||
|
||||
void ioat_timer_event(unsigned long data)
|
||||
|
||||
@@ -2558,7 +2558,7 @@ static int xilinx_dma_probe(struct platform_device *pdev)
|
||||
if (err < 0) {
|
||||
dev_err(xdev->dev,
|
||||
"missing xlnx,num-fstores property\n");
|
||||
return err;
|
||||
goto disable_clks;
|
||||
}
|
||||
|
||||
err = of_property_read_u32(node, "xlnx,flush-fsync",
|
||||
@@ -2578,7 +2578,11 @@ static int xilinx_dma_probe(struct platform_device *pdev)
|
||||
xdev->ext_addr = false;
|
||||
|
||||
/* Set the dma mask bits */
|
||||
dma_set_mask_and_coherent(xdev->dev, DMA_BIT_MASK(addr_width));
|
||||
err = dma_set_mask_and_coherent(xdev->dev, DMA_BIT_MASK(addr_width));
|
||||
if (err < 0) {
|
||||
dev_err(xdev->dev, "DMA mask error %d\n", err);
|
||||
goto disable_clks;
|
||||
}
|
||||
|
||||
/* Initialize the DMA engine */
|
||||
xdev->common.dev = &pdev->dev;
|
||||
|
||||
@@ -661,6 +661,15 @@ static struct notifier_block gsmi_die_notifier = {
|
||||
static int gsmi_panic_callback(struct notifier_block *nb,
|
||||
unsigned long reason, void *arg)
|
||||
{
|
||||
|
||||
/*
|
||||
* Panic callbacks are executed with all other CPUs stopped,
|
||||
* so we must not attempt to spin waiting for gsmi_dev.lock
|
||||
* to be released.
|
||||
*/
|
||||
if (spin_is_locked(&gsmi_dev.lock))
|
||||
return NOTIFY_DONE;
|
||||
|
||||
gsmi_shutdown_reason(GSMI_SHUTDOWN_PANIC);
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
@@ -1760,10 +1760,12 @@ amdgpu_connector_add(struct amdgpu_device *adev,
|
||||
adev->mode_info.dither_property,
|
||||
AMDGPU_FMT_DITHER_DISABLE);
|
||||
|
||||
if (amdgpu_audio != 0)
|
||||
if (amdgpu_audio != 0) {
|
||||
drm_object_attach_property(&amdgpu_connector->base.base,
|
||||
adev->mode_info.audio_property,
|
||||
AMDGPU_AUDIO_AUTO);
|
||||
amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
|
||||
}
|
||||
|
||||
subpixel_order = SubPixelHorizontalRGB;
|
||||
connector->interlace_allowed = true;
|
||||
@@ -1868,6 +1870,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
|
||||
drm_object_attach_property(&amdgpu_connector->base.base,
|
||||
adev->mode_info.audio_property,
|
||||
AMDGPU_AUDIO_AUTO);
|
||||
amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
|
||||
}
|
||||
drm_object_attach_property(&amdgpu_connector->base.base,
|
||||
adev->mode_info.dither_property,
|
||||
@@ -1916,6 +1919,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
|
||||
drm_object_attach_property(&amdgpu_connector->base.base,
|
||||
adev->mode_info.audio_property,
|
||||
AMDGPU_AUDIO_AUTO);
|
||||
amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
|
||||
}
|
||||
drm_object_attach_property(&amdgpu_connector->base.base,
|
||||
adev->mode_info.dither_property,
|
||||
@@ -1961,6 +1965,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
|
||||
drm_object_attach_property(&amdgpu_connector->base.base,
|
||||
adev->mode_info.audio_property,
|
||||
AMDGPU_AUDIO_AUTO);
|
||||
amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
|
||||
}
|
||||
drm_object_attach_property(&amdgpu_connector->base.base,
|
||||
adev->mode_info.dither_property,
|
||||
|
||||
@@ -1463,12 +1463,6 @@ int analogix_dp_suspend(struct device *dev)
|
||||
struct analogix_dp_device *dp = dev_get_drvdata(dev);
|
||||
|
||||
clk_disable_unprepare(dp->clock);
|
||||
|
||||
if (dp->plat_data->panel) {
|
||||
if (drm_panel_unprepare(dp->plat_data->panel))
|
||||
DRM_ERROR("failed to turnoff the panel\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(analogix_dp_suspend);
|
||||
@@ -1484,13 +1478,6 @@ int analogix_dp_resume(struct device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (dp->plat_data->panel) {
|
||||
if (drm_panel_prepare(dp->plat_data->panel)) {
|
||||
DRM_ERROR("failed to setup the panel\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(analogix_dp_resume);
|
||||
|
||||
@@ -419,7 +419,13 @@ EXPORT_SYMBOL(drm_invalid_op);
|
||||
*/
|
||||
static int drm_copy_field(char __user *buf, size_t *buf_len, const char *value)
|
||||
{
|
||||
int len;
|
||||
size_t len;
|
||||
|
||||
/* don't attempt to copy a NULL pointer */
|
||||
if (WARN_ONCE(!value, "BUG: the value to copy was not set!")) {
|
||||
*buf_len = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* don't overflow userbuf */
|
||||
len = strlen(value);
|
||||
|
||||
@@ -305,6 +305,7 @@ static int mipi_dsi_remove_device_fn(struct device *dev, void *priv)
|
||||
{
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev);
|
||||
|
||||
mipi_dsi_detach(dsi);
|
||||
mipi_dsi_device_unregister(dsi);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -289,6 +289,11 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi,
|
||||
struct platform_device *pdev = hdmi->pdev;
|
||||
int ret;
|
||||
|
||||
if (priv->num_bridges == ARRAY_SIZE(priv->bridges)) {
|
||||
DRM_DEV_ERROR(dev->dev, "too many bridges\n");
|
||||
return -ENOSPC;
|
||||
}
|
||||
|
||||
hdmi->dev = dev;
|
||||
hdmi->encoder = encoder;
|
||||
|
||||
|
||||
@@ -71,8 +71,9 @@ static int mdp4_lvds_connector_get_modes(struct drm_connector *connector)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mdp4_lvds_connector_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
static enum drm_mode_status
|
||||
mdp4_lvds_connector_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct mdp4_lvds_connector *mdp4_lvds_connector =
|
||||
to_mdp4_lvds_connector(connector);
|
||||
|
||||
@@ -343,7 +343,7 @@ static int magicmouse_raw_event(struct hid_device *hdev,
|
||||
magicmouse_raw_event(hdev, report, data + 2, data[1]);
|
||||
magicmouse_raw_event(hdev, report, data + 2 + data[1],
|
||||
size - 2 - data[1]);
|
||||
break;
|
||||
return 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -260,6 +260,8 @@ int roccat_report_event(int minor, u8 const *data)
|
||||
if (!new_value)
|
||||
return -ENOMEM;
|
||||
|
||||
mutex_lock(&device->cbuf_lock);
|
||||
|
||||
report = &device->cbuf[device->cbuf_end];
|
||||
|
||||
/* passing NULL is safe */
|
||||
@@ -279,6 +281,8 @@ int roccat_report_event(int minor, u8 const *data)
|
||||
reader->cbuf_start = (reader->cbuf_start + 1) % ROCCAT_CBUF_SIZE;
|
||||
}
|
||||
|
||||
mutex_unlock(&device->cbuf_lock);
|
||||
|
||||
wake_up_interruptible(&device->wait);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -562,6 +562,7 @@ static int ssi_probe(struct platform_device *pd)
|
||||
if (!childpdev) {
|
||||
err = -ENODEV;
|
||||
dev_err(&pd->dev, "failed to create ssi controller port\n");
|
||||
of_node_put(child);
|
||||
goto out3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,10 +252,10 @@ static int ssi_start_dma(struct hsi_msg *msg, int lch)
|
||||
if (msg->ttype == HSI_MSG_READ) {
|
||||
err = dma_map_sg(&ssi->device, msg->sgt.sgl, msg->sgt.nents,
|
||||
DMA_FROM_DEVICE);
|
||||
if (err < 0) {
|
||||
if (!err) {
|
||||
dev_dbg(&ssi->device, "DMA map SG failed !\n");
|
||||
pm_runtime_put_autosuspend(omap_port->pdev);
|
||||
return err;
|
||||
return -EIO;
|
||||
}
|
||||
csdp = SSI_DST_BURST_4x32_BIT | SSI_DST_MEMORY_PORT |
|
||||
SSI_SRC_SINGLE_ACCESS0 | SSI_SRC_PERIPHERAL_PORT |
|
||||
@@ -269,10 +269,10 @@ static int ssi_start_dma(struct hsi_msg *msg, int lch)
|
||||
} else {
|
||||
err = dma_map_sg(&ssi->device, msg->sgt.sgl, msg->sgt.nents,
|
||||
DMA_TO_DEVICE);
|
||||
if (err < 0) {
|
||||
if (!err) {
|
||||
dev_dbg(&ssi->device, "DMA map SG failed !\n");
|
||||
pm_runtime_put_autosuspend(omap_port->pdev);
|
||||
return err;
|
||||
return -EIO;
|
||||
}
|
||||
csdp = SSI_SRC_BURST_4x32_BIT | SSI_SRC_MEMORY_PORT |
|
||||
SSI_DST_SINGLE_ACCESS0 | SSI_DST_PERIPHERAL_PORT |
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
#define AT91_SAMA5D2_MR_ANACH BIT(23)
|
||||
/* Tracking Time */
|
||||
#define AT91_SAMA5D2_MR_TRACKTIM(v) ((v) << 24)
|
||||
#define AT91_SAMA5D2_MR_TRACKTIM_MAX 0xff
|
||||
#define AT91_SAMA5D2_MR_TRACKTIM_MAX 0xf
|
||||
/* Transfer Time */
|
||||
#define AT91_SAMA5D2_MR_TRANSFER(v) ((v) << 28)
|
||||
#define AT91_SAMA5D2_MR_TRANSFER_MAX 0x3
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#define AD5593R_MODE_CONF (0 << 4)
|
||||
#define AD5593R_MODE_DAC_WRITE (1 << 4)
|
||||
#define AD5593R_MODE_ADC_READBACK (4 << 4)
|
||||
@@ -21,6 +23,24 @@
|
||||
#define AD5593R_MODE_GPIO_READBACK (6 << 4)
|
||||
#define AD5593R_MODE_REG_READBACK (7 << 4)
|
||||
|
||||
static int ad5593r_read_word(struct i2c_client *i2c, u8 reg, u16 *value)
|
||||
{
|
||||
int ret;
|
||||
u8 buf[2];
|
||||
|
||||
ret = i2c_smbus_write_byte(i2c, reg);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = i2c_master_recv(i2c, buf, sizeof(buf));
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
*value = get_unaligned_be16(buf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ad5593r_write_dac(struct ad5592r_state *st, unsigned chan, u16 value)
|
||||
{
|
||||
struct i2c_client *i2c = to_i2c_client(st->dev);
|
||||
@@ -39,13 +59,7 @@ static int ad5593r_read_adc(struct ad5592r_state *st, unsigned chan, u16 *value)
|
||||
if (val < 0)
|
||||
return (int) val;
|
||||
|
||||
val = i2c_smbus_read_word_swapped(i2c, AD5593R_MODE_ADC_READBACK);
|
||||
if (val < 0)
|
||||
return (int) val;
|
||||
|
||||
*value = (u16) val;
|
||||
|
||||
return 0;
|
||||
return ad5593r_read_word(i2c, AD5593R_MODE_ADC_READBACK, value);
|
||||
}
|
||||
|
||||
static int ad5593r_reg_write(struct ad5592r_state *st, u8 reg, u16 value)
|
||||
@@ -59,25 +73,19 @@ static int ad5593r_reg_write(struct ad5592r_state *st, u8 reg, u16 value)
|
||||
static int ad5593r_reg_read(struct ad5592r_state *st, u8 reg, u16 *value)
|
||||
{
|
||||
struct i2c_client *i2c = to_i2c_client(st->dev);
|
||||
s32 val;
|
||||
|
||||
val = i2c_smbus_read_word_swapped(i2c, AD5593R_MODE_REG_READBACK | reg);
|
||||
if (val < 0)
|
||||
return (int) val;
|
||||
|
||||
*value = (u16) val;
|
||||
|
||||
return 0;
|
||||
return ad5593r_read_word(i2c, AD5593R_MODE_REG_READBACK | reg, value);
|
||||
}
|
||||
|
||||
static int ad5593r_gpio_read(struct ad5592r_state *st, u8 *value)
|
||||
{
|
||||
struct i2c_client *i2c = to_i2c_client(st->dev);
|
||||
s32 val;
|
||||
u16 val;
|
||||
int ret;
|
||||
|
||||
val = i2c_smbus_read_word_swapped(i2c, AD5593R_MODE_GPIO_READBACK);
|
||||
if (val < 0)
|
||||
return (int) val;
|
||||
ret = ad5593r_read_word(i2c, AD5593R_MODE_GPIO_READBACK, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
*value = (u8) val;
|
||||
|
||||
|
||||
@@ -139,9 +139,10 @@ static int __of_iio_channel_get(struct iio_channel *channel,
|
||||
|
||||
idev = bus_find_device(&iio_bus_type, NULL, iiospec.np,
|
||||
iio_dev_node_match);
|
||||
of_node_put(iiospec.np);
|
||||
if (idev == NULL)
|
||||
if (idev == NULL) {
|
||||
of_node_put(iiospec.np);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
indio_dev = dev_to_iio_dev(idev);
|
||||
channel->indio_dev = indio_dev;
|
||||
@@ -149,6 +150,7 @@ static int __of_iio_channel_get(struct iio_channel *channel,
|
||||
index = indio_dev->info->of_xlate(indio_dev, &iiospec);
|
||||
else
|
||||
index = __of_iio_simple_xlate(indio_dev, &iiospec);
|
||||
of_node_put(iiospec.np);
|
||||
if (index < 0)
|
||||
goto err_put;
|
||||
channel->channel = &indio_dev->channels[index];
|
||||
|
||||
@@ -825,7 +825,9 @@ void rxe_qp_destroy(struct rxe_qp *qp)
|
||||
rxe_cleanup_task(&qp->comp.task);
|
||||
|
||||
/* flush out any receive wr's or pending requests */
|
||||
__rxe_do_task(&qp->req.task);
|
||||
if (qp->req.task.func)
|
||||
__rxe_do_task(&qp->req.task);
|
||||
|
||||
if (qp->sq.queue) {
|
||||
__rxe_do_task(&qp->comp.task);
|
||||
__rxe_do_task(&qp->req.task);
|
||||
@@ -862,6 +864,8 @@ void rxe_qp_cleanup(void *arg)
|
||||
|
||||
free_rd_atomic_resources(qp);
|
||||
|
||||
kernel_sock_shutdown(qp->sk, SHUT_RDWR);
|
||||
sock_release(qp->sk);
|
||||
if (qp->sk) {
|
||||
kernel_sock_shutdown(qp->sk, SHUT_RDWR);
|
||||
sock_release(qp->sk);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,6 +129,8 @@ static const struct xpad_device {
|
||||
u8 xtype;
|
||||
} xpad_device[] = {
|
||||
{ 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 },
|
||||
{ 0x03eb, 0xff01, "Wooting One (Legacy)", 0, XTYPE_XBOX360 },
|
||||
{ 0x03eb, 0xff02, "Wooting Two (Legacy)", 0, XTYPE_XBOX360 },
|
||||
{ 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX },
|
||||
{ 0x044f, 0x0f03, "Thrustmaster Wheel", 0, XTYPE_XBOX },
|
||||
{ 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
|
||||
@@ -259,6 +261,7 @@ static const struct xpad_device {
|
||||
{ 0x0f0d, 0x0063, "Hori Real Arcade Pro Hayabusa (USA) Xbox One", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
|
||||
{ 0x0f0d, 0x0067, "HORIPAD ONE", 0, XTYPE_XBOXONE },
|
||||
{ 0x0f0d, 0x0078, "Hori Real Arcade Pro V Kai Xbox One", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
|
||||
{ 0x0f0d, 0x00c5, "Hori Fighting Commander ONE", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
|
||||
{ 0x0f30, 0x010b, "Philips Recoil", 0, XTYPE_XBOX },
|
||||
{ 0x0f30, 0x0202, "Joytech Advanced Controller", 0, XTYPE_XBOX },
|
||||
{ 0x0f30, 0x8888, "BigBen XBMiniPad Controller", 0, XTYPE_XBOX },
|
||||
@@ -275,6 +278,7 @@ static const struct xpad_device {
|
||||
{ 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
|
||||
{ 0x1430, 0xf801, "RedOctane Controller", 0, XTYPE_XBOX360 },
|
||||
{ 0x146b, 0x0601, "BigBen Interactive XBOX 360 Controller", 0, XTYPE_XBOX360 },
|
||||
{ 0x146b, 0x0604, "Bigben Interactive DAIJA Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
|
||||
{ 0x1532, 0x0037, "Razer Sabertooth", 0, XTYPE_XBOX360 },
|
||||
{ 0x1532, 0x0a00, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
|
||||
{ 0x1532, 0x0a03, "Razer Wildcat", 0, XTYPE_XBOXONE },
|
||||
@@ -339,6 +343,7 @@ static const struct xpad_device {
|
||||
{ 0x24c6, 0x5502, "Hori Fighting Stick VX Alt", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
|
||||
{ 0x24c6, 0x5503, "Hori Fighting Edge", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
|
||||
{ 0x24c6, 0x5506, "Hori SOULCALIBUR V Stick", 0, XTYPE_XBOX360 },
|
||||
{ 0x24c6, 0x5510, "Hori Fighting Commander ONE (Xbox 360/PC Mode)", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
|
||||
{ 0x24c6, 0x550d, "Hori GEM Xbox controller", 0, XTYPE_XBOX360 },
|
||||
{ 0x24c6, 0x550e, "Hori Real Arcade Pro V Kai 360", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
|
||||
{ 0x24c6, 0x551a, "PowerA FUSION Pro Controller", 0, XTYPE_XBOXONE },
|
||||
@@ -348,6 +353,14 @@ static const struct xpad_device {
|
||||
{ 0x24c6, 0x5b03, "Thrustmaster Ferrari 458 Racing Wheel", 0, XTYPE_XBOX360 },
|
||||
{ 0x24c6, 0x5d04, "Razer Sabertooth", 0, XTYPE_XBOX360 },
|
||||
{ 0x24c6, 0xfafe, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
|
||||
{ 0x2563, 0x058d, "OneXPlayer Gamepad", 0, XTYPE_XBOX360 },
|
||||
{ 0x2dc8, 0x2000, "8BitDo Pro 2 Wired Controller fox Xbox", 0, XTYPE_XBOXONE },
|
||||
{ 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 },
|
||||
{ 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 },
|
||||
{ 0x31e3, 0x1210, "Wooting Lekker", 0, XTYPE_XBOX360 },
|
||||
{ 0x31e3, 0x1220, "Wooting Two HE", 0, XTYPE_XBOX360 },
|
||||
{ 0x31e3, 0x1300, "Wooting 60HE (AVR)", 0, XTYPE_XBOX360 },
|
||||
{ 0x31e3, 0x1310, "Wooting 60HE (ARM)", 0, XTYPE_XBOX360 },
|
||||
{ 0x3285, 0x0607, "Nacon GC-100", 0, XTYPE_XBOX360 },
|
||||
{ 0x3767, 0x0101, "Fanatec Speedster 3 Forceshock Wheel", 0, XTYPE_XBOX },
|
||||
{ 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX },
|
||||
@@ -433,6 +446,7 @@ static const signed short xpad_abs_triggers[] = {
|
||||
static const struct usb_device_id xpad_table[] = {
|
||||
{ USB_INTERFACE_INFO('X', 'B', 0) }, /* X-Box USB-IF not approved class */
|
||||
XPAD_XBOX360_VENDOR(0x0079), /* GPD Win 2 Controller */
|
||||
XPAD_XBOX360_VENDOR(0x03eb), /* Wooting Keyboards (Legacy) */
|
||||
XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x045e), /* Microsoft X-Box One controllers */
|
||||
@@ -443,6 +457,7 @@ static const struct usb_device_id xpad_table[] = {
|
||||
{ USB_DEVICE(0x0738, 0x4540) }, /* Mad Catz Beat Pad */
|
||||
XPAD_XBOXONE_VENDOR(0x0738), /* Mad Catz FightStick TE 2 */
|
||||
XPAD_XBOX360_VENDOR(0x07ff), /* Mad Catz GamePad */
|
||||
XPAD_XBOX360_VENDOR(0x0c12), /* Zeroplus X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x0e6f), /* 0x0e6f X-Box 360 controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x0e6f), /* 0x0e6f X-Box One controllers */
|
||||
XPAD_XBOX360_VENDOR(0x0f0d), /* Hori Controllers */
|
||||
@@ -463,8 +478,12 @@ static const struct usb_device_id xpad_table[] = {
|
||||
XPAD_XBOXONE_VENDOR(0x20d6), /* PowerA Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x24c6), /* PowerA Controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x24c6), /* PowerA Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x2563), /* OneXPlayer Gamepad */
|
||||
XPAD_XBOX360_VENDOR(0x260d), /* Dareu H101 */
|
||||
XPAD_XBOXONE_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller for Xbox */
|
||||
XPAD_XBOXONE_VENDOR(0x2e24), /* Hyperkin Duke X-Box One pad */
|
||||
XPAD_XBOX360_VENDOR(0x2f24), /* GameSir Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x31e3), /* Wooting Keyboards */
|
||||
XPAD_XBOX360_VENDOR(0x3285), /* Nacon GC-100 */
|
||||
{ }
|
||||
};
|
||||
@@ -1981,7 +2000,6 @@ static struct usb_driver xpad_driver = {
|
||||
.disconnect = xpad_disconnect,
|
||||
.suspend = xpad_suspend,
|
||||
.resume = xpad_resume,
|
||||
.reset_resume = xpad_resume,
|
||||
.id_table = xpad_table,
|
||||
};
|
||||
|
||||
|
||||
@@ -1416,7 +1416,7 @@ static int mip4_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
||||
"ce", GPIOD_OUT_LOW);
|
||||
if (IS_ERR(ts->gpio_ce)) {
|
||||
error = PTR_ERR(ts->gpio_ce);
|
||||
if (error != EPROBE_DEFER)
|
||||
if (error != -EPROBE_DEFER)
|
||||
dev_err(&client->dev,
|
||||
"Failed to get gpio: %d\n", error);
|
||||
return error;
|
||||
|
||||
@@ -35,12 +35,12 @@ static inline bool is_omap_iommu_detached(struct omap_iommu *obj)
|
||||
ssize_t bytes; \
|
||||
const char *str = "%20s: %08x\n"; \
|
||||
const int maxcol = 32; \
|
||||
bytes = snprintf(p, maxcol, str, __stringify(name), \
|
||||
if (len < maxcol) \
|
||||
goto out; \
|
||||
bytes = scnprintf(p, maxcol, str, __stringify(name), \
|
||||
iommu_read_reg(obj, MMU_##name)); \
|
||||
p += bytes; \
|
||||
len -= bytes; \
|
||||
if (len < maxcol) \
|
||||
goto out; \
|
||||
} while (0)
|
||||
|
||||
static ssize_t
|
||||
|
||||
@@ -58,6 +58,7 @@ struct l1oip {
|
||||
int bundle; /* bundle channels in one frm */
|
||||
int codec; /* codec to use for transmis. */
|
||||
int limit; /* limit number of bchannels */
|
||||
bool shutdown; /* if card is released */
|
||||
|
||||
/* timer */
|
||||
struct timer_list keep_tl;
|
||||
|
||||
@@ -287,7 +287,7 @@ l1oip_socket_send(struct l1oip *hc, u8 localcodec, u8 channel, u32 chanmask,
|
||||
p = frame;
|
||||
|
||||
/* restart timer */
|
||||
if (time_before(hc->keep_tl.expires, jiffies + 5 * HZ))
|
||||
if (time_before(hc->keep_tl.expires, jiffies + 5 * HZ) && !hc->shutdown)
|
||||
mod_timer(&hc->keep_tl, jiffies + L1OIP_KEEPALIVE * HZ);
|
||||
else
|
||||
hc->keep_tl.expires = jiffies + L1OIP_KEEPALIVE * HZ;
|
||||
@@ -619,7 +619,9 @@ multiframe:
|
||||
goto multiframe;
|
||||
|
||||
/* restart timer */
|
||||
if (time_before(hc->timeout_tl.expires, jiffies + 5 * HZ) || !hc->timeout_on) {
|
||||
if ((time_before(hc->timeout_tl.expires, jiffies + 5 * HZ) ||
|
||||
!hc->timeout_on) &&
|
||||
!hc->shutdown) {
|
||||
hc->timeout_on = 1;
|
||||
mod_timer(&hc->timeout_tl, jiffies + L1OIP_TIMEOUT * HZ);
|
||||
} else /* only adjust timer */
|
||||
@@ -1246,11 +1248,10 @@ release_card(struct l1oip *hc)
|
||||
{
|
||||
int ch;
|
||||
|
||||
if (timer_pending(&hc->keep_tl))
|
||||
del_timer(&hc->keep_tl);
|
||||
hc->shutdown = true;
|
||||
|
||||
if (timer_pending(&hc->timeout_tl))
|
||||
del_timer(&hc->timeout_tl);
|
||||
del_timer_sync(&hc->keep_tl);
|
||||
del_timer_sync(&hc->timeout_tl);
|
||||
|
||||
cancel_work_sync(&hc->workq);
|
||||
|
||||
|
||||
@@ -140,11 +140,10 @@ static int buffer_prepare(struct vb2_buffer *vb)
|
||||
return -EINVAL;
|
||||
vb2_set_plane_payload(vb, 0, size);
|
||||
|
||||
cx88_risc_buffer(dev->pci, &buf->risc, sgt->sgl,
|
||||
0, VBI_LINE_LENGTH * lines,
|
||||
VBI_LINE_LENGTH, 0,
|
||||
lines);
|
||||
return 0;
|
||||
return cx88_risc_buffer(dev->pci, &buf->risc, sgt->sgl,
|
||||
0, VBI_LINE_LENGTH * lines,
|
||||
VBI_LINE_LENGTH, 0,
|
||||
lines);
|
||||
}
|
||||
|
||||
static void buffer_finish(struct vb2_buffer *vb)
|
||||
|
||||
@@ -443,6 +443,7 @@ static int queue_setup(struct vb2_queue *q,
|
||||
|
||||
static int buffer_prepare(struct vb2_buffer *vb)
|
||||
{
|
||||
int ret;
|
||||
struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
|
||||
struct cx8800_dev *dev = vb->vb2_queue->drv_priv;
|
||||
struct cx88_core *core = dev->core;
|
||||
@@ -457,42 +458,42 @@ static int buffer_prepare(struct vb2_buffer *vb)
|
||||
|
||||
switch (core->field) {
|
||||
case V4L2_FIELD_TOP:
|
||||
cx88_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl, 0, UNSET,
|
||||
buf->bpl, 0, core->height);
|
||||
ret = cx88_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl, 0, UNSET,
|
||||
buf->bpl, 0, core->height);
|
||||
break;
|
||||
case V4L2_FIELD_BOTTOM:
|
||||
cx88_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl, UNSET, 0,
|
||||
buf->bpl, 0, core->height);
|
||||
ret = cx88_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl, UNSET, 0,
|
||||
buf->bpl, 0, core->height);
|
||||
break;
|
||||
case V4L2_FIELD_SEQ_TB:
|
||||
cx88_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl,
|
||||
0, buf->bpl * (core->height >> 1),
|
||||
buf->bpl, 0,
|
||||
core->height >> 1);
|
||||
ret = cx88_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl,
|
||||
0, buf->bpl * (core->height >> 1),
|
||||
buf->bpl, 0,
|
||||
core->height >> 1);
|
||||
break;
|
||||
case V4L2_FIELD_SEQ_BT:
|
||||
cx88_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl,
|
||||
buf->bpl * (core->height >> 1), 0,
|
||||
buf->bpl, 0,
|
||||
core->height >> 1);
|
||||
ret = cx88_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl,
|
||||
buf->bpl * (core->height >> 1), 0,
|
||||
buf->bpl, 0,
|
||||
core->height >> 1);
|
||||
break;
|
||||
case V4L2_FIELD_INTERLACED:
|
||||
default:
|
||||
cx88_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl, 0, buf->bpl,
|
||||
buf->bpl, buf->bpl,
|
||||
core->height >> 1);
|
||||
ret = cx88_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl, 0, buf->bpl,
|
||||
buf->bpl, buf->bpl,
|
||||
core->height >> 1);
|
||||
break;
|
||||
}
|
||||
dprintk(2,"[%p/%d] buffer_prepare - %dx%d %dbpp \"%s\" - dma=0x%08lx\n",
|
||||
buf, buf->vb.vb2_buf.index,
|
||||
core->width, core->height, dev->fmt->depth, dev->fmt->name,
|
||||
(unsigned long)buf->risc.dma);
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void buffer_finish(struct vb2_buffer *vb)
|
||||
|
||||
@@ -217,6 +217,7 @@ static int fimc_is_register_subdevs(struct fimc_is *is)
|
||||
|
||||
if (ret < 0 || index >= FIMC_IS_SENSORS_NUM) {
|
||||
of_node_put(child);
|
||||
of_node_put(i2c_bus);
|
||||
return ret;
|
||||
}
|
||||
index++;
|
||||
|
||||
@@ -302,6 +302,28 @@ static int vidioc_g_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *a
|
||||
return vivid_vid_out_g_fbuf(file, fh, a);
|
||||
}
|
||||
|
||||
/*
|
||||
* Only support the framebuffer of one of the vivid instances.
|
||||
* Anything else is rejected.
|
||||
*/
|
||||
bool vivid_validate_fb(const struct v4l2_framebuffer *a)
|
||||
{
|
||||
struct vivid_dev *dev;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_devs; i++) {
|
||||
dev = vivid_devs[i];
|
||||
if (!dev || !dev->video_pbase)
|
||||
continue;
|
||||
if ((unsigned long)a->base == dev->video_pbase &&
|
||||
a->fmt.width <= dev->display_width &&
|
||||
a->fmt.height <= dev->display_height &&
|
||||
a->fmt.bytesperline <= dev->display_byte_stride)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static int vidioc_s_fbuf(struct file *file, void *fh, const struct v4l2_framebuffer *a)
|
||||
{
|
||||
struct video_device *vdev = video_devdata(file);
|
||||
|
||||
@@ -561,4 +561,6 @@ static inline bool vivid_is_hdmi_out(const struct vivid_dev *dev)
|
||||
return dev->output_type[dev->output] == HDMI;
|
||||
}
|
||||
|
||||
bool vivid_validate_fb(const struct v4l2_framebuffer *a);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -455,6 +455,12 @@ void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls)
|
||||
tpg_reset_source(&dev->tpg, dev->src_rect.width, dev->src_rect.height, dev->field_cap);
|
||||
dev->crop_cap = dev->src_rect;
|
||||
dev->crop_bounds_cap = dev->src_rect;
|
||||
if (dev->bitmap_cap &&
|
||||
(dev->compose_cap.width != dev->crop_cap.width ||
|
||||
dev->compose_cap.height != dev->crop_cap.height)) {
|
||||
vfree(dev->bitmap_cap);
|
||||
dev->bitmap_cap = NULL;
|
||||
}
|
||||
dev->compose_cap = dev->crop_cap;
|
||||
if (V4L2_FIELD_HAS_T_OR_B(dev->field_cap))
|
||||
dev->compose_cap.height /= 2;
|
||||
@@ -863,6 +869,8 @@ int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection
|
||||
struct vivid_dev *dev = video_drvdata(file);
|
||||
struct v4l2_rect *crop = &dev->crop_cap;
|
||||
struct v4l2_rect *compose = &dev->compose_cap;
|
||||
unsigned orig_compose_w = compose->width;
|
||||
unsigned orig_compose_h = compose->height;
|
||||
unsigned factor = V4L2_FIELD_HAS_T_OR_B(dev->field_cap) ? 2 : 1;
|
||||
int ret;
|
||||
|
||||
@@ -979,17 +987,17 @@ int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection
|
||||
s->r.height /= factor;
|
||||
}
|
||||
v4l2_rect_map_inside(&s->r, &dev->fmt_cap_rect);
|
||||
if (dev->bitmap_cap && (compose->width != s->r.width ||
|
||||
compose->height != s->r.height)) {
|
||||
vfree(dev->bitmap_cap);
|
||||
dev->bitmap_cap = NULL;
|
||||
}
|
||||
*compose = s->r;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (dev->bitmap_cap && (compose->width != orig_compose_w ||
|
||||
compose->height != orig_compose_h)) {
|
||||
vfree(dev->bitmap_cap);
|
||||
dev->bitmap_cap = NULL;
|
||||
}
|
||||
tpg_s_crop_compose(&dev->tpg, crop, compose);
|
||||
return 0;
|
||||
}
|
||||
@@ -1232,7 +1240,14 @@ int vivid_vid_cap_s_fbuf(struct file *file, void *fh,
|
||||
return -EINVAL;
|
||||
if (a->fmt.bytesperline < (a->fmt.width * fmt->bit_depth[0]) / 8)
|
||||
return -EINVAL;
|
||||
if (a->fmt.height * a->fmt.bytesperline < a->fmt.sizeimage)
|
||||
if (a->fmt.bytesperline > a->fmt.sizeimage / a->fmt.height)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* Only support the framebuffer of one of the vivid instances.
|
||||
* Anything else is rejected.
|
||||
*/
|
||||
if (!vivid_validate_fb(a))
|
||||
return -EINVAL;
|
||||
|
||||
dev->fb_vbase_cap = phys_to_virt((unsigned long)a->base);
|
||||
|
||||
@@ -462,7 +462,7 @@ static int xvip_graph_dma_init(struct xvip_composite_device *xdev)
|
||||
{
|
||||
struct device_node *ports;
|
||||
struct device_node *port;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
ports = of_get_child_by_name(xdev->dev->of_node, "ports");
|
||||
if (ports == NULL) {
|
||||
@@ -472,13 +472,14 @@ static int xvip_graph_dma_init(struct xvip_composite_device *xdev)
|
||||
|
||||
for_each_child_of_node(ports, port) {
|
||||
ret = xvip_graph_dma_init_one(xdev, port);
|
||||
if (ret < 0) {
|
||||
if (ret) {
|
||||
of_node_put(port);
|
||||
return ret;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
of_node_put(ports);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void xvip_graph_cleanup(struct xvip_composite_device *xdev)
|
||||
|
||||
@@ -171,6 +171,20 @@ bool v4l2_valid_dv_timings(const struct v4l2_dv_timings *t,
|
||||
(bt->interlaced && !(caps & V4L2_DV_BT_CAP_INTERLACED)) ||
|
||||
(!bt->interlaced && !(caps & V4L2_DV_BT_CAP_PROGRESSIVE)))
|
||||
return false;
|
||||
|
||||
/* sanity checks for the blanking timings */
|
||||
if (!bt->interlaced &&
|
||||
(bt->il_vbackporch || bt->il_vsync || bt->il_vfrontporch))
|
||||
return false;
|
||||
if (bt->hfrontporch > 2 * bt->width ||
|
||||
bt->hsync > 1024 || bt->hbackporch > 1024)
|
||||
return false;
|
||||
if (bt->vfrontporch > 4096 ||
|
||||
bt->vsync > 128 || bt->vbackporch > 4096)
|
||||
return false;
|
||||
if (bt->interlaced && (bt->il_vfrontporch > 4096 ||
|
||||
bt->il_vsync > 128 || bt->il_vbackporch > 4096))
|
||||
return false;
|
||||
return fnc == NULL || fnc(t, fnc_handle);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(v4l2_valid_dv_timings);
|
||||
|
||||
@@ -135,6 +135,7 @@ const struct lpddr2_timings *of_get_ddr_timings(struct device_node *np_ddr,
|
||||
for_each_child_of_node(np_ddr, np_tim) {
|
||||
if (of_device_is_compatible(np_tim, tim_compat)) {
|
||||
if (of_do_get_timings(np_tim, &timings[i])) {
|
||||
of_node_put(np_tim);
|
||||
devm_kfree(dev, timings);
|
||||
goto default_timings;
|
||||
}
|
||||
|
||||
@@ -118,6 +118,7 @@ static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c,
|
||||
return 0;
|
||||
|
||||
err_del_irq_chip:
|
||||
pwm_remove_table(crc_pwm_lookup, ARRAY_SIZE(crc_pwm_lookup));
|
||||
regmap_del_irq_chip(pmic->irq, pmic->irq_chip_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -179,6 +179,7 @@ int lp8788_irq_init(struct lp8788 *lp, int irq)
|
||||
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
|
||||
"lp8788-irq", irqd);
|
||||
if (ret) {
|
||||
irq_domain_remove(lp->irqdm);
|
||||
dev_err(lp->dev, "failed to create a thread for IRQ_N\n");
|
||||
return ret;
|
||||
}
|
||||
@@ -192,4 +193,6 @@ void lp8788_irq_exit(struct lp8788 *lp)
|
||||
{
|
||||
if (lp->irq)
|
||||
free_irq(lp->irq, lp->irqdm);
|
||||
if (lp->irqdm)
|
||||
irq_domain_remove(lp->irqdm);
|
||||
}
|
||||
|
||||
@@ -199,8 +199,16 @@ static int lp8788_probe(struct i2c_client *cl, const struct i2c_device_id *id)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return mfd_add_devices(lp->dev, -1, lp8788_devs,
|
||||
ARRAY_SIZE(lp8788_devs), NULL, 0, NULL);
|
||||
ret = mfd_add_devices(lp->dev, -1, lp8788_devs,
|
||||
ARRAY_SIZE(lp8788_devs), NULL, 0, NULL);
|
||||
if (ret)
|
||||
goto err_exit_irq;
|
||||
|
||||
return 0;
|
||||
|
||||
err_exit_irq:
|
||||
lp8788_irq_exit(lp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int lp8788_remove(struct i2c_client *cl)
|
||||
|
||||
@@ -1736,7 +1736,12 @@ static struct platform_driver sm501_plat_driver = {
|
||||
|
||||
static int __init sm501_base_init(void)
|
||||
{
|
||||
platform_driver_register(&sm501_plat_driver);
|
||||
int ret;
|
||||
|
||||
ret = platform_driver_register(&sm501_plat_driver);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return pci_register_driver(&sm501_pci_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -274,7 +274,8 @@ static void sdio_release_func(struct device *dev)
|
||||
*/
|
||||
if (!func->card->host->embedded_sdio_data.funcs)
|
||||
#endif
|
||||
sdio_free_func_cis(func);
|
||||
if (!(func->card->quirks & MMC_QUIRK_NONSTD_SDIO))
|
||||
sdio_free_func_cis(func);
|
||||
|
||||
kfree(func->info);
|
||||
kfree(func->tmpbuf);
|
||||
|
||||
@@ -1114,8 +1114,9 @@ out5:
|
||||
if (host->platdata && host->platdata->cd_setup &&
|
||||
!(mmc->caps & MMC_CAP_NEEDS_POLL))
|
||||
host->platdata->cd_setup(mmc, 0);
|
||||
out_clk:
|
||||
|
||||
clk_disable_unprepare(host->clk);
|
||||
out_clk:
|
||||
clk_put(host->clk);
|
||||
out_irq:
|
||||
free_irq(host->irq, host);
|
||||
|
||||
@@ -111,8 +111,8 @@
|
||||
#define CLK_DIV_MASK 0x7f
|
||||
|
||||
/* REG_BUS_WIDTH */
|
||||
#define BUS_WIDTH_8 BIT(2)
|
||||
#define BUS_WIDTH_4 BIT(1)
|
||||
#define BUS_WIDTH_4_SUPPORT BIT(3)
|
||||
#define BUS_WIDTH_4 BIT(2)
|
||||
#define BUS_WIDTH_1 BIT(0)
|
||||
|
||||
#define MMC_VDD_360 23
|
||||
@@ -529,9 +529,6 @@ static void moxart_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
||||
case MMC_BUS_WIDTH_4:
|
||||
writel(BUS_WIDTH_4, host->base + REG_BUS_WIDTH);
|
||||
break;
|
||||
case MMC_BUS_WIDTH_8:
|
||||
writel(BUS_WIDTH_8, host->base + REG_BUS_WIDTH);
|
||||
break;
|
||||
default:
|
||||
writel(BUS_WIDTH_1, host->base + REG_BUS_WIDTH);
|
||||
break;
|
||||
@@ -648,16 +645,8 @@ static int moxart_probe(struct platform_device *pdev)
|
||||
dmaengine_slave_config(host->dma_chan_rx, &cfg);
|
||||
}
|
||||
|
||||
switch ((readl(host->base + REG_BUS_WIDTH) >> 3) & 3) {
|
||||
case 1:
|
||||
if (readl(host->base + REG_BUS_WIDTH) & BUS_WIDTH_4_SUPPORT)
|
||||
mmc->caps |= MMC_CAP_4_BIT_DATA;
|
||||
break;
|
||||
case 2:
|
||||
mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
writel(0, host->base + REG_INTERRUPT_MASK);
|
||||
|
||||
|
||||
@@ -336,14 +336,14 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)
|
||||
&mscan_clksrc);
|
||||
if (!priv->can.clock.freq) {
|
||||
dev_err(&ofdev->dev, "couldn't get MSCAN clock properties\n");
|
||||
goto exit_free_mscan;
|
||||
goto exit_put_clock;
|
||||
}
|
||||
|
||||
err = register_mscandev(dev, mscan_clksrc);
|
||||
if (err) {
|
||||
dev_err(&ofdev->dev, "registering %s failed (err=%d)\n",
|
||||
DRV_NAME, err);
|
||||
goto exit_free_mscan;
|
||||
goto exit_put_clock;
|
||||
}
|
||||
|
||||
dev_info(&ofdev->dev, "MSCAN at 0x%p, irq %d, clock %d Hz\n",
|
||||
@@ -351,7 +351,9 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)
|
||||
|
||||
return 0;
|
||||
|
||||
exit_free_mscan:
|
||||
exit_put_clock:
|
||||
if (data->put_clock)
|
||||
data->put_clock(ofdev);
|
||||
free_candev(dev);
|
||||
exit_dispose_irq:
|
||||
irq_dispose_mapping(irq);
|
||||
|
||||
@@ -1079,7 +1079,7 @@ static irqreturn_t rcar_canfd_global_interrupt(int irq, void *dev_id)
|
||||
struct rcar_canfd_global *gpriv = dev_id;
|
||||
struct net_device *ndev;
|
||||
struct rcar_canfd_channel *priv;
|
||||
u32 sts, gerfl;
|
||||
u32 sts, cc, gerfl;
|
||||
u32 ch, ridx;
|
||||
|
||||
/* Global error interrupts still indicate a condition specific
|
||||
@@ -1097,7 +1097,9 @@ static irqreturn_t rcar_canfd_global_interrupt(int irq, void *dev_id)
|
||||
|
||||
/* Handle Rx interrupts */
|
||||
sts = rcar_canfd_read(priv->base, RCANFD_RFSTS(ridx));
|
||||
if (likely(sts & RCANFD_RFSTS_RFIF)) {
|
||||
cc = rcar_canfd_read(priv->base, RCANFD_RFCC(ridx));
|
||||
if (likely(sts & RCANFD_RFSTS_RFIF &&
|
||||
cc & RCANFD_RFCC_RFIE)) {
|
||||
if (napi_schedule_prep(&priv->napi)) {
|
||||
/* Disable Rx FIFO interrupts */
|
||||
rcar_canfd_clear_bit(priv->base,
|
||||
|
||||
@@ -792,6 +792,7 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp,
|
||||
BNX2X_ERR("skb_put is about to fail... pad %d len %d rx_buf_size %d\n",
|
||||
pad, len, fp->rx_buf_size);
|
||||
bnx2x_panic();
|
||||
bnx2x_frag_free(fp, new_data);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -103,7 +103,7 @@ static int do_pd_setup(struct fs_enet_private *fep)
|
||||
return -EINVAL;
|
||||
|
||||
fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0);
|
||||
if (!fep->fcc.fccp)
|
||||
if (!fep->fec.fecp)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -418,8 +418,10 @@ int hnae_ae_register(struct hnae_ae_dev *hdev, struct module *owner)
|
||||
hdev->cls_dev.release = hnae_release;
|
||||
(void)dev_set_name(&hdev->cls_dev, "hnae%d", hdev->id);
|
||||
ret = device_register(&hdev->cls_dev);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
put_device(&hdev->cls_dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
__module_get(THIS_MODULE);
|
||||
|
||||
|
||||
@@ -2937,6 +2937,7 @@ static struct device *ehea_register_port(struct ehea_port *port,
|
||||
ret = of_device_register(&port->ofdev);
|
||||
if (ret) {
|
||||
pr_err("failed to register device. ret=%d\n", ret);
|
||||
put_device(&port->ofdev.dev);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
@@ -2263,10 +2263,17 @@ static int i40e_get_rss_hash_opts(struct i40e_pf *pf, struct ethtool_rxnfc *cmd)
|
||||
|
||||
if (cmd->flow_type == TCP_V4_FLOW ||
|
||||
cmd->flow_type == UDP_V4_FLOW) {
|
||||
if (i_set & I40E_L3_SRC_MASK)
|
||||
cmd->data |= RXH_IP_SRC;
|
||||
if (i_set & I40E_L3_DST_MASK)
|
||||
cmd->data |= RXH_IP_DST;
|
||||
if (hw->mac.type == I40E_MAC_X722) {
|
||||
if (i_set & I40E_X722_L3_SRC_MASK)
|
||||
cmd->data |= RXH_IP_SRC;
|
||||
if (i_set & I40E_X722_L3_DST_MASK)
|
||||
cmd->data |= RXH_IP_DST;
|
||||
} else {
|
||||
if (i_set & I40E_L3_SRC_MASK)
|
||||
cmd->data |= RXH_IP_SRC;
|
||||
if (i_set & I40E_L3_DST_MASK)
|
||||
cmd->data |= RXH_IP_DST;
|
||||
}
|
||||
} else if (cmd->flow_type == TCP_V6_FLOW ||
|
||||
cmd->flow_type == UDP_V6_FLOW) {
|
||||
if (i_set & I40E_L3_V6_SRC_MASK)
|
||||
@@ -2419,12 +2426,15 @@ static int i40e_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
|
||||
|
||||
/**
|
||||
* i40e_get_rss_hash_bits - Read RSS Hash bits from register
|
||||
* @hw: hw structure
|
||||
* @nfc: pointer to user request
|
||||
* @i_setc bits currently set
|
||||
*
|
||||
* Returns value of bits to be set per user request
|
||||
**/
|
||||
static u64 i40e_get_rss_hash_bits(struct ethtool_rxnfc *nfc, u64 i_setc)
|
||||
static u64 i40e_get_rss_hash_bits(struct i40e_hw *hw,
|
||||
struct ethtool_rxnfc *nfc,
|
||||
u64 i_setc)
|
||||
{
|
||||
u64 i_set = i_setc;
|
||||
u64 src_l3 = 0, dst_l3 = 0;
|
||||
@@ -2443,8 +2453,13 @@ static u64 i40e_get_rss_hash_bits(struct ethtool_rxnfc *nfc, u64 i_setc)
|
||||
dst_l3 = I40E_L3_V6_DST_MASK;
|
||||
} else if (nfc->flow_type == TCP_V4_FLOW ||
|
||||
nfc->flow_type == UDP_V4_FLOW) {
|
||||
src_l3 = I40E_L3_SRC_MASK;
|
||||
dst_l3 = I40E_L3_DST_MASK;
|
||||
if (hw->mac.type == I40E_MAC_X722) {
|
||||
src_l3 = I40E_X722_L3_SRC_MASK;
|
||||
dst_l3 = I40E_X722_L3_DST_MASK;
|
||||
} else {
|
||||
src_l3 = I40E_L3_SRC_MASK;
|
||||
dst_l3 = I40E_L3_DST_MASK;
|
||||
}
|
||||
} else {
|
||||
/* Any other flow type are not supported here */
|
||||
return i_set;
|
||||
@@ -2553,7 +2568,7 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
|
||||
flow_pctype)) |
|
||||
((u64)i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(1,
|
||||
flow_pctype)) << 32);
|
||||
i_set = i40e_get_rss_hash_bits(nfc, i_setc);
|
||||
i_set = i40e_get_rss_hash_bits(&pf->hw, nfc, i_setc);
|
||||
i40e_write_rx_ctl(hw, I40E_GLQF_HASH_INSET(0, flow_pctype),
|
||||
(u32)i_set);
|
||||
i40e_write_rx_ctl(hw, I40E_GLQF_HASH_INSET(1, flow_pctype),
|
||||
|
||||
@@ -1542,6 +1542,10 @@ struct i40e_lldp_variables {
|
||||
#define I40E_PFQF_CTL_0_HASHLUTSIZE_512 0x00010000
|
||||
|
||||
/* INPUT SET MASK for RSS, flow director, and flexible payload */
|
||||
#define I40E_X722_L3_SRC_SHIFT 49
|
||||
#define I40E_X722_L3_SRC_MASK (0x3ULL << I40E_X722_L3_SRC_SHIFT)
|
||||
#define I40E_X722_L3_DST_SHIFT 41
|
||||
#define I40E_X722_L3_DST_MASK (0x3ULL << I40E_X722_L3_DST_SHIFT)
|
||||
#define I40E_L3_SRC_SHIFT 47
|
||||
#define I40E_L3_SRC_MASK (0x3ULL << I40E_L3_SRC_SHIFT)
|
||||
#define I40E_L3_V6_SRC_SHIFT 43
|
||||
|
||||
@@ -488,7 +488,6 @@ ltq_etop_tx(struct sk_buff *skb, struct net_device *dev)
|
||||
len = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len;
|
||||
|
||||
if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) || ch->skb[ch->dma.desc]) {
|
||||
dev_kfree_skb_any(skb);
|
||||
netdev_err(dev, "tx ring full\n");
|
||||
netif_tx_stop_queue(txq);
|
||||
return NETDEV_TX_BUSY;
|
||||
|
||||
@@ -6932,7 +6932,7 @@ static int pcidev_init(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
char banner[sizeof(version)];
|
||||
struct ksz_switch *sw = NULL;
|
||||
|
||||
result = pci_enable_device(pdev);
|
||||
result = pcim_enable_device(pdev);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
|
||||
@@ -966,6 +966,7 @@ static const struct usb_device_id products[] = {
|
||||
{QMI_FIXED_INTF(0x413c, 0x81b3, 8)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */
|
||||
{QMI_FIXED_INTF(0x413c, 0x81b6, 8)}, /* Dell Wireless 5811e */
|
||||
{QMI_FIXED_INTF(0x413c, 0x81b6, 10)}, /* Dell Wireless 5811e */
|
||||
{QMI_FIXED_INTF(0x413c, 0x81c2, 8)}, /* Dell Wireless 5811e */
|
||||
{QMI_FIXED_INTF(0x413c, 0x81cc, 8)}, /* Dell Wireless 5816e */
|
||||
{QMI_FIXED_INTF(0x413c, 0x81d7, 0)}, /* Dell Wireless 5821e */
|
||||
{QMI_FIXED_INTF(0x413c, 0x81d7, 1)}, /* Dell Wireless 5821e preproduction config */
|
||||
|
||||
@@ -1384,7 +1384,9 @@ static void intr_callback(struct urb *urb)
|
||||
"Stop submitting intr, status %d\n", status);
|
||||
return;
|
||||
case -EOVERFLOW:
|
||||
netif_info(tp, intr, tp->netdev, "intr status -EOVERFLOW\n");
|
||||
if (net_ratelimit())
|
||||
netif_info(tp, intr, tp->netdev,
|
||||
"intr status -EOVERFLOW\n");
|
||||
goto resubmit;
|
||||
/* -EPIPE: should clear the halt */
|
||||
default:
|
||||
|
||||
@@ -1559,6 +1559,7 @@ void usbnet_disconnect (struct usb_interface *intf)
|
||||
struct usbnet *dev;
|
||||
struct usb_device *xdev;
|
||||
struct net_device *net;
|
||||
struct urb *urb;
|
||||
|
||||
dev = usb_get_intfdata(intf);
|
||||
usb_set_intfdata(intf, NULL);
|
||||
@@ -1575,7 +1576,11 @@ void usbnet_disconnect (struct usb_interface *intf)
|
||||
net = dev->net;
|
||||
unregister_netdev (net);
|
||||
|
||||
usb_scuttle_anchored_urbs(&dev->deferred);
|
||||
while ((urb = usb_get_from_anchor(&dev->deferred))) {
|
||||
dev_kfree_skb(urb->context);
|
||||
kfree(urb->sg);
|
||||
usb_free_urb(urb);
|
||||
}
|
||||
|
||||
if (dev->driver_info->unbind)
|
||||
dev->driver_info->unbind (dev, intf);
|
||||
|
||||
@@ -798,11 +798,36 @@ static int ath10k_peer_delete(struct ath10k *ar, u32 vdev_id, const u8 *addr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ath10k_peer_map_cleanup(struct ath10k *ar, struct ath10k_peer *peer)
|
||||
{
|
||||
int peer_id, i;
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
for_each_set_bit(peer_id, peer->peer_ids,
|
||||
ATH10K_MAX_NUM_PEER_IDS) {
|
||||
ar->peer_map[peer_id] = NULL;
|
||||
}
|
||||
|
||||
/* Double check that peer is properly un-referenced from
|
||||
* the peer_map
|
||||
*/
|
||||
for (i = 0; i < ARRAY_SIZE(ar->peer_map); i++) {
|
||||
if (ar->peer_map[i] == peer) {
|
||||
ath10k_warn(ar, "removing stale peer_map entry for %pM (ptr %pK idx %d)\n",
|
||||
peer->addr, peer, i);
|
||||
ar->peer_map[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
list_del(&peer->list);
|
||||
kfree(peer);
|
||||
ar->num_peers--;
|
||||
}
|
||||
|
||||
static void ath10k_peer_cleanup(struct ath10k *ar, u32 vdev_id)
|
||||
{
|
||||
struct ath10k_peer *peer, *tmp;
|
||||
int peer_id;
|
||||
int i;
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
@@ -814,25 +839,7 @@ static void ath10k_peer_cleanup(struct ath10k *ar, u32 vdev_id)
|
||||
ath10k_warn(ar, "removing stale peer %pM from vdev_id %d\n",
|
||||
peer->addr, vdev_id);
|
||||
|
||||
for_each_set_bit(peer_id, peer->peer_ids,
|
||||
ATH10K_MAX_NUM_PEER_IDS) {
|
||||
ar->peer_map[peer_id] = NULL;
|
||||
}
|
||||
|
||||
/* Double check that peer is properly un-referenced from
|
||||
* the peer_map
|
||||
*/
|
||||
for (i = 0; i < ARRAY_SIZE(ar->peer_map); i++) {
|
||||
if (ar->peer_map[i] == peer) {
|
||||
ath10k_warn(ar, "removing stale peer_map entry for %pM (ptr %pK idx %d)\n",
|
||||
peer->addr, peer, i);
|
||||
ar->peer_map[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
list_del(&peer->list);
|
||||
kfree(peer);
|
||||
ar->num_peers--;
|
||||
ath10k_peer_map_cleanup(ar, peer);
|
||||
}
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
}
|
||||
@@ -6095,10 +6102,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
|
||||
/* Clean up the peer object as well since we
|
||||
* must have failed to do this above.
|
||||
*/
|
||||
list_del(&peer->list);
|
||||
ar->peer_map[i] = NULL;
|
||||
kfree(peer);
|
||||
ar->num_peers--;
|
||||
ath10k_peer_map_cleanup(ar, peer);
|
||||
}
|
||||
}
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
|
||||
@@ -3011,6 +3011,8 @@ static int hwsim_cloned_frame_received_nl(struct sk_buff *skb_2,
|
||||
|
||||
rx_status.band = data2->channel->band;
|
||||
rx_status.rate_idx = nla_get_u32(info->attrs[HWSIM_ATTR_RX_RATE]);
|
||||
if (rx_status.rate_idx >= data2->hw->wiphy->bands[rx_status.band]->n_bitrates)
|
||||
goto out;
|
||||
rx_status.signal = nla_get_u32(info->attrs[HWSIM_ATTR_SIGNAL]);
|
||||
|
||||
memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user