Merge tag 'v4.19.325-cip126' of https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip into android13-4.19-kona
version 4.19.325-cip126 * tag 'v4.19.325-cip126' of https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip: CIP: Bump version suffix to -cip126 after merge from cip/linux-4.19.y-st tree net: ravb: Ensure memory write completes before ringing TX doorbell Update localversion-st, tree is up-to-date with 5.4.301. net: ravb: Ensure memory write completes before ringing TX doorbell net/ip6_tunnel: Prevent perpetual tunnel growth tracing: Fix race condition in kprobe initialization causing NULL pointer dereference rtc: interface: Ensure alarm irq is enabled when UIE is enabled tpm_tis: Fix incorrect arguments in tpm_tis_probe_irq_single media: s5p-mfc: remove an unused/uninitialized variable NFSD: Fix last write offset handling in layoutcommit NFSD: Minor cleanup in layoutcommit processing KEYS: trusted_tpm1: Compare HMAC values in constant time NFSD: Define a proc_layoutcommit for the FlexFiles layout type vfs: Don't leak disconnected dentries on umount ext4: detect invalid INLINE_DATA + EXTENTS flag combination drm/amdgpu: use atomic functions with memory barriers for vm fault info ext4: avoid potential buffer over-read in parse_apply_sb_mount_options() spi: cadence-quadspi: Flush posted register writes before DAC access spi: cadence-quadspi: Flush posted register writes before INDAC access memory: samsung: exynos-srom: Fix of_iomap leak in exynos_srom_probe memory: samsung: exynos-srom: Correct alignment arm64: cputype: Add Neoverse-V3AE definitions comedi: fix divide-by-zero in comedi_buf_munge() binder: remove "invalid inc weak" check xhci: dbc: enable back DbC in resume if it was enabled before suspend usb/core/quirks: Add Huawei ME906S to wakeup quirk USB: serial: option: add Telit FN920C04 ECM compositions USB: serial: option: add Quectel RG255C USB: serial: option: add UNISOC UIS7720 net: usb: rtl8150: Fix frame padding ocfs2: clear extent cache after moving/defragmenting extents MIPS: Malta: Fix keyboard resource preventing i8042 driver from registering Revert "cpuidle: menu: Avoid discarding useful information" sctp: avoid NULL dereference when chunk data buffer is missing arm64, mm: avoid always making PTE dirty in pte_mkwrite() net: add ndo_fdb_del_bulk net: netlink: add NLM_F_BULK delete request modifier net: rtnetlink: use BIT for flag values net: rtnetlink: add helper to extract msg type's kind net: rtnetlink: add msg kind names net: rtnetlink: remove redundant assignment to variable err m68k: bitops: Fix find_*_bit() signatures hfsplus: return EIO when type of hidden directory mismatch in hfsplus_fill_super() hfs: fix KMSAN uninit-value issue in hfs_find_set_zero_bits() dlm: check for defined force value in dlm_lockspace_release hfsplus: fix KMSAN uninit-value issue in hfsplus_delete_cat() hfs: validate record offset in hfsplus_bmap_alloc hfsplus: fix KMSAN uninit-value issue in __hfsplus_ext_cache_extent() hfs: make proper initalization of struct hfs_find_data hfs: clear offset and space out of valid records in b-tree node exec: Fix incorrect type for ret hfsplus: fix slab-out-of-bounds read in hfsplus_strcasecmp() tls: always set record_type in tls_process_cmsg tg3: prevent use of uninitialized remote_adv and local_adv variables amd-xgbe: Avoid spurious link down messages during interface toggle net: dlink: handle dma_map_single() failure properly net: dl2k: switch from 'pci_' to 'dma_' API xen/events: Update virq_to_irq on migration media: lirc: Fix error handling in lirc_register() media: rc: Directly use ida_free() drm/exynos: exynos7_drm_decon: remove ctx->suspended btrfs: avoid potential out-of-bounds in btrfs_encode_fh() pwm: berlin: Fix wrong register in suspend/resume media: cx18: Add missing check after DMA map xen/events: Cleanup find_virq() return codes cramfs: Verify inode mode when loading from disk pid: Add a judgment for ns null in pid_nr_ns minixfs: Verify inode mode when loading from disk mfd: intel_soc_pmic_chtdc_ti: Drop unneeded assignment for cache_type mfd: intel_soc_pmic_chtdc_ti: Fix invalid regmap-config max_register value Squashfs: reject negative file sizes in squashfs_read_inode() Squashfs: add additional inode sanity checking mfd: vexpress-sysreg: Check the return value of devm_gpiochip_add_data() fs: udf: fix OOB read in lengthAllocDescs handling KVM: x86: Don't (re)check L1 intercepts when completing userspace I/O net/9p: fix double req put in p9_fd_cancelled ext4: guard against EA inode refcount underflow in xattr update ext4: correctly handle queries for metadata mappings ext4: increase i_disksize to offset + len in ext4_update_disksize_before_punch() nfsd: nfserr_jukebox in nlm_fopen should lead to a retry x86/umip: Fix decoding of register forms of 0F 01 (SGDT and SIDT aliases) x86/umip: Check that the instruction opcode is at least two bytes PCI/AER: Fix missing uevent on recovery when a reset is requested rtc: interface: Fix long-standing race when setting alarm mmc: core: SPI mode remove cmd7 mtd: rawnand: fsmc: Default to autodetect buswidth sparc64: fix hugetlb for sun4u sctp: Fix MAC comparison to be constant-time scsi: hpsa: Fix potential memory leak in hpsa_big_passthru_ioctl() parisc: don't reference obsolete termio struct for TC* constants lib/genalloc: fix device leak in of_gen_pool_get() iio: frequency: adf4350: Fix prescaler usage. iio: dac: ad5421: use int type to store negative error codes iio: dac: ad5360: use int type to store negative error codes crypto: atmel - Fix dma_unmap_sg() direction drm/nouveau: fix bad ret code in nouveau_bo_move_prep media: i2c: mt9v111: fix incorrect type for ret ACPI: debug: fix signedness issues in read/write helpers tools build: Align warning options with perf net: fsl_pq_mdio: Fix device node reference leak in fsl_pq_mdio_probe tcp: Don't call reqsk_fastopen_remove() in tcp_conn_request(). net/sctp: fix a null dereference in sctp_disposition sctp_sf_do_5_1D_ce() net/mlx4: prevent potential use after free in mlx4_en_do_uc_filter() scsi: mvsas: Fix use-after-free bugs in mvs_work_queue clk: nxp: Fix pll0 rate check condition in LPC18xx CGU driver clk: nxp: lpc18xx-cgu: convert from round_rate() to determine_rate() perf session: Fix handling when buffer exceeds 2 GiB perf util: Fix compression checks returning -1 as bool iio: frequency: adf4350: Fix ADF4350_REG3_12BIT_CLKDIV_MODE pinctrl: check the return value of pinmux_ops::get_function_name() Input: uinput - zero-initialize uinput_ff_upload_compat to avoid info leak mm: hugetlb: avoid soft lockup when mprotect to large memory area Squashfs: fix uninit-value in squashfs_get_parent net: ena: return 0 in ena_get_rxfh_key_size() when RSS hash key is not configurable nfp: fix RSS hash key size when RSS is not supported drivers/base/node: fix double free in register_one_node() ocfs2: fix double free in user_cluster_connect() net: usb: Remove disruptive netif_wake_queue in rtl8150_set_multicast usb: vhci-hcd: Prevent suspending virtually attached devices scsi: mpt3sas: Fix crash in transport port remove by using ioc_info() ipvs: Defer ip_vs_ftp unregister during netns cleanup NFSv4.1: fix backchannel max_resp_sz verification check remoteproc: qcom: q6v5: Avoid disabling handover IRQ twice sparc: fix accurate exception reporting in copy_{from,to}_user for M7 sparc: fix accurate exception reporting in copy_to_user for Niagara 4 sparc: fix accurate exception reporting in copy_{from_to}_user for Niagara sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC III sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC IB/sa: Fix sa_local_svc_timeout_ms read race drivers/base/node: handle error properly in register_one_node() watchdog: mpc8xxx_wdt: Reload the watchdog timer when enabling the watchdog iio: consumers: Fix offset handling in iio_convert_raw_to_processed() ASoC: Intel: bytcr_rt5651: Fix invalid quirk input mapping ASoC: Intel: bytcr_rt5640: Fix invalid quirk input mapping pps: fix warning in pps_register_cdev when register device fail misc: genwqe: Fix incorrect cmd field being reported in error usb: gadget: configfs: Correctly set use_os_string at bind usb: phy: twl6030: Fix incorrect type for ret tcp: fix __tcp_close() to only send RST when required PCI: tegra: Fix devm_kcalloc() argument order for port->phys allocation wifi: mwifiex: send world regulatory domain to driver ALSA: lx_core: use int type to store negative error codes media: rj54n1cb0c: Fix memleak in rj54n1_probe() scsi: pm80xx: Fix array-index-out-of-of-bounds on rmmod usb: host: max3421-hcd: Fix error pointer dereference in probe cleanup drm/radeon/r600_cs: clean up of dead code in r600_cs i2c: designware: Add disabling clocks when probe fails i2c: mediatek: fix potential incorrect use of I2C_MASTER_WRRD pwm: tiehrpwm: Fix corner case in clock divisor calculation block: use int to store blk_stack_limits() return value blk-mq: check kobject state_in_sysfs before deleting in blk_mq_unregister_hctx pinctrl: meson-gxl: add missing i2c_d pinmux soc: qcom: rpmh-rsc: Unconditionally clear _TRIGGER bit for TCS ACPI: processor: idle: Fix memory leak when register cpuidle device failed perf: arm_spe: Prevent overflow in PERF_IDX2OFF() staging: axis-fifo: fix maximum TX packet length check perf subcmd: avoid crash in exclude_cmds when excludes is empty dm-integrity: limit MAX_TAG_SIZE to 255 wifi: rtlwifi: rtl8192cu: Don't claim USB ID 07b8:8188 USB: serial: option: add SIMCom 8230C compositions media: rc: fix races with imon_disconnect() media: imon: grab lock earlier in imon_ir_change_protocol() media: imon: reorganize serialization media: rc: Add support for another iMON 0xffdc device media: i2c: tc358743: Fix use-after-free bugs caused by orphan timer in probe media: tuner: xc5000: Fix use-after-free in xc5000_release media: tunner: xc5000: Refactor firmware load udp: Fix memory accounting leak. media: b2c2: Fix use-after-free causing by irq_check_work in flexcop_pci_remove scsi: target: target_core_configfs: Add length check to avoid buffer overflow Change-Id: If7e75950e2cad63499e2cfffecac3dc9b432d06c
This commit is contained in:
commit
1dd9f9066b
160 files changed
+1114
-629
No files matched your search
@@ -107,6 +107,7 @@
|
||||
#define ARM_CPU_PART_NEOVERSE_V2 0xD4F
|
||||
#define ARM_CPU_PART_CORTEX_A720 0xD81
|
||||
#define ARM_CPU_PART_CORTEX_X4 0xD82
|
||||
#define ARM_CPU_PART_NEOVERSE_V3AE 0xD83
|
||||
#define ARM_CPU_PART_NEOVERSE_V3 0xD84
|
||||
#define ARM_CPU_PART_CORTEX_X925 0xD85
|
||||
#define ARM_CPU_PART_CORTEX_A725 0xD87
|
||||
@@ -163,6 +164,7 @@
|
||||
#define MIDR_NEOVERSE_V2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V2)
|
||||
#define MIDR_CORTEX_A720 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A720)
|
||||
#define MIDR_CORTEX_X4 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X4)
|
||||
#define MIDR_NEOVERSE_V3AE MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V3AE)
|
||||
#define MIDR_NEOVERSE_V3 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V3)
|
||||
#define MIDR_CORTEX_X925 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X925)
|
||||
#define MIDR_CORTEX_A725 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A725)
|
||||
|
||||
@@ -156,7 +156,8 @@ static inline pte_t set_pte_bit(pte_t pte, pgprot_t prot)
|
||||
static inline pte_t pte_mkwrite(pte_t pte)
|
||||
{
|
||||
pte = set_pte_bit(pte, __pgprot(PTE_WRITE));
|
||||
pte = clear_pte_bit(pte, __pgprot(PTE_RDONLY));
|
||||
if (pte_sw_dirty(pte))
|
||||
pte = clear_pte_bit(pte, __pgprot(PTE_RDONLY));
|
||||
return pte;
|
||||
}
|
||||
|
||||
|
||||
@@ -314,12 +314,12 @@ static inline int bfchg_mem_test_and_change_bit(int nr,
|
||||
#include <asm-generic/bitops/ffz.h>
|
||||
#else
|
||||
|
||||
static inline int find_first_zero_bit(const unsigned long *vaddr,
|
||||
unsigned size)
|
||||
static inline unsigned long find_first_zero_bit(const unsigned long *vaddr,
|
||||
unsigned long size)
|
||||
{
|
||||
const unsigned long *p = vaddr;
|
||||
int res = 32;
|
||||
unsigned int words;
|
||||
unsigned long res = 32;
|
||||
unsigned long words;
|
||||
unsigned long num;
|
||||
|
||||
if (!size)
|
||||
@@ -340,8 +340,9 @@ out:
|
||||
}
|
||||
#define find_first_zero_bit find_first_zero_bit
|
||||
|
||||
static inline int find_next_zero_bit(const unsigned long *vaddr, int size,
|
||||
int offset)
|
||||
static inline unsigned long find_next_zero_bit(const unsigned long *vaddr,
|
||||
unsigned long size,
|
||||
unsigned long offset)
|
||||
{
|
||||
const unsigned long *p = vaddr + (offset >> 5);
|
||||
int bit = offset & 31UL, res;
|
||||
@@ -370,11 +371,12 @@ static inline int find_next_zero_bit(const unsigned long *vaddr, int size,
|
||||
}
|
||||
#define find_next_zero_bit find_next_zero_bit
|
||||
|
||||
static inline int find_first_bit(const unsigned long *vaddr, unsigned size)
|
||||
static inline unsigned long find_first_bit(const unsigned long *vaddr,
|
||||
unsigned long size)
|
||||
{
|
||||
const unsigned long *p = vaddr;
|
||||
int res = 32;
|
||||
unsigned int words;
|
||||
unsigned long res = 32;
|
||||
unsigned long words;
|
||||
unsigned long num;
|
||||
|
||||
if (!size)
|
||||
@@ -395,8 +397,9 @@ out:
|
||||
}
|
||||
#define find_first_bit find_first_bit
|
||||
|
||||
static inline int find_next_bit(const unsigned long *vaddr, int size,
|
||||
int offset)
|
||||
static inline unsigned long find_next_bit(const unsigned long *vaddr,
|
||||
unsigned long size,
|
||||
unsigned long offset)
|
||||
{
|
||||
const unsigned long *p = vaddr + (offset >> 5);
|
||||
int bit = offset & 31UL, res;
|
||||
|
||||
@@ -60,7 +60,7 @@ static struct resource standard_io_resources[] = {
|
||||
.name = "keyboard",
|
||||
.start = 0x60,
|
||||
.end = 0x6f,
|
||||
.flags = IORESOURCE_IO | IORESOURCE_BUSY
|
||||
.flags = IORESOURCE_IO
|
||||
},
|
||||
{
|
||||
.name = "dma page reg",
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#define TCSETS _IOW('T', 17, struct termios) /* TCSETATTR */
|
||||
#define TCSETSW _IOW('T', 18, struct termios) /* TCSETATTRD */
|
||||
#define TCSETSF _IOW('T', 19, struct termios) /* TCSETATTRF */
|
||||
#define TCGETA _IOR('T', 1, struct termio)
|
||||
#define TCSETA _IOW('T', 2, struct termio)
|
||||
#define TCSETAW _IOW('T', 3, struct termio)
|
||||
#define TCSETAF _IOW('T', 4, struct termio)
|
||||
#define TCGETA 0x40125401
|
||||
#define TCSETA 0x80125402
|
||||
#define TCSETAW 0x80125403
|
||||
#define TCSETAF 0x80125404
|
||||
#define TCSBRK _IO('T', 5)
|
||||
#define TCXONC _IO('T', 6)
|
||||
#define TCFLSH _IO('T', 7)
|
||||
|
||||
+10
-10
@@ -696,16 +696,16 @@ FUNC_NAME:
|
||||
EX_LD_FP(LOAD(ldd, %o4+40, %f26), memcpy_retl_o2_plus_o5_plus_40)
|
||||
faligndata %f24, %f26, %f10
|
||||
EX_ST_FP(STORE(std, %f6, %o0+24), memcpy_retl_o2_plus_o5_plus_40)
|
||||
EX_LD_FP(LOAD(ldd, %o4+48, %f28), memcpy_retl_o2_plus_o5_plus_40)
|
||||
EX_LD_FP(LOAD(ldd, %o4+48, %f28), memcpy_retl_o2_plus_o5_plus_32)
|
||||
faligndata %f26, %f28, %f12
|
||||
EX_ST_FP(STORE(std, %f8, %o0+32), memcpy_retl_o2_plus_o5_plus_40)
|
||||
EX_ST_FP(STORE(std, %f8, %o0+32), memcpy_retl_o2_plus_o5_plus_32)
|
||||
add %o4, 64, %o4
|
||||
EX_LD_FP(LOAD(ldd, %o4-8, %f30), memcpy_retl_o2_plus_o5_plus_40)
|
||||
EX_LD_FP(LOAD(ldd, %o4-8, %f30), memcpy_retl_o2_plus_o5_plus_24)
|
||||
faligndata %f28, %f30, %f14
|
||||
EX_ST_FP(STORE(std, %f10, %o0+40), memcpy_retl_o2_plus_o5_plus_40)
|
||||
EX_ST_FP(STORE(std, %f12, %o0+48), memcpy_retl_o2_plus_o5_plus_40)
|
||||
EX_ST_FP(STORE(std, %f10, %o0+40), memcpy_retl_o2_plus_o5_plus_24)
|
||||
EX_ST_FP(STORE(std, %f12, %o0+48), memcpy_retl_o2_plus_o5_plus_16)
|
||||
add %o0, 64, %o0
|
||||
EX_ST_FP(STORE(std, %f14, %o0-8), memcpy_retl_o2_plus_o5_plus_40)
|
||||
EX_ST_FP(STORE(std, %f14, %o0-8), memcpy_retl_o2_plus_o5_plus_8)
|
||||
fsrc2 %f30, %f14
|
||||
bgu,pt %xcc, .Lunalign_sloop
|
||||
prefetch [%o4 + (8 * BLOCK_SIZE)], 20
|
||||
@@ -728,7 +728,7 @@ FUNC_NAME:
|
||||
add %o4, 8, %o4
|
||||
faligndata %f0, %f2, %f16
|
||||
subcc %o5, 8, %o5
|
||||
EX_ST_FP(STORE(std, %f16, %o0), memcpy_retl_o2_plus_o5)
|
||||
EX_ST_FP(STORE(std, %f16, %o0), memcpy_retl_o2_plus_o5_plus_8)
|
||||
fsrc2 %f2, %f0
|
||||
bgu,pt %xcc, .Lunalign_by8
|
||||
add %o0, 8, %o0
|
||||
@@ -772,7 +772,7 @@ FUNC_NAME:
|
||||
subcc %o5, 0x20, %o5
|
||||
EX_ST(STORE(stx, %o3, %o0 + 0x00), memcpy_retl_o2_plus_o5_plus_32)
|
||||
EX_ST(STORE(stx, %g2, %o0 + 0x08), memcpy_retl_o2_plus_o5_plus_24)
|
||||
EX_ST(STORE(stx, %g7, %o0 + 0x10), memcpy_retl_o2_plus_o5_plus_24)
|
||||
EX_ST(STORE(stx, %g7, %o0 + 0x10), memcpy_retl_o2_plus_o5_plus_16)
|
||||
EX_ST(STORE(stx, %o4, %o0 + 0x18), memcpy_retl_o2_plus_o5_plus_8)
|
||||
bne,pt %xcc, 1b
|
||||
add %o0, 0x20, %o0
|
||||
@@ -804,12 +804,12 @@ FUNC_NAME:
|
||||
brz,pt %o3, 2f
|
||||
sub %o2, %o3, %o2
|
||||
|
||||
1: EX_LD(LOAD(ldub, %o1 + 0x00, %g2), memcpy_retl_o2_plus_g1)
|
||||
1: EX_LD(LOAD(ldub, %o1 + 0x00, %g2), memcpy_retl_o2_plus_o3)
|
||||
add %o1, 1, %o1
|
||||
subcc %o3, 1, %o3
|
||||
add %o0, 1, %o0
|
||||
bne,pt %xcc, 1b
|
||||
EX_ST(STORE(stb, %g2, %o0 - 0x01), memcpy_retl_o2_plus_g1_plus_1)
|
||||
EX_ST(STORE(stb, %g2, %o0 - 0x01), memcpy_retl_o2_plus_o3_plus_1)
|
||||
2:
|
||||
and %o1, 0x7, %o3
|
||||
brz,pn %o3, .Lmedium_noprefetch_cp
|
||||
|
||||
@@ -137,6 +137,15 @@ ENTRY(memcpy_retl_o2_plus_63_8)
|
||||
ba,pt %xcc, __restore_asi
|
||||
add %o2, 8, %o0
|
||||
ENDPROC(memcpy_retl_o2_plus_63_8)
|
||||
ENTRY(memcpy_retl_o2_plus_o3)
|
||||
ba,pt %xcc, __restore_asi
|
||||
add %o2, %o3, %o0
|
||||
ENDPROC(memcpy_retl_o2_plus_o3)
|
||||
ENTRY(memcpy_retl_o2_plus_o3_plus_1)
|
||||
add %o3, 1, %o3
|
||||
ba,pt %xcc, __restore_asi
|
||||
add %o2, %o3, %o0
|
||||
ENDPROC(memcpy_retl_o2_plus_o3_plus_1)
|
||||
ENTRY(memcpy_retl_o2_plus_o5)
|
||||
ba,pt %xcc, __restore_asi
|
||||
add %o2, %o5, %o0
|
||||
|
||||
@@ -281,7 +281,7 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
|
||||
subcc %o5, 0x20, %o5
|
||||
EX_ST(STORE(stx, %g1, %o0 + 0x00), memcpy_retl_o2_plus_o5_plus_32)
|
||||
EX_ST(STORE(stx, %g2, %o0 + 0x08), memcpy_retl_o2_plus_o5_plus_24)
|
||||
EX_ST(STORE(stx, GLOBAL_SPARE, %o0 + 0x10), memcpy_retl_o2_plus_o5_plus_24)
|
||||
EX_ST(STORE(stx, GLOBAL_SPARE, %o0 + 0x10), memcpy_retl_o2_plus_o5_plus_16)
|
||||
EX_ST(STORE(stx, %o4, %o0 + 0x18), memcpy_retl_o2_plus_o5_plus_8)
|
||||
bne,pt %icc, 1b
|
||||
add %o0, 0x20, %o0
|
||||
|
||||
+18
-11
@@ -80,8 +80,8 @@
|
||||
#ifndef EX_RETVAL
|
||||
#define EX_RETVAL(x) x
|
||||
__restore_asi:
|
||||
ret
|
||||
wr %g0, ASI_AIUS, %asi
|
||||
ret
|
||||
restore
|
||||
ENTRY(NG_ret_i2_plus_i4_plus_1)
|
||||
ba,pt %xcc, __restore_asi
|
||||
@@ -126,15 +126,16 @@ ENTRY(NG_ret_i2_plus_g1_minus_56)
|
||||
ba,pt %xcc, __restore_asi
|
||||
add %i2, %g1, %i0
|
||||
ENDPROC(NG_ret_i2_plus_g1_minus_56)
|
||||
ENTRY(NG_ret_i2_plus_i4)
|
||||
ENTRY(NG_ret_i2_plus_i4_plus_16)
|
||||
add %i4, 16, %i4
|
||||
ba,pt %xcc, __restore_asi
|
||||
add %i2, %i4, %i0
|
||||
ENDPROC(NG_ret_i2_plus_i4)
|
||||
ENTRY(NG_ret_i2_plus_i4_minus_8)
|
||||
sub %i4, 8, %i4
|
||||
ENDPROC(NG_ret_i2_plus_i4_plus_16)
|
||||
ENTRY(NG_ret_i2_plus_i4_plus_8)
|
||||
add %i4, 8, %i4
|
||||
ba,pt %xcc, __restore_asi
|
||||
add %i2, %i4, %i0
|
||||
ENDPROC(NG_ret_i2_plus_i4_minus_8)
|
||||
ENDPROC(NG_ret_i2_plus_i4_plus_8)
|
||||
ENTRY(NG_ret_i2_plus_8)
|
||||
ba,pt %xcc, __restore_asi
|
||||
add %i2, 8, %i0
|
||||
@@ -161,6 +162,12 @@ ENTRY(NG_ret_i2_and_7_plus_i4)
|
||||
ba,pt %xcc, __restore_asi
|
||||
add %i2, %i4, %i0
|
||||
ENDPROC(NG_ret_i2_and_7_plus_i4)
|
||||
ENTRY(NG_ret_i2_and_7_plus_i4_plus_8)
|
||||
and %i2, 7, %i2
|
||||
add %i4, 8, %i4
|
||||
ba,pt %xcc, __restore_asi
|
||||
add %i2, %i4, %i0
|
||||
ENDPROC(NG_ret_i2_and_7_plus_i4)
|
||||
#endif
|
||||
|
||||
.align 64
|
||||
@@ -406,13 +413,13 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
|
||||
andn %i2, 0xf, %i4
|
||||
and %i2, 0xf, %i2
|
||||
1: subcc %i4, 0x10, %i4
|
||||
EX_LD(LOAD(ldx, %i1, %o4), NG_ret_i2_plus_i4)
|
||||
EX_LD(LOAD(ldx, %i1, %o4), NG_ret_i2_plus_i4_plus_16)
|
||||
add %i1, 0x08, %i1
|
||||
EX_LD(LOAD(ldx, %i1, %g1), NG_ret_i2_plus_i4)
|
||||
EX_LD(LOAD(ldx, %i1, %g1), NG_ret_i2_plus_i4_plus_16)
|
||||
sub %i1, 0x08, %i1
|
||||
EX_ST(STORE(stx, %o4, %i1 + %i3), NG_ret_i2_plus_i4)
|
||||
EX_ST(STORE(stx, %o4, %i1 + %i3), NG_ret_i2_plus_i4_plus_16)
|
||||
add %i1, 0x8, %i1
|
||||
EX_ST(STORE(stx, %g1, %i1 + %i3), NG_ret_i2_plus_i4_minus_8)
|
||||
EX_ST(STORE(stx, %g1, %i1 + %i3), NG_ret_i2_plus_i4_plus_8)
|
||||
bgu,pt %XCC, 1b
|
||||
add %i1, 0x8, %i1
|
||||
73: andcc %i2, 0x8, %g0
|
||||
@@ -469,7 +476,7 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
|
||||
subcc %i4, 0x8, %i4
|
||||
srlx %g3, %i3, %i5
|
||||
or %i5, %g2, %i5
|
||||
EX_ST(STORE(stx, %i5, %o0), NG_ret_i2_and_7_plus_i4)
|
||||
EX_ST(STORE(stx, %i5, %o0), NG_ret_i2_and_7_plus_i4_plus_8)
|
||||
add %o0, 0x8, %o0
|
||||
bgu,pt %icc, 1b
|
||||
sllx %g3, %g1, %g2
|
||||
|
||||
@@ -164,17 +164,18 @@ ENTRY(U1_gs_40_fp)
|
||||
retl
|
||||
add %o0, %o2, %o0
|
||||
ENDPROC(U1_gs_40_fp)
|
||||
ENTRY(U1_g3_0_fp)
|
||||
VISExitHalf
|
||||
retl
|
||||
add %g3, %o2, %o0
|
||||
ENDPROC(U1_g3_0_fp)
|
||||
ENTRY(U1_g3_8_fp)
|
||||
VISExitHalf
|
||||
add %g3, 8, %g3
|
||||
retl
|
||||
add %g3, %o2, %o0
|
||||
ENDPROC(U1_g3_8_fp)
|
||||
ENTRY(U1_g3_16_fp)
|
||||
VISExitHalf
|
||||
add %g3, 16, %g3
|
||||
retl
|
||||
add %g3, %o2, %o0
|
||||
ENDPROC(U1_g3_16_fp)
|
||||
ENTRY(U1_o2_0_fp)
|
||||
VISExitHalf
|
||||
retl
|
||||
@@ -547,18 +548,18 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
|
||||
62: FINISH_VISCHUNK(o0, f44, f46)
|
||||
63: UNEVEN_VISCHUNK_LAST(o0, f46, f0)
|
||||
|
||||
93: EX_LD_FP(LOAD(ldd, %o1, %f2), U1_g3_0_fp)
|
||||
93: EX_LD_FP(LOAD(ldd, %o1, %f2), U1_g3_8_fp)
|
||||
add %o1, 8, %o1
|
||||
subcc %g3, 8, %g3
|
||||
faligndata %f0, %f2, %f8
|
||||
EX_ST_FP(STORE(std, %f8, %o0), U1_g3_8_fp)
|
||||
EX_ST_FP(STORE(std, %f8, %o0), U1_g3_16_fp)
|
||||
bl,pn %xcc, 95f
|
||||
add %o0, 8, %o0
|
||||
EX_LD_FP(LOAD(ldd, %o1, %f0), U1_g3_0_fp)
|
||||
EX_LD_FP(LOAD(ldd, %o1, %f0), U1_g3_8_fp)
|
||||
add %o1, 8, %o1
|
||||
subcc %g3, 8, %g3
|
||||
faligndata %f2, %f0, %f8
|
||||
EX_ST_FP(STORE(std, %f8, %o0), U1_g3_8_fp)
|
||||
EX_ST_FP(STORE(std, %f8, %o0), U1_g3_16_fp)
|
||||
bge,pt %xcc, 93b
|
||||
add %o0, 8, %o0
|
||||
|
||||
|
||||
@@ -267,6 +267,7 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
|
||||
faligndata %f10, %f12, %f26
|
||||
EX_LD_FP(LOAD(ldd, %o1 + 0x040, %f0), U3_retl_o2)
|
||||
|
||||
and %o2, 0x3f, %o2
|
||||
subcc GLOBAL_SPARE, 0x80, GLOBAL_SPARE
|
||||
add %o1, 0x40, %o1
|
||||
bgu,pt %XCC, 1f
|
||||
@@ -336,7 +337,6 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
|
||||
* Also notice how this code is careful not to perform a
|
||||
* load past the end of the src buffer.
|
||||
*/
|
||||
and %o2, 0x3f, %o2
|
||||
andcc %o2, 0x38, %g2
|
||||
be,pn %XCC, 2f
|
||||
subcc %g2, 0x8, %g2
|
||||
|
||||
@@ -134,6 +134,26 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
|
||||
|
||||
static pte_t sun4u_hugepage_shift_to_tte(pte_t entry, unsigned int shift)
|
||||
{
|
||||
unsigned long hugepage_size = _PAGE_SZ4MB_4U;
|
||||
|
||||
pte_val(entry) = pte_val(entry) & ~_PAGE_SZALL_4U;
|
||||
|
||||
switch (shift) {
|
||||
case HPAGE_256MB_SHIFT:
|
||||
hugepage_size = _PAGE_SZ256MB_4U;
|
||||
pte_val(entry) |= _PAGE_PMD_HUGE;
|
||||
break;
|
||||
case HPAGE_SHIFT:
|
||||
pte_val(entry) |= _PAGE_PMD_HUGE;
|
||||
break;
|
||||
case HPAGE_64K_SHIFT:
|
||||
hugepage_size = _PAGE_SZ64K_4U;
|
||||
break;
|
||||
default:
|
||||
WARN_ONCE(1, "unsupported hugepage shift=%u\n", shift);
|
||||
}
|
||||
|
||||
pte_val(entry) = pte_val(entry) | hugepage_size;
|
||||
return entry;
|
||||
}
|
||||
|
||||
|
||||
@@ -441,7 +441,7 @@ bool x86_page_table_writing_insn(struct x86_emulate_ctxt *ctxt);
|
||||
#define EMULATION_RESTART 1
|
||||
#define EMULATION_INTERCEPTED 2
|
||||
void init_decode_cache(struct x86_emulate_ctxt *ctxt);
|
||||
int x86_emulate_insn(struct x86_emulate_ctxt *ctxt);
|
||||
int x86_emulate_insn(struct x86_emulate_ctxt *ctxt, bool check_intercepts);
|
||||
int emulator_task_switch(struct x86_emulate_ctxt *ctxt,
|
||||
u16 tss_selector, int idt_index, int reason,
|
||||
bool has_error_code, u32 error_code);
|
||||
|
||||
+13
-2
@@ -156,15 +156,26 @@ static int identify_insn(struct insn *insn)
|
||||
if (!insn->modrm.nbytes)
|
||||
return -EINVAL;
|
||||
|
||||
/* All the instructions of interest start with 0x0f. */
|
||||
if (insn->opcode.bytes[0] != 0xf)
|
||||
/* The instructions of interest have 2-byte opcodes: 0F 00 or 0F 01. */
|
||||
if (insn->opcode.nbytes < 2 || insn->opcode.bytes[0] != 0xf)
|
||||
return -EINVAL;
|
||||
|
||||
if (insn->opcode.bytes[1] == 0x1) {
|
||||
switch (X86_MODRM_REG(insn->modrm.value)) {
|
||||
case 0:
|
||||
/* The reg form of 0F 01 /0 encodes VMX instructions. */
|
||||
if (X86_MODRM_MOD(insn->modrm.value) == 3)
|
||||
return -EINVAL;
|
||||
|
||||
return UMIP_INST_SGDT;
|
||||
case 1:
|
||||
/*
|
||||
* The reg form of 0F 01 /1 encodes MONITOR/MWAIT,
|
||||
* STAC/CLAC, and ENCLS.
|
||||
*/
|
||||
if (X86_MODRM_MOD(insn->modrm.value) == 3)
|
||||
return -EINVAL;
|
||||
|
||||
return UMIP_INST_SIDT;
|
||||
case 4:
|
||||
return UMIP_INST_SMSW;
|
||||
|
||||
@@ -5516,12 +5516,11 @@ void init_decode_cache(struct x86_emulate_ctxt *ctxt)
|
||||
ctxt->mem_read.end = 0;
|
||||
}
|
||||
|
||||
int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
|
||||
int x86_emulate_insn(struct x86_emulate_ctxt *ctxt, bool check_intercepts)
|
||||
{
|
||||
const struct x86_emulate_ops *ops = ctxt->ops;
|
||||
int rc = X86EMUL_CONTINUE;
|
||||
int saved_dst_type = ctxt->dst.type;
|
||||
unsigned emul_flags;
|
||||
|
||||
ctxt->mem_read.pos = 0;
|
||||
|
||||
@@ -5536,7 +5535,6 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
|
||||
goto done;
|
||||
}
|
||||
|
||||
emul_flags = ctxt->ops->get_hflags(ctxt);
|
||||
if (unlikely(ctxt->d &
|
||||
(No64|Undefined|Sse|Mmx|Intercept|CheckPerm|Priv|Prot|String))) {
|
||||
if ((ctxt->mode == X86EMUL_MODE_PROT64 && (ctxt->d & No64)) ||
|
||||
@@ -5570,7 +5568,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
|
||||
fetch_possible_mmx_operand(ctxt, &ctxt->dst);
|
||||
}
|
||||
|
||||
if (unlikely(emul_flags & X86EMUL_GUEST_MASK) && ctxt->intercept) {
|
||||
if (unlikely(check_intercepts) && ctxt->intercept) {
|
||||
rc = emulator_check_intercept(ctxt, ctxt->intercept,
|
||||
X86_ICPT_PRE_EXCEPT);
|
||||
if (rc != X86EMUL_CONTINUE)
|
||||
@@ -5599,7 +5597,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (unlikely(emul_flags & X86EMUL_GUEST_MASK) && (ctxt->d & Intercept)) {
|
||||
if (unlikely(check_intercepts) && (ctxt->d & Intercept)) {
|
||||
rc = emulator_check_intercept(ctxt, ctxt->intercept,
|
||||
X86_ICPT_POST_EXCEPT);
|
||||
if (rc != X86EMUL_CONTINUE)
|
||||
@@ -5653,7 +5651,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
|
||||
|
||||
special_insn:
|
||||
|
||||
if (unlikely(emul_flags & X86EMUL_GUEST_MASK) && (ctxt->d & Intercept)) {
|
||||
if (unlikely(check_intercepts) && (ctxt->d & Intercept)) {
|
||||
rc = emulator_check_intercept(ctxt, ctxt->intercept,
|
||||
X86_ICPT_POST_MEMACCESS);
|
||||
if (rc != X86EMUL_CONTINUE)
|
||||
|
||||
+8
-1
@@ -6423,7 +6423,14 @@ restart:
|
||||
/* Save the faulting GPA (cr2) in the address field */
|
||||
ctxt->exception.address = cr2_or_gpa;
|
||||
|
||||
r = x86_emulate_insn(ctxt);
|
||||
/*
|
||||
* Check L1's instruction intercepts when emulating instructions for
|
||||
* L2, unless KVM is re-emulating a previously decoded instruction,
|
||||
* e.g. to complete userspace I/O, in which case KVM has already
|
||||
* checked the intercepts.
|
||||
*/
|
||||
r = x86_emulate_insn(ctxt, is_guest_mode(vcpu) &&
|
||||
!(emulation_type & EMULTYPE_NO_DECODE));
|
||||
|
||||
if (r == EMULATION_INTERCEPTED)
|
||||
return EMULATE_DONE;
|
||||
|
||||
@@ -232,9 +232,11 @@ static void blk_mq_unregister_hctx(struct blk_mq_hw_ctx *hctx)
|
||||
return;
|
||||
|
||||
hctx_for_each_ctx(hctx, ctx, i)
|
||||
kobject_del(&ctx->kobj);
|
||||
if (ctx->kobj.state_in_sysfs)
|
||||
kobject_del(&ctx->kobj);
|
||||
|
||||
kobject_del(&hctx->kobj);
|
||||
if (hctx->kobj.state_in_sysfs)
|
||||
kobject_del(&hctx->kobj);
|
||||
}
|
||||
|
||||
static int blk_mq_register_hctx(struct blk_mq_hw_ctx *hctx)
|
||||
|
||||
@@ -556,7 +556,8 @@ EXPORT_SYMBOL(blk_queue_stack_limits);
|
||||
int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
|
||||
sector_t start)
|
||||
{
|
||||
unsigned int top, bottom, alignment, ret = 0;
|
||||
unsigned int top, bottom, alignment;
|
||||
int ret = 0;
|
||||
|
||||
t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors);
|
||||
t->max_hw_sectors = min_not_zero(t->max_hw_sectors, b->max_hw_sectors);
|
||||
|
||||
+13
-13
@@ -579,11 +579,11 @@ static int acpi_aml_release(struct inode *inode, struct file *file)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int acpi_aml_read_user(char __user *buf, int len)
|
||||
static ssize_t acpi_aml_read_user(char __user *buf, size_t len)
|
||||
{
|
||||
int ret;
|
||||
struct circ_buf *crc = &acpi_aml_io.out_crc;
|
||||
int n;
|
||||
ssize_t ret;
|
||||
size_t n;
|
||||
char *p;
|
||||
|
||||
ret = acpi_aml_lock_read(crc, ACPI_AML_OUT_USER);
|
||||
@@ -592,7 +592,7 @@ static int acpi_aml_read_user(char __user *buf, int len)
|
||||
/* sync head before removing logs */
|
||||
smp_rmb();
|
||||
p = &crc->buf[crc->tail];
|
||||
n = min(len, circ_count_to_end(crc));
|
||||
n = min_t(size_t, len, circ_count_to_end(crc));
|
||||
if (copy_to_user(buf, p, n)) {
|
||||
ret = -EFAULT;
|
||||
goto out;
|
||||
@@ -609,8 +609,8 @@ out:
|
||||
static ssize_t acpi_aml_read(struct file *file, char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
int ret = 0;
|
||||
int size = 0;
|
||||
ssize_t ret = 0;
|
||||
ssize_t size = 0;
|
||||
|
||||
if (!count)
|
||||
return 0;
|
||||
@@ -649,11 +649,11 @@ again:
|
||||
return size > 0 ? size : ret;
|
||||
}
|
||||
|
||||
static int acpi_aml_write_user(const char __user *buf, int len)
|
||||
static ssize_t acpi_aml_write_user(const char __user *buf, size_t len)
|
||||
{
|
||||
int ret;
|
||||
struct circ_buf *crc = &acpi_aml_io.in_crc;
|
||||
int n;
|
||||
ssize_t ret;
|
||||
size_t n;
|
||||
char *p;
|
||||
|
||||
ret = acpi_aml_lock_write(crc, ACPI_AML_IN_USER);
|
||||
@@ -662,7 +662,7 @@ static int acpi_aml_write_user(const char __user *buf, int len)
|
||||
/* sync tail before inserting cmds */
|
||||
smp_mb();
|
||||
p = &crc->buf[crc->head];
|
||||
n = min(len, circ_space_to_end(crc));
|
||||
n = min_t(size_t, len, circ_space_to_end(crc));
|
||||
if (copy_from_user(p, buf, n)) {
|
||||
ret = -EFAULT;
|
||||
goto out;
|
||||
@@ -673,14 +673,14 @@ static int acpi_aml_write_user(const char __user *buf, int len)
|
||||
ret = n;
|
||||
out:
|
||||
acpi_aml_unlock_fifo(ACPI_AML_IN_USER, ret >= 0);
|
||||
return n;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t acpi_aml_write(struct file *file, const char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
int ret = 0;
|
||||
int size = 0;
|
||||
ssize_t ret = 0;
|
||||
ssize_t size = 0;
|
||||
|
||||
if (!count)
|
||||
return 0;
|
||||
|
||||
@@ -1505,6 +1505,9 @@ int acpi_processor_power_init(struct acpi_processor *pr)
|
||||
if (retval) {
|
||||
if (acpi_processor_registered == 0)
|
||||
cpuidle_unregister_driver(&acpi_idle_driver);
|
||||
|
||||
per_cpu(acpi_cpuidle_device, pr->id) = NULL;
|
||||
kfree(dev);
|
||||
return retval;
|
||||
}
|
||||
acpi_processor_registered++;
|
||||
|
||||
@@ -1442,17 +1442,8 @@ static int binder_inc_node_nilocked(struct binder_node *node, int strong,
|
||||
} else {
|
||||
if (!internal)
|
||||
node->local_weak_refs++;
|
||||
if (!node->has_weak_ref && list_empty(&node->work.entry)) {
|
||||
if (target_list == NULL) {
|
||||
pr_err("invalid inc weak node for %d\n",
|
||||
node->debug_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
/*
|
||||
* See comment above
|
||||
*/
|
||||
if (!node->has_weak_ref && target_list && list_empty(&node->work.entry))
|
||||
binder_enqueue_work_ilocked(&node->work, target_list);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -593,6 +593,10 @@ int __register_one_node(int nid)
|
||||
return -ENOMEM;
|
||||
|
||||
error = register_node(node_devices[nid], nid);
|
||||
if (error) {
|
||||
node_devices[nid] = NULL;
|
||||
return error;
|
||||
}
|
||||
|
||||
/* link cpu under this node */
|
||||
for_each_present_cpu(cpu) {
|
||||
|
||||
@@ -701,8 +701,8 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
|
||||
* will call disable_irq which undoes all of the above.
|
||||
*/
|
||||
if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) {
|
||||
rc = tpm_tis_write8(priv, original_int_vec,
|
||||
TPM_INT_VECTOR(priv->locality));
|
||||
rc = tpm_tis_write8(priv, TPM_INT_VECTOR(priv->locality),
|
||||
original_int_vec);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
|
||||
@@ -373,23 +373,25 @@ static unsigned long lpc18xx_pll0_recalc_rate(struct clk_hw *hw,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long lpc18xx_pll0_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *prate)
|
||||
static int lpc18xx_pll0_determine_rate(struct clk_hw *hw,
|
||||
struct clk_rate_request *req)
|
||||
{
|
||||
unsigned long m;
|
||||
|
||||
if (*prate < rate) {
|
||||
if (req->best_parent_rate < req->rate) {
|
||||
pr_warn("%s: pll dividers not supported\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
m = DIV_ROUND_UP_ULL(*prate, rate * 2);
|
||||
if (m <= 0 && m > LPC18XX_PLL0_MSEL_MAX) {
|
||||
pr_warn("%s: unable to support rate %lu\n", __func__, rate);
|
||||
m = DIV_ROUND_UP_ULL(req->best_parent_rate, req->rate * 2);
|
||||
if (m == 0 || m > LPC18XX_PLL0_MSEL_MAX) {
|
||||
pr_warn("%s: unable to support rate %lu\n", __func__, req->rate);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 2 * *prate * m;
|
||||
req->rate = 2 * req->best_parent_rate * m;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lpc18xx_pll0_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
@@ -405,7 +407,7 @@ static int lpc18xx_pll0_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
}
|
||||
|
||||
m = DIV_ROUND_UP_ULL(parent_rate, rate * 2);
|
||||
if (m <= 0 && m > LPC18XX_PLL0_MSEL_MAX) {
|
||||
if (m == 0 || m > LPC18XX_PLL0_MSEL_MAX) {
|
||||
pr_warn("%s: unable to support rate %lu\n", __func__, rate);
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -446,7 +448,7 @@ static int lpc18xx_pll0_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
|
||||
static const struct clk_ops lpc18xx_pll0_ops = {
|
||||
.recalc_rate = lpc18xx_pll0_recalc_rate,
|
||||
.round_rate = lpc18xx_pll0_round_rate,
|
||||
.determine_rate = lpc18xx_pll0_determine_rate,
|
||||
.set_rate = lpc18xx_pll0_set_rate,
|
||||
};
|
||||
|
||||
|
||||
@@ -267,20 +267,17 @@ again:
|
||||
*
|
||||
* This can deal with workloads that have long pauses interspersed
|
||||
* with sporadic activity with a bunch of short pauses.
|
||||
*
|
||||
* However, if the number of remaining samples is too small to exclude
|
||||
* any more outliers, allow the deepest available idle state to be
|
||||
* selected because there are systems where the time spent by CPUs in
|
||||
* deep idle states is correlated to the maximum frequency the CPUs
|
||||
* can get to. On those systems, shallow idle states should be avoided
|
||||
* unless there is a clear indication that the given CPU is most likley
|
||||
* going to be woken up shortly.
|
||||
*/
|
||||
if (divisor * 4 <= INTERVALS * 3) {
|
||||
/*
|
||||
* If there are sufficiently many data points still under
|
||||
* consideration after the outliers have been eliminated,
|
||||
* returning without a prediction would be a mistake because it
|
||||
* is likely that the next interval will not exceed the current
|
||||
* maximum, so return the latter in that case.
|
||||
*/
|
||||
if (divisor >= INTERVALS / 2)
|
||||
return max;
|
||||
|
||||
if (divisor * 4 <= INTERVALS * 3)
|
||||
return UINT_MAX;
|
||||
}
|
||||
|
||||
thresh = max - 1;
|
||||
goto again;
|
||||
|
||||
@@ -568,7 +568,7 @@ static int atmel_tdes_crypt_start(struct atmel_tdes_dev *dd)
|
||||
|
||||
if (err && (dd->flags & TDES_FLAGS_FAST)) {
|
||||
dma_unmap_sg(dd->dev, dd->in_sg, 1, DMA_TO_DEVICE);
|
||||
dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_TO_DEVICE);
|
||||
dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_FROM_DEVICE);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
||||
@@ -1638,10 +1638,9 @@ int amdgpu_amdkfd_gpuvm_get_vm_fault_info(struct kgd_dev *kgd,
|
||||
struct amdgpu_device *adev;
|
||||
|
||||
adev = (struct amdgpu_device *)kgd;
|
||||
if (atomic_read(&adev->gmc.vm_fault_info_updated) == 1) {
|
||||
if (atomic_read_acquire(&adev->gmc.vm_fault_info_updated) == 1) {
|
||||
*mem = *adev->gmc.vm_fault_info;
|
||||
mb();
|
||||
atomic_set(&adev->gmc.vm_fault_info_updated, 0);
|
||||
atomic_set_release(&adev->gmc.vm_fault_info_updated, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1070,7 +1070,7 @@ static int gmc_v7_0_sw_init(void *handle)
|
||||
GFP_KERNEL);
|
||||
if (!adev->gmc.vm_fault_info)
|
||||
return -ENOMEM;
|
||||
atomic_set(&adev->gmc.vm_fault_info_updated, 0);
|
||||
atomic_set_release(&adev->gmc.vm_fault_info_updated, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1300,7 +1300,7 @@ static int gmc_v7_0_process_interrupt(struct amdgpu_device *adev,
|
||||
vmid = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
|
||||
VMID);
|
||||
if (amdgpu_amdkfd_is_kfd_vmid(adev, vmid)
|
||||
&& !atomic_read(&adev->gmc.vm_fault_info_updated)) {
|
||||
&& !atomic_read_acquire(&adev->gmc.vm_fault_info_updated)) {
|
||||
struct kfd_vm_fault_info *info = adev->gmc.vm_fault_info;
|
||||
u32 protections = REG_GET_FIELD(status,
|
||||
VM_CONTEXT1_PROTECTION_FAULT_STATUS,
|
||||
@@ -1316,8 +1316,7 @@ static int gmc_v7_0_process_interrupt(struct amdgpu_device *adev,
|
||||
info->prot_read = protections & 0x8 ? true : false;
|
||||
info->prot_write = protections & 0x10 ? true : false;
|
||||
info->prot_exec = protections & 0x20 ? true : false;
|
||||
mb();
|
||||
atomic_set(&adev->gmc.vm_fault_info_updated, 1);
|
||||
atomic_set_release(&adev->gmc.vm_fault_info_updated, 1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1203,7 +1203,7 @@ static int gmc_v8_0_sw_init(void *handle)
|
||||
GFP_KERNEL);
|
||||
if (!adev->gmc.vm_fault_info)
|
||||
return -ENOMEM;
|
||||
atomic_set(&adev->gmc.vm_fault_info_updated, 0);
|
||||
atomic_set_release(&adev->gmc.vm_fault_info_updated, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1491,7 +1491,7 @@ static int gmc_v8_0_process_interrupt(struct amdgpu_device *adev,
|
||||
vmid = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
|
||||
VMID);
|
||||
if (amdgpu_amdkfd_is_kfd_vmid(adev, vmid)
|
||||
&& !atomic_read(&adev->gmc.vm_fault_info_updated)) {
|
||||
&& !atomic_read_acquire(&adev->gmc.vm_fault_info_updated)) {
|
||||
struct kfd_vm_fault_info *info = adev->gmc.vm_fault_info;
|
||||
u32 protections = REG_GET_FIELD(status,
|
||||
VM_CONTEXT1_PROTECTION_FAULT_STATUS,
|
||||
@@ -1507,8 +1507,7 @@ static int gmc_v8_0_process_interrupt(struct amdgpu_device *adev,
|
||||
info->prot_read = protections & 0x8 ? true : false;
|
||||
info->prot_write = protections & 0x10 ? true : false;
|
||||
info->prot_exec = protections & 0x20 ? true : false;
|
||||
mb();
|
||||
atomic_set(&adev->gmc.vm_fault_info_updated, 1);
|
||||
atomic_set_release(&adev->gmc.vm_fault_info_updated, 1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -54,7 +54,6 @@ struct decon_context {
|
||||
void __iomem *regs;
|
||||
unsigned long irq_flags;
|
||||
bool i80_if;
|
||||
bool suspended;
|
||||
wait_queue_head_t wait_vsync_queue;
|
||||
atomic_t wait_vsync_event;
|
||||
|
||||
@@ -88,9 +87,6 @@ static void decon_wait_for_vblank(struct exynos_drm_crtc *crtc)
|
||||
{
|
||||
struct decon_context *ctx = crtc->ctx;
|
||||
|
||||
if (ctx->suspended)
|
||||
return;
|
||||
|
||||
atomic_set(&ctx->wait_vsync_event, 1);
|
||||
|
||||
/*
|
||||
@@ -160,9 +156,6 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
|
||||
struct drm_display_mode *mode = &crtc->base.state->adjusted_mode;
|
||||
u32 val, clkdiv;
|
||||
|
||||
if (ctx->suspended)
|
||||
return;
|
||||
|
||||
/* nothing to do if we haven't set the mode yet */
|
||||
if (mode->htotal == 0 || mode->vtotal == 0)
|
||||
return;
|
||||
@@ -224,9 +217,6 @@ static int decon_enable_vblank(struct exynos_drm_crtc *crtc)
|
||||
struct decon_context *ctx = crtc->ctx;
|
||||
u32 val;
|
||||
|
||||
if (ctx->suspended)
|
||||
return -EPERM;
|
||||
|
||||
if (!test_and_set_bit(0, &ctx->irq_flags)) {
|
||||
val = readl(ctx->regs + VIDINTCON0);
|
||||
|
||||
@@ -249,9 +239,6 @@ static void decon_disable_vblank(struct exynos_drm_crtc *crtc)
|
||||
struct decon_context *ctx = crtc->ctx;
|
||||
u32 val;
|
||||
|
||||
if (ctx->suspended)
|
||||
return;
|
||||
|
||||
if (test_and_clear_bit(0, &ctx->irq_flags)) {
|
||||
val = readl(ctx->regs + VIDINTCON0);
|
||||
|
||||
@@ -374,9 +361,6 @@ static void decon_atomic_begin(struct exynos_drm_crtc *crtc)
|
||||
struct decon_context *ctx = crtc->ctx;
|
||||
int i;
|
||||
|
||||
if (ctx->suspended)
|
||||
return;
|
||||
|
||||
for (i = 0; i < WINDOWS_NR; i++)
|
||||
decon_shadow_protect_win(ctx, i, true);
|
||||
}
|
||||
@@ -396,9 +380,6 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
|
||||
unsigned int cpp = fb->format->cpp[0];
|
||||
unsigned int pitch = fb->pitches[0];
|
||||
|
||||
if (ctx->suspended)
|
||||
return;
|
||||
|
||||
/*
|
||||
* SHADOWCON/PRTCON register is used for enabling timing.
|
||||
*
|
||||
@@ -486,9 +467,6 @@ static void decon_disable_plane(struct exynos_drm_crtc *crtc,
|
||||
unsigned int win = plane->index;
|
||||
u32 val;
|
||||
|
||||
if (ctx->suspended)
|
||||
return;
|
||||
|
||||
/* protect windows */
|
||||
decon_shadow_protect_win(ctx, win, true);
|
||||
|
||||
@@ -507,9 +485,6 @@ static void decon_atomic_flush(struct exynos_drm_crtc *crtc)
|
||||
struct decon_context *ctx = crtc->ctx;
|
||||
int i;
|
||||
|
||||
if (ctx->suspended)
|
||||
return;
|
||||
|
||||
for (i = 0; i < WINDOWS_NR; i++)
|
||||
decon_shadow_protect_win(ctx, i, false);
|
||||
exynos_crtc_handle_event(crtc);
|
||||
@@ -536,9 +511,6 @@ static void decon_enable(struct exynos_drm_crtc *crtc)
|
||||
{
|
||||
struct decon_context *ctx = crtc->ctx;
|
||||
|
||||
if (!ctx->suspended)
|
||||
return;
|
||||
|
||||
pm_runtime_get_sync(ctx->dev);
|
||||
|
||||
decon_init(ctx);
|
||||
@@ -548,8 +520,6 @@ static void decon_enable(struct exynos_drm_crtc *crtc)
|
||||
decon_enable_vblank(ctx->crtc);
|
||||
|
||||
decon_commit(ctx->crtc);
|
||||
|
||||
ctx->suspended = false;
|
||||
}
|
||||
|
||||
static void decon_disable(struct exynos_drm_crtc *crtc)
|
||||
@@ -557,9 +527,6 @@ static void decon_disable(struct exynos_drm_crtc *crtc)
|
||||
struct decon_context *ctx = crtc->ctx;
|
||||
int i;
|
||||
|
||||
if (ctx->suspended)
|
||||
return;
|
||||
|
||||
/*
|
||||
* We need to make sure that all windows are disabled before we
|
||||
* suspend that connector. Otherwise we might try to scan from
|
||||
@@ -569,8 +536,6 @@ static void decon_disable(struct exynos_drm_crtc *crtc)
|
||||
decon_disable_plane(crtc, &ctx->planes[i]);
|
||||
|
||||
pm_runtime_put_sync(ctx->dev);
|
||||
|
||||
ctx->suspended = true;
|
||||
}
|
||||
|
||||
static const struct exynos_drm_crtc_ops decon_crtc_ops = {
|
||||
@@ -688,7 +653,6 @@ static int decon_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
ctx->dev = dev;
|
||||
ctx->suspended = true;
|
||||
|
||||
i80_if_timings = of_get_child_by_name(dev->of_node, "i80-if-timings");
|
||||
if (i80_if_timings)
|
||||
|
||||
@@ -1087,7 +1087,7 @@ done:
|
||||
nvif_vmm_put(vmm, &old_mem->vma[1]);
|
||||
nvif_vmm_put(vmm, &old_mem->vma[0]);
|
||||
}
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
@@ -1411,7 +1411,7 @@ static void r600_texture_size(unsigned nfaces, unsigned blevel, unsigned llevel,
|
||||
unsigned block_align, unsigned height_align, unsigned base_align,
|
||||
unsigned *l0_size, unsigned *mipmap_size)
|
||||
{
|
||||
unsigned offset, i, level;
|
||||
unsigned offset, i;
|
||||
unsigned width, height, depth, size;
|
||||
unsigned blocksize;
|
||||
unsigned nbx, nby;
|
||||
@@ -1423,7 +1423,7 @@ static void r600_texture_size(unsigned nfaces, unsigned blevel, unsigned llevel,
|
||||
w0 = r600_mip_minify(w0, 0);
|
||||
h0 = r600_mip_minify(h0, 0);
|
||||
d0 = r600_mip_minify(d0, 0);
|
||||
for(i = 0, offset = 0, level = blevel; i < nlevels; i++, level++) {
|
||||
for (i = 0, offset = 0; i < nlevels; i++) {
|
||||
width = r600_mip_minify(w0, i);
|
||||
nbx = r600_fmt_get_nblocksx(format, width);
|
||||
|
||||
|
||||
@@ -365,6 +365,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
|
||||
|
||||
exit_probe:
|
||||
dw_i2c_plat_pm_cleanup(dev);
|
||||
i2c_dw_prepare_clk(dev, false);
|
||||
exit_reset:
|
||||
if (!IS_ERR_OR_NULL(dev->rst))
|
||||
reset_control_assert(dev->rst);
|
||||
|
||||
@@ -658,6 +658,7 @@ static int mtk_i2c_transfer(struct i2c_adapter *adap,
|
||||
{
|
||||
int ret;
|
||||
int left_num = num;
|
||||
bool write_then_read_en = false;
|
||||
struct mtk_i2c *i2c = i2c_get_adapdata(adap);
|
||||
|
||||
ret = mtk_i2c_clock_enable(i2c);
|
||||
@@ -671,6 +672,7 @@ static int mtk_i2c_transfer(struct i2c_adapter *adap,
|
||||
if (!(msgs[0].flags & I2C_M_RD) && (msgs[1].flags & I2C_M_RD) &&
|
||||
msgs[0].addr == msgs[1].addr) {
|
||||
i2c->auto_restart = 0;
|
||||
write_then_read_en = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -694,12 +696,10 @@ static int mtk_i2c_transfer(struct i2c_adapter *adap,
|
||||
else
|
||||
i2c->op = I2C_MASTER_WR;
|
||||
|
||||
if (!i2c->auto_restart) {
|
||||
if (num > 1) {
|
||||
/* combined two messages into one transaction */
|
||||
i2c->op = I2C_MASTER_WRRD;
|
||||
left_num--;
|
||||
}
|
||||
if (write_then_read_en) {
|
||||
/* combined two messages into one transaction */
|
||||
i2c->op = I2C_MASTER_WRRD;
|
||||
left_num--;
|
||||
}
|
||||
|
||||
/* always use DMA mode. */
|
||||
@@ -707,7 +707,10 @@ static int mtk_i2c_transfer(struct i2c_adapter *adap,
|
||||
if (ret < 0)
|
||||
goto err_exit;
|
||||
|
||||
msgs++;
|
||||
if (i2c->op == I2C_MASTER_WRRD)
|
||||
msgs += 2;
|
||||
else
|
||||
msgs++;
|
||||
}
|
||||
/* the return value is number of executed messages */
|
||||
ret = num;
|
||||
|
||||
@@ -260,7 +260,7 @@ static int ad5360_update_ctrl(struct iio_dev *indio_dev, unsigned int set,
|
||||
unsigned int clr)
|
||||
{
|
||||
struct ad5360_state *st = iio_priv(indio_dev);
|
||||
unsigned int ret;
|
||||
int ret;
|
||||
|
||||
mutex_lock(&indio_dev->mlock);
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ static int ad5421_update_ctrl(struct iio_dev *indio_dev, unsigned int set,
|
||||
unsigned int clr)
|
||||
{
|
||||
struct ad5421_state *st = iio_priv(indio_dev);
|
||||
unsigned int ret;
|
||||
int ret;
|
||||
|
||||
mutex_lock(&indio_dev->mlock);
|
||||
|
||||
|
||||
@@ -138,6 +138,19 @@ static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq)
|
||||
if (freq > ADF4350_MAX_OUT_FREQ || freq < st->min_out_freq)
|
||||
return -EINVAL;
|
||||
|
||||
st->r4_rf_div_sel = 0;
|
||||
|
||||
/*
|
||||
* !\TODO: The below computation is making sure we get a power of 2
|
||||
* shift (st->r4_rf_div_sel) so that freq becomes higher or equal to
|
||||
* ADF4350_MIN_VCO_FREQ. This might be simplified with fls()/fls_long()
|
||||
* and friends.
|
||||
*/
|
||||
while (freq < ADF4350_MIN_VCO_FREQ) {
|
||||
freq <<= 1;
|
||||
st->r4_rf_div_sel++;
|
||||
}
|
||||
|
||||
if (freq > ADF4350_MAX_FREQ_45_PRESC) {
|
||||
prescaler = ADF4350_REG1_PRESCALER;
|
||||
mdiv = 75;
|
||||
@@ -146,13 +159,6 @@ static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq)
|
||||
mdiv = 23;
|
||||
}
|
||||
|
||||
st->r4_rf_div_sel = 0;
|
||||
|
||||
while (freq < ADF4350_MIN_VCO_FREQ) {
|
||||
freq <<= 1;
|
||||
st->r4_rf_div_sel++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allow a predefined reference division factor
|
||||
* if not set, compute our own
|
||||
|
||||
@@ -630,7 +630,7 @@ static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan,
|
||||
* If no channel scaling is available apply consumer scale to
|
||||
* raw value and return.
|
||||
*/
|
||||
*processed = raw * scale;
|
||||
*processed = raw64 * scale;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1049,6 +1049,8 @@ int ib_nl_handle_set_timeout(struct sk_buff *skb,
|
||||
if (timeout > IB_SA_LOCAL_SVC_TIMEOUT_MAX)
|
||||
timeout = IB_SA_LOCAL_SVC_TIMEOUT_MAX;
|
||||
|
||||
spin_lock_irqsave(&ib_nl_request_lock, flags);
|
||||
|
||||
delta = timeout - sa_local_svc_timeout_ms;
|
||||
if (delta < 0)
|
||||
abs_delta = -delta;
|
||||
@@ -1056,7 +1058,6 @@ int ib_nl_handle_set_timeout(struct sk_buff *skb,
|
||||
abs_delta = delta;
|
||||
|
||||
if (delta != 0) {
|
||||
spin_lock_irqsave(&ib_nl_request_lock, flags);
|
||||
sa_local_svc_timeout_ms = timeout;
|
||||
list_for_each_entry(query, &ib_nl_request_list, list) {
|
||||
if (delta < 0 && abs_delta > query->timeout)
|
||||
@@ -1074,9 +1075,10 @@ int ib_nl_handle_set_timeout(struct sk_buff *skb,
|
||||
if (delay)
|
||||
mod_delayed_work(ib_nl_wq, &ib_nl_timed_work,
|
||||
(unsigned long)delay);
|
||||
spin_unlock_irqrestore(&ib_nl_request_lock, flags);
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&ib_nl_request_lock, flags);
|
||||
|
||||
settimeout_out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -753,6 +753,7 @@ static int uinput_ff_upload_to_user(char __user *buffer,
|
||||
if (in_compat_syscall()) {
|
||||
struct uinput_ff_upload_compat ff_up_compat;
|
||||
|
||||
memset(&ff_up_compat, 0, sizeof(ff_up_compat));
|
||||
ff_up_compat.request_id = ff_up->request_id;
|
||||
ff_up_compat.retval = ff_up->retval;
|
||||
/*
|
||||
|
||||
@@ -113,7 +113,7 @@ struct journal_sector {
|
||||
commit_id_t commit_id;
|
||||
};
|
||||
|
||||
#define MAX_TAG_SIZE (JOURNAL_SECTOR_DATA - JOURNAL_MAC_PER_SECTOR - offsetof(struct journal_entry, last_bytes[MAX_SECTORS_PER_BLOCK]))
|
||||
#define MAX_TAG_SIZE 255
|
||||
|
||||
#define METADATA_PADDING_SECTORS 8
|
||||
|
||||
|
||||
@@ -534,8 +534,8 @@ static int mt9v111_calc_frame_rate(struct mt9v111_dev *mt9v111,
|
||||
static int mt9v111_hw_config(struct mt9v111_dev *mt9v111)
|
||||
{
|
||||
struct i2c_client *c = mt9v111->client;
|
||||
unsigned int ret;
|
||||
u16 outfmtctrl2;
|
||||
int ret;
|
||||
|
||||
/* Force device reset. */
|
||||
ret = __mt9v111_hw_reset(mt9v111);
|
||||
|
||||
@@ -1333,10 +1333,13 @@ static int rj54n1_probe(struct i2c_client *client,
|
||||
V4L2_CID_GAIN, 0, 127, 1, 66);
|
||||
v4l2_ctrl_new_std(&rj54n1->hdl, &rj54n1_ctrl_ops,
|
||||
V4L2_CID_AUTO_WHITE_BALANCE, 0, 1, 1, 1);
|
||||
rj54n1->subdev.ctrl_handler = &rj54n1->hdl;
|
||||
if (rj54n1->hdl.error)
|
||||
return rj54n1->hdl.error;
|
||||
|
||||
if (rj54n1->hdl.error) {
|
||||
ret = rj54n1->hdl.error;
|
||||
goto err_free_ctrl;
|
||||
}
|
||||
|
||||
rj54n1->subdev.ctrl_handler = &rj54n1->hdl;
|
||||
rj54n1->clk_div = clk_div;
|
||||
rj54n1->rect.left = RJ54N1_COLUMN_SKIP;
|
||||
rj54n1->rect.top = RJ54N1_ROW_SKIP;
|
||||
|
||||
@@ -2200,10 +2200,10 @@ static int tc358743_probe(struct i2c_client *client,
|
||||
err_work_queues:
|
||||
cec_unregister_adapter(state->cec_adap);
|
||||
if (!state->i2c_client->irq) {
|
||||
del_timer(&state->timer);
|
||||
timer_delete_sync(&state->timer);
|
||||
flush_work(&state->work_i2c_poll);
|
||||
}
|
||||
cancel_delayed_work(&state->delayed_work_enable_hotplug);
|
||||
cancel_delayed_work_sync(&state->delayed_work_enable_hotplug);
|
||||
mutex_destroy(&state->confctl_mutex);
|
||||
err_hdl:
|
||||
media_entity_cleanup(&sd->entity);
|
||||
|
||||
@@ -410,7 +410,7 @@ static void flexcop_pci_remove(struct pci_dev *pdev)
|
||||
struct flexcop_pci *fc_pci = pci_get_drvdata(pdev);
|
||||
|
||||
if (irq_chk_intv > 0)
|
||||
cancel_delayed_work(&fc_pci->irq_check_work);
|
||||
cancel_delayed_work_sync(&fc_pci->irq_check_work);
|
||||
|
||||
flexcop_pci_dma_exit(fc_pci);
|
||||
flexcop_device_exit(fc_pci->fc_dev);
|
||||
|
||||
@@ -388,14 +388,22 @@ int cx18_stream_alloc(struct cx18_stream *s)
|
||||
break;
|
||||
}
|
||||
|
||||
buf->dma_handle = dma_map_single(&s->cx->pci_dev->dev,
|
||||
buf->buf, s->buf_size,
|
||||
s->dma);
|
||||
if (dma_mapping_error(&s->cx->pci_dev->dev, buf->dma_handle)) {
|
||||
kfree(buf->buf);
|
||||
kfree(mdl);
|
||||
kfree(buf);
|
||||
break;
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&mdl->list);
|
||||
INIT_LIST_HEAD(&mdl->buf_list);
|
||||
mdl->id = s->mdl_base_idx; /* a somewhat safe value */
|
||||
cx18_enqueue(s, mdl, &s->q_idle);
|
||||
|
||||
INIT_LIST_HEAD(&buf->list);
|
||||
buf->dma_handle = pci_map_single(s->cx->pci_dev,
|
||||
buf->buf, s->buf_size, s->dma);
|
||||
cx18_buf_sync_for_cpu(s, buf);
|
||||
list_add_tail(&buf->list, &s->buf_pool);
|
||||
}
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
#include "s5p_mfc_opr.h"
|
||||
#include "s5p_mfc_cmd_v6.h"
|
||||
|
||||
static int s5p_mfc_cmd_host2risc_v6(struct s5p_mfc_dev *dev, int cmd,
|
||||
struct s5p_mfc_cmd_args *args)
|
||||
static int s5p_mfc_cmd_host2risc_v6(struct s5p_mfc_dev *dev, int cmd)
|
||||
{
|
||||
mfc_debug(2, "Issue the command: %d\n", cmd);
|
||||
|
||||
@@ -35,7 +34,6 @@ static int s5p_mfc_cmd_host2risc_v6(struct s5p_mfc_dev *dev, int cmd,
|
||||
|
||||
static int s5p_mfc_sys_init_cmd_v6(struct s5p_mfc_dev *dev)
|
||||
{
|
||||
struct s5p_mfc_cmd_args h2r_args;
|
||||
struct s5p_mfc_buf_size_v6 *buf_size = dev->variant->buf_size->priv;
|
||||
int ret;
|
||||
|
||||
@@ -45,33 +43,23 @@ static int s5p_mfc_sys_init_cmd_v6(struct s5p_mfc_dev *dev)
|
||||
|
||||
mfc_write(dev, dev->ctx_buf.dma, S5P_FIMV_CONTEXT_MEM_ADDR_V6);
|
||||
mfc_write(dev, buf_size->dev_ctx, S5P_FIMV_CONTEXT_MEM_SIZE_V6);
|
||||
return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_SYS_INIT_V6,
|
||||
&h2r_args);
|
||||
return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_SYS_INIT_V6);
|
||||
}
|
||||
|
||||
static int s5p_mfc_sleep_cmd_v6(struct s5p_mfc_dev *dev)
|
||||
{
|
||||
struct s5p_mfc_cmd_args h2r_args;
|
||||
|
||||
memset(&h2r_args, 0, sizeof(struct s5p_mfc_cmd_args));
|
||||
return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_SLEEP_V6,
|
||||
&h2r_args);
|
||||
return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_SLEEP_V6);
|
||||
}
|
||||
|
||||
static int s5p_mfc_wakeup_cmd_v6(struct s5p_mfc_dev *dev)
|
||||
{
|
||||
struct s5p_mfc_cmd_args h2r_args;
|
||||
|
||||
memset(&h2r_args, 0, sizeof(struct s5p_mfc_cmd_args));
|
||||
return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_WAKEUP_V6,
|
||||
&h2r_args);
|
||||
return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_WAKEUP_V6);
|
||||
}
|
||||
|
||||
/* Open a new instance and get its number */
|
||||
static int s5p_mfc_open_inst_cmd_v6(struct s5p_mfc_ctx *ctx)
|
||||
{
|
||||
struct s5p_mfc_dev *dev = ctx->dev;
|
||||
struct s5p_mfc_cmd_args h2r_args;
|
||||
int codec_type;
|
||||
|
||||
mfc_debug(2, "Requested codec mode: %d\n", ctx->codec_mode);
|
||||
@@ -133,23 +121,20 @@ static int s5p_mfc_open_inst_cmd_v6(struct s5p_mfc_ctx *ctx)
|
||||
mfc_write(dev, ctx->ctx.size, S5P_FIMV_CONTEXT_MEM_SIZE_V6);
|
||||
mfc_write(dev, 0, S5P_FIMV_D_CRC_CTRL_V6); /* no crc */
|
||||
|
||||
return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_OPEN_INSTANCE_V6,
|
||||
&h2r_args);
|
||||
return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_OPEN_INSTANCE_V6);
|
||||
}
|
||||
|
||||
/* Close instance */
|
||||
static int s5p_mfc_close_inst_cmd_v6(struct s5p_mfc_ctx *ctx)
|
||||
{
|
||||
struct s5p_mfc_dev *dev = ctx->dev;
|
||||
struct s5p_mfc_cmd_args h2r_args;
|
||||
int ret = 0;
|
||||
|
||||
dev->curr_ctx = ctx->num;
|
||||
if (ctx->state != MFCINST_FREE) {
|
||||
mfc_write(dev, ctx->inst_no, S5P_FIMV_INSTANCE_ID_V6);
|
||||
ret = s5p_mfc_cmd_host2risc_v6(dev,
|
||||
S5P_FIMV_H2R_CMD_CLOSE_INSTANCE_V6,
|
||||
&h2r_args);
|
||||
S5P_FIMV_H2R_CMD_CLOSE_INSTANCE_V6);
|
||||
} else {
|
||||
ret = -EINVAL;
|
||||
}
|
||||
@@ -157,9 +142,15 @@ static int s5p_mfc_close_inst_cmd_v6(struct s5p_mfc_ctx *ctx)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int s5p_mfc_cmd_host2risc_v6_args(struct s5p_mfc_dev *dev, int cmd,
|
||||
struct s5p_mfc_cmd_args *ignored)
|
||||
{
|
||||
return s5p_mfc_cmd_host2risc_v6(dev, cmd);
|
||||
}
|
||||
|
||||
/* Initialize cmd function pointers for MFC v6 */
|
||||
static struct s5p_mfc_hw_cmds s5p_mfc_cmds_v6 = {
|
||||
.cmd_host2risc = s5p_mfc_cmd_host2risc_v6,
|
||||
.cmd_host2risc = s5p_mfc_cmd_host2risc_v6_args,
|
||||
.sys_init_cmd = s5p_mfc_sys_init_cmd_v6,
|
||||
.sleep_cmd = s5p_mfc_sleep_cmd_v6,
|
||||
.wakeup_cmd = s5p_mfc_wakeup_cmd_v6,
|
||||
|
||||
+119
-70
@@ -92,6 +92,7 @@ struct imon_usb_dev_descr {
|
||||
__u16 flags;
|
||||
#define IMON_NO_FLAGS 0
|
||||
#define IMON_NEED_20MS_PKT_DELAY 1
|
||||
#define IMON_SUPPRESS_REPEATED_KEYS 2
|
||||
struct imon_panel_key_table key_table[];
|
||||
};
|
||||
|
||||
@@ -158,8 +159,27 @@ struct imon_context {
|
||||
struct timer_list ttimer; /* touch screen timer */
|
||||
int touch_x; /* x coordinate on touchscreen */
|
||||
int touch_y; /* y coordinate on touchscreen */
|
||||
struct imon_usb_dev_descr *dev_descr; /* device description with key
|
||||
table for front panels */
|
||||
const struct imon_usb_dev_descr *dev_descr;
|
||||
/* device description with key */
|
||||
/* table for front panels */
|
||||
/*
|
||||
* Fields for deferring free_imon_context().
|
||||
*
|
||||
* Since reference to "struct imon_context" is stored into
|
||||
* "struct file"->private_data, we need to remember
|
||||
* how many file descriptors might access this "struct imon_context".
|
||||
*/
|
||||
refcount_t users;
|
||||
/*
|
||||
* Use a flag for telling display_open()/vfd_write()/lcd_write() that
|
||||
* imon_disconnect() was already called.
|
||||
*/
|
||||
bool disconnected;
|
||||
/*
|
||||
* We need to wait for RCU grace period in order to allow
|
||||
* display_open() to safely check ->disconnected and increment ->users.
|
||||
*/
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
||||
#define TOUCH_TIMEOUT (HZ/30)
|
||||
@@ -167,18 +187,18 @@ struct imon_context {
|
||||
/* vfd character device file operations */
|
||||
static const struct file_operations vfd_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = &display_open,
|
||||
.write = &vfd_write,
|
||||
.release = &display_close,
|
||||
.open = display_open,
|
||||
.write = vfd_write,
|
||||
.release = display_close,
|
||||
.llseek = noop_llseek,
|
||||
};
|
||||
|
||||
/* lcd character device file operations */
|
||||
static const struct file_operations lcd_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = &display_open,
|
||||
.write = &lcd_write,
|
||||
.release = &display_close,
|
||||
.open = display_open,
|
||||
.write = lcd_write,
|
||||
.release = display_close,
|
||||
.llseek = noop_llseek,
|
||||
};
|
||||
|
||||
@@ -324,6 +344,32 @@ static const struct imon_usb_dev_descr imon_DH102 = {
|
||||
}
|
||||
};
|
||||
|
||||
/* imon ultrabay front panel key table */
|
||||
static const struct imon_usb_dev_descr ultrabay_table = {
|
||||
.flags = IMON_SUPPRESS_REPEATED_KEYS,
|
||||
.key_table = {
|
||||
{ 0x0000000f0000ffeell, KEY_MEDIA }, /* Go */
|
||||
{ 0x000000000100ffeell, KEY_UP },
|
||||
{ 0x000000000001ffeell, KEY_DOWN },
|
||||
{ 0x000000160000ffeell, KEY_ENTER },
|
||||
{ 0x0000001f0000ffeell, KEY_AUDIO }, /* Music */
|
||||
{ 0x000000200000ffeell, KEY_VIDEO }, /* Movie */
|
||||
{ 0x000000210000ffeell, KEY_CAMERA }, /* Photo */
|
||||
{ 0x000000270000ffeell, KEY_DVD }, /* DVD */
|
||||
{ 0x000000230000ffeell, KEY_TV }, /* TV */
|
||||
{ 0x000000050000ffeell, KEY_PREVIOUS }, /* Previous */
|
||||
{ 0x000000070000ffeell, KEY_REWIND },
|
||||
{ 0x000000040000ffeell, KEY_STOP },
|
||||
{ 0x000000020000ffeell, KEY_PLAYPAUSE },
|
||||
{ 0x000000080000ffeell, KEY_FASTFORWARD },
|
||||
{ 0x000000060000ffeell, KEY_NEXT }, /* Next */
|
||||
{ 0x000100000000ffeell, KEY_VOLUMEUP },
|
||||
{ 0x010000000000ffeell, KEY_VOLUMEDOWN },
|
||||
{ 0x000000010000ffeell, KEY_MUTE },
|
||||
{ 0, KEY_RESERVED },
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* USB Device ID for iMON USB Control Boards
|
||||
*
|
||||
@@ -420,9 +466,6 @@ static struct usb_driver imon_driver = {
|
||||
.id_table = imon_usb_id_table,
|
||||
};
|
||||
|
||||
/* to prevent races between open() and disconnect(), probing, etc */
|
||||
static DEFINE_MUTEX(driver_lock);
|
||||
|
||||
/* Module bookkeeping bits */
|
||||
MODULE_AUTHOR(MOD_AUTHOR);
|
||||
MODULE_DESCRIPTION(MOD_DESC);
|
||||
@@ -462,9 +505,11 @@ static void free_imon_context(struct imon_context *ictx)
|
||||
struct device *dev = ictx->dev;
|
||||
|
||||
usb_free_urb(ictx->tx_urb);
|
||||
WARN_ON(ictx->dev_present_intf0);
|
||||
usb_free_urb(ictx->rx_urb_intf0);
|
||||
WARN_ON(ictx->dev_present_intf1);
|
||||
usb_free_urb(ictx->rx_urb_intf1);
|
||||
kfree(ictx);
|
||||
kfree_rcu(ictx, rcu);
|
||||
|
||||
dev_dbg(dev, "%s: iMON context freed\n", __func__);
|
||||
}
|
||||
@@ -480,9 +525,6 @@ static int display_open(struct inode *inode, struct file *file)
|
||||
int subminor;
|
||||
int retval = 0;
|
||||
|
||||
/* prevent races with disconnect */
|
||||
mutex_lock(&driver_lock);
|
||||
|
||||
subminor = iminor(inode);
|
||||
interface = usb_find_interface(&imon_driver, subminor);
|
||||
if (!interface) {
|
||||
@@ -490,17 +532,22 @@ static int display_open(struct inode *inode, struct file *file)
|
||||
retval = -ENODEV;
|
||||
goto exit;
|
||||
}
|
||||
ictx = usb_get_intfdata(interface);
|
||||
|
||||
if (!ictx) {
|
||||
rcu_read_lock();
|
||||
ictx = usb_get_intfdata(interface);
|
||||
if (!ictx || ictx->disconnected || !refcount_inc_not_zero(&ictx->users)) {
|
||||
rcu_read_unlock();
|
||||
pr_err("no context found for minor %d\n", subminor);
|
||||
retval = -ENODEV;
|
||||
goto exit;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
mutex_lock(&ictx->lock);
|
||||
|
||||
if (!ictx->display_supported) {
|
||||
if (ictx->disconnected) {
|
||||
retval = -ENODEV;
|
||||
} else if (!ictx->display_supported) {
|
||||
pr_err("display not supported by device\n");
|
||||
retval = -ENODEV;
|
||||
} else if (ictx->display_isopen) {
|
||||
@@ -514,8 +561,10 @@ static int display_open(struct inode *inode, struct file *file)
|
||||
|
||||
mutex_unlock(&ictx->lock);
|
||||
|
||||
if (retval && refcount_dec_and_test(&ictx->users))
|
||||
free_imon_context(ictx);
|
||||
|
||||
exit:
|
||||
mutex_unlock(&driver_lock);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -525,16 +574,9 @@ exit:
|
||||
*/
|
||||
static int display_close(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct imon_context *ictx = NULL;
|
||||
struct imon_context *ictx = file->private_data;
|
||||
int retval = 0;
|
||||
|
||||
ictx = file->private_data;
|
||||
|
||||
if (!ictx) {
|
||||
pr_err("no context for device\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
mutex_lock(&ictx->lock);
|
||||
|
||||
if (!ictx->display_supported) {
|
||||
@@ -549,6 +591,8 @@ static int display_close(struct inode *inode, struct file *file)
|
||||
}
|
||||
|
||||
mutex_unlock(&ictx->lock);
|
||||
if (refcount_dec_and_test(&ictx->users))
|
||||
free_imon_context(ictx);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -565,6 +609,11 @@ static int send_packet(struct imon_context *ictx)
|
||||
int retval = 0;
|
||||
struct usb_ctrlrequest *control_req = NULL;
|
||||
|
||||
lockdep_assert_held(&ictx->lock);
|
||||
|
||||
if (ictx->disconnected)
|
||||
return -ENODEV;
|
||||
|
||||
/* Check if we need to use control or interrupt urb */
|
||||
if (!ictx->tx_control) {
|
||||
pipe = usb_sndintpipe(ictx->usbdev_intf0,
|
||||
@@ -917,19 +966,18 @@ static ssize_t vfd_write(struct file *file, const char __user *buf,
|
||||
int offset;
|
||||
int seq;
|
||||
int retval = 0;
|
||||
struct imon_context *ictx;
|
||||
struct imon_context *ictx = file->private_data;
|
||||
static const unsigned char vfd_packet6[] = {
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF };
|
||||
|
||||
ictx = file->private_data;
|
||||
if (!ictx) {
|
||||
pr_err_ratelimited("no context for device\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (mutex_lock_interruptible(&ictx->lock))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
if (ictx->disconnected) {
|
||||
retval = -ENODEV;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!ictx->dev_present_intf0) {
|
||||
pr_err_ratelimited("no iMON device present\n");
|
||||
retval = -ENODEV;
|
||||
@@ -1002,16 +1050,15 @@ static ssize_t lcd_write(struct file *file, const char __user *buf,
|
||||
size_t n_bytes, loff_t *pos)
|
||||
{
|
||||
int retval = 0;
|
||||
struct imon_context *ictx;
|
||||
|
||||
ictx = file->private_data;
|
||||
if (!ictx) {
|
||||
pr_err_ratelimited("no context for device\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
struct imon_context *ictx = file->private_data;
|
||||
|
||||
mutex_lock(&ictx->lock);
|
||||
|
||||
if (ictx->disconnected) {
|
||||
retval = -ENODEV;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!ictx->display_supported) {
|
||||
pr_err_ratelimited("no iMON display present\n");
|
||||
retval = -ENODEV;
|
||||
@@ -1099,7 +1146,7 @@ static int imon_ir_change_protocol(struct rc_dev *rc, u64 *rc_proto)
|
||||
int retval;
|
||||
struct imon_context *ictx = rc->priv;
|
||||
struct device *dev = ictx->dev;
|
||||
bool unlock = false;
|
||||
const bool unlock = mutex_trylock(&ictx->lock);
|
||||
unsigned char ir_proto_packet[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 };
|
||||
|
||||
@@ -1126,8 +1173,6 @@ static int imon_ir_change_protocol(struct rc_dev *rc, u64 *rc_proto)
|
||||
|
||||
memcpy(ictx->usb_tx_buf, &ir_proto_packet, sizeof(ir_proto_packet));
|
||||
|
||||
unlock = mutex_trylock(&ictx->lock);
|
||||
|
||||
retval = send_packet(ictx);
|
||||
if (retval)
|
||||
goto out;
|
||||
@@ -1270,9 +1315,11 @@ static u32 imon_mce_key_lookup(struct imon_context *ictx, u32 scancode)
|
||||
|
||||
static u32 imon_panel_key_lookup(struct imon_context *ictx, u64 code)
|
||||
{
|
||||
int i;
|
||||
const struct imon_panel_key_table *key_table;
|
||||
u32 keycode = KEY_RESERVED;
|
||||
struct imon_panel_key_table *key_table = ictx->dev_descr->key_table;
|
||||
int i;
|
||||
|
||||
key_table = ictx->dev_descr->key_table;
|
||||
|
||||
for (i = 0; key_table[i].hw_code != 0; i++) {
|
||||
if (key_table[i].hw_code == (code | 0xffee)) {
|
||||
@@ -1556,7 +1603,6 @@ static void imon_incoming_packet(struct imon_context *ictx,
|
||||
u32 kc;
|
||||
u64 scancode;
|
||||
int press_type = 0;
|
||||
long msec;
|
||||
ktime_t t;
|
||||
static ktime_t prev_time;
|
||||
u8 ktype;
|
||||
@@ -1658,14 +1704,16 @@ static void imon_incoming_packet(struct imon_context *ictx,
|
||||
spin_lock_irqsave(&ictx->kc_lock, flags);
|
||||
|
||||
t = ktime_get();
|
||||
/* KEY_MUTE repeats from knob need to be suppressed */
|
||||
if (ictx->kc == KEY_MUTE && ictx->kc == ictx->last_keycode) {
|
||||
msec = ktime_ms_delta(t, prev_time);
|
||||
if (msec < ictx->idev->rep[REP_DELAY]) {
|
||||
/* KEY repeats from knob and panel that need to be suppressed */
|
||||
if (ictx->kc == KEY_MUTE ||
|
||||
ictx->dev_descr->flags & IMON_SUPPRESS_REPEATED_KEYS) {
|
||||
if (ictx->kc == ictx->last_keycode &&
|
||||
ktime_ms_delta(t, prev_time) < ictx->idev->rep[REP_DELAY]) {
|
||||
spin_unlock_irqrestore(&ictx->kc_lock, flags);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
prev_time = t;
|
||||
kc = ictx->kc;
|
||||
|
||||
@@ -1853,6 +1901,14 @@ static void imon_get_ffdc_type(struct imon_context *ictx)
|
||||
dev_info(ictx->dev, "0xffdc iMON Inside, iMON IR");
|
||||
ictx->display_supported = false;
|
||||
break;
|
||||
/* Soundgraph iMON UltraBay */
|
||||
case 0x98:
|
||||
dev_info(ictx->dev, "0xffdc iMON UltraBay, LCD + IR");
|
||||
detected_display_type = IMON_DISPLAY_TYPE_LCD;
|
||||
allowed_protos = RC_PROTO_BIT_IMON | RC_PROTO_BIT_RC6_MCE;
|
||||
ictx->dev_descr = &ultrabay_table;
|
||||
break;
|
||||
|
||||
default:
|
||||
dev_info(ictx->dev, "Unknown 0xffdc device, defaulting to VFD and iMON IR");
|
||||
detected_display_type = IMON_DISPLAY_TYPE_VFD;
|
||||
@@ -1984,10 +2040,12 @@ out:
|
||||
|
||||
static struct input_dev *imon_init_idev(struct imon_context *ictx)
|
||||
{
|
||||
struct imon_panel_key_table *key_table = ictx->dev_descr->key_table;
|
||||
const struct imon_panel_key_table *key_table;
|
||||
struct input_dev *idev;
|
||||
int ret, i;
|
||||
|
||||
key_table = ictx->dev_descr->key_table;
|
||||
|
||||
idev = input_allocate_device();
|
||||
if (!idev)
|
||||
goto out;
|
||||
@@ -2370,7 +2428,6 @@ static int imon_probe(struct usb_interface *interface,
|
||||
int ifnum, sysfs_err;
|
||||
int ret = 0;
|
||||
struct imon_context *ictx = NULL;
|
||||
struct imon_context *first_if_ctx = NULL;
|
||||
u16 vendor, product;
|
||||
|
||||
usbdev = usb_get_dev(interface_to_usbdev(interface));
|
||||
@@ -2382,17 +2439,12 @@ static int imon_probe(struct usb_interface *interface,
|
||||
dev_dbg(dev, "%s: found iMON device (%04x:%04x, intf%d)\n",
|
||||
__func__, vendor, product, ifnum);
|
||||
|
||||
/* prevent races probing devices w/multiple interfaces */
|
||||
mutex_lock(&driver_lock);
|
||||
|
||||
first_if = usb_ifnum_to_if(usbdev, 0);
|
||||
if (!first_if) {
|
||||
ret = -ENODEV;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
first_if_ctx = usb_get_intfdata(first_if);
|
||||
|
||||
if (ifnum == 0) {
|
||||
ictx = imon_init_intf0(interface, id);
|
||||
if (!ictx) {
|
||||
@@ -2400,9 +2452,11 @@ static int imon_probe(struct usb_interface *interface,
|
||||
ret = -ENODEV;
|
||||
goto fail;
|
||||
}
|
||||
refcount_set(&ictx->users, 1);
|
||||
|
||||
} else {
|
||||
/* this is the secondary interface on the device */
|
||||
struct imon_context *first_if_ctx = usb_get_intfdata(first_if);
|
||||
|
||||
/* fail early if first intf failed to register */
|
||||
if (!first_if_ctx) {
|
||||
@@ -2416,14 +2470,13 @@ static int imon_probe(struct usb_interface *interface,
|
||||
ret = -ENODEV;
|
||||
goto fail;
|
||||
}
|
||||
refcount_inc(&ictx->users);
|
||||
|
||||
}
|
||||
|
||||
usb_set_intfdata(interface, ictx);
|
||||
|
||||
if (ifnum == 0) {
|
||||
mutex_lock(&ictx->lock);
|
||||
|
||||
if (product == 0xffdc && ictx->rf_device) {
|
||||
sysfs_err = sysfs_create_group(&interface->dev.kobj,
|
||||
&imon_rf_attr_group);
|
||||
@@ -2434,21 +2487,17 @@ static int imon_probe(struct usb_interface *interface,
|
||||
|
||||
if (ictx->display_supported)
|
||||
imon_init_display(ictx, interface);
|
||||
|
||||
mutex_unlock(&ictx->lock);
|
||||
}
|
||||
|
||||
dev_info(dev, "iMON device (%04x:%04x, intf%d) on usb<%d:%d> initialized\n",
|
||||
vendor, product, ifnum,
|
||||
usbdev->bus->busnum, usbdev->devnum);
|
||||
|
||||
mutex_unlock(&driver_lock);
|
||||
usb_put_dev(usbdev);
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
mutex_unlock(&driver_lock);
|
||||
usb_put_dev(usbdev);
|
||||
dev_err(dev, "unable to register, err %d\n", ret);
|
||||
|
||||
@@ -2464,10 +2513,12 @@ static void imon_disconnect(struct usb_interface *interface)
|
||||
struct device *dev;
|
||||
int ifnum;
|
||||
|
||||
/* prevent races with multi-interface device probing and display_open */
|
||||
mutex_lock(&driver_lock);
|
||||
|
||||
ictx = usb_get_intfdata(interface);
|
||||
|
||||
mutex_lock(&ictx->lock);
|
||||
ictx->disconnected = true;
|
||||
mutex_unlock(&ictx->lock);
|
||||
|
||||
dev = ictx->dev;
|
||||
ifnum = interface->cur_altsetting->desc.bInterfaceNumber;
|
||||
|
||||
@@ -2508,11 +2559,9 @@ static void imon_disconnect(struct usb_interface *interface)
|
||||
}
|
||||
}
|
||||
|
||||
if (!ictx->dev_present_intf0 && !ictx->dev_present_intf1)
|
||||
if (refcount_dec_and_test(&ictx->users))
|
||||
free_imon_context(ictx);
|
||||
|
||||
mutex_unlock(&driver_lock);
|
||||
|
||||
dev_dbg(dev, "%s: iMON device (intf%d) disconnected\n",
|
||||
__func__, ifnum);
|
||||
}
|
||||
|
||||
@@ -754,7 +754,7 @@ int ir_lirc_register(struct rc_dev *dev)
|
||||
const char *rx_type, *tx_type;
|
||||
int err, minor;
|
||||
|
||||
minor = ida_simple_get(&lirc_ida, 0, RC_DEV_MAX, GFP_KERNEL);
|
||||
minor = ida_alloc_max(&lirc_ida, RC_DEV_MAX - 1, GFP_KERNEL);
|
||||
if (minor < 0)
|
||||
return minor;
|
||||
|
||||
@@ -770,11 +770,11 @@ int ir_lirc_register(struct rc_dev *dev)
|
||||
|
||||
cdev_init(&dev->lirc_cdev, &lirc_fops);
|
||||
|
||||
get_device(&dev->dev);
|
||||
|
||||
err = cdev_device_add(&dev->lirc_cdev, &dev->lirc_dev);
|
||||
if (err)
|
||||
goto out_ida;
|
||||
|
||||
get_device(&dev->dev);
|
||||
goto out_put_device;
|
||||
|
||||
switch (dev->driver_type) {
|
||||
case RC_DRIVER_SCANCODE:
|
||||
@@ -798,8 +798,9 @@ int ir_lirc_register(struct rc_dev *dev)
|
||||
|
||||
return 0;
|
||||
|
||||
out_ida:
|
||||
ida_simple_remove(&lirc_ida, minor);
|
||||
out_put_device:
|
||||
put_device(&dev->lirc_dev);
|
||||
ida_free(&lirc_ida, minor);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -817,7 +818,7 @@ void ir_lirc_unregister(struct rc_dev *dev)
|
||||
spin_unlock_irqrestore(&dev->lirc_fh_lock, flags);
|
||||
|
||||
cdev_device_del(&dev->lirc_cdev, &dev->lirc_dev);
|
||||
ida_simple_remove(&lirc_ida, MINOR(dev->lirc_dev.devt));
|
||||
ida_free(&lirc_ida, MINOR(dev->lirc_dev.devt));
|
||||
}
|
||||
|
||||
int __init lirc_dev_init(void)
|
||||
|
||||
@@ -1844,7 +1844,7 @@ int rc_register_device(struct rc_dev *dev)
|
||||
if (!dev)
|
||||
return -EINVAL;
|
||||
|
||||
minor = ida_simple_get(&rc_ida, 0, RC_DEV_MAX, GFP_KERNEL);
|
||||
minor = ida_alloc_max(&rc_ida, RC_DEV_MAX - 1, GFP_KERNEL);
|
||||
if (minor < 0)
|
||||
return minor;
|
||||
|
||||
@@ -1927,7 +1927,7 @@ out_rx_free:
|
||||
out_raw:
|
||||
ir_raw_event_free(dev);
|
||||
out_minor:
|
||||
ida_simple_remove(&rc_ida, minor);
|
||||
ida_free(&rc_ida, minor);
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rc_register_device);
|
||||
@@ -1987,7 +1987,7 @@ void rc_unregister_device(struct rc_dev *dev)
|
||||
|
||||
device_del(&dev->dev);
|
||||
|
||||
ida_simple_remove(&rc_ida, dev->minor);
|
||||
ida_free(&rc_ida, dev->minor);
|
||||
|
||||
if (!dev->managed_alloc)
|
||||
rc_free_device(dev);
|
||||
|
||||
@@ -68,7 +68,7 @@ struct xc5000_priv {
|
||||
struct dvb_frontend *fe;
|
||||
struct delayed_work timer_sleep;
|
||||
|
||||
const struct firmware *firmware;
|
||||
bool inited;
|
||||
};
|
||||
|
||||
/* Misc Defines */
|
||||
@@ -1120,23 +1120,19 @@ static int xc_load_fw_and_init_tuner(struct dvb_frontend *fe, int force)
|
||||
if (!force && xc5000_is_firmware_loaded(fe) == 0)
|
||||
return 0;
|
||||
|
||||
if (!priv->firmware) {
|
||||
ret = request_firmware(&fw, desired_fw->name,
|
||||
priv->i2c_props.adap->dev.parent);
|
||||
if (ret) {
|
||||
pr_err("xc5000: Upload failed. rc %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
dprintk(1, "firmware read %zu bytes.\n", fw->size);
|
||||
ret = request_firmware(&fw, desired_fw->name,
|
||||
priv->i2c_props.adap->dev.parent);
|
||||
if (ret) {
|
||||
pr_err("xc5000: Upload failed. rc %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
dprintk(1, "firmware read %zu bytes.\n", fw->size);
|
||||
|
||||
if (fw->size != desired_fw->size) {
|
||||
pr_err("xc5000: Firmware file with incorrect size\n");
|
||||
release_firmware(fw);
|
||||
return -EINVAL;
|
||||
}
|
||||
priv->firmware = fw;
|
||||
} else
|
||||
fw = priv->firmware;
|
||||
if (fw->size != desired_fw->size) {
|
||||
pr_err("xc5000: Firmware file with incorrect size\n");
|
||||
release_firmware(fw);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Try up to 5 times to load firmware */
|
||||
for (i = 0; i < 5; i++) {
|
||||
@@ -1214,6 +1210,7 @@ static int xc_load_fw_and_init_tuner(struct dvb_frontend *fe, int force)
|
||||
}
|
||||
|
||||
err:
|
||||
release_firmware(fw);
|
||||
if (!ret)
|
||||
printk(KERN_INFO "xc5000: Firmware %s loaded and running.\n",
|
||||
desired_fw->name);
|
||||
@@ -1284,7 +1281,7 @@ static int xc5000_resume(struct dvb_frontend *fe)
|
||||
|
||||
/* suspended before firmware is loaded.
|
||||
Avoid firmware load in resume path. */
|
||||
if (!priv->firmware)
|
||||
if (!priv->inited)
|
||||
return 0;
|
||||
|
||||
return xc5000_set_params(fe);
|
||||
@@ -1303,6 +1300,8 @@ static int xc5000_init(struct dvb_frontend *fe)
|
||||
if (debug)
|
||||
xc_debug_dump(priv);
|
||||
|
||||
priv->inited = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1315,11 +1314,7 @@ static void xc5000_release(struct dvb_frontend *fe)
|
||||
mutex_lock(&xc5000_list_mutex);
|
||||
|
||||
if (priv) {
|
||||
cancel_delayed_work(&priv->timer_sleep);
|
||||
if (priv->firmware) {
|
||||
release_firmware(priv->firmware);
|
||||
priv->firmware = NULL;
|
||||
}
|
||||
cancel_delayed_work_sync(&priv->timer_sleep);
|
||||
hybrid_tuner_release_state(priv);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,9 +47,9 @@ struct exynos_srom {
|
||||
struct exynos_srom_reg_dump *reg_offset;
|
||||
};
|
||||
|
||||
static struct exynos_srom_reg_dump *exynos_srom_alloc_reg_dump(
|
||||
const unsigned long *rdump,
|
||||
unsigned long nr_rdump)
|
||||
static struct exynos_srom_reg_dump *
|
||||
exynos_srom_alloc_reg_dump(const unsigned long *rdump,
|
||||
unsigned long nr_rdump)
|
||||
{
|
||||
struct exynos_srom_reg_dump *rd;
|
||||
unsigned int i;
|
||||
@@ -116,25 +116,23 @@ static int exynos_srom_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
srom = devm_kzalloc(&pdev->dev,
|
||||
sizeof(struct exynos_srom), GFP_KERNEL);
|
||||
sizeof(struct exynos_srom), GFP_KERNEL);
|
||||
if (!srom)
|
||||
return -ENOMEM;
|
||||
|
||||
srom->dev = dev;
|
||||
srom->reg_base = of_iomap(np, 0);
|
||||
if (!srom->reg_base) {
|
||||
srom->reg_base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(srom->reg_base)) {
|
||||
dev_err(&pdev->dev, "iomap of exynos srom controller failed\n");
|
||||
return -ENOMEM;
|
||||
return PTR_ERR(srom->reg_base);
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, srom);
|
||||
|
||||
srom->reg_offset = exynos_srom_alloc_reg_dump(exynos_srom_offsets,
|
||||
ARRAY_SIZE(exynos_srom_offsets));
|
||||
if (!srom->reg_offset) {
|
||||
iounmap(srom->reg_base);
|
||||
ARRAY_SIZE(exynos_srom_offsets));
|
||||
if (!srom->reg_offset)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
for_each_child_of_node(np, child) {
|
||||
if (exynos_srom_configure_bank(srom, child)) {
|
||||
@@ -157,16 +155,16 @@ static int exynos_srom_probe(struct platform_device *pdev)
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static void exynos_srom_save(void __iomem *base,
|
||||
struct exynos_srom_reg_dump *rd,
|
||||
unsigned int num_regs)
|
||||
struct exynos_srom_reg_dump *rd,
|
||||
unsigned int num_regs)
|
||||
{
|
||||
for (; num_regs > 0; --num_regs, ++rd)
|
||||
rd->value = readl(base + rd->offset);
|
||||
}
|
||||
|
||||
static void exynos_srom_restore(void __iomem *base,
|
||||
const struct exynos_srom_reg_dump *rd,
|
||||
unsigned int num_regs)
|
||||
const struct exynos_srom_reg_dump *rd,
|
||||
unsigned int num_regs)
|
||||
{
|
||||
for (; num_regs > 0; --num_regs, ++rd)
|
||||
writel(rd->value, base + rd->offset);
|
||||
@@ -177,7 +175,7 @@ static int exynos_srom_suspend(struct device *dev)
|
||||
struct exynos_srom *srom = dev_get_drvdata(dev);
|
||||
|
||||
exynos_srom_save(srom->reg_base, srom->reg_offset,
|
||||
ARRAY_SIZE(exynos_srom_offsets));
|
||||
ARRAY_SIZE(exynos_srom_offsets));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -186,7 +184,7 @@ static int exynos_srom_resume(struct device *dev)
|
||||
struct exynos_srom *srom = dev_get_drvdata(dev);
|
||||
|
||||
exynos_srom_restore(srom->reg_base, srom->reg_offset,
|
||||
ARRAY_SIZE(exynos_srom_offsets));
|
||||
ARRAY_SIZE(exynos_srom_offsets));
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -84,8 +84,7 @@ static struct mfd_cell chtdc_ti_dev[] = {
|
||||
static const struct regmap_config chtdc_ti_regmap_config = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
.max_register = 128,
|
||||
.cache_type = REGCACHE_NONE,
|
||||
.max_register = 0xff,
|
||||
};
|
||||
|
||||
static const struct regmap_irq chtdc_ti_irqs[] = {
|
||||
|
||||
@@ -167,6 +167,7 @@ static int vexpress_sysreg_probe(struct platform_device *pdev)
|
||||
struct gpio_chip *mmc_gpio_chip;
|
||||
int master;
|
||||
u32 dt_hbi;
|
||||
int ret;
|
||||
|
||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!mem)
|
||||
@@ -202,7 +203,10 @@ static int vexpress_sysreg_probe(struct platform_device *pdev)
|
||||
bgpio_init(mmc_gpio_chip, &pdev->dev, 0x4, base + SYS_MCI,
|
||||
NULL, NULL, NULL, NULL, 0);
|
||||
mmc_gpio_chip->ngpio = 2;
|
||||
gpiochip_add_data(mmc_gpio_chip, NULL);
|
||||
|
||||
ret = gpiochip_add_data(mmc_gpio_chip, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO,
|
||||
vexpress_sysreg_cells,
|
||||
|
||||
@@ -927,7 +927,7 @@ int __genwqe_execute_raw_ddcb(struct genwqe_dev *cd,
|
||||
}
|
||||
if (cmd->asv_length > DDCB_ASV_LENGTH) {
|
||||
dev_err(&pci_dev->dev, "[%s] err: wrong asv_length of %d\n",
|
||||
__func__, cmd->asiv_length);
|
||||
__func__, cmd->asv_length);
|
||||
return -EINVAL;
|
||||
}
|
||||
rc = __genwqe_enqueue_ddcb(cd, req, f_flags);
|
||||
|
||||
@@ -933,7 +933,11 @@ static void mmc_sdio_remove(struct mmc_host *host)
|
||||
*/
|
||||
static int mmc_sdio_alive(struct mmc_host *host)
|
||||
{
|
||||
return mmc_select_card(host->card);
|
||||
if (!mmc_host_is_spi(host))
|
||||
return mmc_select_card(host->card);
|
||||
else
|
||||
return mmc_io_rw_direct(host->card, 0, 0, SDIO_CCCR_CCCR, 0,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -895,10 +895,14 @@ static int fsmc_nand_probe_config_dt(struct platform_device *pdev,
|
||||
if (!of_property_read_u32(np, "bank-width", &val)) {
|
||||
if (val == 2) {
|
||||
nand->options |= NAND_BUSWIDTH_16;
|
||||
} else if (val != 1) {
|
||||
} else if (val == 1) {
|
||||
nand->options |= NAND_BUSWIDTH_AUTO;
|
||||
} else {
|
||||
dev_err(&pdev->dev, "invalid bank-width %u\n", val);
|
||||
return -EINVAL;
|
||||
}
|
||||
} else {
|
||||
nand->options |= NAND_BUSWIDTH_AUTO;
|
||||
}
|
||||
|
||||
if (of_get_property(np, "nand-skip-bbtscan", NULL))
|
||||
|
||||
@@ -493,6 +493,7 @@ static int cqspi_read_setup(struct spi_nor *nor)
|
||||
reg &= ~CQSPI_REG_SIZE_ADDRESS_MASK;
|
||||
reg |= (nor->addr_width - 1);
|
||||
writel(reg, reg_base + CQSPI_REG_SIZE);
|
||||
readl(reg_base + CQSPI_REG_SIZE); /* Flush posted write. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -520,6 +521,7 @@ static int cqspi_indirect_read_execute(struct spi_nor *nor, u8 *rxbuf,
|
||||
reinit_completion(&cqspi->transfer_complete);
|
||||
writel(CQSPI_REG_INDIRECTRD_START_MASK,
|
||||
reg_base + CQSPI_REG_INDIRECTRD);
|
||||
readl(reg_base + CQSPI_REG_INDIRECTRD); /* Flush posted write. */
|
||||
|
||||
while (remaining > 0) {
|
||||
if (!wait_for_completion_timeout(&cqspi->transfer_complete,
|
||||
@@ -605,6 +607,7 @@ static int cqspi_write_setup(struct spi_nor *nor)
|
||||
reg &= ~CQSPI_REG_SIZE_ADDRESS_MASK;
|
||||
reg |= (nor->addr_width - 1);
|
||||
writel(reg, reg_base + CQSPI_REG_SIZE);
|
||||
readl(reg_base + CQSPI_REG_SIZE); /* Flush posted write. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -630,6 +633,8 @@ static int cqspi_indirect_write_execute(struct spi_nor *nor, loff_t to_addr,
|
||||
reinit_completion(&cqspi->transfer_complete);
|
||||
writel(CQSPI_REG_INDIRECTWR_START_MASK,
|
||||
reg_base + CQSPI_REG_INDIRECTWR);
|
||||
readl(reg_base + CQSPI_REG_INDIRECTWR); /* Flush posted write. */
|
||||
|
||||
/*
|
||||
* As per 66AK2G02 TRM SPRUHY8F section 11.15.5.3 Indirect Access
|
||||
* Controller programming sequence, couple of cycles of
|
||||
|
||||
@@ -646,7 +646,10 @@ static u32 ena_get_rxfh_indir_size(struct net_device *netdev)
|
||||
|
||||
static u32 ena_get_rxfh_key_size(struct net_device *netdev)
|
||||
{
|
||||
return ENA_HASH_KEY_SIZE;
|
||||
struct ena_adapter *adapter = netdev_priv(netdev);
|
||||
struct ena_rss *rss = &adapter->ena_dev->rss;
|
||||
|
||||
return rss->hash_key ? ENA_HASH_KEY_SIZE : 0;
|
||||
}
|
||||
|
||||
static int ena_indirection_table_get(struct ena_adapter *adapter, u32 *indir)
|
||||
|
||||
@@ -1248,7 +1248,6 @@ static void xgbe_free_rx_data(struct xgbe_prv_data *pdata)
|
||||
|
||||
static int xgbe_phy_reset(struct xgbe_prv_data *pdata)
|
||||
{
|
||||
pdata->phy_link = -1;
|
||||
pdata->phy_speed = SPEED_UNKNOWN;
|
||||
|
||||
return pdata->phy_if.phy_reset(pdata);
|
||||
|
||||
@@ -1637,6 +1637,7 @@ static int xgbe_phy_init(struct xgbe_prv_data *pdata)
|
||||
pdata->phy.duplex = DUPLEX_FULL;
|
||||
}
|
||||
|
||||
pdata->phy_link = 0;
|
||||
pdata->phy.link = 0;
|
||||
|
||||
pdata->phy.pause_autoneg = pdata->pause_autoneg;
|
||||
|
||||
@@ -5827,7 +5827,7 @@ static int tg3_setup_fiber_mii_phy(struct tg3 *tp, bool force_reset)
|
||||
u16 current_speed = SPEED_UNKNOWN;
|
||||
u8 current_duplex = DUPLEX_UNKNOWN;
|
||||
bool current_link_up = false;
|
||||
u32 local_adv, remote_adv, sgsr;
|
||||
u32 local_adv = 0, remote_adv = 0, sgsr;
|
||||
|
||||
if ((tg3_asic_rev(tp) == ASIC_REV_5719 ||
|
||||
tg3_asic_rev(tp) == ASIC_REV_5720) &&
|
||||
@@ -5968,9 +5968,6 @@ static int tg3_setup_fiber_mii_phy(struct tg3 *tp, bool force_reset)
|
||||
else
|
||||
current_duplex = DUPLEX_HALF;
|
||||
|
||||
local_adv = 0;
|
||||
remote_adv = 0;
|
||||
|
||||
if (bmcr & BMCR_ANENABLE) {
|
||||
u32 common;
|
||||
|
||||
|
||||
@@ -236,13 +236,15 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
|
||||
pci_set_drvdata (pdev, dev);
|
||||
|
||||
ring_space = pci_alloc_consistent (pdev, TX_TOTAL_SIZE, &ring_dma);
|
||||
ring_space = dma_alloc_coherent(&pdev->dev, TX_TOTAL_SIZE, &ring_dma,
|
||||
GFP_KERNEL);
|
||||
if (!ring_space)
|
||||
goto err_out_iounmap;
|
||||
np->tx_ring = ring_space;
|
||||
np->tx_ring_dma = ring_dma;
|
||||
|
||||
ring_space = pci_alloc_consistent (pdev, RX_TOTAL_SIZE, &ring_dma);
|
||||
ring_space = dma_alloc_coherent(&pdev->dev, RX_TOTAL_SIZE, &ring_dma,
|
||||
GFP_KERNEL);
|
||||
if (!ring_space)
|
||||
goto err_out_unmap_tx;
|
||||
np->rx_ring = ring_space;
|
||||
@@ -293,9 +295,11 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
return 0;
|
||||
|
||||
err_out_unmap_rx:
|
||||
pci_free_consistent (pdev, RX_TOTAL_SIZE, np->rx_ring, np->rx_ring_dma);
|
||||
dma_free_coherent(&pdev->dev, RX_TOTAL_SIZE, np->rx_ring,
|
||||
np->rx_ring_dma);
|
||||
err_out_unmap_tx:
|
||||
pci_free_consistent (pdev, TX_TOTAL_SIZE, np->tx_ring, np->tx_ring_dma);
|
||||
dma_free_coherent(&pdev->dev, TX_TOTAL_SIZE, np->tx_ring,
|
||||
np->tx_ring_dma);
|
||||
err_out_iounmap:
|
||||
#ifdef MEM_MAPPING
|
||||
pci_iounmap(pdev, np->ioaddr);
|
||||
@@ -449,8 +453,9 @@ static void free_list(struct net_device *dev)
|
||||
for (i = 0; i < RX_RING_SIZE; i++) {
|
||||
skb = np->rx_skbuff[i];
|
||||
if (skb) {
|
||||
pci_unmap_single(np->pdev, desc_to_dma(&np->rx_ring[i]),
|
||||
skb->len, PCI_DMA_FROMDEVICE);
|
||||
dma_unmap_single(&np->pdev->dev,
|
||||
desc_to_dma(&np->rx_ring[i]),
|
||||
skb->len, DMA_FROM_DEVICE);
|
||||
dev_kfree_skb(skb);
|
||||
np->rx_skbuff[i] = NULL;
|
||||
}
|
||||
@@ -460,8 +465,9 @@ static void free_list(struct net_device *dev)
|
||||
for (i = 0; i < TX_RING_SIZE; i++) {
|
||||
skb = np->tx_skbuff[i];
|
||||
if (skb) {
|
||||
pci_unmap_single(np->pdev, desc_to_dma(&np->tx_ring[i]),
|
||||
skb->len, PCI_DMA_TODEVICE);
|
||||
dma_unmap_single(&np->pdev->dev,
|
||||
desc_to_dma(&np->tx_ring[i]),
|
||||
skb->len, DMA_TO_DEVICE);
|
||||
dev_kfree_skb(skb);
|
||||
np->tx_skbuff[i] = NULL;
|
||||
}
|
||||
@@ -505,26 +511,34 @@ static int alloc_list(struct net_device *dev)
|
||||
for (i = 0; i < RX_RING_SIZE; i++) {
|
||||
/* Allocated fixed size of skbuff */
|
||||
struct sk_buff *skb;
|
||||
dma_addr_t addr;
|
||||
|
||||
skb = netdev_alloc_skb_ip_align(dev, np->rx_buf_sz);
|
||||
np->rx_skbuff[i] = skb;
|
||||
if (!skb) {
|
||||
free_list(dev);
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (!skb)
|
||||
goto err_free_list;
|
||||
|
||||
addr = dma_map_single(&np->pdev->dev, skb->data,
|
||||
np->rx_buf_sz, DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(&np->pdev->dev, addr))
|
||||
goto err_kfree_skb;
|
||||
|
||||
np->rx_ring[i].next_desc = cpu_to_le64(np->rx_ring_dma +
|
||||
((i + 1) % RX_RING_SIZE) *
|
||||
sizeof(struct netdev_desc));
|
||||
/* Rubicon now supports 40 bits of addressing space. */
|
||||
np->rx_ring[i].fraginfo =
|
||||
cpu_to_le64(pci_map_single(
|
||||
np->pdev, skb->data, np->rx_buf_sz,
|
||||
PCI_DMA_FROMDEVICE));
|
||||
np->rx_ring[i].fraginfo = cpu_to_le64(addr);
|
||||
np->rx_ring[i].fraginfo |= cpu_to_le64((u64)np->rx_buf_sz << 48);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_kfree_skb:
|
||||
dev_kfree_skb(np->rx_skbuff[i]);
|
||||
np->rx_skbuff[i] = NULL;
|
||||
err_free_list:
|
||||
free_list(dev);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static void rio_hw_init(struct net_device *dev)
|
||||
@@ -686,9 +700,8 @@ rio_timer (struct timer_list *t)
|
||||
}
|
||||
np->rx_skbuff[entry] = skb;
|
||||
np->rx_ring[entry].fraginfo =
|
||||
cpu_to_le64 (pci_map_single
|
||||
(np->pdev, skb->data, np->rx_buf_sz,
|
||||
PCI_DMA_FROMDEVICE));
|
||||
cpu_to_le64 (dma_map_single(&np->pdev->dev, skb->data,
|
||||
np->rx_buf_sz, DMA_FROM_DEVICE));
|
||||
}
|
||||
np->rx_ring[entry].fraginfo |=
|
||||
cpu_to_le64((u64)np->rx_buf_sz << 48);
|
||||
@@ -742,9 +755,8 @@ start_xmit (struct sk_buff *skb, struct net_device *dev)
|
||||
((u64)np->vlan << 32) |
|
||||
((u64)skb->priority << 45);
|
||||
}
|
||||
txdesc->fraginfo = cpu_to_le64 (pci_map_single (np->pdev, skb->data,
|
||||
skb->len,
|
||||
PCI_DMA_TODEVICE));
|
||||
txdesc->fraginfo = cpu_to_le64 (dma_map_single(&np->pdev->dev, skb->data,
|
||||
skb->len, DMA_TO_DEVICE));
|
||||
txdesc->fraginfo |= cpu_to_le64((u64)skb->len << 48);
|
||||
|
||||
/* DL2K bug: DMA fails to get next descriptor ptr in 10Mbps mode
|
||||
@@ -841,9 +853,9 @@ rio_free_tx (struct net_device *dev, int irq)
|
||||
if (!(np->tx_ring[entry].status & cpu_to_le64(TFDDone)))
|
||||
break;
|
||||
skb = np->tx_skbuff[entry];
|
||||
pci_unmap_single (np->pdev,
|
||||
desc_to_dma(&np->tx_ring[entry]),
|
||||
skb->len, PCI_DMA_TODEVICE);
|
||||
dma_unmap_single(&np->pdev->dev,
|
||||
desc_to_dma(&np->tx_ring[entry]), skb->len,
|
||||
DMA_TO_DEVICE);
|
||||
if (irq)
|
||||
dev_kfree_skb_irq (skb);
|
||||
else
|
||||
@@ -968,25 +980,25 @@ receive_packet (struct net_device *dev)
|
||||
|
||||
/* Small skbuffs for short packets */
|
||||
if (pkt_len > copy_thresh) {
|
||||
pci_unmap_single (np->pdev,
|
||||
desc_to_dma(desc),
|
||||
np->rx_buf_sz,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
dma_unmap_single(&np->pdev->dev,
|
||||
desc_to_dma(desc),
|
||||
np->rx_buf_sz,
|
||||
DMA_FROM_DEVICE);
|
||||
skb_put (skb = np->rx_skbuff[entry], pkt_len);
|
||||
np->rx_skbuff[entry] = NULL;
|
||||
} else if ((skb = netdev_alloc_skb_ip_align(dev, pkt_len))) {
|
||||
pci_dma_sync_single_for_cpu(np->pdev,
|
||||
desc_to_dma(desc),
|
||||
np->rx_buf_sz,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
dma_sync_single_for_cpu(&np->pdev->dev,
|
||||
desc_to_dma(desc),
|
||||
np->rx_buf_sz,
|
||||
DMA_FROM_DEVICE);
|
||||
skb_copy_to_linear_data (skb,
|
||||
np->rx_skbuff[entry]->data,
|
||||
pkt_len);
|
||||
skb_put (skb, pkt_len);
|
||||
pci_dma_sync_single_for_device(np->pdev,
|
||||
desc_to_dma(desc),
|
||||
np->rx_buf_sz,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
dma_sync_single_for_device(&np->pdev->dev,
|
||||
desc_to_dma(desc),
|
||||
np->rx_buf_sz,
|
||||
DMA_FROM_DEVICE);
|
||||
}
|
||||
skb->protocol = eth_type_trans (skb, dev);
|
||||
#if 0
|
||||
@@ -1019,9 +1031,8 @@ receive_packet (struct net_device *dev)
|
||||
}
|
||||
np->rx_skbuff[entry] = skb;
|
||||
np->rx_ring[entry].fraginfo =
|
||||
cpu_to_le64 (pci_map_single
|
||||
(np->pdev, skb->data, np->rx_buf_sz,
|
||||
PCI_DMA_FROMDEVICE));
|
||||
cpu_to_le64(dma_map_single(&np->pdev->dev, skb->data,
|
||||
np->rx_buf_sz, DMA_FROM_DEVICE));
|
||||
}
|
||||
np->rx_ring[entry].fraginfo |=
|
||||
cpu_to_le64((u64)np->rx_buf_sz << 48);
|
||||
@@ -1821,10 +1832,10 @@ rio_remove1 (struct pci_dev *pdev)
|
||||
struct netdev_private *np = netdev_priv(dev);
|
||||
|
||||
unregister_netdev (dev);
|
||||
pci_free_consistent (pdev, RX_TOTAL_SIZE, np->rx_ring,
|
||||
np->rx_ring_dma);
|
||||
pci_free_consistent (pdev, TX_TOTAL_SIZE, np->tx_ring,
|
||||
np->tx_ring_dma);
|
||||
dma_free_coherent(&pdev->dev, RX_TOTAL_SIZE, np->rx_ring,
|
||||
np->rx_ring_dma);
|
||||
dma_free_coherent(&pdev->dev, TX_TOTAL_SIZE, np->tx_ring,
|
||||
np->tx_ring_dma);
|
||||
#ifdef MEM_MAPPING
|
||||
pci_iounmap(pdev, np->ioaddr);
|
||||
#endif
|
||||
|
||||
@@ -487,10 +487,12 @@ static int fsl_pq_mdio_probe(struct platform_device *pdev)
|
||||
"missing 'reg' property in node %pOF\n",
|
||||
tbi);
|
||||
err = -EBUSY;
|
||||
of_node_put(tbi);
|
||||
goto error;
|
||||
}
|
||||
set_tbipa(*prop, pdev,
|
||||
data->get_tbipa, priv->map, &res);
|
||||
of_node_put(tbi);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1176,9 +1176,9 @@ static void mlx4_en_do_uc_filter(struct mlx4_en_priv *priv,
|
||||
mlx4_unregister_mac(mdev->dev, priv->port, mac);
|
||||
|
||||
hlist_del_rcu(&entry->hlist);
|
||||
kfree_rcu(entry, rcu);
|
||||
en_dbg(DRV, priv, "Removed MAC %pM on port:%d\n",
|
||||
entry->mac, priv->port);
|
||||
kfree_rcu(entry, rcu);
|
||||
++removed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -927,7 +927,7 @@ static u32 nfp_net_get_rxfh_key_size(struct net_device *netdev)
|
||||
struct nfp_net *nn = netdev_priv(netdev);
|
||||
|
||||
if (!(nn->cap & NFP_NET_CFG_CTRL_RSS_ANY))
|
||||
return -EOPNOTSUPP;
|
||||
return 0;
|
||||
|
||||
return nfp_net_rss_key_sz(nn);
|
||||
}
|
||||
|
||||
@@ -1613,6 +1613,14 @@ static netdev_tx_t ravb_start_xmit(struct sk_buff *skb, struct net_device *ndev)
|
||||
} else {
|
||||
desc->die_dt = DT_FSINGLE;
|
||||
}
|
||||
|
||||
/* Before ringing the doorbell we need to make sure that the latest
|
||||
* writes have been committed to memory, otherwise it could delay
|
||||
* things until the doorbell is rang again.
|
||||
* This is in replacement of the read operation mentioned in the HW
|
||||
* manuals.
|
||||
*/
|
||||
dma_wmb();
|
||||
ravb_modify(ndev, TCCR, TCCR_TSRQ0 << q, TCCR_TSRQ0 << q);
|
||||
|
||||
priv->cur_tx[q] += num_tx_desc;
|
||||
|
||||
@@ -682,7 +682,6 @@ static void rtl8150_set_multicast(struct net_device *netdev)
|
||||
rtl8150_t *dev = netdev_priv(netdev);
|
||||
u16 rx_creg = 0x9e;
|
||||
|
||||
netif_stop_queue(netdev);
|
||||
if (netdev->flags & IFF_PROMISC) {
|
||||
rx_creg |= 0x0001;
|
||||
dev_info(&netdev->dev, "%s: promiscuous mode\n", netdev->name);
|
||||
@@ -696,7 +695,6 @@ static void rtl8150_set_multicast(struct net_device *netdev)
|
||||
rx_creg &= 0x00fc;
|
||||
}
|
||||
async_set_registers(dev, RCR, sizeof(rx_creg), rx_creg);
|
||||
netif_wake_queue(netdev);
|
||||
}
|
||||
|
||||
static netdev_tx_t rtl8150_start_xmit(struct sk_buff *skb,
|
||||
@@ -705,9 +703,16 @@ static netdev_tx_t rtl8150_start_xmit(struct sk_buff *skb,
|
||||
rtl8150_t *dev = netdev_priv(netdev);
|
||||
int count, res;
|
||||
|
||||
/* pad the frame and ensure terminating USB packet, datasheet 9.2.3 */
|
||||
count = max(skb->len, ETH_ZLEN);
|
||||
if (count % 64 == 0)
|
||||
count++;
|
||||
if (skb_padto(skb, count)) {
|
||||
netdev->stats.tx_dropped++;
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
netif_stop_queue(netdev);
|
||||
count = (skb->len < 60) ? 60 : skb->len;
|
||||
count = (count & 0x3f) ? count : count + 1;
|
||||
dev->tx_skb = skb;
|
||||
usb_fill_bulk_urb(dev->tx_urb, dev->udev, usb_sndbulkpipe(dev->udev, 2),
|
||||
skb->data, count, write_bulk_callback, dev);
|
||||
|
||||
@@ -667,10 +667,9 @@ static void mwifiex_reg_notifier(struct wiphy *wiphy,
|
||||
return;
|
||||
}
|
||||
|
||||
/* Don't send world or same regdom info to firmware */
|
||||
if (strncmp(request->alpha2, "00", 2) &&
|
||||
strncmp(request->alpha2, adapter->country_code,
|
||||
sizeof(request->alpha2))) {
|
||||
/* Don't send same regdom info to firmware */
|
||||
if (strncmp(request->alpha2, adapter->country_code,
|
||||
sizeof(request->alpha2)) != 0) {
|
||||
memcpy(adapter->country_code, request->alpha2,
|
||||
sizeof(request->alpha2));
|
||||
mwifiex_send_domain_info_cmd_fw(wiphy);
|
||||
|
||||
@@ -321,7 +321,6 @@ static const struct usb_device_id rtl8192c_usb_ids[] = {
|
||||
{RTL_USB_DEVICE(0x050d, 0x1102, rtl92cu_hal_cfg)}, /*Belkin - Edimax*/
|
||||
{RTL_USB_DEVICE(0x050d, 0x11f2, rtl92cu_hal_cfg)}, /*Belkin - ISY*/
|
||||
{RTL_USB_DEVICE(0x06f8, 0xe033, rtl92cu_hal_cfg)}, /*Hercules - Edimax*/
|
||||
{RTL_USB_DEVICE(0x07b8, 0x8188, rtl92cu_hal_cfg)}, /*Abocom - Abocom*/
|
||||
{RTL_USB_DEVICE(0x07b8, 0x8189, rtl92cu_hal_cfg)}, /*Funai - Abocom*/
|
||||
{RTL_USB_DEVICE(0x0846, 0x9041, rtl92cu_hal_cfg)}, /*NetGear WNA1000M*/
|
||||
{RTL_USB_DEVICE(0x0846, 0x9043, rtl92cu_hal_cfg)}, /*NG WNA1000Mv2*/
|
||||
|
||||
@@ -1189,7 +1189,7 @@ static int tegra_pcie_port_get_phys(struct tegra_pcie_port *port)
|
||||
unsigned int i;
|
||||
int err;
|
||||
|
||||
port->phys = devm_kcalloc(dev, sizeof(phy), port->lanes, GFP_KERNEL);
|
||||
port->phys = devm_kcalloc(dev, port->lanes, sizeof(phy), GFP_KERNEL);
|
||||
if (!port->phys)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -1581,6 +1581,7 @@ void pci_uevent_ers(struct pci_dev *pdev, enum pci_ers_result err_type)
|
||||
switch (err_type) {
|
||||
case PCI_ERS_RESULT_NONE:
|
||||
case PCI_ERS_RESULT_CAN_RECOVER:
|
||||
case PCI_ERS_RESULT_NEED_RESET:
|
||||
envp[idx++] = "ERROR_EVENT=BEGIN_RECOVERY";
|
||||
envp[idx++] = "DEVICE_ONLINE=0";
|
||||
break;
|
||||
|
||||
@@ -85,7 +85,8 @@ struct arm_spe_pmu {
|
||||
#define to_spe_pmu(p) (container_of(p, struct arm_spe_pmu, pmu))
|
||||
|
||||
/* Convert a free-running index from perf into an SPE buffer offset */
|
||||
#define PERF_IDX2OFF(idx, buf) ((idx) % ((buf)->nr_pages << PAGE_SHIFT))
|
||||
#define PERF_IDX2OFF(idx, buf) \
|
||||
((idx) % ((unsigned long)(buf)->nr_pages << PAGE_SHIFT))
|
||||
|
||||
/* Keep track of our dynamic hotplug state */
|
||||
static enum cpuhp_state arm_spe_pmu_online;
|
||||
|
||||
@@ -193,6 +193,9 @@ static const unsigned int i2c_sda_c_pins[] = { GPIODV_28 };
|
||||
static const unsigned int i2c_sck_c_dv19_pins[] = { GPIODV_19 };
|
||||
static const unsigned int i2c_sda_c_dv18_pins[] = { GPIODV_18 };
|
||||
|
||||
static const unsigned int i2c_sck_d_pins[] = { GPIOX_11 };
|
||||
static const unsigned int i2c_sda_d_pins[] = { GPIOX_10 };
|
||||
|
||||
static const unsigned int eth_mdio_pins[] = { GPIOZ_0 };
|
||||
static const unsigned int eth_mdc_pins[] = { GPIOZ_1 };
|
||||
static const unsigned int eth_clk_rx_clk_pins[] = { GPIOZ_2 };
|
||||
@@ -406,6 +409,8 @@ static struct meson_pmx_group meson_gxl_periphs_groups[] = {
|
||||
GPIO_GROUP(GPIO_TEST_N),
|
||||
|
||||
/* Bank X */
|
||||
GROUP(i2c_sda_d, 5, 5),
|
||||
GROUP(i2c_sck_d, 5, 4),
|
||||
GROUP(sdio_d0, 5, 31),
|
||||
GROUP(sdio_d1, 5, 30),
|
||||
GROUP(sdio_d2, 5, 29),
|
||||
@@ -637,6 +642,10 @@ static const char * const i2c_c_groups[] = {
|
||||
"i2c_sck_c", "i2c_sda_c", "i2c_sda_c_dv18", "i2c_sck_c_dv19",
|
||||
};
|
||||
|
||||
static const char * const i2c_d_groups[] = {
|
||||
"i2c_sck_d", "i2c_sda_d",
|
||||
};
|
||||
|
||||
static const char * const eth_groups[] = {
|
||||
"eth_mdio", "eth_mdc", "eth_clk_rx_clk", "eth_rx_dv",
|
||||
"eth_rxd0", "eth_rxd1", "eth_rxd2", "eth_rxd3",
|
||||
@@ -757,6 +766,7 @@ static struct meson_pmx_func meson_gxl_periphs_functions[] = {
|
||||
FUNCTION(i2c_a),
|
||||
FUNCTION(i2c_b),
|
||||
FUNCTION(i2c_c),
|
||||
FUNCTION(i2c_d),
|
||||
FUNCTION(eth),
|
||||
FUNCTION(pwm_a),
|
||||
FUNCTION(pwm_b),
|
||||
|
||||
@@ -301,7 +301,7 @@ static int pinmux_func_name_to_selector(struct pinctrl_dev *pctldev,
|
||||
while (selector < nfuncs) {
|
||||
const char *fname = ops->get_function_name(pctldev, selector);
|
||||
|
||||
if (!strcmp(function, fname))
|
||||
if (fname && !strcmp(function, fname))
|
||||
return selector;
|
||||
|
||||
selector++;
|
||||
|
||||
+1
-4
@@ -122,16 +122,13 @@ struct pps_device *pps_register_source(struct pps_source_info *info,
|
||||
if (err < 0) {
|
||||
pr_err("%s: unable to create char device\n",
|
||||
info->name);
|
||||
goto kfree_pps;
|
||||
goto pps_register_source_exit;
|
||||
}
|
||||
|
||||
dev_dbg(&pps->dev, "new PPS source %s\n", info->name);
|
||||
|
||||
return pps;
|
||||
|
||||
kfree_pps:
|
||||
kfree(pps);
|
||||
|
||||
pps_register_source_exit:
|
||||
pr_err("%s: unable to register source\n", info->name);
|
||||
|
||||
|
||||
+2
-3
@@ -389,6 +389,7 @@ int pps_register_cdev(struct pps_device *pps)
|
||||
pps->info.name);
|
||||
err = -EBUSY;
|
||||
}
|
||||
kfree(pps);
|
||||
goto out_unlock;
|
||||
}
|
||||
pps->id = err;
|
||||
@@ -398,13 +399,11 @@ int pps_register_cdev(struct pps_device *pps)
|
||||
pps->dev.devt = MKDEV(pps_major, pps->id);
|
||||
dev_set_drvdata(&pps->dev, pps);
|
||||
dev_set_name(&pps->dev, "pps%d", pps->id);
|
||||
pps->dev.release = pps_device_destruct;
|
||||
err = device_register(&pps->dev);
|
||||
if (err)
|
||||
goto free_idr;
|
||||
|
||||
/* Override the release function with our own */
|
||||
pps->dev.release = pps_device_destruct;
|
||||
|
||||
pr_debug("source %s got cdev (%d:%d)\n", pps->info.name, pps_major,
|
||||
pps->id);
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ static int berlin_pwm_suspend(struct device *dev)
|
||||
if (!channel)
|
||||
continue;
|
||||
|
||||
channel->enable = berlin_pwm_readl(pwm, i, BERLIN_PWM_ENABLE);
|
||||
channel->enable = berlin_pwm_readl(pwm, i, BERLIN_PWM_EN);
|
||||
channel->ctrl = berlin_pwm_readl(pwm, i, BERLIN_PWM_CONTROL);
|
||||
channel->duty = berlin_pwm_readl(pwm, i, BERLIN_PWM_DUTY);
|
||||
channel->tcnt = berlin_pwm_readl(pwm, i, BERLIN_PWM_TCNT);
|
||||
@@ -280,7 +280,7 @@ static int berlin_pwm_resume(struct device *dev)
|
||||
berlin_pwm_writel(pwm, i, channel->ctrl, BERLIN_PWM_CONTROL);
|
||||
berlin_pwm_writel(pwm, i, channel->duty, BERLIN_PWM_DUTY);
|
||||
berlin_pwm_writel(pwm, i, channel->tcnt, BERLIN_PWM_TCNT);
|
||||
berlin_pwm_writel(pwm, i, channel->enable, BERLIN_PWM_ENABLE);
|
||||
berlin_pwm_writel(pwm, i, channel->enable, BERLIN_PWM_EN);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -180,7 +180,7 @@ static int set_prescale_div(unsigned long rqst_prescaler, u16 *prescale_div,
|
||||
|
||||
*prescale_div = (1 << clkdiv) *
|
||||
(hspclkdiv ? (hspclkdiv * 2) : 1);
|
||||
if (*prescale_div > rqst_prescaler) {
|
||||
if (*prescale_div >= rqst_prescaler) {
|
||||
*tb_clk_div = (clkdiv << TBCTL_CLKDIV_SHIFT) |
|
||||
(hspclkdiv << TBCTL_HSPCLKDIV_SHIFT);
|
||||
return 0;
|
||||
@@ -279,7 +279,7 @@ static int ehrpwm_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
|
||||
pc->period_cycles[pwm->hwpwm] = period_cycles;
|
||||
|
||||
/* Configure clock prescaler to support Low frequency PWM wave */
|
||||
if (set_prescale_div(period_cycles/PERIOD_MAX, &ps_divval,
|
||||
if (set_prescale_div(DIV_ROUND_UP(period_cycles, PERIOD_MAX), &ps_divval,
|
||||
&tb_divval)) {
|
||||
dev_err(chip->dev, "Unsupported values\n");
|
||||
return -EINVAL;
|
||||
|
||||
@@ -113,9 +113,6 @@ int qcom_q6v5_wait_for_start(struct qcom_q6v5 *q6v5, int timeout)
|
||||
int ret;
|
||||
|
||||
ret = wait_for_completion_timeout(&q6v5->start_done, timeout);
|
||||
if (!ret)
|
||||
disable_irq(q6v5->handover_irq);
|
||||
|
||||
return !ret ? -ETIMEDOUT : 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qcom_q6v5_wait_for_start);
|
||||
|
||||
@@ -453,6 +453,29 @@ static int __rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
|
||||
else
|
||||
err = rtc->ops->set_alarm(rtc->dev.parent, alarm);
|
||||
|
||||
/*
|
||||
* Check for potential race described above. If the waiting for next
|
||||
* second, and the second just ticked since the check above, either
|
||||
*
|
||||
* 1) It ticked after the alarm was set, and an alarm irq should be
|
||||
* generated.
|
||||
*
|
||||
* 2) It ticked before the alarm was set, and alarm irq most likely will
|
||||
* not be generated.
|
||||
*
|
||||
* While we cannot easily check for which of these two scenarios we
|
||||
* are in, we can return -ETIME to signal that the timer has already
|
||||
* expired, which is true in both cases.
|
||||
*/
|
||||
if ((scheduled - now) <= 1) {
|
||||
err = __rtc_read_time(rtc, &tm);
|
||||
if (err)
|
||||
return err;
|
||||
now = rtc_tm_to_time64(&tm);
|
||||
if (scheduled <= now)
|
||||
return -ETIME;
|
||||
}
|
||||
|
||||
trace_rtc_set_alarm(rtc_tm_to_time64(&alarm->time), err);
|
||||
return err;
|
||||
}
|
||||
@@ -597,6 +620,10 @@ int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled)
|
||||
rtc->uie_rtctimer.node.expires = ktime_add(now, onesec);
|
||||
rtc->uie_rtctimer.period = ktime_set(1, 0);
|
||||
err = rtc_timer_enqueue(rtc, &rtc->uie_rtctimer);
|
||||
if (!err && rtc->ops && rtc->ops->alarm_irq_enable)
|
||||
err = rtc->ops->alarm_irq_enable(rtc->dev.parent, 1);
|
||||
if (err)
|
||||
goto out;
|
||||
} else
|
||||
rtc_timer_remove(rtc, &rtc->uie_rtctimer);
|
||||
|
||||
|
||||
+12
-9
@@ -6455,18 +6455,21 @@ static int hpsa_big_passthru_ioctl(struct ctlr_info *h, void __user *argp)
|
||||
while (left) {
|
||||
sz = (left > ioc->malloc_size) ? ioc->malloc_size : left;
|
||||
buff_size[sg_used] = sz;
|
||||
buff[sg_used] = kmalloc(sz, GFP_KERNEL);
|
||||
if (buff[sg_used] == NULL) {
|
||||
status = -ENOMEM;
|
||||
goto cleanup1;
|
||||
}
|
||||
|
||||
if (ioc->Request.Type.Direction & XFER_WRITE) {
|
||||
if (copy_from_user(buff[sg_used], data_ptr, sz)) {
|
||||
status = -EFAULT;
|
||||
buff[sg_used] = memdup_user(data_ptr, sz);
|
||||
if (IS_ERR(buff[sg_used])) {
|
||||
status = PTR_ERR(buff[sg_used]);
|
||||
goto cleanup1;
|
||||
}
|
||||
} else
|
||||
memset(buff[sg_used], 0, sz);
|
||||
} else {
|
||||
buff[sg_used] = kzalloc(sz, GFP_KERNEL);
|
||||
if (!buff[sg_used]) {
|
||||
status = -ENOMEM;
|
||||
goto cleanup1;
|
||||
}
|
||||
}
|
||||
|
||||
left -= sz;
|
||||
data_ptr += sz;
|
||||
sg_used++;
|
||||
|
||||
@@ -828,11 +828,9 @@ mpt3sas_transport_port_remove(struct MPT3SAS_ADAPTER *ioc, u64 sas_address,
|
||||
list_for_each_entry_safe(mpt3sas_phy, next_phy,
|
||||
&mpt3sas_port->phy_list, port_siblings) {
|
||||
if ((ioc->logging_level & MPT_DEBUG_TRANSPORT))
|
||||
dev_printk(KERN_INFO, &mpt3sas_port->port->dev,
|
||||
"remove: sas_addr(0x%016llx), phy(%d)\n",
|
||||
(unsigned long long)
|
||||
mpt3sas_port->remote_identify.sas_address,
|
||||
mpt3sas_phy->phy_id);
|
||||
ioc_info(ioc, "remove: sas_addr(0x%016llx), phy(%d)\n",
|
||||
(unsigned long long) mpt3sas_port->remote_identify.sas_address,
|
||||
mpt3sas_phy->phy_id);
|
||||
mpt3sas_phy->phy_belongs_to_port = 0;
|
||||
if (!ioc->remove_host)
|
||||
sas_port_delete_phy(mpt3sas_port->port,
|
||||
|
||||
@@ -155,7 +155,7 @@ static void mvs_free(struct mvs_info *mvi)
|
||||
if (mvi->shost)
|
||||
scsi_host_put(mvi->shost);
|
||||
list_for_each_entry(mwq, &mvi->wq_list, entry)
|
||||
cancel_delayed_work(&mwq->work_q);
|
||||
cancel_delayed_work_sync(&mwq->work_q);
|
||||
kfree(mvi->tags);
|
||||
kfree(mvi);
|
||||
}
|
||||
|
||||
@@ -853,6 +853,7 @@ static void pm8001_dev_gone_notify(struct domain_device *dev)
|
||||
unsigned long flags = 0;
|
||||
struct pm8001_hba_info *pm8001_ha;
|
||||
struct pm8001_device *pm8001_dev = dev->lldd_dev;
|
||||
struct domain_device *parent_dev = dev->parent;
|
||||
|
||||
pm8001_ha = pm8001_find_ha_by_dev(dev);
|
||||
spin_lock_irqsave(&pm8001_ha->lock, flags);
|
||||
@@ -871,7 +872,13 @@ static void pm8001_dev_gone_notify(struct domain_device *dev)
|
||||
spin_lock_irqsave(&pm8001_ha->lock, flags);
|
||||
}
|
||||
PM8001_CHIP_DISP->dereg_dev_req(pm8001_ha, device_id);
|
||||
pm8001_ha->phy[pm8001_dev->attached_phy].phy_attached = 0;
|
||||
|
||||
/*
|
||||
* The phy array only contains local phys. Thus, we cannot clear
|
||||
* phy_attached for a device behind an expander.
|
||||
*/
|
||||
if (!(parent_dev && DEV_IS_EXPANDER(parent_dev->dev_type)))
|
||||
pm8001_ha->phy[pm8001_dev->attached_phy].phy_attached = 0;
|
||||
pm8001_free_dev(pm8001_dev);
|
||||
} else {
|
||||
PM8001_DISC_DBG(pm8001_ha,
|
||||
|
||||
@@ -294,13 +294,10 @@ static irqreturn_t tcs_tx_done(int irq, void *p)
|
||||
ipc_log_string(drv->ipc_log_ctx,
|
||||
"IRQ response: m=%d err=%d", i, err);
|
||||
|
||||
/*
|
||||
* If wake tcs was re-purposed for sending active
|
||||
* votes, clear AMC trigger & enable modes and
|
||||
/* Clear AMC trigger & enable modes and
|
||||
* disable interrupt for this TCS
|
||||
*/
|
||||
if (!drv->tcs[ACTIVE_TCS].num_tcs)
|
||||
__tcs_set_trigger(drv, i, false);
|
||||
__tcs_set_trigger(drv, i, false);
|
||||
skip:
|
||||
/* Reclaim the TCS */
|
||||
write_tcs_reg(drv, RSC_DRV_CMD_ENABLE, i, 0);
|
||||
|
||||
@@ -461,11 +461,17 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (words_to_write > fifo->tx_fifo_depth) {
|
||||
dev_err(fifo->dt_device, "tried to write more words [%u] than slots in the fifo buffer [%u]\n",
|
||||
words_to_write, fifo->tx_fifo_depth);
|
||||
/*
|
||||
* In 'Store-and-Forward' mode, the maximum packet that can be
|
||||
* transmitted is limited by the size of the FIFO, which is
|
||||
* (C_TX_FIFO_DEPTH–4)*(data interface width/8) bytes.
|
||||
*
|
||||
* Do not attempt to send a packet larger than 'tx_fifo_depth - 4',
|
||||
* otherwise a 'Transmit Packet Overrun Error' interrupt will be
|
||||
* raised, which requires a reset of the TX circuit to recover.
|
||||
*/
|
||||
if (words_to_write > (fifo->tx_fifo_depth - 4))
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (fifo->write_flags & O_NONBLOCK) {
|
||||
/* opened in non-blocking mode
|
||||
|
||||
@@ -319,7 +319,7 @@ static unsigned int comedi_buf_munge(struct comedi_subdevice *s,
|
||||
unsigned int count = 0;
|
||||
const unsigned int num_sample_bytes = comedi_bytes_per_sample(s);
|
||||
|
||||
if (!s->munge || (async->cmd.flags & CMDF_RAWDATA)) {
|
||||
if (!s->munge || (async->cmd.flags & CMDF_RAWDATA) || async->cmd.chanlist_len == 0) {
|
||||
async->munge_count += num_bytes;
|
||||
count = num_bytes;
|
||||
} else {
|
||||
|
||||
@@ -2345,7 +2345,7 @@ static ssize_t target_lu_gp_members_show(struct config_item *item, char *page)
|
||||
config_item_name(&dev->dev_group.cg_item));
|
||||
cur_len++; /* Extra byte for NULL terminator */
|
||||
|
||||
if ((cur_len + len) > PAGE_SIZE) {
|
||||
if ((cur_len + len) > PAGE_SIZE || cur_len > LU_GROUP_NAME_BUF) {
|
||||
pr_warn("Ran out of lu_gp_show_attr"
|
||||
"_members buffer\n");
|
||||
break;
|
||||
|
||||
@@ -462,6 +462,8 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
/* Huawei 4G LTE module */
|
||||
{ USB_DEVICE(0x12d1, 0x15bb), .driver_info =
|
||||
USB_QUIRK_DISCONNECT_SUSPEND },
|
||||
{ USB_DEVICE(0x12d1, 0x15c1), .driver_info =
|
||||
USB_QUIRK_DISCONNECT_SUSPEND },
|
||||
{ USB_DEVICE(0x12d1, 0x15c3), .driver_info =
|
||||
USB_QUIRK_DISCONNECT_SUSPEND },
|
||||
|
||||
|
||||
@@ -1369,6 +1369,8 @@ static int configfs_composite_bind(struct usb_gadget *gadget,
|
||||
cdev->use_os_string = true;
|
||||
cdev->b_vendor_code = gi->b_vendor_code;
|
||||
memcpy(cdev->qw_sign, gi->qw_sign, OS_STRING_QW_SIGN_LEN);
|
||||
} else {
|
||||
cdev->use_os_string = false;
|
||||
}
|
||||
|
||||
if (gadget_is_otg(gadget) && !otg_desc[0]) {
|
||||
|
||||
@@ -1942,7 +1942,7 @@ error:
|
||||
if (hcd) {
|
||||
kfree(max3421_hcd->tx);
|
||||
kfree(max3421_hcd->rx);
|
||||
if (max3421_hcd->spi_thread)
|
||||
if (!IS_ERR_OR_NULL(max3421_hcd->spi_thread))
|
||||
kthread_stop(max3421_hcd->spi_thread);
|
||||
usb_put_hcd(hcd);
|
||||
}
|
||||
|
||||
@@ -978,8 +978,15 @@ int xhci_dbc_suspend(struct xhci_hcd *xhci)
|
||||
if (!dbc)
|
||||
return 0;
|
||||
|
||||
if (dbc->state == DS_CONFIGURED)
|
||||
switch (dbc->state) {
|
||||
case DS_ENABLED:
|
||||
case DS_CONNECTED:
|
||||
case DS_CONFIGURED:
|
||||
dbc->resume_required = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
xhci_dbc_stop(xhci);
|
||||
|
||||
|
||||
@@ -322,9 +322,8 @@ static int twl6030_set_vbus(struct phy_companion *comparator, bool enabled)
|
||||
|
||||
static int twl6030_usb_probe(struct platform_device *pdev)
|
||||
{
|
||||
u32 ret;
|
||||
struct twl6030_usb *twl;
|
||||
int status, err;
|
||||
int status, err, ret;
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct device *dev = &pdev->dev;
|
||||
|
||||
|
||||
@@ -273,6 +273,7 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define QUECTEL_PRODUCT_EM05CN 0x0312
|
||||
#define QUECTEL_PRODUCT_EM05G_GR 0x0313
|
||||
#define QUECTEL_PRODUCT_EM05G_RS 0x0314
|
||||
#define QUECTEL_PRODUCT_RG255C 0x0316
|
||||
#define QUECTEL_PRODUCT_EM12 0x0512
|
||||
#define QUECTEL_PRODUCT_RM500Q 0x0800
|
||||
#define QUECTEL_PRODUCT_RM520N 0x0801
|
||||
@@ -617,6 +618,7 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define UNISOC_VENDOR_ID 0x1782
|
||||
/* TOZED LT70-C based on UNISOC SL8563 uses UNISOC's vendor ID */
|
||||
#define TOZED_PRODUCT_LT70C 0x4055
|
||||
#define UNISOC_PRODUCT_UIS7720 0x4064
|
||||
/* Luat Air72*U series based on UNISOC UIS8910 uses UNISOC's vendor ID */
|
||||
#define LUAT_PRODUCT_AIR720U 0x4e00
|
||||
|
||||
@@ -1270,6 +1272,9 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG650V, 0xff, 0xff, 0x30) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG650V, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG255C, 0xff, 0xff, 0x30) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG255C, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG255C, 0xff, 0xff, 0x40) },
|
||||
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
|
||||
@@ -1392,10 +1397,14 @@ static const struct usb_device_id option_ids[] = {
|
||||
.driver_info = RSVD(0) | NCTRL(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a2, 0xff), /* Telit FN920C04 (MBIM) */
|
||||
.driver_info = NCTRL(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a3, 0xff), /* Telit FN920C04 (ECM) */
|
||||
.driver_info = NCTRL(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a4, 0xff), /* Telit FN20C04 (rmnet) */
|
||||
.driver_info = RSVD(0) | NCTRL(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a7, 0xff), /* Telit FN920C04 (MBIM) */
|
||||
.driver_info = NCTRL(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a8, 0xff), /* Telit FN920C04 (ECM) */
|
||||
.driver_info = NCTRL(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a9, 0xff), /* Telit FN20C04 (rmnet) */
|
||||
.driver_info = RSVD(0) | NCTRL(2) | RSVD(3) | RSVD(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10aa, 0xff), /* Telit FN920C04 (MBIM) */
|
||||
@@ -2108,6 +2117,12 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9003, 0xff) }, /* Simcom SIM7500/SIM7600 MBIM mode */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9011, 0xff), /* Simcom SIM7500/SIM7600 RNDIS mode */
|
||||
.driver_info = RSVD(7) },
|
||||
{ USB_DEVICE(0x1e0e, 0x9071), /* Simcom SIM8230 RMNET mode */
|
||||
.driver_info = RSVD(3) | RSVD(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9078, 0xff), /* Simcom SIM8230 ECM mode */
|
||||
.driver_info = RSVD(5) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x907b, 0xff), /* Simcom SIM8230 RNDIS mode */
|
||||
.driver_info = RSVD(5) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9205, 0xff) }, /* Simcom SIM7070/SIM7080/SIM7090 AT+ECM mode */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9206, 0xff) }, /* Simcom SIM7070/SIM7080/SIM7090 AT-only mode */
|
||||
{ USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200),
|
||||
@@ -2454,6 +2469,7 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9291, 0xff, 0xff, 0x30) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9291, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, UNISOC_PRODUCT_UIS7720, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0530, 0xff), /* TCL IK512 MBIM */
|
||||
.driver_info = NCTRL(1) },
|
||||
|
||||
@@ -770,6 +770,17 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flag
|
||||
ctrlreq->wValue, vdev->rhport);
|
||||
|
||||
vdev->udev = usb_get_dev(urb->dev);
|
||||
/*
|
||||
* NOTE: A similar operation has been done via
|
||||
* USB_REQ_GET_DESCRIPTOR handler below, which is
|
||||
* supposed to always precede USB_REQ_SET_ADDRESS.
|
||||
*
|
||||
* It's not entirely clear if operating on a different
|
||||
* usb_device instance here is a real possibility,
|
||||
* otherwise this call and vdev->udev assignment above
|
||||
* should be dropped.
|
||||
*/
|
||||
dev_pm_syscore_device(&vdev->udev->dev, true);
|
||||
usb_put_dev(old);
|
||||
|
||||
spin_lock(&vdev->ud.lock);
|
||||
@@ -790,6 +801,17 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flag
|
||||
"Not yet?:Get_Descriptor to device 0 (get max pipe size)\n");
|
||||
|
||||
vdev->udev = usb_get_dev(urb->dev);
|
||||
/*
|
||||
* Set syscore PM flag for the virtually attached
|
||||
* devices to ensure they will not enter suspend on
|
||||
* the client side.
|
||||
*
|
||||
* Note this doesn't have any impact on the physical
|
||||
* devices attached to the host system on the server
|
||||
* side, hence there is no need to undo the operation
|
||||
* on disconnect.
|
||||
*/
|
||||
dev_pm_syscore_device(&vdev->udev->dev, true);
|
||||
usb_put_dev(old);
|
||||
goto out;
|
||||
|
||||
|
||||
@@ -105,6 +105,8 @@ static int mpc8xxx_wdt_start(struct watchdog_device *w)
|
||||
ddata->swtc = tmp >> 16;
|
||||
set_bit(WDOG_HW_RUNNING, &ddata->wdd.status);
|
||||
|
||||
mpc8xxx_wdt_keepalive(ddata);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1210,10 +1210,12 @@ EXPORT_SYMBOL_GPL(bind_interdomain_evtchn_to_irq_lateeoi);
|
||||
static int find_virq(unsigned int virq, unsigned int cpu)
|
||||
{
|
||||
struct evtchn_status status;
|
||||
int port, rc = -ENOENT;
|
||||
int port;
|
||||
|
||||
memset(&status, 0, sizeof(status));
|
||||
for (port = 0; port < xen_evtchn_max_channels(); port++) {
|
||||
int rc;
|
||||
|
||||
status.dom = DOMID_SELF;
|
||||
status.port = port;
|
||||
rc = HYPERVISOR_event_channel_op(EVTCHNOP_status, &status);
|
||||
@@ -1221,12 +1223,10 @@ static int find_virq(unsigned int virq, unsigned int cpu)
|
||||
continue;
|
||||
if (status.status != EVTCHNSTAT_virq)
|
||||
continue;
|
||||
if (status.u.virq == virq && status.vcpu == xen_vcpu_nr(cpu)) {
|
||||
rc = port;
|
||||
break;
|
||||
}
|
||||
if (status.u.virq == virq && status.vcpu == xen_vcpu_nr(cpu))
|
||||
return port;
|
||||
}
|
||||
return rc;
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1717,9 +1717,20 @@ static int xen_rebind_evtchn_to_cpu(struct irq_info *info, unsigned int tcpu)
|
||||
* virq or IPI channel, which don't actually need to be rebound. Ignore
|
||||
* it, but don't do the xenlinux-level rebind in that case.
|
||||
*/
|
||||
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0)
|
||||
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0) {
|
||||
int old_cpu = info->cpu;
|
||||
|
||||
bind_evtchn_to_cpu(evtchn, tcpu);
|
||||
|
||||
if (info->type == IRQT_VIRQ) {
|
||||
int virq = info->u.virq;
|
||||
int irq = per_cpu(virq_to_irq, old_cpu)[virq];
|
||||
|
||||
per_cpu(virq_to_irq, old_cpu)[virq] = -1;
|
||||
per_cpu(virq_to_irq, tcpu)[virq] = irq;
|
||||
}
|
||||
}
|
||||
|
||||
do_unmask(info, EVT_MASK_REASON_TEMPORARY);
|
||||
|
||||
return 0;
|
||||
|
||||
+7
-1
@@ -22,7 +22,11 @@ static int btrfs_encode_fh(struct inode *inode, u32 *fh, int *max_len,
|
||||
int type;
|
||||
|
||||
if (parent && (len < BTRFS_FID_SIZE_CONNECTABLE)) {
|
||||
*max_len = BTRFS_FID_SIZE_CONNECTABLE;
|
||||
if (BTRFS_I(inode)->root->root_key.objectid !=
|
||||
BTRFS_I(parent)->root->root_key.objectid)
|
||||
*max_len = BTRFS_FID_SIZE_CONNECTABLE_ROOT;
|
||||
else
|
||||
*max_len = BTRFS_FID_SIZE_CONNECTABLE;
|
||||
return FILEID_INVALID;
|
||||
} else if (len < BTRFS_FID_SIZE_NON_CONNECTABLE) {
|
||||
*max_len = BTRFS_FID_SIZE_NON_CONNECTABLE;
|
||||
@@ -44,6 +48,8 @@ static int btrfs_encode_fh(struct inode *inode, u32 *fh, int *max_len,
|
||||
parent_root_id = BTRFS_I(parent)->root->objectid;
|
||||
|
||||
if (parent_root_id != fid->root_objectid) {
|
||||
if (*max_len < BTRFS_FID_SIZE_CONNECTABLE_ROOT)
|
||||
return FILEID_INVALID;
|
||||
fid->parent_root_objectid = parent_root_id;
|
||||
len = BTRFS_FID_SIZE_CONNECTABLE_ROOT;
|
||||
type = FILEID_BTRFS_WITH_PARENT_ROOT;
|
||||
|
||||
+10
-1
@@ -117,9 +117,18 @@ static struct inode *get_cramfs_inode(struct super_block *sb,
|
||||
inode_nohighmem(inode);
|
||||
inode->i_data.a_ops = &cramfs_aops;
|
||||
break;
|
||||
default:
|
||||
case S_IFCHR:
|
||||
case S_IFBLK:
|
||||
case S_IFIFO:
|
||||
case S_IFSOCK:
|
||||
init_special_inode(inode, cramfs_inode->mode,
|
||||
old_decode_dev(cramfs_inode->size));
|
||||
break;
|
||||
default:
|
||||
printk(KERN_DEBUG "CRAMFS: Invalid file type 0%04o for inode %lu.\n",
|
||||
inode->i_mode, inode->i_ino);
|
||||
iget_failed(inode);
|
||||
return ERR_PTR(-EIO);
|
||||
}
|
||||
|
||||
inode->i_mode = cramfs_inode->mode;
|
||||
|
||||
Loaded 100 of 160 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user