Merge 5.10.214 into android12-5.10-lts
Changes in 5.10.214 io_uring/unix: drop usage of io_uring socket io_uring: drop any code related to SCM_RIGHTS rcu-tasks: Provide rcu_trace_implies_rcu_gp() bpf: Defer the free of inner map when necessary selftests: tls: use exact comparison in recv_partial ASoC: rt5645: Make LattePanda board DMI match more precise x86/xen: Add some null pointer checking to smp.c MIPS: Clear Cause.BD in instruction_pointer_set HID: multitouch: Add required quirk for Synaptics 0xcddc device gen_compile_commands: fix invalid escape sequence warning RDMA/mlx5: Fix fortify source warning while accessing Eth segment RDMA/mlx5: Relax DEVX access upon modify commands x86/mm: Move is_vsyscall_vaddr() into asm/vsyscall.h x86/mm: Disallow vsyscall page read for copy_from_kernel_nofault() net/iucv: fix the allocation size of iucv_path_table array parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check block: sed-opal: handle empty atoms when parsing response dm-verity, dm-crypt: align "struct bvec_iter" correctly scsi: mpt3sas: Prevent sending diag_reset when the controller is ready Bluetooth: rfcomm: Fix null-ptr-deref in rfcomm_check_security firewire: core: use long bus reset on gap count error ASoC: Intel: bytcr_rt5640: Add an extra entry for the Chuwi Vi8 tablet Input: gpio_keys_polled - suppress deferred probe error for gpio ASoC: wm8962: Enable oscillator if selecting WM8962_FLL_OSC ASoC: wm8962: Enable both SPKOUTR_ENA and SPKOUTL_ENA in mono mode ASoC: wm8962: Fix up incorrect error message in wm8962_set_fll x86/paravirt: Fix build due to __text_gen_insn() backport do_sys_name_to_handle(): use kzalloc() to fix kernel-infoleak nbd: null check for nla_nest_start fs/select: rework stack allocation hack for clang block: add a new set_read_only method md: implement ->set_read_only to hook into BLKROSET processing md: Don't clear MD_CLOSING when the raid is about to stop aoe: fix the potential use-after-free problem in aoecmd_cfg_pkts timekeeping: Fix cross-timestamp interpolation on counter wrap timekeeping: Fix cross-timestamp interpolation corner case decision timekeeping: Fix cross-timestamp interpolation for non-x86 wifi: ath10k: fix NULL pointer dereference in ath10k_wmi_tlv_op_pull_mgmt_tx_compl_ev() wifi: b43: Stop/wake correct queue in DMA Tx path when QoS is disabled wifi: b43: Stop/wake correct queue in PIO Tx path when QoS is disabled wifi: b43: Stop correct queue in DMA worker when QoS is disabled wifi: b43: Disable QoS for bcm4331 wifi: wilc1000: fix declarations ordering wifi: wilc1000: fix RCU usage in connect path wifi: rtl8xxxu: add cancel_work_sync() for c2hcmd_work wifi: wilc1000: fix multi-vif management when deleting a vif wifi: mwifiex: debugfs: Drop unnecessary error check for debugfs_create_dir() cpufreq: brcmstb-avs-cpufreq: add check for cpufreq_cpu_get's return value sock_diag: annotate data-races around sock_diag_handlers[family] inet_diag: annotate data-races around inet_diag_table[] bpftool: Silence build warning about calloc() af_unix: Annotate data-race of gc_in_progress in wait_for_unix_gc(). wifi: ath9k: delay all of ath9k_wmi_event_tasklet() until init is complete wifi: iwlwifi: dbg-tlv: ensure NUL termination wifi: iwlwifi: fix EWRD table validity check net: blackhole_dev: fix build warning for ethh set but not used wifi: libertas: fix some memleaks in lbs_allocate_cmd_buffer() arm64: dts: mediatek: mt7622: add missing "device_type" to memory nodes bpf: Factor out bpf_spin_lock into helpers. bpf: Mark bpf_spin_{lock,unlock}() helpers with notrace correctly wireless: Remove redundant 'flush_workqueue()' calls wifi: wilc1000: prevent use-after-free on vif when cleaning up all interfaces ACPI: processor_idle: Fix memory leak in acpi_processor_power_exit() bus: tegra-aconnect: Update dependency to ARCH_TEGRA iommu/amd: Mark interrupt as managed wifi: brcmsmac: avoid function pointer casts net: ena: Remove ena_select_queue ARM: dts: arm: realview: Fix development chip ROM compatible value ARM: dts: imx6dl-yapp4: Move phy reset into switch node ARM: dts: imx6dl-yapp4: Fix typo in the QCA switch register address ARM: dts: imx6dl-yapp4: Move the internal switch PHYs under the switch node arm64: dts: marvell: reorder crypto interrupts on Armada SoCs ACPI: scan: Fix device check notification handling x86, relocs: Ignore relocations in .notes section SUNRPC: fix some memleaks in gssx_dec_option_array mmc: wmt-sdmmc: remove an incorrect release_mem_region() call in the .remove function wifi: rtw88: 8821c: Fix false alarm count PCI: Make pci_dev_is_disconnected() helper public for other drivers iommu/vt-d: Don't issue ATS Invalidation request when device is disconnected igb: move PEROUT and EXTTS isr logic to separate functions igb: Fix missing time sync events Bluetooth: Remove superfluous call to hci_conn_check_pending() Bluetooth: hci_core: Fix possible buffer overflow sr9800: Add check for usbnet_get_endpoints bpf: Eliminate rlimit-based memory accounting for devmap maps bpf: Fix DEVMAP_HASH overflow check on 32-bit arches bpf: Fix hashtab overflow check on 32-bit arches bpf: Fix stackmap overflow check on 32-bit arches ipv6: fib6_rules: flush route cache when rule is changed net: ip_tunnel: make sure to pull inner header in ip_tunnel_rcv() net: phy: fix phy_get_internal_delay accessing an empty array net: hns3: fix port duplex configure error in IMP reset net: phy: DP83822: enable rgmii mode if phy_interface_is_rgmii net: phy: dp83822: Fix RGMII TX delay configuration OPP: debugfs: Fix warning around icc_get_name() tcp: fix incorrect parameter validation in the do_tcp_getsockopt() function net/ipv4: Replace one-element array with flexible-array member net/ipv4: Revert use of struct_size() helper net/ipv4/ipv6: Replace one-element arraya with flexible-array members bpf: net: Change do_ip_getsockopt() to take the sockptr_t argument ipmr: fix incorrect parameter validation in the ip_mroute_getsockopt() function l2tp: fix incorrect parameter validation in the pppol2tp_getsockopt() function udp: fix incorrect parameter validation in the udp_lib_getsockopt() function net: kcm: fix incorrect parameter validation in the kcm_getsockopt) function net/x25: fix incorrect parameter validation in the x25_getsockopt() function nfp: flower: handle acti_netdevs allocation failure dm raid: fix false positive for requeue needed during reshape dm: call the resume method on internal suspend drm/tegra: dsi: Add missing check for of_find_device_by_node drm/tegra: dsi: Make use of the helper function dev_err_probe() drm/tegra: dsi: Fix some error handling paths in tegra_dsi_probe() drm/tegra: dsi: Fix missing pm_runtime_disable() in the error handling path of tegra_dsi_probe() drm/tegra: output: Fix missing i2c_put_adapter() in the error handling paths of tegra_output_probe() drm/rockchip: inno_hdmi: Fix video timing drm: Don't treat 0 as -1 in drm_fixp2int_ceil drm/rockchip: lvds: do not overwrite error code drm/rockchip: lvds: do not print scary message when probing defer drm/lima: fix a memleak in lima_heap_alloc dmaengine: tegra210-adma: Update dependency to ARCH_TEGRA media: tc358743: register v4l2 async device only after successful setup PCI/DPC: Print all TLP Prefixes, not just the first perf record: Fix possible incorrect free in record__switch_output() HID: lenovo: Add middleclick_workaround sysfs knob for cptkbd drm/amd/display: Fix a potential buffer overflow in 'dp_dsc_clock_en_read()' drm/amd/display: Fix potential NULL pointer dereferences in 'dcn10_set_output_transfer_func()' perf evsel: Fix duplicate initialization of data->id in evsel__parse_sample() media: em28xx: annotate unchecked call to media_device_register() media: v4l2-tpg: fix some memleaks in tpg_alloc media: v4l2-mem2mem: fix a memleak in v4l2_m2m_register_entity media: edia: dvbdev: fix a use-after-free pinctrl: mediatek: Drop bogus slew rate register range for MT8192 clk: qcom: reset: Commonize the de/assert functions clk: qcom: reset: Ensure write completion on reset de/assertion quota: simplify drop_dquot_ref() quota: Fix potential NULL pointer dereference quota: Fix rcu annotations of inode dquot pointers PCI: switchtec: Fix an error handling path in switchtec_pci_probe() crypto: xilinx - call finalize with bh disabled perf thread_map: Free strlist on normal path in thread_map__new_by_tid_str() drm/radeon/ni: Fix wrong firmware size logging in ni_init_microcode() ALSA: seq: fix function cast warnings perf stat: Avoid metric-only segv ASoC: meson: Use dev_err_probe() helper ASoC: meson: aiu: fix function pointer type mismatch ASoC: meson: t9015: fix function pointer type mismatch media: sun8i-di: Fix coefficient writes media: sun8i-di: Fix power on/off sequences media: sun8i-di: Fix chroma difference threshold media: imx: csc/scaler: fix v4l2_ctrl_handler memory leak media: go7007: add check of return value of go7007_read_addr() media: pvrusb2: remove redundant NULL check media: pvrusb2: fix pvr2_stream_callback casts clk: qcom: dispcc-sdm845: Adjust internal GDSC wait times drm/mediatek: dsi: Fix DSI RGB666 formats and definitions PCI: Mark 3ware-9650SE Root Port Extended Tags as broken clk: hisilicon: hi3519: Release the correct number of gates in hi3519_clk_unregister() drm/tegra: put drm_gem_object ref on error in tegra_fb_create mfd: syscon: Call of_node_put() only when of_parse_phandle() takes a ref mfd: altera-sysmgr: Call of_node_put() only when of_parse_phandle() takes a ref crypto: arm/sha - fix function cast warnings drm/tidss: Fix initial plane zpos values mtd: maps: physmap-core: fix flash size larger than 32-bit mtd: rawnand: lpc32xx_mlc: fix irq handler prototype ASoC: meson: axg-tdm-interface: fix mclk setup without mclk-fs ASoC: meson: axg-tdm-interface: add frame rate constraint drm/amdgpu: Fix missing break in ATOM_ARG_IMM Case of atom_get_src_int() media: pvrusb2: fix uaf in pvr2_context_set_notify media: dvb-frontends: avoid stack overflow warnings with clang media: go7007: fix a memleak in go7007_load_encoder media: ttpci: fix two memleaks in budget_av_attach media: mediatek: vcodec: avoid -Wcast-function-type-strict warning drm/mediatek: Fix a null pointer crash in mtk_drm_crtc_finish_page_flip powerpc/hv-gpci: Fix the H_GET_PERF_COUNTER_INFO hcall return value checks drm/msm/dpu: add division of drm_display_mode's hskew parameter powerpc/embedded6xx: Fix no previous prototype for avr_uart_send() etc. leds: aw2013: Unlock mutex before destroying it leds: sgm3140: Add missing timer cleanup and flash gpio control backlight: lm3630a: Initialize backlight_properties on init backlight: lm3630a: Don't set bl->props.brightness in get_brightness backlight: da9052: Fully initialize backlight_properties during probe backlight: lm3639: Fully initialize backlight_properties during probe backlight: lp8788: Fully initialize backlight_properties during probe sparc32: Fix section mismatch in leon_pci_grpci clk: Fix clk_core_get NULL dereference ALSA: hda/realtek: fix ALC285 issues on HP Envy x360 laptops ALSA: usb-audio: Stop parsing channels bits when all channels are found. RDMA/srpt: Do not register event handler until srpt device is fully setup f2fs: compress: fix to check unreleased compressed cluster scsi: csiostor: Avoid function pointer casts RDMA/device: Fix a race between mad_client and cm_client init scsi: bfa: Fix function pointer type mismatch for hcb_qe->cbfn net: sunrpc: Fix an off by one in rpc_sockaddr2uaddr() NFSv4.2: fix nfs4_listxattr kernel BUG at mm/usercopy.c:102 NFSv4.2: fix listxattr maximum XDR buffer size watchdog: stm32_iwdg: initialize default timeout NFS: Fix an off by one in root_nfs_cat() afs: Revert "afs: Hide silly-rename files from userspace" remoteproc: stm32: Constify st_rproc_ops remoteproc: Add new get_loaded_rsc_table() to rproc_ops remoteproc: stm32: Move resource table setup to rproc_ops remoteproc: stm32: use correct format strings on 64-bit remoteproc: stm32: Fix incorrect type in assignment for va remoteproc: stm32: Fix incorrect type assignment returned by stm32_rproc_get_loaded_rsc_tablef tty: vt: fix 20 vs 0x20 typo in EScsiignore serial: max310x: fix syntax error in IRQ error message tty: serial: samsung: fix tx_empty() to return TIOCSER_TEMT kconfig: fix infinite loop when expanding a macro at the end of file rtc: mt6397: select IRQ_DOMAIN instead of depending on it serial: 8250_exar: Don't remove GPIO device on suspend staging: greybus: fix get_channel_from_mode() failure path usb: gadget: net2272: Use irqflags in the call to net2272_probe_fin io_uring: don't save/restore iowait state octeontx2-af: Use matching wake_up API variant in CGX command interface s390/vtime: fix average steal time calculation soc: fsl: dpio: fix kcalloc() argument order hsr: Fix uninit-value access in hsr_get_node() packet: annotate data-races around ignore_outgoing net: dsa: mt7530: prevent possible incorrect XTAL frequency selection wireguard: receive: annotate data-race around receiving_counter.counter rds: introduce acquire/release ordering in acquire/release_in_xmit() hsr: Handle failures in module init net/bnx2x: Prevent access to a freed page in page_pool octeontx2-af: Use separate handlers for interrupts netfilter: nft_set_pipapo: release elements in clone only from destroy path scsi: fc: Update formal FPIN descriptor definitions ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add regulator nodes vcc-dram and vcc1v2 netfilter: nf_tables: do not compare internal table flags on updates rcu: add a helper to report consolidated flavor QS bpf: report RCU QS in cpumap kthread spi: spi-mt65xx: Fix NULL pointer access in interrupt handler regmap: Add missing map->bus check remoteproc: stm32: fix phys_addr_t format string Linux 5.10.214 Change-Id: Iad0cc6acbf53bac96c0409ce61dc6836d83ed7bc Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
dd27b89022
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 213
|
||||
SUBLEVEL = 214
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
@ -435,7 +435,7 @@ pb1176_serial3: serial@1010f000 {
|
||||
|
||||
/* Direct-mapped development chip ROM */
|
||||
pb1176_rom@10200000 {
|
||||
compatible = "direct-mapped";
|
||||
compatible = "mtd-rom";
|
||||
reg = <0x10200000 0x4000>;
|
||||
bank-width = <1>;
|
||||
};
|
||||
|
@ -103,8 +103,6 @@ &fec {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_enet>;
|
||||
phy-mode = "rgmii-id";
|
||||
phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
|
||||
phy-reset-duration = <20>;
|
||||
phy-supply = <&sw2_reg>;
|
||||
status = "okay";
|
||||
|
||||
@ -117,17 +115,10 @@ mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
phy_port2: phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
phy_port3: phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
switch@10 {
|
||||
compatible = "qca,qca8334";
|
||||
reg = <10>;
|
||||
reg = <0x10>;
|
||||
reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
|
||||
|
||||
switch_ports: ports {
|
||||
#address-cells = <1>;
|
||||
@ -148,15 +139,30 @@ fixed-link {
|
||||
eth2: port@2 {
|
||||
reg = <2>;
|
||||
label = "eth2";
|
||||
phy-mode = "internal";
|
||||
phy-handle = <&phy_port2>;
|
||||
};
|
||||
|
||||
eth1: port@3 {
|
||||
reg = <3>;
|
||||
label = "eth1";
|
||||
phy-mode = "internal";
|
||||
phy-handle = <&phy_port3>;
|
||||
};
|
||||
};
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
phy_port2: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
phy_port3: ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -62,6 +62,30 @@ reg_vdd_cpux: vdd-cpux-regulator {
|
||||
states = <1100000 0>, <1300000 1>;
|
||||
};
|
||||
|
||||
reg_vcc_dram: vcc-dram {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc-dram";
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
enable-active-high;
|
||||
gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
|
||||
vin-supply = <®_vcc5v0>;
|
||||
};
|
||||
|
||||
reg_vcc1v2: vcc1v2 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc1v2";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
enable-active-high;
|
||||
gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
|
||||
vin-supply = <®_vcc5v0>;
|
||||
};
|
||||
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
#include "sha256_glue.h"
|
||||
|
||||
asmlinkage void sha256_block_data_order(u32 *digest, const void *data,
|
||||
unsigned int num_blks);
|
||||
asmlinkage void sha256_block_data_order(struct sha256_state *state,
|
||||
const u8 *data, int num_blks);
|
||||
|
||||
int crypto_sha256_arm_update(struct shash_desc *desc, const u8 *data,
|
||||
unsigned int len)
|
||||
@ -33,23 +33,20 @@ int crypto_sha256_arm_update(struct shash_desc *desc, const u8 *data,
|
||||
/* make sure casting to sha256_block_fn() is safe */
|
||||
BUILD_BUG_ON(offsetof(struct sha256_state, state) != 0);
|
||||
|
||||
return sha256_base_do_update(desc, data, len,
|
||||
(sha256_block_fn *)sha256_block_data_order);
|
||||
return sha256_base_do_update(desc, data, len, sha256_block_data_order);
|
||||
}
|
||||
EXPORT_SYMBOL(crypto_sha256_arm_update);
|
||||
|
||||
static int crypto_sha256_arm_final(struct shash_desc *desc, u8 *out)
|
||||
{
|
||||
sha256_base_do_finalize(desc,
|
||||
(sha256_block_fn *)sha256_block_data_order);
|
||||
sha256_base_do_finalize(desc, sha256_block_data_order);
|
||||
return sha256_base_finish(desc, out);
|
||||
}
|
||||
|
||||
int crypto_sha256_arm_finup(struct shash_desc *desc, const u8 *data,
|
||||
unsigned int len, u8 *out)
|
||||
{
|
||||
sha256_base_do_update(desc, data, len,
|
||||
(sha256_block_fn *)sha256_block_data_order);
|
||||
sha256_base_do_update(desc, data, len, sha256_block_data_order);
|
||||
return crypto_sha256_arm_final(desc, out);
|
||||
}
|
||||
EXPORT_SYMBOL(crypto_sha256_arm_finup);
|
||||
|
@ -25,27 +25,25 @@ MODULE_ALIAS_CRYPTO("sha512");
|
||||
MODULE_ALIAS_CRYPTO("sha384-arm");
|
||||
MODULE_ALIAS_CRYPTO("sha512-arm");
|
||||
|
||||
asmlinkage void sha512_block_data_order(u64 *state, u8 const *src, int blocks);
|
||||
asmlinkage void sha512_block_data_order(struct sha512_state *state,
|
||||
u8 const *src, int blocks);
|
||||
|
||||
int sha512_arm_update(struct shash_desc *desc, const u8 *data,
|
||||
unsigned int len)
|
||||
{
|
||||
return sha512_base_do_update(desc, data, len,
|
||||
(sha512_block_fn *)sha512_block_data_order);
|
||||
return sha512_base_do_update(desc, data, len, sha512_block_data_order);
|
||||
}
|
||||
|
||||
static int sha512_arm_final(struct shash_desc *desc, u8 *out)
|
||||
{
|
||||
sha512_base_do_finalize(desc,
|
||||
(sha512_block_fn *)sha512_block_data_order);
|
||||
sha512_base_do_finalize(desc, sha512_block_data_order);
|
||||
return sha512_base_finish(desc, out);
|
||||
}
|
||||
|
||||
int sha512_arm_finup(struct shash_desc *desc, const u8 *data,
|
||||
unsigned int len, u8 *out)
|
||||
{
|
||||
sha512_base_do_update(desc, data, len,
|
||||
(sha512_block_fn *)sha512_block_data_order);
|
||||
sha512_base_do_update(desc, data, len, sha512_block_data_order);
|
||||
return sha512_arm_final(desc, out);
|
||||
}
|
||||
|
||||
|
@ -414,14 +414,14 @@ xor11 {
|
||||
crypto: crypto@90000 {
|
||||
compatible = "inside-secure,safexcel-eip97ies";
|
||||
reg = <0x90000 0x20000>;
|
||||
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
|
||||
interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "mem", "ring0", "ring1",
|
||||
"ring2", "ring3", "eip";
|
||||
<GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "ring0", "ring1", "ring2",
|
||||
"ring3", "eip", "mem";
|
||||
clocks = <&nb_periph_clk 15>;
|
||||
};
|
||||
|
||||
|
@ -477,14 +477,14 @@ CP11X_LABEL(sdhci0): sdhci@780000 {
|
||||
CP11X_LABEL(crypto): crypto@800000 {
|
||||
compatible = "inside-secure,safexcel-eip197b";
|
||||
reg = <0x800000 0x200000>;
|
||||
interrupts = <87 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<88 IRQ_TYPE_LEVEL_HIGH>,
|
||||
interrupts = <88 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<89 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<90 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<91 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<92 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "mem", "ring0", "ring1",
|
||||
"ring2", "ring3", "eip";
|
||||
<92 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<87 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "ring0", "ring1", "ring2", "ring3",
|
||||
"eip", "mem";
|
||||
clock-names = "core", "reg";
|
||||
clocks = <&CP11X_LABEL(clk) 1 26>,
|
||||
<&CP11X_LABEL(clk) 1 17>;
|
||||
|
@ -71,6 +71,7 @@ red {
|
||||
|
||||
memory@40000000 {
|
||||
reg = <0 0x40000000 0 0x40000000>;
|
||||
device_type = "memory";
|
||||
};
|
||||
|
||||
reg_1p8v: regulator-1p8v {
|
||||
|
@ -57,6 +57,7 @@ wps {
|
||||
|
||||
memory@40000000 {
|
||||
reg = <0 0x40000000 0 0x20000000>;
|
||||
device_type = "memory";
|
||||
};
|
||||
|
||||
reg_1p8v: regulator-1p8v {
|
||||
|
@ -60,6 +60,7 @@ static inline void instruction_pointer_set(struct pt_regs *regs,
|
||||
unsigned long val)
|
||||
{
|
||||
regs->cp0_epc = val;
|
||||
regs->cp0_cause &= ~CAUSEF_BD;
|
||||
}
|
||||
|
||||
/* Query offset/name of register from its name/offset */
|
||||
|
@ -81,7 +81,7 @@ void notrace __hot ftrace_function_trampoline(unsigned long parent,
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||
#if defined(CONFIG_DYNAMIC_FTRACE) && defined(CONFIG_FUNCTION_GRAPH_TRACER)
|
||||
int ftrace_enable_ftrace_graph_caller(void)
|
||||
{
|
||||
return 0;
|
||||
|
@ -164,6 +164,20 @@ static unsigned long single_gpci_request(u32 req, u32 starting_index,
|
||||
|
||||
ret = plpar_hcall_norets(H_GET_PERF_COUNTER_INFO,
|
||||
virt_to_phys(arg), HGPCI_REQ_BUFFER_SIZE);
|
||||
|
||||
/*
|
||||
* ret value as 'H_PARAMETER' with detail_rc as 'GEN_BUF_TOO_SMALL',
|
||||
* specifies that the current buffer size cannot accommodate
|
||||
* all the information and a partial buffer returned.
|
||||
* Since in this function we are only accessing data for a given starting index,
|
||||
* we don't need to accommodate whole data and can get required count by
|
||||
* accessing first entry data.
|
||||
* Hence hcall fails only incase the ret value is other than H_SUCCESS or
|
||||
* H_PARAMETER with detail_rc value as GEN_BUF_TOO_SMALL(0x1B).
|
||||
*/
|
||||
if (ret == H_PARAMETER && be32_to_cpu(arg->params.detail_rc) == 0x1B)
|
||||
ret = 0;
|
||||
|
||||
if (ret) {
|
||||
pr_devel("hcall failed: 0x%lx\n", ret);
|
||||
goto out;
|
||||
@ -228,6 +242,7 @@ static int h_gpci_event_init(struct perf_event *event)
|
||||
{
|
||||
u64 count;
|
||||
u8 length;
|
||||
unsigned long ret;
|
||||
|
||||
/* Not our event */
|
||||
if (event->attr.type != event->pmu->type)
|
||||
@ -258,13 +273,23 @@ static int h_gpci_event_init(struct perf_event *event)
|
||||
}
|
||||
|
||||
/* check if the request works... */
|
||||
if (single_gpci_request(event_get_request(event),
|
||||
ret = single_gpci_request(event_get_request(event),
|
||||
event_get_starting_index(event),
|
||||
event_get_secondary_index(event),
|
||||
event_get_counter_info_version(event),
|
||||
event_get_offset(event),
|
||||
length,
|
||||
&count)) {
|
||||
&count);
|
||||
|
||||
/*
|
||||
* ret value as H_AUTHORITY implies that partition is not permitted to retrieve
|
||||
* performance information, and required to set
|
||||
* "Enable Performance Information Collection" option.
|
||||
*/
|
||||
if (ret == H_AUTHORITY)
|
||||
return -EPERM;
|
||||
|
||||
if (ret) {
|
||||
pr_devel("gpci hcall failed\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -97,9 +97,6 @@ static void __init linkstation_init_IRQ(void)
|
||||
mpic_init(mpic);
|
||||
}
|
||||
|
||||
extern void avr_uart_configure(void);
|
||||
extern void avr_uart_send(const char);
|
||||
|
||||
static void __noreturn linkstation_restart(char *cmd)
|
||||
{
|
||||
local_irq_disable();
|
||||
|
@ -156,4 +156,7 @@ int mpc10x_disable_store_gathering(struct pci_controller *hose);
|
||||
/* For MPC107 boards that use the built-in openpic */
|
||||
void mpc10x_set_openpic(void);
|
||||
|
||||
void avr_uart_configure(void);
|
||||
void avr_uart_send(const char c);
|
||||
|
||||
#endif /* __PPC_KERNEL_MPC10X_H */
|
||||
|
@ -214,13 +214,13 @@ void vtime_flush(struct task_struct *tsk)
|
||||
virt_timer_expire();
|
||||
|
||||
steal = S390_lowcore.steal_timer;
|
||||
avg_steal = S390_lowcore.avg_steal_timer / 2;
|
||||
avg_steal = S390_lowcore.avg_steal_timer;
|
||||
if ((s64) steal > 0) {
|
||||
S390_lowcore.steal_timer = 0;
|
||||
account_steal_time(cputime_to_nsecs(steal));
|
||||
avg_steal += steal;
|
||||
}
|
||||
S390_lowcore.avg_steal_timer = avg_steal;
|
||||
S390_lowcore.avg_steal_timer = avg_steal / 2;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -696,7 +696,7 @@ static int grpci1_of_probe(struct platform_device *ofdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
static const struct of_device_id grpci1_of_match[] __initconst = {
|
||||
static const struct of_device_id grpci1_of_match[] = {
|
||||
{
|
||||
.name = "GAISLER_PCIFBRG",
|
||||
},
|
||||
|
@ -887,7 +887,7 @@ static int grpci2_of_probe(struct platform_device *ofdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
static const struct of_device_id grpci2_of_match[] __initconst = {
|
||||
static const struct of_device_id grpci2_of_match[] = {
|
||||
{
|
||||
.name = "GAISLER_GRPCI2",
|
||||
},
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include <linux/seqlock.h>
|
||||
#include <uapi/asm/vsyscall.h>
|
||||
#include <asm/page_types.h>
|
||||
|
||||
#ifdef CONFIG_X86_VSYSCALL_EMULATION
|
||||
extern void map_vsyscall(void);
|
||||
@ -24,4 +25,13 @@ static inline bool emulate_vsyscall(unsigned long error_code,
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The (legacy) vsyscall page is the long page in the kernel portion
|
||||
* of the address space that has user-accessible permissions.
|
||||
*/
|
||||
static inline bool is_vsyscall_vaddr(unsigned long vaddr)
|
||||
{
|
||||
return unlikely((vaddr & PAGE_MASK) == VSYSCALL_ADDR);
|
||||
}
|
||||
|
||||
#endif /* _ASM_X86_VSYSCALL_H */
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <asm/special_insns.h>
|
||||
#include <asm/tlb.h>
|
||||
#include <asm/io_bitmap.h>
|
||||
#include <asm/text-patching.h>
|
||||
|
||||
/*
|
||||
* nop stub, which must not clobber anything *including the stack* to
|
||||
|
@ -787,15 +787,6 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code,
|
||||
show_opcodes(regs, loglvl);
|
||||
}
|
||||
|
||||
/*
|
||||
* The (legacy) vsyscall page is the long page in the kernel portion
|
||||
* of the address space that has user-accessible permissions.
|
||||
*/
|
||||
static bool is_vsyscall_vaddr(unsigned long vaddr)
|
||||
{
|
||||
return unlikely((vaddr & PAGE_MASK) == VSYSCALL_ADDR);
|
||||
}
|
||||
|
||||
static void
|
||||
__bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
|
||||
unsigned long address, u32 pkey, int si_code)
|
||||
|
@ -3,6 +3,8 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
#include <asm/vsyscall.h>
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
|
||||
{
|
||||
@ -15,6 +17,14 @@ bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
|
||||
if (vaddr < TASK_SIZE_MAX + PAGE_SIZE)
|
||||
return false;
|
||||
|
||||
/*
|
||||
* Reading from the vsyscall page may cause an unhandled fault in
|
||||
* certain cases. Though it is at an address above TASK_SIZE_MAX, it is
|
||||
* usually considered as a user space address.
|
||||
*/
|
||||
if (is_vsyscall_vaddr(vaddr))
|
||||
return false;
|
||||
|
||||
/*
|
||||
* Allow everything during early boot before 'x86_virt_bits'
|
||||
* is initialized. Needed for instruction decoding in early
|
||||
|
@ -597,6 +597,14 @@ static void print_absolute_relocs(void)
|
||||
if (!(sec_applies->shdr.sh_flags & SHF_ALLOC)) {
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
* Do not perform relocations in .notes section; any
|
||||
* values there are meant for pre-boot consumption (e.g.
|
||||
* startup_xen).
|
||||
*/
|
||||
if (sec_applies->shdr.sh_type == SHT_NOTE) {
|
||||
continue;
|
||||
}
|
||||
sh_symtab = sec_symtab->symtab;
|
||||
sym_strtab = sec_symtab->link->strtab;
|
||||
for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Rel); j++) {
|
||||
|
@ -65,6 +65,8 @@ int xen_smp_intr_init(unsigned int cpu)
|
||||
char *resched_name, *callfunc_name, *debug_name;
|
||||
|
||||
resched_name = kasprintf(GFP_KERNEL, "resched%d", cpu);
|
||||
if (!resched_name)
|
||||
goto fail_mem;
|
||||
per_cpu(xen_resched_irq, cpu).name = resched_name;
|
||||
rc = bind_ipi_to_irqhandler(XEN_RESCHEDULE_VECTOR,
|
||||
cpu,
|
||||
@ -77,6 +79,8 @@ int xen_smp_intr_init(unsigned int cpu)
|
||||
per_cpu(xen_resched_irq, cpu).irq = rc;
|
||||
|
||||
callfunc_name = kasprintf(GFP_KERNEL, "callfunc%d", cpu);
|
||||
if (!callfunc_name)
|
||||
goto fail_mem;
|
||||
per_cpu(xen_callfunc_irq, cpu).name = callfunc_name;
|
||||
rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_VECTOR,
|
||||
cpu,
|
||||
@ -90,6 +94,9 @@ int xen_smp_intr_init(unsigned int cpu)
|
||||
|
||||
if (!xen_fifo_events) {
|
||||
debug_name = kasprintf(GFP_KERNEL, "debug%d", cpu);
|
||||
if (!debug_name)
|
||||
goto fail_mem;
|
||||
|
||||
per_cpu(xen_debug_irq, cpu).name = debug_name;
|
||||
rc = bind_virq_to_irqhandler(VIRQ_DEBUG, cpu,
|
||||
xen_debug_interrupt,
|
||||
@ -101,6 +108,9 @@ int xen_smp_intr_init(unsigned int cpu)
|
||||
}
|
||||
|
||||
callfunc_name = kasprintf(GFP_KERNEL, "callfuncsingle%d", cpu);
|
||||
if (!callfunc_name)
|
||||
goto fail_mem;
|
||||
|
||||
per_cpu(xen_callfuncsingle_irq, cpu).name = callfunc_name;
|
||||
rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_SINGLE_VECTOR,
|
||||
cpu,
|
||||
@ -114,6 +124,8 @@ int xen_smp_intr_init(unsigned int cpu)
|
||||
|
||||
return 0;
|
||||
|
||||
fail_mem:
|
||||
rc = -ENOMEM;
|
||||
fail:
|
||||
xen_smp_intr_free(cpu);
|
||||
return rc;
|
||||
|
@ -405,6 +405,11 @@ static int blkdev_roset(struct block_device *bdev, fmode_t mode,
|
||||
return ret;
|
||||
if (get_user(n, (int __user *)arg))
|
||||
return -EFAULT;
|
||||
if (bdev->bd_disk->fops->set_read_only) {
|
||||
ret = bdev->bd_disk->fops->set_read_only(bdev, n);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
set_device_ro(bdev, n);
|
||||
return 0;
|
||||
}
|
||||
|
@ -66,6 +66,7 @@ enum opal_response_token {
|
||||
#define SHORT_ATOM_BYTE 0xBF
|
||||
#define MEDIUM_ATOM_BYTE 0xDF
|
||||
#define LONG_ATOM_BYTE 0xE3
|
||||
#define EMPTY_ATOM_BYTE 0xFF
|
||||
|
||||
#define OPAL_INVAL_PARAM 12
|
||||
#define OPAL_MANUFACTURED_INACTIVE 0x08
|
||||
|
@ -895,16 +895,20 @@ static int response_parse(const u8 *buf, size_t length,
|
||||
token_length = response_parse_medium(iter, pos);
|
||||
else if (pos[0] <= LONG_ATOM_BYTE) /* long atom */
|
||||
token_length = response_parse_long(iter, pos);
|
||||
else if (pos[0] == EMPTY_ATOM_BYTE) /* empty atom */
|
||||
token_length = 1;
|
||||
else /* TOKEN */
|
||||
token_length = response_parse_token(iter, pos);
|
||||
|
||||
if (token_length < 0)
|
||||
return token_length;
|
||||
|
||||
if (pos[0] != EMPTY_ATOM_BYTE)
|
||||
num_entries++;
|
||||
|
||||
pos += token_length;
|
||||
total -= token_length;
|
||||
iter++;
|
||||
num_entries++;
|
||||
}
|
||||
|
||||
resp->num = num_entries;
|
||||
|
@ -1427,6 +1427,8 @@ int acpi_processor_power_exit(struct acpi_processor *pr)
|
||||
acpi_processor_registered--;
|
||||
if (acpi_processor_registered == 0)
|
||||
cpuidle_unregister_driver(&acpi_idle_driver);
|
||||
|
||||
kfree(dev);
|
||||
}
|
||||
|
||||
pr->flags.power_setup_done = 0;
|
||||
|
@ -321,18 +321,14 @@ static int acpi_scan_device_check(struct acpi_device *adev)
|
||||
* again).
|
||||
*/
|
||||
if (adev->handler) {
|
||||
dev_warn(&adev->dev, "Already enumerated\n");
|
||||
return -EALREADY;
|
||||
dev_dbg(&adev->dev, "Already enumerated\n");
|
||||
return 0;
|
||||
}
|
||||
error = acpi_bus_scan(adev->handle);
|
||||
if (error) {
|
||||
dev_warn(&adev->dev, "Namespace scan failure\n");
|
||||
return error;
|
||||
}
|
||||
if (!adev->handler) {
|
||||
dev_warn(&adev->dev, "Enumeration failure\n");
|
||||
error = -ENODEV;
|
||||
}
|
||||
} else {
|
||||
error = acpi_scan_device_not_present(adev);
|
||||
}
|
||||
|
@ -420,13 +420,16 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff_head *qu
|
||||
rcu_read_lock();
|
||||
for_each_netdev_rcu(&init_net, ifp) {
|
||||
dev_hold(ifp);
|
||||
if (!is_aoe_netif(ifp))
|
||||
goto cont;
|
||||
if (!is_aoe_netif(ifp)) {
|
||||
dev_put(ifp);
|
||||
continue;
|
||||
}
|
||||
|
||||
skb = new_skb(sizeof *h + sizeof *ch);
|
||||
if (skb == NULL) {
|
||||
printk(KERN_INFO "aoe: skb alloc failure\n");
|
||||
goto cont;
|
||||
dev_put(ifp);
|
||||
continue;
|
||||
}
|
||||
skb_put(skb, sizeof *h + sizeof *ch);
|
||||
skb->dev = ifp;
|
||||
@ -441,9 +444,6 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff_head *qu
|
||||
h->major = cpu_to_be16(aoemajor);
|
||||
h->minor = aoeminor;
|
||||
h->cmd = AOECMD_CFG;
|
||||
|
||||
cont:
|
||||
dev_put(ifp);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
@ -64,6 +64,7 @@ tx(int id) __must_hold(&txlock)
|
||||
pr_warn("aoe: packet could not be sent on %s. %s\n",
|
||||
ifp ? ifp->name : "netif",
|
||||
"consider increasing tx_queue_len");
|
||||
dev_put(ifp);
|
||||
spin_lock_irq(&txlock);
|
||||
}
|
||||
return 0;
|
||||
|
@ -2339,6 +2339,12 @@ static int nbd_genl_status(struct sk_buff *skb, struct genl_info *info)
|
||||
}
|
||||
|
||||
dev_list = nla_nest_start_noflag(reply, NBD_ATTR_DEVICE_LIST);
|
||||
if (!dev_list) {
|
||||
nlmsg_free(reply);
|
||||
ret = -EMSGSIZE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (index == -1) {
|
||||
ret = idr_for_each(&nbd_index_idr, &status_cb, reply);
|
||||
if (ret) {
|
||||
|
@ -176,11 +176,12 @@ config SUNXI_RSB
|
||||
|
||||
config TEGRA_ACONNECT
|
||||
tristate "Tegra ACONNECT Bus Driver"
|
||||
depends on ARCH_TEGRA_210_SOC
|
||||
depends on ARCH_TEGRA
|
||||
depends on OF && PM
|
||||
help
|
||||
Driver for the Tegra ACONNECT bus which is used to interface with
|
||||
the devices inside the Audio Processing Engine (APE) for Tegra210.
|
||||
the devices inside the Audio Processing Engine (APE) for
|
||||
Tegra210 and later.
|
||||
|
||||
config TEGRA_GMI
|
||||
tristate "Tegra Generic Memory Interface bus driver"
|
||||
|
@ -427,6 +427,9 @@ static struct clk_core *clk_core_get(struct clk_core *core, u8 p_index)
|
||||
if (IS_ERR(hw))
|
||||
return ERR_CAST(hw);
|
||||
|
||||
if (!hw)
|
||||
return NULL;
|
||||
|
||||
return hw->core;
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ static void hi3519_clk_unregister(struct platform_device *pdev)
|
||||
of_clk_del_provider(pdev->dev.of_node);
|
||||
|
||||
hisi_clk_unregister_gate(hi3519_gate_clks,
|
||||
ARRAY_SIZE(hi3519_mux_clks),
|
||||
ARRAY_SIZE(hi3519_gate_clks),
|
||||
crg->clk_data);
|
||||
hisi_clk_unregister_mux(hi3519_mux_clks,
|
||||
ARRAY_SIZE(hi3519_mux_clks),
|
||||
|
@ -769,6 +769,8 @@ static struct clk_branch disp_cc_mdss_vsync_clk = {
|
||||
|
||||
static struct gdsc mdss_gdsc = {
|
||||
.gdscr = 0x3000,
|
||||
.en_few_wait_val = 0x6,
|
||||
.en_rest_wait_val = 0x5,
|
||||
.pd = {
|
||||
.name = "mdss_gdsc",
|
||||
},
|
||||
|
@ -22,8 +22,8 @@ static int qcom_reset(struct reset_controller_dev *rcdev, unsigned long id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
qcom_reset_assert(struct reset_controller_dev *rcdev, unsigned long id)
|
||||
static int qcom_reset_set_assert(struct reset_controller_dev *rcdev,
|
||||
unsigned long id, bool assert)
|
||||
{
|
||||
struct qcom_reset_controller *rst;
|
||||
const struct qcom_reset_map *map;
|
||||
@ -33,21 +33,22 @@ qcom_reset_assert(struct reset_controller_dev *rcdev, unsigned long id)
|
||||
map = &rst->reset_map[id];
|
||||
mask = map->bitmask ? map->bitmask : BIT(map->bit);
|
||||
|
||||
return regmap_update_bits(rst->regmap, map->reg, mask, mask);
|
||||
regmap_update_bits(rst->regmap, map->reg, mask, assert ? mask : 0);
|
||||
|
||||
/* Read back the register to ensure write completion, ignore the value */
|
||||
regmap_read(rst->regmap, map->reg, &mask);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
qcom_reset_deassert(struct reset_controller_dev *rcdev, unsigned long id)
|
||||
static int qcom_reset_assert(struct reset_controller_dev *rcdev, unsigned long id)
|
||||
{
|
||||
struct qcom_reset_controller *rst;
|
||||
const struct qcom_reset_map *map;
|
||||
u32 mask;
|
||||
return qcom_reset_set_assert(rcdev, id, true);
|
||||
}
|
||||
|
||||
rst = to_qcom_reset_controller(rcdev);
|
||||
map = &rst->reset_map[id];
|
||||
mask = map->bitmask ? map->bitmask : BIT(map->bit);
|
||||
|
||||
return regmap_update_bits(rst->regmap, map->reg, mask, 0);
|
||||
static int qcom_reset_deassert(struct reset_controller_dev *rcdev, unsigned long id)
|
||||
{
|
||||
return qcom_reset_set_assert(rcdev, id, false);
|
||||
}
|
||||
|
||||
const struct reset_control_ops qcom_reset_ops = {
|
||||
|
@ -481,6 +481,8 @@ static bool brcm_avs_is_firmware_loaded(struct private_data *priv)
|
||||
static unsigned int brcm_avs_cpufreq_get(unsigned int cpu)
|
||||
{
|
||||
struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
|
||||
if (!policy)
|
||||
return 0;
|
||||
struct private_data *priv = policy->driver_data;
|
||||
|
||||
cpufreq_cpu_put(policy);
|
||||
|
@ -231,7 +231,10 @@ static int zynqmp_handle_aes_req(struct crypto_engine *engine,
|
||||
err = zynqmp_aes_aead_cipher(areq);
|
||||
}
|
||||
|
||||
local_bh_disable();
|
||||
crypto_finalize_aead_request(engine, areq, err);
|
||||
local_bh_enable();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -614,16 +614,16 @@ config TEGRA20_APB_DMA
|
||||
|
||||
config TEGRA210_ADMA
|
||||
tristate "NVIDIA Tegra210 ADMA support"
|
||||
depends on (ARCH_TEGRA_210_SOC || COMPILE_TEST)
|
||||
depends on (ARCH_TEGRA || COMPILE_TEST)
|
||||
select DMA_ENGINE
|
||||
select DMA_VIRTUAL_CHANNELS
|
||||
help
|
||||
Support for the NVIDIA Tegra210 ADMA controller driver. The
|
||||
DMA controller has multiple DMA channels and is used to service
|
||||
various audio clients in the Tegra210 audio processing engine
|
||||
(APE). This DMA controller transfers data from memory to
|
||||
peripheral and vice versa. It does not support memory to
|
||||
memory data transfer.
|
||||
Support for the NVIDIA Tegra210/Tegra186/Tegra194/Tegra234 ADMA
|
||||
controller driver. The DMA controller has multiple DMA channels
|
||||
and is used to service various audio clients in the Tegra210
|
||||
audio processing engine (APE). This DMA controller transfers
|
||||
data from memory to peripheral and vice versa. It does not
|
||||
support memory to memory data transfer.
|
||||
|
||||
config TIMB_DMA
|
||||
tristate "Timberdale FPGA DMA support"
|
||||
|
@ -500,7 +500,19 @@ static void bm_work(struct work_struct *work)
|
||||
fw_notice(card, "phy config: new root=%x, gap_count=%d\n",
|
||||
new_root_id, gap_count);
|
||||
fw_send_phy_config(card, new_root_id, generation, gap_count);
|
||||
reset_bus(card, true);
|
||||
/*
|
||||
* Where possible, use a short bus reset to minimize
|
||||
* disruption to isochronous transfers. But in the event
|
||||
* of a gap count inconsistency, use a long bus reset.
|
||||
*
|
||||
* As noted in 1394a 8.4.6.2, nodes on a mixed 1394/1394a bus
|
||||
* may set different gap counts after a bus reset. On a mixed
|
||||
* 1394/1394a bus, a short bus reset can get doubled. Some
|
||||
* nodes may treat the double reset as one bus reset and others
|
||||
* may treat it as two, causing a gap count inconsistency
|
||||
* again. Using a long bus reset prevents this.
|
||||
*/
|
||||
reset_bus(card, card->gap_count != 0);
|
||||
/* Will allocate broadcast channel after the reset. */
|
||||
goto out;
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr,
|
||||
DEBUG("IMM 0x%02X\n", val);
|
||||
return val;
|
||||
}
|
||||
return 0;
|
||||
break;
|
||||
case ATOM_ARG_PLL:
|
||||
idx = U8(*ptr);
|
||||
(*ptr)++;
|
||||
|
@ -1179,7 +1179,7 @@ static ssize_t dp_dsc_clock_en_read(struct file *f, char __user *buf,
|
||||
const uint32_t rd_buf_size = 10;
|
||||
struct pipe_ctx *pipe_ctx;
|
||||
ssize_t result = 0;
|
||||
int i, r, str_len = 30;
|
||||
int i, r, str_len = 10;
|
||||
|
||||
rd_buf = kcalloc(rd_buf_size, sizeof(char), GFP_KERNEL);
|
||||
|
||||
|
@ -1669,6 +1669,9 @@ bool dcn10_set_output_transfer_func(struct dc *dc, struct pipe_ctx *pipe_ctx,
|
||||
{
|
||||
struct dpp *dpp = pipe_ctx->plane_res.dpp;
|
||||
|
||||
if (!stream)
|
||||
return false;
|
||||
|
||||
if (dpp == NULL)
|
||||
return false;
|
||||
|
||||
@ -1691,8 +1694,8 @@ bool dcn10_set_output_transfer_func(struct dc *dc, struct pipe_ctx *pipe_ctx,
|
||||
} else
|
||||
dpp->funcs->dpp_program_regamma_pwl(dpp, NULL, OPP_REGAMMA_BYPASS);
|
||||
|
||||
if (stream != NULL && stream->ctx != NULL &&
|
||||
stream->out_transfer_func != NULL) {
|
||||
if (stream->ctx &&
|
||||
stream->out_transfer_func) {
|
||||
log_tf(stream->ctx,
|
||||
stream->out_transfer_func,
|
||||
dpp->regamma_params.hw_points_num);
|
||||
|
@ -74,29 +74,34 @@ int lima_heap_alloc(struct lima_bo *bo, struct lima_vm *vm)
|
||||
} else {
|
||||
bo->base.sgt = kmalloc(sizeof(*bo->base.sgt), GFP_KERNEL);
|
||||
if (!bo->base.sgt) {
|
||||
sg_free_table(&sgt);
|
||||
return -ENOMEM;
|
||||
ret = -ENOMEM;
|
||||
goto err_out0;
|
||||
}
|
||||
}
|
||||
|
||||
ret = dma_map_sgtable(dev, &sgt, DMA_BIDIRECTIONAL, 0);
|
||||
if (ret) {
|
||||
sg_free_table(&sgt);
|
||||
kfree(bo->base.sgt);
|
||||
bo->base.sgt = NULL;
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
goto err_out1;
|
||||
|
||||
*bo->base.sgt = sgt;
|
||||
|
||||
if (vm) {
|
||||
ret = lima_vm_map_bo(vm, bo, old_size >> PAGE_SHIFT);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_out2;
|
||||
}
|
||||
|
||||
bo->heap_size = new_size;
|
||||
return 0;
|
||||
|
||||
err_out2:
|
||||
dma_unmap_sgtable(dev, &sgt, DMA_BIDIRECTIONAL, 0);
|
||||
err_out1:
|
||||
kfree(bo->base.sgt);
|
||||
bo->base.sgt = NULL;
|
||||
err_out0:
|
||||
sg_free_table(&sgt);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int lima_gem_create_handle(struct drm_device *dev, struct drm_file *file,
|
||||
|
@ -84,11 +84,13 @@ static void mtk_drm_crtc_finish_page_flip(struct mtk_drm_crtc *mtk_crtc)
|
||||
struct drm_crtc *crtc = &mtk_crtc->base;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&crtc->dev->event_lock, flags);
|
||||
drm_crtc_send_vblank_event(crtc, mtk_crtc->event);
|
||||
drm_crtc_vblank_put(crtc);
|
||||
mtk_crtc->event = NULL;
|
||||
spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
|
||||
if (mtk_crtc->event) {
|
||||
spin_lock_irqsave(&crtc->dev->event_lock, flags);
|
||||
drm_crtc_send_vblank_event(crtc, mtk_crtc->event);
|
||||
drm_crtc_vblank_put(crtc);
|
||||
mtk_crtc->event = NULL;
|
||||
spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void mtk_drm_finish_page_flip(struct mtk_drm_crtc *mtk_crtc)
|
||||
|
@ -68,8 +68,8 @@
|
||||
#define DSI_PS_WC 0x3fff
|
||||
#define DSI_PS_SEL (3 << 16)
|
||||
#define PACKED_PS_16BIT_RGB565 (0 << 16)
|
||||
#define LOOSELY_PS_18BIT_RGB666 (1 << 16)
|
||||
#define PACKED_PS_18BIT_RGB666 (2 << 16)
|
||||
#define PACKED_PS_18BIT_RGB666 (1 << 16)
|
||||
#define LOOSELY_PS_24BIT_RGB666 (2 << 16)
|
||||
#define PACKED_PS_24BIT_RGB888 (3 << 16)
|
||||
|
||||
#define DSI_VSA_NL 0x20
|
||||
@ -365,10 +365,10 @@ static void mtk_dsi_ps_control_vact(struct mtk_dsi *dsi)
|
||||
ps_bpp_mode |= PACKED_PS_24BIT_RGB888;
|
||||
break;
|
||||
case MIPI_DSI_FMT_RGB666:
|
||||
ps_bpp_mode |= PACKED_PS_18BIT_RGB666;
|
||||
ps_bpp_mode |= LOOSELY_PS_24BIT_RGB666;
|
||||
break;
|
||||
case MIPI_DSI_FMT_RGB666_PACKED:
|
||||
ps_bpp_mode |= LOOSELY_PS_18BIT_RGB666;
|
||||
ps_bpp_mode |= PACKED_PS_18BIT_RGB666;
|
||||
break;
|
||||
case MIPI_DSI_FMT_RGB565:
|
||||
ps_bpp_mode |= PACKED_PS_16BIT_RGB565;
|
||||
@ -419,7 +419,7 @@ static void mtk_dsi_ps_control(struct mtk_dsi *dsi)
|
||||
dsi_tmp_buf_bpp = 3;
|
||||
break;
|
||||
case MIPI_DSI_FMT_RGB666:
|
||||
tmp_reg = LOOSELY_PS_18BIT_RGB666;
|
||||
tmp_reg = LOOSELY_PS_24BIT_RGB666;
|
||||
dsi_tmp_buf_bpp = 3;
|
||||
break;
|
||||
case MIPI_DSI_FMT_RGB666_PACKED:
|
||||
|
@ -265,12 +265,14 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
|
||||
mode.htotal >>= 1;
|
||||
mode.hsync_start >>= 1;
|
||||
mode.hsync_end >>= 1;
|
||||
mode.hskew >>= 1;
|
||||
|
||||
DPU_DEBUG_VIDENC(phys_enc,
|
||||
"split_role %d, halve horizontal %d %d %d %d\n",
|
||||
"split_role %d, halve horizontal %d %d %d %d %d\n",
|
||||
phys_enc->split_role,
|
||||
mode.hdisplay, mode.htotal,
|
||||
mode.hsync_start, mode.hsync_end);
|
||||
mode.hsync_start, mode.hsync_end,
|
||||
mode.hskew);
|
||||
}
|
||||
|
||||
drm_mode_to_intf_timing_params(phys_enc, &mode, &timing_params);
|
||||
|
@ -826,7 +826,7 @@ int ni_init_microcode(struct radeon_device *rdev)
|
||||
err = 0;
|
||||
} else if (rdev->smc_fw->size != smc_req_size) {
|
||||
pr_err("ni_mc: Bogus length %zu in firmware \"%s\"\n",
|
||||
rdev->mc_fw->size, fw_name);
|
||||
rdev->smc_fw->size, fw_name);
|
||||
err = -EINVAL;
|
||||
}
|
||||
}
|
||||
|
@ -402,7 +402,7 @@ static int inno_hdmi_config_video_timing(struct inno_hdmi *hdmi,
|
||||
hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HBLANK_L, value & 0xFF);
|
||||
hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HBLANK_H, (value >> 8) & 0xFF);
|
||||
|
||||
value = mode->hsync_start - mode->hdisplay;
|
||||
value = mode->htotal - mode->hsync_start;
|
||||
hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HDELAY_L, value & 0xFF);
|
||||
hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HDELAY_H, (value >> 8) & 0xFF);
|
||||
|
||||
@ -417,7 +417,7 @@ static int inno_hdmi_config_video_timing(struct inno_hdmi *hdmi,
|
||||
value = mode->vtotal - mode->vdisplay;
|
||||
hdmi_writeb(hdmi, HDMI_VIDEO_EXT_VBLANK, value & 0xFF);
|
||||
|
||||
value = mode->vsync_start - mode->vdisplay;
|
||||
value = mode->vtotal - mode->vsync_start;
|
||||
hdmi_writeb(hdmi, HDMI_VIDEO_EXT_VDELAY, value & 0xFF);
|
||||
|
||||
value = mode->vsync_end - mode->vsync_start;
|
||||
|
@ -572,8 +572,7 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,
|
||||
ret = -EINVAL;
|
||||
goto err_put_port;
|
||||
} else if (ret) {
|
||||
DRM_DEV_ERROR(dev, "failed to find panel and bridge node\n");
|
||||
ret = -EPROBE_DEFER;
|
||||
dev_err_probe(dev, ret, "failed to find panel and bridge node\n");
|
||||
goto err_put_port;
|
||||
}
|
||||
if (lvds->panel)
|
||||
|
@ -1534,9 +1534,11 @@ static int tegra_dsi_ganged_probe(struct tegra_dsi *dsi)
|
||||
np = of_parse_phandle(dsi->dev->of_node, "nvidia,ganged-mode", 0);
|
||||
if (np) {
|
||||
struct platform_device *gangster = of_find_device_by_node(np);
|
||||
of_node_put(np);
|
||||
if (!gangster)
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
dsi->slave = platform_get_drvdata(gangster);
|
||||
of_node_put(np);
|
||||
|
||||
if (!dsi->slave) {
|
||||
put_device(&gangster->dev);
|
||||
@ -1584,48 +1586,58 @@ static int tegra_dsi_probe(struct platform_device *pdev)
|
||||
|
||||
if (!pdev->dev.pm_domain) {
|
||||
dsi->rst = devm_reset_control_get(&pdev->dev, "dsi");
|
||||
if (IS_ERR(dsi->rst))
|
||||
return PTR_ERR(dsi->rst);
|
||||
if (IS_ERR(dsi->rst)) {
|
||||
err = PTR_ERR(dsi->rst);
|
||||
goto remove;
|
||||
}
|
||||
}
|
||||
|
||||
dsi->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(dsi->clk)) {
|
||||
dev_err(&pdev->dev, "cannot get DSI clock\n");
|
||||
return PTR_ERR(dsi->clk);
|
||||
err = dev_err_probe(&pdev->dev, PTR_ERR(dsi->clk),
|
||||
"cannot get DSI clock\n");
|
||||
goto remove;
|
||||
}
|
||||
|
||||
dsi->clk_lp = devm_clk_get(&pdev->dev, "lp");
|
||||
if (IS_ERR(dsi->clk_lp)) {
|
||||
dev_err(&pdev->dev, "cannot get low-power clock\n");
|
||||
return PTR_ERR(dsi->clk_lp);
|
||||
err = dev_err_probe(&pdev->dev, PTR_ERR(dsi->clk_lp),
|
||||
"cannot get low-power clock\n");
|
||||
goto remove;
|
||||
}
|
||||
|
||||
dsi->clk_parent = devm_clk_get(&pdev->dev, "parent");
|
||||
if (IS_ERR(dsi->clk_parent)) {
|
||||
dev_err(&pdev->dev, "cannot get parent clock\n");
|
||||
return PTR_ERR(dsi->clk_parent);
|
||||
err = dev_err_probe(&pdev->dev, PTR_ERR(dsi->clk_parent),
|
||||
"cannot get parent clock\n");
|
||||
goto remove;
|
||||
}
|
||||
|
||||
dsi->vdd = devm_regulator_get(&pdev->dev, "avdd-dsi-csi");
|
||||
if (IS_ERR(dsi->vdd)) {
|
||||
dev_err(&pdev->dev, "cannot get VDD supply\n");
|
||||
return PTR_ERR(dsi->vdd);
|
||||
err = dev_err_probe(&pdev->dev, PTR_ERR(dsi->vdd),
|
||||
"cannot get VDD supply\n");
|
||||
goto remove;
|
||||
}
|
||||
|
||||
err = tegra_dsi_setup_clocks(dsi);
|
||||
if (err < 0) {
|
||||
dev_err(&pdev->dev, "cannot setup clocks\n");
|
||||
return err;
|
||||
goto remove;
|
||||
}
|
||||
|
||||
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
dsi->regs = devm_ioremap_resource(&pdev->dev, regs);
|
||||
if (IS_ERR(dsi->regs))
|
||||
return PTR_ERR(dsi->regs);
|
||||
if (IS_ERR(dsi->regs)) {
|
||||
err = PTR_ERR(dsi->regs);
|
||||
goto remove;
|
||||
}
|
||||
|
||||
dsi->mipi = tegra_mipi_request(&pdev->dev, pdev->dev.of_node);
|
||||
if (IS_ERR(dsi->mipi))
|
||||
return PTR_ERR(dsi->mipi);
|
||||
if (IS_ERR(dsi->mipi)) {
|
||||
err = PTR_ERR(dsi->mipi);
|
||||
goto remove;
|
||||
}
|
||||
|
||||
dsi->host.ops = &tegra_dsi_host_ops;
|
||||
dsi->host.dev = &pdev->dev;
|
||||
@ -1653,9 +1665,12 @@ static int tegra_dsi_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
|
||||
unregister:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
mipi_dsi_host_unregister(&dsi->host);
|
||||
mipi_free:
|
||||
tegra_mipi_free(dsi->mipi);
|
||||
remove:
|
||||
tegra_output_remove(&dsi->output);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -155,6 +155,7 @@ struct drm_framebuffer *tegra_fb_create(struct drm_device *drm,
|
||||
|
||||
if (gem->size < size) {
|
||||
err = -EINVAL;
|
||||
drm_gem_object_put(gem);
|
||||
goto unreference;
|
||||
}
|
||||
|
||||
|
@ -139,8 +139,10 @@ int tegra_output_probe(struct tegra_output *output)
|
||||
GPIOD_IN,
|
||||
"HDMI hotplug detect");
|
||||
if (IS_ERR(output->hpd_gpio)) {
|
||||
if (PTR_ERR(output->hpd_gpio) != -ENOENT)
|
||||
return PTR_ERR(output->hpd_gpio);
|
||||
if (PTR_ERR(output->hpd_gpio) != -ENOENT) {
|
||||
err = PTR_ERR(output->hpd_gpio);
|
||||
goto put_i2c;
|
||||
}
|
||||
|
||||
output->hpd_gpio = NULL;
|
||||
}
|
||||
@ -149,7 +151,7 @@ int tegra_output_probe(struct tegra_output *output)
|
||||
err = gpiod_to_irq(output->hpd_gpio);
|
||||
if (err < 0) {
|
||||
dev_err(output->dev, "gpiod_to_irq(): %d\n", err);
|
||||
return err;
|
||||
goto put_i2c;
|
||||
}
|
||||
|
||||
output->hpd_irq = err;
|
||||
@ -162,7 +164,7 @@ int tegra_output_probe(struct tegra_output *output)
|
||||
if (err < 0) {
|
||||
dev_err(output->dev, "failed to request IRQ#%u: %d\n",
|
||||
output->hpd_irq, err);
|
||||
return err;
|
||||
goto put_i2c;
|
||||
}
|
||||
|
||||
output->connector.polled = DRM_CONNECTOR_POLL_HPD;
|
||||
@ -176,6 +178,12 @@ int tegra_output_probe(struct tegra_output *output)
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
put_i2c:
|
||||
if (output->ddc)
|
||||
i2c_put_adapter(output->ddc);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
void tegra_output_remove(struct tegra_output *output)
|
||||
|
@ -202,7 +202,7 @@ struct tidss_plane *tidss_plane_create(struct tidss_device *tidss,
|
||||
|
||||
drm_plane_helper_add(&tplane->plane, &tidss_plane_helper_funcs);
|
||||
|
||||
drm_plane_create_zpos_property(&tplane->plane, hw_plane_id, 0,
|
||||
drm_plane_create_zpos_property(&tplane->plane, tidss->num_planes, 0,
|
||||
num_planes - 1);
|
||||
|
||||
ret = drm_plane_create_color_properties(&tplane->plane,
|
||||
|
@ -53,10 +53,10 @@ struct lenovo_drvdata {
|
||||
/* 0: Up
|
||||
* 1: Down (undecided)
|
||||
* 2: Scrolling
|
||||
* 3: Patched firmware, disable workaround
|
||||
*/
|
||||
u8 middlebutton_state;
|
||||
bool fn_lock;
|
||||
bool middleclick_workaround_cptkbd;
|
||||
};
|
||||
|
||||
#define map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c))
|
||||
@ -418,6 +418,36 @@ static ssize_t attr_sensitivity_store_cptkbd(struct device *dev,
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t attr_middleclick_workaround_show_cptkbd(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct hid_device *hdev = to_hid_device(dev);
|
||||
struct lenovo_drvdata *cptkbd_data = hid_get_drvdata(hdev);
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n",
|
||||
cptkbd_data->middleclick_workaround_cptkbd);
|
||||
}
|
||||
|
||||
static ssize_t attr_middleclick_workaround_store_cptkbd(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
struct hid_device *hdev = to_hid_device(dev);
|
||||
struct lenovo_drvdata *cptkbd_data = hid_get_drvdata(hdev);
|
||||
int value;
|
||||
|
||||
if (kstrtoint(buf, 10, &value))
|
||||
return -EINVAL;
|
||||
if (value < 0 || value > 1)
|
||||
return -EINVAL;
|
||||
|
||||
cptkbd_data->middleclick_workaround_cptkbd = !!value;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
static struct device_attribute dev_attr_fn_lock =
|
||||
__ATTR(fn_lock, S_IWUSR | S_IRUGO,
|
||||
@ -429,10 +459,16 @@ static struct device_attribute dev_attr_sensitivity_cptkbd =
|
||||
attr_sensitivity_show_cptkbd,
|
||||
attr_sensitivity_store_cptkbd);
|
||||
|
||||
static struct device_attribute dev_attr_middleclick_workaround_cptkbd =
|
||||
__ATTR(middleclick_workaround, S_IWUSR | S_IRUGO,
|
||||
attr_middleclick_workaround_show_cptkbd,
|
||||
attr_middleclick_workaround_store_cptkbd);
|
||||
|
||||
|
||||
static struct attribute *lenovo_attributes_cptkbd[] = {
|
||||
&dev_attr_fn_lock.attr,
|
||||
&dev_attr_sensitivity_cptkbd.attr,
|
||||
&dev_attr_middleclick_workaround_cptkbd.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -483,23 +519,7 @@ static int lenovo_event_cptkbd(struct hid_device *hdev,
|
||||
{
|
||||
struct lenovo_drvdata *cptkbd_data = hid_get_drvdata(hdev);
|
||||
|
||||
if (cptkbd_data->middlebutton_state != 3) {
|
||||
/* REL_X and REL_Y events during middle button pressed
|
||||
* are only possible on patched, bug-free firmware
|
||||
* so set middlebutton_state to 3
|
||||
* to never apply workaround anymore
|
||||
*/
|
||||
if (hdev->product == USB_DEVICE_ID_LENOVO_CUSBKBD &&
|
||||
cptkbd_data->middlebutton_state == 1 &&
|
||||
usage->type == EV_REL &&
|
||||
(usage->code == REL_X || usage->code == REL_Y)) {
|
||||
cptkbd_data->middlebutton_state = 3;
|
||||
/* send middle button press which was hold before */
|
||||
input_event(field->hidinput->input,
|
||||
EV_KEY, BTN_MIDDLE, 1);
|
||||
input_sync(field->hidinput->input);
|
||||
}
|
||||
|
||||
if (cptkbd_data->middleclick_workaround_cptkbd) {
|
||||
/* "wheel" scroll events */
|
||||
if (usage->type == EV_REL && (usage->code == REL_WHEEL ||
|
||||
usage->code == REL_HWHEEL)) {
|
||||
@ -976,6 +996,7 @@ static int lenovo_probe_cptkbd(struct hid_device *hdev)
|
||||
cptkbd_data->middlebutton_state = 0;
|
||||
cptkbd_data->fn_lock = true;
|
||||
cptkbd_data->sensitivity = 0x05;
|
||||
cptkbd_data->middleclick_workaround_cptkbd = true;
|
||||
lenovo_features_set_cptkbd(hdev);
|
||||
|
||||
ret = sysfs_create_group(&hdev->dev.kobj, &lenovo_attr_group_cptkbd);
|
||||
|
@ -2067,6 +2067,10 @@ static const struct hid_device_id mt_devices[] = {
|
||||
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
|
||||
USB_VENDOR_ID_SYNAPTICS, 0xcd7e) },
|
||||
|
||||
{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT,
|
||||
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
|
||||
USB_VENDOR_ID_SYNAPTICS, 0xcddc) },
|
||||
|
||||
{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT,
|
||||
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
|
||||
USB_VENDOR_ID_SYNAPTICS, 0xce08) },
|
||||
|
@ -1686,7 +1686,7 @@ static int assign_client_id(struct ib_client *client)
|
||||
{
|
||||
int ret;
|
||||
|
||||
down_write(&clients_rwsem);
|
||||
lockdep_assert_held(&clients_rwsem);
|
||||
/*
|
||||
* The add/remove callbacks must be called in FIFO/LIFO order. To
|
||||
* achieve this we assign client_ids so they are sorted in
|
||||
@ -1695,14 +1695,11 @@ static int assign_client_id(struct ib_client *client)
|
||||
client->client_id = highest_client_id;
|
||||
ret = xa_insert(&clients, client->client_id, client, GFP_KERNEL);
|
||||
if (ret)
|
||||
goto out;
|
||||
return ret;
|
||||
|
||||
highest_client_id++;
|
||||
xa_set_mark(&clients, client->client_id, CLIENT_REGISTERED);
|
||||
|
||||
out:
|
||||
up_write(&clients_rwsem);
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void remove_client_id(struct ib_client *client)
|
||||
@ -1732,25 +1729,35 @@ int ib_register_client(struct ib_client *client)
|
||||
{
|
||||
struct ib_device *device;
|
||||
unsigned long index;
|
||||
bool need_unreg = false;
|
||||
int ret;
|
||||
|
||||
refcount_set(&client->uses, 1);
|
||||
init_completion(&client->uses_zero);
|
||||
|
||||
/*
|
||||
* The devices_rwsem is held in write mode to ensure that a racing
|
||||
* ib_register_device() sees a consisent view of clients and devices.
|
||||
*/
|
||||
down_write(&devices_rwsem);
|
||||
down_write(&clients_rwsem);
|
||||
ret = assign_client_id(client);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto out;
|
||||
|
||||
down_read(&devices_rwsem);
|
||||
need_unreg = true;
|
||||
xa_for_each_marked (&devices, index, device, DEVICE_REGISTERED) {
|
||||
ret = add_client_context(device, client);
|
||||
if (ret) {
|
||||
up_read(&devices_rwsem);
|
||||
ib_unregister_client(client);
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
goto out;
|
||||
}
|
||||
up_read(&devices_rwsem);
|
||||
return 0;
|
||||
ret = 0;
|
||||
out:
|
||||
up_write(&clients_rwsem);
|
||||
up_write(&devices_rwsem);
|
||||
if (need_unreg && ret)
|
||||
ib_unregister_client(client);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(ib_register_client);
|
||||
|
||||
|
@ -2780,7 +2780,7 @@ DECLARE_UVERBS_NAMED_METHOD(
|
||||
MLX5_IB_METHOD_DEVX_OBJ_MODIFY,
|
||||
UVERBS_ATTR_IDR(MLX5_IB_ATTR_DEVX_OBJ_MODIFY_HANDLE,
|
||||
UVERBS_IDR_ANY_OBJECT,
|
||||
UVERBS_ACCESS_WRITE,
|
||||
UVERBS_ACCESS_READ,
|
||||
UA_MANDATORY),
|
||||
UVERBS_ATTR_PTR_IN(
|
||||
MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_IN,
|
||||
|
@ -128,7 +128,7 @@ static void set_eth_seg(const struct ib_send_wr *wr, struct mlx5_ib_qp *qp,
|
||||
*/
|
||||
copysz = min_t(u64, *cur_edge - (void *)eseg->inline_hdr.start,
|
||||
left);
|
||||
memcpy(eseg->inline_hdr.start, pdata, copysz);
|
||||
memcpy(eseg->inline_hdr.data, pdata, copysz);
|
||||
stride = ALIGN(sizeof(struct mlx5_wqe_eth_seg) -
|
||||
sizeof(eseg->inline_hdr.start) + copysz, 16);
|
||||
*size += stride / 16;
|
||||
|
@ -3205,7 +3205,6 @@ static int srpt_add_one(struct ib_device *device)
|
||||
|
||||
INIT_IB_EVENT_HANDLER(&sdev->event_handler, sdev->device,
|
||||
srpt_event_handler);
|
||||
ib_register_event_handler(&sdev->event_handler);
|
||||
|
||||
for (i = 1; i <= sdev->device->phys_port_cnt; i++) {
|
||||
sport = &sdev->port[i - 1];
|
||||
@ -3228,6 +3227,7 @@ static int srpt_add_one(struct ib_device *device)
|
||||
}
|
||||
}
|
||||
|
||||
ib_register_event_handler(&sdev->event_handler);
|
||||
spin_lock(&srpt_dev_lock);
|
||||
list_add_tail(&sdev->list, &srpt_dev_list);
|
||||
spin_unlock(&srpt_dev_lock);
|
||||
@ -3238,7 +3238,6 @@ static int srpt_add_one(struct ib_device *device)
|
||||
|
||||
err_port:
|
||||
srpt_unregister_mad_agent(sdev, i);
|
||||
ib_unregister_event_handler(&sdev->event_handler);
|
||||
err_cm:
|
||||
if (sdev->cm_id)
|
||||
ib_destroy_cm_id(sdev->cm_id);
|
||||
|
@ -319,12 +319,10 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
|
||||
|
||||
error = devm_gpio_request_one(dev, button->gpio,
|
||||
flags, button->desc ? : DRV_NAME);
|
||||
if (error) {
|
||||
dev_err(dev,
|
||||
"unable to claim gpio %u, err=%d\n",
|
||||
button->gpio, error);
|
||||
return error;
|
||||
}
|
||||
if (error)
|
||||
return dev_err_probe(dev, error,
|
||||
"unable to claim gpio %u\n",
|
||||
button->gpio);
|
||||
|
||||
bdata->gpiod = gpio_to_desc(button->gpio);
|
||||
if (!bdata->gpiod) {
|
||||
|
@ -1827,6 +1827,9 @@ static int __init iommu_init_pci(struct amd_iommu *iommu)
|
||||
/* Prevent binding other PCI device drivers to IOMMU devices */
|
||||
iommu->dev->match_driver = false;
|
||||
|
||||
/* ACPI _PRT won't have an IRQ for IOMMU */
|
||||
iommu->dev->irq_managed = 1;
|
||||
|
||||
pci_read_config_dword(iommu->dev, cap_ptr + MMIO_CAP_HDR_OFFSET,
|
||||
&iommu->cap);
|
||||
|
||||
|
@ -489,6 +489,9 @@ devtlb_invalidation_with_pasid(struct intel_iommu *iommu,
|
||||
if (!info || !info->ats_enabled)
|
||||
return;
|
||||
|
||||
if (pci_dev_is_disconnected(to_pci_dev(dev)))
|
||||
return;
|
||||
|
||||
sid = info->bus << 8 | info->devfn;
|
||||
qdep = info->ats_qdep;
|
||||
pfsid = info->pfsid;
|
||||
|
@ -397,6 +397,7 @@ static int aw2013_probe(struct i2c_client *client)
|
||||
regulator_disable(chip->vcc_regulator);
|
||||
|
||||
error:
|
||||
mutex_unlock(&chip->mutex);
|
||||
mutex_destroy(&chip->mutex);
|
||||
return ret;
|
||||
}
|
||||
|
@ -114,8 +114,11 @@ static int sgm3140_brightness_set(struct led_classdev *led_cdev,
|
||||
"failed to enable regulator: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
gpiod_set_value_cansleep(priv->flash_gpio, 0);
|
||||
gpiod_set_value_cansleep(priv->enable_gpio, 1);
|
||||
} else {
|
||||
del_timer_sync(&priv->powerdown_timer);
|
||||
gpiod_set_value_cansleep(priv->flash_gpio, 0);
|
||||
gpiod_set_value_cansleep(priv->enable_gpio, 0);
|
||||
ret = regulator_disable(priv->vin_regulator);
|
||||
if (ret) {
|
||||
|
@ -48,11 +48,11 @@
|
||||
struct convert_context {
|
||||
struct completion restart;
|
||||
struct bio *bio_in;
|
||||
struct bio *bio_out;
|
||||
struct bvec_iter iter_in;
|
||||
struct bio *bio_out;
|
||||
struct bvec_iter iter_out;
|
||||
u64 cc_sector;
|
||||
atomic_t cc_pending;
|
||||
u64 cc_sector;
|
||||
union {
|
||||
struct skcipher_request *req;
|
||||
struct aead_request *req_aead;
|
||||
|
@ -3329,14 +3329,14 @@ static int raid_map(struct dm_target *ti, struct bio *bio)
|
||||
struct mddev *mddev = &rs->md;
|
||||
|
||||
/*
|
||||
* If we're reshaping to add disk(s)), ti->len and
|
||||
* If we're reshaping to add disk(s), ti->len and
|
||||
* mddev->array_sectors will differ during the process
|
||||
* (ti->len > mddev->array_sectors), so we have to requeue
|
||||
* bios with addresses > mddev->array_sectors here or
|
||||
* there will occur accesses past EOD of the component
|
||||
* data images thus erroring the raid set.
|
||||
*/
|
||||
if (unlikely(bio_end_sector(bio) > mddev->array_sectors))
|
||||
if (unlikely(bio_has_data(bio) && bio_end_sector(bio) > mddev->array_sectors))
|
||||
return DM_MAPIO_REQUEUE;
|
||||
|
||||
md_handle_request(mddev, bio);
|
||||
|
@ -74,11 +74,11 @@ struct dm_verity_io {
|
||||
/* original value of bio->bi_end_io */
|
||||
bio_end_io_t *orig_bi_end_io;
|
||||
|
||||
struct bvec_iter iter;
|
||||
|
||||
sector_t block;
|
||||
unsigned n_blocks;
|
||||
|
||||
struct bvec_iter iter;
|
||||
|
||||
struct work_struct work;
|
||||
|
||||
/*
|
||||
|
@ -2741,6 +2741,9 @@ static void __dm_internal_suspend(struct mapped_device *md, unsigned suspend_fla
|
||||
|
||||
static void __dm_internal_resume(struct mapped_device *md)
|
||||
{
|
||||
int r;
|
||||
struct dm_table *map;
|
||||
|
||||
BUG_ON(!md->internal_suspend_count);
|
||||
|
||||
if (--md->internal_suspend_count)
|
||||
@ -2749,12 +2752,23 @@ static void __dm_internal_resume(struct mapped_device *md)
|
||||
if (dm_suspended_md(md))
|
||||
goto done; /* resume from nested suspend */
|
||||
|
||||
/*
|
||||
* NOTE: existing callers don't need to call dm_table_resume_targets
|
||||
* (which may fail -- so best to avoid it for now by passing NULL map)
|
||||
*/
|
||||
(void) __dm_resume(md, NULL);
|
||||
|
||||
map = rcu_dereference_protected(md->map, lockdep_is_held(&md->suspend_lock));
|
||||
r = __dm_resume(md, map);
|
||||
if (r) {
|
||||
/*
|
||||
* If a preresume method of some target failed, we are in a
|
||||
* tricky situation. We can't return an error to the caller. We
|
||||
* can't fake success because then the "resume" and
|
||||
* "postsuspend" methods would not be paired correctly, and it
|
||||
* would break various targets, for example it would cause list
|
||||
* corruption in the "origin" target.
|
||||
*
|
||||
* So, we fake normal suspend here, to make sure that the
|
||||
* "resume" and "postsuspend" methods will be paired correctly.
|
||||
*/
|
||||
DMERR("Preresume method failed: %d", r);
|
||||
set_bit(DMF_SUSPENDED, &md->flags);
|
||||
}
|
||||
done:
|
||||
clear_bit(DMF_SUSPENDED_INTERNALLY, &md->flags);
|
||||
smp_mb__after_atomic();
|
||||
|
@ -6243,7 +6243,15 @@ static void md_clean(struct mddev *mddev)
|
||||
mddev->persistent = 0;
|
||||
mddev->level = LEVEL_NONE;
|
||||
mddev->clevel[0] = 0;
|
||||
mddev->flags = 0;
|
||||
/*
|
||||
* Don't clear MD_CLOSING, or mddev can be opened again.
|
||||
* 'hold_active != 0' means mddev is still in the creation
|
||||
* process and will be used later.
|
||||
*/
|
||||
if (mddev->hold_active)
|
||||
mddev->flags = 0;
|
||||
else
|
||||
mddev->flags &= BIT_ULL_MASK(MD_CLOSING);
|
||||
mddev->sb_flags = 0;
|
||||
mddev->ro = 0;
|
||||
mddev->metadata_type[0] = 0;
|
||||
@ -7536,7 +7544,6 @@ static inline bool md_ioctl_valid(unsigned int cmd)
|
||||
{
|
||||
switch (cmd) {
|
||||
case ADD_NEW_DISK:
|
||||
case BLKROSET:
|
||||
case GET_ARRAY_INFO:
|
||||
case GET_BITMAP_FILE:
|
||||
case GET_DISK_INFO:
|
||||
@ -7563,8 +7570,6 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
int err = 0;
|
||||
void __user *argp = (void __user *)arg;
|
||||
struct mddev *mddev = NULL;
|
||||
int ro;
|
||||
bool did_set_md_closing = false;
|
||||
|
||||
if (!md_ioctl_valid(cmd))
|
||||
return -ENOTTY;
|
||||
@ -7651,7 +7656,6 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
err = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
did_set_md_closing = true;
|
||||
mutex_unlock(&mddev->open_mutex);
|
||||
sync_blockdev(bdev);
|
||||
}
|
||||
@ -7746,35 +7750,6 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
goto unlock;
|
||||
}
|
||||
break;
|
||||
|
||||
case BLKROSET:
|
||||
if (get_user(ro, (int __user *)(arg))) {
|
||||
err = -EFAULT;
|
||||
goto unlock;
|
||||
}
|
||||
err = -EINVAL;
|
||||
|
||||
/* if the bdev is going readonly the value of mddev->ro
|
||||
* does not matter, no writes are coming
|
||||
*/
|
||||
if (ro)
|
||||
goto unlock;
|
||||
|
||||
/* are we are already prepared for writes? */
|
||||
if (mddev->ro != 1)
|
||||
goto unlock;
|
||||
|
||||
/* transitioning to readauto need only happen for
|
||||
* arrays that call md_write_start
|
||||
*/
|
||||
if (mddev->pers) {
|
||||
err = restart_array(mddev);
|
||||
if (err == 0) {
|
||||
mddev->ro = 2;
|
||||
set_disk_ro(mddev->gendisk, 0);
|
||||
}
|
||||
}
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -7844,7 +7819,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
mddev->hold_active = 0;
|
||||
mddev_unlock(mddev);
|
||||
out:
|
||||
if(did_set_md_closing)
|
||||
if (cmd == STOP_ARRAY_RO || (err && cmd == STOP_ARRAY))
|
||||
clear_bit(MD_CLOSING, &mddev->flags);
|
||||
return err;
|
||||
}
|
||||
@ -7868,6 +7843,36 @@ static int md_compat_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
}
|
||||
#endif /* CONFIG_COMPAT */
|
||||
|
||||
static int md_set_read_only(struct block_device *bdev, bool ro)
|
||||
{
|
||||
struct mddev *mddev = bdev->bd_disk->private_data;
|
||||
int err;
|
||||
|
||||
err = mddev_lock(mddev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (!mddev->raid_disks && !mddev->external) {
|
||||
err = -ENODEV;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
/*
|
||||
* Transitioning to read-auto need only happen for arrays that call
|
||||
* md_write_start and which are not ready for writes yet.
|
||||
*/
|
||||
if (!ro && mddev->ro == 1 && mddev->pers) {
|
||||
err = restart_array(mddev);
|
||||
if (err)
|
||||
goto out_unlock;
|
||||
mddev->ro = 2;
|
||||
}
|
||||
|
||||
out_unlock:
|
||||
mddev_unlock(mddev);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int md_open(struct block_device *bdev, fmode_t mode)
|
||||
{
|
||||
/*
|
||||
@ -7944,6 +7949,7 @@ const struct block_device_operations md_fops =
|
||||
#endif
|
||||
.getgeo = md_getgeo,
|
||||
.check_events = md_check_events,
|
||||
.set_read_only = md_set_read_only,
|
||||
};
|
||||
|
||||
static int md_thread(void *arg)
|
||||
|
@ -113,6 +113,7 @@ int tpg_alloc(struct tpg_data *tpg, unsigned max_w)
|
||||
{
|
||||
unsigned pat;
|
||||
unsigned plane;
|
||||
int ret = 0;
|
||||
|
||||
tpg->max_line_width = max_w;
|
||||
for (pat = 0; pat < TPG_MAX_PAT_LINES; pat++) {
|
||||
@ -121,14 +122,18 @@ int tpg_alloc(struct tpg_data *tpg, unsigned max_w)
|
||||
|
||||
tpg->lines[pat][plane] =
|
||||
vzalloc(array3_size(max_w, 2, pixelsz));
|
||||
if (!tpg->lines[pat][plane])
|
||||
return -ENOMEM;
|
||||
if (!tpg->lines[pat][plane]) {
|
||||
ret = -ENOMEM;
|
||||
goto free_lines;
|
||||
}
|
||||
if (plane == 0)
|
||||
continue;
|
||||
tpg->downsampled_lines[pat][plane] =
|
||||
vzalloc(array3_size(max_w, 2, pixelsz));
|
||||
if (!tpg->downsampled_lines[pat][plane])
|
||||
return -ENOMEM;
|
||||
if (!tpg->downsampled_lines[pat][plane]) {
|
||||
ret = -ENOMEM;
|
||||
goto free_lines;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (plane = 0; plane < TPG_MAX_PLANES; plane++) {
|
||||
@ -136,18 +141,45 @@ int tpg_alloc(struct tpg_data *tpg, unsigned max_w)
|
||||
|
||||
tpg->contrast_line[plane] =
|
||||
vzalloc(array_size(pixelsz, max_w));
|
||||
if (!tpg->contrast_line[plane])
|
||||
return -ENOMEM;
|
||||
if (!tpg->contrast_line[plane]) {
|
||||
ret = -ENOMEM;
|
||||
goto free_contrast_line;
|
||||
}
|
||||
tpg->black_line[plane] =
|
||||
vzalloc(array_size(pixelsz, max_w));
|
||||
if (!tpg->black_line[plane])
|
||||
return -ENOMEM;
|
||||
if (!tpg->black_line[plane]) {
|
||||
ret = -ENOMEM;
|
||||
goto free_contrast_line;
|
||||
}
|
||||
tpg->random_line[plane] =
|
||||
vzalloc(array3_size(max_w, 2, pixelsz));
|
||||
if (!tpg->random_line[plane])
|
||||
return -ENOMEM;
|
||||
if (!tpg->random_line[plane]) {
|
||||
ret = -ENOMEM;
|
||||
goto free_contrast_line;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
free_contrast_line:
|
||||
for (plane = 0; plane < TPG_MAX_PLANES; plane++) {
|
||||
vfree(tpg->contrast_line[plane]);
|
||||
vfree(tpg->black_line[plane]);
|
||||
vfree(tpg->random_line[plane]);
|
||||
tpg->contrast_line[plane] = NULL;
|
||||
tpg->black_line[plane] = NULL;
|
||||
tpg->random_line[plane] = NULL;
|
||||
}
|
||||
free_lines:
|
||||
for (pat = 0; pat < TPG_MAX_PAT_LINES; pat++)
|
||||
for (plane = 0; plane < TPG_MAX_PLANES; plane++) {
|
||||
vfree(tpg->lines[pat][plane]);
|
||||
tpg->lines[pat][plane] = NULL;
|
||||
if (plane == 0)
|
||||
continue;
|
||||
vfree(tpg->downsampled_lines[pat][plane]);
|
||||
tpg->downsampled_lines[pat][plane] = NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tpg_alloc);
|
||||
|
||||
|
@ -504,6 +504,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
|
||||
dvbdevfops = kmemdup(template->fops, sizeof(*dvbdevfops), GFP_KERNEL);
|
||||
if (!dvbdevfops) {
|
||||
kfree(dvbdev);
|
||||
*pdvbdev = NULL;
|
||||
mutex_unlock(&dvbdev_register_lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
@ -512,6 +513,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
|
||||
if (!new_node) {
|
||||
kfree(dvbdevfops);
|
||||
kfree(dvbdev);
|
||||
*pdvbdev = NULL;
|
||||
mutex_unlock(&dvbdev_register_lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
@ -545,6 +547,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
|
||||
}
|
||||
list_del (&dvbdev->list_head);
|
||||
kfree(dvbdev);
|
||||
*pdvbdev = NULL;
|
||||
up_write(&minor_rwsem);
|
||||
mutex_unlock(&dvbdev_register_lock);
|
||||
return -EINVAL;
|
||||
@ -567,6 +570,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
|
||||
dvb_media_device_free(dvbdev);
|
||||
list_del (&dvbdev->list_head);
|
||||
kfree(dvbdev);
|
||||
*pdvbdev = NULL;
|
||||
mutex_unlock(&dvbdev_register_lock);
|
||||
return ret;
|
||||
}
|
||||
@ -585,6 +589,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
|
||||
dvb_media_device_free(dvbdev);
|
||||
list_del (&dvbdev->list_head);
|
||||
kfree(dvbdev);
|
||||
*pdvbdev = NULL;
|
||||
mutex_unlock(&dvbdev_register_lock);
|
||||
return PTR_ERR(clsdev);
|
||||
}
|
||||
|
@ -118,50 +118,32 @@ static const s32 stv0367cab_RF_LookUp2[RF_LOOKUP_TABLE2_SIZE][RF_LOOKUP_TABLE2_S
|
||||
}
|
||||
};
|
||||
|
||||
static
|
||||
int stv0367_writeregs(struct stv0367_state *state, u16 reg, u8 *data, int len)
|
||||
static noinline_for_stack
|
||||
int stv0367_writereg(struct stv0367_state *state, u16 reg, u8 data)
|
||||
{
|
||||
u8 buf[MAX_XFER_SIZE];
|
||||
u8 buf[3] = { MSB(reg), LSB(reg), data };
|
||||
struct i2c_msg msg = {
|
||||
.addr = state->config->demod_address,
|
||||
.flags = 0,
|
||||
.buf = buf,
|
||||
.len = len + 2
|
||||
.len = 3,
|
||||
};
|
||||
int ret;
|
||||
|
||||
if (2 + len > sizeof(buf)) {
|
||||
printk(KERN_WARNING
|
||||
"%s: i2c wr reg=%04x: len=%d is too big!\n",
|
||||
KBUILD_MODNAME, reg, len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
buf[0] = MSB(reg);
|
||||
buf[1] = LSB(reg);
|
||||
memcpy(buf + 2, data, len);
|
||||
|
||||
if (i2cdebug)
|
||||
printk(KERN_DEBUG "%s: [%02x] %02x: %02x\n", __func__,
|
||||
state->config->demod_address, reg, buf[2]);
|
||||
state->config->demod_address, reg, data);
|
||||
|
||||
ret = i2c_transfer(state->i2c, &msg, 1);
|
||||
if (ret != 1)
|
||||
printk(KERN_ERR "%s: i2c write error! ([%02x] %02x: %02x)\n",
|
||||
__func__, state->config->demod_address, reg, buf[2]);
|
||||
__func__, state->config->demod_address, reg, data);
|
||||
|
||||
return (ret != 1) ? -EREMOTEIO : 0;
|
||||
}
|
||||
|
||||
static int stv0367_writereg(struct stv0367_state *state, u16 reg, u8 data)
|
||||
{
|
||||
u8 tmp = data; /* see gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 */
|
||||
|
||||
return stv0367_writeregs(state, reg, &tmp, 1);
|
||||
}
|
||||
|
||||
static u8 stv0367_readreg(struct stv0367_state *state, u16 reg)
|
||||
static noinline_for_stack
|
||||
u8 stv0367_readreg(struct stv0367_state *state, u16 reg)
|
||||
{
|
||||
u8 b0[] = { 0, 0 };
|
||||
u8 b1[] = { 0 };
|
||||
|
@ -2108,9 +2108,6 @@ static int tc358743_probe(struct i2c_client *client)
|
||||
state->mbus_fmt_code = MEDIA_BUS_FMT_RGB888_1X24;
|
||||
|
||||
sd->dev = &client->dev;
|
||||
err = v4l2_async_register_subdev(sd);
|
||||
if (err < 0)
|
||||
goto err_hdl;
|
||||
|
||||
mutex_init(&state->confctl_mutex);
|
||||
|
||||
@ -2168,6 +2165,10 @@ static int tc358743_probe(struct i2c_client *client)
|
||||
if (err)
|
||||
goto err_work_queues;
|
||||
|
||||
err = v4l2_async_register_subdev(sd);
|
||||
if (err < 0)
|
||||
goto err_work_queues;
|
||||
|
||||
v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
|
||||
client->addr << 1, client->adapter->name);
|
||||
|
||||
|
@ -1462,7 +1462,8 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio
|
||||
budget_av->has_saa7113 = 1;
|
||||
err = saa7146_vv_init(dev, &vv_data);
|
||||
if (err != 0) {
|
||||
/* fixme: proper cleanup here */
|
||||
ttpci_budget_deinit(&budget_av->budget);
|
||||
kfree(budget_av);
|
||||
ERR("cannot init vv subsystem\n");
|
||||
return err;
|
||||
}
|
||||
@ -1471,9 +1472,10 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio
|
||||
vv_data.vid_ops.vidioc_s_input = vidioc_s_input;
|
||||
|
||||
if ((err = saa7146_register_device(&budget_av->vd, dev, "knc1", VFL_TYPE_VIDEO))) {
|
||||
/* fixme: proper cleanup here */
|
||||
ERR("cannot register capture v4l2 device\n");
|
||||
saa7146_vv_release(dev);
|
||||
ttpci_budget_deinit(&budget_av->budget);
|
||||
kfree(budget_av);
|
||||
ERR("cannot register capture v4l2 device\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ static void mtk_mdp_vpu_handle_init_ack(const struct mdp_ipi_comm_ack *msg)
|
||||
vpu->inst_addr = msg->vpu_inst_addr;
|
||||
}
|
||||
|
||||
static void mtk_mdp_vpu_ipi_handler(const void *data, unsigned int len,
|
||||
static void mtk_mdp_vpu_ipi_handler(void *data, unsigned int len,
|
||||
void *priv)
|
||||
{
|
||||
const struct mdp_ipi_comm_ack *msg = data;
|
||||
|
@ -29,15 +29,7 @@ static int mtk_vcodec_vpu_set_ipi_register(struct mtk_vcodec_fw *fw, int id,
|
||||
mtk_vcodec_ipi_handler handler,
|
||||
const char *name, void *priv)
|
||||
{
|
||||
/*
|
||||
* The handler we receive takes a void * as its first argument. We
|
||||
* cannot change this because it needs to be passed down to the rproc
|
||||
* subsystem when SCP is used. VPU takes a const argument, which is
|
||||
* more constrained, so the conversion below is safe.
|
||||
*/
|
||||
ipi_handler_t handler_const = (ipi_handler_t)handler;
|
||||
|
||||
return vpu_ipi_register(fw->pdev, id, handler_const, name, priv);
|
||||
return vpu_ipi_register(fw->pdev, id, handler, name, priv);
|
||||
}
|
||||
|
||||
static int mtk_vcodec_vpu_ipi_send(struct mtk_vcodec_fw *fw, int id, void *buf,
|
||||
|
@ -612,7 +612,7 @@ int vpu_load_firmware(struct platform_device *pdev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vpu_load_firmware);
|
||||
|
||||
static void vpu_init_ipi_handler(const void *data, unsigned int len, void *priv)
|
||||
static void vpu_init_ipi_handler(void *data, unsigned int len, void *priv)
|
||||
{
|
||||
struct mtk_vpu *vpu = priv;
|
||||
const struct vpu_run *run = data;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* VPU interfaces with other blocks by share memory and interrupt.
|
||||
**/
|
||||
|
||||
typedef void (*ipi_handler_t) (const void *data,
|
||||
typedef void (*ipi_handler_t) (void *data,
|
||||
unsigned int len,
|
||||
void *priv);
|
||||
|
||||
|
@ -66,6 +66,7 @@ static void deinterlace_device_run(void *priv)
|
||||
struct vb2_v4l2_buffer *src, *dst;
|
||||
unsigned int hstep, vstep;
|
||||
dma_addr_t addr;
|
||||
int i;
|
||||
|
||||
src = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
dst = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
|
||||
@ -160,6 +161,26 @@ static void deinterlace_device_run(void *priv)
|
||||
deinterlace_write(dev, DEINTERLACE_CH1_HORZ_FACT, hstep);
|
||||
deinterlace_write(dev, DEINTERLACE_CH1_VERT_FACT, vstep);
|
||||
|
||||
/* neutral filter coefficients */
|
||||
deinterlace_set_bits(dev, DEINTERLACE_FRM_CTRL,
|
||||
DEINTERLACE_FRM_CTRL_COEF_ACCESS);
|
||||
readl_poll_timeout(dev->base + DEINTERLACE_STATUS, val,
|
||||
val & DEINTERLACE_STATUS_COEF_STATUS, 2, 40);
|
||||
|
||||
for (i = 0; i < 32; i++) {
|
||||
deinterlace_write(dev, DEINTERLACE_CH0_HORZ_COEF0 + i * 4,
|
||||
DEINTERLACE_IDENTITY_COEF);
|
||||
deinterlace_write(dev, DEINTERLACE_CH0_VERT_COEF + i * 4,
|
||||
DEINTERLACE_IDENTITY_COEF);
|
||||
deinterlace_write(dev, DEINTERLACE_CH1_HORZ_COEF0 + i * 4,
|
||||
DEINTERLACE_IDENTITY_COEF);
|
||||
deinterlace_write(dev, DEINTERLACE_CH1_VERT_COEF + i * 4,
|
||||
DEINTERLACE_IDENTITY_COEF);
|
||||
}
|
||||
|
||||
deinterlace_clr_set_bits(dev, DEINTERLACE_FRM_CTRL,
|
||||
DEINTERLACE_FRM_CTRL_COEF_ACCESS, 0);
|
||||
|
||||
deinterlace_clr_set_bits(dev, DEINTERLACE_FIELD_CTRL,
|
||||
DEINTERLACE_FIELD_CTRL_FIELD_CNT_MSK,
|
||||
DEINTERLACE_FIELD_CTRL_FIELD_CNT(ctx->field));
|
||||
@ -248,7 +269,6 @@ static irqreturn_t deinterlace_irq(int irq, void *data)
|
||||
static void deinterlace_init(struct deinterlace_dev *dev)
|
||||
{
|
||||
u32 val;
|
||||
int i;
|
||||
|
||||
deinterlace_write(dev, DEINTERLACE_BYPASS,
|
||||
DEINTERLACE_BYPASS_CSC);
|
||||
@ -284,27 +304,7 @@ static void deinterlace_init(struct deinterlace_dev *dev)
|
||||
|
||||
deinterlace_clr_set_bits(dev, DEINTERLACE_CHROMA_DIFF,
|
||||
DEINTERLACE_CHROMA_DIFF_TH_MSK,
|
||||
DEINTERLACE_CHROMA_DIFF_TH(5));
|
||||
|
||||
/* neutral filter coefficients */
|
||||
deinterlace_set_bits(dev, DEINTERLACE_FRM_CTRL,
|
||||
DEINTERLACE_FRM_CTRL_COEF_ACCESS);
|
||||
readl_poll_timeout(dev->base + DEINTERLACE_STATUS, val,
|
||||
val & DEINTERLACE_STATUS_COEF_STATUS, 2, 40);
|
||||
|
||||
for (i = 0; i < 32; i++) {
|
||||
deinterlace_write(dev, DEINTERLACE_CH0_HORZ_COEF0 + i * 4,
|
||||
DEINTERLACE_IDENTITY_COEF);
|
||||
deinterlace_write(dev, DEINTERLACE_CH0_VERT_COEF + i * 4,
|
||||
DEINTERLACE_IDENTITY_COEF);
|
||||
deinterlace_write(dev, DEINTERLACE_CH1_HORZ_COEF0 + i * 4,
|
||||
DEINTERLACE_IDENTITY_COEF);
|
||||
deinterlace_write(dev, DEINTERLACE_CH1_VERT_COEF + i * 4,
|
||||
DEINTERLACE_IDENTITY_COEF);
|
||||
}
|
||||
|
||||
deinterlace_clr_set_bits(dev, DEINTERLACE_FRM_CTRL,
|
||||
DEINTERLACE_FRM_CTRL_COEF_ACCESS, 0);
|
||||
DEINTERLACE_CHROMA_DIFF_TH(31));
|
||||
}
|
||||
|
||||
static inline struct deinterlace_ctx *deinterlace_file2ctx(struct file *file)
|
||||
@ -937,11 +937,18 @@ static int deinterlace_runtime_resume(struct device *device)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = reset_control_deassert(dev->rstc);
|
||||
if (ret) {
|
||||
dev_err(dev->dev, "Failed to apply reset\n");
|
||||
|
||||
goto err_exclusive_rate;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(dev->bus_clk);
|
||||
if (ret) {
|
||||
dev_err(dev->dev, "Failed to enable bus clock\n");
|
||||
|
||||
goto err_exclusive_rate;
|
||||
goto err_rst;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(dev->mod_clk);
|
||||
@ -958,23 +965,16 @@ static int deinterlace_runtime_resume(struct device *device)
|
||||
goto err_mod_clk;
|
||||
}
|
||||
|
||||
ret = reset_control_deassert(dev->rstc);
|
||||
if (ret) {
|
||||
dev_err(dev->dev, "Failed to apply reset\n");
|
||||
|
||||
goto err_ram_clk;
|
||||
}
|
||||
|
||||
deinterlace_init(dev);
|
||||
|
||||
return 0;
|
||||
|
||||
err_ram_clk:
|
||||
clk_disable_unprepare(dev->ram_clk);
|
||||
err_mod_clk:
|
||||
clk_disable_unprepare(dev->mod_clk);
|
||||
err_bus_clk:
|
||||
clk_disable_unprepare(dev->bus_clk);
|
||||
err_rst:
|
||||
reset_control_assert(dev->rstc);
|
||||
err_exclusive_rate:
|
||||
clk_rate_exclusive_put(dev->mod_clk);
|
||||
|
||||
@ -985,11 +985,12 @@ static int deinterlace_runtime_suspend(struct device *device)
|
||||
{
|
||||
struct deinterlace_dev *dev = dev_get_drvdata(device);
|
||||
|
||||
reset_control_assert(dev->rstc);
|
||||
|
||||
clk_disable_unprepare(dev->ram_clk);
|
||||
clk_disable_unprepare(dev->mod_clk);
|
||||
clk_disable_unprepare(dev->bus_clk);
|
||||
|
||||
reset_control_assert(dev->rstc);
|
||||
|
||||
clk_rate_exclusive_put(dev->mod_clk);
|
||||
|
||||
return 0;
|
||||
|
@ -4049,6 +4049,10 @@ static int em28xx_usb_probe(struct usb_interface *intf,
|
||||
* topology will likely change after the load of the em28xx subdrivers.
|
||||
*/
|
||||
#ifdef CONFIG_MEDIA_CONTROLLER
|
||||
/*
|
||||
* No need to check the return value, the device will still be
|
||||
* usable without media controller API.
|
||||
*/
|
||||
retval = media_device_register(dev->media_dev);
|
||||
#endif
|
||||
|
||||
|
@ -80,7 +80,7 @@ static int go7007_load_encoder(struct go7007 *go)
|
||||
const struct firmware *fw_entry;
|
||||
char fw_name[] = "go7007/go7007fw.bin";
|
||||
void *bounce;
|
||||
int fw_len, rv = 0;
|
||||
int fw_len;
|
||||
u16 intr_val, intr_data;
|
||||
|
||||
if (go->boot_fw == NULL) {
|
||||
@ -109,9 +109,11 @@ static int go7007_load_encoder(struct go7007 *go)
|
||||
go7007_read_interrupt(go, &intr_val, &intr_data) < 0 ||
|
||||
(intr_val & ~0x1) != 0x5a5a) {
|
||||
v4l2_err(go, "error transferring firmware\n");
|
||||
rv = -1;
|
||||
kfree(go->boot_fw);
|
||||
go->boot_fw = NULL;
|
||||
return -1;
|
||||
}
|
||||
return rv;
|
||||
return 0;
|
||||
}
|
||||
|
||||
MODULE_FIRMWARE("go7007/go7007fw.bin");
|
||||
|
@ -1201,7 +1201,9 @@ static int go7007_usb_probe(struct usb_interface *intf,
|
||||
u16 channel;
|
||||
|
||||
/* read channel number from GPIO[1:0] */
|
||||
go7007_read_addr(go, 0x3c81, &channel);
|
||||
if (go7007_read_addr(go, 0x3c81, &channel))
|
||||
goto allocfail;
|
||||
|
||||
channel &= 0x3;
|
||||
go->board_id = GO7007_BOARDID_ADLINK_MPG24;
|
||||
usb->board = board = &board_adlink_mpg24;
|
||||
|
@ -90,8 +90,10 @@ static void pvr2_context_destroy(struct pvr2_context *mp)
|
||||
}
|
||||
|
||||
|
||||
static void pvr2_context_notify(struct pvr2_context *mp)
|
||||
static void pvr2_context_notify(void *ptr)
|
||||
{
|
||||
struct pvr2_context *mp = ptr;
|
||||
|
||||
pvr2_context_set_notify(mp,!0);
|
||||
}
|
||||
|
||||
@ -106,9 +108,7 @@ static void pvr2_context_check(struct pvr2_context *mp)
|
||||
pvr2_trace(PVR2_TRACE_CTXT,
|
||||
"pvr2_context %p (initialize)", mp);
|
||||
/* Finish hardware initialization */
|
||||
if (pvr2_hdw_initialize(mp->hdw,
|
||||
(void (*)(void *))pvr2_context_notify,
|
||||
mp)) {
|
||||
if (pvr2_hdw_initialize(mp->hdw, pvr2_context_notify, mp)) {
|
||||
mp->video_stream.stream =
|
||||
pvr2_hdw_get_video_stream(mp->hdw);
|
||||
/* Trigger interface initialization. By doing this
|
||||
@ -267,9 +267,9 @@ static void pvr2_context_exit(struct pvr2_context *mp)
|
||||
void pvr2_context_disconnect(struct pvr2_context *mp)
|
||||
{
|
||||
pvr2_hdw_disconnect(mp->hdw);
|
||||
mp->disconnect_flag = !0;
|
||||
if (!pvr2_context_shutok())
|
||||
pvr2_context_notify(mp);
|
||||
mp->disconnect_flag = !0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,8 +88,10 @@ static int pvr2_dvb_feed_thread(void *data)
|
||||
return stat;
|
||||
}
|
||||
|
||||
static void pvr2_dvb_notify(struct pvr2_dvb_adapter *adap)
|
||||
static void pvr2_dvb_notify(void *ptr)
|
||||
{
|
||||
struct pvr2_dvb_adapter *adap = ptr;
|
||||
|
||||
wake_up(&adap->buffer_wait_data);
|
||||
}
|
||||
|
||||
@ -149,7 +151,7 @@ static int pvr2_dvb_stream_do_start(struct pvr2_dvb_adapter *adap)
|
||||
}
|
||||
|
||||
pvr2_stream_set_callback(pvr->video_stream.stream,
|
||||
(pvr2_stream_callback) pvr2_dvb_notify, adap);
|
||||
pvr2_dvb_notify, adap);
|
||||
|
||||
ret = pvr2_stream_set_buffer_count(stream, PVR2_DVB_BUFFER_COUNT);
|
||||
if (ret < 0) return ret;
|
||||
|
@ -1037,8 +1037,10 @@ static int pvr2_v4l2_open(struct file *file)
|
||||
}
|
||||
|
||||
|
||||
static void pvr2_v4l2_notify(struct pvr2_v4l2_fh *fhp)
|
||||
static void pvr2_v4l2_notify(void *ptr)
|
||||
{
|
||||
struct pvr2_v4l2_fh *fhp = ptr;
|
||||
|
||||
wake_up(&fhp->wait_data);
|
||||
}
|
||||
|
||||
@ -1071,7 +1073,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh)
|
||||
|
||||
hdw = fh->channel.mc_head->hdw;
|
||||
sp = fh->pdi->stream->stream;
|
||||
pvr2_stream_set_callback(sp,(pvr2_stream_callback)pvr2_v4l2_notify,fh);
|
||||
pvr2_stream_set_callback(sp, pvr2_v4l2_notify, fh);
|
||||
pvr2_hdw_set_stream_type(hdw,fh->pdi->config);
|
||||
if ((ret = pvr2_hdw_set_streaming(hdw,!0)) < 0) return ret;
|
||||
return pvr2_ioread_set_enabled(fh->rhp,!0);
|
||||
@ -1202,11 +1204,6 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
|
||||
dip->minor_type = pvr2_v4l_type_video;
|
||||
nr_ptr = video_nr;
|
||||
caps |= V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_AUDIO;
|
||||
if (!dip->stream) {
|
||||
pr_err(KBUILD_MODNAME
|
||||
": Failed to set up pvrusb2 v4l video dev due to missing stream instance\n");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case VFL_TYPE_VBI:
|
||||
dip->config = pvr2_config_vbi;
|
||||
|
@ -1053,11 +1053,17 @@ static int v4l2_m2m_register_entity(struct media_device *mdev,
|
||||
entity->function = function;
|
||||
|
||||
ret = media_entity_pads_init(entity, num_pads, pads);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
kfree(entity->name);
|
||||
entity->name = NULL;
|
||||
return ret;
|
||||
}
|
||||
ret = media_device_register_entity(mdev, entity);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
kfree(entity->name);
|
||||
entity->name = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -110,7 +110,9 @@ struct regmap *altr_sysmgr_regmap_lookup_by_phandle(struct device_node *np,
|
||||
|
||||
dev = driver_find_device_by_of_node(&altr_sysmgr_driver.driver,
|
||||
(void *)sysmgr_np);
|
||||
of_node_put(sysmgr_np);
|
||||
if (property)
|
||||
of_node_put(sysmgr_np);
|
||||
|
||||
if (!dev)
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
|
||||
|
@ -224,7 +224,9 @@ struct regmap *syscon_regmap_lookup_by_phandle(struct device_node *np,
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
regmap = syscon_node_to_regmap(syscon_np);
|
||||
of_node_put(syscon_np);
|
||||
|
||||
if (property)
|
||||
of_node_put(syscon_np);
|
||||
|
||||
return regmap;
|
||||
}
|
||||
|
@ -889,7 +889,6 @@ static int wmt_mci_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct mmc_host *mmc;
|
||||
struct wmt_mci_priv *priv;
|
||||
struct resource *res;
|
||||
u32 reg_tmp;
|
||||
|
||||
mmc = platform_get_drvdata(pdev);
|
||||
@ -917,9 +916,6 @@ static int wmt_mci_remove(struct platform_device *pdev)
|
||||
clk_disable_unprepare(priv->clk_sdmmc);
|
||||
clk_put(priv->clk_sdmmc);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
release_mem_region(res->start, resource_size(res));
|
||||
|
||||
mmc_free_host(mmc);
|
||||
|
||||
dev_info(&pdev->dev, "WMT MCI device removed\n");
|
||||
|
@ -528,7 +528,7 @@ static int physmap_flash_probe(struct platform_device *dev)
|
||||
if (!info->maps[i].phys)
|
||||
info->maps[i].phys = res->start;
|
||||
|
||||
info->win_order = get_bitmask_order(resource_size(res)) - 1;
|
||||
info->win_order = fls64(resource_size(res)) - 1;
|
||||
info->maps[i].size = BIT(info->win_order +
|
||||
(info->gpios ?
|
||||
info->gpios->ndescs : 0));
|
||||
|
@ -304,8 +304,9 @@ static int lpc32xx_nand_device_ready(struct nand_chip *nand_chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static irqreturn_t lpc3xxx_nand_irq(int irq, struct lpc32xx_nand_host *host)
|
||||
static irqreturn_t lpc3xxx_nand_irq(int irq, void *data)
|
||||
{
|
||||
struct lpc32xx_nand_host *host = data;
|
||||
uint8_t sr;
|
||||
|
||||
/* Clear interrupt flag by reading status */
|
||||
@ -780,7 +781,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
|
||||
goto release_dma_chan;
|
||||
}
|
||||
|
||||
if (request_irq(host->irq, (irq_handler_t)&lpc3xxx_nand_irq,
|
||||
if (request_irq(host->irq, &lpc3xxx_nand_irq,
|
||||
IRQF_TRIGGER_HIGH, DRV_NAME, host)) {
|
||||
dev_err(&pdev->dev, "Error requesting NAND IRQ\n");
|
||||
res = -ENXIO;
|
||||
|
@ -1581,11 +1581,11 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
*/
|
||||
if (priv->mcm) {
|
||||
reset_control_assert(priv->rstc);
|
||||
usleep_range(1000, 1100);
|
||||
usleep_range(5000, 5100);
|
||||
reset_control_deassert(priv->rstc);
|
||||
} else {
|
||||
gpiod_set_value_cansleep(priv->reset, 0);
|
||||
usleep_range(1000, 1100);
|
||||
usleep_range(5000, 5100);
|
||||
gpiod_set_value_cansleep(priv->reset, 1);
|
||||
}
|
||||
|
||||
@ -1704,11 +1704,11 @@ mt7531_setup(struct dsa_switch *ds)
|
||||
*/
|
||||
if (priv->mcm) {
|
||||
reset_control_assert(priv->rstc);
|
||||
usleep_range(1000, 1100);
|
||||
usleep_range(5000, 5100);
|
||||
reset_control_deassert(priv->rstc);
|
||||
} else {
|
||||
gpiod_set_value_cansleep(priv->reset, 0);
|
||||
usleep_range(1000, 1100);
|
||||
usleep_range(5000, 5100);
|
||||
gpiod_set_value_cansleep(priv->reset, 1);
|
||||
}
|
||||
|
||||
|
@ -3057,22 +3057,6 @@ static netdev_tx_t ena_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
static u16 ena_select_queue(struct net_device *dev, struct sk_buff *skb,
|
||||
struct net_device *sb_dev)
|
||||
{
|
||||
u16 qid;
|
||||
/* we suspect that this is good for in--kernel network services that
|
||||
* want to loop incoming skb rx to tx in normal user generated traffic,
|
||||
* most probably we will not get to this
|
||||
*/
|
||||
if (skb_rx_queue_recorded(skb))
|
||||
qid = skb_get_rx_queue(skb);
|
||||
else
|
||||
qid = netdev_pick_tx(dev, skb, NULL);
|
||||
|
||||
return qid;
|
||||
}
|
||||
|
||||
static void ena_config_host_info(struct ena_com_dev *ena_dev, struct pci_dev *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
@ -3242,7 +3226,6 @@ static const struct net_device_ops ena_netdev_ops = {
|
||||
.ndo_open = ena_open,
|
||||
.ndo_stop = ena_close,
|
||||
.ndo_start_xmit = ena_start_xmit,
|
||||
.ndo_select_queue = ena_select_queue,
|
||||
.ndo_get_stats64 = ena_get_stats64,
|
||||
.ndo_tx_timeout = ena_tx_timeout,
|
||||
.ndo_change_mtu = ena_change_mtu,
|
||||
|
@ -1002,9 +1002,6 @@ static inline void bnx2x_set_fw_mac_addr(__le16 *fw_hi, __le16 *fw_mid,
|
||||
static inline void bnx2x_free_rx_mem_pool(struct bnx2x *bp,
|
||||
struct bnx2x_alloc_pool *pool)
|
||||
{
|
||||
if (!pool->page)
|
||||
return;
|
||||
|
||||
put_page(pool->page);
|
||||
|
||||
pool->page = NULL;
|
||||
@ -1015,6 +1012,9 @@ static inline void bnx2x_free_rx_sge_range(struct bnx2x *bp,
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!fp->page_pool.page)
|
||||
return;
|
||||
|
||||
if (fp->mode == TPA_MODE_DISABLED)
|
||||
return;
|
||||
|
||||
|
@ -2723,7 +2723,10 @@ static int hclge_mac_init(struct hclge_dev *hdev)
|
||||
int ret;
|
||||
|
||||
hdev->support_sfp_query = true;
|
||||
hdev->hw.mac.duplex = HCLGE_MAC_FULL;
|
||||
|
||||
if (!test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state))
|
||||
hdev->hw.mac.duplex = HCLGE_MAC_FULL;
|
||||
|
||||
ret = hclge_cfg_mac_speed_dup_hw(hdev, hdev->hw.mac.speed,
|
||||
hdev->hw.mac.duplex);
|
||||
if (ret)
|
||||
|
@ -6762,77 +6762,75 @@ void igb_update_stats(struct igb_adapter *adapter)
|
||||
}
|
||||
}
|
||||
|
||||
static void igb_perout(struct igb_adapter *adapter, int tsintr_tt)
|
||||
{
|
||||
int pin = ptp_find_pin(adapter->ptp_clock, PTP_PF_PEROUT, tsintr_tt);
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
struct timespec64 ts;
|
||||
u32 tsauxc;
|
||||
|
||||
if (pin < 0 || pin >= IGB_N_PEROUT)
|
||||
return;
|
||||
|
||||
spin_lock(&adapter->tmreg_lock);
|
||||
ts = timespec64_add(adapter->perout[pin].start,
|
||||
adapter->perout[pin].period);
|
||||
/* u32 conversion of tv_sec is safe until y2106 */
|
||||
wr32((tsintr_tt == 1) ? E1000_TRGTTIML1 : E1000_TRGTTIML0, ts.tv_nsec);
|
||||
wr32((tsintr_tt == 1) ? E1000_TRGTTIMH1 : E1000_TRGTTIMH0, (u32)ts.tv_sec);
|
||||
tsauxc = rd32(E1000_TSAUXC);
|
||||
tsauxc |= TSAUXC_EN_TT0;
|
||||
wr32(E1000_TSAUXC, tsauxc);
|
||||
adapter->perout[pin].start = ts;
|
||||
spin_unlock(&adapter->tmreg_lock);
|
||||
}
|
||||
|
||||
static void igb_extts(struct igb_adapter *adapter, int tsintr_tt)
|
||||
{
|
||||
int pin = ptp_find_pin(adapter->ptp_clock, PTP_PF_EXTTS, tsintr_tt);
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
struct ptp_clock_event event;
|
||||
u32 sec, nsec;
|
||||
|
||||
if (pin < 0 || pin >= IGB_N_EXTTS)
|
||||
return;
|
||||
|
||||
nsec = rd32((tsintr_tt == 1) ? E1000_AUXSTMPL1 : E1000_AUXSTMPL0);
|
||||
sec = rd32((tsintr_tt == 1) ? E1000_AUXSTMPH1 : E1000_AUXSTMPH0);
|
||||
event.type = PTP_CLOCK_EXTTS;
|
||||
event.index = tsintr_tt;
|
||||
event.timestamp = sec * 1000000000ULL + nsec;
|
||||
ptp_clock_event(adapter->ptp_clock, &event);
|
||||
}
|
||||
|
||||
static void igb_tsync_interrupt(struct igb_adapter *adapter)
|
||||
{
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
u32 tsicr = rd32(E1000_TSICR);
|
||||
struct ptp_clock_event event;
|
||||
struct timespec64 ts;
|
||||
u32 ack = 0, tsauxc, sec, nsec, tsicr = rd32(E1000_TSICR);
|
||||
|
||||
if (tsicr & TSINTR_SYS_WRAP) {
|
||||
event.type = PTP_CLOCK_PPS;
|
||||
if (adapter->ptp_caps.pps)
|
||||
ptp_clock_event(adapter->ptp_clock, &event);
|
||||
ack |= TSINTR_SYS_WRAP;
|
||||
}
|
||||
|
||||
if (tsicr & E1000_TSICR_TXTS) {
|
||||
/* retrieve hardware timestamp */
|
||||
schedule_work(&adapter->ptp_tx_work);
|
||||
ack |= E1000_TSICR_TXTS;
|
||||
}
|
||||
|
||||
if (tsicr & TSINTR_TT0) {
|
||||
spin_lock(&adapter->tmreg_lock);
|
||||
ts = timespec64_add(adapter->perout[0].start,
|
||||
adapter->perout[0].period);
|
||||
/* u32 conversion of tv_sec is safe until y2106 */
|
||||
wr32(E1000_TRGTTIML0, ts.tv_nsec);
|
||||
wr32(E1000_TRGTTIMH0, (u32)ts.tv_sec);
|
||||
tsauxc = rd32(E1000_TSAUXC);
|
||||
tsauxc |= TSAUXC_EN_TT0;
|
||||
wr32(E1000_TSAUXC, tsauxc);
|
||||
adapter->perout[0].start = ts;
|
||||
spin_unlock(&adapter->tmreg_lock);
|
||||
ack |= TSINTR_TT0;
|
||||
}
|
||||
if (tsicr & TSINTR_TT0)
|
||||
igb_perout(adapter, 0);
|
||||
|
||||
if (tsicr & TSINTR_TT1) {
|
||||
spin_lock(&adapter->tmreg_lock);
|
||||
ts = timespec64_add(adapter->perout[1].start,
|
||||
adapter->perout[1].period);
|
||||
wr32(E1000_TRGTTIML1, ts.tv_nsec);
|
||||
wr32(E1000_TRGTTIMH1, (u32)ts.tv_sec);
|
||||
tsauxc = rd32(E1000_TSAUXC);
|
||||
tsauxc |= TSAUXC_EN_TT1;
|
||||
wr32(E1000_TSAUXC, tsauxc);
|
||||
adapter->perout[1].start = ts;
|
||||
spin_unlock(&adapter->tmreg_lock);
|
||||
ack |= TSINTR_TT1;
|
||||
}
|
||||
if (tsicr & TSINTR_TT1)
|
||||
igb_perout(adapter, 1);
|
||||
|
||||
if (tsicr & TSINTR_AUTT0) {
|
||||
nsec = rd32(E1000_AUXSTMPL0);
|
||||
sec = rd32(E1000_AUXSTMPH0);
|
||||
event.type = PTP_CLOCK_EXTTS;
|
||||
event.index = 0;
|
||||
event.timestamp = sec * 1000000000ULL + nsec;
|
||||
ptp_clock_event(adapter->ptp_clock, &event);
|
||||
ack |= TSINTR_AUTT0;
|
||||
}
|
||||
if (tsicr & TSINTR_AUTT0)
|
||||
igb_extts(adapter, 0);
|
||||
|
||||
if (tsicr & TSINTR_AUTT1) {
|
||||
nsec = rd32(E1000_AUXSTMPL1);
|
||||
sec = rd32(E1000_AUXSTMPH1);
|
||||
event.type = PTP_CLOCK_EXTTS;
|
||||
event.index = 1;
|
||||
event.timestamp = sec * 1000000000ULL + nsec;
|
||||
ptp_clock_event(adapter->ptp_clock, &event);
|
||||
ack |= TSINTR_AUTT1;
|
||||
}
|
||||
|
||||
/* acknowledge the interrupts */
|
||||
wr32(E1000_TSICR, ack);
|
||||
if (tsicr & TSINTR_AUTT1)
|
||||
igb_extts(adapter, 1);
|
||||
}
|
||||
|
||||
static irqreturn_t igb_msix_other(int irq, void *data)
|
||||
|
@ -714,7 +714,7 @@ static irqreturn_t cgx_fwi_event_handler(int irq, void *data)
|
||||
|
||||
/* Release thread waiting for completion */
|
||||
lmac->cmd_pend = false;
|
||||
wake_up_interruptible(&lmac->wq_cmd_cmplt);
|
||||
wake_up(&lmac->wq_cmd_cmplt);
|
||||
break;
|
||||
case CGX_EVT_ASYNC:
|
||||
if (cgx_event_is_linkevent(event))
|
||||
|
@ -1969,10 +1969,9 @@ static void rvu_queue_work(struct mbox_wq_info *mw, int first,
|
||||
}
|
||||
}
|
||||
|
||||
static irqreturn_t rvu_mbox_intr_handler(int irq, void *rvu_irq)
|
||||
static irqreturn_t rvu_mbox_pf_intr_handler(int irq, void *rvu_irq)
|
||||
{
|
||||
struct rvu *rvu = (struct rvu *)rvu_irq;
|
||||
int vfs = rvu->vfs;
|
||||
u64 intr;
|
||||
|
||||
intr = rvu_read64(rvu, BLKADDR_RVUM, RVU_AF_PFAF_MBOX_INT);
|
||||
@ -1986,6 +1985,18 @@ static irqreturn_t rvu_mbox_intr_handler(int irq, void *rvu_irq)
|
||||
|
||||
rvu_queue_work(&rvu->afpf_wq_info, 0, rvu->hw->total_pfs, intr);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static irqreturn_t rvu_mbox_intr_handler(int irq, void *rvu_irq)
|
||||
{
|
||||
struct rvu *rvu = (struct rvu *)rvu_irq;
|
||||
int vfs = rvu->vfs;
|
||||
u64 intr;
|
||||
|
||||
/* Sync with mbox memory region */
|
||||
rmb();
|
||||
|
||||
/* Handle VF interrupts */
|
||||
if (vfs > 64) {
|
||||
intr = rvupf_read64(rvu, RVU_PF_VFPF_MBOX_INTX(1));
|
||||
@ -2300,7 +2311,7 @@ static int rvu_register_interrupts(struct rvu *rvu)
|
||||
/* Register mailbox interrupt handler */
|
||||
sprintf(&rvu->irq_name[RVU_AF_INT_VEC_MBOX * NAME_SIZE], "RVUAF Mbox");
|
||||
ret = request_irq(pci_irq_vector(rvu->pdev, RVU_AF_INT_VEC_MBOX),
|
||||
rvu_mbox_intr_handler, 0,
|
||||
rvu_mbox_pf_intr_handler, 0,
|
||||
&rvu->irq_name[RVU_AF_INT_VEC_MBOX * NAME_SIZE], rvu);
|
||||
if (ret) {
|
||||
dev_err(rvu->dev,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user