mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 03:50:24 +09:00
Merge tag 'v4.9.241' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidg12-4.9.y
This is the 4.9.241 stable release Change-Id: I3b60fa5279b42cdc734aa4ceec1cf0e404a697f8
This commit is contained in:
@@ -897,12 +897,14 @@ icmp_ratelimit - INTEGER
|
||||
icmp_msgs_per_sec - INTEGER
|
||||
Limit maximal number of ICMP packets sent per second from this host.
|
||||
Only messages whose type matches icmp_ratemask (see below) are
|
||||
controlled by this limit.
|
||||
controlled by this limit. For security reasons, the precise count
|
||||
of messages per second is randomized.
|
||||
Default: 1000
|
||||
|
||||
icmp_msgs_burst - INTEGER
|
||||
icmp_msgs_per_sec controls number of ICMP packets sent per second,
|
||||
while icmp_msgs_burst controls the burst size of these packets.
|
||||
For security reasons, the precise burst size is randomized.
|
||||
Default: 50
|
||||
|
||||
icmp_ratemask - INTEGER
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 240
|
||||
SUBLEVEL = 241
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
||||
@@ -1252,20 +1252,28 @@ static void __init l2c310_of_parse(const struct device_node *np,
|
||||
|
||||
ret = of_property_read_u32(np, "prefetch-data", &val);
|
||||
if (ret == 0) {
|
||||
if (val)
|
||||
if (val) {
|
||||
prefetch |= L310_PREFETCH_CTRL_DATA_PREFETCH;
|
||||
else
|
||||
*aux_val |= L310_PREFETCH_CTRL_DATA_PREFETCH;
|
||||
} else {
|
||||
prefetch &= ~L310_PREFETCH_CTRL_DATA_PREFETCH;
|
||||
*aux_val &= ~L310_PREFETCH_CTRL_DATA_PREFETCH;
|
||||
}
|
||||
*aux_mask &= ~L310_PREFETCH_CTRL_DATA_PREFETCH;
|
||||
} else if (ret != -EINVAL) {
|
||||
pr_err("L2C-310 OF prefetch-data property value is missing\n");
|
||||
}
|
||||
|
||||
ret = of_property_read_u32(np, "prefetch-instr", &val);
|
||||
if (ret == 0) {
|
||||
if (val)
|
||||
if (val) {
|
||||
prefetch |= L310_PREFETCH_CTRL_INSTR_PREFETCH;
|
||||
else
|
||||
*aux_val |= L310_PREFETCH_CTRL_INSTR_PREFETCH;
|
||||
} else {
|
||||
prefetch &= ~L310_PREFETCH_CTRL_INSTR_PREFETCH;
|
||||
*aux_val &= ~L310_PREFETCH_CTRL_INSTR_PREFETCH;
|
||||
}
|
||||
*aux_mask &= ~L310_PREFETCH_CTRL_INSTR_PREFETCH;
|
||||
} else if (ret != -EINVAL) {
|
||||
pr_err("L2C-310 OF prefetch-instr property value is missing\n");
|
||||
}
|
||||
|
||||
@@ -715,7 +715,7 @@
|
||||
reg-names = "mdp_phys";
|
||||
|
||||
interrupt-parent = <&mdss>;
|
||||
interrupts = <0 0>;
|
||||
interrupts = <0>;
|
||||
|
||||
clocks = <&gcc GCC_MDSS_AHB_CLK>,
|
||||
<&gcc GCC_MDSS_AXI_CLK>,
|
||||
@@ -745,7 +745,7 @@
|
||||
reg-names = "dsi_ctrl";
|
||||
|
||||
interrupt-parent = <&mdss>;
|
||||
interrupts = <4 0>;
|
||||
interrupts = <4>;
|
||||
|
||||
assigned-clocks = <&gcc BYTE0_CLK_SRC>,
|
||||
<&gcc PCLK0_CLK_SRC>;
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
};
|
||||
|
||||
i2c0: i2c@ff020000 {
|
||||
compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10";
|
||||
compatible = "cdns,i2c-r1p14";
|
||||
status = "disabled";
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <0 17 4>;
|
||||
@@ -185,7 +185,7 @@
|
||||
};
|
||||
|
||||
i2c1: i2c@ff030000 {
|
||||
compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10";
|
||||
compatible = "cdns,i2c-r1p14";
|
||||
status = "disabled";
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <0 18 4>;
|
||||
|
||||
@@ -683,7 +683,7 @@
|
||||
#define THRM1_TIN (1 << 31)
|
||||
#define THRM1_TIV (1 << 30)
|
||||
#define THRM1_THRES(x) ((x&0x7f)<<23)
|
||||
#define THRM3_SITV(x) ((x&0x3fff)<<1)
|
||||
#define THRM3_SITV(x) ((x & 0x1fff) << 1)
|
||||
#define THRM1_TID (1<<2)
|
||||
#define THRM1_TIE (1<<1)
|
||||
#define THRM1_V (1<<0)
|
||||
|
||||
@@ -37,8 +37,6 @@ static struct tau_temp
|
||||
|
||||
struct timer_list tau_timer;
|
||||
|
||||
#undef DEBUG
|
||||
|
||||
/* TODO: put these in a /proc interface, with some sanity checks, and maybe
|
||||
* dynamic adjustment to minimize # of interrupts */
|
||||
/* configurable values for step size and how much to expand the window when
|
||||
@@ -71,47 +69,33 @@ void set_thresholds(unsigned long cpu)
|
||||
|
||||
void TAUupdate(int cpu)
|
||||
{
|
||||
unsigned thrm;
|
||||
|
||||
#ifdef DEBUG
|
||||
printk("TAUupdate ");
|
||||
#endif
|
||||
u32 thrm;
|
||||
u32 bits = THRM1_TIV | THRM1_TIN | THRM1_V;
|
||||
|
||||
/* if both thresholds are crossed, the step_sizes cancel out
|
||||
* and the window winds up getting expanded twice. */
|
||||
if((thrm = mfspr(SPRN_THRM1)) & THRM1_TIV){ /* is valid? */
|
||||
if(thrm & THRM1_TIN){ /* crossed low threshold */
|
||||
if (tau[cpu].low >= step_size){
|
||||
tau[cpu].low -= step_size;
|
||||
tau[cpu].high -= (step_size - window_expand);
|
||||
}
|
||||
tau[cpu].grew = 1;
|
||||
#ifdef DEBUG
|
||||
printk("low threshold crossed ");
|
||||
#endif
|
||||
thrm = mfspr(SPRN_THRM1);
|
||||
if ((thrm & bits) == bits) {
|
||||
mtspr(SPRN_THRM1, 0);
|
||||
|
||||
if (tau[cpu].low >= step_size) {
|
||||
tau[cpu].low -= step_size;
|
||||
tau[cpu].high -= (step_size - window_expand);
|
||||
}
|
||||
tau[cpu].grew = 1;
|
||||
pr_debug("%s: low threshold crossed\n", __func__);
|
||||
}
|
||||
if((thrm = mfspr(SPRN_THRM2)) & THRM1_TIV){ /* is valid? */
|
||||
if(thrm & THRM1_TIN){ /* crossed high threshold */
|
||||
if (tau[cpu].high <= 127-step_size){
|
||||
tau[cpu].low += (step_size - window_expand);
|
||||
tau[cpu].high += step_size;
|
||||
}
|
||||
tau[cpu].grew = 1;
|
||||
#ifdef DEBUG
|
||||
printk("high threshold crossed ");
|
||||
#endif
|
||||
thrm = mfspr(SPRN_THRM2);
|
||||
if ((thrm & bits) == bits) {
|
||||
mtspr(SPRN_THRM2, 0);
|
||||
|
||||
if (tau[cpu].high <= 127 - step_size) {
|
||||
tau[cpu].low += (step_size - window_expand);
|
||||
tau[cpu].high += step_size;
|
||||
}
|
||||
tau[cpu].grew = 1;
|
||||
pr_debug("%s: high threshold crossed\n", __func__);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printk("grew = %d\n", tau[cpu].grew);
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_TAU_INT /* tau_timeout will do this if not using interrupts */
|
||||
set_thresholds(cpu);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TAU_INT
|
||||
@@ -136,18 +120,18 @@ void TAUException(struct pt_regs * regs)
|
||||
static void tau_timeout(void * info)
|
||||
{
|
||||
int cpu;
|
||||
unsigned long flags;
|
||||
int size;
|
||||
int shrink;
|
||||
|
||||
/* disabling interrupts *should* be okay */
|
||||
local_irq_save(flags);
|
||||
cpu = smp_processor_id();
|
||||
|
||||
#ifndef CONFIG_TAU_INT
|
||||
TAUupdate(cpu);
|
||||
#endif
|
||||
|
||||
/* Stop thermal sensor comparisons and interrupts */
|
||||
mtspr(SPRN_THRM3, 0);
|
||||
|
||||
size = tau[cpu].high - tau[cpu].low;
|
||||
if (size > min_window && ! tau[cpu].grew) {
|
||||
/* do an exponential shrink of half the amount currently over size */
|
||||
@@ -169,22 +153,12 @@ static void tau_timeout(void * info)
|
||||
|
||||
set_thresholds(cpu);
|
||||
|
||||
/*
|
||||
* Do the enable every time, since otherwise a bunch of (relatively)
|
||||
* complex sleep code needs to be added. One mtspr every time
|
||||
* tau_timeout is called is probably not a big deal.
|
||||
*
|
||||
* Enable thermal sensor and set up sample interval timer
|
||||
* need 20 us to do the compare.. until a nice 'cpu_speed' function
|
||||
* call is implemented, just assume a 500 mhz clock. It doesn't really
|
||||
* matter if we take too long for a compare since it's all interrupt
|
||||
* driven anyway.
|
||||
*
|
||||
* use a extra long time.. (60 us @ 500 mhz)
|
||||
/* Restart thermal sensor comparisons and interrupts.
|
||||
* The "PowerPC 740 and PowerPC 750 Microprocessor Datasheet"
|
||||
* recommends that "the maximum value be set in THRM3 under all
|
||||
* conditions."
|
||||
*/
|
||||
mtspr(SPRN_THRM3, THRM3_SITV(500*60) | THRM3_E);
|
||||
|
||||
local_irq_restore(flags);
|
||||
mtspr(SPRN_THRM3, THRM3_SITV(0x1fff) | THRM3_E);
|
||||
}
|
||||
|
||||
static void tau_timeout_smp(unsigned long unused)
|
||||
|
||||
@@ -94,7 +94,7 @@ REQUEST(__field(0, 8, partition_id)
|
||||
|
||||
#define REQUEST_NAME system_performance_capabilities
|
||||
#define REQUEST_NUM 0x40
|
||||
#define REQUEST_IDX_KIND "starting_index=0xffffffffffffffff"
|
||||
#define REQUEST_IDX_KIND "starting_index=0xffffffff"
|
||||
#include I(REQUEST_BEGIN)
|
||||
REQUEST(__field(0, 1, perf_collect_privileged)
|
||||
__field(0x1, 1, capability_mask)
|
||||
@@ -222,7 +222,7 @@ REQUEST(__field(0, 2, partition_id)
|
||||
|
||||
#define REQUEST_NAME system_hypervisor_times
|
||||
#define REQUEST_NUM 0xF0
|
||||
#define REQUEST_IDX_KIND "starting_index=0xffffffffffffffff"
|
||||
#define REQUEST_IDX_KIND "starting_index=0xffffffff"
|
||||
#include I(REQUEST_BEGIN)
|
||||
REQUEST(__count(0, 8, time_spent_to_dispatch_virtual_processors)
|
||||
__count(0x8, 8, time_spent_processing_virtual_processor_timers)
|
||||
@@ -233,7 +233,7 @@ REQUEST(__count(0, 8, time_spent_to_dispatch_virtual_processors)
|
||||
|
||||
#define REQUEST_NAME system_tlbie_count_and_time
|
||||
#define REQUEST_NUM 0xF4
|
||||
#define REQUEST_IDX_KIND "starting_index=0xffffffffffffffff"
|
||||
#define REQUEST_IDX_KIND "starting_index=0xffffffff"
|
||||
#include I(REQUEST_BEGIN)
|
||||
REQUEST(__count(0, 8, tlbie_instructions_issued)
|
||||
/*
|
||||
|
||||
@@ -51,6 +51,15 @@ int isa207_get_constraint(u64 event, unsigned long *maskp, unsigned long *valp)
|
||||
|
||||
mask |= CNST_PMC_MASK(pmc);
|
||||
value |= CNST_PMC_VAL(pmc);
|
||||
|
||||
/*
|
||||
* PMC5 and PMC6 are used to count cycles and instructions and
|
||||
* they do not support most of the constraint bits. Add a check
|
||||
* to exclude PMC5/6 from most of the constraints except for
|
||||
* EBB/BHRB.
|
||||
*/
|
||||
if (pmc >= 5)
|
||||
goto ebb_bhrb;
|
||||
}
|
||||
|
||||
if (pmc <= 4) {
|
||||
@@ -111,6 +120,7 @@ int isa207_get_constraint(u64 event, unsigned long *maskp, unsigned long *valp)
|
||||
value |= CNST_THRESH_VAL(event >> EVENT_THRESH_SHIFT);
|
||||
}
|
||||
|
||||
ebb_bhrb:
|
||||
if (!pmc && ebb)
|
||||
/* EBB events must specify the PMC */
|
||||
return -1;
|
||||
|
||||
@@ -242,7 +242,7 @@ config TAU
|
||||
temp is actually what /proc/cpuinfo says it is.
|
||||
|
||||
config TAU_INT
|
||||
bool "Interrupt driven TAU driver (DANGEROUS)"
|
||||
bool "Interrupt driven TAU driver (EXPERIMENTAL)"
|
||||
depends on TAU
|
||||
---help---
|
||||
The TAU supports an interrupt driven mode which causes an interrupt
|
||||
@@ -250,12 +250,7 @@ config TAU_INT
|
||||
to get notified the temp has exceeded a range. With this option off,
|
||||
a timer is used to re-check the temperature periodically.
|
||||
|
||||
However, on some cpus it appears that the TAU interrupt hardware
|
||||
is buggy and can cause a situation which would lead unexplained hard
|
||||
lockups.
|
||||
|
||||
Unless you are extending the TAU driver, or enjoy kernel/hardware
|
||||
debugging, leave this option off.
|
||||
If in doubt, say N here.
|
||||
|
||||
config TAU_AVERAGE
|
||||
bool "Average high and low temp"
|
||||
|
||||
@@ -319,15 +319,14 @@ static ssize_t dump_attr_read(struct file *filep, struct kobject *kobj,
|
||||
return count;
|
||||
}
|
||||
|
||||
static struct dump_obj *create_dump_obj(uint32_t id, size_t size,
|
||||
uint32_t type)
|
||||
static void create_dump_obj(uint32_t id, size_t size, uint32_t type)
|
||||
{
|
||||
struct dump_obj *dump;
|
||||
int rc;
|
||||
|
||||
dump = kzalloc(sizeof(*dump), GFP_KERNEL);
|
||||
if (!dump)
|
||||
return NULL;
|
||||
return;
|
||||
|
||||
dump->kobj.kset = dump_kset;
|
||||
|
||||
@@ -347,21 +346,39 @@ static struct dump_obj *create_dump_obj(uint32_t id, size_t size,
|
||||
rc = kobject_add(&dump->kobj, NULL, "0x%x-0x%x", type, id);
|
||||
if (rc) {
|
||||
kobject_put(&dump->kobj);
|
||||
return NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* As soon as the sysfs file for this dump is created/activated there is
|
||||
* a chance the opal_errd daemon (or any userspace) might read and
|
||||
* acknowledge the dump before kobject_uevent() is called. If that
|
||||
* happens then there is a potential race between
|
||||
* dump_ack_store->kobject_put() and kobject_uevent() which leads to a
|
||||
* use-after-free of a kernfs object resulting in a kernel crash.
|
||||
*
|
||||
* To avoid that, we need to take a reference on behalf of the bin file,
|
||||
* so that our reference remains valid while we call kobject_uevent().
|
||||
* We then drop our reference before exiting the function, leaving the
|
||||
* bin file to drop the last reference (if it hasn't already).
|
||||
*/
|
||||
|
||||
/* Take a reference for the bin file */
|
||||
kobject_get(&dump->kobj);
|
||||
rc = sysfs_create_bin_file(&dump->kobj, &dump->dump_attr);
|
||||
if (rc) {
|
||||
if (rc == 0) {
|
||||
kobject_uevent(&dump->kobj, KOBJ_ADD);
|
||||
|
||||
pr_info("%s: New platform dump. ID = 0x%x Size %u\n",
|
||||
__func__, dump->id, dump->size);
|
||||
} else {
|
||||
/* Drop reference count taken for bin file */
|
||||
kobject_put(&dump->kobj);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pr_info("%s: New platform dump. ID = 0x%x Size %u\n",
|
||||
__func__, dump->id, dump->size);
|
||||
|
||||
kobject_uevent(&dump->kobj, KOBJ_ADD);
|
||||
|
||||
return dump;
|
||||
/* Drop our reference */
|
||||
kobject_put(&dump->kobj);
|
||||
return;
|
||||
}
|
||||
|
||||
static irqreturn_t process_dump(int irq, void *data)
|
||||
|
||||
@@ -40,6 +40,7 @@ static __init int rng_init(void)
|
||||
|
||||
ppc_md.get_random_seed = pseries_get_random_long;
|
||||
|
||||
of_node_put(dn);
|
||||
return 0;
|
||||
}
|
||||
machine_subsys_initcall(pseries, rng_init);
|
||||
|
||||
@@ -179,6 +179,7 @@ int icp_hv_init(void)
|
||||
|
||||
icp_ops = &icp_hv_ops;
|
||||
|
||||
of_node_put(np);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -3536,7 +3536,7 @@ static int em_rdpid(struct x86_emulate_ctxt *ctxt)
|
||||
u64 tsc_aux = 0;
|
||||
|
||||
if (ctxt->ops->get_msr(ctxt, MSR_TSC_AUX, &tsc_aux))
|
||||
return emulate_gp(ctxt, 0);
|
||||
return emulate_ud(ctxt);
|
||||
ctxt->dst.val = tsc_aux;
|
||||
return X86EMUL_CONTINUE;
|
||||
}
|
||||
|
||||
@@ -5321,6 +5321,7 @@ static void kvm_recover_nx_lpages(struct kvm *kvm)
|
||||
cond_resched_lock(&kvm->mmu_lock);
|
||||
}
|
||||
}
|
||||
kvm_mmu_commit_zap_page(kvm, &invalid_list);
|
||||
|
||||
spin_unlock(&kvm->mmu_lock);
|
||||
srcu_read_unlock(&kvm->srcu, rcu_idx);
|
||||
|
||||
@@ -455,7 +455,7 @@ static int aead_recvmsg_async(struct socket *sock, struct msghdr *msg,
|
||||
memcpy(areq->iv, ctx->iv, crypto_aead_ivsize(tfm));
|
||||
aead_request_set_tfm(req, tfm);
|
||||
aead_request_set_ad(req, ctx->aead_assoclen);
|
||||
aead_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
|
||||
aead_request_set_callback(req, CRYPTO_TFM_REQ_MAY_SLEEP,
|
||||
aead_async_cb, req);
|
||||
used -= ctx->aead_assoclen;
|
||||
|
||||
@@ -925,7 +925,7 @@ static int aead_accept_parent_nokey(void *private, struct sock *sk)
|
||||
ask->private = ctx;
|
||||
|
||||
aead_request_set_tfm(&ctx->aead_req, aead);
|
||||
aead_request_set_callback(&ctx->aead_req, CRYPTO_TFM_REQ_MAY_BACKLOG,
|
||||
aead_request_set_callback(&ctx->aead_req, CRYPTO_TFM_REQ_MAY_SLEEP,
|
||||
af_alg_complete, &ctx->completion);
|
||||
|
||||
sk->sk_destruct = aead_sock_destruct;
|
||||
|
||||
@@ -517,12 +517,17 @@ static int clk_sam9x5_main_set_parent(struct clk_hw *hw, u8 index)
|
||||
return -EINVAL;
|
||||
|
||||
regmap_read(regmap, AT91_CKGR_MOR, &tmp);
|
||||
tmp &= ~MOR_KEY_MASK;
|
||||
|
||||
if (index && !(tmp & AT91_PMC_MOSCSEL))
|
||||
regmap_write(regmap, AT91_CKGR_MOR, tmp | AT91_PMC_MOSCSEL);
|
||||
tmp = AT91_PMC_MOSCSEL;
|
||||
else if (!index && (tmp & AT91_PMC_MOSCSEL))
|
||||
regmap_write(regmap, AT91_CKGR_MOR, tmp & ~AT91_PMC_MOSCSEL);
|
||||
tmp = 0;
|
||||
else
|
||||
return 0;
|
||||
|
||||
regmap_update_bits(regmap, AT91_CKGR_MOR,
|
||||
AT91_PMC_MOSCSEL | MOR_KEY_MASK,
|
||||
tmp | AT91_PMC_KEY);
|
||||
|
||||
while (!clk_sam9x5_main_ready(regmap))
|
||||
cpu_relax();
|
||||
|
||||
@@ -1177,8 +1177,10 @@ static struct clk_hw *bcm2835_register_pll(struct bcm2835_cprman *cprman,
|
||||
pll->hw.init = &init;
|
||||
|
||||
ret = devm_clk_hw_register(cprman->dev, &pll->hw);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
kfree(pll);
|
||||
return NULL;
|
||||
}
|
||||
return &pll->hw;
|
||||
}
|
||||
|
||||
|
||||
@@ -784,12 +784,15 @@ static int powernv_cpufreq_reboot_notifier(struct notifier_block *nb,
|
||||
unsigned long action, void *unused)
|
||||
{
|
||||
int cpu;
|
||||
struct cpufreq_policy cpu_policy;
|
||||
struct cpufreq_policy *cpu_policy;
|
||||
|
||||
rebooting = true;
|
||||
for_each_online_cpu(cpu) {
|
||||
cpufreq_get_policy(&cpu_policy, cpu);
|
||||
powernv_cpufreq_target_index(&cpu_policy, get_nominal_index());
|
||||
cpu_policy = cpufreq_cpu_get(cpu);
|
||||
if (!cpu_policy)
|
||||
continue;
|
||||
powernv_cpufreq_target_index(cpu_policy, get_nominal_index());
|
||||
cpufreq_cpu_put(cpu_policy);
|
||||
}
|
||||
|
||||
return NOTIFY_DONE;
|
||||
|
||||
@@ -1195,7 +1195,7 @@ static int ccp_run_sha_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
goto e_ctx;
|
||||
goto e_data;
|
||||
}
|
||||
} else {
|
||||
/* Stash the context */
|
||||
|
||||
@@ -532,7 +532,7 @@ static void release_ixp_crypto(struct device *dev)
|
||||
|
||||
if (crypt_virt) {
|
||||
dma_free_coherent(dev,
|
||||
NPE_QLEN_TOTAL * sizeof( struct crypt_ctl),
|
||||
NPE_QLEN * sizeof(struct crypt_ctl),
|
||||
crypt_virt, crypt_phys);
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -454,6 +454,9 @@ static void omap_sham_write_ctrl_omap4(struct omap_sham_dev *dd, size_t length,
|
||||
struct omap_sham_reqctx *ctx = ahash_request_ctx(dd->req);
|
||||
u32 val, mask;
|
||||
|
||||
if (likely(ctx->digcnt))
|
||||
omap_sham_write(dd, SHA_REG_DIGCNT(dd), ctx->digcnt);
|
||||
|
||||
/*
|
||||
* Setting ALGO_CONST only for the first iteration and
|
||||
* CLOSE_HASH only for the last one. Note that flags mode bits
|
||||
|
||||
@@ -1073,16 +1073,15 @@ static int i5100_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
PCI_DEVICE_ID_INTEL_5100_19, 0);
|
||||
if (!einj) {
|
||||
ret = -ENODEV;
|
||||
goto bail_einj;
|
||||
goto bail_mc_free;
|
||||
}
|
||||
|
||||
rc = pci_enable_device(einj);
|
||||
if (rc < 0) {
|
||||
ret = rc;
|
||||
goto bail_disable_einj;
|
||||
goto bail_einj;
|
||||
}
|
||||
|
||||
|
||||
mci->pdev = &pdev->dev;
|
||||
|
||||
priv = mci->pvt_info;
|
||||
@@ -1149,14 +1148,14 @@ static int i5100_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
bail_scrub:
|
||||
priv->scrub_enable = 0;
|
||||
cancel_delayed_work_sync(&(priv->i5100_scrubbing));
|
||||
edac_mc_free(mci);
|
||||
|
||||
bail_disable_einj:
|
||||
pci_disable_device(einj);
|
||||
|
||||
bail_einj:
|
||||
pci_dev_put(einj);
|
||||
|
||||
bail_mc_free:
|
||||
edac_mc_free(mci);
|
||||
|
||||
bail_disable_ch1:
|
||||
pci_disable_device(ch1mm);
|
||||
|
||||
|
||||
@@ -2121,7 +2121,7 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev
|
||||
intel_dp->dpcd,
|
||||
sizeof(intel_dp->dpcd));
|
||||
cdv_intel_edp_panel_vdd_off(gma_encoder);
|
||||
if (ret == 0) {
|
||||
if (ret <= 0) {
|
||||
/* if this fails, presume the device is a ghost */
|
||||
DRM_INFO("failed to retrieve link info, disabling eDP\n");
|
||||
cdv_intel_dp_encoder_destroy(encoder);
|
||||
|
||||
@@ -113,8 +113,10 @@ static void virtio_gpu_get_capsets(struct virtio_gpu_device *vgdev,
|
||||
vgdev->capsets[i].id > 0, 5 * HZ);
|
||||
if (ret == 0) {
|
||||
DRM_ERROR("timed out waiting for cap set %d\n", i);
|
||||
spin_lock(&vgdev->display_info_lock);
|
||||
kfree(vgdev->capsets);
|
||||
vgdev->capsets = NULL;
|
||||
spin_unlock(&vgdev->display_info_lock);
|
||||
return;
|
||||
}
|
||||
DRM_INFO("cap set %d: id %d, max-version %d, max-size %d\n",
|
||||
|
||||
@@ -596,9 +596,13 @@ static void virtio_gpu_cmd_get_capset_info_cb(struct virtio_gpu_device *vgdev,
|
||||
int i = le32_to_cpu(cmd->capset_index);
|
||||
|
||||
spin_lock(&vgdev->display_info_lock);
|
||||
vgdev->capsets[i].id = le32_to_cpu(resp->capset_id);
|
||||
vgdev->capsets[i].max_version = le32_to_cpu(resp->capset_max_version);
|
||||
vgdev->capsets[i].max_size = le32_to_cpu(resp->capset_max_size);
|
||||
if (vgdev->capsets) {
|
||||
vgdev->capsets[i].id = le32_to_cpu(resp->capset_id);
|
||||
vgdev->capsets[i].max_version = le32_to_cpu(resp->capset_max_version);
|
||||
vgdev->capsets[i].max_size = le32_to_cpu(resp->capset_max_size);
|
||||
} else {
|
||||
DRM_ERROR("invalid capset memory.");
|
||||
}
|
||||
spin_unlock(&vgdev->display_info_lock);
|
||||
wake_up(&vgdev->resp_wq);
|
||||
}
|
||||
|
||||
@@ -297,31 +297,40 @@ static ssize_t kone_sysfs_write_settings(struct file *fp, struct kobject *kobj,
|
||||
struct kone_device *kone = hid_get_drvdata(dev_get_drvdata(dev));
|
||||
struct usb_device *usb_dev = interface_to_usbdev(to_usb_interface(dev));
|
||||
int retval = 0, difference, old_profile;
|
||||
struct kone_settings *settings = (struct kone_settings *)buf;
|
||||
|
||||
/* I need to get my data in one piece */
|
||||
if (off != 0 || count != sizeof(struct kone_settings))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&kone->kone_lock);
|
||||
difference = memcmp(buf, &kone->settings, sizeof(struct kone_settings));
|
||||
difference = memcmp(settings, &kone->settings,
|
||||
sizeof(struct kone_settings));
|
||||
if (difference) {
|
||||
retval = kone_set_settings(usb_dev,
|
||||
(struct kone_settings const *)buf);
|
||||
if (retval) {
|
||||
mutex_unlock(&kone->kone_lock);
|
||||
return retval;
|
||||
if (settings->startup_profile < 1 ||
|
||||
settings->startup_profile > 5) {
|
||||
retval = -EINVAL;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
retval = kone_set_settings(usb_dev, settings);
|
||||
if (retval)
|
||||
goto unlock;
|
||||
|
||||
old_profile = kone->settings.startup_profile;
|
||||
memcpy(&kone->settings, buf, sizeof(struct kone_settings));
|
||||
memcpy(&kone->settings, settings, sizeof(struct kone_settings));
|
||||
|
||||
kone_profile_activated(kone, kone->settings.startup_profile);
|
||||
|
||||
if (kone->settings.startup_profile != old_profile)
|
||||
kone_profile_report(kone, kone->settings.startup_profile);
|
||||
}
|
||||
unlock:
|
||||
mutex_unlock(&kone->kone_lock);
|
||||
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
return sizeof(struct kone_settings);
|
||||
}
|
||||
static BIN_ATTR(settings, 0660, kone_sysfs_read_settings,
|
||||
|
||||
@@ -231,7 +231,6 @@ int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
|
||||
ps_opcode = HNS_ROCE_WQE_OPCODE_SEND;
|
||||
break;
|
||||
case IB_WR_LOCAL_INV:
|
||||
break;
|
||||
case IB_WR_ATOMIC_CMP_AND_SWP:
|
||||
case IB_WR_ATOMIC_FETCH_AND_ADD:
|
||||
case IB_WR_LSO:
|
||||
|
||||
@@ -309,6 +309,9 @@ static void schedule_delayed(struct ib_device *ibdev, struct id_map_entry *id)
|
||||
if (!sriov->is_going_down) {
|
||||
id->scheduled_delete = 1;
|
||||
schedule_delayed_work(&id->timeout, CM_CLEANUP_CACHE_TIMEOUT);
|
||||
} else if (id->scheduled_delete) {
|
||||
/* Adjust timeout if already scheduled */
|
||||
mod_delayed_work(system_wq, &id->timeout, CM_CLEANUP_CACHE_TIMEOUT);
|
||||
}
|
||||
spin_unlock_irqrestore(&sriov->going_down_lock, flags);
|
||||
spin_unlock(&sriov->id_map_lock);
|
||||
|
||||
@@ -1276,6 +1276,18 @@ static void mlx4_ib_tunnel_comp_handler(struct ib_cq *cq, void *arg)
|
||||
spin_unlock_irqrestore(&dev->sriov.going_down_lock, flags);
|
||||
}
|
||||
|
||||
static void mlx4_ib_wire_comp_handler(struct ib_cq *cq, void *arg)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct mlx4_ib_demux_pv_ctx *ctx = cq->cq_context;
|
||||
struct mlx4_ib_dev *dev = to_mdev(ctx->ib_dev);
|
||||
|
||||
spin_lock_irqsave(&dev->sriov.going_down_lock, flags);
|
||||
if (!dev->sriov.is_going_down && ctx->state == DEMUX_PV_STATE_ACTIVE)
|
||||
queue_work(ctx->wi_wq, &ctx->work);
|
||||
spin_unlock_irqrestore(&dev->sriov.going_down_lock, flags);
|
||||
}
|
||||
|
||||
static int mlx4_ib_post_pv_qp_buf(struct mlx4_ib_demux_pv_ctx *ctx,
|
||||
struct mlx4_ib_demux_pv_qp *tun_qp,
|
||||
int index)
|
||||
@@ -1978,7 +1990,8 @@ static int create_pv_resources(struct ib_device *ibdev, int slave, int port,
|
||||
cq_size *= 2;
|
||||
|
||||
cq_attr.cqe = cq_size;
|
||||
ctx->cq = ib_create_cq(ctx->ib_dev, mlx4_ib_tunnel_comp_handler,
|
||||
ctx->cq = ib_create_cq(ctx->ib_dev,
|
||||
create_tun ? mlx4_ib_tunnel_comp_handler : mlx4_ib_wire_comp_handler,
|
||||
NULL, ctx, &cq_attr);
|
||||
if (IS_ERR(ctx->cq)) {
|
||||
ret = PTR_ERR(ctx->cq);
|
||||
@@ -2015,6 +2028,7 @@ static int create_pv_resources(struct ib_device *ibdev, int slave, int port,
|
||||
INIT_WORK(&ctx->work, mlx4_ib_sqp_comp_worker);
|
||||
|
||||
ctx->wq = to_mdev(ibdev)->sriov.demux[port - 1].wq;
|
||||
ctx->wi_wq = to_mdev(ibdev)->sriov.demux[port - 1].wi_wq;
|
||||
|
||||
ret = ib_req_notify_cq(ctx->cq, IB_CQ_NEXT_COMP);
|
||||
if (ret) {
|
||||
@@ -2158,7 +2172,7 @@ static int mlx4_ib_alloc_demux_ctx(struct mlx4_ib_dev *dev,
|
||||
goto err_mcg;
|
||||
}
|
||||
|
||||
snprintf(name, sizeof name, "mlx4_ibt%d", port);
|
||||
snprintf(name, sizeof(name), "mlx4_ibt%d", port);
|
||||
ctx->wq = alloc_ordered_workqueue(name, WQ_MEM_RECLAIM);
|
||||
if (!ctx->wq) {
|
||||
pr_err("Failed to create tunnelling WQ for port %d\n", port);
|
||||
@@ -2166,7 +2180,15 @@ static int mlx4_ib_alloc_demux_ctx(struct mlx4_ib_dev *dev,
|
||||
goto err_wq;
|
||||
}
|
||||
|
||||
snprintf(name, sizeof name, "mlx4_ibud%d", port);
|
||||
snprintf(name, sizeof(name), "mlx4_ibwi%d", port);
|
||||
ctx->wi_wq = alloc_ordered_workqueue(name, WQ_MEM_RECLAIM);
|
||||
if (!ctx->wi_wq) {
|
||||
pr_err("Failed to create wire WQ for port %d\n", port);
|
||||
ret = -ENOMEM;
|
||||
goto err_wiwq;
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "mlx4_ibud%d", port);
|
||||
ctx->ud_wq = alloc_ordered_workqueue(name, WQ_MEM_RECLAIM);
|
||||
if (!ctx->ud_wq) {
|
||||
pr_err("Failed to create up/down WQ for port %d\n", port);
|
||||
@@ -2177,6 +2199,10 @@ static int mlx4_ib_alloc_demux_ctx(struct mlx4_ib_dev *dev,
|
||||
return 0;
|
||||
|
||||
err_udwq:
|
||||
destroy_workqueue(ctx->wi_wq);
|
||||
ctx->wi_wq = NULL;
|
||||
|
||||
err_wiwq:
|
||||
destroy_workqueue(ctx->wq);
|
||||
ctx->wq = NULL;
|
||||
|
||||
@@ -2224,12 +2250,14 @@ static void mlx4_ib_free_demux_ctx(struct mlx4_ib_demux_ctx *ctx)
|
||||
ctx->tun[i]->state = DEMUX_PV_STATE_DOWNING;
|
||||
}
|
||||
flush_workqueue(ctx->wq);
|
||||
flush_workqueue(ctx->wi_wq);
|
||||
for (i = 0; i < dev->dev->caps.sqp_demux; i++) {
|
||||
destroy_pv_resources(dev, i, ctx->port, ctx->tun[i], 0);
|
||||
free_pv_object(dev, i, ctx->port);
|
||||
}
|
||||
kfree(ctx->tun);
|
||||
destroy_workqueue(ctx->ud_wq);
|
||||
destroy_workqueue(ctx->wi_wq);
|
||||
destroy_workqueue(ctx->wq);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -439,6 +439,7 @@ struct mlx4_ib_demux_pv_ctx {
|
||||
struct ib_pd *pd;
|
||||
struct work_struct work;
|
||||
struct workqueue_struct *wq;
|
||||
struct workqueue_struct *wi_wq;
|
||||
struct mlx4_ib_demux_pv_qp qp[2];
|
||||
};
|
||||
|
||||
@@ -446,6 +447,7 @@ struct mlx4_ib_demux_ctx {
|
||||
struct ib_device *ib_dev;
|
||||
int port;
|
||||
struct workqueue_struct *wq;
|
||||
struct workqueue_struct *wi_wq;
|
||||
struct workqueue_struct *ud_wq;
|
||||
spinlock_t ud_lock;
|
||||
atomic64_t subnet_prefix;
|
||||
|
||||
@@ -527,7 +527,7 @@ static int qedr_set_device_attr(struct qedr_dev *dev)
|
||||
qed_attr = dev->ops->rdma_query_device(dev->rdma_ctx);
|
||||
|
||||
/* Part 2 - check capabilities */
|
||||
page_size = ~dev->attr.page_size_caps + 1;
|
||||
page_size = ~qed_attr->page_size_caps + 1;
|
||||
if (page_size > PAGE_SIZE) {
|
||||
DP_ERR(dev,
|
||||
"Kernel PAGE_SIZE is %ld which is smaller than minimum page size (%d) required by qedr\n",
|
||||
|
||||
@@ -96,9 +96,7 @@ struct rvt_dev_info *rvt_alloc_device(size_t size, int nports)
|
||||
if (!rdi)
|
||||
return rdi;
|
||||
|
||||
rdi->ports = kcalloc(nports,
|
||||
sizeof(struct rvt_ibport **),
|
||||
GFP_KERNEL);
|
||||
rdi->ports = kcalloc(nports, sizeof(*rdi->ports), GFP_KERNEL);
|
||||
if (!rdi->ports)
|
||||
ib_dealloc_device(&rdi->ibdev);
|
||||
|
||||
|
||||
@@ -257,8 +257,8 @@ static int ep93xx_keypad_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
keypad->irq = platform_get_irq(pdev, 0);
|
||||
if (!keypad->irq) {
|
||||
err = -ENXIO;
|
||||
if (keypad->irq < 0) {
|
||||
err = keypad->irq;
|
||||
goto failed_free;
|
||||
}
|
||||
|
||||
|
||||
@@ -253,10 +253,8 @@ static int omap4_keypad_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (!irq) {
|
||||
dev_err(&pdev->dev, "no keyboard irq assigned\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
|
||||
keypad_data = kzalloc(sizeof(struct omap4_keypad), GFP_KERNEL);
|
||||
if (!keypad_data) {
|
||||
|
||||
@@ -63,7 +63,7 @@ struct twl4030_keypad {
|
||||
bool autorepeat;
|
||||
unsigned int n_rows;
|
||||
unsigned int n_cols;
|
||||
unsigned int irq;
|
||||
int irq;
|
||||
|
||||
struct device *dbg_dev;
|
||||
struct input_dev *input;
|
||||
@@ -389,10 +389,8 @@ static int twl4030_kp_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
kp->irq = platform_get_irq(pdev, 0);
|
||||
if (!kp->irq) {
|
||||
dev_err(&pdev->dev, "no keyboard irq assigned\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (kp->irq < 0)
|
||||
return kp->irq;
|
||||
|
||||
error = matrix_keypad_build_keymap(keymap_data, NULL,
|
||||
TWL4030_MAX_ROWS,
|
||||
|
||||
@@ -210,7 +210,6 @@ static int sun4i_ps2_probe(struct platform_device *pdev)
|
||||
struct sun4i_ps2data *drvdata;
|
||||
struct serio *serio;
|
||||
struct device *dev = &pdev->dev;
|
||||
unsigned int irq;
|
||||
int error;
|
||||
|
||||
drvdata = kzalloc(sizeof(struct sun4i_ps2data), GFP_KERNEL);
|
||||
@@ -263,14 +262,12 @@ static int sun4i_ps2_probe(struct platform_device *pdev)
|
||||
writel(0, drvdata->reg_base + PS2_REG_GCTL);
|
||||
|
||||
/* Get IRQ for the device */
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (!irq) {
|
||||
dev_err(dev, "no IRQ found\n");
|
||||
error = -ENXIO;
|
||||
drvdata->irq = platform_get_irq(pdev, 0);
|
||||
if (drvdata->irq < 0) {
|
||||
error = drvdata->irq;
|
||||
goto err_disable_clk;
|
||||
}
|
||||
|
||||
drvdata->irq = irq;
|
||||
drvdata->serio = serio;
|
||||
drvdata->dev = dev;
|
||||
|
||||
|
||||
@@ -490,20 +490,25 @@ static int __maybe_unused imx6ul_tsc_resume(struct device *dev)
|
||||
|
||||
mutex_lock(&input_dev->mutex);
|
||||
|
||||
if (input_dev->users) {
|
||||
retval = clk_prepare_enable(tsc->adc_clk);
|
||||
if (retval)
|
||||
goto out;
|
||||
if (!input_dev->users)
|
||||
goto out;
|
||||
|
||||
retval = clk_prepare_enable(tsc->tsc_clk);
|
||||
if (retval) {
|
||||
clk_disable_unprepare(tsc->adc_clk);
|
||||
goto out;
|
||||
}
|
||||
retval = clk_prepare_enable(tsc->adc_clk);
|
||||
if (retval)
|
||||
goto out;
|
||||
|
||||
retval = imx6ul_tsc_init(tsc);
|
||||
retval = clk_prepare_enable(tsc->tsc_clk);
|
||||
if (retval) {
|
||||
clk_disable_unprepare(tsc->adc_clk);
|
||||
goto out;
|
||||
}
|
||||
|
||||
retval = imx6ul_tsc_init(tsc);
|
||||
if (retval) {
|
||||
clk_disable_unprepare(tsc->tsc_clk);
|
||||
clk_disable_unprepare(tsc->adc_clk);
|
||||
goto out;
|
||||
}
|
||||
out:
|
||||
mutex_unlock(&input_dev->mutex);
|
||||
return retval;
|
||||
|
||||
@@ -271,8 +271,10 @@ static int node_probe(struct fw_unit *unit, const struct ieee1394_device_id *id)
|
||||
|
||||
name_len = fw_csr_string(unit->directory, CSR_MODEL,
|
||||
name, sizeof(name));
|
||||
if (name_len < 0)
|
||||
return name_len;
|
||||
if (name_len < 0) {
|
||||
err = name_len;
|
||||
goto fail_free;
|
||||
}
|
||||
for (i = ARRAY_SIZE(model_names); --i; )
|
||||
if (strlen(model_names[i]) <= name_len &&
|
||||
strncmp(name, model_names[i], name_len) == 0)
|
||||
|
||||
@@ -754,7 +754,8 @@ static int m5mols_sensor_power(struct m5mols_info *info, bool enable)
|
||||
|
||||
ret = regulator_bulk_enable(ARRAY_SIZE(supplies), supplies);
|
||||
if (ret) {
|
||||
info->set_power(&client->dev, 0);
|
||||
if (info->set_power)
|
||||
info->set_power(&client->dev, 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -1321,7 +1321,7 @@ static int tc358743_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
|
||||
static irqreturn_t tc358743_irq_handler(int irq, void *dev_id)
|
||||
{
|
||||
struct tc358743_state *state = dev_id;
|
||||
bool handled;
|
||||
bool handled = false;
|
||||
|
||||
tc358743_isr(&state->sd, 0, &handled);
|
||||
|
||||
|
||||
@@ -4059,11 +4059,13 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
|
||||
btv->id = dev->device;
|
||||
if (pci_enable_device(dev)) {
|
||||
pr_warn("%d: Can't enable device\n", btv->c.nr);
|
||||
return -EIO;
|
||||
result = -EIO;
|
||||
goto free_mem;
|
||||
}
|
||||
if (pci_set_dma_mask(dev, DMA_BIT_MASK(32))) {
|
||||
pr_warn("%d: No suitable DMA available\n", btv->c.nr);
|
||||
return -EIO;
|
||||
result = -EIO;
|
||||
goto free_mem;
|
||||
}
|
||||
if (!request_mem_region(pci_resource_start(dev,0),
|
||||
pci_resource_len(dev,0),
|
||||
@@ -4071,7 +4073,8 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
|
||||
pr_warn("%d: can't request iomem (0x%llx)\n",
|
||||
btv->c.nr,
|
||||
(unsigned long long)pci_resource_start(dev, 0));
|
||||
return -EBUSY;
|
||||
result = -EBUSY;
|
||||
goto free_mem;
|
||||
}
|
||||
pci_set_master(dev);
|
||||
pci_set_command(dev);
|
||||
@@ -4257,6 +4260,10 @@ fail0:
|
||||
release_mem_region(pci_resource_start(btv->c.pci,0),
|
||||
pci_resource_len(btv->c.pci,0));
|
||||
pci_disable_device(btv->c.pci);
|
||||
|
||||
free_mem:
|
||||
bttvs[btv->c.nr] = NULL;
|
||||
kfree(btv);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -697,7 +697,8 @@ int saa_dsp_writel(struct saa7134_dev *dev, int reg, u32 value)
|
||||
{
|
||||
int err;
|
||||
|
||||
audio_dbg(2, "dsp write reg 0x%x = 0x%06x\n", reg << 2, value);
|
||||
audio_dbg(2, "dsp write reg 0x%x = 0x%06x\n",
|
||||
(reg << 2) & 0xffffffff, value);
|
||||
err = saa_dsp_wait_bit(dev,SAA7135_DSP_RWSTATE_WRR);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
@@ -311,8 +311,10 @@ static int fimc_isp_subdev_s_power(struct v4l2_subdev *sd, int on)
|
||||
|
||||
if (on) {
|
||||
ret = pm_runtime_get_sync(&is->pdev->dev);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
pm_runtime_put(&is->pdev->dev);
|
||||
return ret;
|
||||
}
|
||||
set_bit(IS_ST_PWR_ON, &is->state);
|
||||
|
||||
ret = fimc_is_start_firmware(is);
|
||||
|
||||
@@ -480,7 +480,7 @@ static int fimc_lite_open(struct file *file)
|
||||
set_bit(ST_FLITE_IN_USE, &fimc->state);
|
||||
ret = pm_runtime_get_sync(&fimc->pdev->dev);
|
||||
if (ret < 0)
|
||||
goto unlock;
|
||||
goto err_pm;
|
||||
|
||||
ret = v4l2_fh_open(file);
|
||||
if (ret < 0)
|
||||
|
||||
@@ -477,8 +477,10 @@ static int fimc_md_register_sensor_entities(struct fimc_md *fmd)
|
||||
return -ENXIO;
|
||||
|
||||
ret = pm_runtime_get_sync(fmd->pmf);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
pm_runtime_put(fmd->pmf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
fmd->num_sensors = 0;
|
||||
|
||||
@@ -1255,11 +1257,9 @@ static int fimc_md_get_pinctrl(struct fimc_md *fmd)
|
||||
if (IS_ERR(pctl->state_default))
|
||||
return PTR_ERR(pctl->state_default);
|
||||
|
||||
/* PINCTRL_STATE_IDLE is optional */
|
||||
pctl->state_idle = pinctrl_lookup_state(pctl->pinctrl,
|
||||
PINCTRL_STATE_IDLE);
|
||||
if (IS_ERR(pctl->state_idle))
|
||||
return PTR_ERR(pctl->state_idle);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -513,8 +513,10 @@ static int s5pcsis_s_stream(struct v4l2_subdev *sd, int enable)
|
||||
if (enable) {
|
||||
s5pcsis_clear_counters(state);
|
||||
ret = pm_runtime_get_sync(&state->pdev->dev);
|
||||
if (ret && ret != 1)
|
||||
if (ret && ret != 1) {
|
||||
pm_runtime_put_noidle(&state->pdev->dev);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
mutex_lock(&state->lock);
|
||||
|
||||
@@ -2273,8 +2273,10 @@ static int isp_probe(struct platform_device *pdev)
|
||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, i);
|
||||
isp->mmio_base[map_idx] =
|
||||
devm_ioremap_resource(isp->dev, mem);
|
||||
if (IS_ERR(isp->mmio_base[map_idx]))
|
||||
return PTR_ERR(isp->mmio_base[map_idx]);
|
||||
if (IS_ERR(isp->mmio_base[map_idx])) {
|
||||
ret = PTR_ERR(isp->mmio_base[map_idx]);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
ret = isp_get_clocks(isp);
|
||||
|
||||
@@ -107,8 +107,10 @@ int rcar_fcp_enable(struct rcar_fcp_device *fcp)
|
||||
return 0;
|
||||
|
||||
ret = pm_runtime_get_sync(fcp->dev);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(fcp->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -476,7 +476,7 @@ static int s3c_camif_probe(struct platform_device *pdev)
|
||||
|
||||
ret = camif_media_dev_init(camif);
|
||||
if (ret < 0)
|
||||
goto err_alloc;
|
||||
goto err_pm;
|
||||
|
||||
ret = camif_register_sensor(camif);
|
||||
if (ret < 0)
|
||||
@@ -510,10 +510,9 @@ err_sens:
|
||||
media_device_unregister(&camif->media_dev);
|
||||
media_device_cleanup(&camif->media_dev);
|
||||
camif_unregister_media_entities(camif);
|
||||
err_alloc:
|
||||
err_pm:
|
||||
pm_runtime_put(dev);
|
||||
pm_runtime_disable(dev);
|
||||
err_pm:
|
||||
camif_clk_put(camif);
|
||||
err_clk:
|
||||
s3c_camif_unregister_subdev(camif);
|
||||
|
||||
@@ -1366,7 +1366,7 @@ static int bdisp_probe(struct platform_device *pdev)
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to set PM\n");
|
||||
goto err_dbg;
|
||||
goto err_pm;
|
||||
}
|
||||
|
||||
/* Filters */
|
||||
@@ -1394,7 +1394,6 @@ err_filter:
|
||||
bdisp_hw_free_filters(bdisp->dev);
|
||||
err_pm:
|
||||
pm_runtime_put(dev);
|
||||
err_dbg:
|
||||
bdisp_debugfs_remove(bdisp);
|
||||
err_v4l2:
|
||||
v4l2_device_unregister(&bdisp->v4l2_dev);
|
||||
|
||||
@@ -389,7 +389,7 @@ int hva_hw_probe(struct platform_device *pdev, struct hva_dev *hva)
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "%s failed to set PM\n", HVA_PREFIX);
|
||||
goto err_clk;
|
||||
goto err_pm;
|
||||
}
|
||||
|
||||
/* check IP hardware version */
|
||||
|
||||
@@ -2133,6 +2133,8 @@ static int vpe_runtime_get(struct platform_device *pdev)
|
||||
|
||||
r = pm_runtime_get_sync(&pdev->dev);
|
||||
WARN_ON(r < 0);
|
||||
if (r)
|
||||
pm_runtime_put_noidle(&pdev->dev);
|
||||
return r < 0 ? r : 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -487,7 +487,12 @@ int vsp1_device_get(struct vsp1_device *vsp1)
|
||||
int ret;
|
||||
|
||||
ret = pm_runtime_get_sync(vsp1->dev);
|
||||
return ret < 0 ? ret : 0;
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(vsp1->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -727,12 +732,12 @@ static int vsp1_probe(struct platform_device *pdev)
|
||||
/* Configure device parameters based on the version register. */
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
ret = vsp1_device_get(vsp1);
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
|
||||
vsp1->version = vsp1_read(vsp1, VI6_IP_VERSION);
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
vsp1_device_put(vsp1);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(vsp1_device_infos); ++i) {
|
||||
if ((vsp1->version & VI6_IP_VERSION_MODEL_MASK) ==
|
||||
|
||||
@@ -850,6 +850,10 @@ static int ati_remote_probe(struct usb_interface *interface,
|
||||
err("%s: endpoint_in message size==0? \n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
if (!usb_endpoint_is_int_out(endpoint_out)) {
|
||||
err("%s: Unexpected endpoint_out\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ati_remote = kzalloc(sizeof (struct ati_remote), GFP_KERNEL);
|
||||
rc_dev = rc_allocate_device();
|
||||
|
||||
@@ -257,11 +257,41 @@ static int uvc_v4l2_try_format(struct uvc_streaming *stream,
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
|
||||
/* After the probe, update fmt with the values returned from
|
||||
* negotiation with the device.
|
||||
*/
|
||||
for (i = 0; i < stream->nformats; ++i) {
|
||||
if (probe->bFormatIndex == stream->format[i].index) {
|
||||
format = &stream->format[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == stream->nformats) {
|
||||
uvc_trace(UVC_TRACE_FORMAT, "Unknown bFormatIndex %u\n",
|
||||
probe->bFormatIndex);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (i = 0; i < format->nframes; ++i) {
|
||||
if (probe->bFrameIndex == format->frame[i].bFrameIndex) {
|
||||
frame = &format->frame[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == format->nframes) {
|
||||
uvc_trace(UVC_TRACE_FORMAT, "Unknown bFrameIndex %u\n",
|
||||
probe->bFrameIndex);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
fmt->fmt.pix.width = frame->wWidth;
|
||||
fmt->fmt.pix.height = frame->wHeight;
|
||||
fmt->fmt.pix.field = V4L2_FIELD_NONE;
|
||||
fmt->fmt.pix.bytesperline = uvc_v4l2_get_bytesperline(format, frame);
|
||||
fmt->fmt.pix.sizeimage = probe->dwMaxVideoFrameSize;
|
||||
fmt->fmt.pix.pixelformat = format->fcc;
|
||||
fmt->fmt.pix.colorspace = format->colorspace;
|
||||
fmt->fmt.pix.priv = 0;
|
||||
|
||||
|
||||
@@ -215,10 +215,8 @@ static int ccf_probe(struct platform_device *pdev)
|
||||
dev_set_drvdata(&pdev->dev, ccf);
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (!irq) {
|
||||
dev_err(&pdev->dev, "%s: no irq\n", __func__);
|
||||
return -ENXIO;
|
||||
}
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
|
||||
ret = devm_request_irq(&pdev->dev, irq, ccf_irq, 0, pdev->name, ccf);
|
||||
if (ret) {
|
||||
|
||||
@@ -951,7 +951,7 @@ static int gpmc_cs_remap(int cs, u32 base)
|
||||
int ret;
|
||||
u32 old_base, size;
|
||||
|
||||
if (cs > gpmc_cs_num) {
|
||||
if (cs >= gpmc_cs_num) {
|
||||
pr_err("%s: requested chip-select is disabled\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
@@ -986,7 +986,7 @@ int gpmc_cs_request(int cs, unsigned long size, unsigned long *base)
|
||||
struct resource *res = &gpmc->mem;
|
||||
int r = -1;
|
||||
|
||||
if (cs > gpmc_cs_num) {
|
||||
if (cs >= gpmc_cs_num) {
|
||||
pr_err("%s: requested chip-select is disabled\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -1255,12 +1255,14 @@ static int rtsx_pci_probe(struct pci_dev *pcidev,
|
||||
ret = mfd_add_devices(&pcidev->dev, pcr->id, rtsx_pcr_cells,
|
||||
ARRAY_SIZE(rtsx_pcr_cells), NULL, 0, NULL);
|
||||
if (ret < 0)
|
||||
goto disable_irq;
|
||||
goto free_slots;
|
||||
|
||||
schedule_delayed_work(&pcr->idle_work, msecs_to_jiffies(200));
|
||||
|
||||
return 0;
|
||||
|
||||
free_slots:
|
||||
kfree(pcr->slots);
|
||||
disable_irq:
|
||||
free_irq(pcr->irq, (void *)pcr);
|
||||
disable_msi:
|
||||
|
||||
@@ -1425,8 +1425,14 @@ static int sm501_plat_probe(struct platform_device *dev)
|
||||
goto err_claim;
|
||||
}
|
||||
|
||||
return sm501_init_dev(sm);
|
||||
ret = sm501_init_dev(sm);
|
||||
if (ret)
|
||||
goto err_unmap;
|
||||
|
||||
return 0;
|
||||
|
||||
err_unmap:
|
||||
iounmap(sm->regs);
|
||||
err_claim:
|
||||
release_resource(sm->regs_claim);
|
||||
kfree(sm->regs_claim);
|
||||
|
||||
@@ -355,7 +355,7 @@ static int at25_probe(struct spi_device *spi)
|
||||
at25->nvmem_config.reg_read = at25_ee_read;
|
||||
at25->nvmem_config.reg_write = at25_ee_write;
|
||||
at25->nvmem_config.priv = at25;
|
||||
at25->nvmem_config.stride = 4;
|
||||
at25->nvmem_config.stride = 1;
|
||||
at25->nvmem_config.word_size = 1;
|
||||
at25->nvmem_config.size = chip.byte_len;
|
||||
|
||||
|
||||
@@ -1401,6 +1401,8 @@ retry:
|
||||
NULL);
|
||||
up_write(&mm->mmap_sem);
|
||||
if (nr_pages != pinned_pages->nr_pages) {
|
||||
if (pinned_pages->nr_pages < 0)
|
||||
pinned_pages->nr_pages = 0;
|
||||
if (try_upgrade) {
|
||||
if (ulimit)
|
||||
__scif_dec_pinned_vm_lock(mm,
|
||||
@@ -1421,7 +1423,6 @@ retry:
|
||||
|
||||
if (pinned_pages->nr_pages < nr_pages) {
|
||||
err = -EFAULT;
|
||||
pinned_pages->nr_pages = nr_pages;
|
||||
goto dec_pinned;
|
||||
}
|
||||
|
||||
@@ -1434,7 +1435,6 @@ dec_pinned:
|
||||
__scif_dec_pinned_vm_lock(mm, nr_pages, 0);
|
||||
/* Something went wrong! Rollback */
|
||||
error_unmap:
|
||||
pinned_pages->nr_pages = nr_pages;
|
||||
scif_destroy_pinned_pages(pinned_pages);
|
||||
*pages = NULL;
|
||||
dev_dbg(scif_info.mdev.this_device,
|
||||
|
||||
@@ -301,7 +301,7 @@ static struct virtqueue *vop_find_vq(struct virtio_device *dev,
|
||||
/* First assign the vring's allocated in host memory */
|
||||
vqconfig = _vop_vq_config(vdev->desc) + index;
|
||||
memcpy_fromio(&config, vqconfig, sizeof(config));
|
||||
_vr_size = vring_size(le16_to_cpu(config.num), MIC_VIRTIO_RING_ALIGN);
|
||||
_vr_size = round_up(vring_size(le16_to_cpu(config.num), MIC_VIRTIO_RING_ALIGN), 4);
|
||||
vr_size = PAGE_ALIGN(_vr_size + sizeof(struct _mic_vring_info));
|
||||
va = vpdev->hw_ops->ioremap(vpdev, le64_to_cpu(config.address),
|
||||
vr_size);
|
||||
|
||||
@@ -308,7 +308,7 @@ static int vop_virtio_add_device(struct vop_vdev *vdev,
|
||||
|
||||
num = le16_to_cpu(vqconfig[i].num);
|
||||
mutex_init(&vvr->vr_mutex);
|
||||
vr_size = PAGE_ALIGN(vring_size(num, MIC_VIRTIO_RING_ALIGN) +
|
||||
vr_size = PAGE_ALIGN(round_up(vring_size(num, MIC_VIRTIO_RING_ALIGN), 4) +
|
||||
sizeof(struct _mic_vring_info));
|
||||
vr->va = (void *)
|
||||
__get_free_pages(GFP_KERNEL | __GFP_ZERO,
|
||||
@@ -320,7 +320,7 @@ static int vop_virtio_add_device(struct vop_vdev *vdev,
|
||||
goto err;
|
||||
}
|
||||
vr->len = vr_size;
|
||||
vr->info = vr->va + vring_size(num, MIC_VIRTIO_RING_ALIGN);
|
||||
vr->info = vr->va + round_up(vring_size(num, MIC_VIRTIO_RING_ALIGN), 4);
|
||||
vr->info->magic = cpu_to_le32(MIC_MAGIC + vdev->virtio_id + i);
|
||||
vr_addr = dma_map_single(&vpdev->dev, vr->va, vr_size,
|
||||
DMA_BIDIRECTIONAL);
|
||||
@@ -611,6 +611,7 @@ static int vop_virtio_copy_from_user(struct vop_vdev *vdev, void __user *ubuf,
|
||||
size_t partlen;
|
||||
bool dma = VOP_USE_DMA;
|
||||
int err = 0;
|
||||
size_t offset = 0;
|
||||
|
||||
if (daddr & (dma_alignment - 1)) {
|
||||
vdev->tx_dst_unaligned += len;
|
||||
@@ -659,13 +660,20 @@ memcpy:
|
||||
* We are copying to IO below and should ideally use something
|
||||
* like copy_from_user_toio(..) if it existed.
|
||||
*/
|
||||
if (copy_from_user((void __force *)dbuf, ubuf, len)) {
|
||||
err = -EFAULT;
|
||||
dev_err(vop_dev(vdev), "%s %d err %d\n",
|
||||
__func__, __LINE__, err);
|
||||
goto err;
|
||||
while (len) {
|
||||
partlen = min_t(size_t, len, VOP_INT_DMA_BUF_SIZE);
|
||||
|
||||
if (copy_from_user(vvr->buf, ubuf + offset, partlen)) {
|
||||
err = -EFAULT;
|
||||
dev_err(vop_dev(vdev), "%s %d err %d\n",
|
||||
__func__, __LINE__, err);
|
||||
goto err;
|
||||
}
|
||||
memcpy_toio(dbuf + offset, vvr->buf, partlen);
|
||||
offset += partlen;
|
||||
vdev->out_bytes += partlen;
|
||||
len -= partlen;
|
||||
}
|
||||
vdev->out_bytes += len;
|
||||
err = 0;
|
||||
err:
|
||||
vpdev->hw_ops->iounmap(vpdev, dbuf);
|
||||
|
||||
@@ -758,8 +758,9 @@ static int qp_host_get_user_memory(u64 produce_uva,
|
||||
if (retval < (int)produce_q->kernel_if->num_pages) {
|
||||
pr_debug("get_user_pages_fast(produce) failed (retval=%d)",
|
||||
retval);
|
||||
qp_release_pages(produce_q->kernel_if->u.h.header_page,
|
||||
retval, false);
|
||||
if (retval > 0)
|
||||
qp_release_pages(produce_q->kernel_if->u.h.header_page,
|
||||
retval, false);
|
||||
err = VMCI_ERROR_NO_MEM;
|
||||
goto out;
|
||||
}
|
||||
@@ -770,8 +771,9 @@ static int qp_host_get_user_memory(u64 produce_uva,
|
||||
if (retval < (int)consume_q->kernel_if->num_pages) {
|
||||
pr_debug("get_user_pages_fast(consume) failed (retval=%d)",
|
||||
retval);
|
||||
qp_release_pages(consume_q->kernel_if->u.h.header_page,
|
||||
retval, false);
|
||||
if (retval > 0)
|
||||
qp_release_pages(consume_q->kernel_if->u.h.header_page,
|
||||
retval, false);
|
||||
qp_release_pages(produce_q->kernel_if->u.h.header_page,
|
||||
produce_q->kernel_if->num_pages, false);
|
||||
err = VMCI_ERROR_NO_MEM;
|
||||
|
||||
@@ -30,6 +30,9 @@ static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func,
|
||||
unsigned i, nr_strings;
|
||||
char **buffer, *string;
|
||||
|
||||
if (size < 2)
|
||||
return 0;
|
||||
|
||||
/* Find all null-terminated (including zero length) strings in
|
||||
the TPLLV1_INFO field. Trailing garbage is ignored. */
|
||||
buf += 2;
|
||||
|
||||
@@ -408,6 +408,17 @@ static int lpddr2_nvm_lock(struct mtd_info *mtd, loff_t start_add,
|
||||
return lpddr2_nvm_do_block_op(mtd, start_add, len, LPDDR2_NVM_LOCK);
|
||||
}
|
||||
|
||||
static const struct mtd_info lpddr2_nvm_mtd_info = {
|
||||
.type = MTD_RAM,
|
||||
.writesize = 1,
|
||||
.flags = (MTD_CAP_NVRAM | MTD_POWERUP_LOCK),
|
||||
._read = lpddr2_nvm_read,
|
||||
._write = lpddr2_nvm_write,
|
||||
._erase = lpddr2_nvm_erase,
|
||||
._unlock = lpddr2_nvm_unlock,
|
||||
._lock = lpddr2_nvm_lock,
|
||||
};
|
||||
|
||||
/*
|
||||
* lpddr2_nvm driver probe method
|
||||
*/
|
||||
@@ -448,6 +459,7 @@ static int lpddr2_nvm_probe(struct platform_device *pdev)
|
||||
.pfow_base = OW_BASE_ADDRESS,
|
||||
.fldrv_priv = pcm_data,
|
||||
};
|
||||
|
||||
if (IS_ERR(map->virt))
|
||||
return PTR_ERR(map->virt);
|
||||
|
||||
@@ -459,22 +471,13 @@ static int lpddr2_nvm_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(pcm_data->ctl_regs);
|
||||
|
||||
/* Populate mtd_info data structure */
|
||||
*mtd = (struct mtd_info) {
|
||||
.dev = { .parent = &pdev->dev },
|
||||
.name = pdev->dev.init_name,
|
||||
.type = MTD_RAM,
|
||||
.priv = map,
|
||||
.size = resource_size(add_range),
|
||||
.erasesize = ERASE_BLOCKSIZE * pcm_data->bus_width,
|
||||
.writesize = 1,
|
||||
.writebufsize = WRITE_BUFFSIZE * pcm_data->bus_width,
|
||||
.flags = (MTD_CAP_NVRAM | MTD_POWERUP_LOCK),
|
||||
._read = lpddr2_nvm_read,
|
||||
._write = lpddr2_nvm_write,
|
||||
._erase = lpddr2_nvm_erase,
|
||||
._unlock = lpddr2_nvm_unlock,
|
||||
._lock = lpddr2_nvm_lock,
|
||||
};
|
||||
*mtd = lpddr2_nvm_mtd_info;
|
||||
mtd->dev.parent = &pdev->dev;
|
||||
mtd->name = pdev->dev.init_name;
|
||||
mtd->priv = map;
|
||||
mtd->size = resource_size(add_range);
|
||||
mtd->erasesize = ERASE_BLOCKSIZE * pcm_data->bus_width;
|
||||
mtd->writebufsize = WRITE_BUFFSIZE * pcm_data->bus_width;
|
||||
|
||||
/* Verify the presence of the device looking for PFOW string */
|
||||
if (!lpddr2_nvm_pfow_present(map)) {
|
||||
|
||||
@@ -313,12 +313,13 @@ static void mtdoops_do_dump(struct kmsg_dumper *dumper,
|
||||
kmsg_dump_get_buffer(dumper, true, cxt->oops_buf + MTDOOPS_HEADER_SIZE,
|
||||
record_size - MTDOOPS_HEADER_SIZE, NULL);
|
||||
|
||||
/* Panics must be written immediately */
|
||||
if (reason != KMSG_DUMP_OOPS)
|
||||
if (reason != KMSG_DUMP_OOPS) {
|
||||
/* Panics must be written immediately */
|
||||
mtdoops_write(cxt, 1);
|
||||
|
||||
/* For other cases, schedule work to write it "nicely" */
|
||||
schedule_work(&cxt->work_write);
|
||||
} else {
|
||||
/* For other cases, schedule work to write it "nicely" */
|
||||
schedule_work(&cxt->work_write);
|
||||
}
|
||||
}
|
||||
|
||||
static void mtdoops_notify_add(struct mtd_info *mtd)
|
||||
|
||||
@@ -163,6 +163,7 @@ struct enic {
|
||||
u16 num_vfs;
|
||||
#endif
|
||||
spinlock_t enic_api_lock;
|
||||
bool enic_api_busy;
|
||||
struct enic_port_profile *pp;
|
||||
|
||||
/* work queue cache line section */
|
||||
|
||||
@@ -34,6 +34,12 @@ int enic_api_devcmd_proxy_by_index(struct net_device *netdev, int vf,
|
||||
struct vnic_dev *vdev = enic->vdev;
|
||||
|
||||
spin_lock(&enic->enic_api_lock);
|
||||
while (enic->enic_api_busy) {
|
||||
spin_unlock(&enic->enic_api_lock);
|
||||
cpu_relax();
|
||||
spin_lock(&enic->enic_api_lock);
|
||||
}
|
||||
|
||||
spin_lock_bh(&enic->devcmd_lock);
|
||||
|
||||
vnic_dev_cmd_proxy_by_index_start(vdev, vf);
|
||||
|
||||
@@ -1938,8 +1938,6 @@ static int enic_dev_wait(struct vnic_dev *vdev,
|
||||
int done;
|
||||
int err;
|
||||
|
||||
BUG_ON(in_interrupt());
|
||||
|
||||
err = start(vdev, arg);
|
||||
if (err)
|
||||
return err;
|
||||
@@ -2116,6 +2114,13 @@ static int enic_set_rss_nic_cfg(struct enic *enic)
|
||||
rss_hash_bits, rss_base_cpu, rss_enable);
|
||||
}
|
||||
|
||||
static void enic_set_api_busy(struct enic *enic, bool busy)
|
||||
{
|
||||
spin_lock(&enic->enic_api_lock);
|
||||
enic->enic_api_busy = busy;
|
||||
spin_unlock(&enic->enic_api_lock);
|
||||
}
|
||||
|
||||
static void enic_reset(struct work_struct *work)
|
||||
{
|
||||
struct enic *enic = container_of(work, struct enic, reset);
|
||||
@@ -2125,7 +2130,9 @@ static void enic_reset(struct work_struct *work)
|
||||
|
||||
rtnl_lock();
|
||||
|
||||
spin_lock(&enic->enic_api_lock);
|
||||
/* Stop any activity from infiniband */
|
||||
enic_set_api_busy(enic, true);
|
||||
|
||||
enic_stop(enic->netdev);
|
||||
enic_dev_soft_reset(enic);
|
||||
enic_reset_addr_lists(enic);
|
||||
@@ -2133,7 +2140,10 @@ static void enic_reset(struct work_struct *work)
|
||||
enic_set_rss_nic_cfg(enic);
|
||||
enic_dev_set_ig_vlan_rewrite_mode(enic);
|
||||
enic_open(enic->netdev);
|
||||
spin_unlock(&enic->enic_api_lock);
|
||||
|
||||
/* Allow infiniband to fiddle with the device again */
|
||||
enic_set_api_busy(enic, false);
|
||||
|
||||
call_netdevice_notifiers(NETDEV_REBOOT, enic->netdev);
|
||||
|
||||
rtnl_unlock();
|
||||
@@ -2145,7 +2155,9 @@ static void enic_tx_hang_reset(struct work_struct *work)
|
||||
|
||||
rtnl_lock();
|
||||
|
||||
spin_lock(&enic->enic_api_lock);
|
||||
/* Stop any activity from infiniband */
|
||||
enic_set_api_busy(enic, true);
|
||||
|
||||
enic_dev_hang_notify(enic);
|
||||
enic_stop(enic->netdev);
|
||||
enic_dev_hang_reset(enic);
|
||||
@@ -2154,7 +2166,10 @@ static void enic_tx_hang_reset(struct work_struct *work)
|
||||
enic_set_rss_nic_cfg(enic);
|
||||
enic_dev_set_ig_vlan_rewrite_mode(enic);
|
||||
enic_open(enic->netdev);
|
||||
spin_unlock(&enic->enic_api_lock);
|
||||
|
||||
/* Allow infiniband to fiddle with the device again */
|
||||
enic_set_api_busy(enic, false);
|
||||
|
||||
call_netdevice_notifiers(NETDEV_REBOOT, enic->netdev);
|
||||
|
||||
rtnl_unlock();
|
||||
|
||||
@@ -1256,6 +1256,7 @@ static int ibmveth_poll(struct napi_struct *napi, int budget)
|
||||
int offset = ibmveth_rxq_frame_offset(adapter);
|
||||
int csum_good = ibmveth_rxq_csum_good(adapter);
|
||||
int lrg_pkt = ibmveth_rxq_large_packet(adapter);
|
||||
__sum16 iph_check = 0;
|
||||
|
||||
skb = ibmveth_rxq_get_buffer(adapter);
|
||||
|
||||
@@ -1307,7 +1308,17 @@ static int ibmveth_poll(struct napi_struct *napi, int budget)
|
||||
}
|
||||
}
|
||||
|
||||
if (length > netdev->mtu + ETH_HLEN) {
|
||||
/* PHYP without PLSO support places a -1 in the ip
|
||||
* checksum for large send frames.
|
||||
*/
|
||||
if (skb->protocol == cpu_to_be16(ETH_P_IP)) {
|
||||
struct iphdr *iph = (struct iphdr *)skb->data;
|
||||
|
||||
iph_check = iph->check;
|
||||
}
|
||||
|
||||
if ((length > netdev->mtu + ETH_HLEN) ||
|
||||
lrg_pkt || iph_check == 0xffff) {
|
||||
ibmveth_rx_mss_helper(skb, mss, lrg_pkt);
|
||||
adapter->rx_large_packets++;
|
||||
}
|
||||
|
||||
@@ -1188,7 +1188,7 @@ out:
|
||||
return rc;
|
||||
|
||||
probe_err_register:
|
||||
kfree(lp->td_ring);
|
||||
kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring));
|
||||
probe_err_td_ring:
|
||||
iounmap(lp->tx_dma_regs);
|
||||
probe_err_dma_tx:
|
||||
@@ -1208,6 +1208,7 @@ static int korina_remove(struct platform_device *pdev)
|
||||
iounmap(lp->eth_regs);
|
||||
iounmap(lp->rx_dma_regs);
|
||||
iounmap(lp->tx_dma_regs);
|
||||
kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring));
|
||||
|
||||
unregister_netdev(bif->dev);
|
||||
free_netdev(bif->dev);
|
||||
|
||||
@@ -4476,6 +4476,58 @@ static void rtl_rar_set(struct rtl8169_private *tp, u8 *addr)
|
||||
rtl_unlock_work(tp);
|
||||
}
|
||||
|
||||
static void rtl_init_rxcfg(struct rtl8169_private *tp)
|
||||
{
|
||||
void __iomem *ioaddr = tp->mmio_addr;
|
||||
|
||||
switch (tp->mac_version) {
|
||||
case RTL_GIGA_MAC_VER_01:
|
||||
case RTL_GIGA_MAC_VER_02:
|
||||
case RTL_GIGA_MAC_VER_03:
|
||||
case RTL_GIGA_MAC_VER_04:
|
||||
case RTL_GIGA_MAC_VER_05:
|
||||
case RTL_GIGA_MAC_VER_06:
|
||||
case RTL_GIGA_MAC_VER_10:
|
||||
case RTL_GIGA_MAC_VER_11:
|
||||
case RTL_GIGA_MAC_VER_12:
|
||||
case RTL_GIGA_MAC_VER_13:
|
||||
case RTL_GIGA_MAC_VER_14:
|
||||
case RTL_GIGA_MAC_VER_15:
|
||||
case RTL_GIGA_MAC_VER_16:
|
||||
case RTL_GIGA_MAC_VER_17:
|
||||
RTL_W32(RxConfig, RX_FIFO_THRESH | RX_DMA_BURST);
|
||||
break;
|
||||
case RTL_GIGA_MAC_VER_18:
|
||||
case RTL_GIGA_MAC_VER_19:
|
||||
case RTL_GIGA_MAC_VER_20:
|
||||
case RTL_GIGA_MAC_VER_21:
|
||||
case RTL_GIGA_MAC_VER_22:
|
||||
case RTL_GIGA_MAC_VER_23:
|
||||
case RTL_GIGA_MAC_VER_24:
|
||||
case RTL_GIGA_MAC_VER_34:
|
||||
case RTL_GIGA_MAC_VER_35:
|
||||
RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST);
|
||||
break;
|
||||
case RTL_GIGA_MAC_VER_40:
|
||||
case RTL_GIGA_MAC_VER_41:
|
||||
case RTL_GIGA_MAC_VER_42:
|
||||
case RTL_GIGA_MAC_VER_43:
|
||||
case RTL_GIGA_MAC_VER_44:
|
||||
case RTL_GIGA_MAC_VER_45:
|
||||
case RTL_GIGA_MAC_VER_46:
|
||||
case RTL_GIGA_MAC_VER_47:
|
||||
case RTL_GIGA_MAC_VER_48:
|
||||
case RTL_GIGA_MAC_VER_49:
|
||||
case RTL_GIGA_MAC_VER_50:
|
||||
case RTL_GIGA_MAC_VER_51:
|
||||
RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST | RX_EARLY_OFF);
|
||||
break;
|
||||
default:
|
||||
RTL_W32(RxConfig, RX128_INT_EN | RX_DMA_BURST);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static int rtl_set_mac_address(struct net_device *dev, void *p)
|
||||
{
|
||||
struct rtl8169_private *tp = netdev_priv(dev);
|
||||
@@ -4494,6 +4546,10 @@ static int rtl_set_mac_address(struct net_device *dev, void *p)
|
||||
|
||||
pm_runtime_put_noidle(d);
|
||||
|
||||
/* Reportedly at least Asus X453MA truncates packets otherwise */
|
||||
if (tp->mac_version == RTL_GIGA_MAC_VER_37)
|
||||
rtl_init_rxcfg(tp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -4931,58 +4987,6 @@ static void rtl_init_pll_power_ops(struct rtl8169_private *tp)
|
||||
}
|
||||
}
|
||||
|
||||
static void rtl_init_rxcfg(struct rtl8169_private *tp)
|
||||
{
|
||||
void __iomem *ioaddr = tp->mmio_addr;
|
||||
|
||||
switch (tp->mac_version) {
|
||||
case RTL_GIGA_MAC_VER_01:
|
||||
case RTL_GIGA_MAC_VER_02:
|
||||
case RTL_GIGA_MAC_VER_03:
|
||||
case RTL_GIGA_MAC_VER_04:
|
||||
case RTL_GIGA_MAC_VER_05:
|
||||
case RTL_GIGA_MAC_VER_06:
|
||||
case RTL_GIGA_MAC_VER_10:
|
||||
case RTL_GIGA_MAC_VER_11:
|
||||
case RTL_GIGA_MAC_VER_12:
|
||||
case RTL_GIGA_MAC_VER_13:
|
||||
case RTL_GIGA_MAC_VER_14:
|
||||
case RTL_GIGA_MAC_VER_15:
|
||||
case RTL_GIGA_MAC_VER_16:
|
||||
case RTL_GIGA_MAC_VER_17:
|
||||
RTL_W32(RxConfig, RX_FIFO_THRESH | RX_DMA_BURST);
|
||||
break;
|
||||
case RTL_GIGA_MAC_VER_18:
|
||||
case RTL_GIGA_MAC_VER_19:
|
||||
case RTL_GIGA_MAC_VER_20:
|
||||
case RTL_GIGA_MAC_VER_21:
|
||||
case RTL_GIGA_MAC_VER_22:
|
||||
case RTL_GIGA_MAC_VER_23:
|
||||
case RTL_GIGA_MAC_VER_24:
|
||||
case RTL_GIGA_MAC_VER_34:
|
||||
case RTL_GIGA_MAC_VER_35:
|
||||
RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST);
|
||||
break;
|
||||
case RTL_GIGA_MAC_VER_40:
|
||||
case RTL_GIGA_MAC_VER_41:
|
||||
case RTL_GIGA_MAC_VER_42:
|
||||
case RTL_GIGA_MAC_VER_43:
|
||||
case RTL_GIGA_MAC_VER_44:
|
||||
case RTL_GIGA_MAC_VER_45:
|
||||
case RTL_GIGA_MAC_VER_46:
|
||||
case RTL_GIGA_MAC_VER_47:
|
||||
case RTL_GIGA_MAC_VER_48:
|
||||
case RTL_GIGA_MAC_VER_49:
|
||||
case RTL_GIGA_MAC_VER_50:
|
||||
case RTL_GIGA_MAC_VER_51:
|
||||
RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST | RX_EARLY_OFF);
|
||||
break;
|
||||
default:
|
||||
RTL_W32(RxConfig, RX128_INT_EN | RX_DMA_BURST);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void rtl8169_init_ring_indexes(struct rtl8169_private *tp)
|
||||
{
|
||||
tp->dirty_tx = tp->cur_tx = tp->cur_rx = 0;
|
||||
|
||||
@@ -57,7 +57,15 @@ int hdlc_change_mtu(struct net_device *dev, int new_mtu)
|
||||
static int hdlc_rcv(struct sk_buff *skb, struct net_device *dev,
|
||||
struct packet_type *p, struct net_device *orig_dev)
|
||||
{
|
||||
struct hdlc_device *hdlc = dev_to_hdlc(dev);
|
||||
struct hdlc_device *hdlc;
|
||||
|
||||
/* First make sure "dev" is an HDLC device */
|
||||
if (!(dev->priv_flags & IFF_WAN_HDLC)) {
|
||||
kfree_skb(skb);
|
||||
return NET_RX_SUCCESS;
|
||||
}
|
||||
|
||||
hdlc = dev_to_hdlc(dev);
|
||||
|
||||
if (!net_eq(dev_net(dev), &init_net)) {
|
||||
kfree_skb(skb);
|
||||
|
||||
@@ -101,6 +101,7 @@ static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr)
|
||||
old_qlen = dev->tx_queue_len;
|
||||
ether_setup(dev);
|
||||
dev->tx_queue_len = old_qlen;
|
||||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
eth_hw_addr_random(dev);
|
||||
call_netdevice_notifiers(NETDEV_POST_TYPE_CHANGE, dev);
|
||||
netif_dormant_off(dev);
|
||||
|
||||
@@ -100,6 +100,14 @@ static int __ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num)
|
||||
BUILD_BUG_ON(HTT_RX_RING_FILL_LEVEL >= HTT_RX_RING_SIZE / 2);
|
||||
|
||||
idx = __le32_to_cpu(*htt->rx_ring.alloc_idx.vaddr);
|
||||
|
||||
if (idx < 0 || idx >= htt->rx_ring.size) {
|
||||
ath10k_err(htt->ar, "rx ring index is not valid, firmware malfunctioning?\n");
|
||||
idx &= htt->rx_ring.size_mask;
|
||||
ret = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
while (num > 0) {
|
||||
skb = dev_alloc_skb(HTT_RX_BUF_SIZE + HTT_RX_DESC_ALIGN);
|
||||
if (!skb) {
|
||||
|
||||
@@ -6579,7 +6579,7 @@ ath10k_mac_update_bss_chan_survey(struct ath10k *ar,
|
||||
struct ieee80211_channel *channel)
|
||||
{
|
||||
int ret;
|
||||
enum wmi_bss_survey_req_type type = WMI_BSS_SURVEY_REQ_TYPE_READ_CLEAR;
|
||||
enum wmi_bss_survey_req_type type = WMI_BSS_SURVEY_REQ_TYPE_READ;
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
|
||||
@@ -430,6 +430,9 @@ void ath6kl_connect_ap_mode_sta(struct ath6kl_vif *vif, u16 aid, u8 *mac_addr,
|
||||
|
||||
ath6kl_dbg(ATH6KL_DBG_TRC, "new station %pM aid=%d\n", mac_addr, aid);
|
||||
|
||||
if (aid < 1 || aid > AP_MAX_NUM_STA)
|
||||
return;
|
||||
|
||||
if (assoc_req_len > sizeof(struct ieee80211_hdr_3addr)) {
|
||||
struct ieee80211_mgmt *mgmt =
|
||||
(struct ieee80211_mgmt *) assoc_info;
|
||||
|
||||
@@ -2648,6 +2648,11 @@ int ath6kl_wmi_delete_pstream_cmd(struct wmi *wmi, u8 if_idx, u8 traffic_class,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (tsid >= 16) {
|
||||
ath6kl_err("invalid tsid: %d\n", tsid);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
|
||||
if (!skb)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -447,10 +447,19 @@ static void hif_usb_stop(void *hif_handle)
|
||||
spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags);
|
||||
|
||||
/* The pending URBs have to be canceled. */
|
||||
spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
|
||||
list_for_each_entry_safe(tx_buf, tx_buf_tmp,
|
||||
&hif_dev->tx.tx_pending, list) {
|
||||
usb_get_urb(tx_buf->urb);
|
||||
spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags);
|
||||
usb_kill_urb(tx_buf->urb);
|
||||
list_del(&tx_buf->list);
|
||||
usb_free_urb(tx_buf->urb);
|
||||
kfree(tx_buf->buf);
|
||||
kfree(tx_buf);
|
||||
spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
|
||||
}
|
||||
spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags);
|
||||
|
||||
usb_kill_anchored_urbs(&hif_dev->mgmt_submitted);
|
||||
}
|
||||
@@ -760,27 +769,37 @@ static void ath9k_hif_usb_dealloc_tx_urbs(struct hif_device_usb *hif_dev)
|
||||
struct tx_buf *tx_buf = NULL, *tx_buf_tmp = NULL;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
|
||||
list_for_each_entry_safe(tx_buf, tx_buf_tmp,
|
||||
&hif_dev->tx.tx_buf, list) {
|
||||
usb_get_urb(tx_buf->urb);
|
||||
spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags);
|
||||
usb_kill_urb(tx_buf->urb);
|
||||
list_del(&tx_buf->list);
|
||||
usb_free_urb(tx_buf->urb);
|
||||
kfree(tx_buf->buf);
|
||||
kfree(tx_buf);
|
||||
spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
|
||||
}
|
||||
spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags);
|
||||
|
||||
spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
|
||||
hif_dev->tx.flags |= HIF_USB_TX_FLUSH;
|
||||
spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags);
|
||||
|
||||
spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
|
||||
list_for_each_entry_safe(tx_buf, tx_buf_tmp,
|
||||
&hif_dev->tx.tx_pending, list) {
|
||||
usb_get_urb(tx_buf->urb);
|
||||
spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags);
|
||||
usb_kill_urb(tx_buf->urb);
|
||||
list_del(&tx_buf->list);
|
||||
usb_free_urb(tx_buf->urb);
|
||||
kfree(tx_buf->buf);
|
||||
kfree(tx_buf);
|
||||
spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
|
||||
}
|
||||
spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags);
|
||||
|
||||
usb_kill_anchored_urbs(&hif_dev->mgmt_submitted);
|
||||
}
|
||||
|
||||
@@ -346,6 +346,8 @@ void ath9k_htc_txcompletion_cb(struct htc_target *htc_handle,
|
||||
|
||||
if (skb) {
|
||||
htc_hdr = (struct htc_frame_hdr *) skb->data;
|
||||
if (htc_hdr->endpoint_id >= ARRAY_SIZE(htc_handle->endpoint))
|
||||
goto ret;
|
||||
endpoint = &htc_handle->endpoint[htc_hdr->endpoint_id];
|
||||
skb_pull(skb, sizeof(struct htc_frame_hdr));
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ static struct ieee80211_supported_band wcn_band_5ghz = {
|
||||
.ampdu_density = IEEE80211_HT_MPDU_DENSITY_16,
|
||||
.mcs = {
|
||||
.rx_mask = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
|
||||
.rx_highest = cpu_to_le16(72),
|
||||
.rx_highest = cpu_to_le16(150),
|
||||
.tx_params = IEEE80211_HT_MCS_TX_DEFINED,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1540,6 +1540,8 @@ fail:
|
||||
BRCMF_TX_IOCTL_MAX_MSG_SIZE,
|
||||
msgbuf->ioctbuf,
|
||||
msgbuf->ioctbuf_handle);
|
||||
if (msgbuf->txflow_wq)
|
||||
destroy_workqueue(msgbuf->txflow_wq);
|
||||
kfree(msgbuf);
|
||||
}
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -5090,8 +5090,10 @@ bool wlc_phy_attach_lcnphy(struct brcms_phy *pi)
|
||||
pi->pi_fptr.radioloftget = wlc_lcnphy_get_radio_loft;
|
||||
pi->pi_fptr.detach = wlc_phy_detach_lcnphy;
|
||||
|
||||
if (!wlc_phy_txpwr_srom_read_lcnphy(pi))
|
||||
if (!wlc_phy_txpwr_srom_read_lcnphy(pi)) {
|
||||
kfree(pi->u.pi_lcnphy);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (LCNREV_IS(pi->pubpi.phy_rev, 1)) {
|
||||
if (pi_lcn->lcnphy_tempsense_option == 3) {
|
||||
|
||||
@@ -3046,9 +3046,12 @@ static int iwl_mvm_send_aux_roc_cmd(struct iwl_mvm *mvm,
|
||||
aux_roc_req.apply_time_max_delay = cpu_to_le32(delay);
|
||||
|
||||
IWL_DEBUG_TE(mvm,
|
||||
"ROC: Requesting to remain on channel %u for %ums (requested = %ums, max_delay = %ums, dtim_interval = %ums)\n",
|
||||
channel->hw_value, req_dur, duration, delay,
|
||||
dtim_interval);
|
||||
"ROC: Requesting to remain on channel %u for %ums\n",
|
||||
channel->hw_value, req_dur);
|
||||
IWL_DEBUG_TE(mvm,
|
||||
"\t(requested = %ums, max_delay = %ums, dtim_interval = %ums)\n",
|
||||
duration, delay, dtim_interval);
|
||||
|
||||
/* Set the node address */
|
||||
memcpy(aux_roc_req.node_addr, vif->addr, ETH_ALEN);
|
||||
|
||||
|
||||
@@ -1879,7 +1879,7 @@ mwifiex_parse_single_response_buf(struct mwifiex_private *priv, u8 **bss_info,
|
||||
chan, CFG80211_BSS_FTYPE_UNKNOWN,
|
||||
bssid, timestamp,
|
||||
cap_info_bitmap, beacon_period,
|
||||
ie_buf, ie_len, rssi, GFP_KERNEL);
|
||||
ie_buf, ie_len, rssi, GFP_ATOMIC);
|
||||
if (bss) {
|
||||
bss_priv = (struct mwifiex_bss_priv *)bss->priv;
|
||||
bss_priv->band = band;
|
||||
|
||||
@@ -2049,6 +2049,8 @@ error:
|
||||
kfree(card->mpa_rx.buf);
|
||||
card->mpa_tx.buf_size = 0;
|
||||
card->mpa_rx.buf_size = 0;
|
||||
card->mpa_tx.buf = NULL;
|
||||
card->mpa_rx.buf = NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -5422,7 +5422,6 @@ static int rtl8xxxu_submit_int_urb(struct ieee80211_hw *hw)
|
||||
ret = usb_submit_urb(urb, GFP_KERNEL);
|
||||
if (ret) {
|
||||
usb_unanchor_urb(urb);
|
||||
usb_free_urb(urb);
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -5431,6 +5430,7 @@ static int rtl8xxxu_submit_int_urb(struct ieee80211_hw *hw)
|
||||
rtl8xxxu_write32(priv, REG_USB_HIMR, val32);
|
||||
|
||||
error:
|
||||
usb_free_urb(urb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -5756,6 +5756,7 @@ static int rtl8xxxu_start(struct ieee80211_hw *hw)
|
||||
struct rtl8xxxu_priv *priv = hw->priv;
|
||||
struct rtl8xxxu_rx_urb *rx_urb;
|
||||
struct rtl8xxxu_tx_urb *tx_urb;
|
||||
struct sk_buff *skb;
|
||||
unsigned long flags;
|
||||
int ret, i;
|
||||
|
||||
@@ -5806,6 +5807,13 @@ static int rtl8xxxu_start(struct ieee80211_hw *hw)
|
||||
rx_urb->hw = hw;
|
||||
|
||||
ret = rtl8xxxu_submit_rx_urb(priv, rx_urb);
|
||||
if (ret) {
|
||||
if (ret != -ENOMEM) {
|
||||
skb = (struct sk_buff *)rx_urb->urb.context;
|
||||
dev_kfree_skb(skb);
|
||||
}
|
||||
rtl8xxxu_queue_rx_urb(priv, rx_urb);
|
||||
}
|
||||
}
|
||||
exit:
|
||||
/*
|
||||
|
||||
@@ -994,6 +994,7 @@ static int amd_ntb_init_pci(struct amd_ntb_dev *ndev,
|
||||
|
||||
err_dma_mask:
|
||||
pci_clear_master(pdev);
|
||||
pci_release_regions(pdev);
|
||||
err_pci_regions:
|
||||
pci_disable_device(pdev);
|
||||
err_pci_enable:
|
||||
|
||||
@@ -591,7 +591,8 @@ static void nvmet_start_ctrl(struct nvmet_ctrl *ctrl)
|
||||
* in case a host died before it enabled the controller. Hence, simply
|
||||
* reset the keep alive timer when the controller is enabled.
|
||||
*/
|
||||
mod_delayed_work(system_wq, &ctrl->ka_work, ctrl->kato * HZ);
|
||||
if (ctrl->kato)
|
||||
mod_delayed_work(system_wq, &ctrl->ka_work, ctrl->kato * HZ);
|
||||
}
|
||||
|
||||
static void nvmet_clear_ctrl(struct nvmet_ctrl *ctrl)
|
||||
|
||||
@@ -901,15 +901,16 @@ rio_dma_transfer(struct file *filp, u32 transfer_mode,
|
||||
if (pinned < 0) {
|
||||
rmcd_error("get_user_pages err=%ld", pinned);
|
||||
nr_pages = 0;
|
||||
} else
|
||||
} else {
|
||||
rmcd_error("pinned %ld out of %ld pages",
|
||||
pinned, nr_pages);
|
||||
/*
|
||||
* Set nr_pages up to mean "how many pages to unpin, in
|
||||
* the error handler:
|
||||
*/
|
||||
nr_pages = pinned;
|
||||
}
|
||||
ret = -EFAULT;
|
||||
/*
|
||||
* Set nr_pages up to mean "how many pages to unpin, in
|
||||
* the error handler:
|
||||
*/
|
||||
nr_pages = pinned;
|
||||
goto err_pg;
|
||||
}
|
||||
|
||||
@@ -1739,6 +1740,7 @@ static int rio_mport_add_riodev(struct mport_cdev_priv *priv,
|
||||
struct rio_dev *rdev;
|
||||
struct rio_switch *rswitch = NULL;
|
||||
struct rio_mport *mport;
|
||||
struct device *dev;
|
||||
size_t size;
|
||||
u32 rval;
|
||||
u32 swpinfo = 0;
|
||||
@@ -1753,8 +1755,10 @@ static int rio_mport_add_riodev(struct mport_cdev_priv *priv,
|
||||
rmcd_debug(RDEV, "name:%s ct:0x%x did:0x%x hc:0x%x", dev_info.name,
|
||||
dev_info.comptag, dev_info.destid, dev_info.hopcount);
|
||||
|
||||
if (bus_find_device_by_name(&rio_bus_type, NULL, dev_info.name)) {
|
||||
dev = bus_find_device_by_name(&rio_bus_type, NULL, dev_info.name);
|
||||
if (dev) {
|
||||
rmcd_debug(RDEV, "device %s already exists", dev_info.name);
|
||||
put_device(dev);
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
|
||||
@@ -4029,15 +4029,20 @@ regulator_register(const struct regulator_desc *regulator_desc,
|
||||
else if (regulator_desc->supply_name)
|
||||
rdev->supply_name = regulator_desc->supply_name;
|
||||
|
||||
/*
|
||||
* Attempt to resolve the regulator supply, if specified,
|
||||
* but don't return an error if we fail because we will try
|
||||
* to resolve it again later as more regulators are added.
|
||||
*/
|
||||
if (regulator_resolve_supply(rdev))
|
||||
rdev_dbg(rdev, "unable to resolve supply\n");
|
||||
|
||||
ret = set_machine_constraints(rdev, constraints);
|
||||
if (ret == -EPROBE_DEFER) {
|
||||
/* Regulator might be in bypass mode and so needs its supply
|
||||
* to set the constraints */
|
||||
/* FIXME: this currently triggers a chicken-and-egg problem
|
||||
* when creating -SUPPLY symlink in sysfs to a regulator
|
||||
* that is just being created */
|
||||
ret = regulator_resolve_supply(rdev);
|
||||
if (!ret)
|
||||
ret = set_machine_constraints(rdev, constraints);
|
||||
else
|
||||
rdev_dbg(rdev, "unable to resolve supply early: %pe\n",
|
||||
ERR_PTR(ret));
|
||||
}
|
||||
if (ret < 0)
|
||||
goto wash;
|
||||
|
||||
|
||||
@@ -3052,6 +3052,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
|
||||
if (!eq_vaddress)
|
||||
goto create_eq_error;
|
||||
|
||||
mem->dma = paddr;
|
||||
mem->va = eq_vaddress;
|
||||
ret = be_fill_queue(eq, phba->params.num_eq_entries,
|
||||
sizeof(struct be_eq_entry), eq_vaddress);
|
||||
@@ -3061,7 +3062,6 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
|
||||
goto create_eq_error;
|
||||
}
|
||||
|
||||
mem->dma = paddr;
|
||||
ret = beiscsi_cmd_eq_create(&phba->ctrl, eq,
|
||||
phwi_context->cur_eqd);
|
||||
if (ret) {
|
||||
@@ -3116,6 +3116,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
|
||||
if (!cq_vaddress)
|
||||
goto create_cq_error;
|
||||
|
||||
mem->dma = paddr;
|
||||
ret = be_fill_queue(cq, phba->params.num_cq_entries,
|
||||
sizeof(struct sol_cqe), cq_vaddress);
|
||||
if (ret) {
|
||||
@@ -3125,7 +3126,6 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
|
||||
goto create_cq_error;
|
||||
}
|
||||
|
||||
mem->dma = paddr;
|
||||
ret = beiscsi_cmd_cq_create(&phba->ctrl, cq, eq, false,
|
||||
false, 0);
|
||||
if (ret) {
|
||||
|
||||
@@ -1973,7 +1973,7 @@ static int csio_hw_prep_fw(struct csio_hw *hw, struct fw_info *fw_info,
|
||||
FW_HDR_FW_VER_MICRO_G(c), FW_HDR_FW_VER_BUILD_G(c),
|
||||
FW_HDR_FW_VER_MAJOR_G(k), FW_HDR_FW_VER_MINOR_G(k),
|
||||
FW_HDR_FW_VER_MICRO_G(k), FW_HDR_FW_VER_BUILD_G(k));
|
||||
ret = EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto bye;
|
||||
}
|
||||
|
||||
|
||||
@@ -4804,6 +4804,7 @@ static int ibmvfc_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
||||
if (IS_ERR(vhost->work_thread)) {
|
||||
dev_err(dev, "Couldn't create kernel thread: %ld\n",
|
||||
PTR_ERR(vhost->work_thread));
|
||||
rc = PTR_ERR(vhost->work_thread);
|
||||
goto free_host_mem;
|
||||
}
|
||||
|
||||
|
||||
@@ -2476,6 +2476,7 @@ static int mvumi_io_attach(struct mvumi_hba *mhba)
|
||||
if (IS_ERR(mhba->dm_thread)) {
|
||||
dev_err(&mhba->pdev->dev,
|
||||
"failed to create device scan thread\n");
|
||||
ret = PTR_ERR(mhba->dm_thread);
|
||||
mutex_unlock(&mhba->sas_discovery_mutex);
|
||||
goto fail_create_thread;
|
||||
}
|
||||
|
||||
@@ -1223,7 +1223,7 @@ static int qla4xxx_get_host_stats(struct Scsi_Host *shost, char *buf, int len)
|
||||
le64_to_cpu(ql_iscsi_stats->iscsi_sequence_error);
|
||||
exit_host_stats:
|
||||
if (ql_iscsi_stats)
|
||||
dma_free_coherent(&ha->pdev->dev, host_stats_size,
|
||||
dma_free_coherent(&ha->pdev->dev, stats_size,
|
||||
ql_iscsi_stats, iscsi_stats_dma);
|
||||
|
||||
ql4_printk(KERN_INFO, ha, "%s: Get host stats done\n",
|
||||
|
||||
@@ -1232,13 +1232,6 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp)
|
||||
|
||||
tty_wait_until_sent(tty, HVCS_CLOSE_WAIT);
|
||||
|
||||
/*
|
||||
* This line is important because it tells hvcs_open that this
|
||||
* device needs to be re-configured the next time hvcs_open is
|
||||
* called.
|
||||
*/
|
||||
tty->driver_data = NULL;
|
||||
|
||||
free_irq(irq, hvcsd);
|
||||
return;
|
||||
} else if (hvcsd->port.count < 0) {
|
||||
@@ -1254,6 +1247,13 @@ static void hvcs_cleanup(struct tty_struct * tty)
|
||||
{
|
||||
struct hvcs_struct *hvcsd = tty->driver_data;
|
||||
|
||||
/*
|
||||
* This line is important because it tells hvcs_open that this
|
||||
* device needs to be re-configured the next time hvcs_open is
|
||||
* called.
|
||||
*/
|
||||
tty->driver_data = NULL;
|
||||
|
||||
tty_port_put(&hvcsd->port);
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ static int ipwireless_ppp_start_xmit(struct ppp_channel *ppp_channel,
|
||||
skb->len,
|
||||
notify_packet_sent,
|
||||
network);
|
||||
if (ret == -1) {
|
||||
if (ret < 0) {
|
||||
skb_pull(skb, 2);
|
||||
return 0;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ static int ipwireless_ppp_start_xmit(struct ppp_channel *ppp_channel,
|
||||
notify_packet_sent,
|
||||
network);
|
||||
kfree(buf);
|
||||
if (ret == -1)
|
||||
if (ret < 0)
|
||||
return 0;
|
||||
}
|
||||
kfree_skb(skb);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user