Merge 4.14.190 into android-4.14-stable
Changes in 4.14.190
gpio: arizona: handle pm_runtime_get_sync failure case
gpio: arizona: put pm_runtime in case of failure
pinctrl: amd: fix npins for uart0 in kerncz_groups
mac80211: allow rx of mesh eapol frames with default rx key
scsi: scsi_transport_spi: Fix function pointer check
xtensa: fix __sync_fetch_and_{and,or}_4 declarations
xtensa: update *pos in cpuinfo_op.next
drivers/net/wan/lapbether: Fixed the value of hard_header_len
net: sky2: initialize return of gm_phy_read
drm/nouveau/i2c/g94-: increase NV_PMGR_DP_AUXCTL_TRANSACTREQ timeout
irqdomain/treewide: Keep firmware node unconditionally allocated
SUNRPC reverting d03727b248d0 ("NFSv4 fix CLOSE not waiting for direct IO compeletion")
spi: spi-fsl-dspi: Exit the ISR with IRQ_NONE when it's not ours
IB/umem: fix reference count leak in ib_umem_odp_get()
uprobes: Change handle_swbp() to send SIGTRAP with si_code=SI_KERNEL, to fix GDB regression
ALSA: info: Drop WARN_ON() from buffer NULL sanity check
ASoC: rt5670: Correct RT5670_LDO_SEL_MASK
btrfs: fix double free on ulist after backref resolution failure
btrfs: fix mount failure caused by race with umount
btrfs: fix page leaks after failure to lock page for delalloc
bnxt_en: Fix race when modifying pause settings.
hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path
ax88172a: fix ax88172a_unbind() failures
net: dp83640: fix SIOCSHWTSTAMP to update the struct with actual configuration
drm: sun4i: hdmi: Fix inverted HPD result
net: smc91x: Fix possible memory leak in smc_drv_probe()
bonding: check error value of register_netdevice() immediately
mlxsw: destroy workqueue when trap_register in mlxsw_emad_init
ipvs: fix the connection sync failed in some cases
i2c: rcar: always clear ICSAR to avoid side effects
bonding: check return value of register_netdevice() in bond_newlink()
serial: exar: Fix GPIO configuration for Sealevel cards based on XR17V35X
scripts/decode_stacktrace: strip basepath from all paths
HID: i2c-hid: add Mediacom FlexBook edge13 to descriptor override
HID: apple: Disable Fn-key key-re-mapping on clone keyboards
dmaengine: tegra210-adma: Fix runtime PM imbalance on error
Input: add `SW_MACHINE_COVER`
spi: mediatek: use correct SPI_CFG2_REG MACRO
regmap: dev_get_regmap_match(): fix string comparison
hwmon: (aspeed-pwm-tacho) Avoid possible buffer overflow
dmaengine: ioat setting ioat timeout as module parameter
Input: synaptics - enable InterTouch for ThinkPad X1E 1st gen
usb: gadget: udc: gr_udc: fix memleak on error handling path in gr_ep_init()
arm64: Use test_tsk_thread_flag() for checking TIF_SINGLESTEP
x86: math-emu: Fix up 'cmp' insn for clang ias
binder: Don't use mmput() from shrinker function.
usb: xhci-mtk: fix the failure of bandwidth allocation
usb: xhci: Fix ASM2142/ASM3142 DMA addressing
Revert "cifs: Fix the target file was deleted when rename failed."
staging: wlan-ng: properly check endpoint types
staging: comedi: addi_apci_1032: check INSN_CONFIG_DIGITAL_TRIG shift
staging: comedi: ni_6527: fix INSN_CONFIG_DIGITAL_TRIG support
staging: comedi: addi_apci_1500: check INSN_CONFIG_DIGITAL_TRIG shift
staging: comedi: addi_apci_1564: check INSN_CONFIG_DIGITAL_TRIG shift
serial: 8250: fix null-ptr-deref in serial8250_start_tx()
serial: 8250_mtk: Fix high-speed baud rates clamping
fbdev: Detect integer underflow at "struct fbcon_ops"->clear_margins.
vt: Reject zero-sized screen buffer size.
Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation
mm/memcg: fix refcount error while moving and swapping
io-mapping: indicate mapping failure
parisc: Add atomic64_set_release() define to avoid CPU soft lockups
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb
ath9k: Fix regression with Atheros 9271
Linux 4.14.190
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0d395679325e47e1f916bc0aa64d6299563559f4
This commit is contained in:
4
Makefile
4
Makefile
@@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 14
|
PATCHLEVEL = 14
|
||||||
SUBLEVEL = 189
|
SUBLEVEL = 190
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Petit Gorille
|
NAME = Petit Gorille
|
||||||
|
|
||||||
@@ -487,7 +487,7 @@ ifeq ($(shell $(srctree)/scripts/clang-android.sh $(CC) $(CLANG_FLAGS)), y)
|
|||||||
$(error "Clang with Android --target detected. Did you specify CLANG_TRIPLE?")
|
$(error "Clang with Android --target detected. Did you specify CLANG_TRIPLE?")
|
||||||
endif
|
endif
|
||||||
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
|
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
|
||||||
CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)
|
CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE))
|
||||||
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
|
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
|
||||||
endif
|
endif
|
||||||
ifneq ($(GCC_TOOLCHAIN),)
|
ifneq ($(GCC_TOOLCHAIN),)
|
||||||
|
|||||||
@@ -389,14 +389,14 @@ void user_rewind_single_step(struct task_struct *task)
|
|||||||
* If single step is active for this thread, then set SPSR.SS
|
* If single step is active for this thread, then set SPSR.SS
|
||||||
* to 1 to avoid returning to the active-pending state.
|
* to 1 to avoid returning to the active-pending state.
|
||||||
*/
|
*/
|
||||||
if (test_ti_thread_flag(task_thread_info(task), TIF_SINGLESTEP))
|
if (test_tsk_thread_flag(task, TIF_SINGLESTEP))
|
||||||
set_regs_spsr_ss(task_pt_regs(task));
|
set_regs_spsr_ss(task_pt_regs(task));
|
||||||
}
|
}
|
||||||
NOKPROBE_SYMBOL(user_rewind_single_step);
|
NOKPROBE_SYMBOL(user_rewind_single_step);
|
||||||
|
|
||||||
void user_fastforward_single_step(struct task_struct *task)
|
void user_fastforward_single_step(struct task_struct *task)
|
||||||
{
|
{
|
||||||
if (test_ti_thread_flag(task_thread_info(task), TIF_SINGLESTEP))
|
if (test_tsk_thread_flag(task, TIF_SINGLESTEP))
|
||||||
clear_regs_spsr_ss(task_pt_regs(task));
|
clear_regs_spsr_ss(task_pt_regs(task));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -258,6 +258,8 @@ atomic64_set(atomic64_t *v, s64 i)
|
|||||||
_atomic_spin_unlock_irqrestore(v, flags);
|
_atomic_spin_unlock_irqrestore(v, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define atomic64_set_release(v, i) atomic64_set((v), (i))
|
||||||
|
|
||||||
static __inline__ s64
|
static __inline__ s64
|
||||||
atomic64_read(const atomic64_t *v)
|
atomic64_read(const atomic64_t *v)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2233,12 +2233,12 @@ static int mp_irqdomain_create(int ioapic)
|
|||||||
ip->irqdomain = irq_domain_create_linear(fn, hwirqs, cfg->ops,
|
ip->irqdomain = irq_domain_create_linear(fn, hwirqs, cfg->ops,
|
||||||
(void *)(long)ioapic);
|
(void *)(long)ioapic);
|
||||||
|
|
||||||
/* Release fw handle if it was allocated above */
|
if (!ip->irqdomain) {
|
||||||
if (!cfg->dev)
|
/* Release fw handle if it was allocated above */
|
||||||
irq_domain_free_fwnode(fn);
|
if (!cfg->dev)
|
||||||
|
irq_domain_free_fwnode(fn);
|
||||||
if (!ip->irqdomain)
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
ip->irqdomain->parent = parent;
|
ip->irqdomain->parent = parent;
|
||||||
|
|
||||||
|
|||||||
@@ -149,10 +149,11 @@ void __init arch_init_msi_domain(struct irq_domain *parent)
|
|||||||
msi_default_domain =
|
msi_default_domain =
|
||||||
pci_msi_create_irq_domain(fn, &pci_msi_domain_info,
|
pci_msi_create_irq_domain(fn, &pci_msi_domain_info,
|
||||||
parent);
|
parent);
|
||||||
irq_domain_free_fwnode(fn);
|
|
||||||
}
|
}
|
||||||
if (!msi_default_domain)
|
if (!msi_default_domain) {
|
||||||
|
irq_domain_free_fwnode(fn);
|
||||||
pr_warn("failed to initialize irqdomain for MSI/MSI-x.\n");
|
pr_warn("failed to initialize irqdomain for MSI/MSI-x.\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_IRQ_REMAP
|
#ifdef CONFIG_IRQ_REMAP
|
||||||
@@ -185,7 +186,8 @@ struct irq_domain *arch_create_remap_msi_irq_domain(struct irq_domain *parent,
|
|||||||
if (!fn)
|
if (!fn)
|
||||||
return NULL;
|
return NULL;
|
||||||
d = pci_msi_create_irq_domain(fn, &pci_msi_ir_domain_info, parent);
|
d = pci_msi_create_irq_domain(fn, &pci_msi_ir_domain_info, parent);
|
||||||
irq_domain_free_fwnode(fn);
|
if (!d)
|
||||||
|
irq_domain_free_fwnode(fn);
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -248,7 +250,8 @@ static struct irq_domain *dmar_get_irq_domain(void)
|
|||||||
if (fn) {
|
if (fn) {
|
||||||
dmar_domain = msi_create_irq_domain(fn, &dmar_msi_domain_info,
|
dmar_domain = msi_create_irq_domain(fn, &dmar_msi_domain_info,
|
||||||
x86_vector_domain);
|
x86_vector_domain);
|
||||||
irq_domain_free_fwnode(fn);
|
if (!dmar_domain)
|
||||||
|
irq_domain_free_fwnode(fn);
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&dmar_lock);
|
mutex_unlock(&dmar_lock);
|
||||||
@@ -373,7 +376,10 @@ struct irq_domain *hpet_create_irq_domain(int hpet_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
d = msi_create_irq_domain(fn, domain_info, parent);
|
d = msi_create_irq_domain(fn, domain_info, parent);
|
||||||
irq_domain_free_fwnode(fn);
|
if (!d) {
|
||||||
|
irq_domain_free_fwnode(fn);
|
||||||
|
kfree(domain_info);
|
||||||
|
}
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -457,7 +457,6 @@ int __init arch_early_irq_init(void)
|
|||||||
x86_vector_domain = irq_domain_create_tree(fn, &x86_vector_domain_ops,
|
x86_vector_domain = irq_domain_create_tree(fn, &x86_vector_domain_ops,
|
||||||
NULL);
|
NULL);
|
||||||
BUG_ON(x86_vector_domain == NULL);
|
BUG_ON(x86_vector_domain == NULL);
|
||||||
irq_domain_free_fwnode(fn);
|
|
||||||
irq_set_default_host(x86_vector_domain);
|
irq_set_default_host(x86_vector_domain);
|
||||||
|
|
||||||
arch_init_msi_domain(x86_vector_domain);
|
arch_init_msi_domain(x86_vector_domain);
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ sqrt_stage_2_finish:
|
|||||||
|
|
||||||
#ifdef PARANOID
|
#ifdef PARANOID
|
||||||
/* It should be possible to get here only if the arg is ffff....ffff */
|
/* It should be possible to get here only if the arg is ffff....ffff */
|
||||||
cmp $0xffffffff,FPU_fsqrt_arg_1
|
cmpl $0xffffffff,FPU_fsqrt_arg_1
|
||||||
jnz sqrt_stage_2_error
|
jnz sqrt_stage_2_error
|
||||||
#endif /* PARANOID */
|
#endif /* PARANOID */
|
||||||
|
|
||||||
|
|||||||
@@ -171,9 +171,10 @@ static struct irq_domain *uv_get_irq_domain(void)
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
uv_domain = irq_domain_create_tree(fn, &uv_domain_ops, NULL);
|
uv_domain = irq_domain_create_tree(fn, &uv_domain_ops, NULL);
|
||||||
irq_domain_free_fwnode(fn);
|
|
||||||
if (uv_domain)
|
if (uv_domain)
|
||||||
uv_domain->parent = x86_vector_domain;
|
uv_domain->parent = x86_vector_domain;
|
||||||
|
else
|
||||||
|
irq_domain_free_fwnode(fn);
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&uv_lock);
|
mutex_unlock(&uv_lock);
|
||||||
|
|
||||||
|
|||||||
@@ -711,7 +711,8 @@ c_start(struct seq_file *f, loff_t *pos)
|
|||||||
static void *
|
static void *
|
||||||
c_next(struct seq_file *f, void *v, loff_t *pos)
|
c_next(struct seq_file *f, void *v, loff_t *pos)
|
||||||
{
|
{
|
||||||
return NULL;
|
++*pos;
|
||||||
|
return c_start(f, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -82,13 +82,13 @@ void __xtensa_libgcc_window_spill(void)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(__xtensa_libgcc_window_spill);
|
EXPORT_SYMBOL(__xtensa_libgcc_window_spill);
|
||||||
|
|
||||||
unsigned long __sync_fetch_and_and_4(unsigned long *p, unsigned long v)
|
unsigned int __sync_fetch_and_and_4(volatile void *p, unsigned int v)
|
||||||
{
|
{
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(__sync_fetch_and_and_4);
|
EXPORT_SYMBOL(__sync_fetch_and_and_4);
|
||||||
|
|
||||||
unsigned long __sync_fetch_and_or_4(unsigned long *p, unsigned long v)
|
unsigned int __sync_fetch_and_or_4(volatile void *p, unsigned int v)
|
||||||
{
|
{
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -937,7 +937,7 @@ enum lru_status binder_alloc_free_page(struct list_head *item,
|
|||||||
trace_binder_unmap_user_end(alloc, index);
|
trace_binder_unmap_user_end(alloc, index);
|
||||||
}
|
}
|
||||||
up_read(&mm->mmap_sem);
|
up_read(&mm->mmap_sem);
|
||||||
mmput(mm);
|
mmput_async(mm);
|
||||||
|
|
||||||
trace_binder_unmap_kernel_start(alloc, index);
|
trace_binder_unmap_kernel_start(alloc, index);
|
||||||
|
|
||||||
|
|||||||
@@ -1242,7 +1242,7 @@ static int dev_get_regmap_match(struct device *dev, void *res, void *data)
|
|||||||
|
|
||||||
/* If the user didn't specify a name match any */
|
/* If the user didn't specify a name match any */
|
||||||
if (data)
|
if (data)
|
||||||
return (*r)->name == data;
|
return !strcmp((*r)->name, data);
|
||||||
else
|
else
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,18 @@
|
|||||||
|
|
||||||
#include "../dmaengine.h"
|
#include "../dmaengine.h"
|
||||||
|
|
||||||
|
int completion_timeout = 200;
|
||||||
|
module_param(completion_timeout, int, 0644);
|
||||||
|
MODULE_PARM_DESC(completion_timeout,
|
||||||
|
"set ioat completion timeout [msec] (default 200 [msec])");
|
||||||
|
int idle_timeout = 2000;
|
||||||
|
module_param(idle_timeout, int, 0644);
|
||||||
|
MODULE_PARM_DESC(idle_timeout,
|
||||||
|
"set ioat idel timeout [msec] (default 2000 [msec])");
|
||||||
|
|
||||||
|
#define IDLE_TIMEOUT msecs_to_jiffies(idle_timeout)
|
||||||
|
#define COMPLETION_TIMEOUT msecs_to_jiffies(completion_timeout)
|
||||||
|
|
||||||
static char *chanerr_str[] = {
|
static char *chanerr_str[] = {
|
||||||
"DMA Transfer Source Address Error",
|
"DMA Transfer Source Address Error",
|
||||||
"DMA Transfer Destination Address Error",
|
"DMA Transfer Destination Address Error",
|
||||||
|
|||||||
@@ -111,8 +111,6 @@ struct ioatdma_chan {
|
|||||||
#define IOAT_RUN 5
|
#define IOAT_RUN 5
|
||||||
#define IOAT_CHAN_ACTIVE 6
|
#define IOAT_CHAN_ACTIVE 6
|
||||||
struct timer_list timer;
|
struct timer_list timer;
|
||||||
#define COMPLETION_TIMEOUT msecs_to_jiffies(100)
|
|
||||||
#define IDLE_TIMEOUT msecs_to_jiffies(2000)
|
|
||||||
#define RESET_DELAY msecs_to_jiffies(100)
|
#define RESET_DELAY msecs_to_jiffies(100)
|
||||||
struct ioatdma_device *ioat_dma;
|
struct ioatdma_device *ioat_dma;
|
||||||
dma_addr_t completion_dma;
|
dma_addr_t completion_dma;
|
||||||
|
|||||||
@@ -583,6 +583,7 @@ static int tegra_adma_alloc_chan_resources(struct dma_chan *dc)
|
|||||||
|
|
||||||
ret = pm_runtime_get_sync(tdc2dev(tdc));
|
ret = pm_runtime_get_sync(tdc2dev(tdc));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
pm_runtime_put_noidle(tdc2dev(tdc));
|
||||||
free_irq(tdc->irq, tdc);
|
free_irq(tdc->irq, tdc);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -764,8 +765,10 @@ static int tegra_adma_probe(struct platform_device *pdev)
|
|||||||
pm_runtime_enable(&pdev->dev);
|
pm_runtime_enable(&pdev->dev);
|
||||||
|
|
||||||
ret = pm_runtime_get_sync(&pdev->dev);
|
ret = pm_runtime_get_sync(&pdev->dev);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
pm_runtime_put_noidle(&pdev->dev);
|
||||||
goto rpm_disable;
|
goto rpm_disable;
|
||||||
|
}
|
||||||
|
|
||||||
ret = tegra_adma_init(tdma);
|
ret = tegra_adma_init(tdma);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)
|
|||||||
ret = pm_runtime_get_sync(chip->parent);
|
ret = pm_runtime_get_sync(chip->parent);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(chip->parent, "Failed to resume: %d\n", ret);
|
dev_err(chip->parent, "Failed to resume: %d\n", ret);
|
||||||
|
pm_runtime_put_autosuspend(chip->parent);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,12 +78,15 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(chip->parent, "Failed to drop cache: %d\n",
|
dev_err(chip->parent, "Failed to drop cache: %d\n",
|
||||||
ret);
|
ret);
|
||||||
|
pm_runtime_put_autosuspend(chip->parent);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = regmap_read(arizona->regmap, reg, &val);
|
ret = regmap_read(arizona->regmap, reg, &val);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
pm_runtime_put_autosuspend(chip->parent);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
pm_runtime_mark_last_busy(chip->parent);
|
pm_runtime_mark_last_busy(chip->parent);
|
||||||
pm_runtime_put_autosuspend(chip->parent);
|
pm_runtime_put_autosuspend(chip->parent);
|
||||||
@@ -111,6 +115,7 @@ static int arizona_gpio_direction_out(struct gpio_chip *chip,
|
|||||||
ret = pm_runtime_get_sync(chip->parent);
|
ret = pm_runtime_get_sync(chip->parent);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(chip->parent, "Failed to resume: %d\n", ret);
|
dev_err(chip->parent, "Failed to resume: %d\n", ret);
|
||||||
|
pm_runtime_put(chip->parent);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,10 +118,10 @@ g94_i2c_aux_xfer(struct nvkm_i2c_aux *obj, bool retry,
|
|||||||
if (retries)
|
if (retries)
|
||||||
udelay(400);
|
udelay(400);
|
||||||
|
|
||||||
/* transaction request, wait up to 1ms for it to complete */
|
/* transaction request, wait up to 2ms for it to complete */
|
||||||
nvkm_wr32(device, 0x00e4e4 + base, 0x00010000 | ctrl);
|
nvkm_wr32(device, 0x00e4e4 + base, 0x00010000 | ctrl);
|
||||||
|
|
||||||
timeout = 1000;
|
timeout = 2000;
|
||||||
do {
|
do {
|
||||||
ctrl = nvkm_rd32(device, 0x00e4e4 + base);
|
ctrl = nvkm_rd32(device, 0x00e4e4 + base);
|
||||||
udelay(1);
|
udelay(1);
|
||||||
|
|||||||
@@ -118,10 +118,10 @@ gm200_i2c_aux_xfer(struct nvkm_i2c_aux *obj, bool retry,
|
|||||||
if (retries)
|
if (retries)
|
||||||
udelay(400);
|
udelay(400);
|
||||||
|
|
||||||
/* transaction request, wait up to 1ms for it to complete */
|
/* transaction request, wait up to 2ms for it to complete */
|
||||||
nvkm_wr32(device, 0x00d954 + base, 0x00010000 | ctrl);
|
nvkm_wr32(device, 0x00d954 + base, 0x00010000 | ctrl);
|
||||||
|
|
||||||
timeout = 1000;
|
timeout = 2000;
|
||||||
do {
|
do {
|
||||||
ctrl = nvkm_rd32(device, 0x00d954 + base);
|
ctrl = nvkm_rd32(device, 0x00d954 + base);
|
||||||
udelay(1);
|
udelay(1);
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ sun4i_hdmi_connector_detect(struct drm_connector *connector, bool force)
|
|||||||
unsigned long reg;
|
unsigned long reg;
|
||||||
|
|
||||||
reg = readl(hdmi->base + SUN4I_HDMI_HPD_REG);
|
reg = readl(hdmi->base + SUN4I_HDMI_HPD_REG);
|
||||||
if (reg & SUN4I_HDMI_HPD_HIGH) {
|
if (!(reg & SUN4I_HDMI_HPD_HIGH)) {
|
||||||
cec_phys_addr_invalidate(hdmi->cec_adap);
|
cec_phys_addr_invalidate(hdmi->cec_adap);
|
||||||
return connector_status_disconnected;
|
return connector_status_disconnected;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ MODULE_PARM_DESC(swap_opt_cmd, "Swap the Option (\"Alt\") and Command (\"Flag\")
|
|||||||
struct apple_sc {
|
struct apple_sc {
|
||||||
unsigned long quirks;
|
unsigned long quirks;
|
||||||
unsigned int fn_on;
|
unsigned int fn_on;
|
||||||
|
unsigned int fn_found;
|
||||||
DECLARE_BITMAP(pressed_numlock, KEY_CNT);
|
DECLARE_BITMAP(pressed_numlock, KEY_CNT);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -342,12 +343,15 @@ static int apple_input_mapping(struct hid_device *hdev, struct hid_input *hi,
|
|||||||
struct hid_field *field, struct hid_usage *usage,
|
struct hid_field *field, struct hid_usage *usage,
|
||||||
unsigned long **bit, int *max)
|
unsigned long **bit, int *max)
|
||||||
{
|
{
|
||||||
|
struct apple_sc *asc = hid_get_drvdata(hdev);
|
||||||
|
|
||||||
if (usage->hid == (HID_UP_CUSTOM | 0x0003) ||
|
if (usage->hid == (HID_UP_CUSTOM | 0x0003) ||
|
||||||
usage->hid == (HID_UP_MSVENDOR | 0x0003) ||
|
usage->hid == (HID_UP_MSVENDOR | 0x0003) ||
|
||||||
usage->hid == (HID_UP_HPVENDOR2 | 0x0003)) {
|
usage->hid == (HID_UP_HPVENDOR2 | 0x0003)) {
|
||||||
/* The fn key on Apple USB keyboards */
|
/* The fn key on Apple USB keyboards */
|
||||||
set_bit(EV_REP, hi->input->evbit);
|
set_bit(EV_REP, hi->input->evbit);
|
||||||
hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_FN);
|
hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_FN);
|
||||||
|
asc->fn_found = true;
|
||||||
apple_setup_input(hi->input);
|
apple_setup_input(hi->input);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -374,6 +378,19 @@ static int apple_input_mapped(struct hid_device *hdev, struct hid_input *hi,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int apple_input_configured(struct hid_device *hdev,
|
||||||
|
struct hid_input *hidinput)
|
||||||
|
{
|
||||||
|
struct apple_sc *asc = hid_get_drvdata(hdev);
|
||||||
|
|
||||||
|
if ((asc->quirks & APPLE_HAS_FN) && !asc->fn_found) {
|
||||||
|
hid_info(hdev, "Fn key not found (Apple Wireless Keyboard clone?), disabling Fn key handling\n");
|
||||||
|
asc->quirks = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int apple_probe(struct hid_device *hdev,
|
static int apple_probe(struct hid_device *hdev,
|
||||||
const struct hid_device_id *id)
|
const struct hid_device_id *id)
|
||||||
{
|
{
|
||||||
@@ -588,6 +605,7 @@ static struct hid_driver apple_driver = {
|
|||||||
.event = apple_event,
|
.event = apple_event,
|
||||||
.input_mapping = apple_input_mapping,
|
.input_mapping = apple_input_mapping,
|
||||||
.input_mapped = apple_input_mapped,
|
.input_mapped = apple_input_mapped,
|
||||||
|
.input_configured = apple_input_configured,
|
||||||
};
|
};
|
||||||
module_hid_driver(apple_driver);
|
module_hid_driver(apple_driver);
|
||||||
|
|
||||||
|
|||||||
@@ -373,6 +373,14 @@ static const struct dmi_system_id i2c_hid_dmi_desc_override_table[] = {
|
|||||||
},
|
},
|
||||||
.driver_data = (void *)&sipodev_desc
|
.driver_data = (void *)&sipodev_desc
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.ident = "Mediacom FlexBook edge 13",
|
||||||
|
.matches = {
|
||||||
|
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
|
||||||
|
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "FlexBook_edge13-M-FBE13"),
|
||||||
|
},
|
||||||
|
.driver_data = (void *)&sipodev_desc
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.ident = "Odys Winbook 13",
|
.ident = "Odys Winbook 13",
|
||||||
.matches = {
|
.matches = {
|
||||||
|
|||||||
@@ -878,6 +878,8 @@ static int aspeed_create_fan(struct device *dev,
|
|||||||
ret = of_property_read_u32(child, "reg", &pwm_port);
|
ret = of_property_read_u32(child, "reg", &pwm_port);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
if (pwm_port >= ARRAY_SIZE(pwm_port_params))
|
||||||
|
return -EINVAL;
|
||||||
aspeed_create_pwm_port(priv, (u8)pwm_port);
|
aspeed_create_pwm_port(priv, (u8)pwm_port);
|
||||||
|
|
||||||
ret = of_property_count_u8_elems(child, "cooling-levels");
|
ret = of_property_count_u8_elems(child, "cooling-levels");
|
||||||
|
|||||||
@@ -817,6 +817,7 @@ static int rcar_unreg_slave(struct i2c_client *slave)
|
|||||||
/* disable irqs and ensure none is running before clearing ptr */
|
/* disable irqs and ensure none is running before clearing ptr */
|
||||||
rcar_i2c_write(priv, ICSIER, 0);
|
rcar_i2c_write(priv, ICSIER, 0);
|
||||||
rcar_i2c_write(priv, ICSCR, 0);
|
rcar_i2c_write(priv, ICSCR, 0);
|
||||||
|
rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
|
||||||
|
|
||||||
synchronize_irq(priv->irq);
|
synchronize_irq(priv->irq);
|
||||||
priv->slave = NULL;
|
priv->slave = NULL;
|
||||||
@@ -914,6 +915,8 @@ static int rcar_i2c_probe(struct platform_device *pdev)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out_pm_put;
|
goto out_pm_put;
|
||||||
|
|
||||||
|
rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
|
||||||
|
|
||||||
if (priv->devtype == I2C_RCAR_GEN3) {
|
if (priv->devtype == I2C_RCAR_GEN3) {
|
||||||
priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
|
priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
|
||||||
if (!IS_ERR(priv->rstc)) {
|
if (!IS_ERR(priv->rstc)) {
|
||||||
|
|||||||
@@ -306,7 +306,8 @@ int ib_umem_odp_get(struct ib_ucontext *context, struct ib_umem *umem,
|
|||||||
vma = find_vma(mm, ib_umem_start(umem));
|
vma = find_vma(mm, ib_umem_start(umem));
|
||||||
if (!vma || !is_vm_hugetlb_page(vma)) {
|
if (!vma || !is_vm_hugetlb_page(vma)) {
|
||||||
up_read(&mm->mmap_sem);
|
up_read(&mm->mmap_sem);
|
||||||
return -EINVAL;
|
ret_val = -EINVAL;
|
||||||
|
goto out_mm;
|
||||||
}
|
}
|
||||||
h = hstate_vma(vma);
|
h = hstate_vma(vma);
|
||||||
umem->page_shift = huge_page_shift(h);
|
umem->page_shift = huge_page_shift(h);
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ static const char * const smbus_pnp_ids[] = {
|
|||||||
"LEN0093", /* T480 */
|
"LEN0093", /* T480 */
|
||||||
"LEN0096", /* X280 */
|
"LEN0096", /* X280 */
|
||||||
"LEN0097", /* X280 -> ALPS trackpoint */
|
"LEN0097", /* X280 -> ALPS trackpoint */
|
||||||
|
"LEN0099", /* X1 Extreme 1st */
|
||||||
"LEN009b", /* T580 */
|
"LEN009b", /* T580 */
|
||||||
"LEN200f", /* T450s */
|
"LEN200f", /* T450s */
|
||||||
"LEN2044", /* L470 */
|
"LEN2044", /* L470 */
|
||||||
|
|||||||
@@ -4394,9 +4394,10 @@ int amd_iommu_create_irq_domain(struct amd_iommu *iommu)
|
|||||||
if (!fn)
|
if (!fn)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
iommu->ir_domain = irq_domain_create_tree(fn, &amd_ir_domain_ops, iommu);
|
iommu->ir_domain = irq_domain_create_tree(fn, &amd_ir_domain_ops, iommu);
|
||||||
irq_domain_free_fwnode(fn);
|
if (!iommu->ir_domain) {
|
||||||
if (!iommu->ir_domain)
|
irq_domain_free_fwnode(fn);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
iommu->ir_domain->parent = arch_get_ir_parent_domain();
|
iommu->ir_domain->parent = arch_get_ir_parent_domain();
|
||||||
iommu->msi_domain = arch_create_remap_msi_irq_domain(iommu->ir_domain,
|
iommu->msi_domain = arch_create_remap_msi_irq_domain(iommu->ir_domain,
|
||||||
|
|||||||
@@ -536,8 +536,8 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu)
|
|||||||
0, INTR_REMAP_TABLE_ENTRIES,
|
0, INTR_REMAP_TABLE_ENTRIES,
|
||||||
fn, &intel_ir_domain_ops,
|
fn, &intel_ir_domain_ops,
|
||||||
iommu);
|
iommu);
|
||||||
irq_domain_free_fwnode(fn);
|
|
||||||
if (!iommu->ir_domain) {
|
if (!iommu->ir_domain) {
|
||||||
|
irq_domain_free_fwnode(fn);
|
||||||
pr_err("IR%d: failed to allocate irqdomain\n", iommu->seq_id);
|
pr_err("IR%d: failed to allocate irqdomain\n", iommu->seq_id);
|
||||||
goto out_free_bitmap;
|
goto out_free_bitmap;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4773,15 +4773,19 @@ int bond_create(struct net *net, const char *name)
|
|||||||
bond_dev->rtnl_link_ops = &bond_link_ops;
|
bond_dev->rtnl_link_ops = &bond_link_ops;
|
||||||
|
|
||||||
res = register_netdevice(bond_dev);
|
res = register_netdevice(bond_dev);
|
||||||
|
if (res < 0) {
|
||||||
|
free_netdev(bond_dev);
|
||||||
|
rtnl_unlock();
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
netif_carrier_off(bond_dev);
|
netif_carrier_off(bond_dev);
|
||||||
|
|
||||||
bond_work_init_all(bond);
|
bond_work_init_all(bond);
|
||||||
|
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
if (res < 0)
|
return 0;
|
||||||
free_netdev(bond_dev);
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __net_init bond_net_init(struct net *net)
|
static int __net_init bond_net_init(struct net *net)
|
||||||
|
|||||||
@@ -451,11 +451,10 @@ static int bond_newlink(struct net *src_net, struct net_device *bond_dev,
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
err = register_netdevice(bond_dev);
|
err = register_netdevice(bond_dev);
|
||||||
|
|
||||||
netif_carrier_off(bond_dev);
|
|
||||||
if (!err) {
|
if (!err) {
|
||||||
struct bonding *bond = netdev_priv(bond_dev);
|
struct bonding *bond = netdev_priv(bond_dev);
|
||||||
|
|
||||||
|
netif_carrier_off(bond_dev);
|
||||||
bond_work_init_all(bond);
|
bond_work_init_all(bond);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1287,8 +1287,11 @@ static int bnxt_set_pauseparam(struct net_device *dev,
|
|||||||
if (epause->tx_pause)
|
if (epause->tx_pause)
|
||||||
link_info->req_flow_ctrl |= BNXT_LINK_PAUSE_TX;
|
link_info->req_flow_ctrl |= BNXT_LINK_PAUSE_TX;
|
||||||
|
|
||||||
if (netif_running(dev))
|
if (netif_running(dev)) {
|
||||||
|
mutex_lock(&bp->link_lock);
|
||||||
rc = bnxt_hwrm_set_pause(bp);
|
rc = bnxt_hwrm_set_pause(bp);
|
||||||
|
mutex_unlock(&bp->link_lock);
|
||||||
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ io_error:
|
|||||||
|
|
||||||
static inline u16 gm_phy_read(struct sky2_hw *hw, unsigned port, u16 reg)
|
static inline u16 gm_phy_read(struct sky2_hw *hw, unsigned port, u16 reg)
|
||||||
{
|
{
|
||||||
u16 v;
|
u16 v = 0;
|
||||||
__gm_phy_read(hw, port, reg, &v);
|
__gm_phy_read(hw, port, reg, &v);
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -619,7 +619,7 @@ static int mlxsw_emad_init(struct mlxsw_core *mlxsw_core)
|
|||||||
err = mlxsw_core_trap_register(mlxsw_core, &mlxsw_emad_rx_listener,
|
err = mlxsw_core_trap_register(mlxsw_core, &mlxsw_emad_rx_listener,
|
||||||
mlxsw_core);
|
mlxsw_core);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
goto err_trap_register;
|
||||||
|
|
||||||
err = mlxsw_core->driver->basic_trap_groups_set(mlxsw_core);
|
err = mlxsw_core->driver->basic_trap_groups_set(mlxsw_core);
|
||||||
if (err)
|
if (err)
|
||||||
@@ -631,6 +631,7 @@ static int mlxsw_emad_init(struct mlxsw_core *mlxsw_core)
|
|||||||
err_emad_trap_set:
|
err_emad_trap_set:
|
||||||
mlxsw_core_trap_unregister(mlxsw_core, &mlxsw_emad_rx_listener,
|
mlxsw_core_trap_unregister(mlxsw_core, &mlxsw_emad_rx_listener,
|
||||||
mlxsw_core);
|
mlxsw_core);
|
||||||
|
err_trap_register:
|
||||||
destroy_workqueue(mlxsw_core->emad_wq);
|
destroy_workqueue(mlxsw_core->emad_wq);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2294,7 +2294,7 @@ static int smc_drv_probe(struct platform_device *pdev)
|
|||||||
ret = try_toggle_control_gpio(&pdev->dev, &lp->power_gpio,
|
ret = try_toggle_control_gpio(&pdev->dev, &lp->power_gpio,
|
||||||
"power", 0, 0, 100);
|
"power", 0, 0, 100);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto out_free_netdev;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Optional reset GPIO configured? Minimum 100 ns reset needed
|
* Optional reset GPIO configured? Minimum 100 ns reset needed
|
||||||
@@ -2303,7 +2303,7 @@ static int smc_drv_probe(struct platform_device *pdev)
|
|||||||
ret = try_toggle_control_gpio(&pdev->dev, &lp->reset_gpio,
|
ret = try_toggle_control_gpio(&pdev->dev, &lp->reset_gpio,
|
||||||
"reset", 0, 0, 100);
|
"reset", 0, 0, 100);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto out_free_netdev;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Need to wait for optional EEPROM to load, max 750 us according
|
* Need to wait for optional EEPROM to load, max 750 us according
|
||||||
|
|||||||
@@ -1250,7 +1250,7 @@ static int rr_open(struct net_device *dev)
|
|||||||
rrpriv->info = NULL;
|
rrpriv->info = NULL;
|
||||||
}
|
}
|
||||||
if (rrpriv->rx_ctrl) {
|
if (rrpriv->rx_ctrl) {
|
||||||
pci_free_consistent(pdev, sizeof(struct ring_ctrl),
|
pci_free_consistent(pdev, 256 * sizeof(struct ring_ctrl),
|
||||||
rrpriv->rx_ctrl, rrpriv->rx_ctrl_dma);
|
rrpriv->rx_ctrl, rrpriv->rx_ctrl_dma);
|
||||||
rrpriv->rx_ctrl = NULL;
|
rrpriv->rx_ctrl = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1339,6 +1339,7 @@ static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr)
|
|||||||
dp83640->hwts_rx_en = 1;
|
dp83640->hwts_rx_en = 1;
|
||||||
dp83640->layer = PTP_CLASS_L4;
|
dp83640->layer = PTP_CLASS_L4;
|
||||||
dp83640->version = PTP_CLASS_V1;
|
dp83640->version = PTP_CLASS_V1;
|
||||||
|
cfg.rx_filter = HWTSTAMP_FILTER_PTP_V1_L4_EVENT;
|
||||||
break;
|
break;
|
||||||
case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
|
case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
|
||||||
case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
|
case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
|
||||||
@@ -1346,6 +1347,7 @@ static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr)
|
|||||||
dp83640->hwts_rx_en = 1;
|
dp83640->hwts_rx_en = 1;
|
||||||
dp83640->layer = PTP_CLASS_L4;
|
dp83640->layer = PTP_CLASS_L4;
|
||||||
dp83640->version = PTP_CLASS_V2;
|
dp83640->version = PTP_CLASS_V2;
|
||||||
|
cfg.rx_filter = HWTSTAMP_FILTER_PTP_V2_L4_EVENT;
|
||||||
break;
|
break;
|
||||||
case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
|
case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
|
||||||
case HWTSTAMP_FILTER_PTP_V2_L2_SYNC:
|
case HWTSTAMP_FILTER_PTP_V2_L2_SYNC:
|
||||||
@@ -1353,6 +1355,7 @@ static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr)
|
|||||||
dp83640->hwts_rx_en = 1;
|
dp83640->hwts_rx_en = 1;
|
||||||
dp83640->layer = PTP_CLASS_L2;
|
dp83640->layer = PTP_CLASS_L2;
|
||||||
dp83640->version = PTP_CLASS_V2;
|
dp83640->version = PTP_CLASS_V2;
|
||||||
|
cfg.rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT;
|
||||||
break;
|
break;
|
||||||
case HWTSTAMP_FILTER_PTP_V2_EVENT:
|
case HWTSTAMP_FILTER_PTP_V2_EVENT:
|
||||||
case HWTSTAMP_FILTER_PTP_V2_SYNC:
|
case HWTSTAMP_FILTER_PTP_V2_SYNC:
|
||||||
@@ -1360,6 +1363,7 @@ static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr)
|
|||||||
dp83640->hwts_rx_en = 1;
|
dp83640->hwts_rx_en = 1;
|
||||||
dp83640->layer = PTP_CLASS_L4 | PTP_CLASS_L2;
|
dp83640->layer = PTP_CLASS_L4 | PTP_CLASS_L2;
|
||||||
dp83640->version = PTP_CLASS_V2;
|
dp83640->version = PTP_CLASS_V2;
|
||||||
|
cfg.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -ERANGE;
|
return -ERANGE;
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ static int ax88172a_bind(struct usbnet *dev, struct usb_interface *intf)
|
|||||||
ret = asix_read_cmd(dev, AX_CMD_READ_NODE_ID, 0, 0, ETH_ALEN, buf, 0);
|
ret = asix_read_cmd(dev, AX_CMD_READ_NODE_ID, 0, 0, ETH_ALEN, buf, 0);
|
||||||
if (ret < ETH_ALEN) {
|
if (ret < ETH_ALEN) {
|
||||||
netdev_err(dev->net, "Failed to read MAC address: %d\n", ret);
|
netdev_err(dev->net, "Failed to read MAC address: %d\n", ret);
|
||||||
|
ret = -EIO;
|
||||||
goto free;
|
goto free;
|
||||||
}
|
}
|
||||||
memcpy(dev->net->dev_addr, buf, ETH_ALEN);
|
memcpy(dev->net->dev_addr, buf, ETH_ALEN);
|
||||||
|
|||||||
@@ -308,7 +308,6 @@ static void lapbeth_setup(struct net_device *dev)
|
|||||||
dev->netdev_ops = &lapbeth_netdev_ops;
|
dev->netdev_ops = &lapbeth_netdev_ops;
|
||||||
dev->needs_free_netdev = true;
|
dev->needs_free_netdev = true;
|
||||||
dev->type = ARPHRD_X25;
|
dev->type = ARPHRD_X25;
|
||||||
dev->hard_header_len = 3;
|
|
||||||
dev->mtu = 1000;
|
dev->mtu = 1000;
|
||||||
dev->addr_len = 0;
|
dev->addr_len = 0;
|
||||||
}
|
}
|
||||||
@@ -329,6 +328,14 @@ static int lapbeth_new_device(struct net_device *dev)
|
|||||||
if (!ndev)
|
if (!ndev)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
/* When transmitting data:
|
||||||
|
* first this driver removes a pseudo header of 1 byte,
|
||||||
|
* then the lapb module prepends an LAPB header of at most 3 bytes,
|
||||||
|
* then this driver prepends a length field of 2 bytes,
|
||||||
|
* then the underlying Ethernet device prepends its own header.
|
||||||
|
*/
|
||||||
|
ndev->hard_header_len = -1 + 3 + 2 + dev->hard_header_len;
|
||||||
|
|
||||||
lapbeth = netdev_priv(ndev);
|
lapbeth = netdev_priv(ndev);
|
||||||
lapbeth->axdev = ndev;
|
lapbeth->axdev = ndev;
|
||||||
|
|
||||||
|
|||||||
@@ -641,9 +641,9 @@ err:
|
|||||||
|
|
||||||
static void ath9k_hif_usb_rx_cb(struct urb *urb)
|
static void ath9k_hif_usb_rx_cb(struct urb *urb)
|
||||||
{
|
{
|
||||||
struct sk_buff *skb = (struct sk_buff *) urb->context;
|
struct rx_buf *rx_buf = (struct rx_buf *)urb->context;
|
||||||
struct hif_device_usb *hif_dev =
|
struct hif_device_usb *hif_dev = rx_buf->hif_dev;
|
||||||
usb_get_intfdata(usb_ifnum_to_if(urb->dev, 0));
|
struct sk_buff *skb = rx_buf->skb;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!skb)
|
if (!skb)
|
||||||
@@ -683,14 +683,15 @@ resubmit:
|
|||||||
return;
|
return;
|
||||||
free:
|
free:
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
|
kfree(rx_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ath9k_hif_usb_reg_in_cb(struct urb *urb)
|
static void ath9k_hif_usb_reg_in_cb(struct urb *urb)
|
||||||
{
|
{
|
||||||
struct sk_buff *skb = (struct sk_buff *) urb->context;
|
struct rx_buf *rx_buf = (struct rx_buf *)urb->context;
|
||||||
|
struct hif_device_usb *hif_dev = rx_buf->hif_dev;
|
||||||
|
struct sk_buff *skb = rx_buf->skb;
|
||||||
struct sk_buff *nskb;
|
struct sk_buff *nskb;
|
||||||
struct hif_device_usb *hif_dev =
|
|
||||||
usb_get_intfdata(usb_ifnum_to_if(urb->dev, 0));
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!skb)
|
if (!skb)
|
||||||
@@ -730,11 +731,13 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rx_buf->skb = nskb;
|
||||||
|
|
||||||
usb_fill_int_urb(urb, hif_dev->udev,
|
usb_fill_int_urb(urb, hif_dev->udev,
|
||||||
usb_rcvintpipe(hif_dev->udev,
|
usb_rcvintpipe(hif_dev->udev,
|
||||||
USB_REG_IN_PIPE),
|
USB_REG_IN_PIPE),
|
||||||
nskb->data, MAX_REG_IN_BUF_SIZE,
|
nskb->data, MAX_REG_IN_BUF_SIZE,
|
||||||
ath9k_hif_usb_reg_in_cb, nskb, 1);
|
ath9k_hif_usb_reg_in_cb, rx_buf, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
resubmit:
|
resubmit:
|
||||||
@@ -748,6 +751,7 @@ resubmit:
|
|||||||
return;
|
return;
|
||||||
free:
|
free:
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
|
kfree(rx_buf);
|
||||||
urb->context = NULL;
|
urb->context = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -793,7 +797,7 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev)
|
|||||||
init_usb_anchor(&hif_dev->mgmt_submitted);
|
init_usb_anchor(&hif_dev->mgmt_submitted);
|
||||||
|
|
||||||
for (i = 0; i < MAX_TX_URB_NUM; i++) {
|
for (i = 0; i < MAX_TX_URB_NUM; i++) {
|
||||||
tx_buf = kzalloc(sizeof(struct tx_buf), GFP_KERNEL);
|
tx_buf = kzalloc(sizeof(*tx_buf), GFP_KERNEL);
|
||||||
if (!tx_buf)
|
if (!tx_buf)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
@@ -830,8 +834,9 @@ static void ath9k_hif_usb_dealloc_rx_urbs(struct hif_device_usb *hif_dev)
|
|||||||
|
|
||||||
static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev)
|
static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev)
|
||||||
{
|
{
|
||||||
struct urb *urb = NULL;
|
struct rx_buf *rx_buf = NULL;
|
||||||
struct sk_buff *skb = NULL;
|
struct sk_buff *skb = NULL;
|
||||||
|
struct urb *urb = NULL;
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
init_usb_anchor(&hif_dev->rx_submitted);
|
init_usb_anchor(&hif_dev->rx_submitted);
|
||||||
@@ -839,6 +844,12 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev)
|
|||||||
|
|
||||||
for (i = 0; i < MAX_RX_URB_NUM; i++) {
|
for (i = 0; i < MAX_RX_URB_NUM; i++) {
|
||||||
|
|
||||||
|
rx_buf = kzalloc(sizeof(*rx_buf), GFP_KERNEL);
|
||||||
|
if (!rx_buf) {
|
||||||
|
ret = -ENOMEM;
|
||||||
|
goto err_rxb;
|
||||||
|
}
|
||||||
|
|
||||||
/* Allocate URB */
|
/* Allocate URB */
|
||||||
urb = usb_alloc_urb(0, GFP_KERNEL);
|
urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||||
if (urb == NULL) {
|
if (urb == NULL) {
|
||||||
@@ -853,11 +864,14 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev)
|
|||||||
goto err_skb;
|
goto err_skb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rx_buf->hif_dev = hif_dev;
|
||||||
|
rx_buf->skb = skb;
|
||||||
|
|
||||||
usb_fill_bulk_urb(urb, hif_dev->udev,
|
usb_fill_bulk_urb(urb, hif_dev->udev,
|
||||||
usb_rcvbulkpipe(hif_dev->udev,
|
usb_rcvbulkpipe(hif_dev->udev,
|
||||||
USB_WLAN_RX_PIPE),
|
USB_WLAN_RX_PIPE),
|
||||||
skb->data, MAX_RX_BUF_SIZE,
|
skb->data, MAX_RX_BUF_SIZE,
|
||||||
ath9k_hif_usb_rx_cb, skb);
|
ath9k_hif_usb_rx_cb, rx_buf);
|
||||||
|
|
||||||
/* Anchor URB */
|
/* Anchor URB */
|
||||||
usb_anchor_urb(urb, &hif_dev->rx_submitted);
|
usb_anchor_urb(urb, &hif_dev->rx_submitted);
|
||||||
@@ -883,6 +897,8 @@ err_submit:
|
|||||||
err_skb:
|
err_skb:
|
||||||
usb_free_urb(urb);
|
usb_free_urb(urb);
|
||||||
err_urb:
|
err_urb:
|
||||||
|
kfree(rx_buf);
|
||||||
|
err_rxb:
|
||||||
ath9k_hif_usb_dealloc_rx_urbs(hif_dev);
|
ath9k_hif_usb_dealloc_rx_urbs(hif_dev);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -894,14 +910,21 @@ static void ath9k_hif_usb_dealloc_reg_in_urbs(struct hif_device_usb *hif_dev)
|
|||||||
|
|
||||||
static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev)
|
static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev)
|
||||||
{
|
{
|
||||||
struct urb *urb = NULL;
|
struct rx_buf *rx_buf = NULL;
|
||||||
struct sk_buff *skb = NULL;
|
struct sk_buff *skb = NULL;
|
||||||
|
struct urb *urb = NULL;
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
init_usb_anchor(&hif_dev->reg_in_submitted);
|
init_usb_anchor(&hif_dev->reg_in_submitted);
|
||||||
|
|
||||||
for (i = 0; i < MAX_REG_IN_URB_NUM; i++) {
|
for (i = 0; i < MAX_REG_IN_URB_NUM; i++) {
|
||||||
|
|
||||||
|
rx_buf = kzalloc(sizeof(*rx_buf), GFP_KERNEL);
|
||||||
|
if (!rx_buf) {
|
||||||
|
ret = -ENOMEM;
|
||||||
|
goto err_rxb;
|
||||||
|
}
|
||||||
|
|
||||||
/* Allocate URB */
|
/* Allocate URB */
|
||||||
urb = usb_alloc_urb(0, GFP_KERNEL);
|
urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||||
if (urb == NULL) {
|
if (urb == NULL) {
|
||||||
@@ -916,11 +939,14 @@ static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev)
|
|||||||
goto err_skb;
|
goto err_skb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rx_buf->hif_dev = hif_dev;
|
||||||
|
rx_buf->skb = skb;
|
||||||
|
|
||||||
usb_fill_int_urb(urb, hif_dev->udev,
|
usb_fill_int_urb(urb, hif_dev->udev,
|
||||||
usb_rcvintpipe(hif_dev->udev,
|
usb_rcvintpipe(hif_dev->udev,
|
||||||
USB_REG_IN_PIPE),
|
USB_REG_IN_PIPE),
|
||||||
skb->data, MAX_REG_IN_BUF_SIZE,
|
skb->data, MAX_REG_IN_BUF_SIZE,
|
||||||
ath9k_hif_usb_reg_in_cb, skb, 1);
|
ath9k_hif_usb_reg_in_cb, rx_buf, 1);
|
||||||
|
|
||||||
/* Anchor URB */
|
/* Anchor URB */
|
||||||
usb_anchor_urb(urb, &hif_dev->reg_in_submitted);
|
usb_anchor_urb(urb, &hif_dev->reg_in_submitted);
|
||||||
@@ -946,6 +972,8 @@ err_submit:
|
|||||||
err_skb:
|
err_skb:
|
||||||
usb_free_urb(urb);
|
usb_free_urb(urb);
|
||||||
err_urb:
|
err_urb:
|
||||||
|
kfree(rx_buf);
|
||||||
|
err_rxb:
|
||||||
ath9k_hif_usb_dealloc_reg_in_urbs(hif_dev);
|
ath9k_hif_usb_dealloc_reg_in_urbs(hif_dev);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,6 +86,11 @@ struct tx_buf {
|
|||||||
struct list_head list;
|
struct list_head list;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct rx_buf {
|
||||||
|
struct sk_buff *skb;
|
||||||
|
struct hif_device_usb *hif_dev;
|
||||||
|
};
|
||||||
|
|
||||||
#define HIF_USB_TX_STOP BIT(0)
|
#define HIF_USB_TX_STOP BIT(0)
|
||||||
#define HIF_USB_TX_FLUSH BIT(1)
|
#define HIF_USB_TX_FLUSH BIT(1)
|
||||||
|
|
||||||
|
|||||||
@@ -638,9 +638,10 @@ static int vmd_enable_domain(struct vmd_dev *vmd)
|
|||||||
|
|
||||||
vmd->irq_domain = pci_msi_create_irq_domain(fn, &vmd_msi_domain_info,
|
vmd->irq_domain = pci_msi_create_irq_domain(fn, &vmd_msi_domain_info,
|
||||||
x86_vector_domain);
|
x86_vector_domain);
|
||||||
irq_domain_free_fwnode(fn);
|
if (!vmd->irq_domain) {
|
||||||
if (!vmd->irq_domain)
|
irq_domain_free_fwnode(fn);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
pci_add_resource(&resources, &vmd->resources[0]);
|
pci_add_resource(&resources, &vmd->resources[0]);
|
||||||
pci_add_resource(&resources, &vmd->resources[1]);
|
pci_add_resource(&resources, &vmd->resources[1]);
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ static const struct amd_pingroup kerncz_groups[] = {
|
|||||||
{
|
{
|
||||||
.name = "uart0",
|
.name = "uart0",
|
||||||
.pins = uart0_pins,
|
.pins = uart0_pins,
|
||||||
.npins = 9,
|
.npins = 5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "uart1",
|
.name = "uart1",
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ store_spi_transport_##field(struct device *dev, \
|
|||||||
struct spi_transport_attrs *tp \
|
struct spi_transport_attrs *tp \
|
||||||
= (struct spi_transport_attrs *)&starget->starget_data; \
|
= (struct spi_transport_attrs *)&starget->starget_data; \
|
||||||
\
|
\
|
||||||
if (i->f->set_##field) \
|
if (!i->f->set_##field) \
|
||||||
return -EINVAL; \
|
return -EINVAL; \
|
||||||
val = simple_strtoul(buf, NULL, 0); \
|
val = simple_strtoul(buf, NULL, 0); \
|
||||||
if (val > tp->max_##field) \
|
if (val > tp->max_##field) \
|
||||||
|
|||||||
@@ -886,9 +886,11 @@ static irqreturn_t dspi_interrupt(int irq, void *dev_id)
|
|||||||
trans_mode);
|
trans_mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct of_device_id fsl_dspi_dt_ids[] = {
|
static const struct of_device_id fsl_dspi_dt_ids[] = {
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
#define SPI_CFG0_SCK_LOW_OFFSET 8
|
#define SPI_CFG0_SCK_LOW_OFFSET 8
|
||||||
#define SPI_CFG0_CS_HOLD_OFFSET 16
|
#define SPI_CFG0_CS_HOLD_OFFSET 16
|
||||||
#define SPI_CFG0_CS_SETUP_OFFSET 24
|
#define SPI_CFG0_CS_SETUP_OFFSET 24
|
||||||
#define SPI_ADJUST_CFG0_SCK_LOW_OFFSET 16
|
|
||||||
#define SPI_ADJUST_CFG0_CS_HOLD_OFFSET 0
|
#define SPI_ADJUST_CFG0_CS_HOLD_OFFSET 0
|
||||||
#define SPI_ADJUST_CFG0_CS_SETUP_OFFSET 16
|
#define SPI_ADJUST_CFG0_CS_SETUP_OFFSET 16
|
||||||
|
|
||||||
@@ -53,6 +52,8 @@
|
|||||||
#define SPI_CFG1_CS_IDLE_MASK 0xff
|
#define SPI_CFG1_CS_IDLE_MASK 0xff
|
||||||
#define SPI_CFG1_PACKET_LOOP_MASK 0xff00
|
#define SPI_CFG1_PACKET_LOOP_MASK 0xff00
|
||||||
#define SPI_CFG1_PACKET_LENGTH_MASK 0x3ff0000
|
#define SPI_CFG1_PACKET_LENGTH_MASK 0x3ff0000
|
||||||
|
#define SPI_CFG2_SCK_HIGH_OFFSET 0
|
||||||
|
#define SPI_CFG2_SCK_LOW_OFFSET 16
|
||||||
|
|
||||||
#define SPI_CMD_ACT BIT(0)
|
#define SPI_CMD_ACT BIT(0)
|
||||||
#define SPI_CMD_RESUME BIT(1)
|
#define SPI_CMD_RESUME BIT(1)
|
||||||
@@ -259,7 +260,7 @@ static void mtk_spi_set_cs(struct spi_device *spi, bool enable)
|
|||||||
static void mtk_spi_prepare_transfer(struct spi_master *master,
|
static void mtk_spi_prepare_transfer(struct spi_master *master,
|
||||||
struct spi_transfer *xfer)
|
struct spi_transfer *xfer)
|
||||||
{
|
{
|
||||||
u32 spi_clk_hz, div, sck_time, cs_time, reg_val = 0;
|
u32 spi_clk_hz, div, sck_time, cs_time, reg_val;
|
||||||
struct mtk_spi *mdata = spi_master_get_devdata(master);
|
struct mtk_spi *mdata = spi_master_get_devdata(master);
|
||||||
|
|
||||||
spi_clk_hz = clk_get_rate(mdata->spi_clk);
|
spi_clk_hz = clk_get_rate(mdata->spi_clk);
|
||||||
@@ -272,18 +273,18 @@ static void mtk_spi_prepare_transfer(struct spi_master *master,
|
|||||||
cs_time = sck_time * 2;
|
cs_time = sck_time * 2;
|
||||||
|
|
||||||
if (mdata->dev_comp->enhance_timing) {
|
if (mdata->dev_comp->enhance_timing) {
|
||||||
|
reg_val = (((sck_time - 1) & 0xffff)
|
||||||
|
<< SPI_CFG2_SCK_HIGH_OFFSET);
|
||||||
reg_val |= (((sck_time - 1) & 0xffff)
|
reg_val |= (((sck_time - 1) & 0xffff)
|
||||||
<< SPI_CFG0_SCK_HIGH_OFFSET);
|
<< SPI_CFG2_SCK_LOW_OFFSET);
|
||||||
reg_val |= (((sck_time - 1) & 0xffff)
|
|
||||||
<< SPI_ADJUST_CFG0_SCK_LOW_OFFSET);
|
|
||||||
writel(reg_val, mdata->base + SPI_CFG2_REG);
|
writel(reg_val, mdata->base + SPI_CFG2_REG);
|
||||||
reg_val |= (((cs_time - 1) & 0xffff)
|
reg_val = (((cs_time - 1) & 0xffff)
|
||||||
<< SPI_ADJUST_CFG0_CS_HOLD_OFFSET);
|
<< SPI_ADJUST_CFG0_CS_HOLD_OFFSET);
|
||||||
reg_val |= (((cs_time - 1) & 0xffff)
|
reg_val |= (((cs_time - 1) & 0xffff)
|
||||||
<< SPI_ADJUST_CFG0_CS_SETUP_OFFSET);
|
<< SPI_ADJUST_CFG0_CS_SETUP_OFFSET);
|
||||||
writel(reg_val, mdata->base + SPI_CFG0_REG);
|
writel(reg_val, mdata->base + SPI_CFG0_REG);
|
||||||
} else {
|
} else {
|
||||||
reg_val |= (((sck_time - 1) & 0xff)
|
reg_val = (((sck_time - 1) & 0xff)
|
||||||
<< SPI_CFG0_SCK_HIGH_OFFSET);
|
<< SPI_CFG0_SCK_HIGH_OFFSET);
|
||||||
reg_val |= (((sck_time - 1) & 0xff) << SPI_CFG0_SCK_LOW_OFFSET);
|
reg_val |= (((sck_time - 1) & 0xff) << SPI_CFG0_SCK_LOW_OFFSET);
|
||||||
reg_val |= (((cs_time - 1) & 0xff) << SPI_CFG0_CS_HOLD_OFFSET);
|
reg_val |= (((cs_time - 1) & 0xff) << SPI_CFG0_CS_HOLD_OFFSET);
|
||||||
|
|||||||
@@ -115,14 +115,22 @@ static int apci1032_cos_insn_config(struct comedi_device *dev,
|
|||||||
unsigned int *data)
|
unsigned int *data)
|
||||||
{
|
{
|
||||||
struct apci1032_private *devpriv = dev->private;
|
struct apci1032_private *devpriv = dev->private;
|
||||||
unsigned int shift, oldmask;
|
unsigned int shift, oldmask, himask, lomask;
|
||||||
|
|
||||||
switch (data[0]) {
|
switch (data[0]) {
|
||||||
case INSN_CONFIG_DIGITAL_TRIG:
|
case INSN_CONFIG_DIGITAL_TRIG:
|
||||||
if (data[1] != 0)
|
if (data[1] != 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
shift = data[3];
|
shift = data[3];
|
||||||
oldmask = (1U << shift) - 1;
|
if (shift < 32) {
|
||||||
|
oldmask = (1U << shift) - 1;
|
||||||
|
himask = data[4] << shift;
|
||||||
|
lomask = data[5] << shift;
|
||||||
|
} else {
|
||||||
|
oldmask = 0xffffffffu;
|
||||||
|
himask = 0;
|
||||||
|
lomask = 0;
|
||||||
|
}
|
||||||
switch (data[2]) {
|
switch (data[2]) {
|
||||||
case COMEDI_DIGITAL_TRIG_DISABLE:
|
case COMEDI_DIGITAL_TRIG_DISABLE:
|
||||||
devpriv->ctrl = 0;
|
devpriv->ctrl = 0;
|
||||||
@@ -145,8 +153,8 @@ static int apci1032_cos_insn_config(struct comedi_device *dev,
|
|||||||
devpriv->mode2 &= oldmask;
|
devpriv->mode2 &= oldmask;
|
||||||
}
|
}
|
||||||
/* configure specified channels */
|
/* configure specified channels */
|
||||||
devpriv->mode1 |= data[4] << shift;
|
devpriv->mode1 |= himask;
|
||||||
devpriv->mode2 |= data[5] << shift;
|
devpriv->mode2 |= lomask;
|
||||||
break;
|
break;
|
||||||
case COMEDI_DIGITAL_TRIG_ENABLE_LEVELS:
|
case COMEDI_DIGITAL_TRIG_ENABLE_LEVELS:
|
||||||
if (devpriv->ctrl != (APCI1032_CTRL_INT_ENA |
|
if (devpriv->ctrl != (APCI1032_CTRL_INT_ENA |
|
||||||
@@ -163,8 +171,8 @@ static int apci1032_cos_insn_config(struct comedi_device *dev,
|
|||||||
devpriv->mode2 &= oldmask;
|
devpriv->mode2 &= oldmask;
|
||||||
}
|
}
|
||||||
/* configure specified channels */
|
/* configure specified channels */
|
||||||
devpriv->mode1 |= data[4] << shift;
|
devpriv->mode1 |= himask;
|
||||||
devpriv->mode2 |= data[5] << shift;
|
devpriv->mode2 |= lomask;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|||||||
@@ -461,13 +461,14 @@ static int apci1500_di_cfg_trig(struct comedi_device *dev,
|
|||||||
struct apci1500_private *devpriv = dev->private;
|
struct apci1500_private *devpriv = dev->private;
|
||||||
unsigned int trig = data[1];
|
unsigned int trig = data[1];
|
||||||
unsigned int shift = data[3];
|
unsigned int shift = data[3];
|
||||||
unsigned int hi_mask = data[4] << shift;
|
unsigned int hi_mask;
|
||||||
unsigned int lo_mask = data[5] << shift;
|
unsigned int lo_mask;
|
||||||
unsigned int chan_mask = hi_mask | lo_mask;
|
unsigned int chan_mask;
|
||||||
unsigned int old_mask = (1 << shift) - 1;
|
unsigned int old_mask;
|
||||||
unsigned int pm;
|
unsigned int pm;
|
||||||
unsigned int pt;
|
unsigned int pt;
|
||||||
unsigned int pp;
|
unsigned int pp;
|
||||||
|
unsigned int invalid_chan;
|
||||||
|
|
||||||
if (trig > 1) {
|
if (trig > 1) {
|
||||||
dev_dbg(dev->class_dev,
|
dev_dbg(dev->class_dev,
|
||||||
@@ -475,7 +476,20 @@ static int apci1500_di_cfg_trig(struct comedi_device *dev,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan_mask > 0xffff) {
|
if (shift <= 16) {
|
||||||
|
hi_mask = data[4] << shift;
|
||||||
|
lo_mask = data[5] << shift;
|
||||||
|
old_mask = (1U << shift) - 1;
|
||||||
|
invalid_chan = (data[4] | data[5]) >> (16 - shift);
|
||||||
|
} else {
|
||||||
|
hi_mask = 0;
|
||||||
|
lo_mask = 0;
|
||||||
|
old_mask = 0xffff;
|
||||||
|
invalid_chan = data[4] | data[5];
|
||||||
|
}
|
||||||
|
chan_mask = hi_mask | lo_mask;
|
||||||
|
|
||||||
|
if (invalid_chan) {
|
||||||
dev_dbg(dev->class_dev, "invalid digital trigger channel\n");
|
dev_dbg(dev->class_dev, "invalid digital trigger channel\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -340,14 +340,22 @@ static int apci1564_cos_insn_config(struct comedi_device *dev,
|
|||||||
unsigned int *data)
|
unsigned int *data)
|
||||||
{
|
{
|
||||||
struct apci1564_private *devpriv = dev->private;
|
struct apci1564_private *devpriv = dev->private;
|
||||||
unsigned int shift, oldmask;
|
unsigned int shift, oldmask, himask, lomask;
|
||||||
|
|
||||||
switch (data[0]) {
|
switch (data[0]) {
|
||||||
case INSN_CONFIG_DIGITAL_TRIG:
|
case INSN_CONFIG_DIGITAL_TRIG:
|
||||||
if (data[1] != 0)
|
if (data[1] != 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
shift = data[3];
|
shift = data[3];
|
||||||
oldmask = (1U << shift) - 1;
|
if (shift < 32) {
|
||||||
|
oldmask = (1U << shift) - 1;
|
||||||
|
himask = data[4] << shift;
|
||||||
|
lomask = data[5] << shift;
|
||||||
|
} else {
|
||||||
|
oldmask = 0xffffffffu;
|
||||||
|
himask = 0;
|
||||||
|
lomask = 0;
|
||||||
|
}
|
||||||
switch (data[2]) {
|
switch (data[2]) {
|
||||||
case COMEDI_DIGITAL_TRIG_DISABLE:
|
case COMEDI_DIGITAL_TRIG_DISABLE:
|
||||||
devpriv->ctrl = 0;
|
devpriv->ctrl = 0;
|
||||||
@@ -371,8 +379,8 @@ static int apci1564_cos_insn_config(struct comedi_device *dev,
|
|||||||
devpriv->mode2 &= oldmask;
|
devpriv->mode2 &= oldmask;
|
||||||
}
|
}
|
||||||
/* configure specified channels */
|
/* configure specified channels */
|
||||||
devpriv->mode1 |= data[4] << shift;
|
devpriv->mode1 |= himask;
|
||||||
devpriv->mode2 |= data[5] << shift;
|
devpriv->mode2 |= lomask;
|
||||||
break;
|
break;
|
||||||
case COMEDI_DIGITAL_TRIG_ENABLE_LEVELS:
|
case COMEDI_DIGITAL_TRIG_ENABLE_LEVELS:
|
||||||
if (devpriv->ctrl != (APCI1564_DI_IRQ_ENA |
|
if (devpriv->ctrl != (APCI1564_DI_IRQ_ENA |
|
||||||
@@ -389,8 +397,8 @@ static int apci1564_cos_insn_config(struct comedi_device *dev,
|
|||||||
devpriv->mode2 &= oldmask;
|
devpriv->mode2 &= oldmask;
|
||||||
}
|
}
|
||||||
/* configure specified channels */
|
/* configure specified channels */
|
||||||
devpriv->mode1 |= data[4] << shift;
|
devpriv->mode1 |= himask;
|
||||||
devpriv->mode2 |= data[5] << shift;
|
devpriv->mode2 |= lomask;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|||||||
@@ -341,7 +341,7 @@ static int ni6527_intr_insn_config(struct comedi_device *dev,
|
|||||||
case COMEDI_DIGITAL_TRIG_ENABLE_EDGES:
|
case COMEDI_DIGITAL_TRIG_ENABLE_EDGES:
|
||||||
/* check shift amount */
|
/* check shift amount */
|
||||||
shift = data[3];
|
shift = data[3];
|
||||||
if (shift >= s->n_chan) {
|
if (shift >= 32) {
|
||||||
mask = 0;
|
mask = 0;
|
||||||
rising = 0;
|
rising = 0;
|
||||||
falling = 0;
|
falling = 0;
|
||||||
|
|||||||
@@ -61,11 +61,25 @@ static int prism2sta_probe_usb(struct usb_interface *interface,
|
|||||||
const struct usb_device_id *id)
|
const struct usb_device_id *id)
|
||||||
{
|
{
|
||||||
struct usb_device *dev;
|
struct usb_device *dev;
|
||||||
|
const struct usb_endpoint_descriptor *epd;
|
||||||
|
const struct usb_host_interface *iface_desc = interface->cur_altsetting;
|
||||||
struct wlandevice *wlandev = NULL;
|
struct wlandevice *wlandev = NULL;
|
||||||
struct hfa384x *hw = NULL;
|
struct hfa384x *hw = NULL;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
|
if (iface_desc->desc.bNumEndpoints != 2) {
|
||||||
|
result = -ENODEV;
|
||||||
|
goto failed;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = -EINVAL;
|
||||||
|
epd = &iface_desc->endpoint[1].desc;
|
||||||
|
if (!usb_endpoint_is_bulk_in(epd))
|
||||||
|
goto failed;
|
||||||
|
epd = &iface_desc->endpoint[2].desc;
|
||||||
|
if (!usb_endpoint_is_bulk_out(epd))
|
||||||
|
goto failed;
|
||||||
|
|
||||||
dev = interface_to_usbdev(interface);
|
dev = interface_to_usbdev(interface);
|
||||||
wlandev = create_wlan();
|
wlandev = create_wlan();
|
||||||
if (!wlandev) {
|
if (!wlandev) {
|
||||||
|
|||||||
@@ -534,6 +534,7 @@ static void __init serial8250_isa_init_ports(void)
|
|||||||
*/
|
*/
|
||||||
up->mcr_mask = ~ALPHA_KLUDGE_MCR;
|
up->mcr_mask = ~ALPHA_KLUDGE_MCR;
|
||||||
up->mcr_force = ALPHA_KLUDGE_MCR;
|
up->mcr_force = ALPHA_KLUDGE_MCR;
|
||||||
|
serial8250_set_defaults(up);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* chain base port ops to support Remote Supervisor Adapter */
|
/* chain base port ops to support Remote Supervisor Adapter */
|
||||||
@@ -557,7 +558,6 @@ static void __init serial8250_isa_init_ports(void)
|
|||||||
port->membase = old_serial_port[i].iomem_base;
|
port->membase = old_serial_port[i].iomem_base;
|
||||||
port->iotype = old_serial_port[i].io_type;
|
port->iotype = old_serial_port[i].io_type;
|
||||||
port->regshift = old_serial_port[i].iomem_reg_shift;
|
port->regshift = old_serial_port[i].iomem_reg_shift;
|
||||||
serial8250_set_defaults(up);
|
|
||||||
|
|
||||||
port->irqflags |= irqflag;
|
port->irqflags |= irqflag;
|
||||||
if (serial8250_isa_config != NULL)
|
if (serial8250_isa_config != NULL)
|
||||||
|
|||||||
@@ -229,7 +229,17 @@ static void setup_gpio(struct pci_dev *pcidev, u8 __iomem *p)
|
|||||||
* devices will export them as GPIOs, so we pre-configure them safely
|
* devices will export them as GPIOs, so we pre-configure them safely
|
||||||
* as inputs.
|
* as inputs.
|
||||||
*/
|
*/
|
||||||
u8 dir = pcidev->vendor == PCI_VENDOR_ID_EXAR ? 0xff : 0x00;
|
|
||||||
|
u8 dir = 0x00;
|
||||||
|
|
||||||
|
if ((pcidev->vendor == PCI_VENDOR_ID_EXAR) &&
|
||||||
|
(pcidev->subsystem_vendor != PCI_VENDOR_ID_SEALEVEL)) {
|
||||||
|
// Configure GPIO as inputs for Commtech adapters
|
||||||
|
dir = 0xff;
|
||||||
|
} else {
|
||||||
|
// Configure GPIO as outputs for SeaLevel adapters
|
||||||
|
dir = 0x00;
|
||||||
|
}
|
||||||
|
|
||||||
writeb(0x00, p + UART_EXAR_MPIOINT_7_0);
|
writeb(0x00, p + UART_EXAR_MPIOINT_7_0);
|
||||||
writeb(0x00, p + UART_EXAR_MPIOLVL_7_0);
|
writeb(0x00, p + UART_EXAR_MPIOLVL_7_0);
|
||||||
|
|||||||
@@ -45,8 +45,21 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios,
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned int baud, quot;
|
unsigned int baud, quot;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Store the requested baud rate before calling the generic 8250
|
||||||
|
* set_termios method. Standard 8250 port expects bauds to be
|
||||||
|
* no higher than (uartclk / 16) so the baud will be clamped if it
|
||||||
|
* gets out of that bound. Mediatek 8250 port supports speed
|
||||||
|
* higher than that, therefore we'll get original baud rate back
|
||||||
|
* after calling the generic set_termios method and recalculate
|
||||||
|
* the speed later in this method.
|
||||||
|
*/
|
||||||
|
baud = tty_termios_baud_rate(termios);
|
||||||
|
|
||||||
serial8250_do_set_termios(port, termios, old);
|
serial8250_do_set_termios(port, termios, old);
|
||||||
|
|
||||||
|
tty_termios_encode_baud_rate(termios, baud, baud);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mediatek UARTs use an extra highspeed register (UART_MTK_HIGHS)
|
* Mediatek UARTs use an extra highspeed register (UART_MTK_HIGHS)
|
||||||
*
|
*
|
||||||
@@ -85,6 +98,11 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios,
|
|||||||
*/
|
*/
|
||||||
spin_lock_irqsave(&port->lock, flags);
|
spin_lock_irqsave(&port->lock, flags);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Update the per-port timeout.
|
||||||
|
*/
|
||||||
|
uart_update_timeout(port, termios->c_cflag, baud);
|
||||||
|
|
||||||
/* set DLAB we have cval saved in up->lcr from the call to the core */
|
/* set DLAB we have cval saved in up->lcr from the call to the core */
|
||||||
serial_port_out(port, UART_LCR, up->lcr | UART_LCR_DLAB);
|
serial_port_out(port, UART_LCR, up->lcr | UART_LCR_DLAB);
|
||||||
serial_dl_write(up, quot);
|
serial_dl_write(up, quot);
|
||||||
|
|||||||
@@ -762,10 +762,19 @@ static const struct tty_port_operations vc_port_ops = {
|
|||||||
.destruct = vc_port_destruct,
|
.destruct = vc_port_destruct,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Change # of rows and columns (0 means unchanged/the size of fg_console)
|
||||||
|
* [this is to be used together with some user program
|
||||||
|
* like resize that changes the hardware videomode]
|
||||||
|
*/
|
||||||
|
#define VC_MAXCOL (32767)
|
||||||
|
#define VC_MAXROW (32767)
|
||||||
|
|
||||||
int vc_allocate(unsigned int currcons) /* return 0 on success */
|
int vc_allocate(unsigned int currcons) /* return 0 on success */
|
||||||
{
|
{
|
||||||
struct vt_notifier_param param;
|
struct vt_notifier_param param;
|
||||||
struct vc_data *vc;
|
struct vc_data *vc;
|
||||||
|
int err;
|
||||||
|
|
||||||
WARN_CONSOLE_UNLOCKED();
|
WARN_CONSOLE_UNLOCKED();
|
||||||
|
|
||||||
@@ -795,6 +804,11 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */
|
|||||||
if (!*vc->vc_uni_pagedir_loc)
|
if (!*vc->vc_uni_pagedir_loc)
|
||||||
con_set_default_unimap(vc);
|
con_set_default_unimap(vc);
|
||||||
|
|
||||||
|
err = -EINVAL;
|
||||||
|
if (vc->vc_cols > VC_MAXCOL || vc->vc_rows > VC_MAXROW ||
|
||||||
|
vc->vc_screenbuf_size > KMALLOC_MAX_SIZE || !vc->vc_screenbuf_size)
|
||||||
|
goto err_free;
|
||||||
|
err = -ENOMEM;
|
||||||
vc->vc_screenbuf = kzalloc(vc->vc_screenbuf_size, GFP_KERNEL);
|
vc->vc_screenbuf = kzalloc(vc->vc_screenbuf_size, GFP_KERNEL);
|
||||||
if (!vc->vc_screenbuf)
|
if (!vc->vc_screenbuf)
|
||||||
goto err_free;
|
goto err_free;
|
||||||
@@ -812,7 +826,7 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */
|
|||||||
err_free:
|
err_free:
|
||||||
kfree(vc);
|
kfree(vc);
|
||||||
vc_cons[currcons].d = NULL;
|
vc_cons[currcons].d = NULL;
|
||||||
return -ENOMEM;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int resize_screen(struct vc_data *vc, int width, int height,
|
static inline int resize_screen(struct vc_data *vc, int width, int height,
|
||||||
@@ -827,14 +841,6 @@ static inline int resize_screen(struct vc_data *vc, int width, int height,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Change # of rows and columns (0 means unchanged/the size of fg_console)
|
|
||||||
* [this is to be used together with some user program
|
|
||||||
* like resize that changes the hardware videomode]
|
|
||||||
*/
|
|
||||||
#define VC_RESIZE_MAXCOL (32767)
|
|
||||||
#define VC_RESIZE_MAXROW (32767)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vc_do_resize - resizing method for the tty
|
* vc_do_resize - resizing method for the tty
|
||||||
* @tty: tty being resized
|
* @tty: tty being resized
|
||||||
@@ -869,7 +875,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
|
|||||||
user = vc->vc_resize_user;
|
user = vc->vc_resize_user;
|
||||||
vc->vc_resize_user = 0;
|
vc->vc_resize_user = 0;
|
||||||
|
|
||||||
if (cols > VC_RESIZE_MAXCOL || lines > VC_RESIZE_MAXROW)
|
if (cols > VC_MAXCOL || lines > VC_MAXROW)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
new_cols = (cols ? cols : vc->vc_cols);
|
new_cols = (cols ? cols : vc->vc_cols);
|
||||||
@@ -880,7 +886,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
|
|||||||
if (new_cols == vc->vc_cols && new_rows == vc->vc_rows)
|
if (new_cols == vc->vc_cols && new_rows == vc->vc_rows)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (new_screen_size > KMALLOC_MAX_SIZE)
|
if (new_screen_size > KMALLOC_MAX_SIZE || !new_screen_size)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
newscreen = kzalloc(new_screen_size, GFP_USER);
|
newscreen = kzalloc(new_screen_size, GFP_USER);
|
||||||
if (!newscreen)
|
if (!newscreen)
|
||||||
@@ -3031,6 +3037,7 @@ static int __init con_init(void)
|
|||||||
INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
|
INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
|
||||||
tty_port_init(&vc->port);
|
tty_port_init(&vc->port);
|
||||||
visual_init(vc, currcons, 1);
|
visual_init(vc, currcons, 1);
|
||||||
|
/* Assuming vc->vc_{cols,rows,screenbuf_size} are sane here. */
|
||||||
vc->vc_screenbuf = kzalloc(vc->vc_screenbuf_size, GFP_NOWAIT);
|
vc->vc_screenbuf = kzalloc(vc->vc_screenbuf_size, GFP_NOWAIT);
|
||||||
vc_init(vc, vc->vc_rows, vc->vc_cols,
|
vc_init(vc, vc->vc_rows, vc->vc_cols,
|
||||||
currcons || !vc->vc_sw->con_save_screen);
|
currcons || !vc->vc_sw->con_save_screen);
|
||||||
|
|||||||
@@ -2000,9 +2000,12 @@ static int gr_ep_init(struct gr_udc *dev, int num, int is_in, u32 maxplimit)
|
|||||||
|
|
||||||
if (num == 0) {
|
if (num == 0) {
|
||||||
_req = gr_alloc_request(&ep->ep, GFP_ATOMIC);
|
_req = gr_alloc_request(&ep->ep, GFP_ATOMIC);
|
||||||
|
if (!_req)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
buf = devm_kzalloc(dev->dev, PAGE_SIZE, GFP_DMA | GFP_ATOMIC);
|
buf = devm_kzalloc(dev->dev, PAGE_SIZE, GFP_DMA | GFP_ATOMIC);
|
||||||
if (!_req || !buf) {
|
if (!buf) {
|
||||||
/* possible _req freed by gr_probe via gr_remove */
|
gr_free_request(&ep->ep, _req);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -284,6 +284,10 @@ static bool need_bw_sch(struct usb_host_endpoint *ep,
|
|||||||
if (is_fs_or_ls(speed) && !has_tt)
|
if (is_fs_or_ls(speed) && !has_tt)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
/* skip endpoint with zero maxpkt */
|
||||||
|
if (usb_endpoint_maxp(&ep->desc) == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -235,6 +235,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
|||||||
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
||||||
pdev->device == 0x1142)
|
pdev->device == 0x1142)
|
||||||
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
|
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
|
||||||
|
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
||||||
|
pdev->device == 0x2142)
|
||||||
|
xhci->quirks |= XHCI_NO_64BIT_SUPPORT;
|
||||||
|
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
||||||
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
|
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
|
|||||||
region.color = color;
|
region.color = color;
|
||||||
region.rop = ROP_COPY;
|
region.rop = ROP_COPY;
|
||||||
|
|
||||||
if (rw && !bottom_only) {
|
if ((int) rw > 0 && !bottom_only) {
|
||||||
region.dx = info->var.xoffset + rs;
|
region.dx = info->var.xoffset + rs;
|
||||||
region.dy = 0;
|
region.dy = 0;
|
||||||
region.width = rw;
|
region.width = rw;
|
||||||
@@ -224,7 +224,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
|
|||||||
info->fbops->fb_fillrect(info, ®ion);
|
info->fbops->fb_fillrect(info, ®ion);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bh) {
|
if ((int) bh > 0) {
|
||||||
region.dx = info->var.xoffset;
|
region.dx = info->var.xoffset;
|
||||||
region.dy = info->var.yoffset + bs;
|
region.dy = info->var.yoffset + bs;
|
||||||
region.width = rs;
|
region.width = rs;
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
|
|||||||
region.color = color;
|
region.color = color;
|
||||||
region.rop = ROP_COPY;
|
region.rop = ROP_COPY;
|
||||||
|
|
||||||
if (rw && !bottom_only) {
|
if ((int) rw > 0 && !bottom_only) {
|
||||||
region.dx = 0;
|
region.dx = 0;
|
||||||
region.dy = info->var.yoffset;
|
region.dy = info->var.yoffset;
|
||||||
region.height = rw;
|
region.height = rw;
|
||||||
@@ -209,7 +209,7 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
|
|||||||
info->fbops->fb_fillrect(info, ®ion);
|
info->fbops->fb_fillrect(info, ®ion);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bh) {
|
if ((int) bh > 0) {
|
||||||
region.dx = info->var.xoffset + bs;
|
region.dx = info->var.xoffset + bs;
|
||||||
region.dy = 0;
|
region.dy = 0;
|
||||||
region.height = info->var.yres_virtual;
|
region.height = info->var.yres_virtual;
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
|
|||||||
region.color = color;
|
region.color = color;
|
||||||
region.rop = ROP_COPY;
|
region.rop = ROP_COPY;
|
||||||
|
|
||||||
if (rw && !bottom_only) {
|
if ((int) rw > 0 && !bottom_only) {
|
||||||
region.dx = 0;
|
region.dx = 0;
|
||||||
region.dy = info->var.yoffset + rs;
|
region.dy = info->var.yoffset + rs;
|
||||||
region.height = rw;
|
region.height = rw;
|
||||||
@@ -192,7 +192,7 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
|
|||||||
info->fbops->fb_fillrect(info, ®ion);
|
info->fbops->fb_fillrect(info, ®ion);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bh) {
|
if ((int) bh > 0) {
|
||||||
region.dx = info->var.xoffset;
|
region.dx = info->var.xoffset;
|
||||||
region.dy = info->var.yoffset;
|
region.dy = info->var.yoffset;
|
||||||
region.height = info->var.yres;
|
region.height = info->var.yres;
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
|
|||||||
region.color = color;
|
region.color = color;
|
||||||
region.rop = ROP_COPY;
|
region.rop = ROP_COPY;
|
||||||
|
|
||||||
if (rw && !bottom_only) {
|
if ((int) rw > 0 && !bottom_only) {
|
||||||
region.dy = 0;
|
region.dy = 0;
|
||||||
region.dx = info->var.xoffset;
|
region.dx = info->var.xoffset;
|
||||||
region.width = rw;
|
region.width = rw;
|
||||||
@@ -239,7 +239,7 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
|
|||||||
info->fbops->fb_fillrect(info, ®ion);
|
info->fbops->fb_fillrect(info, ®ion);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bh) {
|
if ((int) bh > 0) {
|
||||||
region.dy = info->var.yoffset;
|
region.dy = info->var.yoffset;
|
||||||
region.dx = info->var.xoffset;
|
region.dx = info->var.xoffset;
|
||||||
region.height = bh;
|
region.height = bh;
|
||||||
|
|||||||
@@ -1420,6 +1420,7 @@ static int btrfs_find_all_roots_safe(struct btrfs_trans_handle *trans,
|
|||||||
if (ret < 0 && ret != -ENOENT) {
|
if (ret < 0 && ret != -ENOENT) {
|
||||||
ulist_free(tmp);
|
ulist_free(tmp);
|
||||||
ulist_free(*roots);
|
ulist_free(*roots);
|
||||||
|
*roots = NULL;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
node = ulist_next(tmp, &uiter);
|
node = ulist_next(tmp, &uiter);
|
||||||
|
|||||||
@@ -1721,7 +1721,8 @@ static int __process_pages_contig(struct address_space *mapping,
|
|||||||
if (!PageDirty(pages[i]) ||
|
if (!PageDirty(pages[i]) ||
|
||||||
pages[i]->mapping != mapping) {
|
pages[i]->mapping != mapping) {
|
||||||
unlock_page(pages[i]);
|
unlock_page(pages[i]);
|
||||||
put_page(pages[i]);
|
for (; i < ret; i++)
|
||||||
|
put_page(pages[i]);
|
||||||
err = -EAGAIN;
|
err = -EAGAIN;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6901,6 +6901,14 @@ int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info)
|
|||||||
mutex_lock(&uuid_mutex);
|
mutex_lock(&uuid_mutex);
|
||||||
mutex_lock(&fs_info->chunk_mutex);
|
mutex_lock(&fs_info->chunk_mutex);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* It is possible for mount and umount to race in such a way that
|
||||||
|
* we execute this code path, but open_fs_devices failed to clear
|
||||||
|
* total_rw_bytes. We certainly want it cleared before reading the
|
||||||
|
* device items, so clear it here.
|
||||||
|
*/
|
||||||
|
fs_info->fs_devices->total_rw_bytes = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read all device items, and then all the chunk items. All
|
* Read all device items, and then all the chunk items. All
|
||||||
* device items are found before any chunk item (their object id
|
* device items are found before any chunk item (their object id
|
||||||
|
|||||||
@@ -1778,7 +1778,6 @@ cifs_rename2(struct inode *source_dir, struct dentry *source_dentry,
|
|||||||
FILE_UNIX_BASIC_INFO *info_buf_target;
|
FILE_UNIX_BASIC_INFO *info_buf_target;
|
||||||
unsigned int xid;
|
unsigned int xid;
|
||||||
int rc, tmprc;
|
int rc, tmprc;
|
||||||
bool new_target = d_really_is_negative(target_dentry);
|
|
||||||
|
|
||||||
if (flags & ~RENAME_NOREPLACE)
|
if (flags & ~RENAME_NOREPLACE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -1855,13 +1854,8 @@ cifs_rename2(struct inode *source_dir, struct dentry *source_dentry,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
unlink_target:
|
unlink_target:
|
||||||
/*
|
/* Try unlinking the target dentry if it's not negative */
|
||||||
* If the target dentry was created during the rename, try
|
if (d_really_is_positive(target_dentry) && (rc == -EACCES || rc == -EEXIST)) {
|
||||||
* unlinking it if it's not negative
|
|
||||||
*/
|
|
||||||
if (new_target &&
|
|
||||||
d_really_is_positive(target_dentry) &&
|
|
||||||
(rc == -EACCES || rc == -EEXIST)) {
|
|
||||||
if (d_is_dir(target_dentry))
|
if (d_is_dir(target_dentry))
|
||||||
tmprc = cifs_rmdir(target_dir, target_dentry);
|
tmprc = cifs_rmdir(target_dir, target_dentry);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -396,6 +396,8 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq)
|
|||||||
{
|
{
|
||||||
struct inode *inode = dreq->inode;
|
struct inode *inode = dreq->inode;
|
||||||
|
|
||||||
|
inode_dio_end(inode);
|
||||||
|
|
||||||
if (dreq->iocb) {
|
if (dreq->iocb) {
|
||||||
long res = (long) dreq->error;
|
long res = (long) dreq->error;
|
||||||
if (dreq->count != 0) {
|
if (dreq->count != 0) {
|
||||||
@@ -407,10 +409,7 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq)
|
|||||||
|
|
||||||
complete(&dreq->completion);
|
complete(&dreq->completion);
|
||||||
|
|
||||||
igrab(inode);
|
|
||||||
nfs_direct_req_release(dreq);
|
nfs_direct_req_release(dreq);
|
||||||
inode_dio_end(inode);
|
|
||||||
iput(inode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nfs_direct_read_completion(struct nfs_pgio_header *hdr)
|
static void nfs_direct_read_completion(struct nfs_pgio_header *hdr)
|
||||||
@@ -540,10 +539,8 @@ static ssize_t nfs_direct_read_schedule_iovec(struct nfs_direct_req *dreq,
|
|||||||
* generic layer handle the completion.
|
* generic layer handle the completion.
|
||||||
*/
|
*/
|
||||||
if (requested_bytes == 0) {
|
if (requested_bytes == 0) {
|
||||||
igrab(inode);
|
|
||||||
nfs_direct_req_release(dreq);
|
|
||||||
inode_dio_end(inode);
|
inode_dio_end(inode);
|
||||||
iput(inode);
|
nfs_direct_req_release(dreq);
|
||||||
return result < 0 ? result : -EIO;
|
return result < 0 ? result : -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -960,10 +957,8 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
|
|||||||
* generic layer handle the completion.
|
* generic layer handle the completion.
|
||||||
*/
|
*/
|
||||||
if (requested_bytes == 0) {
|
if (requested_bytes == 0) {
|
||||||
igrab(inode);
|
|
||||||
nfs_direct_req_release(dreq);
|
|
||||||
inode_dio_end(inode);
|
inode_dio_end(inode);
|
||||||
iput(inode);
|
nfs_direct_req_release(dreq);
|
||||||
return result < 0 ? result : -EIO;
|
return result < 0 ? result : -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ nfs_file_release(struct inode *inode, struct file *filp)
|
|||||||
dprintk("NFS: release(%pD2)\n", filp);
|
dprintk("NFS: release(%pD2)\n", filp);
|
||||||
|
|
||||||
nfs_inc_stats(inode, NFSIOS_VFSRELEASE);
|
nfs_inc_stats(inode, NFSIOS_VFSRELEASE);
|
||||||
inode_dio_wait(inode);
|
|
||||||
nfs_file_clear_open_context(filp);
|
nfs_file_clear_open_context(filp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,9 +120,12 @@ io_mapping_init_wc(struct io_mapping *iomap,
|
|||||||
resource_size_t base,
|
resource_size_t base,
|
||||||
unsigned long size)
|
unsigned long size)
|
||||||
{
|
{
|
||||||
|
iomap->iomem = ioremap_wc(base, size);
|
||||||
|
if (!iomap->iomem)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
iomap->base = base;
|
iomap->base = base;
|
||||||
iomap->size = size;
|
iomap->size = size;
|
||||||
iomap->iomem = ioremap_wc(base, size);
|
|
||||||
#if defined(pgprot_noncached_wc) /* archs can't agree on a name ... */
|
#if defined(pgprot_noncached_wc) /* archs can't agree on a name ... */
|
||||||
iomap->prot = pgprot_noncached_wc(PAGE_KERNEL);
|
iomap->prot = pgprot_noncached_wc(PAGE_KERNEL);
|
||||||
#elif defined(pgprot_writecombine)
|
#elif defined(pgprot_writecombine)
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ struct pcmcia_device_id {
|
|||||||
#define INPUT_DEVICE_ID_LED_MAX 0x0f
|
#define INPUT_DEVICE_ID_LED_MAX 0x0f
|
||||||
#define INPUT_DEVICE_ID_SND_MAX 0x07
|
#define INPUT_DEVICE_ID_SND_MAX 0x07
|
||||||
#define INPUT_DEVICE_ID_FF_MAX 0x7f
|
#define INPUT_DEVICE_ID_FF_MAX 0x7f
|
||||||
#define INPUT_DEVICE_ID_SW_MAX 0x0f
|
#define INPUT_DEVICE_ID_SW_MAX 0x10
|
||||||
#define INPUT_DEVICE_ID_PROP_MAX 0x1f
|
#define INPUT_DEVICE_ID_PROP_MAX 0x1f
|
||||||
|
|
||||||
#define INPUT_DEVICE_ID_MATCH_BUS 1
|
#define INPUT_DEVICE_ID_MATCH_BUS 1
|
||||||
|
|||||||
@@ -793,7 +793,8 @@
|
|||||||
#define SW_LINEIN_INSERT 0x0d /* set = inserted */
|
#define SW_LINEIN_INSERT 0x0d /* set = inserted */
|
||||||
#define SW_MUTE_DEVICE 0x0e /* set = device disabled */
|
#define SW_MUTE_DEVICE 0x0e /* set = device disabled */
|
||||||
#define SW_PEN_INSERTED 0x0f /* set = pen inserted */
|
#define SW_PEN_INSERTED 0x0f /* set = pen inserted */
|
||||||
#define SW_MAX 0x0f
|
#define SW_MACHINE_COVER 0x10 /* set = cover closed */
|
||||||
|
#define SW_MAX 0x10
|
||||||
#define SW_CNT (SW_MAX+1)
|
#define SW_CNT (SW_MAX+1)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1893,7 +1893,7 @@ static void handle_swbp(struct pt_regs *regs)
|
|||||||
if (!uprobe) {
|
if (!uprobe) {
|
||||||
if (is_swbp > 0) {
|
if (is_swbp > 0) {
|
||||||
/* No matching uprobe; signal SIGTRAP. */
|
/* No matching uprobe; signal SIGTRAP. */
|
||||||
send_sig(SIGTRAP, current, 0);
|
force_sig(SIGTRAP, current);
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Either we raced with uprobe_unregister() or we can't
|
* Either we raced with uprobe_unregister() or we can't
|
||||||
|
|||||||
@@ -4883,7 +4883,6 @@ static void __mem_cgroup_clear_mc(void)
|
|||||||
if (!mem_cgroup_is_root(mc.to))
|
if (!mem_cgroup_is_root(mc.to))
|
||||||
page_counter_uncharge(&mc.to->memory, mc.moved_swap);
|
page_counter_uncharge(&mc.to->memory, mc.moved_swap);
|
||||||
|
|
||||||
mem_cgroup_id_get_many(mc.to, mc.moved_swap);
|
|
||||||
css_put_many(&mc.to->css, mc.moved_swap);
|
css_put_many(&mc.to->css, mc.moved_swap);
|
||||||
|
|
||||||
mc.moved_swap = 0;
|
mc.moved_swap = 0;
|
||||||
@@ -5074,7 +5073,8 @@ put: /* get_mctgt_type() gets the page */
|
|||||||
ent = target.ent;
|
ent = target.ent;
|
||||||
if (!mem_cgroup_move_swap_account(ent, mc.from, mc.to)) {
|
if (!mem_cgroup_move_swap_account(ent, mc.from, mc.to)) {
|
||||||
mc.precharge--;
|
mc.precharge--;
|
||||||
/* we fixup refcnts and charges later. */
|
mem_cgroup_id_get_many(mc.to, 1);
|
||||||
|
/* we fixup other refcnts and charges later. */
|
||||||
mc.moved_swap++;
|
mc.moved_swap++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -2120,6 +2120,7 @@ static int ieee80211_802_1x_port_control(struct ieee80211_rx_data *rx)
|
|||||||
|
|
||||||
static int ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
|
static int ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
|
||||||
{
|
{
|
||||||
|
struct ieee80211_hdr *hdr = (void *)rx->skb->data;
|
||||||
struct sk_buff *skb = rx->skb;
|
struct sk_buff *skb = rx->skb;
|
||||||
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
||||||
|
|
||||||
@@ -2130,6 +2131,31 @@ static int ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
|
|||||||
if (status->flag & RX_FLAG_DECRYPTED)
|
if (status->flag & RX_FLAG_DECRYPTED)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/* check mesh EAPOL frames first */
|
||||||
|
if (unlikely(rx->sta && ieee80211_vif_is_mesh(&rx->sdata->vif) &&
|
||||||
|
ieee80211_is_data(fc))) {
|
||||||
|
struct ieee80211s_hdr *mesh_hdr;
|
||||||
|
u16 hdr_len = ieee80211_hdrlen(fc);
|
||||||
|
u16 ethertype_offset;
|
||||||
|
__be16 ethertype;
|
||||||
|
|
||||||
|
if (!ether_addr_equal(hdr->addr1, rx->sdata->vif.addr))
|
||||||
|
goto drop_check;
|
||||||
|
|
||||||
|
/* make sure fixed part of mesh header is there, also checks skb len */
|
||||||
|
if (!pskb_may_pull(rx->skb, hdr_len + 6))
|
||||||
|
goto drop_check;
|
||||||
|
|
||||||
|
mesh_hdr = (struct ieee80211s_hdr *)(skb->data + hdr_len);
|
||||||
|
ethertype_offset = hdr_len + ieee80211_get_mesh_hdrlen(mesh_hdr) +
|
||||||
|
sizeof(rfc1042_header);
|
||||||
|
|
||||||
|
if (skb_copy_bits(rx->skb, ethertype_offset, ðertype, 2) == 0 &&
|
||||||
|
ethertype == rx->sdata->control_port_protocol)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
drop_check:
|
||||||
/* Drop unencrypted frames if key is set. */
|
/* Drop unencrypted frames if key is set. */
|
||||||
if (unlikely(!ieee80211_has_protected(fc) &&
|
if (unlikely(!ieee80211_has_protected(fc) &&
|
||||||
!ieee80211_is_any_nullfunc(fc) &&
|
!ieee80211_is_any_nullfunc(fc) &&
|
||||||
|
|||||||
@@ -1726,6 +1726,8 @@ static int sync_thread_backup(void *data)
|
|||||||
{
|
{
|
||||||
struct ip_vs_sync_thread_data *tinfo = data;
|
struct ip_vs_sync_thread_data *tinfo = data;
|
||||||
struct netns_ipvs *ipvs = tinfo->ipvs;
|
struct netns_ipvs *ipvs = tinfo->ipvs;
|
||||||
|
struct sock *sk = tinfo->sock->sk;
|
||||||
|
struct udp_sock *up = udp_sk(sk);
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
pr_info("sync thread started: state = BACKUP, mcast_ifn = %s, "
|
pr_info("sync thread started: state = BACKUP, mcast_ifn = %s, "
|
||||||
@@ -1733,12 +1735,14 @@ static int sync_thread_backup(void *data)
|
|||||||
ipvs->bcfg.mcast_ifn, ipvs->bcfg.syncid, tinfo->id);
|
ipvs->bcfg.mcast_ifn, ipvs->bcfg.syncid, tinfo->id);
|
||||||
|
|
||||||
while (!kthread_should_stop()) {
|
while (!kthread_should_stop()) {
|
||||||
wait_event_interruptible(*sk_sleep(tinfo->sock->sk),
|
wait_event_interruptible(*sk_sleep(sk),
|
||||||
!skb_queue_empty(&tinfo->sock->sk->sk_receive_queue)
|
!skb_queue_empty_lockless(&sk->sk_receive_queue) ||
|
||||||
|| kthread_should_stop());
|
!skb_queue_empty_lockless(&up->reader_queue) ||
|
||||||
|
kthread_should_stop());
|
||||||
|
|
||||||
/* do we have data now? */
|
/* do we have data now? */
|
||||||
while (!skb_queue_empty(&(tinfo->sock->sk->sk_receive_queue))) {
|
while (!skb_queue_empty_lockless(&sk->sk_receive_queue) ||
|
||||||
|
!skb_queue_empty_lockless(&up->reader_queue)) {
|
||||||
len = ip_vs_receive(tinfo->sock, tinfo->buf,
|
len = ip_vs_receive(tinfo->sock, tinfo->buf,
|
||||||
ipvs->bcfg.sync_maxlen);
|
ipvs->bcfg.sync_maxlen);
|
||||||
if (len <= 0) {
|
if (len <= 0) {
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ parse_symbol() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Strip out the base of the path
|
# Strip out the base of the path on each line
|
||||||
code=${code#$basepath/}
|
code=$(while read -r line; do echo "${line#$basepath/}"; done <<< "$code")
|
||||||
|
|
||||||
# In the case of inlines, move everything to same line
|
# In the case of inlines, move everything to same line
|
||||||
code=${code//$'\n'/' '}
|
code=${code//$'\n'/' '}
|
||||||
|
|||||||
@@ -634,7 +634,9 @@ int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len)
|
|||||||
{
|
{
|
||||||
int c = -1;
|
int c = -1;
|
||||||
|
|
||||||
if (snd_BUG_ON(!buffer || !buffer->buffer))
|
if (snd_BUG_ON(!buffer))
|
||||||
|
return 1;
|
||||||
|
if (!buffer->buffer)
|
||||||
return 1;
|
return 1;
|
||||||
if (len <= 0 || buffer->stop || buffer->error)
|
if (len <= 0 || buffer->stop || buffer->error)
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -760,7 +760,7 @@
|
|||||||
#define RT5670_PWR_VREF2_BIT 4
|
#define RT5670_PWR_VREF2_BIT 4
|
||||||
#define RT5670_PWR_FV2 (0x1 << 3)
|
#define RT5670_PWR_FV2 (0x1 << 3)
|
||||||
#define RT5670_PWR_FV2_BIT 3
|
#define RT5670_PWR_FV2_BIT 3
|
||||||
#define RT5670_LDO_SEL_MASK (0x3)
|
#define RT5670_LDO_SEL_MASK (0x7)
|
||||||
#define RT5670_LDO_SEL_SFT 0
|
#define RT5670_LDO_SEL_SFT 0
|
||||||
|
|
||||||
/* Power Management for Analog 2 (0x64) */
|
/* Power Management for Analog 2 (0x64) */
|
||||||
|
|||||||
Reference in New Issue
Block a user