commit
6bf1de040a
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 97
|
||||
SUBLEVEL = 100
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
|
|
|
@ -142,10 +142,11 @@
|
|||
};
|
||||
|
||||
scm_conf: scm_conf@0 {
|
||||
compatible = "syscon";
|
||||
compatible = "syscon", "simple-bus";
|
||||
reg = <0x0 0x800>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0 0 0x800>;
|
||||
|
||||
scm_clocks: clocks {
|
||||
#address-cells = <1>;
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
};
|
||||
|
||||
uart1: uart@20000 {
|
||||
compatible = "ti,omap3-uart";
|
||||
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
||||
ti,hwmods = "uart1";
|
||||
reg = <0x20000 0x2000>;
|
||||
clock-frequency = <48000000>;
|
||||
|
@ -148,7 +148,7 @@
|
|||
};
|
||||
|
||||
uart2: uart@22000 {
|
||||
compatible = "ti,omap3-uart";
|
||||
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
||||
ti,hwmods = "uart2";
|
||||
reg = <0x22000 0x2000>;
|
||||
clock-frequency = <48000000>;
|
||||
|
@ -158,7 +158,7 @@
|
|||
};
|
||||
|
||||
uart3: uart@24000 {
|
||||
compatible = "ti,omap3-uart";
|
||||
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
||||
ti,hwmods = "uart3";
|
||||
reg = <0x24000 0x2000>;
|
||||
clock-frequency = <48000000>;
|
||||
|
@ -189,10 +189,11 @@
|
|||
ranges = <0 0x160000 0x16d000>;
|
||||
|
||||
scm_conf: scm_conf@0 {
|
||||
compatible = "syscon";
|
||||
compatible = "syscon", "simple-bus";
|
||||
reg = <0x0 0x800>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0 0 0x800>;
|
||||
|
||||
scm_clocks: clocks {
|
||||
#address-cells = <1>;
|
||||
|
|
|
@ -347,7 +347,7 @@
|
|||
};
|
||||
|
||||
uart1: uart@48020000 {
|
||||
compatible = "ti,omap3-uart";
|
||||
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
||||
ti,hwmods = "uart1";
|
||||
reg = <0x48020000 0x2000>;
|
||||
clock-frequency = <48000000>;
|
||||
|
@ -357,7 +357,7 @@
|
|||
};
|
||||
|
||||
uart2: uart@48022000 {
|
||||
compatible = "ti,omap3-uart";
|
||||
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
||||
ti,hwmods = "uart2";
|
||||
reg = <0x48022000 0x2000>;
|
||||
clock-frequency = <48000000>;
|
||||
|
@ -367,7 +367,7 @@
|
|||
};
|
||||
|
||||
uart3: uart@48024000 {
|
||||
compatible = "ti,omap3-uart";
|
||||
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
||||
ti,hwmods = "uart3";
|
||||
reg = <0x48024000 0x2000>;
|
||||
clock-frequency = <48000000>;
|
||||
|
|
|
@ -221,6 +221,7 @@ CONFIG_SERIO=m
|
|||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=32
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=6
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_MANY_PORTS=y
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
|
|
|
@ -357,7 +357,7 @@ static struct crypto_alg aesbs_algs[] = { {
|
|||
}, {
|
||||
.cra_name = "cbc(aes)",
|
||||
.cra_driver_name = "cbc-aes-neonbs",
|
||||
.cra_priority = 300,
|
||||
.cra_priority = 250,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct async_helper_ctx),
|
||||
|
@ -377,7 +377,7 @@ static struct crypto_alg aesbs_algs[] = { {
|
|||
}, {
|
||||
.cra_name = "ctr(aes)",
|
||||
.cra_driver_name = "ctr-aes-neonbs",
|
||||
.cra_priority = 300,
|
||||
.cra_priority = 250,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = 1,
|
||||
.cra_ctxsize = sizeof(struct async_helper_ctx),
|
||||
|
@ -397,7 +397,7 @@ static struct crypto_alg aesbs_algs[] = { {
|
|||
}, {
|
||||
.cra_name = "xts(aes)",
|
||||
.cra_driver_name = "xts-aes-neonbs",
|
||||
.cra_priority = 300,
|
||||
.cra_priority = 250,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct async_helper_ctx),
|
||||
|
|
|
@ -132,30 +132,26 @@ static void dump_mem(const char *lvl, const char *str, unsigned long bottom,
|
|||
set_fs(fs);
|
||||
}
|
||||
|
||||
static void dump_instr(const char *lvl, struct pt_regs *regs)
|
||||
static void __dump_instr(const char *lvl, struct pt_regs *regs)
|
||||
{
|
||||
unsigned long addr = instruction_pointer(regs);
|
||||
const int thumb = thumb_mode(regs);
|
||||
const int width = thumb ? 4 : 8;
|
||||
mm_segment_t fs;
|
||||
char str[sizeof("00000000 ") * 5 + 2 + 1], *p = str;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* We need to switch to kernel mode so that we can use __get_user
|
||||
* to safely read from kernel space. Note that we now dump the
|
||||
* code first, just in case the backtrace kills us.
|
||||
* Note that we now dump the code first, just in case the backtrace
|
||||
* kills us.
|
||||
*/
|
||||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
|
||||
for (i = -4; i < 1 + !!thumb; i++) {
|
||||
unsigned int val, bad;
|
||||
|
||||
if (thumb)
|
||||
bad = __get_user(val, &((u16 *)addr)[i]);
|
||||
bad = get_user(val, &((u16 *)addr)[i]);
|
||||
else
|
||||
bad = __get_user(val, &((u32 *)addr)[i]);
|
||||
bad = get_user(val, &((u32 *)addr)[i]);
|
||||
|
||||
if (!bad)
|
||||
p += sprintf(p, i == 0 ? "(%0*x) " : "%0*x ",
|
||||
|
@ -166,8 +162,20 @@ static void dump_instr(const char *lvl, struct pt_regs *regs)
|
|||
}
|
||||
}
|
||||
printk("%sCode: %s\n", lvl, str);
|
||||
}
|
||||
|
||||
set_fs(fs);
|
||||
static void dump_instr(const char *lvl, struct pt_regs *regs)
|
||||
{
|
||||
mm_segment_t fs;
|
||||
|
||||
if (!user_mode(regs)) {
|
||||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
__dump_instr(lvl, regs);
|
||||
set_fs(fs);
|
||||
} else {
|
||||
__dump_instr(lvl, regs);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARM_UNWIND
|
||||
|
|
|
@ -522,7 +522,6 @@ static void pdata_quirks_check(struct pdata_init *quirks)
|
|||
if (of_machine_is_compatible(quirks->compatible)) {
|
||||
if (quirks->fn)
|
||||
quirks->fn();
|
||||
break;
|
||||
}
|
||||
quirks++;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/memreserve/ 0x81000000 0x00200000;
|
||||
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
/memreserve/ 0x84b00000 0x00000008;
|
||||
|
|
|
@ -576,6 +576,7 @@ static int __init ar7_register_uarts(void)
|
|||
uart_port.type = PORT_AR7;
|
||||
uart_port.uartclk = clk_get_rate(bus_clk) / 2;
|
||||
uart_port.iotype = UPIO_MEM32;
|
||||
uart_port.flags = UPF_FIXED_TYPE;
|
||||
uart_port.regshift = 2;
|
||||
|
||||
uart_port.line = 0;
|
||||
|
@ -654,6 +655,10 @@ static int __init ar7_register_devices(void)
|
|||
u32 val;
|
||||
int res;
|
||||
|
||||
res = ar7_gpio_init();
|
||||
if (res)
|
||||
pr_warn("unable to register gpios: %d\n", res);
|
||||
|
||||
res = ar7_register_uarts();
|
||||
if (res)
|
||||
pr_err("unable to setup uart(s): %d\n", res);
|
||||
|
|
|
@ -246,8 +246,6 @@ void __init prom_init(void)
|
|||
ar7_init_cmdline(fw_arg0, (char **)fw_arg1);
|
||||
ar7_init_env((struct env_var *)fw_arg2);
|
||||
console_config();
|
||||
|
||||
ar7_gpio_init();
|
||||
}
|
||||
|
||||
#define PORT(offset) (KSEG1ADDR(AR7_REGS_UART0 + (offset * 4)))
|
||||
|
|
|
@ -54,7 +54,8 @@
|
|||
.align 2; \
|
||||
.type symbol, @function; \
|
||||
.ent symbol, 0; \
|
||||
symbol: .frame sp, 0, ra
|
||||
symbol: .frame sp, 0, ra; \
|
||||
.insn
|
||||
|
||||
/*
|
||||
* NESTED - declare nested routine entry point
|
||||
|
@ -63,8 +64,9 @@ symbol: .frame sp, 0, ra
|
|||
.globl symbol; \
|
||||
.align 2; \
|
||||
.type symbol, @function; \
|
||||
.ent symbol, 0; \
|
||||
symbol: .frame sp, framesize, rpc
|
||||
.ent symbol, 0; \
|
||||
symbol: .frame sp, framesize, rpc; \
|
||||
.insn
|
||||
|
||||
/*
|
||||
* END - mark end of function
|
||||
|
@ -86,7 +88,7 @@ symbol:
|
|||
#define FEXPORT(symbol) \
|
||||
.globl symbol; \
|
||||
.type symbol, @function; \
|
||||
symbol:
|
||||
symbol: .insn
|
||||
|
||||
/*
|
||||
* ABS - export absolute symbol
|
||||
|
|
|
@ -238,8 +238,8 @@ BUILD_CM_Cx_R_(tcid_8_priority, 0x80)
|
|||
#define CM_GCR_BASE_GCRBASE_MSK (_ULCAST_(0x1ffff) << 15)
|
||||
#define CM_GCR_BASE_CMDEFTGT_SHF 0
|
||||
#define CM_GCR_BASE_CMDEFTGT_MSK (_ULCAST_(0x3) << 0)
|
||||
#define CM_GCR_BASE_CMDEFTGT_DISABLED 0
|
||||
#define CM_GCR_BASE_CMDEFTGT_MEM 1
|
||||
#define CM_GCR_BASE_CMDEFTGT_MEM 0
|
||||
#define CM_GCR_BASE_CMDEFTGT_RESERVED 1
|
||||
#define CM_GCR_BASE_CMDEFTGT_IOCU0 2
|
||||
#define CM_GCR_BASE_CMDEFTGT_IOCU1 3
|
||||
|
||||
|
|
|
@ -49,9 +49,7 @@
|
|||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
void arch_cpu_idle_dead(void)
|
||||
{
|
||||
/* What the heck is this check doing ? */
|
||||
if (!cpumask_test_cpu(smp_processor_id(), &cpu_callin_map))
|
||||
play_dead();
|
||||
play_dead();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -152,6 +152,35 @@ void __init detect_memory_region(phys_addr_t start, phys_addr_t sz_min, phys_add
|
|||
add_memory_region(start, size, BOOT_MEM_RAM);
|
||||
}
|
||||
|
||||
bool __init memory_region_available(phys_addr_t start, phys_addr_t size)
|
||||
{
|
||||
int i;
|
||||
bool in_ram = false, free = true;
|
||||
|
||||
for (i = 0; i < boot_mem_map.nr_map; i++) {
|
||||
phys_addr_t start_, end_;
|
||||
|
||||
start_ = boot_mem_map.map[i].addr;
|
||||
end_ = boot_mem_map.map[i].addr + boot_mem_map.map[i].size;
|
||||
|
||||
switch (boot_mem_map.map[i].type) {
|
||||
case BOOT_MEM_RAM:
|
||||
if (start >= start_ && start + size <= end_)
|
||||
in_ram = true;
|
||||
break;
|
||||
case BOOT_MEM_RESERVED:
|
||||
if ((start >= start_ && start < end_) ||
|
||||
(start < start_ && start + size >= start_))
|
||||
free = false;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return in_ram && free;
|
||||
}
|
||||
|
||||
static void __init print_memory_map(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -300,11 +329,19 @@ static void __init bootmem_init(void)
|
|||
|
||||
#else /* !CONFIG_SGI_IP27 */
|
||||
|
||||
static unsigned long __init bootmap_bytes(unsigned long pages)
|
||||
{
|
||||
unsigned long bytes = DIV_ROUND_UP(pages, 8);
|
||||
|
||||
return ALIGN(bytes, sizeof(long));
|
||||
}
|
||||
|
||||
static void __init bootmem_init(void)
|
||||
{
|
||||
unsigned long reserved_end;
|
||||
unsigned long mapstart = ~0UL;
|
||||
unsigned long bootmap_size;
|
||||
bool bootmap_valid = false;
|
||||
int i;
|
||||
|
||||
/*
|
||||
|
@ -384,12 +421,43 @@ static void __init bootmem_init(void)
|
|||
mapstart = max(mapstart, (unsigned long)PFN_UP(__pa(initrd_end)));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* check that mapstart doesn't overlap with any of
|
||||
* memory regions that have been reserved through eg. DTB
|
||||
*/
|
||||
bootmap_size = bootmap_bytes(max_low_pfn - min_low_pfn);
|
||||
|
||||
bootmap_valid = memory_region_available(PFN_PHYS(mapstart),
|
||||
bootmap_size);
|
||||
for (i = 0; i < boot_mem_map.nr_map && !bootmap_valid; i++) {
|
||||
unsigned long mapstart_addr;
|
||||
|
||||
switch (boot_mem_map.map[i].type) {
|
||||
case BOOT_MEM_RESERVED:
|
||||
mapstart_addr = PFN_ALIGN(boot_mem_map.map[i].addr +
|
||||
boot_mem_map.map[i].size);
|
||||
if (PHYS_PFN(mapstart_addr) < mapstart)
|
||||
break;
|
||||
|
||||
bootmap_valid = memory_region_available(mapstart_addr,
|
||||
bootmap_size);
|
||||
if (bootmap_valid)
|
||||
mapstart = PHYS_PFN(mapstart_addr);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bootmap_valid)
|
||||
panic("No memory area to place a bootmap bitmap");
|
||||
|
||||
/*
|
||||
* Initialize the boot-time allocator with low memory only.
|
||||
*/
|
||||
bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart,
|
||||
min_low_pfn, max_low_pfn);
|
||||
|
||||
if (bootmap_size != init_bootmem_node(NODE_DATA(0), mapstart,
|
||||
min_low_pfn, max_low_pfn))
|
||||
panic("Unexpected memory size required for bootmap");
|
||||
|
||||
for (i = 0; i < boot_mem_map.nr_map; i++) {
|
||||
unsigned long start, end;
|
||||
|
@ -438,6 +506,10 @@ static void __init bootmem_init(void)
|
|||
continue;
|
||||
default:
|
||||
/* Not usable memory */
|
||||
if (start > min_low_pfn && end < max_low_pfn)
|
||||
reserve_bootmem(boot_mem_map.map[i].addr,
|
||||
boot_mem_map.map[i].size,
|
||||
BOOTMEM_DEFAULT);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,9 @@ EXPORT_SYMBOL(cpu_sibling_map);
|
|||
cpumask_t cpu_core_map[NR_CPUS] __read_mostly;
|
||||
EXPORT_SYMBOL(cpu_core_map);
|
||||
|
||||
static DECLARE_COMPLETION(cpu_starting);
|
||||
static DECLARE_COMPLETION(cpu_running);
|
||||
|
||||
/*
|
||||
* A logcal cpu mask containing only one VPE per core to
|
||||
* reduce the number of IPIs on large MT systems.
|
||||
|
@ -174,9 +177,12 @@ asmlinkage void start_secondary(void)
|
|||
cpumask_set_cpu(cpu, &cpu_coherent_mask);
|
||||
notify_cpu_starting(cpu);
|
||||
|
||||
cpumask_set_cpu(cpu, &cpu_callin_map);
|
||||
/* Notify boot CPU that we're starting & ready to sync counters */
|
||||
complete(&cpu_starting);
|
||||
|
||||
synchronise_count_slave(cpu);
|
||||
|
||||
/* The CPU is running and counters synchronised, now mark it online */
|
||||
set_cpu_online(cpu, true);
|
||||
|
||||
set_cpu_sibling_map(cpu);
|
||||
|
@ -184,6 +190,12 @@ asmlinkage void start_secondary(void)
|
|||
|
||||
calculate_cpu_foreign_map();
|
||||
|
||||
/*
|
||||
* Notify boot CPU that we're up & online and it can safely return
|
||||
* from __cpu_up
|
||||
*/
|
||||
complete(&cpu_running);
|
||||
|
||||
/*
|
||||
* irq will be enabled in ->smp_finish(), enabling it too early
|
||||
* is dangerous.
|
||||
|
@ -242,22 +254,23 @@ void smp_prepare_boot_cpu(void)
|
|||
{
|
||||
set_cpu_possible(0, true);
|
||||
set_cpu_online(0, true);
|
||||
cpumask_set_cpu(0, &cpu_callin_map);
|
||||
}
|
||||
|
||||
int __cpu_up(unsigned int cpu, struct task_struct *tidle)
|
||||
{
|
||||
mp_ops->boot_secondary(cpu, tidle);
|
||||
|
||||
/*
|
||||
* Trust is futile. We should really have timeouts ...
|
||||
*/
|
||||
while (!cpumask_test_cpu(cpu, &cpu_callin_map)) {
|
||||
udelay(100);
|
||||
schedule();
|
||||
/* Wait for CPU to start and be ready to sync counters */
|
||||
if (!wait_for_completion_timeout(&cpu_starting,
|
||||
msecs_to_jiffies(1000))) {
|
||||
pr_crit("CPU%u: failed to start\n", cpu);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
synchronise_count_master(cpu);
|
||||
|
||||
/* Wait for CPU to finish startup & mark itself online before return */
|
||||
wait_for_completion(&cpu_running);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ static struct insn insn_table_MM[] = {
|
|||
{ insn_jr, M(mm_pool32a_op, 0, 0, 0, mm_jalr_op, mm_pool32axf_op), RS },
|
||||
{ insn_lb, M(mm_lb32_op, 0, 0, 0, 0, 0), RT | RS | SIMM },
|
||||
{ insn_ld, 0, 0 },
|
||||
{ insn_lh, M(mm_lh32_op, 0, 0, 0, 0, 0), RS | RS | SIMM },
|
||||
{ insn_lh, M(mm_lh32_op, 0, 0, 0, 0, 0), RT | RS | SIMM },
|
||||
{ insn_ll, M(mm_pool32c_op, 0, 0, (mm_ll_func << 1), 0, 0), RS | RT | SIMM },
|
||||
{ insn_lld, 0, 0 },
|
||||
{ insn_lui, M(mm_pool32i_op, mm_lui_op, 0, 0, 0, 0), RS | SIMM },
|
||||
|
|
|
@ -275,7 +275,7 @@ asmlinkage void plat_irq_dispatch(void)
|
|||
do_IRQ(nlm_irq_to_xirq(node, i));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
#ifdef CONFIG_CPU_XLP
|
||||
static const struct irq_domain_ops xlp_pic_irq_domain_ops = {
|
||||
.xlate = irq_domain_xlate_onetwocell,
|
||||
};
|
||||
|
@ -348,7 +348,7 @@ void __init arch_init_irq(void)
|
|||
#if defined(CONFIG_CPU_XLR)
|
||||
nlm_setup_fmn_irq();
|
||||
#endif
|
||||
#if defined(CONFIG_OF)
|
||||
#ifdef CONFIG_CPU_XLP
|
||||
of_irq_init(xlp_pic_irq_ids);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1082,11 +1082,6 @@ source "arch/powerpc/Kconfig.debug"
|
|||
|
||||
source "security/Kconfig"
|
||||
|
||||
config KEYS_COMPAT
|
||||
bool
|
||||
depends on COMPAT && KEYS
|
||||
default y
|
||||
|
||||
source "crypto/Kconfig"
|
||||
|
||||
config PPC_LIB_RHEAP
|
||||
|
|
|
@ -83,6 +83,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
sdhc@114000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c@119000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
|
|
@ -280,6 +280,7 @@ static void icp_rm_deliver_irq(struct kvmppc_xics *xics, struct kvmppc_icp *icp,
|
|||
*/
|
||||
if (reject && reject != XICS_IPI) {
|
||||
arch_spin_unlock(&ics->lock);
|
||||
icp->n_reject++;
|
||||
new_irq = reject;
|
||||
goto again;
|
||||
}
|
||||
|
@ -611,10 +612,8 @@ int kvmppc_rm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr)
|
|||
state = &ics->irq_state[src];
|
||||
|
||||
/* Still asserted, resend it */
|
||||
if (state->asserted) {
|
||||
icp->n_reject++;
|
||||
if (state->asserted)
|
||||
icp_rm_deliver_irq(xics, icp, irq);
|
||||
}
|
||||
|
||||
if (!hlist_empty(&vcpu->kvm->irq_ack_notifier_list)) {
|
||||
icp->rm_action |= XICS_RM_NOTIFY_EOI;
|
||||
|
|
|
@ -346,9 +346,6 @@ config COMPAT
|
|||
config SYSVIPC_COMPAT
|
||||
def_bool y if COMPAT && SYSVIPC
|
||||
|
||||
config KEYS_COMPAT
|
||||
def_bool y if COMPAT && KEYS
|
||||
|
||||
config SMP
|
||||
def_bool y
|
||||
prompt "Symmetric multi-processing support"
|
||||
|
|
|
@ -165,7 +165,6 @@ static struct plat_sci_port scif2_platform_data = {
|
|||
.scscr = SCSCR_TE | SCSCR_RE,
|
||||
.type = PORT_IRDA,
|
||||
.ops = &sh770x_sci_port_ops,
|
||||
.regshift = 1,
|
||||
};
|
||||
|
||||
static struct resource scif2_resources[] = {
|
||||
|
|
|
@ -549,9 +549,6 @@ config SYSVIPC_COMPAT
|
|||
depends on COMPAT && SYSVIPC
|
||||
default y
|
||||
|
||||
config KEYS_COMPAT
|
||||
def_bool y if COMPAT && KEYS
|
||||
|
||||
endmenu
|
||||
|
||||
source "net/Kconfig"
|
||||
|
|
|
@ -2641,10 +2641,6 @@ config COMPAT_FOR_U64_ALIGNMENT
|
|||
config SYSVIPC_COMPAT
|
||||
def_bool y
|
||||
depends on SYSVIPC
|
||||
|
||||
config KEYS_COMPAT
|
||||
def_bool y
|
||||
depends on KEYS
|
||||
endif
|
||||
|
||||
endmenu
|
||||
|
|
|
@ -174,8 +174,8 @@ LABEL skip_ %I
|
|||
.endr
|
||||
|
||||
# Find min length
|
||||
vmovdqa _lens+0*16(state), %xmm0
|
||||
vmovdqa _lens+1*16(state), %xmm1
|
||||
vmovdqu _lens+0*16(state), %xmm0
|
||||
vmovdqu _lens+1*16(state), %xmm1
|
||||
|
||||
vpminud %xmm1, %xmm0, %xmm2 # xmm2 has {D,C,B,A}
|
||||
vpalignr $8, %xmm2, %xmm3, %xmm3 # xmm3 has {x,x,D,C}
|
||||
|
@ -195,8 +195,8 @@ LABEL skip_ %I
|
|||
vpsubd %xmm2, %xmm0, %xmm0
|
||||
vpsubd %xmm2, %xmm1, %xmm1
|
||||
|
||||
vmovdqa %xmm0, _lens+0*16(state)
|
||||
vmovdqa %xmm1, _lens+1*16(state)
|
||||
vmovdqu %xmm0, _lens+0*16(state)
|
||||
vmovdqu %xmm1, _lens+1*16(state)
|
||||
|
||||
# "state" and "args" are the same address, arg1
|
||||
# len is arg2
|
||||
|
@ -260,8 +260,8 @@ ENTRY(sha1_mb_mgr_get_comp_job_avx2)
|
|||
jc .return_null
|
||||
|
||||
# Find min length
|
||||
vmovdqa _lens(state), %xmm0
|
||||
vmovdqa _lens+1*16(state), %xmm1
|
||||
vmovdqu _lens(state), %xmm0
|
||||
vmovdqu _lens+1*16(state), %xmm1
|
||||
|
||||
vpminud %xmm1, %xmm0, %xmm2 # xmm2 has {D,C,B,A}
|
||||
vpalignr $8, %xmm2, %xmm3, %xmm3 # xmm3 has {x,x,D,C}
|
||||
|
|
|
@ -296,6 +296,7 @@ struct x86_emulate_ctxt {
|
|||
|
||||
bool perm_ok; /* do not check permissions if true */
|
||||
bool ud; /* inject an #UD if host doesn't support insn */
|
||||
bool tf; /* TF value before instruction (after for syscall/sysret) */
|
||||
|
||||
bool have_exception;
|
||||
struct x86_exception exception;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <linux/compiler.h>
|
||||
#include <linux/thread_info.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/preempt.h>
|
||||
#include <asm/asm.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/smap.h>
|
||||
|
@ -66,6 +67,12 @@ static inline bool __chk_range_not_ok(unsigned long addr, unsigned long size, un
|
|||
__chk_range_not_ok((unsigned long __force)(addr), size, limit); \
|
||||
})
|
||||
|
||||
#ifdef CONFIG_DEBUG_ATOMIC_SLEEP
|
||||
# define WARN_ON_IN_IRQ() WARN_ON_ONCE(!in_task())
|
||||
#else
|
||||
# define WARN_ON_IN_IRQ()
|
||||
#endif
|
||||
|
||||
/**
|
||||
* access_ok: - Checks if a user space pointer is valid
|
||||
* @type: Type of access: %VERIFY_READ or %VERIFY_WRITE. Note that
|
||||
|
@ -86,8 +93,11 @@ static inline bool __chk_range_not_ok(unsigned long addr, unsigned long size, un
|
|||
* checks that the pointer is in the user space range - after calling
|
||||
* this function, memory access functions may still return -EFAULT.
|
||||
*/
|
||||
#define access_ok(type, addr, size) \
|
||||
likely(!__range_not_ok(addr, size, user_addr_max()))
|
||||
#define access_ok(type, addr, size) \
|
||||
({ \
|
||||
WARN_ON_IN_IRQ(); \
|
||||
likely(!__range_not_ok(addr, size, user_addr_max())); \
|
||||
})
|
||||
|
||||
/*
|
||||
* The exception table consists of pairs of addresses relative to the
|
||||
|
|
|
@ -2726,6 +2726,7 @@ static int em_syscall(struct x86_emulate_ctxt *ctxt)
|
|||
ctxt->eflags &= ~(X86_EFLAGS_VM | X86_EFLAGS_IF);
|
||||
}
|
||||
|
||||
ctxt->tf = (ctxt->eflags & X86_EFLAGS_TF) != 0;
|
||||
return X86EMUL_CONTINUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -5095,6 +5095,8 @@ static void init_emulate_ctxt(struct kvm_vcpu *vcpu)
|
|||
kvm_x86_ops->get_cs_db_l_bits(vcpu, &cs_db, &cs_l);
|
||||
|
||||
ctxt->eflags = kvm_get_rflags(vcpu);
|
||||
ctxt->tf = (ctxt->eflags & X86_EFLAGS_TF) != 0;
|
||||
|
||||
ctxt->eip = kvm_rip_read(vcpu);
|
||||
ctxt->mode = (!is_protmode(vcpu)) ? X86EMUL_MODE_REAL :
|
||||
(ctxt->eflags & X86_EFLAGS_VM) ? X86EMUL_MODE_VM86 :
|
||||
|
@ -5315,37 +5317,26 @@ static int kvm_vcpu_check_hw_bp(unsigned long addr, u32 type, u32 dr7,
|
|||
return dr6;
|
||||
}
|
||||
|
||||
static void kvm_vcpu_check_singlestep(struct kvm_vcpu *vcpu, unsigned long rflags, int *r)
|
||||
static void kvm_vcpu_do_singlestep(struct kvm_vcpu *vcpu, int *r)
|
||||
{
|
||||
struct kvm_run *kvm_run = vcpu->run;
|
||||
|
||||
/*
|
||||
* rflags is the old, "raw" value of the flags. The new value has
|
||||
* not been saved yet.
|
||||
*
|
||||
* This is correct even for TF set by the guest, because "the
|
||||
* processor will not generate this exception after the instruction
|
||||
* that sets the TF flag".
|
||||
*/
|
||||
if (unlikely(rflags & X86_EFLAGS_TF)) {
|
||||
if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) {
|
||||
kvm_run->debug.arch.dr6 = DR6_BS | DR6_FIXED_1 |
|
||||
DR6_RTM;
|
||||
kvm_run->debug.arch.pc = vcpu->arch.singlestep_rip;
|
||||
kvm_run->debug.arch.exception = DB_VECTOR;
|
||||
kvm_run->exit_reason = KVM_EXIT_DEBUG;
|
||||
*r = EMULATE_USER_EXIT;
|
||||
} else {
|
||||
vcpu->arch.emulate_ctxt.eflags &= ~X86_EFLAGS_TF;
|
||||
/*
|
||||
* "Certain debug exceptions may clear bit 0-3. The
|
||||
* remaining contents of the DR6 register are never
|
||||
* cleared by the processor".
|
||||
*/
|
||||
vcpu->arch.dr6 &= ~15;
|
||||
vcpu->arch.dr6 |= DR6_BS | DR6_RTM;
|
||||
kvm_queue_exception(vcpu, DB_VECTOR);
|
||||
}
|
||||
if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) {
|
||||
kvm_run->debug.arch.dr6 = DR6_BS | DR6_FIXED_1 | DR6_RTM;
|
||||
kvm_run->debug.arch.pc = vcpu->arch.singlestep_rip;
|
||||
kvm_run->debug.arch.exception = DB_VECTOR;
|
||||
kvm_run->exit_reason = KVM_EXIT_DEBUG;
|
||||
*r = EMULATE_USER_EXIT;
|
||||
} else {
|
||||
vcpu->arch.emulate_ctxt.eflags &= ~X86_EFLAGS_TF;
|
||||
/*
|
||||
* "Certain debug exceptions may clear bit 0-3. The
|
||||
* remaining contents of the DR6 register are never
|
||||
* cleared by the processor".
|
||||
*/
|
||||
vcpu->arch.dr6 &= ~15;
|
||||
vcpu->arch.dr6 |= DR6_BS | DR6_RTM;
|
||||
kvm_queue_exception(vcpu, DB_VECTOR);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5500,8 +5491,9 @@ restart:
|
|||
toggle_interruptibility(vcpu, ctxt->interruptibility);
|
||||
vcpu->arch.emulate_regs_need_sync_to_vcpu = false;
|
||||
kvm_rip_write(vcpu, ctxt->eip);
|
||||
if (r == EMULATE_DONE)
|
||||
kvm_vcpu_check_singlestep(vcpu, rflags, &r);
|
||||
if (r == EMULATE_DONE &&
|
||||
(ctxt->tf || (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP)))
|
||||
kvm_vcpu_do_singlestep(vcpu, &r);
|
||||
if (!ctxt->have_exception ||
|
||||
exception_type(ctxt->exception.vector) == EXCPT_TRAP)
|
||||
__kvm_set_rflags(vcpu, ctxt->eflags);
|
||||
|
|
|
@ -212,8 +212,8 @@ static void arch_perfmon_setup_counters(void)
|
|||
eax.full = cpuid_eax(0xa);
|
||||
|
||||
/* Workaround for BIOS bugs in 6/15. Taken from perfmon2 */
|
||||
if (eax.split.version_id == 0 && __this_cpu_read(cpu_info.x86) == 6 &&
|
||||
__this_cpu_read(cpu_info.x86_model) == 15) {
|
||||
if (eax.split.version_id == 0 && boot_cpu_data.x86 == 6 &&
|
||||
boot_cpu_data.x86_model == 15) {
|
||||
eax.split.version_id = 2;
|
||||
eax.split.num_counters = 2;
|
||||
eax.split.bit_width = 40;
|
||||
|
|
|
@ -343,7 +343,6 @@ config CRYPTO_XTS
|
|||
select CRYPTO_BLKCIPHER
|
||||
select CRYPTO_MANAGER
|
||||
select CRYPTO_GF128MUL
|
||||
select CRYPTO_ECB
|
||||
help
|
||||
XTS: IEEE1619/D16 narrow block cipher use with aes-xts-plain,
|
||||
key size 256, 384 or 512 bits. This implementation currently
|
||||
|
|
|
@ -87,7 +87,7 @@ EXPORT_SYMBOL_GPL(pkcs7_free_message);
|
|||
static int pkcs7_check_authattrs(struct pkcs7_message *msg)
|
||||
{
|
||||
struct pkcs7_signed_info *sinfo;
|
||||
bool want;
|
||||
bool want = false;
|
||||
|
||||
sinfo = msg->signed_infos;
|
||||
if (!sinfo)
|
||||
|
|
|
@ -272,6 +272,7 @@ config SATA_SX4
|
|||
|
||||
config ATA_BMDMA
|
||||
bool "ATA BMDMA support"
|
||||
depends on HAS_DMA
|
||||
default y
|
||||
help
|
||||
This option adds support for SFF ATA controllers with BMDMA
|
||||
|
@ -318,6 +319,7 @@ config SATA_DWC_VDEBUG
|
|||
|
||||
config SATA_HIGHBANK
|
||||
tristate "Calxeda Highbank SATA support"
|
||||
depends on HAS_DMA
|
||||
depends on ARCH_HIGHBANK || COMPILE_TEST
|
||||
help
|
||||
This option enables support for the Calxeda Highbank SoC's
|
||||
|
@ -327,6 +329,7 @@ config SATA_HIGHBANK
|
|||
|
||||
config SATA_MV
|
||||
tristate "Marvell SATA support"
|
||||
depends on HAS_DMA
|
||||
depends on PCI || ARCH_DOVE || ARCH_MV78XX0 || \
|
||||
ARCH_MVEBU || ARCH_ORION5X || COMPILE_TEST
|
||||
select GENERIC_PHY
|
||||
|
|
|
@ -2736,7 +2736,7 @@ static int rbd_img_obj_parent_read_full(struct rbd_obj_request *obj_request)
|
|||
* from the parent.
|
||||
*/
|
||||
page_count = (u32)calc_pages_for(0, length);
|
||||
pages = ceph_alloc_page_vector(page_count, GFP_KERNEL);
|
||||
pages = ceph_alloc_page_vector(page_count, GFP_NOIO);
|
||||
if (IS_ERR(pages)) {
|
||||
result = PTR_ERR(pages);
|
||||
pages = NULL;
|
||||
|
@ -2863,7 +2863,7 @@ static int rbd_img_obj_exists_submit(struct rbd_obj_request *obj_request)
|
|||
*/
|
||||
size = sizeof (__le64) + sizeof (__le32) + sizeof (__le32);
|
||||
page_count = (u32)calc_pages_for(0, size);
|
||||
pages = ceph_alloc_page_vector(page_count, GFP_KERNEL);
|
||||
pages = ceph_alloc_page_vector(page_count, GFP_NOIO);
|
||||
if (IS_ERR(pages))
|
||||
return PTR_ERR(pages);
|
||||
|
||||
|
|
|
@ -1407,33 +1407,34 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif,
|
|||
static void make_response(struct xen_blkif *blkif, u64 id,
|
||||
unsigned short op, int st)
|
||||
{
|
||||
struct blkif_response resp;
|
||||
struct blkif_response *resp;
|
||||
unsigned long flags;
|
||||
union blkif_back_rings *blk_rings = &blkif->blk_rings;
|
||||
int notify;
|
||||
|
||||
resp.id = id;
|
||||
resp.operation = op;
|
||||
resp.status = st;
|
||||
|
||||
spin_lock_irqsave(&blkif->blk_ring_lock, flags);
|
||||
/* Place on the response ring for the relevant domain. */
|
||||
switch (blkif->blk_protocol) {
|
||||
case BLKIF_PROTOCOL_NATIVE:
|
||||
memcpy(RING_GET_RESPONSE(&blk_rings->native, blk_rings->native.rsp_prod_pvt),
|
||||
&resp, sizeof(resp));
|
||||
resp = RING_GET_RESPONSE(&blk_rings->native,
|
||||
blk_rings->native.rsp_prod_pvt);
|
||||
break;
|
||||
case BLKIF_PROTOCOL_X86_32:
|
||||
memcpy(RING_GET_RESPONSE(&blk_rings->x86_32, blk_rings->x86_32.rsp_prod_pvt),
|
||||
&resp, sizeof(resp));
|
||||
resp = RING_GET_RESPONSE(&blk_rings->x86_32,
|
||||
blk_rings->x86_32.rsp_prod_pvt);
|
||||
break;
|
||||
case BLKIF_PROTOCOL_X86_64:
|
||||
memcpy(RING_GET_RESPONSE(&blk_rings->x86_64, blk_rings->x86_64.rsp_prod_pvt),
|
||||
&resp, sizeof(resp));
|
||||
resp = RING_GET_RESPONSE(&blk_rings->x86_64,
|
||||
blk_rings->x86_64.rsp_prod_pvt);
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
|
||||
resp->id = id;
|
||||
resp->operation = op;
|
||||
resp->status = st;
|
||||
|
||||
blk_rings->common.rsp_prod_pvt++;
|
||||
RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&blk_rings->common, notify);
|
||||
spin_unlock_irqrestore(&blkif->blk_ring_lock, flags);
|
||||
|
|
|
@ -74,9 +74,8 @@ extern unsigned int xen_blkif_max_ring_order;
|
|||
struct blkif_common_request {
|
||||
char dummy;
|
||||
};
|
||||
struct blkif_common_response {
|
||||
char dummy;
|
||||
};
|
||||
|
||||
/* i386 protocol version */
|
||||
|
||||
struct blkif_x86_32_request_rw {
|
||||
uint8_t nr_segments; /* number of segments */
|
||||
|
@ -128,14 +127,6 @@ struct blkif_x86_32_request {
|
|||
} u;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
/* i386 protocol version */
|
||||
#pragma pack(push, 4)
|
||||
struct blkif_x86_32_response {
|
||||
uint64_t id; /* copied from request */
|
||||
uint8_t operation; /* copied from request */
|
||||
int16_t status; /* BLKIF_RSP_??? */
|
||||
};
|
||||
#pragma pack(pop)
|
||||
/* x86_64 protocol version */
|
||||
|
||||
struct blkif_x86_64_request_rw {
|
||||
|
@ -192,18 +183,12 @@ struct blkif_x86_64_request {
|
|||
} u;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct blkif_x86_64_response {
|
||||
uint64_t __attribute__((__aligned__(8))) id;
|
||||
uint8_t operation; /* copied from request */
|
||||
int16_t status; /* BLKIF_RSP_??? */
|
||||
};
|
||||
|
||||
DEFINE_RING_TYPES(blkif_common, struct blkif_common_request,
|
||||
struct blkif_common_response);
|
||||
struct blkif_response);
|
||||
DEFINE_RING_TYPES(blkif_x86_32, struct blkif_x86_32_request,
|
||||
struct blkif_x86_32_response);
|
||||
struct blkif_response __packed);
|
||||
DEFINE_RING_TYPES(blkif_x86_64, struct blkif_x86_64_request,
|
||||
struct blkif_x86_64_response);
|
||||
struct blkif_response);
|
||||
|
||||
union blkif_back_rings {
|
||||
struct blkif_back_ring native;
|
||||
|
|
|
@ -2969,6 +2969,12 @@ static int btusb_probe(struct usb_interface *intf,
|
|||
if (id->driver_info & BTUSB_QCA_ROME) {
|
||||
data->setup_on_usb = btusb_setup_qca;
|
||||
hdev->set_bdaddr = btusb_set_bdaddr_ath3012;
|
||||
|
||||
/* QCA Rome devices lose their updated firmware over suspend,
|
||||
* but the USB hub doesn't notice any status change.
|
||||
* Explicitly request a device reset on resume.
|
||||
*/
|
||||
set_bit(BTUSB_RESET_RESUME, &data->flags);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BT_HCIBTUSB_RTL
|
||||
|
|
|
@ -80,11 +80,13 @@ static int p8_aes_ctr_setkey(struct crypto_tfm *tfm, const u8 *key,
|
|||
int ret;
|
||||
struct p8_aes_ctr_ctx *ctx = crypto_tfm_ctx(tfm);
|
||||
|
||||
preempt_disable();
|
||||
pagefault_disable();
|
||||
enable_kernel_altivec();
|
||||
enable_kernel_vsx();
|
||||
ret = aes_p8_set_encrypt_key(key, keylen * 8, &ctx->enc_key);
|
||||
pagefault_enable();
|
||||
preempt_enable();
|
||||
|
||||
ret += crypto_blkcipher_setkey(ctx->fallback, key, keylen);
|
||||
return ret;
|
||||
|
@ -99,11 +101,13 @@ static void p8_aes_ctr_final(struct p8_aes_ctr_ctx *ctx,
|
|||
u8 *dst = walk->dst.virt.addr;
|
||||
unsigned int nbytes = walk->nbytes;
|
||||
|
||||
preempt_disable();
|
||||
pagefault_disable();
|
||||
enable_kernel_altivec();
|
||||
enable_kernel_vsx();
|
||||
aes_p8_encrypt(ctrblk, keystream, &ctx->enc_key);
|
||||
pagefault_enable();
|
||||
preempt_enable();
|
||||
|
||||
crypto_xor(keystream, src, nbytes);
|
||||
memcpy(dst, keystream, nbytes);
|
||||
|
@ -132,6 +136,7 @@ static int p8_aes_ctr_crypt(struct blkcipher_desc *desc,
|
|||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||
ret = blkcipher_walk_virt_block(desc, &walk, AES_BLOCK_SIZE);
|
||||
while ((nbytes = walk.nbytes) >= AES_BLOCK_SIZE) {
|
||||
preempt_disable();
|
||||
pagefault_disable();
|
||||
enable_kernel_altivec();
|
||||
enable_kernel_vsx();
|
||||
|
@ -143,6 +148,7 @@ static int p8_aes_ctr_crypt(struct blkcipher_desc *desc,
|
|||
&ctx->enc_key,
|
||||
walk.iv);
|
||||
pagefault_enable();
|
||||
preempt_enable();
|
||||
|
||||
/* We need to update IV mostly for last bytes/round */
|
||||
inc = (nbytes & AES_BLOCK_MASK) / AES_BLOCK_SIZE;
|
||||
|
|
|
@ -634,6 +634,7 @@ static int dmatest_func(void *data)
|
|||
* free it this time?" dancing. For now, just
|
||||
* leave it dangling.
|
||||
*/
|
||||
WARN(1, "dmatest: Kernel stack may be corrupted!!\n");
|
||||
dmaengine_unmap_put(um);
|
||||
result("test timed out", total_tests, src_off, dst_off,
|
||||
len, 0);
|
||||
|
|
|
@ -190,6 +190,11 @@ static int palmas_usb_probe(struct platform_device *pdev)
|
|||
struct palmas_usb *palmas_usb;
|
||||
int status;
|
||||
|
||||
if (!palmas) {
|
||||
dev_err(&pdev->dev, "failed to get valid parent\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
palmas_usb = devm_kzalloc(&pdev->dev, sizeof(*palmas_usb), GFP_KERNEL);
|
||||
if (!palmas_usb)
|
||||
return -ENOMEM;
|
||||
|
|
|
@ -312,7 +312,7 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type)
|
|||
ret = drm_debugfs_init(minor, minor->index, drm_debugfs_root);
|
||||
if (ret) {
|
||||
DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n");
|
||||
return ret;
|
||||
goto err_debugfs;
|
||||
}
|
||||
|
||||
ret = device_add(minor->kdev);
|
||||
|
|
|
@ -145,6 +145,8 @@ static int mga_vram_init(struct mga_device *mdev)
|
|||
}
|
||||
|
||||
mem = pci_iomap(mdev->dev->pdev, 0, 0);
|
||||
if (!mem)
|
||||
return -ENOMEM;
|
||||
|
||||
mdev->mc.vram_size = mga_probe_vram(mdev, mem);
|
||||
|
||||
|
|
|
@ -346,6 +346,10 @@ static int vtg_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
}
|
||||
vtg->regs = devm_ioremap_nocache(dev, res->start, resource_size(res));
|
||||
if (!vtg->regs) {
|
||||
DRM_ERROR("failed to remap I/O memory\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
np = of_parse_phandle(pdev->dev.of_node, "st,slave", 0);
|
||||
if (np) {
|
||||
|
|
|
@ -708,7 +708,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
|
|||
* allocation taken by fbdev
|
||||
*/
|
||||
if (!(dev_priv->capabilities & SVGA_CAP_3D))
|
||||
mem_size *= 2;
|
||||
mem_size *= 3;
|
||||
|
||||
dev_priv->max_mob_pages = mem_size * 1024 / PAGE_SIZE;
|
||||
dev_priv->prim_bb_mem =
|
||||
|
|
|
@ -58,7 +58,7 @@ static int iio_interrupt_trigger_probe(struct platform_device *pdev)
|
|||
trig_info = kzalloc(sizeof(*trig_info), GFP_KERNEL);
|
||||
if (!trig_info) {
|
||||
ret = -ENOMEM;
|
||||
goto error_put_trigger;
|
||||
goto error_free_trigger;
|
||||
}
|
||||
iio_trigger_set_drvdata(trig, trig_info);
|
||||
trig_info->irq = irq;
|
||||
|
@ -83,8 +83,8 @@ error_release_irq:
|
|||
free_irq(irq, trig);
|
||||
error_free_trig_info:
|
||||
kfree(trig_info);
|
||||
error_put_trigger:
|
||||
iio_trigger_put(trig);
|
||||
error_free_trigger:
|
||||
iio_trigger_free(trig);
|
||||
error_ret:
|
||||
return ret;
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ static int iio_interrupt_trigger_remove(struct platform_device *pdev)
|
|||
iio_trigger_unregister(trig);
|
||||
free_irq(trig_info->irq, trig);
|
||||
kfree(trig_info);
|
||||
iio_trigger_put(trig);
|
||||
iio_trigger_free(trig);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ static int iio_sysfs_trigger_probe(int id)
|
|||
return 0;
|
||||
|
||||
out2:
|
||||
iio_trigger_put(t->trig);
|
||||
iio_trigger_free(t->trig);
|
||||
free_t:
|
||||
kfree(t);
|
||||
out1:
|
||||
|
|
|
@ -1373,7 +1373,7 @@ static void ipoib_cm_tx_reap(struct work_struct *work)
|
|||
|
||||
while (!list_empty(&priv->cm.reap_list)) {
|
||||
p = list_entry(priv->cm.reap_list.next, typeof(*p), list);
|
||||
list_del(&p->list);
|
||||
list_del_init(&p->list);
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
netif_tx_unlock_bh(dev);
|
||||
ipoib_cm_tx_destroy(p);
|
||||
|
|
|
@ -87,7 +87,8 @@ static irqreturn_t mpr_touchkey_interrupt(int irq, void *dev_id)
|
|||
struct mpr121_touchkey *mpr121 = dev_id;
|
||||
struct i2c_client *client = mpr121->client;
|
||||
struct input_dev *input = mpr121->input_dev;
|
||||
unsigned int key_num, key_val, pressed;
|
||||
unsigned long bit_changed;
|
||||
unsigned int key_num;
|
||||
int reg;
|
||||
|
||||
reg = i2c_smbus_read_byte_data(client, ELE_TOUCH_STATUS_1_ADDR);
|
||||
|
@ -105,19 +106,23 @@ static irqreturn_t mpr_touchkey_interrupt(int irq, void *dev_id)
|
|||
|
||||
reg &= TOUCH_STATUS_MASK;
|
||||
/* use old press bit to figure out which bit changed */
|
||||
key_num = ffs(reg ^ mpr121->statusbits) - 1;
|
||||
pressed = reg & (1 << key_num);
|
||||
bit_changed = reg ^ mpr121->statusbits;
|
||||
mpr121->statusbits = reg;
|
||||
for_each_set_bit(key_num, &bit_changed, mpr121->keycount) {
|
||||
unsigned int key_val, pressed;
|
||||
|
||||
key_val = mpr121->keycodes[key_num];
|
||||
pressed = reg & BIT(key_num);
|
||||
key_val = mpr121->keycodes[key_num];
|
||||
|
||||
input_event(input, EV_MSC, MSC_SCAN, key_num);
|
||||
input_report_key(input, key_val, pressed);
|
||||
input_event(input, EV_MSC, MSC_SCAN, key_num);
|
||||
input_report_key(input, key_val, pressed);
|
||||
|
||||
dev_dbg(&client->dev, "key %d %d %s\n", key_num, key_val,
|
||||
pressed ? "pressed" : "released");
|
||||
|
||||
}
|
||||
input_sync(input);
|
||||
|
||||
dev_dbg(&client->dev, "key %d %d %s\n", key_num, key_val,
|
||||
pressed ? "pressed" : "released");
|
||||
|
||||
out:
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
@ -231,6 +236,7 @@ static int mpr_touchkey_probe(struct i2c_client *client,
|
|||
input_dev->id.bustype = BUS_I2C;
|
||||
input_dev->dev.parent = &client->dev;
|
||||
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP);
|
||||
input_set_capability(input_dev, EV_MSC, MSC_SCAN);
|
||||
|
||||
input_dev->keycode = mpr121->keycodes;
|
||||
input_dev->keycodesize = sizeof(mpr121->keycodes[0]);
|
||||
|
|
|
@ -1635,13 +1635,25 @@ ims_pcu_get_cdc_union_desc(struct usb_interface *intf)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
while (buflen > 0) {
|
||||
while (buflen >= sizeof(*union_desc)) {
|
||||
union_desc = (struct usb_cdc_union_desc *)buf;
|
||||
|
||||
if (union_desc->bLength > buflen) {
|
||||
dev_err(&intf->dev, "Too large descriptor\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (union_desc->bDescriptorType == USB_DT_CS_INTERFACE &&
|
||||
union_desc->bDescriptorSubType == USB_CDC_UNION_TYPE) {
|
||||
dev_dbg(&intf->dev, "Found union header\n");
|
||||
return union_desc;
|
||||
|
||||
if (union_desc->bLength >= sizeof(*union_desc))
|
||||
return union_desc;
|
||||
|
||||
dev_err(&intf->dev,
|
||||
"Union descriptor to short (%d vs %zd\n)",
|
||||
union_desc->bLength, sizeof(*union_desc));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
buflen -= union_desc->bLength;
|
||||
|
|
|
@ -1240,6 +1240,7 @@ static const struct acpi_device_id elan_acpi_id[] = {
|
|||
{ "ELAN0605", 0 },
|
||||
{ "ELAN0609", 0 },
|
||||
{ "ELAN060B", 0 },
|
||||
{ "ELAN060C", 0 },
|
||||
{ "ELAN0611", 0 },
|
||||
{ "ELAN1000", 0 },
|
||||
{ }
|
||||
|
|
|
@ -1033,13 +1033,8 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_device *smmu, u32 sid,
|
|||
}
|
||||
}
|
||||
|
||||
/* Nuke the existing Config, as we're going to rewrite it */
|
||||
val &= ~(STRTAB_STE_0_CFG_MASK << STRTAB_STE_0_CFG_SHIFT);
|
||||
|
||||
if (ste->valid)
|
||||
val |= STRTAB_STE_0_V;
|
||||
else
|
||||
val &= ~STRTAB_STE_0_V;
|
||||
/* Nuke the existing STE_0 value, as we're going to rewrite it */
|
||||
val = ste->valid ? STRTAB_STE_0_V : 0;
|
||||
|
||||
if (ste->bypass) {
|
||||
val |= disable_bypass ? STRTAB_STE_0_CFG_ABORT
|
||||
|
@ -1068,7 +1063,6 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_device *smmu, u32 sid,
|
|||
val |= (ste->s1_cfg->cdptr_dma & STRTAB_STE_0_S1CTXPTR_MASK
|
||||
<< STRTAB_STE_0_S1CTXPTR_SHIFT) |
|
||||
STRTAB_STE_0_CFG_S1_TRANS;
|
||||
|
||||
}
|
||||
|
||||
if (ste->s2_cfg) {
|
||||
|
|
|
@ -2856,6 +2856,9 @@ static int adv76xx_parse_dt(struct adv76xx_state *state)
|
|||
state->pdata.alt_data_sat = 1;
|
||||
state->pdata.op_format_mode_sel = ADV7604_OP_FORMAT_MODE0;
|
||||
state->pdata.bus_order = ADV7604_BUS_ORDER_RGB;
|
||||
state->pdata.dr_str_data = ADV76XX_DR_STR_MEDIUM_HIGH;
|
||||
state->pdata.dr_str_clk = ADV76XX_DR_STR_MEDIUM_HIGH;
|
||||
state->pdata.dr_str_sync = ADV76XX_DR_STR_MEDIUM_HIGH;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -2419,6 +2419,11 @@ static int imon_probe(struct usb_interface *interface,
|
|||
mutex_lock(&driver_lock);
|
||||
|
||||
first_if = usb_ifnum_to_if(usbdev, 0);
|
||||
if (!first_if) {
|
||||
ret = -ENODEV;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
first_if_ctx = usb_get_intfdata(first_if);
|
||||
|
||||
if (ifnum == 0) {
|
||||
|
|
|
@ -292,7 +292,7 @@ static int stk7700P2_frontend_attach(struct dvb_usb_adapter *adap)
|
|||
stk7700d_dib7000p_mt2266_config)
|
||||
!= 0) {
|
||||
err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__);
|
||||
dvb_detach(&state->dib7000p_ops);
|
||||
dvb_detach(state->dib7000p_ops.set_wbd_ref);
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ static int stk7700d_frontend_attach(struct dvb_usb_adapter *adap)
|
|||
stk7700d_dib7000p_mt2266_config)
|
||||
!= 0) {
|
||||
err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__);
|
||||
dvb_detach(&state->dib7000p_ops);
|
||||
dvb_detach(state->dib7000p_ops.set_wbd_ref);
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
|
@ -479,7 +479,7 @@ static int stk7700ph_frontend_attach(struct dvb_usb_adapter *adap)
|
|||
&stk7700ph_dib7700_xc3028_config) != 0) {
|
||||
err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n",
|
||||
__func__);
|
||||
dvb_detach(&state->dib7000p_ops);
|
||||
dvb_detach(state->dib7000p_ops.set_wbd_ref);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -1010,7 +1010,7 @@ static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap)
|
|||
&dib7070p_dib7000p_config) != 0) {
|
||||
err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n",
|
||||
__func__);
|
||||
dvb_detach(&state->dib7000p_ops);
|
||||
dvb_detach(state->dib7000p_ops.set_wbd_ref);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -1068,7 +1068,7 @@ static int stk7770p_frontend_attach(struct dvb_usb_adapter *adap)
|
|||
&dib7770p_dib7000p_config) != 0) {
|
||||
err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n",
|
||||
__func__);
|
||||
dvb_detach(&state->dib7000p_ops);
|
||||
dvb_detach(state->dib7000p_ops.set_wbd_ref);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -3036,7 +3036,7 @@ static int nim7090_frontend_attach(struct dvb_usb_adapter *adap)
|
|||
|
||||
if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, &nim7090_dib7000p_config) != 0) {
|
||||
err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__);
|
||||
dvb_detach(&state->dib7000p_ops);
|
||||
dvb_detach(state->dib7000p_ops.set_wbd_ref);
|
||||
return -ENODEV;
|
||||
}
|
||||
adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &nim7090_dib7000p_config);
|
||||
|
@ -3089,7 +3089,7 @@ static int tfe7090pvr_frontend0_attach(struct dvb_usb_adapter *adap)
|
|||
/* initialize IC 0 */
|
||||
if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, &tfe7090pvr_dib7000p_config[0]) != 0) {
|
||||
err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__);
|
||||
dvb_detach(&state->dib7000p_ops);
|
||||
dvb_detach(state->dib7000p_ops.set_wbd_ref);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -3119,7 +3119,7 @@ static int tfe7090pvr_frontend1_attach(struct dvb_usb_adapter *adap)
|
|||
i2c = state->dib7000p_ops.get_i2c_master(adap->dev->adapter[0].fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_6_7, 1);
|
||||
if (state->dib7000p_ops.i2c_enumeration(i2c, 1, 0x10, &tfe7090pvr_dib7000p_config[1]) != 0) {
|
||||
err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__);
|
||||
dvb_detach(&state->dib7000p_ops);
|
||||
dvb_detach(state->dib7000p_ops.set_wbd_ref);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -3194,7 +3194,7 @@ static int tfe7790p_frontend_attach(struct dvb_usb_adapter *adap)
|
|||
1, 0x10, &tfe7790p_dib7000p_config) != 0) {
|
||||
err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n",
|
||||
__func__);
|
||||
dvb_detach(&state->dib7000p_ops);
|
||||
dvb_detach(state->dib7000p_ops.set_wbd_ref);
|
||||
return -ENODEV;
|
||||
}
|
||||
adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap,
|
||||
|
@ -3289,7 +3289,7 @@ static int stk7070pd_frontend_attach0(struct dvb_usb_adapter *adap)
|
|||
stk7070pd_dib7000p_config) != 0) {
|
||||
err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n",
|
||||
__func__);
|
||||
dvb_detach(&state->dib7000p_ops);
|
||||
dvb_detach(state->dib7000p_ops.set_wbd_ref);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -3364,7 +3364,7 @@ static int novatd_frontend_attach(struct dvb_usb_adapter *adap)
|
|||
stk7070pd_dib7000p_config) != 0) {
|
||||
err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n",
|
||||
__func__);
|
||||
dvb_detach(&state->dib7000p_ops);
|
||||
dvb_detach(state->dib7000p_ops.set_wbd_ref);
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
|
@ -3600,7 +3600,7 @@ static int pctv340e_frontend_attach(struct dvb_usb_adapter *adap)
|
|||
|
||||
if (state->dib7000p_ops.dib7000pc_detection(&adap->dev->i2c_adap) == 0) {
|
||||
/* Demodulator not found for some reason? */
|
||||
dvb_detach(&state->dib7000p_ops);
|
||||
dvb_detach(state->dib7000p_ops.set_wbd_ref);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,6 @@ static int c_can_pci_probe(struct pci_dev *pdev,
|
|||
break;
|
||||
case BOSCH_D_CAN:
|
||||
priv->regs = reg_map_d_can;
|
||||
priv->can.ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES;
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
|
|
|
@ -320,7 +320,6 @@ static int c_can_plat_probe(struct platform_device *pdev)
|
|||
break;
|
||||
case BOSCH_D_CAN:
|
||||
priv->regs = reg_map_d_can;
|
||||
priv->can.ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES;
|
||||
priv->read_reg = c_can_plat_read_reg_aligned_to_16bit;
|
||||
priv->write_reg = c_can_plat_write_reg_aligned_to_16bit;
|
||||
priv->read_reg32 = d_can_plat_read_reg32;
|
||||
|
|
|
@ -539,6 +539,13 @@ static int sun4i_can_err(struct net_device *dev, u8 isrc, u8 status)
|
|||
}
|
||||
stats->rx_over_errors++;
|
||||
stats->rx_errors++;
|
||||
|
||||
/* reset the CAN IP by entering reset mode
|
||||
* ignoring timeout error
|
||||
*/
|
||||
set_reset_mode(dev);
|
||||
set_normal_mode(dev);
|
||||
|
||||
/* clear bit */
|
||||
sun4i_can_write_cmdreg(priv, SUN4I_CMD_CLEAR_OR_FLAG);
|
||||
}
|
||||
|
@ -653,8 +660,9 @@ static irqreturn_t sun4i_can_interrupt(int irq, void *dev_id)
|
|||
netif_wake_queue(dev);
|
||||
can_led_event(dev, CAN_LED_EVENT_TX);
|
||||
}
|
||||
if (isrc & SUN4I_INT_RBUF_VLD) {
|
||||
/* receive interrupt */
|
||||
if ((isrc & SUN4I_INT_RBUF_VLD) &&
|
||||
!(isrc & SUN4I_INT_DATA_OR)) {
|
||||
/* receive interrupt - don't read if overrun occurred */
|
||||
while (status & SUN4I_STA_RBUF_RDY) {
|
||||
/* RX buffer is not empty */
|
||||
sun4i_can_rx(dev);
|
||||
|
|
|
@ -2002,9 +2002,10 @@ static void fm10k_sm_mbx_create_reply(struct fm10k_hw *hw,
|
|||
* function can also be used to respond to an error as the connection
|
||||
* resetting would also be a means of dealing with errors.
|
||||
**/
|
||||
static void fm10k_sm_mbx_process_reset(struct fm10k_hw *hw,
|
||||
struct fm10k_mbx_info *mbx)
|
||||
static s32 fm10k_sm_mbx_process_reset(struct fm10k_hw *hw,
|
||||
struct fm10k_mbx_info *mbx)
|
||||
{
|
||||
s32 err = 0;
|
||||
const enum fm10k_mbx_state state = mbx->state;
|
||||
|
||||
switch (state) {
|
||||
|
@ -2017,6 +2018,7 @@ static void fm10k_sm_mbx_process_reset(struct fm10k_hw *hw,
|
|||
case FM10K_STATE_OPEN:
|
||||
/* flush any incomplete work */
|
||||
fm10k_sm_mbx_connect_reset(mbx);
|
||||
err = FM10K_ERR_RESET_REQUESTED;
|
||||
break;
|
||||
case FM10K_STATE_CONNECT:
|
||||
/* Update remote value to match local value */
|
||||
|
@ -2026,6 +2028,8 @@ static void fm10k_sm_mbx_process_reset(struct fm10k_hw *hw,
|
|||
}
|
||||
|
||||
fm10k_sm_mbx_create_reply(hw, mbx, mbx->tail);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2106,7 +2110,7 @@ static s32 fm10k_sm_mbx_process(struct fm10k_hw *hw,
|
|||
|
||||
switch (FM10K_MSG_HDR_FIELD_GET(mbx->mbx_hdr, SM_VER)) {
|
||||
case 0:
|
||||
fm10k_sm_mbx_process_reset(hw, mbx);
|
||||
err = fm10k_sm_mbx_process_reset(hw, mbx);
|
||||
break;
|
||||
case FM10K_SM_MBX_VERSION:
|
||||
err = fm10k_sm_mbx_process_version_1(hw, mbx);
|
||||
|
|
|
@ -1072,6 +1072,7 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data)
|
|||
struct fm10k_hw *hw = &interface->hw;
|
||||
struct fm10k_mbx_info *mbx = &hw->mbx;
|
||||
u32 eicr;
|
||||
s32 err = 0;
|
||||
|
||||
/* unmask any set bits related to this interrupt */
|
||||
eicr = fm10k_read_reg(hw, FM10K_EICR);
|
||||
|
@ -1087,12 +1088,15 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data)
|
|||
|
||||
/* service mailboxes */
|
||||
if (fm10k_mbx_trylock(interface)) {
|
||||
mbx->ops.process(hw, mbx);
|
||||
err = mbx->ops.process(hw, mbx);
|
||||
/* handle VFLRE events */
|
||||
fm10k_iov_event(interface);
|
||||
fm10k_mbx_unlock(interface);
|
||||
}
|
||||
|
||||
if (err == FM10K_ERR_RESET_REQUESTED)
|
||||
interface->flags |= FM10K_FLAG_RESET_REQUESTED;
|
||||
|
||||
/* if switch toggled state we should reset GLORTs */
|
||||
if (eicr & FM10K_EICR_SWITCHNOTREADY) {
|
||||
/* force link down for at least 4 seconds */
|
||||
|
|
|
@ -223,6 +223,17 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw)
|
|||
hw->bus.func = (rd32(E1000_STATUS) & E1000_STATUS_FUNC_MASK) >>
|
||||
E1000_STATUS_FUNC_SHIFT;
|
||||
|
||||
/* Make sure the PHY is in a good state. Several people have reported
|
||||
* firmware leaving the PHY's page select register set to something
|
||||
* other than the default of zero, which causes the PHY ID read to
|
||||
* access something other than the intended register.
|
||||
*/
|
||||
ret_val = hw->phy.ops.reset(hw);
|
||||
if (ret_val) {
|
||||
hw_dbg("Error resetting the PHY.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Set phy->phy_addr and phy->id. */
|
||||
ret_val = igb_get_phy_id_82575(hw);
|
||||
if (ret_val)
|
||||
|
|
|
@ -699,9 +699,9 @@ static s32 igb_update_flash_i210(struct e1000_hw *hw)
|
|||
|
||||
ret_val = igb_pool_flash_update_done_i210(hw);
|
||||
if (ret_val)
|
||||
hw_dbg("Flash update complete\n");
|
||||
else
|
||||
hw_dbg("Flash update time out\n");
|
||||
else
|
||||
hw_dbg("Flash update complete\n");
|
||||
|
||||
out:
|
||||
return ret_val;
|
||||
|
|
|
@ -3172,7 +3172,9 @@ static int __igb_close(struct net_device *netdev, bool suspending)
|
|||
|
||||
static int igb_close(struct net_device *netdev)
|
||||
{
|
||||
return __igb_close(netdev, false);
|
||||
if (netif_device_present(netdev))
|
||||
return __igb_close(netdev, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7325,12 +7327,14 @@ static int __igb_shutdown(struct pci_dev *pdev, bool *enable_wake,
|
|||
int retval = 0;
|
||||
#endif
|
||||
|
||||
rtnl_lock();
|
||||
netif_device_detach(netdev);
|
||||
|
||||
if (netif_running(netdev))
|
||||
__igb_close(netdev, true);
|
||||
|
||||
igb_clear_interrupt_scheme(adapter);
|
||||
rtnl_unlock();
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
retval = pci_save_state(pdev);
|
||||
|
@ -7450,16 +7454,15 @@ static int igb_resume(struct device *dev)
|
|||
|
||||
wr32(E1000_WUS, ~0);
|
||||
|
||||
if (netdev->flags & IFF_UP) {
|
||||
rtnl_lock();
|
||||
rtnl_lock();
|
||||
if (!err && netif_running(netdev))
|
||||
err = __igb_open(netdev, true);
|
||||
rtnl_unlock();
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
netif_device_attach(netdev);
|
||||
return 0;
|
||||
if (!err)
|
||||
netif_device_attach(netdev);
|
||||
rtnl_unlock();
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static int igb_runtime_idle(struct device *dev)
|
||||
|
|
|
@ -307,6 +307,7 @@ static void ixgbe_cache_ring_register(struct ixgbe_adapter *adapter)
|
|||
ixgbe_cache_ring_rss(adapter);
|
||||
}
|
||||
|
||||
#define IXGBE_RSS_64Q_MASK 0x3F
|
||||
#define IXGBE_RSS_16Q_MASK 0xF
|
||||
#define IXGBE_RSS_8Q_MASK 0x7
|
||||
#define IXGBE_RSS_4Q_MASK 0x3
|
||||
|
@ -602,6 +603,7 @@ static bool ixgbe_set_sriov_queues(struct ixgbe_adapter *adapter)
|
|||
**/
|
||||
static bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
|
||||
{
|
||||
struct ixgbe_hw *hw = &adapter->hw;
|
||||
struct ixgbe_ring_feature *f;
|
||||
u16 rss_i;
|
||||
|
||||
|
@ -610,7 +612,11 @@ static bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
|
|||
rss_i = f->limit;
|
||||
|
||||
f->indices = rss_i;
|
||||
f->mask = IXGBE_RSS_16Q_MASK;
|
||||
|
||||
if (hw->mac.type < ixgbe_mac_X550)
|
||||
f->mask = IXGBE_RSS_16Q_MASK;
|
||||
else
|
||||
f->mask = IXGBE_RSS_64Q_MASK;
|
||||
|
||||
/* disable ATR by default, it will be configured below */
|
||||
adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE;
|
||||
|
|
|
@ -5878,7 +5878,8 @@ static int ixgbe_close(struct net_device *netdev)
|
|||
|
||||
ixgbe_ptp_stop(adapter);
|
||||
|
||||
ixgbe_close_suspend(adapter);
|
||||
if (netif_device_present(netdev))
|
||||
ixgbe_close_suspend(adapter);
|
||||
|
||||
ixgbe_fdir_filter_exit(adapter);
|
||||
|
||||
|
@ -5923,14 +5924,12 @@ static int ixgbe_resume(struct pci_dev *pdev)
|
|||
if (!err && netif_running(netdev))
|
||||
err = ixgbe_open(netdev);
|
||||
|
||||
|
||||
if (!err)
|
||||
netif_device_attach(netdev);
|
||||
rtnl_unlock();
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
netif_device_attach(netdev);
|
||||
|
||||
return 0;
|
||||
return err;
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
|
@ -5945,14 +5944,14 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
|
|||
int retval = 0;
|
||||
#endif
|
||||
|
||||
rtnl_lock();
|
||||
netif_device_detach(netdev);
|
||||
|
||||
rtnl_lock();
|
||||
if (netif_running(netdev))
|
||||
ixgbe_close_suspend(adapter);
|
||||
rtnl_unlock();
|
||||
|
||||
ixgbe_clear_interrupt_scheme(adapter);
|
||||
rtnl_unlock();
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
retval = pci_save_state(pdev);
|
||||
|
@ -9221,7 +9220,7 @@ skip_bad_vf_detection:
|
|||
}
|
||||
|
||||
if (netif_running(netdev))
|
||||
ixgbe_down(adapter);
|
||||
ixgbe_close_suspend(adapter);
|
||||
|
||||
if (!test_and_set_bit(__IXGBE_DISABLED, &adapter->state))
|
||||
pci_disable_device(pdev);
|
||||
|
@ -9291,10 +9290,12 @@ static void ixgbe_io_resume(struct pci_dev *pdev)
|
|||
}
|
||||
|
||||
#endif
|
||||
rtnl_lock();
|
||||
if (netif_running(netdev))
|
||||
ixgbe_up(adapter);
|
||||
ixgbe_open(netdev);
|
||||
|
||||
netif_device_attach(netdev);
|
||||
rtnl_unlock();
|
||||
}
|
||||
|
||||
static const struct pci_error_handlers ixgbe_err_handler = {
|
||||
|
|
|
@ -113,7 +113,7 @@ static s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr,
|
|||
u16 reg, u16 *val, bool lock)
|
||||
{
|
||||
u32 swfw_mask = hw->phy.phy_semaphore_mask;
|
||||
int max_retry = 10;
|
||||
int max_retry = 3;
|
||||
int retry = 0;
|
||||
u8 csum_byte;
|
||||
u8 high_bits;
|
||||
|
@ -1764,6 +1764,8 @@ static s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset,
|
|||
u32 swfw_mask = hw->phy.phy_semaphore_mask;
|
||||
bool nack = true;
|
||||
|
||||
if (hw->mac.type >= ixgbe_mac_X550)
|
||||
max_retry = 3;
|
||||
if (ixgbe_is_sfp_probe(hw, byte_offset, dev_addr))
|
||||
max_retry = IXGBE_SFP_DETECT_RETRIES;
|
||||
|
||||
|
|
|
@ -1643,8 +1643,6 @@ static s32 ixgbe_setup_kr_speed_x550em(struct ixgbe_hw *hw,
|
|||
return status;
|
||||
|
||||
reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_ENABLE;
|
||||
reg_val &= ~(IXGBE_KRM_LINK_CTRL_1_TETH_AN_FEC_REQ |
|
||||
IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_FEC);
|
||||
reg_val &= ~(IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_KR |
|
||||
IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_KX);
|
||||
|
||||
|
|
|
@ -1117,6 +1117,8 @@ static long macvtap_ioctl(struct file *file, unsigned int cmd,
|
|||
case TUNSETSNDBUF:
|
||||
if (get_user(s, sp))
|
||||
return -EFAULT;
|
||||
if (s <= 0)
|
||||
return -EINVAL;
|
||||
|
||||
q->sk.sk_sndbuf = s;
|
||||
return 0;
|
||||
|
|
|
@ -1110,7 +1110,17 @@ ppp_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats64)
|
|||
static struct lock_class_key ppp_tx_busylock;
|
||||
static int ppp_dev_init(struct net_device *dev)
|
||||
{
|
||||
struct ppp *ppp;
|
||||
|
||||
dev->qdisc_tx_busylock = &ppp_tx_busylock;
|
||||
|
||||
ppp = netdev_priv(dev);
|
||||
/* Let the netdevice take a reference on the ppp file. This ensures
|
||||
* that ppp_destroy_interface() won't run before the device gets
|
||||
* unregistered.
|
||||
*/
|
||||
atomic_inc(&ppp->file.refcnt);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1133,6 +1143,15 @@ static void ppp_dev_uninit(struct net_device *dev)
|
|||
wake_up_interruptible(&ppp->file.rwait);
|
||||
}
|
||||
|
||||
static void ppp_dev_priv_destructor(struct net_device *dev)
|
||||
{
|
||||
struct ppp *ppp;
|
||||
|
||||
ppp = netdev_priv(dev);
|
||||
if (atomic_dec_and_test(&ppp->file.refcnt))
|
||||
ppp_destroy_interface(ppp);
|
||||
}
|
||||
|
||||
static const struct net_device_ops ppp_netdev_ops = {
|
||||
.ndo_init = ppp_dev_init,
|
||||
.ndo_uninit = ppp_dev_uninit,
|
||||
|
@ -1150,6 +1169,7 @@ static void ppp_setup(struct net_device *dev)
|
|||
dev->tx_queue_len = 3;
|
||||
dev->type = ARPHRD_PPP;
|
||||
dev->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
|
||||
dev->destructor = ppp_dev_priv_destructor;
|
||||
netif_keep_dst(dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -1684,6 +1684,9 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
|
|||
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
err = dev_get_valid_name(net, dev, name);
|
||||
if (err < 0)
|
||||
goto err_free_dev;
|
||||
|
||||
dev_net_set(dev, net);
|
||||
dev->rtnl_link_ops = &tun_link_ops;
|
||||
|
@ -2065,6 +2068,10 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
|
|||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
if (sndbuf <= 0) {
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
tun->sndbuf = sndbuf;
|
||||
tun_set_sndbuf(tun);
|
||||
|
|
|
@ -221,7 +221,7 @@ skip:
|
|||
goto bad_desc;
|
||||
}
|
||||
|
||||
if (header.usb_cdc_ether_desc) {
|
||||
if (header.usb_cdc_ether_desc && info->ether->wMaxSegmentSize) {
|
||||
dev->hard_mtu = le16_to_cpu(info->ether->wMaxSegmentSize);
|
||||
/* because of Zaurus, we may be ignoring the host
|
||||
* side link address we were given.
|
||||
|
|
|
@ -724,8 +724,10 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
|
|||
u8 *buf;
|
||||
int len;
|
||||
int temp;
|
||||
int err;
|
||||
u8 iface_no;
|
||||
struct usb_cdc_parsed_header hdr;
|
||||
u16 curr_ntb_format;
|
||||
|
||||
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
|
||||
if (!ctx)
|
||||
|
@ -823,6 +825,32 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
|
|||
goto error2;
|
||||
}
|
||||
|
||||
/*
|
||||
* Some Huawei devices have been observed to come out of reset in NDP32 mode.
|
||||
* Let's check if this is the case, and set the device to NDP16 mode again if
|
||||
* needed.
|
||||
*/
|
||||
if (ctx->drvflags & CDC_NCM_FLAG_RESET_NTB16) {
|
||||
err = usbnet_read_cmd(dev, USB_CDC_GET_NTB_FORMAT,
|
||||
USB_TYPE_CLASS | USB_DIR_IN | USB_RECIP_INTERFACE,
|
||||
0, iface_no, &curr_ntb_format, 2);
|
||||
if (err < 0) {
|
||||
goto error2;
|
||||
}
|
||||
|
||||
if (curr_ntb_format == USB_CDC_NCM_NTB32_FORMAT) {
|
||||
dev_info(&intf->dev, "resetting NTB format to 16-bit");
|
||||
err = usbnet_write_cmd(dev, USB_CDC_SET_NTB_FORMAT,
|
||||
USB_TYPE_CLASS | USB_DIR_OUT
|
||||
| USB_RECIP_INTERFACE,
|
||||
USB_CDC_NCM_NTB16_FORMAT,
|
||||
iface_no, NULL, 0);
|
||||
|
||||
if (err < 0)
|
||||
goto error2;
|
||||
}
|
||||
}
|
||||
|
||||
cdc_ncm_find_endpoints(dev, ctx->data);
|
||||
cdc_ncm_find_endpoints(dev, ctx->control);
|
||||
if (!dev->in || !dev->out || !dev->status) {
|
||||
|
|
|
@ -80,6 +80,12 @@ static int huawei_cdc_ncm_bind(struct usbnet *usbnet_dev,
|
|||
* be at the end of the frame.
|
||||
*/
|
||||
drvflags |= CDC_NCM_FLAG_NDP_TO_END;
|
||||
|
||||
/* Additionally, it has been reported that some Huawei E3372H devices, with
|
||||
* firmware version 21.318.01.00.541, come out of reset in NTB32 format mode, hence
|
||||
* needing to be set to the NTB16 one again.
|
||||
*/
|
||||
drvflags |= CDC_NCM_FLAG_RESET_NTB16;
|
||||
ret = cdc_ncm_bind_common(usbnet_dev, intf, 1, drvflags);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
|
|
@ -262,7 +262,7 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
|
|||
}
|
||||
|
||||
/* errors aren't fatal - we can live with the dynamic address */
|
||||
if (cdc_ether) {
|
||||
if (cdc_ether && cdc_ether->wMaxSegmentSize) {
|
||||
dev->hard_mtu = le16_to_cpu(cdc_ether->wMaxSegmentSize);
|
||||
usbnet_get_ethernet_addr(dev, cdc_ether->iMACAddress);
|
||||
}
|
||||
|
|
|
@ -4295,9 +4295,6 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
|
|||
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 0);
|
||||
if (err < 0)
|
||||
brcmf_err("setting AP mode failed %d\n", err);
|
||||
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_INFRA, 0);
|
||||
if (err < 0)
|
||||
brcmf_err("setting INFRA mode failed %d\n", err);
|
||||
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS))
|
||||
brcmf_fil_iovar_int_set(ifp, "mbss", 0);
|
||||
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY,
|
||||
|
|
|
@ -67,6 +67,7 @@ module_param(rx_drain_timeout_msecs, uint, 0444);
|
|||
unsigned int rx_stall_timeout_msecs = 60000;
|
||||
module_param(rx_stall_timeout_msecs, uint, 0444);
|
||||
|
||||
#define MAX_QUEUES_DEFAULT 8
|
||||
unsigned int xenvif_max_queues;
|
||||
module_param_named(max_queues, xenvif_max_queues, uint, 0644);
|
||||
MODULE_PARM_DESC(max_queues,
|
||||
|
@ -2157,11 +2158,12 @@ static int __init netback_init(void)
|
|||
if (!xen_domain())
|
||||
return -ENODEV;
|
||||
|
||||
/* Allow as many queues as there are CPUs if user has not
|
||||
/* Allow as many queues as there are CPUs but max. 8 if user has not
|
||||
* specified a value.
|
||||
*/
|
||||
if (xenvif_max_queues == 0)
|
||||
xenvif_max_queues = num_online_cpus();
|
||||
xenvif_max_queues = min_t(unsigned int, MAX_QUEUES_DEFAULT,
|
||||
num_online_cpus());
|
||||
|
||||
if (fatal_skb_slots < XEN_NETBK_LEGACY_SLOTS_MAX) {
|
||||
pr_info("fatal_skb_slots too small (%d), bump it to XEN_NETBK_LEGACY_SLOTS_MAX (%d)\n",
|
||||
|
|
|
@ -131,6 +131,12 @@ struct mvebu_pcie {
|
|||
int nports;
|
||||
};
|
||||
|
||||
struct mvebu_pcie_window {
|
||||
phys_addr_t base;
|
||||
phys_addr_t remap;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
/* Structure representing one PCIe interface */
|
||||
struct mvebu_pcie_port {
|
||||
char *name;
|
||||
|
@ -148,10 +154,8 @@ struct mvebu_pcie_port {
|
|||
struct mvebu_sw_pci_bridge bridge;
|
||||
struct device_node *dn;
|
||||
struct mvebu_pcie *pcie;
|
||||
phys_addr_t memwin_base;
|
||||
size_t memwin_size;
|
||||
phys_addr_t iowin_base;
|
||||
size_t iowin_size;
|
||||
struct mvebu_pcie_window memwin;
|
||||
struct mvebu_pcie_window iowin;
|
||||
u32 saved_pcie_stat;
|
||||
};
|
||||
|
||||
|
@ -377,23 +381,45 @@ static void mvebu_pcie_add_windows(struct mvebu_pcie_port *port,
|
|||
}
|
||||
}
|
||||
|
||||
static void mvebu_pcie_set_window(struct mvebu_pcie_port *port,
|
||||
unsigned int target, unsigned int attribute,
|
||||
const struct mvebu_pcie_window *desired,
|
||||
struct mvebu_pcie_window *cur)
|
||||
{
|
||||
if (desired->base == cur->base && desired->remap == cur->remap &&
|
||||
desired->size == cur->size)
|
||||
return;
|
||||
|
||||
if (cur->size != 0) {
|
||||
mvebu_pcie_del_windows(port, cur->base, cur->size);
|
||||
cur->size = 0;
|
||||
cur->base = 0;
|
||||
|
||||
/*
|
||||
* If something tries to change the window while it is enabled
|
||||
* the change will not be done atomically. That would be
|
||||
* difficult to do in the general case.
|
||||
*/
|
||||
}
|
||||
|
||||
if (desired->size == 0)
|
||||
return;
|
||||
|
||||
mvebu_pcie_add_windows(port, target, attribute, desired->base,
|
||||
desired->size, desired->remap);
|
||||
*cur = *desired;
|
||||
}
|
||||
|
||||
static void mvebu_pcie_handle_iobase_change(struct mvebu_pcie_port *port)
|
||||
{
|
||||
phys_addr_t iobase;
|
||||
struct mvebu_pcie_window desired = {};
|
||||
|
||||
/* Are the new iobase/iolimit values invalid? */
|
||||
if (port->bridge.iolimit < port->bridge.iobase ||
|
||||
port->bridge.iolimitupper < port->bridge.iobaseupper ||
|
||||
!(port->bridge.command & PCI_COMMAND_IO)) {
|
||||
|
||||
/* If a window was configured, remove it */
|
||||
if (port->iowin_base) {
|
||||
mvebu_pcie_del_windows(port, port->iowin_base,
|
||||
port->iowin_size);
|
||||
port->iowin_base = 0;
|
||||
port->iowin_size = 0;
|
||||
}
|
||||
|
||||
mvebu_pcie_set_window(port, port->io_target, port->io_attr,
|
||||
&desired, &port->iowin);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -410,32 +436,27 @@ static void mvebu_pcie_handle_iobase_change(struct mvebu_pcie_port *port)
|
|||
* specifications. iobase is the bus address, port->iowin_base
|
||||
* is the CPU address.
|
||||
*/
|
||||
iobase = ((port->bridge.iobase & 0xF0) << 8) |
|
||||
(port->bridge.iobaseupper << 16);
|
||||
port->iowin_base = port->pcie->io.start + iobase;
|
||||
port->iowin_size = ((0xFFF | ((port->bridge.iolimit & 0xF0) << 8) |
|
||||
(port->bridge.iolimitupper << 16)) -
|
||||
iobase) + 1;
|
||||
desired.remap = ((port->bridge.iobase & 0xF0) << 8) |
|
||||
(port->bridge.iobaseupper << 16);
|
||||
desired.base = port->pcie->io.start + desired.remap;
|
||||
desired.size = ((0xFFF | ((port->bridge.iolimit & 0xF0) << 8) |
|
||||
(port->bridge.iolimitupper << 16)) -
|
||||
desired.remap) +
|
||||
1;
|
||||
|
||||
mvebu_pcie_add_windows(port, port->io_target, port->io_attr,
|
||||
port->iowin_base, port->iowin_size,
|
||||
iobase);
|
||||
mvebu_pcie_set_window(port, port->io_target, port->io_attr, &desired,
|
||||
&port->iowin);
|
||||
}
|
||||
|
||||
static void mvebu_pcie_handle_membase_change(struct mvebu_pcie_port *port)
|
||||
{
|
||||
struct mvebu_pcie_window desired = {.remap = MVEBU_MBUS_NO_REMAP};
|
||||
|
||||
/* Are the new membase/memlimit values invalid? */
|
||||
if (port->bridge.memlimit < port->bridge.membase ||
|
||||
!(port->bridge.command & PCI_COMMAND_MEMORY)) {
|
||||
|
||||
/* If a window was configured, remove it */
|
||||
if (port->memwin_base) {
|
||||
mvebu_pcie_del_windows(port, port->memwin_base,
|
||||
port->memwin_size);
|
||||
port->memwin_base = 0;
|
||||
port->memwin_size = 0;
|
||||
}
|
||||
|
||||
mvebu_pcie_set_window(port, port->mem_target, port->mem_attr,
|
||||
&desired, &port->memwin);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -445,14 +466,12 @@ static void mvebu_pcie_handle_membase_change(struct mvebu_pcie_port *port)
|
|||
* window to setup, according to the PCI-to-PCI bridge
|
||||
* specifications.
|
||||
*/
|
||||
port->memwin_base = ((port->bridge.membase & 0xFFF0) << 16);
|
||||
port->memwin_size =
|
||||
(((port->bridge.memlimit & 0xFFF0) << 16) | 0xFFFFF) -
|
||||
port->memwin_base + 1;
|
||||
desired.base = ((port->bridge.membase & 0xFFF0) << 16);
|
||||
desired.size = (((port->bridge.memlimit & 0xFFF0) << 16) | 0xFFFFF) -
|
||||
desired.base + 1;
|
||||
|
||||
mvebu_pcie_add_windows(port, port->mem_target, port->mem_attr,
|
||||
port->memwin_base, port->memwin_size,
|
||||
MVEBU_MBUS_NO_REMAP);
|
||||
mvebu_pcie_set_window(port, port->mem_target, port->mem_attr, &desired,
|
||||
&port->memwin);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -249,7 +249,7 @@ static int hp_wmi_display_state(void)
|
|||
int ret = hp_wmi_perform_query(HPWMI_DISPLAY_QUERY, 0, &state,
|
||||
sizeof(state), sizeof(state));
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
return ret < 0 ? ret : -EINVAL;
|
||||
return state;
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ static int hp_wmi_hddtemp_state(void)
|
|||
int ret = hp_wmi_perform_query(HPWMI_HDDTEMP_QUERY, 0, &state,
|
||||
sizeof(state), sizeof(state));
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
return ret < 0 ? ret : -EINVAL;
|
||||
return state;
|
||||
}
|
||||
|
||||
|
@ -269,7 +269,7 @@ static int hp_wmi_als_state(void)
|
|||
int ret = hp_wmi_perform_query(HPWMI_ALS_QUERY, 0, &state,
|
||||
sizeof(state), sizeof(state));
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
return ret < 0 ? ret : -EINVAL;
|
||||
return state;
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ static int hp_wmi_dock_state(void)
|
|||
sizeof(state), sizeof(state));
|
||||
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
return ret < 0 ? ret : -EINVAL;
|
||||
|
||||
return state & 0x1;
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ static int hp_wmi_tablet_state(void)
|
|||
int ret = hp_wmi_perform_query(HPWMI_HARDWARE_QUERY, 0, &state,
|
||||
sizeof(state), sizeof(state));
|
||||
if (ret)
|
||||
return ret;
|
||||
return ret < 0 ? ret : -EINVAL;
|
||||
|
||||
return (state & 0x4) ? 1 : 0;
|
||||
}
|
||||
|
@ -324,7 +324,7 @@ static int __init hp_wmi_enable_hotkeys(void)
|
|||
int ret = hp_wmi_perform_query(HPWMI_BIOS_QUERY, 1, &value,
|
||||
sizeof(value), 0);
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
return ret < 0 ? ret : -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -337,7 +337,7 @@ static int hp_wmi_set_block(void *data, bool blocked)
|
|||
ret = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1,
|
||||
&query, sizeof(query), 0);
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
return ret < 0 ? ret : -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -429,7 +429,7 @@ static int hp_wmi_post_code_state(void)
|
|||
int ret = hp_wmi_perform_query(HPWMI_POSTCODEERROR_QUERY, 0, &state,
|
||||
sizeof(state), sizeof(state));
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
return ret < 0 ? ret : -EINVAL;
|
||||
return state;
|
||||
}
|
||||
|
||||
|
@ -495,7 +495,7 @@ static ssize_t set_als(struct device *dev, struct device_attribute *attr,
|
|||
int ret = hp_wmi_perform_query(HPWMI_ALS_QUERY, 1, &tmp,
|
||||
sizeof(tmp), sizeof(tmp));
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
return ret < 0 ? ret : -EINVAL;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
@ -516,7 +516,7 @@ static ssize_t set_postcode(struct device *dev, struct device_attribute *attr,
|
|||
ret = hp_wmi_perform_query(HPWMI_POSTCODEERROR_QUERY, 1, &tmp,
|
||||
sizeof(tmp), sizeof(tmp));
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
return ret < 0 ? ret : -EINVAL;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
@ -573,10 +573,12 @@ static void hp_wmi_notify(u32 value, void *context)
|
|||
|
||||
switch (event_id) {
|
||||
case HPWMI_DOCK_EVENT:
|
||||
input_report_switch(hp_wmi_input_dev, SW_DOCK,
|
||||
hp_wmi_dock_state());
|
||||
input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
|
||||
hp_wmi_tablet_state());
|
||||
if (test_bit(SW_DOCK, hp_wmi_input_dev->swbit))
|
||||
input_report_switch(hp_wmi_input_dev, SW_DOCK,
|
||||
hp_wmi_dock_state());
|
||||
if (test_bit(SW_TABLET_MODE, hp_wmi_input_dev->swbit))
|
||||
input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
|
||||
hp_wmi_tablet_state());
|
||||
input_sync(hp_wmi_input_dev);
|
||||
break;
|
||||
case HPWMI_PARK_HDD:
|
||||
|
@ -649,6 +651,7 @@ static int __init hp_wmi_input_setup(void)
|
|||
{
|
||||
acpi_status status;
|
||||
int err;
|
||||
int val;
|
||||
|
||||
hp_wmi_input_dev = input_allocate_device();
|
||||
if (!hp_wmi_input_dev)
|
||||
|
@ -659,17 +662,26 @@ static int __init hp_wmi_input_setup(void)
|
|||
hp_wmi_input_dev->id.bustype = BUS_HOST;
|
||||
|
||||
__set_bit(EV_SW, hp_wmi_input_dev->evbit);
|
||||
__set_bit(SW_DOCK, hp_wmi_input_dev->swbit);
|
||||
__set_bit(SW_TABLET_MODE, hp_wmi_input_dev->swbit);
|
||||
|
||||
/* Dock */
|
||||
val = hp_wmi_dock_state();
|
||||
if (!(val < 0)) {
|
||||
__set_bit(SW_DOCK, hp_wmi_input_dev->swbit);
|
||||
input_report_switch(hp_wmi_input_dev, SW_DOCK, val);
|
||||
}
|
||||
|
||||
/* Tablet mode */
|
||||
val = hp_wmi_tablet_state();
|
||||
if (!(val < 0)) {
|
||||
__set_bit(SW_TABLET_MODE, hp_wmi_input_dev->swbit);
|
||||
input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE, val);
|
||||
}
|
||||
|
||||
err = sparse_keymap_setup(hp_wmi_input_dev, hp_wmi_keymap, NULL);
|
||||
if (err)
|
||||
goto err_free_dev;
|
||||
|
||||
/* Set initial hardware state */
|
||||
input_report_switch(hp_wmi_input_dev, SW_DOCK, hp_wmi_dock_state());
|
||||
input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
|
||||
hp_wmi_tablet_state());
|
||||
input_sync(hp_wmi_input_dev);
|
||||
|
||||
if (!hp_wmi_bios_2009_later() && hp_wmi_bios_2008_later())
|
||||
|
@ -982,10 +994,12 @@ static int hp_wmi_resume_handler(struct device *device)
|
|||
* changed.
|
||||
*/
|
||||
if (hp_wmi_input_dev) {
|
||||
input_report_switch(hp_wmi_input_dev, SW_DOCK,
|
||||
hp_wmi_dock_state());
|
||||
input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
|
||||
hp_wmi_tablet_state());
|
||||
if (test_bit(SW_DOCK, hp_wmi_input_dev->swbit))
|
||||
input_report_switch(hp_wmi_input_dev, SW_DOCK,
|
||||
hp_wmi_dock_state());
|
||||
if (test_bit(SW_TABLET_MODE, hp_wmi_input_dev->swbit))
|
||||
input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
|
||||
hp_wmi_tablet_state());
|
||||
input_sync(hp_wmi_input_dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -909,7 +909,6 @@ void qeth_clear_thread_running_bit(struct qeth_card *, unsigned long);
|
|||
int qeth_core_hardsetup_card(struct qeth_card *);
|
||||
void qeth_print_status_message(struct qeth_card *);
|
||||
int qeth_init_qdio_queues(struct qeth_card *);
|
||||
int qeth_send_startlan(struct qeth_card *);
|
||||
int qeth_send_ipa_cmd(struct qeth_card *, struct qeth_cmd_buffer *,
|
||||
int (*reply_cb)
|
||||
(struct qeth_card *, struct qeth_reply *, unsigned long),
|
||||
|
|
|
@ -2955,7 +2955,7 @@ int qeth_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(qeth_send_ipa_cmd);
|
||||
|
||||
int qeth_send_startlan(struct qeth_card *card)
|
||||
static int qeth_send_startlan(struct qeth_card *card)
|
||||
{
|
||||
int rc;
|
||||
struct qeth_cmd_buffer *iob;
|
||||
|
@ -2968,7 +2968,6 @@ int qeth_send_startlan(struct qeth_card *card)
|
|||
rc = qeth_send_ipa_cmd(card, iob, NULL, NULL);
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qeth_send_startlan);
|
||||
|
||||
static int qeth_default_setadapterparms_cb(struct qeth_card *card,
|
||||
struct qeth_reply *reply, unsigned long data)
|
||||
|
@ -5080,6 +5079,20 @@ retriable:
|
|||
goto out;
|
||||
}
|
||||
|
||||
rc = qeth_send_startlan(card);
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc);
|
||||
if (rc == IPA_RC_LAN_OFFLINE) {
|
||||
dev_warn(&card->gdev->dev,
|
||||
"The LAN is offline\n");
|
||||
card->lan_online = 0;
|
||||
} else {
|
||||
rc = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
} else
|
||||
card->lan_online = 1;
|
||||
|
||||
card->options.ipa4.supported_funcs = 0;
|
||||
card->options.ipa6.supported_funcs = 0;
|
||||
card->options.adp.supported_funcs = 0;
|
||||
|
@ -5091,14 +5104,14 @@ retriable:
|
|||
if (qeth_is_supported(card, IPA_SETADAPTERPARMS)) {
|
||||
rc = qeth_query_setadapterparms(card);
|
||||
if (rc < 0) {
|
||||
QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "7err%d", rc);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
if (qeth_adp_supported(card, IPA_SETADP_SET_DIAG_ASSIST)) {
|
||||
rc = qeth_query_setdiagass(card);
|
||||
if (rc < 0) {
|
||||
QETH_DBF_TEXT_(SETUP, 2, "7err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "8err%d", rc);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1203,21 +1203,6 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
|
|||
/* softsetup */
|
||||
QETH_DBF_TEXT(SETUP, 2, "softsetp");
|
||||
|
||||
rc = qeth_send_startlan(card);
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
if (rc == 0xe080) {
|
||||
dev_warn(&card->gdev->dev,
|
||||
"The LAN is offline\n");
|
||||
card->lan_online = 0;
|
||||
goto contin;
|
||||
}
|
||||
rc = -ENODEV;
|
||||
goto out_remove;
|
||||
} else
|
||||
card->lan_online = 1;
|
||||
|
||||
contin:
|
||||
if ((card->info.type == QETH_CARD_TYPE_OSD) ||
|
||||
(card->info.type == QETH_CARD_TYPE_OSX)) {
|
||||
if (qeth_l2_start_ipassists(card))
|
||||
|
|
|
@ -3298,21 +3298,6 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
|
|||
/* softsetup */
|
||||
QETH_DBF_TEXT(SETUP, 2, "softsetp");
|
||||
|
||||
rc = qeth_send_startlan(card);
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
if (rc == 0xe080) {
|
||||
dev_warn(&card->gdev->dev,
|
||||
"The LAN is offline\n");
|
||||
card->lan_online = 0;
|
||||
goto contin;
|
||||
}
|
||||
rc = -ENODEV;
|
||||
goto out_remove;
|
||||
} else
|
||||
card->lan_online = 1;
|
||||
|
||||
contin:
|
||||
rc = qeth_l3_setadapter_parms(card);
|
||||
if (rc)
|
||||
QETH_DBF_TEXT_(SETUP, 2, "2err%04x", rc);
|
||||
|
|
|
@ -5147,6 +5147,19 @@ lpfc_free_sysfs_attr(struct lpfc_vport *vport)
|
|||
* Dynamic FC Host Attributes Support
|
||||
*/
|
||||
|
||||
/**
|
||||
* lpfc_get_host_symbolic_name - Copy symbolic name into the scsi host
|
||||
* @shost: kernel scsi host pointer.
|
||||
**/
|
||||
static void
|
||||
lpfc_get_host_symbolic_name(struct Scsi_Host *shost)
|
||||
{
|
||||
struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata;
|
||||
|
||||
lpfc_vport_symbolic_node_name(vport, fc_host_symbolic_name(shost),
|
||||
sizeof fc_host_symbolic_name(shost));
|
||||
}
|
||||
|
||||
/**
|
||||
* lpfc_get_host_port_id - Copy the vport DID into the scsi host port id
|
||||
* @shost: kernel scsi host pointer.
|
||||
|
@ -5684,6 +5697,8 @@ struct fc_function_template lpfc_transport_functions = {
|
|||
.show_host_supported_fc4s = 1,
|
||||
.show_host_supported_speeds = 1,
|
||||
.show_host_maxframe_size = 1,
|
||||
|
||||
.get_host_symbolic_name = lpfc_get_host_symbolic_name,
|
||||
.show_host_symbolic_name = 1,
|
||||
|
||||
/* dynamic attributes the driver supports */
|
||||
|
@ -5751,6 +5766,8 @@ struct fc_function_template lpfc_vport_transport_functions = {
|
|||
.show_host_supported_fc4s = 1,
|
||||
.show_host_supported_speeds = 1,
|
||||
.show_host_maxframe_size = 1,
|
||||
|
||||
.get_host_symbolic_name = lpfc_get_host_symbolic_name,
|
||||
.show_host_symbolic_name = 1,
|
||||
|
||||
/* dynamic attributes the driver supports */
|
||||
|
|
|
@ -1982,6 +1982,9 @@ lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry)
|
|||
if (sp->cmn.fcphHigh < FC_PH3)
|
||||
sp->cmn.fcphHigh = FC_PH3;
|
||||
|
||||
sp->cmn.valid_vendor_ver_level = 0;
|
||||
memset(sp->vendorVersion, 0, sizeof(sp->vendorVersion));
|
||||
|
||||
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD,
|
||||
"Issue PLOGI: did:x%x",
|
||||
did, 0, 0);
|
||||
|
@ -3966,6 +3969,9 @@ lpfc_els_rsp_acc(struct lpfc_vport *vport, uint32_t flag,
|
|||
} else {
|
||||
memcpy(pcmd, &vport->fc_sparam,
|
||||
sizeof(struct serv_parm));
|
||||
|
||||
sp->cmn.valid_vendor_ver_level = 0;
|
||||
memset(sp->vendorVersion, 0, sizeof(sp->vendorVersion));
|
||||
}
|
||||
|
||||
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP,
|
||||
|
|
|
@ -360,6 +360,12 @@ struct csp {
|
|||
* Word 1 Bit 30 in PLOGI request is random offset
|
||||
*/
|
||||
#define virtual_fabric_support randomOffset /* Word 1, bit 30 */
|
||||
/*
|
||||
* Word 1 Bit 29 in common service parameter is overloaded.
|
||||
* Word 1 Bit 29 in FLOGI response is multiple NPort assignment
|
||||
* Word 1 Bit 29 in FLOGI/PLOGI request is Valid Vendor Version Level
|
||||
*/
|
||||
#define valid_vendor_ver_level response_multiple_NPort /* Word 1, bit 29 */
|
||||
#ifdef __BIG_ENDIAN_BITFIELD
|
||||
uint16_t request_multiple_Nport:1; /* FC Word 1, bit 31 */
|
||||
uint16_t randomOffset:1; /* FC Word 1, bit 30 */
|
||||
|
|
|
@ -118,6 +118,8 @@ lpfc_sli4_wq_put(struct lpfc_queue *q, union lpfc_wqe *wqe)
|
|||
if (q->phba->sli3_options & LPFC_SLI4_PHWQ_ENABLED)
|
||||
bf_set(wqe_wqid, &wqe->generic.wqe_com, q->queue_id);
|
||||
lpfc_sli_pcimem_bcopy(wqe, temp_wqe, q->entry_size);
|
||||
/* ensure WQE bcopy flushed before doorbell write */
|
||||
wmb();
|
||||
|
||||
/* Update the host index before invoking device */
|
||||
host_index = q->host_index;
|
||||
|
@ -9805,6 +9807,7 @@ lpfc_sli_abort_iotag_issue(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
|
|||
iabt->ulpCommand = CMD_CLOSE_XRI_CN;
|
||||
|
||||
abtsiocbp->iocb_cmpl = lpfc_sli_abort_els_cmpl;
|
||||
abtsiocbp->vport = vport;
|
||||
|
||||
lpfc_printf_vlog(vport, KERN_INFO, LOG_SLI,
|
||||
"0339 Abort xri x%x, original iotag x%x, "
|
||||
|
|
|
@ -528,6 +528,12 @@ enable_vport(struct fc_vport *fc_vport)
|
|||
|
||||
spin_lock_irq(shost->host_lock);
|
||||
vport->load_flag |= FC_LOADING;
|
||||
if (vport->fc_flag & FC_VPORT_NEEDS_INIT_VPI) {
|
||||
spin_unlock_irq(shost->host_lock);
|
||||
lpfc_issue_init_vpi(vport);
|
||||
goto out;
|
||||
}
|
||||
|
||||
vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
|
||||
spin_unlock_irq(shost->host_lock);
|
||||
|
||||
|
@ -548,6 +554,8 @@ enable_vport(struct fc_vport *fc_vport)
|
|||
} else {
|
||||
lpfc_vport_set_state(vport, FC_VPORT_FAILED);
|
||||
}
|
||||
|
||||
out:
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
|
||||
"1827 Vport Enabled.\n");
|
||||
return VPORT_OK;
|
||||
|
|
|
@ -1552,6 +1552,7 @@ static const struct of_device_id ufs_qcom_of_match[] = {
|
|||
{ .compatible = "qcom,ufshc"},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ufs_qcom_of_match);
|
||||
|
||||
static const struct dev_pm_ops ufs_qcom_pm_ops = {
|
||||
.suspend = ufshcd_pltfrm_suspend,
|
||||
|
|
|
@ -3340,18 +3340,25 @@ out:
|
|||
}
|
||||
|
||||
/**
|
||||
* ufshcd_force_reset_auto_bkops - force enable of auto bkops
|
||||
* ufshcd_force_reset_auto_bkops - force reset auto bkops state
|
||||
* @hba: per adapter instance
|
||||
*
|
||||
* After a device reset the device may toggle the BKOPS_EN flag
|
||||
* to default value. The s/w tracking variables should be updated
|
||||
* as well. Do this by forcing enable of auto bkops.
|
||||
* as well. This function would change the auto-bkops state based on
|
||||
* UFSHCD_CAP_KEEP_AUTO_BKOPS_ENABLED_EXCEPT_SUSPEND.
|
||||
*/
|
||||
static void ufshcd_force_reset_auto_bkops(struct ufs_hba *hba)
|
||||
static void ufshcd_force_reset_auto_bkops(struct ufs_hba *hba)
|
||||
{
|
||||
hba->auto_bkops_enabled = false;
|
||||
hba->ee_ctrl_mask |= MASK_EE_URGENT_BKOPS;
|
||||
ufshcd_enable_auto_bkops(hba);
|
||||
if (ufshcd_keep_autobkops_enabled_except_suspend(hba)) {
|
||||
hba->auto_bkops_enabled = false;
|
||||
hba->ee_ctrl_mask |= MASK_EE_URGENT_BKOPS;
|
||||
ufshcd_enable_auto_bkops(hba);
|
||||
} else {
|
||||
hba->auto_bkops_enabled = true;
|
||||
hba->ee_ctrl_mask &= ~MASK_EE_URGENT_BKOPS;
|
||||
ufshcd_disable_auto_bkops(hba);
|
||||
}
|
||||
}
|
||||
|
||||
static inline int ufshcd_get_bkops_status(struct ufs_hba *hba, u32 *status)
|
||||
|
@ -5149,11 +5156,15 @@ static int ufshcd_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
|
|||
goto set_old_link_state;
|
||||
}
|
||||
|
||||
/*
|
||||
* If BKOPs operations are urgently needed at this moment then
|
||||
* keep auto-bkops enabled or else disable it.
|
||||
*/
|
||||
ufshcd_urgent_bkops(hba);
|
||||
if (ufshcd_keep_autobkops_enabled_except_suspend(hba))
|
||||
ufshcd_enable_auto_bkops(hba);
|
||||
else
|
||||
/*
|
||||
* If BKOPs operations are urgently needed at this moment then
|
||||
* keep auto-bkops enabled or else disable it.
|
||||
*/
|
||||
ufshcd_urgent_bkops(hba);
|
||||
|
||||
hba->clk_gating.is_suspended = false;
|
||||
|
||||
if (ufshcd_is_clkscaling_enabled(hba))
|
||||
|
|
|
@ -528,6 +528,14 @@ struct ufs_hba {
|
|||
* CAUTION: Enabling this might reduce overall UFS throughput.
|
||||
*/
|
||||
#define UFSHCD_CAP_INTR_AGGR (1 << 4)
|
||||
/*
|
||||
* This capability allows the device auto-bkops to be always enabled
|
||||
* except during suspend (both runtime and suspend).
|
||||
* Enabling this capability means that device will always be allowed
|
||||
* to do background operation when it's active but it might degrade
|
||||
* the performance of ongoing read/write operations.
|
||||
*/
|
||||
#define UFSHCD_CAP_KEEP_AUTO_BKOPS_ENABLED_EXCEPT_SUSPEND (1 << 5)
|
||||
|
||||
struct devfreq *devfreq;
|
||||
struct ufs_clk_scaling clk_scaling;
|
||||
|
@ -623,6 +631,11 @@ static inline void *ufshcd_get_variant(struct ufs_hba *hba)
|
|||
BUG_ON(!hba);
|
||||
return hba->priv;
|
||||
}
|
||||
static inline bool ufshcd_keep_autobkops_enabled_except_suspend(
|
||||
struct ufs_hba *hba)
|
||||
{
|
||||
return hba->caps & UFSHCD_CAP_KEEP_AUTO_BKOPS_ENABLED_EXCEPT_SUSPEND;
|
||||
}
|
||||
|
||||
extern int ufshcd_runtime_suspend(struct ufs_hba *hba);
|
||||
extern int ufshcd_runtime_resume(struct ufs_hba *hba);
|
||||
|
|
|
@ -259,7 +259,7 @@ out_free_irq:
|
|||
out1:
|
||||
iio_trigger_unregister(st->trig);
|
||||
out:
|
||||
iio_trigger_put(st->trig);
|
||||
iio_trigger_free(st->trig);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -272,7 +272,7 @@ static int iio_bfin_tmr_trigger_remove(struct platform_device *pdev)
|
|||
peripheral_free(st->t->pin);
|
||||
free_irq(st->irq, st);
|
||||
iio_trigger_unregister(st->trig);
|
||||
iio_trigger_put(st->trig);
|
||||
iio_trigger_free(st->trig);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1431,17 +1431,25 @@ static ssize_t lcd_write(struct file *file,
|
|||
|
||||
static int lcd_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
if (!atomic_dec_and_test(&lcd_available))
|
||||
return -EBUSY; /* open only once at a time */
|
||||
int ret;
|
||||
|
||||
ret = -EBUSY;
|
||||
if (!atomic_dec_and_test(&lcd_available))
|
||||
goto fail; /* open only once at a time */
|
||||
|
||||
ret = -EPERM;
|
||||
if (file->f_mode & FMODE_READ) /* device is write-only */
|
||||
return -EPERM;
|
||||
goto fail;
|
||||
|
||||
if (lcd.must_clear) {
|
||||
lcd_clear_display();
|
||||
lcd.must_clear = false;
|
||||
}
|
||||
return nonseekable_open(inode, file);
|
||||
|
||||
fail:
|
||||
atomic_inc(&lcd_available);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int lcd_release(struct inode *inode, struct file *file)
|
||||
|
@ -1704,14 +1712,21 @@ static ssize_t keypad_read(struct file *file,
|
|||
|
||||
static int keypad_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
if (!atomic_dec_and_test(&keypad_available))
|
||||
return -EBUSY; /* open only once at a time */
|
||||
int ret;
|
||||
|
||||
ret = -EBUSY;
|
||||
if (!atomic_dec_and_test(&keypad_available))
|
||||
goto fail; /* open only once at a time */
|
||||
|
||||
ret = -EPERM;
|
||||
if (file->f_mode & FMODE_WRITE) /* device is read-only */
|
||||
return -EPERM;
|
||||
goto fail;
|
||||
|
||||
keypad_buflen = 0; /* flush the buffer on opening */
|
||||
return 0;
|
||||
fail:
|
||||
atomic_inc(&keypad_available);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int keypad_release(struct inode *inode, struct file *file)
|
||||
|
|
|
@ -75,7 +75,7 @@ extern u32 GlobalDebugLevel;
|
|||
#define DBG_88E_LEVEL(_level, fmt, arg...) \
|
||||
do { \
|
||||
if (_level <= GlobalDebugLevel) \
|
||||
pr_info(DRIVER_PREFIX"ERROR " fmt, ##arg); \
|
||||
pr_info(DRIVER_PREFIX fmt, ##arg); \
|
||||
} while (0)
|
||||
|
||||
#define DBG_88E(...) \
|
||||
|
|
|
@ -199,7 +199,7 @@ static inline char *translate_scan(struct _adapter *padapter,
|
|||
iwe.cmd = SIOCGIWMODE;
|
||||
memcpy((u8 *)&cap, r8712_get_capability_from_ie(pnetwork->network.IEs),
|
||||
2);
|
||||
cap = le16_to_cpu(cap);
|
||||
le16_to_cpus(&cap);
|
||||
if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_BSS)) {
|
||||
if (cap & WLAN_CAPABILITY_BSS)
|
||||
iwe.u.mode = (u32)IW_MODE_MASTER;
|
||||
|
|
|
@ -1759,7 +1759,7 @@ iscsit_handle_task_mgt_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
|
|||
struct iscsi_tm *hdr;
|
||||
int out_of_order_cmdsn = 0, ret;
|
||||
bool sess_ref = false;
|
||||
u8 function;
|
||||
u8 function, tcm_function = TMR_UNKNOWN;
|
||||
|
||||
hdr = (struct iscsi_tm *) buf;
|
||||
hdr->flags &= ~ISCSI_FLAG_CMD_FINAL;
|
||||
|
@ -1805,10 +1805,6 @@ iscsit_handle_task_mgt_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
|
|||
* LIO-Target $FABRIC_MOD
|
||||
*/
|
||||
if (function != ISCSI_TM_FUNC_TASK_REASSIGN) {
|
||||
|
||||
u8 tcm_function;
|
||||
int ret;
|
||||
|
||||
transport_init_se_cmd(&cmd->se_cmd, &iscsi_ops,
|
||||
conn->sess->se_sess, 0, DMA_NONE,
|
||||
TCM_SIMPLE_TAG, cmd->sense_buffer + 2);
|
||||
|
@ -1844,15 +1840,14 @@ iscsit_handle_task_mgt_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
|
|||
return iscsit_add_reject_cmd(cmd,
|
||||
ISCSI_REASON_BOOKMARK_NO_RESOURCES, buf);
|
||||
}
|
||||
|
||||
ret = core_tmr_alloc_req(&cmd->se_cmd, cmd->tmr_req,
|
||||
tcm_function, GFP_KERNEL);
|
||||
if (ret < 0)
|
||||
return iscsit_add_reject_cmd(cmd,
|
||||
}
|
||||
ret = core_tmr_alloc_req(&cmd->se_cmd, cmd->tmr_req, tcm_function,
|
||||
GFP_KERNEL);
|
||||
if (ret < 0)
|
||||
return iscsit_add_reject_cmd(cmd,
|
||||
ISCSI_REASON_BOOKMARK_NO_RESOURCES, buf);
|
||||
|
||||
cmd->tmr_req->se_tmr_req = cmd->se_cmd.se_tmr_req;
|
||||
}
|
||||
cmd->tmr_req->se_tmr_req = cmd->se_cmd.se_tmr_req;
|
||||
|
||||
cmd->iscsi_opcode = ISCSI_OP_SCSI_TMFUNC;
|
||||
cmd->i_state = ISTATE_SEND_TASKMGTRSP;
|
||||
|
|
|
@ -350,7 +350,7 @@ void core_tpg_del_initiator_node_acl(struct se_node_acl *acl)
|
|||
if (acl->dynamic_node_acl) {
|
||||
acl->dynamic_node_acl = 0;
|
||||
}
|
||||
list_del(&acl->acl_list);
|
||||
list_del_init(&acl->acl_list);
|
||||
tpg->num_node_acls--;
|
||||
mutex_unlock(&tpg->acl_node_mutex);
|
||||
|
||||
|
@ -572,7 +572,7 @@ int core_tpg_deregister(struct se_portal_group *se_tpg)
|
|||
* in transport_deregister_session().
|
||||
*/
|
||||
list_for_each_entry_safe(nacl, nacl_tmp, &node_list, acl_list) {
|
||||
list_del(&nacl->acl_list);
|
||||
list_del_init(&nacl->acl_list);
|
||||
se_tpg->num_node_acls--;
|
||||
|
||||
core_tpg_wait_for_nacl_pr_ref(nacl);
|
||||
|
|
|
@ -431,7 +431,7 @@ static void target_complete_nacl(struct kref *kref)
|
|||
}
|
||||
|
||||
mutex_lock(&se_tpg->acl_node_mutex);
|
||||
list_del(&nacl->acl_list);
|
||||
list_del_init(&nacl->acl_list);
|
||||
mutex_unlock(&se_tpg->acl_node_mutex);
|
||||
|
||||
core_tpg_wait_for_nacl_pr_ref(nacl);
|
||||
|
@ -503,7 +503,7 @@ void transport_free_session(struct se_session *se_sess)
|
|||
spin_unlock_irqrestore(&se_nacl->nacl_sess_lock, flags);
|
||||
|
||||
if (se_nacl->dynamic_stop)
|
||||
list_del(&se_nacl->acl_list);
|
||||
list_del_init(&se_nacl->acl_list);
|
||||
}
|
||||
mutex_unlock(&se_tpg->acl_node_mutex);
|
||||
|
||||
|
|
|
@ -163,18 +163,17 @@ static const struct plat_sci_reg sci_regmap[SCIx_NR_REGTYPES][SCIx_NR_REGS] = {
|
|||
},
|
||||
|
||||
/*
|
||||
* Common definitions for legacy IrDA ports, dependent on
|
||||
* regshift value.
|
||||
* Common definitions for legacy IrDA ports.
|
||||
*/
|
||||
[SCIx_IRDA_REGTYPE] = {
|
||||
[SCSMR] = { 0x00, 8 },
|
||||
[SCBRR] = { 0x01, 8 },
|
||||
[SCSCR] = { 0x02, 8 },
|
||||
[SCxTDR] = { 0x03, 8 },
|
||||
[SCxSR] = { 0x04, 8 },
|
||||
[SCxRDR] = { 0x05, 8 },
|
||||
[SCFCR] = { 0x06, 8 },
|
||||
[SCFDR] = { 0x07, 16 },
|
||||
[SCBRR] = { 0x02, 8 },
|
||||
[SCSCR] = { 0x04, 8 },
|
||||
[SCxTDR] = { 0x06, 8 },
|
||||
[SCxSR] = { 0x08, 16 },
|
||||
[SCxRDR] = { 0x0a, 8 },
|
||||
[SCFCR] = { 0x0c, 8 },
|
||||
[SCFDR] = { 0x0e, 16 },
|
||||
[SCTFDR] = sci_reg_invalid,
|
||||
[SCRFDR] = sci_reg_invalid,
|
||||
[SCSPTR] = sci_reg_invalid,
|
||||
|
|
|
@ -1653,6 +1653,18 @@ static int proc_unlinkurb(struct usb_dev_state *ps, void __user *arg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void compute_isochronous_actual_length(struct urb *urb)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
if (urb->number_of_packets > 0) {
|
||||
urb->actual_length = 0;
|
||||
for (i = 0; i < urb->number_of_packets; i++)
|
||||
urb->actual_length +=
|
||||
urb->iso_frame_desc[i].actual_length;
|
||||
}
|
||||
}
|
||||
|
||||
static int processcompl(struct async *as, void __user * __user *arg)
|
||||
{
|
||||
struct urb *urb = as->urb;
|
||||
|
@ -1660,6 +1672,7 @@ static int processcompl(struct async *as, void __user * __user *arg)
|
|||
void __user *addr = as->userurb;
|
||||
unsigned int i;
|
||||
|
||||
compute_isochronous_actual_length(urb);
|
||||
if (as->userbuffer && urb->actual_length) {
|
||||
if (copy_urb_data_to_user(as->userbuffer, urb))
|
||||
goto err_out;
|
||||
|
@ -1829,6 +1842,7 @@ static int processcompl_compat(struct async *as, void __user * __user *arg)
|
|||
void __user *addr = as->userurb;
|
||||
unsigned int i;
|
||||
|
||||
compute_isochronous_actual_length(urb);
|
||||
if (as->userbuffer && urb->actual_length) {
|
||||
if (copy_urb_data_to_user(as->userbuffer, urb))
|
||||
return -EFAULT;
|
||||
|
|
|
@ -2997,6 +2997,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)
|
|||
}
|
||||
|
||||
usb_put_invalidate_rhdev(hcd);
|
||||
hcd->flags = 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_remove_hcd);
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue