Merge branch 'linus' into perf/core
Merge reason: Pick up perf fixes that are now upstream Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
commit
c7f9a6f377
|
@ -603,3 +603,19 @@ Why: The adm9240, w83792d and w83793 hardware monitoring drivers have
|
|||
Who: Jean Delvare <khali@linux-fr.org>
|
||||
|
||||
----------------------------
|
||||
|
||||
What: noswapaccount kernel command line parameter
|
||||
When: 2.6.40
|
||||
Why: The original implementation of memsw feature enabled by
|
||||
CONFIG_CGROUP_MEM_RES_CTLR_SWAP could be disabled by the noswapaccount
|
||||
kernel parameter (introduced in 2.6.29-rc1). Later on, this decision
|
||||
turned out to be not ideal because we cannot have the feature compiled
|
||||
in and disabled by default and let only interested to enable it
|
||||
(e.g. general distribution kernels might need it). Therefore we have
|
||||
added swapaccount[=0|1] parameter (introduced in 2.6.37) which provides
|
||||
the both possibilities. If we remove noswapaccount we will have
|
||||
less command line parameters with the same functionality and we
|
||||
can also cleanup the parameter handling a bit ().
|
||||
Who: Michal Hocko <mhocko@suse.cz>
|
||||
|
||||
----------------------------
|
||||
|
|
|
@ -187,7 +187,7 @@ tcp_cookie_size - INTEGER
|
|||
tcp_dsack - BOOLEAN
|
||||
Allows TCP to send "duplicate" SACKs.
|
||||
|
||||
tcp_ecn - BOOLEAN
|
||||
tcp_ecn - INTEGER
|
||||
Enable Explicit Congestion Notification (ECN) in TCP. ECN is only
|
||||
used when both ends of the TCP flow support it. It is useful to
|
||||
avoid losses due to congestion (when the bottleneck router supports
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
Version 15 of schedstats dropped counters for some sched_yield:
|
||||
yld_exp_empty, yld_act_empty and yld_both_empty. Otherwise, it is
|
||||
identical to version 14.
|
||||
|
||||
Version 14 of schedstats includes support for sched_domains, which hit the
|
||||
mainline kernel in 2.6.20 although it is identical to the stats from version
|
||||
12 which was in the kernel from 2.6.13-2.6.19 (version 13 never saw a kernel
|
||||
|
@ -28,32 +32,25 @@ to write their own scripts, the fields are described here.
|
|||
|
||||
CPU statistics
|
||||
--------------
|
||||
cpu<N> 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
cpu<N> 1 2 3 4 5 6 7 8 9
|
||||
|
||||
NOTE: In the sched_yield() statistics, the active queue is considered empty
|
||||
if it has only one process in it, since obviously the process calling
|
||||
sched_yield() is that process.
|
||||
|
||||
First four fields are sched_yield() statistics:
|
||||
1) # of times both the active and the expired queue were empty
|
||||
2) # of times just the active queue was empty
|
||||
3) # of times just the expired queue was empty
|
||||
4) # of times sched_yield() was called
|
||||
First field is a sched_yield() statistic:
|
||||
1) # of times sched_yield() was called
|
||||
|
||||
Next three are schedule() statistics:
|
||||
5) # of times we switched to the expired queue and reused it
|
||||
6) # of times schedule() was called
|
||||
7) # of times schedule() left the processor idle
|
||||
2) # of times we switched to the expired queue and reused it
|
||||
3) # of times schedule() was called
|
||||
4) # of times schedule() left the processor idle
|
||||
|
||||
Next two are try_to_wake_up() statistics:
|
||||
8) # of times try_to_wake_up() was called
|
||||
9) # of times try_to_wake_up() was called to wake up the local cpu
|
||||
5) # of times try_to_wake_up() was called
|
||||
6) # of times try_to_wake_up() was called to wake up the local cpu
|
||||
|
||||
Next three are statistics describing scheduling latency:
|
||||
10) sum of all time spent running by tasks on this processor (in jiffies)
|
||||
11) sum of all time spent waiting to run by tasks on this processor (in
|
||||
7) sum of all time spent running by tasks on this processor (in jiffies)
|
||||
8) sum of all time spent waiting to run by tasks on this processor (in
|
||||
jiffies)
|
||||
12) # of timeslices run on this cpu
|
||||
9) # of timeslices run on this cpu
|
||||
|
||||
|
||||
Domain statistics
|
||||
|
|
|
@ -296,6 +296,7 @@ Conexant 5066
|
|||
=============
|
||||
laptop Basic Laptop config (default)
|
||||
hp-laptop HP laptops, e g G60
|
||||
asus Asus K52JU, Lenovo G560
|
||||
dell-laptop Dell laptops
|
||||
dell-vostro Dell Vostro
|
||||
olpc-xo-1_5 OLPC XO 1.5
|
||||
|
|
29
MAINTAINERS
29
MAINTAINERS
|
@ -978,6 +978,8 @@ S: Maintained
|
|||
F: arch/arm/plat-samsung/
|
||||
F: arch/arm/plat-s3c24xx/
|
||||
F: arch/arm/plat-s5p/
|
||||
F: drivers/*/*s3c2410*
|
||||
F: drivers/*/*/*s3c2410*
|
||||
|
||||
ARM/S3C2410 ARM ARCHITECTURE
|
||||
M: Ben Dooks <ben-linux@fluff.org>
|
||||
|
@ -5549,12 +5551,11 @@ S: Supported
|
|||
F: drivers/scsi/be2iscsi/
|
||||
|
||||
SERVER ENGINES 10Gbps NIC - BladeEngine 2 DRIVER
|
||||
M: Sathya Perla <sathyap@serverengines.com>
|
||||
M: Subbu Seetharaman <subbus@serverengines.com>
|
||||
M: Sarveshwar Bandi <sarveshwarb@serverengines.com>
|
||||
M: Ajit Khaparde <ajitk@serverengines.com>
|
||||
M: Sathya Perla <sathya.perla@emulex.com>
|
||||
M: Subbu Seetharaman <subbu.seetharaman@emulex.com>
|
||||
M: Ajit Khaparde <ajit.khaparde@emulex.com>
|
||||
L: netdev@vger.kernel.org
|
||||
W: http://www.serverengines.com
|
||||
W: http://www.emulex.com
|
||||
S: Supported
|
||||
F: drivers/net/benet/
|
||||
|
||||
|
@ -5614,18 +5615,20 @@ F: include/linux/sfi*.h
|
|||
|
||||
SIMTEC EB110ATX (Chalice CATS)
|
||||
P: Ben Dooks
|
||||
M: Vincent Sanders <support@simtec.co.uk>
|
||||
P: Vincent Sanders <vince@simtec.co.uk>
|
||||
M: Simtec Linux Team <linux@simtec.co.uk>
|
||||
W: http://www.simtec.co.uk/products/EB110ATX/
|
||||
S: Supported
|
||||
|
||||
SIMTEC EB2410ITX (BAST)
|
||||
P: Ben Dooks
|
||||
M: Vincent Sanders <support@simtec.co.uk>
|
||||
P: Vincent Sanders <vince@simtec.co.uk>
|
||||
M: Simtec Linux Team <linux@simtec.co.uk>
|
||||
W: http://www.simtec.co.uk/products/EB2410ITX/
|
||||
S: Supported
|
||||
F: arch/arm/mach-s3c2410/
|
||||
F: drivers/*/*s3c2410*
|
||||
F: drivers/*/*/*s3c2410*
|
||||
F: arch/arm/mach-s3c2410/mach-bast.c
|
||||
F: arch/arm/mach-s3c2410/bast-ide.c
|
||||
F: arch/arm/mach-s3c2410/bast-irq.c
|
||||
|
||||
TI DAVINCI MACHINE SUPPORT
|
||||
M: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
|
@ -6783,12 +6786,12 @@ S: Maintained
|
|||
F: drivers/net/wireless/wl1251/*
|
||||
|
||||
WL1271 WIRELESS DRIVER
|
||||
M: Luciano Coelho <luciano.coelho@nokia.com>
|
||||
M: Luciano Coelho <coelho@ti.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
W: http://wireless.kernel.org
|
||||
W: http://wireless.kernel.org/en/users/Drivers/wl12xx
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git
|
||||
S: Maintained
|
||||
F: drivers/net/wireless/wl12xx/wl1271*
|
||||
F: drivers/net/wireless/wl12xx/
|
||||
F: include/linux/wl12xx.h
|
||||
|
||||
WL3501 WIRELESS PCMCIA CARD DRIVER
|
||||
|
|
|
@ -432,7 +432,7 @@ static struct clocksource clocksource_ixp4xx = {
|
|||
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||
};
|
||||
|
||||
unsigned long ixp4xx_timer_freq = FREQ;
|
||||
unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ;
|
||||
EXPORT_SYMBOL(ixp4xx_timer_freq);
|
||||
static void __init ixp4xx_clocksource_init(void)
|
||||
{
|
||||
|
@ -496,7 +496,7 @@ static struct clock_event_device clockevent_ixp4xx = {
|
|||
|
||||
static void __init ixp4xx_clockevent_init(void)
|
||||
{
|
||||
clockevent_ixp4xx.mult = div_sc(FREQ, NSEC_PER_SEC,
|
||||
clockevent_ixp4xx.mult = div_sc(IXP4XX_TIMER_FREQ, NSEC_PER_SEC,
|
||||
clockevent_ixp4xx.shift);
|
||||
clockevent_ixp4xx.max_delta_ns =
|
||||
clockevent_delta2ns(0xfffffffe, &clockevent_ixp4xx);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
* 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
|
||||
* timer register ignores the bottom 2 bits of the LATCH value.
|
||||
*/
|
||||
#define FREQ 66666000
|
||||
#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
|
||||
#define IXP4XX_TIMER_FREQ 66666000
|
||||
#define CLOCK_TICK_RATE \
|
||||
(((IXP4XX_TIMER_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
|
||||
|
||||
|
|
|
@ -265,6 +265,11 @@ void qmgr_release_queue(unsigned int queue)
|
|||
qmgr_queue_descs[queue], queue);
|
||||
qmgr_queue_descs[queue][0] = '\x0';
|
||||
#endif
|
||||
|
||||
while ((addr = qmgr_get_entry(queue)))
|
||||
printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n",
|
||||
queue, addr);
|
||||
|
||||
__raw_writel(0, &qmgr_regs->sram[queue]);
|
||||
|
||||
used_sram_bitmap[0] &= ~mask[0];
|
||||
|
@ -275,10 +280,6 @@ void qmgr_release_queue(unsigned int queue)
|
|||
spin_unlock_irq(&qmgr_lock);
|
||||
|
||||
module_put(THIS_MODULE);
|
||||
|
||||
while ((addr = qmgr_get_entry(queue)))
|
||||
printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n",
|
||||
queue, addr);
|
||||
}
|
||||
|
||||
static int qmgr_init(void)
|
||||
|
|
|
@ -80,7 +80,7 @@ asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs)
|
|||
#ifdef CONFIG_DEBUG_STACKOVERFLOW
|
||||
/* FIXME M32R */
|
||||
#endif
|
||||
__do_IRQ(irq);
|
||||
generic_handle_irq(irq);
|
||||
irq_exit();
|
||||
set_irq_regs(old_regs);
|
||||
|
||||
|
|
|
@ -77,8 +77,18 @@ real_start:
|
|||
We ensure r7 points to a valid FDT, just in case the bootloader
|
||||
is broken or non-existent */
|
||||
beqi r7, no_fdt_arg /* NULL pointer? don't copy */
|
||||
lw r11, r0, r7 /* Does r7 point to a */
|
||||
rsubi r11, r11, OF_DT_HEADER /* valid FDT? */
|
||||
/* Does r7 point to a valid FDT? Load HEADER magic number */
|
||||
/* Run time Big/Little endian platform */
|
||||
/* Save 1 as word and load byte - 0 - BIG, 1 - LITTLE */
|
||||
addik r11, r0, 0x1 /* BIG/LITTLE checking value */
|
||||
/* __bss_start will be zeroed later - it is just temp location */
|
||||
swi r11, r0, TOPHYS(__bss_start)
|
||||
lbui r11, r0, TOPHYS(__bss_start)
|
||||
beqid r11, big_endian /* DO NOT break delay stop dependency */
|
||||
lw r11, r0, r7 /* Big endian load in delay slot */
|
||||
lwr r11, r0, r7 /* Little endian load */
|
||||
big_endian:
|
||||
rsubi r11, r11, OF_DT_HEADER /* Check FDT header */
|
||||
beqi r11, _prepare_copy_fdt
|
||||
or r7, r0, r0 /* clear R7 when not valid DTB */
|
||||
bnei r11, no_fdt_arg /* No - get out of here */
|
||||
|
|
|
@ -147,10 +147,6 @@
|
|||
#if CONFIG_XILINX_MICROBLAZE0_USE_BARREL > 0
|
||||
#define BSRLI(rD, rA, imm) \
|
||||
bsrli rD, rA, imm
|
||||
#elif CONFIG_XILINX_MICROBLAZE0_USE_DIV > 0
|
||||
#define BSRLI(rD, rA, imm) \
|
||||
ori rD, r0, (1 << imm); \
|
||||
idivu rD, rD, rA
|
||||
#else
|
||||
#define BSRLI(rD, rA, imm) BSRLI ## imm (rD, rA)
|
||||
/* Only the used shift constants defined here - add more if needed */
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
* between mem locations with size of xfer spec'd in bytes
|
||||
*/
|
||||
|
||||
#ifdef __MICROBLAZEEL__
|
||||
#error Microblaze LE not support ASM optimized lib func. Disable OPT_LIB_ASM.
|
||||
#endif
|
||||
|
||||
#include <linux/linkage.h>
|
||||
.text
|
||||
.globl memcpy
|
||||
|
|
|
@ -406,7 +406,7 @@ config QDIO
|
|||
If unsure, say Y.
|
||||
|
||||
config CHSC_SCH
|
||||
def_tristate y
|
||||
def_tristate m
|
||||
prompt "Support for CHSC subchannels"
|
||||
help
|
||||
This driver allows usage of CHSC subchannels. A CHSC subchannel
|
||||
|
|
|
@ -1,29 +1,8 @@
|
|||
#ifndef _S390_CACHEFLUSH_H
|
||||
#define _S390_CACHEFLUSH_H
|
||||
|
||||
/* Keep includes the same across arches. */
|
||||
#include <linux/mm.h>
|
||||
|
||||
/* Caches aren't brain-dead on the s390. */
|
||||
#define flush_cache_all() do { } while (0)
|
||||
#define flush_cache_mm(mm) do { } while (0)
|
||||
#define flush_cache_dup_mm(mm) do { } while (0)
|
||||
#define flush_cache_range(vma, start, end) do { } while (0)
|
||||
#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
|
||||
#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
|
||||
#define flush_dcache_page(page) do { } while (0)
|
||||
#define flush_dcache_mmap_lock(mapping) do { } while (0)
|
||||
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
|
||||
#define flush_icache_range(start, end) do { } while (0)
|
||||
#define flush_icache_page(vma,pg) do { } while (0)
|
||||
#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
|
||||
#define flush_cache_vmap(start, end) do { } while (0)
|
||||
#define flush_cache_vunmap(start, end) do { } while (0)
|
||||
|
||||
#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
|
||||
memcpy(dst, src, len)
|
||||
#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
|
||||
memcpy(dst, src, len)
|
||||
#include <asm-generic/cacheflush.h>
|
||||
|
||||
#ifdef CONFIG_DEBUG_PAGEALLOC
|
||||
void kernel_map_pages(struct page *page, int numpages, int enable);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/mm.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/swap.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/pgalloc.h>
|
||||
|
|
|
@ -125,9 +125,9 @@ static size_t copy_in_user_std(size_t size, void __user *to,
|
|||
unsigned long tmp1;
|
||||
|
||||
asm volatile(
|
||||
" sacf 256\n"
|
||||
" "AHI" %0,-1\n"
|
||||
" jo 5f\n"
|
||||
" sacf 256\n"
|
||||
" bras %3,3f\n"
|
||||
"0:"AHI" %0,257\n"
|
||||
"1: mvc 0(1,%1),0(%2)\n"
|
||||
|
@ -142,9 +142,8 @@ static size_t copy_in_user_std(size_t size, void __user *to,
|
|||
"3:"AHI" %0,-256\n"
|
||||
" jnm 2b\n"
|
||||
"4: ex %0,1b-0b(%3)\n"
|
||||
" sacf 0\n"
|
||||
"5: "SLR" %0,%0\n"
|
||||
"6:\n"
|
||||
"6: sacf 0\n"
|
||||
EX_TABLE(1b,6b) EX_TABLE(2b,0b) EX_TABLE(4b,0b)
|
||||
: "+a" (size), "+a" (to), "+a" (from), "=a" (tmp1)
|
||||
: : "cc", "memory");
|
||||
|
@ -156,9 +155,9 @@ static size_t clear_user_std(size_t size, void __user *to)
|
|||
unsigned long tmp1, tmp2;
|
||||
|
||||
asm volatile(
|
||||
" sacf 256\n"
|
||||
" "AHI" %0,-1\n"
|
||||
" jo 5f\n"
|
||||
" sacf 256\n"
|
||||
" bras %3,3f\n"
|
||||
" xc 0(1,%1),0(%1)\n"
|
||||
"0:"AHI" %0,257\n"
|
||||
|
@ -178,9 +177,8 @@ static size_t clear_user_std(size_t size, void __user *to)
|
|||
"3:"AHI" %0,-256\n"
|
||||
" jnm 2b\n"
|
||||
"4: ex %0,0(%3)\n"
|
||||
" sacf 0\n"
|
||||
"5: "SLR" %0,%0\n"
|
||||
"6:\n"
|
||||
"6: sacf 0\n"
|
||||
EX_TABLE(1b,6b) EX_TABLE(2b,0b) EX_TABLE(4b,0b)
|
||||
: "+a" (size), "+a" (to), "=a" (tmp1), "=a" (tmp2)
|
||||
: : "cc", "memory");
|
||||
|
|
|
@ -336,7 +336,8 @@ void page_table_free(struct mm_struct *mm, unsigned long *table)
|
|||
page->flags ^= bits;
|
||||
if (page->flags & FRAG_MASK) {
|
||||
/* Page now has some free pgtable fragments. */
|
||||
list_move(&page->lru, &mm->context.pgtable_list);
|
||||
if (!list_empty(&page->lru))
|
||||
list_move(&page->lru, &mm->context.pgtable_list);
|
||||
page = NULL;
|
||||
} else
|
||||
/* All fragments of the 4K page have been freed. */
|
||||
|
|
|
@ -36,8 +36,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
|||
unsigned cpu = smp_processor_id();
|
||||
|
||||
if (likely(prev != next)) {
|
||||
/* stop flush ipis for the previous mm */
|
||||
cpumask_clear_cpu(cpu, mm_cpumask(prev));
|
||||
#ifdef CONFIG_SMP
|
||||
percpu_write(cpu_tlbstate.state, TLBSTATE_OK);
|
||||
percpu_write(cpu_tlbstate.active_mm, next);
|
||||
|
@ -47,6 +45,9 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
|||
/* Re-load page tables */
|
||||
load_cr3(next->pgd);
|
||||
|
||||
/* stop flush ipis for the previous mm */
|
||||
cpumask_clear_cpu(cpu, mm_cpumask(prev));
|
||||
|
||||
/*
|
||||
* load the LDT, if the LDT is different:
|
||||
*/
|
||||
|
|
|
@ -40,10 +40,7 @@ DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
|
|||
DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
|
||||
|
||||
/* Static state in head.S used to set up a CPU */
|
||||
extern struct {
|
||||
void *sp;
|
||||
unsigned short ss;
|
||||
} stack_start;
|
||||
extern unsigned long stack_start; /* Initial stack pointer address */
|
||||
|
||||
struct smp_ops {
|
||||
void (*smp_prepare_boot_cpu)(void);
|
||||
|
|
|
@ -100,7 +100,7 @@ int acpi_save_state_mem(void)
|
|||
#else /* CONFIG_64BIT */
|
||||
header->trampoline_segment = setup_trampoline() >> 4;
|
||||
#ifdef CONFIG_SMP
|
||||
stack_start.sp = temp_stack + sizeof(temp_stack);
|
||||
stack_start = (unsigned long)temp_stack + sizeof(temp_stack);
|
||||
early_gdt_descr.address =
|
||||
(unsigned long)get_cpu_gdt_table(smp_processor_id());
|
||||
initial_gs = per_cpu_offset(smp_processor_id());
|
||||
|
|
|
@ -793,13 +793,21 @@ void set_mtrr_aps_delayed_init(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* MTRR initialization for all AP's
|
||||
* Delayed MTRR initialization for all AP's
|
||||
*/
|
||||
void mtrr_aps_init(void)
|
||||
{
|
||||
if (!use_intel())
|
||||
return;
|
||||
|
||||
/*
|
||||
* Check if someone has requested the delay of AP MTRR initialization,
|
||||
* by doing set_mtrr_aps_delayed_init(), prior to this point. If not,
|
||||
* then we are done.
|
||||
*/
|
||||
if (!mtrr_aps_delayed_init)
|
||||
return;
|
||||
|
||||
set_mtrr(~0U, 0, 0, 0);
|
||||
mtrr_aps_delayed_init = false;
|
||||
}
|
||||
|
|
|
@ -682,7 +682,7 @@ static int p4_validate_raw_event(struct perf_event *event)
|
|||
* if an event is shared accross the logical threads
|
||||
* the user needs special permissions to be able to use it
|
||||
*/
|
||||
if (p4_event_bind_map[v].shared) {
|
||||
if (p4_ht_active() && p4_event_bind_map[v].shared) {
|
||||
if (perf_paranoid_cpu() && !capable(CAP_SYS_ADMIN))
|
||||
return -EACCES;
|
||||
}
|
||||
|
@ -727,7 +727,8 @@ static int p4_hw_config(struct perf_event *event)
|
|||
event->hw.config = p4_set_ht_bit(event->hw.config);
|
||||
|
||||
if (event->attr.type == PERF_TYPE_RAW) {
|
||||
|
||||
struct p4_event_bind *bind;
|
||||
unsigned int esel;
|
||||
/*
|
||||
* Clear bits we reserve to be managed by kernel itself
|
||||
* and never allowed from a user space
|
||||
|
@ -743,6 +744,13 @@ static int p4_hw_config(struct perf_event *event)
|
|||
* bits since we keep additional info here (for cache events and etc)
|
||||
*/
|
||||
event->hw.config |= event->attr.config;
|
||||
bind = p4_config_get_bind(event->attr.config);
|
||||
if (!bind) {
|
||||
rc = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
esel = P4_OPCODE_ESEL(bind->opcode);
|
||||
event->hw.config |= p4_config_pack_cccr(P4_CCCR_ESEL(esel));
|
||||
}
|
||||
|
||||
rc = x86_setup_perfctr(event);
|
||||
|
|
|
@ -85,6 +85,8 @@ RESERVE_BRK(pagetables, INIT_MAP_SIZE)
|
|||
*/
|
||||
__HEAD
|
||||
ENTRY(startup_32)
|
||||
movl pa(stack_start),%ecx
|
||||
|
||||
/* test KEEP_SEGMENTS flag to see if the bootloader is asking
|
||||
us to not reload segments */
|
||||
testb $(1<<6), BP_loadflags(%esi)
|
||||
|
@ -99,7 +101,9 @@ ENTRY(startup_32)
|
|||
movl %eax,%es
|
||||
movl %eax,%fs
|
||||
movl %eax,%gs
|
||||
movl %eax,%ss
|
||||
2:
|
||||
leal -__PAGE_OFFSET(%ecx),%esp
|
||||
|
||||
/*
|
||||
* Clear BSS first so that there are no surprises...
|
||||
|
@ -145,8 +149,6 @@ ENTRY(startup_32)
|
|||
* _brk_end is set up to point to the first "safe" location.
|
||||
* Mappings are created both at virtual address 0 (identity mapping)
|
||||
* and PAGE_OFFSET for up to _end.
|
||||
*
|
||||
* Note that the stack is not yet set up!
|
||||
*/
|
||||
#ifdef CONFIG_X86_PAE
|
||||
|
||||
|
@ -282,6 +284,9 @@ ENTRY(startup_32_smp)
|
|||
movl %eax,%es
|
||||
movl %eax,%fs
|
||||
movl %eax,%gs
|
||||
movl pa(stack_start),%ecx
|
||||
movl %eax,%ss
|
||||
leal -__PAGE_OFFSET(%ecx),%esp
|
||||
#endif /* CONFIG_SMP */
|
||||
default_entry:
|
||||
|
||||
|
@ -347,8 +352,8 @@ default_entry:
|
|||
movl %eax,%cr0 /* ..and set paging (PG) bit */
|
||||
ljmp $__BOOT_CS,$1f /* Clear prefetch and normalize %eip */
|
||||
1:
|
||||
/* Set up the stack pointer */
|
||||
lss stack_start,%esp
|
||||
/* Shift the stack pointer to a virtual address */
|
||||
addl $__PAGE_OFFSET, %esp
|
||||
|
||||
/*
|
||||
* Initialize eflags. Some BIOS's leave bits like NT set. This would
|
||||
|
@ -360,9 +365,7 @@ default_entry:
|
|||
|
||||
#ifdef CONFIG_SMP
|
||||
cmpb $0, ready
|
||||
jz 1f /* Initial CPU cleans BSS */
|
||||
jmp checkCPUtype
|
||||
1:
|
||||
jnz checkCPUtype
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
/*
|
||||
|
@ -470,14 +473,7 @@ is386: movl $2,%ecx # set MP
|
|||
|
||||
cld # gcc2 wants the direction flag cleared at all times
|
||||
pushl $0 # fake return address for unwinder
|
||||
#ifdef CONFIG_SMP
|
||||
movb ready, %cl
|
||||
movb $1, ready
|
||||
cmpb $0,%cl # the first CPU calls start_kernel
|
||||
je 1f
|
||||
movl (stack_start), %esp
|
||||
1:
|
||||
#endif /* CONFIG_SMP */
|
||||
jmp *(initial_code)
|
||||
|
||||
/*
|
||||
|
@ -670,15 +666,15 @@ ENTRY(initial_page_table)
|
|||
#endif
|
||||
|
||||
.data
|
||||
.balign 4
|
||||
ENTRY(stack_start)
|
||||
.long init_thread_union+THREAD_SIZE
|
||||
.long __BOOT_DS
|
||||
|
||||
ready: .byte 0
|
||||
|
||||
early_recursion_flag:
|
||||
.long 0
|
||||
|
||||
ready: .byte 0
|
||||
|
||||
int_msg:
|
||||
.asciz "Unknown interrupt or fault at: %p %p %p\n"
|
||||
|
||||
|
|
|
@ -638,7 +638,7 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
|
|||
* target processor state.
|
||||
*/
|
||||
startup_ipi_hook(phys_apicid, (unsigned long) start_secondary,
|
||||
(unsigned long)stack_start.sp);
|
||||
stack_start);
|
||||
|
||||
/*
|
||||
* Run STARTUP IPI loop.
|
||||
|
@ -785,7 +785,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu)
|
|||
#endif
|
||||
early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu);
|
||||
initial_code = (unsigned long)start_secondary;
|
||||
stack_start.sp = (void *) c_idle.idle->thread.sp;
|
||||
stack_start = c_idle.idle->thread.sp;
|
||||
|
||||
/* start_ip had better be page-aligned! */
|
||||
start_ip = setup_trampoline();
|
||||
|
|
|
@ -256,7 +256,6 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
|
|||
unsigned long pfn)
|
||||
{
|
||||
pgprot_t forbidden = __pgprot(0);
|
||||
pgprot_t required = __pgprot(0);
|
||||
|
||||
/*
|
||||
* The BIOS area between 640k and 1Mb needs to be executable for
|
||||
|
@ -282,12 +281,6 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
|
|||
if (within(pfn, __pa((unsigned long)__start_rodata) >> PAGE_SHIFT,
|
||||
__pa((unsigned long)__end_rodata) >> PAGE_SHIFT))
|
||||
pgprot_val(forbidden) |= _PAGE_RW;
|
||||
/*
|
||||
* .data and .bss should always be writable.
|
||||
*/
|
||||
if (within(address, (unsigned long)_sdata, (unsigned long)_edata) ||
|
||||
within(address, (unsigned long)__bss_start, (unsigned long)__bss_stop))
|
||||
pgprot_val(required) |= _PAGE_RW;
|
||||
|
||||
#if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA)
|
||||
/*
|
||||
|
@ -327,7 +320,6 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
|
|||
#endif
|
||||
|
||||
prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden));
|
||||
prot = __pgprot(pgprot_val(prot) | pgprot_val(required));
|
||||
|
||||
return prot;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ config AGP_ATI
|
|||
|
||||
config AGP_AMD
|
||||
tristate "AMD Irongate, 761, and 762 chipset support"
|
||||
depends on AGP && (X86_32 || ALPHA)
|
||||
depends on AGP && X86_32
|
||||
help
|
||||
This option gives you AGP support for the GLX component of
|
||||
X on AMD Irongate, 761, and 762 chipsets.
|
||||
|
|
|
@ -41,22 +41,8 @@ static int amd_create_page_map(struct amd_page_map *page_map)
|
|||
if (page_map->real == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
#ifndef CONFIG_X86
|
||||
SetPageReserved(virt_to_page(page_map->real));
|
||||
global_cache_flush();
|
||||
page_map->remapped = ioremap_nocache(virt_to_phys(page_map->real),
|
||||
PAGE_SIZE);
|
||||
if (page_map->remapped == NULL) {
|
||||
ClearPageReserved(virt_to_page(page_map->real));
|
||||
free_page((unsigned long) page_map->real);
|
||||
page_map->real = NULL;
|
||||
return -ENOMEM;
|
||||
}
|
||||
global_cache_flush();
|
||||
#else
|
||||
set_memory_uc((unsigned long)page_map->real, 1);
|
||||
page_map->remapped = page_map->real;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++) {
|
||||
writel(agp_bridge->scratch_page, page_map->remapped+i);
|
||||
|
@ -68,12 +54,7 @@ static int amd_create_page_map(struct amd_page_map *page_map)
|
|||
|
||||
static void amd_free_page_map(struct amd_page_map *page_map)
|
||||
{
|
||||
#ifndef CONFIG_X86
|
||||
iounmap(page_map->remapped);
|
||||
ClearPageReserved(virt_to_page(page_map->real));
|
||||
#else
|
||||
set_memory_wb((unsigned long)page_map->real, 1);
|
||||
#endif
|
||||
free_page((unsigned long) page_map->real);
|
||||
}
|
||||
|
||||
|
|
|
@ -773,21 +773,15 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
|
|||
|
||||
dev_info(&pdev->dev, "Intel %s Chipset\n", intel_agp_chipsets[i].name);
|
||||
|
||||
/*
|
||||
* If the device has not been properly setup, the following will catch
|
||||
* the problem and should stop the system from crashing.
|
||||
* 20030610 - hamish@zot.org
|
||||
*/
|
||||
if (pci_enable_device(pdev)) {
|
||||
dev_err(&pdev->dev, "can't enable PCI device\n");
|
||||
agp_put_bridge(bridge);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/*
|
||||
* The following fixes the case where the BIOS has "forgotten" to
|
||||
* provide an address range for the GART.
|
||||
* 20030610 - hamish@zot.org
|
||||
* This happens before pci_enable_device() intentionally;
|
||||
* calling pci_enable_device() before assigning the resource
|
||||
* will result in the GART being disabled on machines with such
|
||||
* BIOSs (the GART ends up with a BAR starting at 0, which
|
||||
* conflicts a lot of other devices).
|
||||
*/
|
||||
r = &pdev->resource[0];
|
||||
if (!r->start && r->end) {
|
||||
|
@ -798,6 +792,17 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If the device has not been properly setup, the following will catch
|
||||
* the problem and should stop the system from crashing.
|
||||
* 20030610 - hamish@zot.org
|
||||
*/
|
||||
if (pci_enable_device(pdev)) {
|
||||
dev_err(&pdev->dev, "can't enable PCI device\n");
|
||||
agp_put_bridge(bridge);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Fill in the mode register */
|
||||
if (cap_ptr) {
|
||||
pci_read_config_dword(pdev,
|
||||
|
|
|
@ -2674,3 +2674,23 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
|
|||
mutex_unlock(&dev->mode_config.mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void drm_mode_config_reset(struct drm_device *dev)
|
||||
{
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_encoder *encoder;
|
||||
struct drm_connector *connector;
|
||||
|
||||
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
|
||||
if (crtc->funcs->reset)
|
||||
crtc->funcs->reset(crtc);
|
||||
|
||||
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
|
||||
if (encoder->funcs->reset)
|
||||
encoder->funcs->reset(encoder);
|
||||
|
||||
list_for_each_entry(connector, &dev->mode_config.connector_list, head)
|
||||
if (connector->funcs->reset)
|
||||
connector->funcs->reset(connector);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_mode_config_reset);
|
||||
|
|
|
@ -343,13 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
|
|||
struct drm_encoder *encoder;
|
||||
bool ret = true;
|
||||
|
||||
adjusted_mode = drm_mode_duplicate(dev, mode);
|
||||
|
||||
crtc->enabled = drm_helper_crtc_in_use(crtc);
|
||||
|
||||
if (!crtc->enabled)
|
||||
return true;
|
||||
|
||||
adjusted_mode = drm_mode_duplicate(dev, mode);
|
||||
|
||||
saved_hwmode = crtc->hwmode;
|
||||
saved_mode = crtc->mode;
|
||||
saved_x = crtc->x;
|
||||
|
@ -437,10 +436,9 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
|
|||
*/
|
||||
drm_calc_timestamping_constants(crtc);
|
||||
|
||||
/* XXX free adjustedmode */
|
||||
drm_mode_destroy(dev, adjusted_mode);
|
||||
/* FIXME: add subpixel order */
|
||||
done:
|
||||
drm_mode_destroy(dev, adjusted_mode);
|
||||
if (!ret) {
|
||||
crtc->hwmode = saved_hwmode;
|
||||
crtc->mode = saved_mode;
|
||||
|
@ -497,14 +495,17 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
|
|||
|
||||
crtc_funcs = set->crtc->helper_private;
|
||||
|
||||
if (!set->mode)
|
||||
set->fb = NULL;
|
||||
|
||||
if (set->fb) {
|
||||
DRM_DEBUG_KMS("[CRTC:%d] [FB:%d] #connectors=%d (x y) (%i %i)\n",
|
||||
set->crtc->base.id, set->fb->base.id,
|
||||
(int)set->num_connectors, set->x, set->y);
|
||||
} else {
|
||||
DRM_DEBUG_KMS("[CRTC:%d] [NOFB] #connectors=%d (x y) (%i %i)\n",
|
||||
set->crtc->base.id, (int)set->num_connectors,
|
||||
set->x, set->y);
|
||||
DRM_DEBUG_KMS("[CRTC:%d] [NOFB]\n", set->crtc->base.id);
|
||||
set->mode = NULL;
|
||||
set->num_connectors = 0;
|
||||
}
|
||||
|
||||
dev = set->crtc->dev;
|
||||
|
@ -649,8 +650,8 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
|
|||
mode_changed = true;
|
||||
|
||||
if (mode_changed) {
|
||||
set->crtc->enabled = (set->mode != NULL);
|
||||
if (set->mode != NULL) {
|
||||
set->crtc->enabled = drm_helper_crtc_in_use(set->crtc);
|
||||
if (set->crtc->enabled) {
|
||||
DRM_DEBUG_KMS("attempting to set mode from"
|
||||
" userspace\n");
|
||||
drm_mode_debug_printmodeline(set->mode);
|
||||
|
@ -665,6 +666,12 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
|
|||
ret = -EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
DRM_DEBUG_KMS("Setting connector DPMS state to on\n");
|
||||
for (i = 0; i < set->num_connectors; i++) {
|
||||
DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
|
||||
drm_get_connector_name(set->connectors[i]));
|
||||
set->connectors[i]->dpms = DRM_MODE_DPMS_ON;
|
||||
}
|
||||
}
|
||||
drm_helper_disable_unused_functions(dev);
|
||||
} else if (fb_changed) {
|
||||
|
@ -681,12 +688,6 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
|
|||
goto fail;
|
||||
}
|
||||
}
|
||||
DRM_DEBUG_KMS("Setting connector DPMS state to on\n");
|
||||
for (i = 0; i < set->num_connectors; i++) {
|
||||
DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
|
||||
drm_get_connector_name(set->connectors[i]));
|
||||
set->connectors[i]->dpms = DRM_MODE_DPMS_ON;
|
||||
}
|
||||
|
||||
kfree(save_connectors);
|
||||
kfree(save_encoders);
|
||||
|
|
|
@ -1250,7 +1250,7 @@ void drm_handle_vblank_events(struct drm_device *dev, int crtc)
|
|||
* Drivers should call this routine in their vblank interrupt handlers to
|
||||
* update the vblank counter and send any signals that may be pending.
|
||||
*/
|
||||
void drm_handle_vblank(struct drm_device *dev, int crtc)
|
||||
bool drm_handle_vblank(struct drm_device *dev, int crtc)
|
||||
{
|
||||
u32 vblcount;
|
||||
s64 diff_ns;
|
||||
|
@ -1258,7 +1258,7 @@ void drm_handle_vblank(struct drm_device *dev, int crtc)
|
|||
unsigned long irqflags;
|
||||
|
||||
if (!dev->num_crtcs)
|
||||
return;
|
||||
return false;
|
||||
|
||||
/* Need timestamp lock to prevent concurrent execution with
|
||||
* vblank enable/disable, as this would cause inconsistent
|
||||
|
@ -1269,7 +1269,7 @@ void drm_handle_vblank(struct drm_device *dev, int crtc)
|
|||
/* Vblank irq handling disabled. Nothing to do. */
|
||||
if (!dev->vblank_enabled[crtc]) {
|
||||
spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Fetch corresponding timestamp for this vblank interval from
|
||||
|
@ -1311,5 +1311,6 @@ void drm_handle_vblank(struct drm_device *dev, int crtc)
|
|||
drm_handle_vblank_events(dev, crtc);
|
||||
|
||||
spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags);
|
||||
return true;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_handle_vblank);
|
||||
|
|
|
@ -354,6 +354,7 @@ static int i915_drm_thaw(struct drm_device *dev)
|
|||
error = i915_gem_init_ringbuffer(dev);
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
|
||||
drm_mode_config_reset(dev);
|
||||
drm_irq_install(dev);
|
||||
|
||||
/* Resume the modeset for every activated CRTC */
|
||||
|
@ -542,6 +543,7 @@ int i915_reset(struct drm_device *dev, u8 flags)
|
|||
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
drm_irq_uninstall(dev);
|
||||
drm_mode_config_reset(dev);
|
||||
drm_irq_install(dev);
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
}
|
||||
|
@ -566,6 +568,14 @@ int i915_reset(struct drm_device *dev, u8 flags)
|
|||
static int __devinit
|
||||
i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
{
|
||||
/* Only bind to function 0 of the device. Early generations
|
||||
* used function 1 as a placeholder for multi-head. This causes
|
||||
* us confusion instead, especially on the systems where both
|
||||
* functions have the same PCI-ID!
|
||||
*/
|
||||
if (PCI_FUNC(pdev->devfn))
|
||||
return -ENODEV;
|
||||
|
||||
return drm_get_pci_dev(pdev, ent, &driver);
|
||||
}
|
||||
|
||||
|
|
|
@ -1196,18 +1196,18 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
|
|||
intel_finish_page_flip_plane(dev, 1);
|
||||
}
|
||||
|
||||
if (pipea_stats & vblank_status) {
|
||||
if (pipea_stats & vblank_status &&
|
||||
drm_handle_vblank(dev, 0)) {
|
||||
vblank++;
|
||||
drm_handle_vblank(dev, 0);
|
||||
if (!dev_priv->flip_pending_is_done) {
|
||||
i915_pageflip_stall_check(dev, 0);
|
||||
intel_finish_page_flip(dev, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (pipeb_stats & vblank_status) {
|
||||
if (pipeb_stats & vblank_status &&
|
||||
drm_handle_vblank(dev, 1)) {
|
||||
vblank++;
|
||||
drm_handle_vblank(dev, 1);
|
||||
if (!dev_priv->flip_pending_is_done) {
|
||||
i915_pageflip_stall_check(dev, 1);
|
||||
intel_finish_page_flip(dev, 1);
|
||||
|
|
|
@ -535,6 +535,15 @@ static int intel_crt_set_property(struct drm_connector *connector,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void intel_crt_reset(struct drm_connector *connector)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
struct intel_crt *crt = intel_attached_crt(connector);
|
||||
|
||||
if (HAS_PCH_SPLIT(dev))
|
||||
crt->force_hotplug_required = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Routines for controlling stuff on the analog port
|
||||
*/
|
||||
|
@ -548,6 +557,7 @@ static const struct drm_encoder_helper_funcs intel_crt_helper_funcs = {
|
|||
};
|
||||
|
||||
static const struct drm_connector_funcs intel_crt_connector_funcs = {
|
||||
.reset = intel_crt_reset,
|
||||
.dpms = drm_helper_connector_dpms,
|
||||
.detect = intel_crt_detect,
|
||||
.fill_modes = drm_helper_probe_single_connector_modes,
|
||||
|
|
|
@ -5551,6 +5551,18 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void intel_crtc_reset(struct drm_crtc *crtc)
|
||||
{
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||
|
||||
/* Reset flags back to the 'unknown' status so that they
|
||||
* will be correctly set on the initial modeset.
|
||||
*/
|
||||
intel_crtc->cursor_addr = 0;
|
||||
intel_crtc->dpms_mode = -1;
|
||||
intel_crtc->active = true; /* force the pipe off on setup_init_config */
|
||||
}
|
||||
|
||||
static struct drm_crtc_helper_funcs intel_helper_funcs = {
|
||||
.dpms = intel_crtc_dpms,
|
||||
.mode_fixup = intel_crtc_mode_fixup,
|
||||
|
@ -5562,6 +5574,7 @@ static struct drm_crtc_helper_funcs intel_helper_funcs = {
|
|||
};
|
||||
|
||||
static const struct drm_crtc_funcs intel_crtc_funcs = {
|
||||
.reset = intel_crtc_reset,
|
||||
.cursor_set = intel_crtc_cursor_set,
|
||||
.cursor_move = intel_crtc_cursor_move,
|
||||
.gamma_set = intel_crtc_gamma_set,
|
||||
|
@ -5652,9 +5665,7 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
|
|||
dev_priv->plane_to_crtc_mapping[intel_crtc->plane] = &intel_crtc->base;
|
||||
dev_priv->pipe_to_crtc_mapping[intel_crtc->pipe] = &intel_crtc->base;
|
||||
|
||||
intel_crtc->cursor_addr = 0;
|
||||
intel_crtc->dpms_mode = -1;
|
||||
intel_crtc->active = true; /* force the pipe off on setup_init_config */
|
||||
intel_crtc_reset(&intel_crtc->base);
|
||||
|
||||
if (HAS_PCH_SPLIT(dev)) {
|
||||
intel_helper_funcs.prepare = ironlake_crtc_prepare;
|
||||
|
|
|
@ -473,20 +473,6 @@ static bool intel_sdvo_write_cmd(struct intel_sdvo *intel_sdvo, u8 cmd,
|
|||
return false;
|
||||
}
|
||||
|
||||
i = 3;
|
||||
while (status == SDVO_CMD_STATUS_PENDING && i--) {
|
||||
if (!intel_sdvo_read_byte(intel_sdvo,
|
||||
SDVO_I2C_CMD_STATUS,
|
||||
&status))
|
||||
return false;
|
||||
}
|
||||
if (status != SDVO_CMD_STATUS_SUCCESS) {
|
||||
DRM_DEBUG_KMS("command returns response %s [%d]\n",
|
||||
status <= SDVO_CMD_STATUS_SCALING_NOT_SUPP ? cmd_status_names[status] : "???",
|
||||
status);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -497,6 +483,8 @@ static bool intel_sdvo_read_response(struct intel_sdvo *intel_sdvo,
|
|||
u8 status;
|
||||
int i;
|
||||
|
||||
DRM_DEBUG_KMS("%s: R: ", SDVO_NAME(intel_sdvo));
|
||||
|
||||
/*
|
||||
* The documentation states that all commands will be
|
||||
* processed within 15µs, and that we need only poll
|
||||
|
@ -505,14 +493,19 @@ static bool intel_sdvo_read_response(struct intel_sdvo *intel_sdvo,
|
|||
*
|
||||
* Check 5 times in case the hardware failed to read the docs.
|
||||
*/
|
||||
do {
|
||||
if (!intel_sdvo_read_byte(intel_sdvo,
|
||||
SDVO_I2C_CMD_STATUS,
|
||||
&status))
|
||||
goto log_fail;
|
||||
|
||||
while (status == SDVO_CMD_STATUS_PENDING && retry--) {
|
||||
udelay(15);
|
||||
if (!intel_sdvo_read_byte(intel_sdvo,
|
||||
SDVO_I2C_CMD_STATUS,
|
||||
&status))
|
||||
return false;
|
||||
} while (status == SDVO_CMD_STATUS_PENDING && --retry);
|
||||
goto log_fail;
|
||||
}
|
||||
|
||||
DRM_DEBUG_KMS("%s: R: ", SDVO_NAME(intel_sdvo));
|
||||
if (status <= SDVO_CMD_STATUS_SCALING_NOT_SUPP)
|
||||
DRM_LOG_KMS("(%s)", cmd_status_names[status]);
|
||||
else
|
||||
|
@ -533,7 +526,7 @@ static bool intel_sdvo_read_response(struct intel_sdvo *intel_sdvo,
|
|||
return true;
|
||||
|
||||
log_fail:
|
||||
DRM_LOG_KMS("\n");
|
||||
DRM_LOG_KMS("... failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -550,6 +543,7 @@ static int intel_sdvo_get_pixel_multiplier(struct drm_display_mode *mode)
|
|||
static bool intel_sdvo_set_control_bus_switch(struct intel_sdvo *intel_sdvo,
|
||||
u8 ddc_bus)
|
||||
{
|
||||
/* This must be the immediately preceding write before the i2c xfer */
|
||||
return intel_sdvo_write_cmd(intel_sdvo,
|
||||
SDVO_CMD_SET_CONTROL_BUS_SWITCH,
|
||||
&ddc_bus, 1);
|
||||
|
@ -557,7 +551,10 @@ static bool intel_sdvo_set_control_bus_switch(struct intel_sdvo *intel_sdvo,
|
|||
|
||||
static bool intel_sdvo_set_value(struct intel_sdvo *intel_sdvo, u8 cmd, const void *data, int len)
|
||||
{
|
||||
return intel_sdvo_write_cmd(intel_sdvo, cmd, data, len);
|
||||
if (!intel_sdvo_write_cmd(intel_sdvo, cmd, data, len))
|
||||
return false;
|
||||
|
||||
return intel_sdvo_read_response(intel_sdvo, NULL, 0);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -859,18 +856,21 @@ static bool intel_sdvo_set_avi_infoframe(struct intel_sdvo *intel_sdvo)
|
|||
|
||||
intel_dip_infoframe_csum(&avi_if);
|
||||
|
||||
if (!intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_SET_HBUF_INDEX,
|
||||
if (!intel_sdvo_set_value(intel_sdvo,
|
||||
SDVO_CMD_SET_HBUF_INDEX,
|
||||
set_buf_index, 2))
|
||||
return false;
|
||||
|
||||
for (i = 0; i < sizeof(avi_if); i += 8) {
|
||||
if (!intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_SET_HBUF_DATA,
|
||||
if (!intel_sdvo_set_value(intel_sdvo,
|
||||
SDVO_CMD_SET_HBUF_DATA,
|
||||
data, 8))
|
||||
return false;
|
||||
data++;
|
||||
}
|
||||
|
||||
return intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_SET_HBUF_TXRATE,
|
||||
return intel_sdvo_set_value(intel_sdvo,
|
||||
SDVO_CMD_SET_HBUF_TXRATE,
|
||||
&tx_rate, 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -443,7 +443,7 @@ nouveau_hwmon_fini(struct drm_device *dev)
|
|||
struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
|
||||
|
||||
if (pm->hwmon) {
|
||||
sysfs_remove_group(&pm->hwmon->kobj, &hwmon_attrgroup);
|
||||
sysfs_remove_group(&dev->pdev->dev.kobj, &hwmon_attrgroup);
|
||||
hwmon_device_unregister(pm->hwmon);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -283,8 +283,7 @@ nv50_evo_create(struct drm_device *dev)
|
|||
nv50_evo_channel_del(&dev_priv->evo);
|
||||
return ret;
|
||||
}
|
||||
} else
|
||||
if (dev_priv->chipset != 0x50) {
|
||||
} else {
|
||||
ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB16, 0x70, 0x19,
|
||||
0, 0xffffffff, 0x00010000);
|
||||
if (ret) {
|
||||
|
|
|
@ -555,6 +555,7 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
|
|||
dp_clock = dig_connector->dp_clock;
|
||||
}
|
||||
}
|
||||
/* this might work properly with the new pll algo */
|
||||
#if 0 /* doesn't work properly on some laptops */
|
||||
/* use recommended ref_div for ss */
|
||||
if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
|
||||
|
@ -572,6 +573,11 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
|
|||
adjusted_clock = mode->clock * 2;
|
||||
if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT))
|
||||
pll->flags |= RADEON_PLL_PREFER_CLOSEST_LOWER;
|
||||
/* rv515 needs more testing with this option */
|
||||
if (rdev->family != CHIP_RV515) {
|
||||
if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT))
|
||||
pll->flags |= RADEON_PLL_IS_LCD;
|
||||
}
|
||||
} else {
|
||||
if (encoder->encoder_type != DRM_MODE_ENCODER_DAC)
|
||||
pll->flags |= RADEON_PLL_NO_ODD_POST_DIV;
|
||||
|
@ -951,8 +957,16 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode
|
|||
/* adjust pixel clock as needed */
|
||||
adjusted_clock = atombios_adjust_pll(crtc, mode, pll, ss_enabled, &ss);
|
||||
|
||||
radeon_compute_pll(pll, adjusted_clock, &pll_clock, &fb_div, &frac_fb_div,
|
||||
&ref_div, &post_div);
|
||||
/* rv515 seems happier with the old algo */
|
||||
if (rdev->family == CHIP_RV515)
|
||||
radeon_compute_pll_legacy(pll, adjusted_clock, &pll_clock, &fb_div, &frac_fb_div,
|
||||
&ref_div, &post_div);
|
||||
else if (ASIC_IS_AVIVO(rdev))
|
||||
radeon_compute_pll_avivo(pll, adjusted_clock, &pll_clock, &fb_div, &frac_fb_div,
|
||||
&ref_div, &post_div);
|
||||
else
|
||||
radeon_compute_pll_legacy(pll, adjusted_clock, &pll_clock, &fb_div, &frac_fb_div,
|
||||
&ref_div, &post_div);
|
||||
|
||||
atombios_crtc_program_ss(crtc, ATOM_DISABLE, radeon_crtc->pll_id, &ss);
|
||||
|
||||
|
|
|
@ -97,26 +97,29 @@ u32 evergreen_page_flip(struct radeon_device *rdev, int crtc_id, u64 crtc_base)
|
|||
}
|
||||
|
||||
/* get temperature in millidegrees */
|
||||
u32 evergreen_get_temp(struct radeon_device *rdev)
|
||||
int evergreen_get_temp(struct radeon_device *rdev)
|
||||
{
|
||||
u32 temp = (RREG32(CG_MULT_THERMAL_STATUS) & ASIC_T_MASK) >>
|
||||
ASIC_T_SHIFT;
|
||||
u32 actual_temp = 0;
|
||||
|
||||
if ((temp >> 10) & 1)
|
||||
actual_temp = 0;
|
||||
else if ((temp >> 9) & 1)
|
||||
if (temp & 0x400)
|
||||
actual_temp = -256;
|
||||
else if (temp & 0x200)
|
||||
actual_temp = 255;
|
||||
else
|
||||
actual_temp = (temp >> 1) & 0xff;
|
||||
else if (temp & 0x100) {
|
||||
actual_temp = temp & 0x1ff;
|
||||
actual_temp |= ~0x1ff;
|
||||
} else
|
||||
actual_temp = temp & 0xff;
|
||||
|
||||
return actual_temp * 1000;
|
||||
return (actual_temp * 1000) / 2;
|
||||
}
|
||||
|
||||
u32 sumo_get_temp(struct radeon_device *rdev)
|
||||
int sumo_get_temp(struct radeon_device *rdev)
|
||||
{
|
||||
u32 temp = RREG32(CG_THERMAL_STATUS) & 0xff;
|
||||
u32 actual_temp = (temp >> 1) & 0xff;
|
||||
int actual_temp = temp - 49;
|
||||
|
||||
return actual_temp * 1000;
|
||||
}
|
||||
|
@ -1182,6 +1185,18 @@ static void evergreen_mc_program(struct radeon_device *rdev)
|
|||
/*
|
||||
* CP.
|
||||
*/
|
||||
void evergreen_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib)
|
||||
{
|
||||
/* set to DX10/11 mode */
|
||||
radeon_ring_write(rdev, PACKET3(PACKET3_MODE_CONTROL, 0));
|
||||
radeon_ring_write(rdev, 1);
|
||||
/* FIXME: implement */
|
||||
radeon_ring_write(rdev, PACKET3(PACKET3_INDIRECT_BUFFER, 2));
|
||||
radeon_ring_write(rdev, ib->gpu_addr & 0xFFFFFFFC);
|
||||
radeon_ring_write(rdev, upper_32_bits(ib->gpu_addr) & 0xFF);
|
||||
radeon_ring_write(rdev, ib->length_dw);
|
||||
}
|
||||
|
||||
|
||||
static int evergreen_cp_load_microcode(struct radeon_device *rdev)
|
||||
{
|
||||
|
@ -1233,7 +1248,7 @@ static int evergreen_cp_start(struct radeon_device *rdev)
|
|||
cp_me = 0xff;
|
||||
WREG32(CP_ME_CNTL, cp_me);
|
||||
|
||||
r = radeon_ring_lock(rdev, evergreen_default_size + 15);
|
||||
r = radeon_ring_lock(rdev, evergreen_default_size + 19);
|
||||
if (r) {
|
||||
DRM_ERROR("radeon: cp failed to lock ring (%d).\n", r);
|
||||
return r;
|
||||
|
@ -1266,6 +1281,11 @@ static int evergreen_cp_start(struct radeon_device *rdev)
|
|||
radeon_ring_write(rdev, 0xffffffff);
|
||||
radeon_ring_write(rdev, 0xffffffff);
|
||||
|
||||
radeon_ring_write(rdev, 0xc0026900);
|
||||
radeon_ring_write(rdev, 0x00000316);
|
||||
radeon_ring_write(rdev, 0x0000000e); /* VGT_VERTEX_REUSE_BLOCK_CNTL */
|
||||
radeon_ring_write(rdev, 0x00000010); /* */
|
||||
|
||||
radeon_ring_unlock_commit(rdev);
|
||||
|
||||
return 0;
|
||||
|
@ -2072,6 +2092,7 @@ static void evergreen_gpu_init(struct radeon_device *rdev)
|
|||
WREG32(VGT_CACHE_INVALIDATION, vgt_cache_invalidation);
|
||||
|
||||
WREG32(VGT_GS_VERTEX_REUSE, 16);
|
||||
WREG32(PA_SU_LINE_STIPPLE_VALUE, 0);
|
||||
WREG32(PA_SC_LINE_STIPPLE_STATE, 0);
|
||||
|
||||
WREG32(VGT_VERTEX_REUSE_BLOCK_CNTL, 14);
|
||||
|
|
|
@ -232,7 +232,7 @@ draw_auto(struct radeon_device *rdev)
|
|||
|
||||
}
|
||||
|
||||
/* emits 34 */
|
||||
/* emits 36 */
|
||||
static void
|
||||
set_default_state(struct radeon_device *rdev)
|
||||
{
|
||||
|
@ -499,6 +499,10 @@ set_default_state(struct radeon_device *rdev)
|
|||
radeon_ring_write(rdev, 0x00000000);
|
||||
radeon_ring_write(rdev, 0x00000000);
|
||||
|
||||
/* set to DX10/11 mode */
|
||||
radeon_ring_write(rdev, PACKET3(PACKET3_MODE_CONTROL, 0));
|
||||
radeon_ring_write(rdev, 1);
|
||||
|
||||
/* emit an IB pointing at default state */
|
||||
dwords = ALIGN(rdev->r600_blit.state_len, 0x10);
|
||||
gpu_addr = rdev->r600_blit.shader_gpu_addr + rdev->r600_blit.state_offset;
|
||||
|
@ -679,7 +683,7 @@ int evergreen_blit_prepare_copy(struct radeon_device *rdev, int size_bytes)
|
|||
/* calculate number of loops correctly */
|
||||
ring_size = num_loops * dwords_per_loop;
|
||||
/* set default + shaders */
|
||||
ring_size += 50; /* shaders + def state */
|
||||
ring_size += 52; /* shaders + def state */
|
||||
ring_size += 10; /* fence emit for VB IB */
|
||||
ring_size += 5; /* done copy */
|
||||
ring_size += 10; /* fence emit for done copy */
|
||||
|
@ -687,7 +691,7 @@ int evergreen_blit_prepare_copy(struct radeon_device *rdev, int size_bytes)
|
|||
if (r)
|
||||
return r;
|
||||
|
||||
set_default_state(rdev); /* 34 */
|
||||
set_default_state(rdev); /* 36 */
|
||||
set_shaders(rdev); /* 16 */
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -240,6 +240,7 @@
|
|||
#define FORCE_EOV_MAX_CLK_CNT(x) ((x) << 0)
|
||||
#define FORCE_EOV_MAX_REZ_CNT(x) ((x) << 16)
|
||||
#define PA_SC_LINE_STIPPLE 0x28A0C
|
||||
#define PA_SU_LINE_STIPPLE_VALUE 0x8A60
|
||||
#define PA_SC_LINE_STIPPLE_STATE 0x8B10
|
||||
|
||||
#define SCRATCH_REG0 0x8500
|
||||
|
@ -652,6 +653,7 @@
|
|||
#define PACKET3_DISPATCH_DIRECT 0x15
|
||||
#define PACKET3_DISPATCH_INDIRECT 0x16
|
||||
#define PACKET3_INDIRECT_BUFFER_END 0x17
|
||||
#define PACKET3_MODE_CONTROL 0x18
|
||||
#define PACKET3_SET_PREDICATION 0x20
|
||||
#define PACKET3_REG_RMW 0x21
|
||||
#define PACKET3_COND_EXEC 0x22
|
||||
|
|
|
@ -97,12 +97,16 @@ void r600_irq_disable(struct radeon_device *rdev);
|
|||
static void r600_pcie_gen2_enable(struct radeon_device *rdev);
|
||||
|
||||
/* get temperature in millidegrees */
|
||||
u32 rv6xx_get_temp(struct radeon_device *rdev)
|
||||
int rv6xx_get_temp(struct radeon_device *rdev)
|
||||
{
|
||||
u32 temp = (RREG32(CG_THERMAL_STATUS) & ASIC_T_MASK) >>
|
||||
ASIC_T_SHIFT;
|
||||
int actual_temp = temp & 0xff;
|
||||
|
||||
return temp * 1000;
|
||||
if (temp & 0x100)
|
||||
actual_temp -= 256;
|
||||
|
||||
return actual_temp * 1000;
|
||||
}
|
||||
|
||||
void r600_pm_get_dynpm_state(struct radeon_device *rdev)
|
||||
|
|
|
@ -179,10 +179,10 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev);
|
|||
void radeon_atombios_get_power_modes(struct radeon_device *rdev);
|
||||
void radeon_atom_set_voltage(struct radeon_device *rdev, u16 level);
|
||||
void rs690_pm_info(struct radeon_device *rdev);
|
||||
extern u32 rv6xx_get_temp(struct radeon_device *rdev);
|
||||
extern u32 rv770_get_temp(struct radeon_device *rdev);
|
||||
extern u32 evergreen_get_temp(struct radeon_device *rdev);
|
||||
extern u32 sumo_get_temp(struct radeon_device *rdev);
|
||||
extern int rv6xx_get_temp(struct radeon_device *rdev);
|
||||
extern int rv770_get_temp(struct radeon_device *rdev);
|
||||
extern int evergreen_get_temp(struct radeon_device *rdev);
|
||||
extern int sumo_get_temp(struct radeon_device *rdev);
|
||||
|
||||
/*
|
||||
* Fences.
|
||||
|
@ -812,8 +812,7 @@ struct radeon_pm {
|
|||
fixed20_12 sclk;
|
||||
fixed20_12 mclk;
|
||||
fixed20_12 needed_bandwidth;
|
||||
/* XXX: use a define for num power modes */
|
||||
struct radeon_power_state power_state[8];
|
||||
struct radeon_power_state *power_state;
|
||||
/* number of valid power states */
|
||||
int num_power_states;
|
||||
int current_power_state_index;
|
||||
|
|
|
@ -759,7 +759,7 @@ static struct radeon_asic evergreen_asic = {
|
|||
.gart_tlb_flush = &evergreen_pcie_gart_tlb_flush,
|
||||
.gart_set_page = &rs600_gart_set_page,
|
||||
.ring_test = &r600_ring_test,
|
||||
.ring_ib_execute = &r600_ring_ib_execute,
|
||||
.ring_ib_execute = &evergreen_ring_ib_execute,
|
||||
.irq_set = &evergreen_irq_set,
|
||||
.irq_process = &evergreen_irq_process,
|
||||
.get_vblank_counter = &evergreen_get_vblank_counter,
|
||||
|
@ -805,7 +805,7 @@ static struct radeon_asic sumo_asic = {
|
|||
.gart_tlb_flush = &evergreen_pcie_gart_tlb_flush,
|
||||
.gart_set_page = &rs600_gart_set_page,
|
||||
.ring_test = &r600_ring_test,
|
||||
.ring_ib_execute = &r600_ring_ib_execute,
|
||||
.ring_ib_execute = &evergreen_ring_ib_execute,
|
||||
.irq_set = &evergreen_irq_set,
|
||||
.irq_process = &evergreen_irq_process,
|
||||
.get_vblank_counter = &evergreen_get_vblank_counter,
|
||||
|
@ -848,7 +848,7 @@ static struct radeon_asic btc_asic = {
|
|||
.gart_tlb_flush = &evergreen_pcie_gart_tlb_flush,
|
||||
.gart_set_page = &rs600_gart_set_page,
|
||||
.ring_test = &r600_ring_test,
|
||||
.ring_ib_execute = &r600_ring_ib_execute,
|
||||
.ring_ib_execute = &evergreen_ring_ib_execute,
|
||||
.irq_set = &evergreen_irq_set,
|
||||
.irq_process = &evergreen_irq_process,
|
||||
.get_vblank_counter = &evergreen_get_vblank_counter,
|
||||
|
|
|
@ -355,6 +355,7 @@ int evergreen_resume(struct radeon_device *rdev);
|
|||
bool evergreen_gpu_is_lockup(struct radeon_device *rdev);
|
||||
int evergreen_asic_reset(struct radeon_device *rdev);
|
||||
void evergreen_bandwidth_update(struct radeon_device *rdev);
|
||||
void evergreen_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib);
|
||||
int evergreen_copy_blit(struct radeon_device *rdev,
|
||||
uint64_t src_offset, uint64_t dst_offset,
|
||||
unsigned num_pages, struct radeon_fence *fence);
|
||||
|
|
|
@ -1163,16 +1163,6 @@ bool radeon_atom_get_clock_info(struct drm_device *dev)
|
|||
p1pll->pll_out_min = 64800;
|
||||
else
|
||||
p1pll->pll_out_min = 20000;
|
||||
} else if (p1pll->pll_out_min > 64800) {
|
||||
/* Limiting the pll output range is a good thing generally as
|
||||
* it limits the number of possible pll combinations for a given
|
||||
* frequency presumably to the ones that work best on each card.
|
||||
* However, certain duallink DVI monitors seem to like
|
||||
* pll combinations that would be limited by this at least on
|
||||
* pre-DCE 3.0 r6xx hardware. This might need to be adjusted per
|
||||
* family.
|
||||
*/
|
||||
p1pll->pll_out_min = 64800;
|
||||
}
|
||||
|
||||
p1pll->pll_in_min =
|
||||
|
@ -1987,6 +1977,9 @@ static int radeon_atombios_parse_power_table_1_3(struct radeon_device *rdev)
|
|||
num_modes = power_info->info.ucNumOfPowerModeEntries;
|
||||
if (num_modes > ATOM_MAX_NUMBEROF_POWER_BLOCK)
|
||||
num_modes = ATOM_MAX_NUMBEROF_POWER_BLOCK;
|
||||
rdev->pm.power_state = kzalloc(sizeof(struct radeon_power_state) * num_modes, GFP_KERNEL);
|
||||
if (!rdev->pm.power_state)
|
||||
return state_index;
|
||||
/* last mode is usually default, array is low to high */
|
||||
for (i = 0; i < num_modes; i++) {
|
||||
rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE;
|
||||
|
@ -2338,6 +2331,10 @@ static int radeon_atombios_parse_power_table_4_5(struct radeon_device *rdev)
|
|||
power_info = (union power_info *)(mode_info->atom_context->bios + data_offset);
|
||||
|
||||
radeon_atombios_add_pplib_thermal_controller(rdev, &power_info->pplib.sThermalController);
|
||||
rdev->pm.power_state = kzalloc(sizeof(struct radeon_power_state) *
|
||||
power_info->pplib.ucNumStates, GFP_KERNEL);
|
||||
if (!rdev->pm.power_state)
|
||||
return state_index;
|
||||
/* first mode is usually default, followed by low to high */
|
||||
for (i = 0; i < power_info->pplib.ucNumStates; i++) {
|
||||
mode_index = 0;
|
||||
|
@ -2418,6 +2415,10 @@ static int radeon_atombios_parse_power_table_6(struct radeon_device *rdev)
|
|||
non_clock_info_array = (struct NonClockInfoArray *)
|
||||
(mode_info->atom_context->bios + data_offset +
|
||||
power_info->pplib.usNonClockInfoArrayOffset);
|
||||
rdev->pm.power_state = kzalloc(sizeof(struct radeon_power_state) *
|
||||
state_array->ucNumEntries, GFP_KERNEL);
|
||||
if (!rdev->pm.power_state)
|
||||
return state_index;
|
||||
for (i = 0; i < state_array->ucNumEntries; i++) {
|
||||
mode_index = 0;
|
||||
power_state = (union pplib_power_state *)&state_array->states[i];
|
||||
|
@ -2491,19 +2492,22 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev)
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
/* add the default mode */
|
||||
rdev->pm.power_state[state_index].type =
|
||||
POWER_STATE_TYPE_DEFAULT;
|
||||
rdev->pm.power_state[state_index].num_clock_modes = 1;
|
||||
rdev->pm.power_state[state_index].clock_info[0].mclk = rdev->clock.default_mclk;
|
||||
rdev->pm.power_state[state_index].clock_info[0].sclk = rdev->clock.default_sclk;
|
||||
rdev->pm.power_state[state_index].default_clock_mode =
|
||||
&rdev->pm.power_state[state_index].clock_info[0];
|
||||
rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE;
|
||||
rdev->pm.power_state[state_index].pcie_lanes = 16;
|
||||
rdev->pm.default_power_state_index = state_index;
|
||||
rdev->pm.power_state[state_index].flags = 0;
|
||||
state_index++;
|
||||
rdev->pm.power_state = kzalloc(sizeof(struct radeon_power_state), GFP_KERNEL);
|
||||
if (rdev->pm.power_state) {
|
||||
/* add the default mode */
|
||||
rdev->pm.power_state[state_index].type =
|
||||
POWER_STATE_TYPE_DEFAULT;
|
||||
rdev->pm.power_state[state_index].num_clock_modes = 1;
|
||||
rdev->pm.power_state[state_index].clock_info[0].mclk = rdev->clock.default_mclk;
|
||||
rdev->pm.power_state[state_index].clock_info[0].sclk = rdev->clock.default_sclk;
|
||||
rdev->pm.power_state[state_index].default_clock_mode =
|
||||
&rdev->pm.power_state[state_index].clock_info[0];
|
||||
rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE;
|
||||
rdev->pm.power_state[state_index].pcie_lanes = 16;
|
||||
rdev->pm.default_power_state_index = state_index;
|
||||
rdev->pm.power_state[state_index].flags = 0;
|
||||
state_index++;
|
||||
}
|
||||
}
|
||||
|
||||
rdev->pm.num_power_states = state_index;
|
||||
|
@ -2619,7 +2623,7 @@ void radeon_atom_initialize_bios_scratch_regs(struct drm_device *dev)
|
|||
bios_2_scratch &= ~ATOM_S2_VRI_BRIGHT_ENABLE;
|
||||
|
||||
/* tell the bios not to handle mode switching */
|
||||
bios_6_scratch |= (ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH | ATOM_S6_ACC_MODE);
|
||||
bios_6_scratch |= ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH;
|
||||
|
||||
if (rdev->family >= CHIP_R600) {
|
||||
WREG32(R600_BIOS_2_SCRATCH, bios_2_scratch);
|
||||
|
@ -2670,10 +2674,13 @@ void radeon_atom_output_lock(struct drm_encoder *encoder, bool lock)
|
|||
else
|
||||
bios_6_scratch = RREG32(RADEON_BIOS_6_SCRATCH);
|
||||
|
||||
if (lock)
|
||||
if (lock) {
|
||||
bios_6_scratch |= ATOM_S6_CRITICAL_STATE;
|
||||
else
|
||||
bios_6_scratch &= ~ATOM_S6_ACC_MODE;
|
||||
} else {
|
||||
bios_6_scratch &= ~ATOM_S6_CRITICAL_STATE;
|
||||
bios_6_scratch |= ATOM_S6_ACC_MODE;
|
||||
}
|
||||
|
||||
if (rdev->family >= CHIP_R600)
|
||||
WREG32(R600_BIOS_6_SCRATCH, bios_6_scratch);
|
||||
|
|
|
@ -2442,6 +2442,17 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
|
|||
|
||||
rdev->pm.default_power_state_index = -1;
|
||||
|
||||
/* allocate 2 power states */
|
||||
rdev->pm.power_state = kzalloc(sizeof(struct radeon_power_state) * 2, GFP_KERNEL);
|
||||
if (!rdev->pm.power_state) {
|
||||
rdev->pm.default_power_state_index = state_index;
|
||||
rdev->pm.num_power_states = 0;
|
||||
|
||||
rdev->pm.current_power_state_index = rdev->pm.default_power_state_index;
|
||||
rdev->pm.current_clock_mode_index = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (rdev->flags & RADEON_IS_MOBILITY) {
|
||||
offset = combios_get_table_offset(dev, COMBIOS_POWERPLAY_INFO_TABLE);
|
||||
if (offset) {
|
||||
|
|
|
@ -780,6 +780,115 @@ static int radeon_ddc_dump(struct drm_connector *connector)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* avivo */
|
||||
static void avivo_get_fb_div(struct radeon_pll *pll,
|
||||
u32 target_clock,
|
||||
u32 post_div,
|
||||
u32 ref_div,
|
||||
u32 *fb_div,
|
||||
u32 *frac_fb_div)
|
||||
{
|
||||
u32 tmp = post_div * ref_div;
|
||||
|
||||
tmp *= target_clock;
|
||||
*fb_div = tmp / pll->reference_freq;
|
||||
*frac_fb_div = tmp % pll->reference_freq;
|
||||
}
|
||||
|
||||
static u32 avivo_get_post_div(struct radeon_pll *pll,
|
||||
u32 target_clock)
|
||||
{
|
||||
u32 vco, post_div, tmp;
|
||||
|
||||
if (pll->flags & RADEON_PLL_USE_POST_DIV)
|
||||
return pll->post_div;
|
||||
|
||||
if (pll->flags & RADEON_PLL_PREFER_MINM_OVER_MAXP) {
|
||||
if (pll->flags & RADEON_PLL_IS_LCD)
|
||||
vco = pll->lcd_pll_out_min;
|
||||
else
|
||||
vco = pll->pll_out_min;
|
||||
} else {
|
||||
if (pll->flags & RADEON_PLL_IS_LCD)
|
||||
vco = pll->lcd_pll_out_max;
|
||||
else
|
||||
vco = pll->pll_out_max;
|
||||
}
|
||||
|
||||
post_div = vco / target_clock;
|
||||
tmp = vco % target_clock;
|
||||
|
||||
if (pll->flags & RADEON_PLL_PREFER_MINM_OVER_MAXP) {
|
||||
if (tmp)
|
||||
post_div++;
|
||||
} else {
|
||||
if (!tmp)
|
||||
post_div--;
|
||||
}
|
||||
|
||||
return post_div;
|
||||
}
|
||||
|
||||
#define MAX_TOLERANCE 10
|
||||
|
||||
void radeon_compute_pll_avivo(struct radeon_pll *pll,
|
||||
u32 freq,
|
||||
u32 *dot_clock_p,
|
||||
u32 *fb_div_p,
|
||||
u32 *frac_fb_div_p,
|
||||
u32 *ref_div_p,
|
||||
u32 *post_div_p)
|
||||
{
|
||||
u32 target_clock = freq / 10;
|
||||
u32 post_div = avivo_get_post_div(pll, target_clock);
|
||||
u32 ref_div = pll->min_ref_div;
|
||||
u32 fb_div = 0, frac_fb_div = 0, tmp;
|
||||
|
||||
if (pll->flags & RADEON_PLL_USE_REF_DIV)
|
||||
ref_div = pll->reference_div;
|
||||
|
||||
if (pll->flags & RADEON_PLL_USE_FRAC_FB_DIV) {
|
||||
avivo_get_fb_div(pll, target_clock, post_div, ref_div, &fb_div, &frac_fb_div);
|
||||
frac_fb_div = (100 * frac_fb_div) / pll->reference_freq;
|
||||
if (frac_fb_div >= 5) {
|
||||
frac_fb_div -= 5;
|
||||
frac_fb_div = frac_fb_div / 10;
|
||||
frac_fb_div++;
|
||||
}
|
||||
if (frac_fb_div >= 10) {
|
||||
fb_div++;
|
||||
frac_fb_div = 0;
|
||||
}
|
||||
} else {
|
||||
while (ref_div <= pll->max_ref_div) {
|
||||
avivo_get_fb_div(pll, target_clock, post_div, ref_div,
|
||||
&fb_div, &frac_fb_div);
|
||||
if (frac_fb_div >= (pll->reference_freq / 2))
|
||||
fb_div++;
|
||||
frac_fb_div = 0;
|
||||
tmp = (pll->reference_freq * fb_div) / (post_div * ref_div);
|
||||
tmp = (tmp * 10000) / target_clock;
|
||||
|
||||
if (tmp > (10000 + MAX_TOLERANCE))
|
||||
ref_div++;
|
||||
else if (tmp >= (10000 - MAX_TOLERANCE))
|
||||
break;
|
||||
else
|
||||
ref_div++;
|
||||
}
|
||||
}
|
||||
|
||||
*dot_clock_p = ((pll->reference_freq * fb_div * 10) + (pll->reference_freq * frac_fb_div)) /
|
||||
(ref_div * post_div * 10);
|
||||
*fb_div_p = fb_div;
|
||||
*frac_fb_div_p = frac_fb_div;
|
||||
*ref_div_p = ref_div;
|
||||
*post_div_p = post_div;
|
||||
DRM_DEBUG_KMS("%d, pll dividers - fb: %d.%d ref: %d, post %d\n",
|
||||
*dot_clock_p, fb_div, frac_fb_div, ref_div, post_div);
|
||||
}
|
||||
|
||||
/* pre-avivo */
|
||||
static inline uint32_t radeon_div(uint64_t n, uint32_t d)
|
||||
{
|
||||
uint64_t mod;
|
||||
|
@ -790,13 +899,13 @@ static inline uint32_t radeon_div(uint64_t n, uint32_t d)
|
|||
return n;
|
||||
}
|
||||
|
||||
void radeon_compute_pll(struct radeon_pll *pll,
|
||||
uint64_t freq,
|
||||
uint32_t *dot_clock_p,
|
||||
uint32_t *fb_div_p,
|
||||
uint32_t *frac_fb_div_p,
|
||||
uint32_t *ref_div_p,
|
||||
uint32_t *post_div_p)
|
||||
void radeon_compute_pll_legacy(struct radeon_pll *pll,
|
||||
uint64_t freq,
|
||||
uint32_t *dot_clock_p,
|
||||
uint32_t *fb_div_p,
|
||||
uint32_t *frac_fb_div_p,
|
||||
uint32_t *ref_div_p,
|
||||
uint32_t *post_div_p)
|
||||
{
|
||||
uint32_t min_ref_div = pll->min_ref_div;
|
||||
uint32_t max_ref_div = pll->max_ref_div;
|
||||
|
@ -826,6 +935,9 @@ void radeon_compute_pll(struct radeon_pll *pll,
|
|||
pll_out_max = pll->pll_out_max;
|
||||
}
|
||||
|
||||
if (pll_out_min > 64800)
|
||||
pll_out_min = 64800;
|
||||
|
||||
if (pll->flags & RADEON_PLL_USE_REF_DIV)
|
||||
min_ref_div = max_ref_div = pll->reference_div;
|
||||
else {
|
||||
|
@ -849,7 +961,7 @@ void radeon_compute_pll(struct radeon_pll *pll,
|
|||
max_fractional_feed_div = pll->max_frac_feedback_div;
|
||||
}
|
||||
|
||||
for (post_div = max_post_div; post_div >= min_post_div; --post_div) {
|
||||
for (post_div = min_post_div; post_div <= max_post_div; ++post_div) {
|
||||
uint32_t ref_div;
|
||||
|
||||
if ((pll->flags & RADEON_PLL_NO_ODD_POST_DIV) && (post_div & 1))
|
||||
|
@ -965,6 +1077,10 @@ void radeon_compute_pll(struct radeon_pll *pll,
|
|||
*frac_fb_div_p = best_frac_feedback_div;
|
||||
*ref_div_p = best_ref_div;
|
||||
*post_div_p = best_post_div;
|
||||
DRM_DEBUG_KMS("%d %d, pll dividers - fb: %d.%d ref: %d, post %d\n",
|
||||
freq, best_freq / 1000, best_feedback_div, best_frac_feedback_div,
|
||||
best_ref_div, best_post_div);
|
||||
|
||||
}
|
||||
|
||||
static void radeon_user_framebuffer_destroy(struct drm_framebuffer *fb)
|
||||
|
|
|
@ -1063,7 +1063,7 @@ atombios_set_edp_panel_power(struct drm_connector *connector, int action)
|
|||
if (!ASIC_IS_DCE4(rdev))
|
||||
return;
|
||||
|
||||
if ((action != ATOM_TRANSMITTER_ACTION_POWER_ON) ||
|
||||
if ((action != ATOM_TRANSMITTER_ACTION_POWER_ON) &&
|
||||
(action != ATOM_TRANSMITTER_ACTION_POWER_OFF))
|
||||
return;
|
||||
|
||||
|
|
|
@ -778,9 +778,9 @@ static void radeon_set_pll(struct drm_crtc *crtc, struct drm_display_mode *mode)
|
|||
DRM_DEBUG_KMS("\n");
|
||||
|
||||
if (!use_bios_divs) {
|
||||
radeon_compute_pll(pll, mode->clock,
|
||||
&freq, &feedback_div, &frac_fb_div,
|
||||
&reference_div, &post_divider);
|
||||
radeon_compute_pll_legacy(pll, mode->clock,
|
||||
&freq, &feedback_div, &frac_fb_div,
|
||||
&reference_div, &post_divider);
|
||||
|
||||
for (post_div = &post_divs[0]; post_div->divider; ++post_div) {
|
||||
if (post_div->divider == post_divider)
|
||||
|
|
|
@ -149,6 +149,7 @@ struct radeon_tmds_pll {
|
|||
#define RADEON_PLL_PREFER_CLOSEST_LOWER (1 << 11)
|
||||
#define RADEON_PLL_USE_POST_DIV (1 << 12)
|
||||
#define RADEON_PLL_IS_LCD (1 << 13)
|
||||
#define RADEON_PLL_PREFER_MINM_OVER_MAXP (1 << 14)
|
||||
|
||||
struct radeon_pll {
|
||||
/* reference frequency */
|
||||
|
@ -510,13 +511,21 @@ extern bool radeon_atombios_get_asic_ss_info(struct radeon_device *rdev,
|
|||
struct radeon_atom_ss *ss,
|
||||
int id, u32 clock);
|
||||
|
||||
extern void radeon_compute_pll(struct radeon_pll *pll,
|
||||
uint64_t freq,
|
||||
uint32_t *dot_clock_p,
|
||||
uint32_t *fb_div_p,
|
||||
uint32_t *frac_fb_div_p,
|
||||
uint32_t *ref_div_p,
|
||||
uint32_t *post_div_p);
|
||||
extern void radeon_compute_pll_legacy(struct radeon_pll *pll,
|
||||
uint64_t freq,
|
||||
uint32_t *dot_clock_p,
|
||||
uint32_t *fb_div_p,
|
||||
uint32_t *frac_fb_div_p,
|
||||
uint32_t *ref_div_p,
|
||||
uint32_t *post_div_p);
|
||||
|
||||
extern void radeon_compute_pll_avivo(struct radeon_pll *pll,
|
||||
u32 freq,
|
||||
u32 *dot_clock_p,
|
||||
u32 *fb_div_p,
|
||||
u32 *frac_fb_div_p,
|
||||
u32 *ref_div_p,
|
||||
u32 *post_div_p);
|
||||
|
||||
extern void radeon_setup_encoder_clones(struct drm_device *dev);
|
||||
|
||||
|
|
|
@ -430,7 +430,7 @@ static ssize_t radeon_hwmon_show_temp(struct device *dev,
|
|||
{
|
||||
struct drm_device *ddev = pci_get_drvdata(to_pci_dev(dev));
|
||||
struct radeon_device *rdev = ddev->dev_private;
|
||||
u32 temp;
|
||||
int temp;
|
||||
|
||||
switch (rdev->pm.int_thermal_type) {
|
||||
case THERMAL_TYPE_RV6XX:
|
||||
|
@ -646,6 +646,9 @@ void radeon_pm_fini(struct radeon_device *rdev)
|
|||
#endif
|
||||
}
|
||||
|
||||
if (rdev->pm.power_state)
|
||||
kfree(rdev->pm.power_state);
|
||||
|
||||
radeon_hwmon_fini(rdev);
|
||||
}
|
||||
|
||||
|
|
|
@ -78,18 +78,23 @@ u32 rv770_page_flip(struct radeon_device *rdev, int crtc_id, u64 crtc_base)
|
|||
}
|
||||
|
||||
/* get temperature in millidegrees */
|
||||
u32 rv770_get_temp(struct radeon_device *rdev)
|
||||
int rv770_get_temp(struct radeon_device *rdev)
|
||||
{
|
||||
u32 temp = (RREG32(CG_MULT_THERMAL_STATUS) & ASIC_T_MASK) >>
|
||||
ASIC_T_SHIFT;
|
||||
u32 actual_temp = 0;
|
||||
int actual_temp;
|
||||
|
||||
if ((temp >> 9) & 1)
|
||||
actual_temp = 0;
|
||||
else
|
||||
actual_temp = (temp >> 1) & 0xff;
|
||||
if (temp & 0x400)
|
||||
actual_temp = -256;
|
||||
else if (temp & 0x200)
|
||||
actual_temp = 255;
|
||||
else if (temp & 0x100) {
|
||||
actual_temp = temp & 0x1ff;
|
||||
actual_temp |= ~0x1ff;
|
||||
} else
|
||||
actual_temp = temp & 0xff;
|
||||
|
||||
return actual_temp * 1000;
|
||||
return (actual_temp * 1000) / 2;
|
||||
}
|
||||
|
||||
void rv770_pm_misc(struct radeon_device *rdev)
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
config STUB_POULSBO
|
||||
tristate "Intel GMA500 Stub Driver"
|
||||
depends on PCI
|
||||
depends on NET # for THERMAL
|
||||
# Poulsbo stub depends on ACPI_VIDEO when ACPI is enabled
|
||||
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
|
||||
select BACKLIGHT_CLASS_DEVICE if ACPI
|
||||
select INPUT if ACPI
|
||||
select ACPI_VIDEO if ACPI
|
||||
select THERMAL if ACPI
|
||||
help
|
||||
Choose this option if you have a system that has Intel GMA500
|
||||
(Poulsbo) integrated graphics. If M is selected, the module will
|
||||
|
|
|
@ -1079,7 +1079,7 @@ static void ib_sa_remove_one(struct ib_device *device)
|
|||
|
||||
ib_unregister_event_handler(&sa_dev->event_handler);
|
||||
|
||||
flush_scheduled_work();
|
||||
flush_workqueue(ib_wq);
|
||||
|
||||
for (i = 0; i <= sa_dev->end_port - sa_dev->start_port; ++i) {
|
||||
if (rdma_port_get_link_layer(device, i + 1) == IB_LINK_LAYER_INFINIBAND) {
|
||||
|
|
|
@ -636,6 +636,16 @@ static void ucma_copy_iboe_route(struct rdma_ucm_query_route_resp *resp,
|
|||
}
|
||||
}
|
||||
|
||||
static void ucma_copy_iw_route(struct rdma_ucm_query_route_resp *resp,
|
||||
struct rdma_route *route)
|
||||
{
|
||||
struct rdma_dev_addr *dev_addr;
|
||||
|
||||
dev_addr = &route->addr.dev_addr;
|
||||
rdma_addr_get_dgid(dev_addr, (union ib_gid *) &resp->ib_route[0].dgid);
|
||||
rdma_addr_get_sgid(dev_addr, (union ib_gid *) &resp->ib_route[0].sgid);
|
||||
}
|
||||
|
||||
static ssize_t ucma_query_route(struct ucma_file *file,
|
||||
const char __user *inbuf,
|
||||
int in_len, int out_len)
|
||||
|
@ -670,8 +680,10 @@ static ssize_t ucma_query_route(struct ucma_file *file,
|
|||
|
||||
resp.node_guid = (__force __u64) ctx->cm_id->device->node_guid;
|
||||
resp.port_num = ctx->cm_id->port_num;
|
||||
if (rdma_node_get_transport(ctx->cm_id->device->node_type) == RDMA_TRANSPORT_IB) {
|
||||
switch (rdma_port_get_link_layer(ctx->cm_id->device, ctx->cm_id->port_num)) {
|
||||
switch (rdma_node_get_transport(ctx->cm_id->device->node_type)) {
|
||||
case RDMA_TRANSPORT_IB:
|
||||
switch (rdma_port_get_link_layer(ctx->cm_id->device,
|
||||
ctx->cm_id->port_num)) {
|
||||
case IB_LINK_LAYER_INFINIBAND:
|
||||
ucma_copy_ib_route(&resp, &ctx->cm_id->route);
|
||||
break;
|
||||
|
@ -681,6 +693,12 @@ static ssize_t ucma_query_route(struct ucma_file *file,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case RDMA_TRANSPORT_IWARP:
|
||||
ucma_copy_iw_route(&resp, &ctx->cm_id->route);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
out:
|
||||
|
|
|
@ -107,7 +107,7 @@ struct c2_vq_req *vq_req_alloc(struct c2_dev *c2dev)
|
|||
r = kmalloc(sizeof(struct c2_vq_req), GFP_KERNEL);
|
||||
if (r) {
|
||||
init_waitqueue_head(&r->wait_object);
|
||||
r->reply_msg = (u64) NULL;
|
||||
r->reply_msg = 0;
|
||||
r->event = 0;
|
||||
r->cm_id = NULL;
|
||||
r->qp = NULL;
|
||||
|
@ -123,7 +123,7 @@ struct c2_vq_req *vq_req_alloc(struct c2_dev *c2dev)
|
|||
*/
|
||||
void vq_req_free(struct c2_dev *c2dev, struct c2_vq_req *r)
|
||||
{
|
||||
r->reply_msg = (u64) NULL;
|
||||
r->reply_msg = 0;
|
||||
if (atomic_dec_and_test(&r->refcnt)) {
|
||||
kfree(r);
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ void vq_req_get(struct c2_dev *c2dev, struct c2_vq_req *r)
|
|||
void vq_req_put(struct c2_dev *c2dev, struct c2_vq_req *r)
|
||||
{
|
||||
if (atomic_dec_and_test(&r->refcnt)) {
|
||||
if (r->reply_msg != (u64) NULL)
|
||||
if (r->reply_msg != 0)
|
||||
vq_repbuf_free(c2dev,
|
||||
(void *) (unsigned long) r->reply_msg);
|
||||
kfree(r);
|
||||
|
|
|
@ -380,7 +380,7 @@ static void send_flowc(struct c4iw_ep *ep, struct sk_buff *skb)
|
|||
16)) | FW_WR_FLOWID(ep->hwtid));
|
||||
|
||||
flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN;
|
||||
flowc->mnemval[0].val = cpu_to_be32(0);
|
||||
flowc->mnemval[0].val = cpu_to_be32(PCI_FUNC(ep->com.dev->rdev.lldi.pdev->devfn) << 8);
|
||||
flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH;
|
||||
flowc->mnemval[1].val = cpu_to_be32(ep->tx_chan);
|
||||
flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT;
|
||||
|
|
|
@ -220,7 +220,7 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
|
|||
V_FW_RI_RES_WR_DCAEN(0) |
|
||||
V_FW_RI_RES_WR_DCACPU(0) |
|
||||
V_FW_RI_RES_WR_FBMIN(2) |
|
||||
V_FW_RI_RES_WR_FBMAX(3) |
|
||||
V_FW_RI_RES_WR_FBMAX(2) |
|
||||
V_FW_RI_RES_WR_CIDXFTHRESHO(0) |
|
||||
V_FW_RI_RES_WR_CIDXFTHRESH(0) |
|
||||
V_FW_RI_RES_WR_EQSIZE(eqsize));
|
||||
|
@ -243,7 +243,7 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
|
|||
V_FW_RI_RES_WR_DCAEN(0) |
|
||||
V_FW_RI_RES_WR_DCACPU(0) |
|
||||
V_FW_RI_RES_WR_FBMIN(2) |
|
||||
V_FW_RI_RES_WR_FBMAX(3) |
|
||||
V_FW_RI_RES_WR_FBMAX(2) |
|
||||
V_FW_RI_RES_WR_CIDXFTHRESHO(0) |
|
||||
V_FW_RI_RES_WR_CIDXFTHRESH(0) |
|
||||
V_FW_RI_RES_WR_EQSIZE(eqsize));
|
||||
|
|
|
@ -623,7 +623,6 @@ struct qib_chippport_specific {
|
|||
u8 ibmalfusesnap;
|
||||
struct qib_qsfp_data qsfp_data;
|
||||
char epmsgbuf[192]; /* for port error interrupt msg buffer */
|
||||
u8 bounced;
|
||||
};
|
||||
|
||||
static struct {
|
||||
|
@ -1881,23 +1880,7 @@ static noinline void handle_7322_p_errors(struct qib_pportdata *ppd)
|
|||
IB_PHYSPORTSTATE_DISABLED)
|
||||
qib_set_ib_7322_lstate(ppd, 0,
|
||||
QLOGIC_IB_IBCC_LINKINITCMD_DISABLE);
|
||||
else {
|
||||
u32 lstate;
|
||||
/*
|
||||
* We need the current logical link state before
|
||||
* lflags are set in handle_e_ibstatuschanged.
|
||||
*/
|
||||
lstate = qib_7322_iblink_state(ibcs);
|
||||
|
||||
if (IS_QMH(dd) && !ppd->cpspec->bounced &&
|
||||
ltstate == IB_PHYSPORTSTATE_LINKUP &&
|
||||
(lstate >= IB_PORT_INIT &&
|
||||
lstate <= IB_PORT_ACTIVE)) {
|
||||
ppd->cpspec->bounced = 1;
|
||||
qib_7322_set_ib_cfg(ppd, QIB_IB_CFG_LSTATE,
|
||||
IB_LINKCMD_DOWN | IB_LINKINITCMD_POLL);
|
||||
}
|
||||
|
||||
else
|
||||
/*
|
||||
* Since going into a recovery state causes the link
|
||||
* state to go down and since recovery is transitory,
|
||||
|
@ -1911,7 +1894,6 @@ static noinline void handle_7322_p_errors(struct qib_pportdata *ppd)
|
|||
ltstate != IB_PHYSPORTSTATE_RECOVERY_WAITRMT &&
|
||||
ltstate != IB_PHYSPORTSTATE_RECOVERY_IDLE)
|
||||
qib_handle_e_ibstatuschanged(ppd, ibcs);
|
||||
}
|
||||
}
|
||||
if (*msg && iserr)
|
||||
qib_dev_porterr(dd, ppd->port, "%s error\n", msg);
|
||||
|
@ -2381,6 +2363,11 @@ static int qib_7322_bringup_serdes(struct qib_pportdata *ppd)
|
|||
qib_write_kreg_port(ppd, krp_rcvctrl, ppd->p_rcvctrl);
|
||||
spin_unlock_irqrestore(&dd->cspec->rcvmod_lock, flags);
|
||||
|
||||
/* Hold the link state machine for mezz boards */
|
||||
if (IS_QMH(dd) || IS_QME(dd))
|
||||
qib_set_ib_7322_lstate(ppd, 0,
|
||||
QLOGIC_IB_IBCC_LINKINITCMD_DISABLE);
|
||||
|
||||
/* Also enable IBSTATUSCHG interrupt. */
|
||||
val = qib_read_kreg_port(ppd, krp_errmask);
|
||||
qib_write_kreg_port(ppd, krp_errmask,
|
||||
|
@ -5702,6 +5689,11 @@ static void set_no_qsfp_atten(struct qib_devdata *dd, int change)
|
|||
ppd->cpspec->h1_val = h1;
|
||||
/* now change the IBC and serdes, overriding generic */
|
||||
init_txdds_table(ppd, 1);
|
||||
/* Re-enable the physical state machine on mezz boards
|
||||
* now that the correct settings have been set. */
|
||||
if (IS_QMH(dd) || IS_QME(dd))
|
||||
qib_set_ib_7322_lstate(ppd, 0,
|
||||
QLOGIC_IB_IBCC_LINKINITCMD_SLEEP);
|
||||
any++;
|
||||
}
|
||||
if (*nxt == '\n')
|
||||
|
|
|
@ -69,11 +69,7 @@ static int ixp4xx_spkr_event(struct input_dev *dev, unsigned int type, unsigned
|
|||
}
|
||||
|
||||
if (value > 20 && value < 32767)
|
||||
#ifndef FREQ
|
||||
count = (ixp4xx_get_board_tick_rate() / (value * 4)) - 1;
|
||||
#else
|
||||
count = (FREQ / (value * 4)) - 1;
|
||||
#endif
|
||||
count = (IXP4XX_TIMER_FREQ / (value * 4)) - 1;
|
||||
|
||||
ixp4xx_spkr_control(pin, count);
|
||||
|
||||
|
|
|
@ -1627,7 +1627,7 @@ __setup("icn=", icn_setup);
|
|||
static int __init icn_init(void)
|
||||
{
|
||||
char *p;
|
||||
char rev[20];
|
||||
char rev[21];
|
||||
|
||||
memset(&dev, 0, sizeof(icn_dev));
|
||||
dev.memaddr = (membase & 0x0ffc000);
|
||||
|
@ -1638,6 +1638,7 @@ static int __init icn_init(void)
|
|||
|
||||
if ((p = strchr(revision, ':'))) {
|
||||
strncpy(rev, p + 1, 20);
|
||||
rev[20] = '\0';
|
||||
p = strchr(rev, '$');
|
||||
if (p)
|
||||
*p = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* ir-lirc-codec.c - ir-core to classic lirc interface bridge
|
||||
/* ir-lirc-codec.c - rc-core to classic lirc interface bridge
|
||||
*
|
||||
* Copyright (C) 2010 by Jarod Wilson <jarod@redhat.com>
|
||||
*
|
||||
|
@ -47,6 +47,7 @@ static int ir_lirc_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
|||
/* Carrier reports */
|
||||
if (ev.carrier_report) {
|
||||
sample = LIRC_FREQUENCY(ev.carrier);
|
||||
IR_dprintk(2, "carrier report (freq: %d)\n", sample);
|
||||
|
||||
/* Packet end */
|
||||
} else if (ev.timeout) {
|
||||
|
@ -62,6 +63,7 @@ static int ir_lirc_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
|||
return 0;
|
||||
|
||||
sample = LIRC_TIMEOUT(ev.duration / 1000);
|
||||
IR_dprintk(2, "timeout report (duration: %d)\n", sample);
|
||||
|
||||
/* Normal sample */
|
||||
} else {
|
||||
|
@ -85,6 +87,8 @@ static int ir_lirc_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
|||
|
||||
sample = ev.pulse ? LIRC_PULSE(ev.duration / 1000) :
|
||||
LIRC_SPACE(ev.duration / 1000);
|
||||
IR_dprintk(2, "delivering %uus %s to lirc_dev\n",
|
||||
TO_US(ev.duration), TO_STR(ev.pulse));
|
||||
}
|
||||
|
||||
lirc_buffer_write(dev->raw->lirc.drv->rbuf,
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
*
|
||||
* Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
|
||||
*
|
||||
* See http://mediacenterguides.com/book/export/html/31 for details on
|
||||
* key mappings.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
|
@ -60,6 +63,9 @@ static struct rc_map_table rc6_mce[] = {
|
|||
{ 0x800f0426, KEY_EPG }, /* Guide */
|
||||
{ 0x800f0427, KEY_ZOOM }, /* Aspect */
|
||||
|
||||
{ 0x800f0432, KEY_MODE }, /* Visualization */
|
||||
{ 0x800f0433, KEY_PRESENTATION }, /* Slide Show */
|
||||
{ 0x800f0434, KEY_EJECTCD },
|
||||
{ 0x800f043a, KEY_BRIGHTNESSUP },
|
||||
|
||||
{ 0x800f0446, KEY_TV },
|
||||
|
|
|
@ -816,7 +816,7 @@ static void mceusb_handle_command(struct mceusb_dev *ir, int index)
|
|||
switch (ir->buf_in[index]) {
|
||||
/* 2-byte return value commands */
|
||||
case MCE_CMD_S_TIMEOUT:
|
||||
ir->rc->timeout = MS_TO_NS((hi << 8 | lo) / 2);
|
||||
ir->rc->timeout = US_TO_NS((hi << 8 | lo) / 2);
|
||||
break;
|
||||
|
||||
/* 1-byte return value commands */
|
||||
|
@ -855,9 +855,10 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
|
|||
break;
|
||||
case PARSE_IRDATA:
|
||||
ir->rem--;
|
||||
init_ir_raw_event(&rawir);
|
||||
rawir.pulse = ((ir->buf_in[i] & MCE_PULSE_BIT) != 0);
|
||||
rawir.duration = (ir->buf_in[i] & MCE_PULSE_MASK)
|
||||
* MS_TO_US(MCE_TIME_UNIT);
|
||||
* US_TO_NS(MCE_TIME_UNIT);
|
||||
|
||||
dev_dbg(ir->dev, "Storing %s with duration %d\n",
|
||||
rawir.pulse ? "pulse" : "space",
|
||||
|
@ -883,6 +884,8 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
|
|||
i, ir->rem + 1, false);
|
||||
if (ir->rem)
|
||||
ir->parser_state = PARSE_IRDATA;
|
||||
else
|
||||
ir_raw_event_reset(ir->rc);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1060,7 +1063,7 @@ static struct rc_dev *mceusb_init_rc_dev(struct mceusb_dev *ir)
|
|||
rc->priv = ir;
|
||||
rc->driver_type = RC_DRIVER_IR_RAW;
|
||||
rc->allowed_protos = RC_TYPE_ALL;
|
||||
rc->timeout = MS_TO_NS(1000);
|
||||
rc->timeout = US_TO_NS(1000);
|
||||
if (!ir->flags.no_tx) {
|
||||
rc->s_tx_mask = mceusb_set_tx_mask;
|
||||
rc->s_tx_carrier = mceusb_set_tx_carrier;
|
||||
|
|
|
@ -460,7 +460,7 @@ static u32 nvt_rx_carrier_detect(struct nvt_dev *nvt)
|
|||
return 0;
|
||||
}
|
||||
|
||||
carrier = (count * 1000000) / duration;
|
||||
carrier = MS_TO_NS(count) / duration;
|
||||
|
||||
if ((carrier > MAX_CARRIER) || (carrier < MIN_CARRIER))
|
||||
nvt_dbg("WTF? Carrier frequency out of range!");
|
||||
|
@ -612,8 +612,8 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt)
|
|||
sample = nvt->buf[i];
|
||||
|
||||
rawir.pulse = ((sample & BUF_PULSE_BIT) != 0);
|
||||
rawir.duration = (sample & BUF_LEN_MASK)
|
||||
* SAMPLE_PERIOD * 1000;
|
||||
rawir.duration = US_TO_NS((sample & BUF_LEN_MASK)
|
||||
* SAMPLE_PERIOD);
|
||||
|
||||
if ((sample & BUF_LEN_MASK) == BUF_LEN_MASK) {
|
||||
if (nvt->rawir.pulse == rawir.pulse)
|
||||
|
|
|
@ -164,7 +164,7 @@ static void sz_push_full_pulse(struct streamzap_ir *sz,
|
|||
sz->signal_start.tv_usec -
|
||||
sz->signal_last.tv_usec);
|
||||
rawir.duration -= sz->sum;
|
||||
rawir.duration *= 1000;
|
||||
rawir.duration = US_TO_NS(rawir.duration);
|
||||
rawir.duration &= IR_MAX_DURATION;
|
||||
}
|
||||
sz_push(sz, rawir);
|
||||
|
@ -177,7 +177,7 @@ static void sz_push_full_pulse(struct streamzap_ir *sz,
|
|||
rawir.duration = ((int) value) * SZ_RESOLUTION;
|
||||
rawir.duration += SZ_RESOLUTION / 2;
|
||||
sz->sum += rawir.duration;
|
||||
rawir.duration *= 1000;
|
||||
rawir.duration = US_TO_NS(rawir.duration);
|
||||
rawir.duration &= IR_MAX_DURATION;
|
||||
sz_push(sz, rawir);
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ static void sz_push_full_space(struct streamzap_ir *sz,
|
|||
rawir.duration = ((int) value) * SZ_RESOLUTION;
|
||||
rawir.duration += SZ_RESOLUTION / 2;
|
||||
sz->sum += rawir.duration;
|
||||
rawir.duration *= 1000;
|
||||
rawir.duration = US_TO_NS(rawir.duration);
|
||||
sz_push(sz, rawir);
|
||||
}
|
||||
|
||||
|
@ -273,6 +273,7 @@ static void streamzap_callback(struct urb *urb)
|
|||
if (sz->timeout_enabled)
|
||||
sz_push(sz, rawir);
|
||||
ir_raw_event_handle(sz->rdev);
|
||||
ir_raw_event_reset(sz->rdev);
|
||||
} else {
|
||||
sz_push_full_space(sz, sz->buf_in[i]);
|
||||
}
|
||||
|
@ -290,6 +291,7 @@ static void streamzap_callback(struct urb *urb)
|
|||
}
|
||||
}
|
||||
|
||||
ir_raw_event_handle(sz->rdev);
|
||||
usb_submit_urb(urb, GFP_ATOMIC);
|
||||
|
||||
return;
|
||||
|
@ -430,13 +432,13 @@ static int __devinit streamzap_probe(struct usb_interface *intf,
|
|||
sz->decoder_state = PulseSpace;
|
||||
/* FIXME: don't yet have a way to set this */
|
||||
sz->timeout_enabled = true;
|
||||
sz->rdev->timeout = (((SZ_TIMEOUT * SZ_RESOLUTION * 1000) &
|
||||
sz->rdev->timeout = ((US_TO_NS(SZ_TIMEOUT * SZ_RESOLUTION) &
|
||||
IR_MAX_DURATION) | 0x03000000);
|
||||
#if 0
|
||||
/* not yet supported, depends on patches from maxim */
|
||||
/* see also: LIRC_GET_REC_RESOLUTION and LIRC_SET_REC_TIMEOUT */
|
||||
sz->min_timeout = SZ_TIMEOUT * SZ_RESOLUTION * 1000;
|
||||
sz->max_timeout = SZ_TIMEOUT * SZ_RESOLUTION * 1000;
|
||||
sz->min_timeout = US_TO_NS(SZ_TIMEOUT * SZ_RESOLUTION);
|
||||
sz->max_timeout = US_TO_NS(SZ_TIMEOUT * SZ_RESOLUTION);
|
||||
#endif
|
||||
|
||||
do_gettimeofday(&sz->signal_start);
|
||||
|
|
|
@ -5793,7 +5793,7 @@ static void usb_exchange(struct gspca_dev *gspca_dev,
|
|||
break;
|
||||
default:
|
||||
/* case 0xdd: * delay */
|
||||
msleep(action->val / 64 + 10);
|
||||
msleep(action->idx);
|
||||
break;
|
||||
}
|
||||
action++;
|
||||
|
@ -5830,7 +5830,7 @@ static void setmatrix(struct gspca_dev *gspca_dev)
|
|||
[SENSOR_GC0305] = gc0305_matrix,
|
||||
[SENSOR_HDCS2020b] = NULL,
|
||||
[SENSOR_HV7131B] = NULL,
|
||||
[SENSOR_HV7131R] = NULL,
|
||||
[SENSOR_HV7131R] = po2030_matrix,
|
||||
[SENSOR_ICM105A] = po2030_matrix,
|
||||
[SENSOR_MC501CB] = NULL,
|
||||
[SENSOR_MT9V111_1] = gc0305_matrix,
|
||||
|
@ -5936,6 +5936,7 @@ static void setquality(struct gspca_dev *gspca_dev)
|
|||
case SENSOR_ADCM2700:
|
||||
case SENSOR_GC0305:
|
||||
case SENSOR_HV7131B:
|
||||
case SENSOR_HV7131R:
|
||||
case SENSOR_OV7620:
|
||||
case SENSOR_PAS202B:
|
||||
case SENSOR_PO2030:
|
||||
|
@ -6108,11 +6109,13 @@ static void send_unknown(struct gspca_dev *gspca_dev, int sensor)
|
|||
reg_w(gspca_dev, 0x02, 0x003b);
|
||||
reg_w(gspca_dev, 0x00, 0x0038);
|
||||
break;
|
||||
case SENSOR_HV7131R:
|
||||
case SENSOR_PAS202B:
|
||||
reg_w(gspca_dev, 0x03, 0x003b);
|
||||
reg_w(gspca_dev, 0x0c, 0x003a);
|
||||
reg_w(gspca_dev, 0x0b, 0x0039);
|
||||
reg_w(gspca_dev, 0x0b, 0x0038);
|
||||
if (sensor == SENSOR_PAS202B)
|
||||
reg_w(gspca_dev, 0x0b, 0x0038);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -6704,10 +6707,13 @@ static int sd_start(struct gspca_dev *gspca_dev)
|
|||
reg_w(gspca_dev, 0x02, 0x003b);
|
||||
reg_w(gspca_dev, 0x00, 0x0038);
|
||||
break;
|
||||
case SENSOR_HV7131R:
|
||||
case SENSOR_PAS202B:
|
||||
reg_w(gspca_dev, 0x03, 0x003b);
|
||||
reg_w(gspca_dev, 0x0c, 0x003a);
|
||||
reg_w(gspca_dev, 0x0b, 0x0039);
|
||||
if (sd->sensor == SENSOR_HV7131R)
|
||||
reg_w(gspca_dev, 0x50, ZC3XX_R11D_GLOBALGAIN);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -6720,6 +6726,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
|
|||
break;
|
||||
case SENSOR_PAS202B:
|
||||
case SENSOR_GC0305:
|
||||
case SENSOR_HV7131R:
|
||||
case SENSOR_TAS5130C:
|
||||
reg_r(gspca_dev, 0x0008);
|
||||
/* fall thru */
|
||||
|
@ -6760,6 +6767,12 @@ static int sd_start(struct gspca_dev *gspca_dev)
|
|||
/* ms-win + */
|
||||
reg_w(gspca_dev, 0x40, 0x0117);
|
||||
break;
|
||||
case SENSOR_HV7131R:
|
||||
i2c_write(gspca_dev, 0x25, 0x04, 0x00); /* exposure */
|
||||
i2c_write(gspca_dev, 0x26, 0x93, 0x00);
|
||||
i2c_write(gspca_dev, 0x27, 0xe0, 0x00);
|
||||
reg_w(gspca_dev, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN);
|
||||
break;
|
||||
case SENSOR_GC0305:
|
||||
case SENSOR_TAS5130C:
|
||||
reg_w(gspca_dev, 0x09, 0x01ad); /* (from win traces) */
|
||||
|
@ -6808,9 +6821,17 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
|
|||
{
|
||||
struct sd *sd = (struct sd *) gspca_dev;
|
||||
|
||||
if (data[0] == 0xff && data[1] == 0xd8) { /* start of frame */
|
||||
/* check the JPEG end of frame */
|
||||
if (len >= 3
|
||||
&& data[len - 3] == 0xff && data[len - 2] == 0xd9) {
|
||||
/*fixme: what does the last byte mean?*/
|
||||
gspca_frame_add(gspca_dev, LAST_PACKET,
|
||||
NULL, 0);
|
||||
data, len - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
/* check the JPEG start of a frame */
|
||||
if (data[0] == 0xff && data[1] == 0xd8) {
|
||||
/* put the JPEG header in the new frame */
|
||||
gspca_frame_add(gspca_dev, FIRST_PACKET,
|
||||
sd->jpeg_hdr, JPEG_HDR_SZ);
|
||||
|
|
|
@ -283,6 +283,7 @@ static int hdpvr_probe(struct usb_interface *interface,
|
|||
struct hdpvr_device *dev;
|
||||
struct usb_host_interface *iface_desc;
|
||||
struct usb_endpoint_descriptor *endpoint;
|
||||
struct i2c_client *client;
|
||||
size_t buffer_size;
|
||||
int i;
|
||||
int retval = -ENOMEM;
|
||||
|
@ -381,13 +382,21 @@ static int hdpvr_probe(struct usb_interface *interface,
|
|||
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
||||
retval = hdpvr_register_i2c_adapter(dev);
|
||||
if (retval < 0) {
|
||||
v4l2_err(&dev->v4l2_dev, "registering i2c adapter failed\n");
|
||||
v4l2_err(&dev->v4l2_dev, "i2c adapter register failed\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
retval = hdpvr_register_i2c_ir(dev);
|
||||
if (retval < 0)
|
||||
v4l2_err(&dev->v4l2_dev, "registering i2c IR devices failed\n");
|
||||
client = hdpvr_register_ir_rx_i2c(dev);
|
||||
if (!client) {
|
||||
v4l2_err(&dev->v4l2_dev, "i2c IR RX device register failed\n");
|
||||
goto reg_fail;
|
||||
}
|
||||
|
||||
client = hdpvr_register_ir_tx_i2c(dev);
|
||||
if (!client) {
|
||||
v4l2_err(&dev->v4l2_dev, "i2c IR TX device register failed\n");
|
||||
goto reg_fail;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* let the user know what node this device is now attached to */
|
||||
|
@ -395,6 +404,10 @@ static int hdpvr_probe(struct usb_interface *interface,
|
|||
video_device_node_name(dev->video_dev));
|
||||
return 0;
|
||||
|
||||
reg_fail:
|
||||
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
||||
i2c_del_adapter(&dev->i2c_adapter);
|
||||
#endif
|
||||
error:
|
||||
if (dev) {
|
||||
/* Destroy single thread */
|
||||
|
@ -424,6 +437,9 @@ static void hdpvr_disconnect(struct usb_interface *interface)
|
|||
mutex_lock(&dev->io_mutex);
|
||||
hdpvr_cancel_queue(dev);
|
||||
mutex_unlock(&dev->io_mutex);
|
||||
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
||||
i2c_del_adapter(&dev->i2c_adapter);
|
||||
#endif
|
||||
video_unregister_device(dev->video_dev);
|
||||
atomic_dec(&dev_nr);
|
||||
}
|
||||
|
|
|
@ -31,26 +31,34 @@
|
|||
#define Z8F0811_IR_RX_I2C_ADDR 0x71
|
||||
|
||||
|
||||
static struct i2c_board_info hdpvr_i2c_board_info = {
|
||||
I2C_BOARD_INFO("ir_tx_z8f0811_hdpvr", Z8F0811_IR_TX_I2C_ADDR),
|
||||
I2C_BOARD_INFO("ir_rx_z8f0811_hdpvr", Z8F0811_IR_RX_I2C_ADDR),
|
||||
};
|
||||
|
||||
int hdpvr_register_i2c_ir(struct hdpvr_device *dev)
|
||||
struct i2c_client *hdpvr_register_ir_tx_i2c(struct hdpvr_device *dev)
|
||||
{
|
||||
struct i2c_client *c;
|
||||
struct IR_i2c_init_data *init_data = &dev->ir_i2c_init_data;
|
||||
struct i2c_board_info hdpvr_ir_tx_i2c_board_info = {
|
||||
I2C_BOARD_INFO("ir_tx_z8f0811_hdpvr", Z8F0811_IR_TX_I2C_ADDR),
|
||||
};
|
||||
|
||||
init_data->name = "HD-PVR";
|
||||
hdpvr_ir_tx_i2c_board_info.platform_data = init_data;
|
||||
|
||||
return i2c_new_device(&dev->i2c_adapter, &hdpvr_ir_tx_i2c_board_info);
|
||||
}
|
||||
|
||||
struct i2c_client *hdpvr_register_ir_rx_i2c(struct hdpvr_device *dev)
|
||||
{
|
||||
struct IR_i2c_init_data *init_data = &dev->ir_i2c_init_data;
|
||||
struct i2c_board_info hdpvr_ir_rx_i2c_board_info = {
|
||||
I2C_BOARD_INFO("ir_rx_z8f0811_hdpvr", Z8F0811_IR_RX_I2C_ADDR),
|
||||
};
|
||||
|
||||
/* Our default information for ir-kbd-i2c.c to use */
|
||||
init_data->ir_codes = RC_MAP_HAUPPAUGE_NEW;
|
||||
init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR;
|
||||
init_data->type = RC_TYPE_RC5;
|
||||
init_data->name = "HD PVR";
|
||||
hdpvr_i2c_board_info.platform_data = init_data;
|
||||
init_data->name = "HD-PVR";
|
||||
hdpvr_ir_rx_i2c_board_info.platform_data = init_data;
|
||||
|
||||
c = i2c_new_device(&dev->i2c_adapter, &hdpvr_i2c_board_info);
|
||||
|
||||
return (c == NULL) ? -ENODEV : 0;
|
||||
return i2c_new_device(&dev->i2c_adapter, &hdpvr_ir_rx_i2c_board_info);
|
||||
}
|
||||
|
||||
static int hdpvr_i2c_read(struct hdpvr_device *dev, int bus,
|
||||
|
|
|
@ -313,7 +313,8 @@ int hdpvr_cancel_queue(struct hdpvr_device *dev);
|
|||
/* i2c adapter registration */
|
||||
int hdpvr_register_i2c_adapter(struct hdpvr_device *dev);
|
||||
|
||||
int hdpvr_register_i2c_ir(struct hdpvr_device *dev);
|
||||
struct i2c_client *hdpvr_register_ir_rx_i2c(struct hdpvr_device *dev);
|
||||
struct i2c_client *hdpvr_register_ir_tx_i2c(struct hdpvr_device *dev);
|
||||
|
||||
/*========================================================================*/
|
||||
/* buffer management */
|
||||
|
|
|
@ -128,6 +128,19 @@ static int get_key_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
|
|||
|
||||
static int get_key_haup_xvr(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
|
||||
{
|
||||
int ret;
|
||||
unsigned char buf[1] = { 0 };
|
||||
|
||||
/*
|
||||
* This is the same apparent "are you ready?" poll command observed
|
||||
* watching Windows driver traffic and implemented in lirc_zilog. With
|
||||
* this added, we get far saner remote behavior with z8 chips on usb
|
||||
* connected devices, even with the default polling interval of 100ms.
|
||||
*/
|
||||
ret = i2c_master_send(ir->c, buf, 1);
|
||||
if (ret != 1)
|
||||
return (ret < 0) ? ret : -EINVAL;
|
||||
|
||||
return get_key_haup_common (ir, ir_key, ir_raw, 6, 3);
|
||||
}
|
||||
|
||||
|
|
|
@ -597,7 +597,6 @@ static void pvr2_i2c_register_ir(struct pvr2_hdw *hdw)
|
|||
init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR;
|
||||
init_data->type = RC_TYPE_RC5;
|
||||
init_data->name = hdw->hdw_desc->description;
|
||||
init_data->polling_interval = 260; /* ms From lirc_zilog */
|
||||
/* IR Receiver */
|
||||
info.addr = 0x71;
|
||||
info.platform_data = init_data;
|
||||
|
|
|
@ -1565,7 +1565,7 @@ static int saa711x_probe(struct i2c_client *client,
|
|||
chip_id = name[5];
|
||||
|
||||
/* Check whether this chip is part of the saa711x series */
|
||||
if (memcmp(name, "1f711", 5)) {
|
||||
if (memcmp(name + 1, "f711", 4)) {
|
||||
v4l_dbg(1, debug, client, "chip found @ 0x%x (ID %s) does not match a known saa711x chip.\n",
|
||||
client->addr << 1, name);
|
||||
return -ENODEV;
|
||||
|
|
|
@ -48,6 +48,7 @@ static DEFINE_PCI_DEVICE_TABLE(atl1c_pci_tbl) = {
|
|||
{PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, PCI_DEVICE_ID_ATHEROS_L2C_B)},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, PCI_DEVICE_ID_ATHEROS_L2C_B2)},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, PCI_DEVICE_ID_ATHEROS_L1D)},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, PCI_DEVICE_ID_ATHEROS_L1D_2_0)},
|
||||
/* required last entry */
|
||||
{ 0 }
|
||||
};
|
||||
|
|
|
@ -312,11 +312,9 @@ void be_link_status_update(struct be_adapter *adapter, bool link_up)
|
|||
if (adapter->link_up != link_up) {
|
||||
adapter->link_speed = -1;
|
||||
if (link_up) {
|
||||
netif_start_queue(netdev);
|
||||
netif_carrier_on(netdev);
|
||||
printk(KERN_INFO "%s: Link up\n", netdev->name);
|
||||
} else {
|
||||
netif_stop_queue(netdev);
|
||||
netif_carrier_off(netdev);
|
||||
printk(KERN_INFO "%s: Link down\n", netdev->name);
|
||||
}
|
||||
|
@ -2628,8 +2626,6 @@ static void be_netdev_init(struct net_device *netdev)
|
|||
|
||||
netif_napi_add(netdev, &adapter->tx_eq.napi, be_poll_tx_mcc,
|
||||
BE_NAPI_WEIGHT);
|
||||
|
||||
netif_stop_queue(netdev);
|
||||
}
|
||||
|
||||
static void be_unmap_pci_bars(struct be_adapter *adapter)
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
* (you will need to reboot afterwards) */
|
||||
/* #define BNX2X_STOP_ON_ERROR */
|
||||
|
||||
#define DRV_MODULE_VERSION "1.62.00-4"
|
||||
#define DRV_MODULE_RELDATE "2011/01/18"
|
||||
#define DRV_MODULE_VERSION "1.62.00-5"
|
||||
#define DRV_MODULE_RELDATE "2011/01/30"
|
||||
#define BNX2X_BC_VER 0x040200
|
||||
|
||||
#define BNX2X_MULTI_QUEUE
|
||||
|
|
|
@ -3948,48 +3948,6 @@ static u8 bnx2x_8073_8727_external_rom_boot(struct bnx2x *bp,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static void bnx2x_8073_set_xaui_low_power_mode(struct bnx2x *bp,
|
||||
struct bnx2x_phy *phy)
|
||||
{
|
||||
u16 val;
|
||||
bnx2x_cl45_read(bp, phy,
|
||||
MDIO_PMA_DEVAD, MDIO_PMA_REG_8073_CHIP_REV, &val);
|
||||
|
||||
if (val == 0) {
|
||||
/* Mustn't set low power mode in 8073 A0 */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Disable PLL sequencer (use read-modify-write to clear bit 13) */
|
||||
bnx2x_cl45_read(bp, phy,
|
||||
MDIO_XS_DEVAD, MDIO_XS_PLL_SEQUENCER, &val);
|
||||
val &= ~(1<<13);
|
||||
bnx2x_cl45_write(bp, phy,
|
||||
MDIO_XS_DEVAD, MDIO_XS_PLL_SEQUENCER, val);
|
||||
|
||||
/* PLL controls */
|
||||
bnx2x_cl45_write(bp, phy, MDIO_XS_DEVAD, 0x805E, 0x1077);
|
||||
bnx2x_cl45_write(bp, phy, MDIO_XS_DEVAD, 0x805D, 0x0000);
|
||||
bnx2x_cl45_write(bp, phy, MDIO_XS_DEVAD, 0x805C, 0x030B);
|
||||
bnx2x_cl45_write(bp, phy, MDIO_XS_DEVAD, 0x805B, 0x1240);
|
||||
bnx2x_cl45_write(bp, phy, MDIO_XS_DEVAD, 0x805A, 0x2490);
|
||||
|
||||
/* Tx Controls */
|
||||
bnx2x_cl45_write(bp, phy, MDIO_XS_DEVAD, 0x80A7, 0x0C74);
|
||||
bnx2x_cl45_write(bp, phy, MDIO_XS_DEVAD, 0x80A6, 0x9041);
|
||||
bnx2x_cl45_write(bp, phy, MDIO_XS_DEVAD, 0x80A5, 0x4640);
|
||||
|
||||
/* Rx Controls */
|
||||
bnx2x_cl45_write(bp, phy, MDIO_XS_DEVAD, 0x80FE, 0x01C4);
|
||||
bnx2x_cl45_write(bp, phy, MDIO_XS_DEVAD, 0x80FD, 0x9249);
|
||||
bnx2x_cl45_write(bp, phy, MDIO_XS_DEVAD, 0x80FC, 0x2015);
|
||||
|
||||
/* Enable PLL sequencer (use read-modify-write to set bit 13) */
|
||||
bnx2x_cl45_read(bp, phy, MDIO_XS_DEVAD, MDIO_XS_PLL_SEQUENCER, &val);
|
||||
val |= (1<<13);
|
||||
bnx2x_cl45_write(bp, phy, MDIO_XS_DEVAD, MDIO_XS_PLL_SEQUENCER, val);
|
||||
}
|
||||
|
||||
/******************************************************************/
|
||||
/* BCM8073 PHY SECTION */
|
||||
/******************************************************************/
|
||||
|
@ -4148,8 +4106,6 @@ static u8 bnx2x_8073_config_init(struct bnx2x_phy *phy,
|
|||
|
||||
bnx2x_8073_set_pause_cl37(params, phy, vars);
|
||||
|
||||
bnx2x_8073_set_xaui_low_power_mode(bp, phy);
|
||||
|
||||
bnx2x_cl45_read(bp, phy,
|
||||
MDIO_PMA_DEVAD, MDIO_PMA_REG_M8051_MSGOUT_REG, &tmp1);
|
||||
|
||||
|
@ -6519,6 +6475,18 @@ static void bnx2x_848xx_set_link_led(struct bnx2x_phy *phy,
|
|||
MDIO_PMA_DEVAD,
|
||||
MDIO_PMA_REG_8481_LED1_MASK,
|
||||
0x80);
|
||||
|
||||
/* Tell LED3 to blink on source */
|
||||
bnx2x_cl45_read(bp, phy,
|
||||
MDIO_PMA_DEVAD,
|
||||
MDIO_PMA_REG_8481_LINK_SIGNAL,
|
||||
&val);
|
||||
val &= ~(7<<6);
|
||||
val |= (1<<6); /* A83B[8:6]= 1 */
|
||||
bnx2x_cl45_write(bp, phy,
|
||||
MDIO_PMA_DEVAD,
|
||||
MDIO_PMA_REG_8481_LINK_SIGNAL,
|
||||
val);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -7720,10 +7688,13 @@ static u8 bnx2x_8073_common_init_phy(struct bnx2x *bp,
|
|||
struct bnx2x_phy phy[PORT_MAX];
|
||||
struct bnx2x_phy *phy_blk[PORT_MAX];
|
||||
u16 val;
|
||||
s8 port;
|
||||
s8 port = 0;
|
||||
s8 port_of_path = 0;
|
||||
|
||||
bnx2x_ext_phy_hw_reset(bp, 0);
|
||||
u32 swap_val, swap_override;
|
||||
swap_val = REG_RD(bp, NIG_REG_PORT_SWAP);
|
||||
swap_override = REG_RD(bp, NIG_REG_STRAP_OVERRIDE);
|
||||
port ^= (swap_val && swap_override);
|
||||
bnx2x_ext_phy_hw_reset(bp, port);
|
||||
/* PART1 - Reset both phys */
|
||||
for (port = PORT_MAX - 1; port >= PORT_0; port--) {
|
||||
u32 shmem_base, shmem2_base;
|
||||
|
|
|
@ -2301,15 +2301,10 @@ static void bnx2x_rxq_set_mac_filters(struct bnx2x *bp, u16 cl_id, u32 filters)
|
|||
/* accept matched ucast */
|
||||
drop_all_ucast = 0;
|
||||
}
|
||||
if (filters & BNX2X_ACCEPT_MULTICAST) {
|
||||
if (filters & BNX2X_ACCEPT_MULTICAST)
|
||||
/* accept matched mcast */
|
||||
drop_all_mcast = 0;
|
||||
if (IS_MF_SI(bp))
|
||||
/* since mcast addresses won't arrive with ovlan,
|
||||
* fw needs to accept all of them in
|
||||
* switch-independent mode */
|
||||
accp_all_mcast = 1;
|
||||
}
|
||||
|
||||
if (filters & BNX2X_ACCEPT_ALL_UNICAST) {
|
||||
/* accept all mcast */
|
||||
drop_all_ucast = 0;
|
||||
|
@ -5296,10 +5291,6 @@ static int bnx2x_init_hw_common(struct bnx2x *bp, u32 load_code)
|
|||
}
|
||||
}
|
||||
|
||||
bp->port.need_hw_lock = bnx2x_hw_lock_required(bp,
|
||||
bp->common.shmem_base,
|
||||
bp->common.shmem2_base);
|
||||
|
||||
bnx2x_setup_fan_failure_detection(bp);
|
||||
|
||||
/* clear PXP2 attentions */
|
||||
|
@ -5503,9 +5494,6 @@ static int bnx2x_init_hw_port(struct bnx2x *bp)
|
|||
|
||||
bnx2x_init_block(bp, MCP_BLOCK, init_stage);
|
||||
bnx2x_init_block(bp, DMAE_BLOCK, init_stage);
|
||||
bp->port.need_hw_lock = bnx2x_hw_lock_required(bp,
|
||||
bp->common.shmem_base,
|
||||
bp->common.shmem2_base);
|
||||
if (bnx2x_fan_failure_det_req(bp, bp->common.shmem_base,
|
||||
bp->common.shmem2_base, port)) {
|
||||
u32 reg_addr = (port ? MISC_REG_AEU_ENABLE1_FUNC_1_OUT_0 :
|
||||
|
@ -8379,6 +8367,17 @@ static void __devinit bnx2x_get_port_hwinfo(struct bnx2x *bp)
|
|||
(ext_phy_type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_NOT_CONN))
|
||||
bp->mdio.prtad =
|
||||
XGXS_EXT_PHY_ADDR(ext_phy_config);
|
||||
|
||||
/*
|
||||
* Check if hw lock is required to access MDC/MDIO bus to the PHY(s)
|
||||
* In MF mode, it is set to cover self test cases
|
||||
*/
|
||||
if (IS_MF(bp))
|
||||
bp->port.need_hw_lock = 1;
|
||||
else
|
||||
bp->port.need_hw_lock = bnx2x_hw_lock_required(bp,
|
||||
bp->common.shmem_base,
|
||||
bp->common.shmem2_base);
|
||||
}
|
||||
|
||||
static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp)
|
||||
|
|
|
@ -23,7 +23,7 @@ config CAN_SLCAN
|
|||
|
||||
As only the sending and receiving of CAN frames is implemented, this
|
||||
driver should work with the (serial/USB) CAN hardware from:
|
||||
www.canusb.com / www.can232.com / www.mictronic.com / www.canhack.de
|
||||
www.canusb.com / www.can232.com / www.mictronics.de / www.canhack.de
|
||||
|
||||
Userspace tools to attach the SLCAN line discipline (slcan_attach,
|
||||
slcand) can be found in the can-utils at the SocketCAN SVN, see
|
||||
|
|
|
@ -1109,7 +1109,7 @@ static ssize_t at91_sysfs_set_mb0_id(struct device *dev,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(mb0_id, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(mb0_id, S_IWUSR | S_IRUGO,
|
||||
at91_sysfs_show_mb0_id, at91_sysfs_set_mb0_id);
|
||||
|
||||
static struct attribute *at91_sysfs_attrs[] = {
|
||||
|
|
|
@ -1618,7 +1618,7 @@ static ssize_t ican3_sysfs_set_term(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(termination, S_IWUGO | S_IRUGO, ican3_sysfs_show_term,
|
||||
static DEVICE_ATTR(termination, S_IWUSR | S_IRUGO, ican3_sysfs_show_term,
|
||||
ican3_sysfs_set_term);
|
||||
|
||||
static struct attribute *ican3_sysfs_attrs[] = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
config CAN_SOFTING
|
||||
tristate "Softing Gmbh CAN generic support"
|
||||
depends on CAN_DEV
|
||||
depends on CAN_DEV && HAS_IOMEM
|
||||
---help---
|
||||
Support for CAN cards from Softing Gmbh & some cards
|
||||
from Vector Gmbh.
|
||||
|
|
|
@ -1094,7 +1094,7 @@ static int depca_rx(struct net_device *dev)
|
|||
}
|
||||
}
|
||||
/* Change buffer ownership for this last frame, back to the adapter */
|
||||
for (; lp->rx_old != entry; lp->rx_old = (++lp->rx_old) & lp->rxRingMask) {
|
||||
for (; lp->rx_old != entry; lp->rx_old = (lp->rx_old + 1) & lp->rxRingMask) {
|
||||
writel(readl(&lp->rx_ring[lp->rx_old].base) | R_OWN, &lp->rx_ring[lp->rx_old].base);
|
||||
}
|
||||
writel(readl(&lp->rx_ring[entry].base) | R_OWN, &lp->rx_ring[entry].base);
|
||||
|
@ -1103,7 +1103,7 @@ static int depca_rx(struct net_device *dev)
|
|||
/*
|
||||
** Update entry information
|
||||
*/
|
||||
lp->rx_new = (++lp->rx_new) & lp->rxRingMask;
|
||||
lp->rx_new = (lp->rx_new + 1) & lp->rxRingMask;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1148,7 +1148,7 @@ static int depca_tx(struct net_device *dev)
|
|||
}
|
||||
|
||||
/* Update all the pointers */
|
||||
lp->tx_old = (++lp->tx_old) & lp->txRingMask;
|
||||
lp->tx_old = (lp->tx_old + 1) & lp->txRingMask;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1753,8 +1753,6 @@ rio_close (struct net_device *dev)
|
|||
|
||||
/* Free all the skbuffs in the queue. */
|
||||
for (i = 0; i < RX_RING_SIZE; i++) {
|
||||
np->rx_ring[i].status = 0;
|
||||
np->rx_ring[i].fraginfo = 0;
|
||||
skb = np->rx_skbuff[i];
|
||||
if (skb) {
|
||||
pci_unmap_single(np->pdev,
|
||||
|
@ -1763,6 +1761,8 @@ rio_close (struct net_device *dev)
|
|||
dev_kfree_skb (skb);
|
||||
np->rx_skbuff[i] = NULL;
|
||||
}
|
||||
np->rx_ring[i].status = 0;
|
||||
np->rx_ring[i].fraginfo = 0;
|
||||
}
|
||||
for (i = 0; i < TX_RING_SIZE; i++) {
|
||||
skb = np->tx_skbuff[i];
|
||||
|
|
|
@ -812,7 +812,7 @@ static void enc28j60_read_tsv(struct enc28j60_net *priv, u8 tsv[TSV_SIZE])
|
|||
if (netif_msg_hw(priv))
|
||||
printk(KERN_DEBUG DRV_NAME ": reading TSV at addr:0x%04x\n",
|
||||
endptr + 1);
|
||||
enc28j60_mem_read(priv, endptr + 1, sizeof(tsv), tsv);
|
||||
enc28j60_mem_read(priv, endptr + 1, TSV_SIZE, tsv);
|
||||
}
|
||||
|
||||
static void enc28j60_dump_tsv(struct enc28j60_net *priv, const char *msg,
|
||||
|
|
|
@ -1286,6 +1286,21 @@ static DEFINE_PCI_DEVICE_TABLE(mlx4_pci_table) = {
|
|||
{ PCI_VDEVICE(MELLANOX, 0x6764) }, /* MT26468 ConnectX EN 10GigE PCIe gen2*/
|
||||
{ PCI_VDEVICE(MELLANOX, 0x6746) }, /* MT26438 ConnectX EN 40GigE PCIe gen2 5GT/s */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x676e) }, /* MT26478 ConnectX2 40GigE PCIe gen2 */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x1002) }, /* MT25400 Family [ConnectX-2 Virtual Function] */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x1003) }, /* MT27500 Family [ConnectX-3] */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x1004) }, /* MT27500 Family [ConnectX-3 Virtual Function] */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x1005) }, /* MT27510 Family */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x1006) }, /* MT27511 Family */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x1007) }, /* MT27520 Family */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x1008) }, /* MT27521 Family */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x1009) }, /* MT27530 Family */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x100a) }, /* MT27531 Family */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x100b) }, /* MT27540 Family */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x100c) }, /* MT27541 Family */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x100d) }, /* MT27550 Family */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x100e) }, /* MT27551 Family */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x100f) }, /* MT27560 Family */
|
||||
{ PCI_VDEVICE(MELLANOX, 0x1010) }, /* MT27561 Family */
|
||||
{ 0, }
|
||||
};
|
||||
|
||||
|
|
|
@ -4489,6 +4489,9 @@ static int niu_alloc_channels(struct niu *np)
|
|||
{
|
||||
struct niu_parent *parent = np->parent;
|
||||
int first_rx_channel, first_tx_channel;
|
||||
int num_rx_rings, num_tx_rings;
|
||||
struct rx_ring_info *rx_rings;
|
||||
struct tx_ring_info *tx_rings;
|
||||
int i, port, err;
|
||||
|
||||
port = np->port;
|
||||
|
@ -4498,18 +4501,21 @@ static int niu_alloc_channels(struct niu *np)
|
|||
first_tx_channel += parent->txchan_per_port[i];
|
||||
}
|
||||
|
||||
np->num_rx_rings = parent->rxchan_per_port[port];
|
||||
np->num_tx_rings = parent->txchan_per_port[port];
|
||||
num_rx_rings = parent->rxchan_per_port[port];
|
||||
num_tx_rings = parent->txchan_per_port[port];
|
||||
|
||||
netif_set_real_num_rx_queues(np->dev, np->num_rx_rings);
|
||||
netif_set_real_num_tx_queues(np->dev, np->num_tx_rings);
|
||||
|
||||
np->rx_rings = kcalloc(np->num_rx_rings, sizeof(struct rx_ring_info),
|
||||
GFP_KERNEL);
|
||||
rx_rings = kcalloc(num_rx_rings, sizeof(struct rx_ring_info),
|
||||
GFP_KERNEL);
|
||||
err = -ENOMEM;
|
||||
if (!np->rx_rings)
|
||||
if (!rx_rings)
|
||||
goto out_err;
|
||||
|
||||
np->num_rx_rings = num_rx_rings;
|
||||
smp_wmb();
|
||||
np->rx_rings = rx_rings;
|
||||
|
||||
netif_set_real_num_rx_queues(np->dev, num_rx_rings);
|
||||
|
||||
for (i = 0; i < np->num_rx_rings; i++) {
|
||||
struct rx_ring_info *rp = &np->rx_rings[i];
|
||||
|
||||
|
@ -4538,12 +4544,18 @@ static int niu_alloc_channels(struct niu *np)
|
|||
return err;
|
||||
}
|
||||
|
||||
np->tx_rings = kcalloc(np->num_tx_rings, sizeof(struct tx_ring_info),
|
||||
GFP_KERNEL);
|
||||
tx_rings = kcalloc(num_tx_rings, sizeof(struct tx_ring_info),
|
||||
GFP_KERNEL);
|
||||
err = -ENOMEM;
|
||||
if (!np->tx_rings)
|
||||
if (!tx_rings)
|
||||
goto out_err;
|
||||
|
||||
np->num_tx_rings = num_tx_rings;
|
||||
smp_wmb();
|
||||
np->tx_rings = tx_rings;
|
||||
|
||||
netif_set_real_num_tx_queues(np->dev, num_tx_rings);
|
||||
|
||||
for (i = 0; i < np->num_tx_rings; i++) {
|
||||
struct tx_ring_info *rp = &np->tx_rings[i];
|
||||
|
||||
|
@ -6246,11 +6258,17 @@ static void niu_sync_mac_stats(struct niu *np)
|
|||
static void niu_get_rx_stats(struct niu *np)
|
||||
{
|
||||
unsigned long pkts, dropped, errors, bytes;
|
||||
struct rx_ring_info *rx_rings;
|
||||
int i;
|
||||
|
||||
pkts = dropped = errors = bytes = 0;
|
||||
|
||||
rx_rings = ACCESS_ONCE(np->rx_rings);
|
||||
if (!rx_rings)
|
||||
goto no_rings;
|
||||
|
||||
for (i = 0; i < np->num_rx_rings; i++) {
|
||||
struct rx_ring_info *rp = &np->rx_rings[i];
|
||||
struct rx_ring_info *rp = &rx_rings[i];
|
||||
|
||||
niu_sync_rx_discard_stats(np, rp, 0);
|
||||
|
||||
|
@ -6259,6 +6277,8 @@ static void niu_get_rx_stats(struct niu *np)
|
|||
dropped += rp->rx_dropped;
|
||||
errors += rp->rx_errors;
|
||||
}
|
||||
|
||||
no_rings:
|
||||
np->dev->stats.rx_packets = pkts;
|
||||
np->dev->stats.rx_bytes = bytes;
|
||||
np->dev->stats.rx_dropped = dropped;
|
||||
|
@ -6268,16 +6288,24 @@ static void niu_get_rx_stats(struct niu *np)
|
|||
static void niu_get_tx_stats(struct niu *np)
|
||||
{
|
||||
unsigned long pkts, errors, bytes;
|
||||
struct tx_ring_info *tx_rings;
|
||||
int i;
|
||||
|
||||
pkts = errors = bytes = 0;
|
||||
|
||||
tx_rings = ACCESS_ONCE(np->tx_rings);
|
||||
if (!tx_rings)
|
||||
goto no_rings;
|
||||
|
||||
for (i = 0; i < np->num_tx_rings; i++) {
|
||||
struct tx_ring_info *rp = &np->tx_rings[i];
|
||||
struct tx_ring_info *rp = &tx_rings[i];
|
||||
|
||||
pkts += rp->tx_packets;
|
||||
bytes += rp->tx_bytes;
|
||||
errors += rp->tx_errors;
|
||||
}
|
||||
|
||||
no_rings:
|
||||
np->dev->stats.tx_packets = pkts;
|
||||
np->dev->stats.tx_bytes = bytes;
|
||||
np->dev->stats.tx_errors = errors;
|
||||
|
@ -6287,9 +6315,10 @@ static struct net_device_stats *niu_get_stats(struct net_device *dev)
|
|||
{
|
||||
struct niu *np = netdev_priv(dev);
|
||||
|
||||
niu_get_rx_stats(np);
|
||||
niu_get_tx_stats(np);
|
||||
|
||||
if (netif_running(dev)) {
|
||||
niu_get_rx_stats(np);
|
||||
niu_get_tx_stats(np);
|
||||
}
|
||||
return &dev->stats;
|
||||
}
|
||||
|
||||
|
|
|
@ -1488,12 +1488,10 @@ static void ei_rx_overrun(struct net_device *dev)
|
|||
|
||||
/*
|
||||
* Wait a full Tx time (1.2ms) + some guard time, NS says 1.6ms total.
|
||||
* Early datasheets said to poll the reset bit, but now they say that
|
||||
* it "is not a reliable indicator and subsequently should be ignored."
|
||||
* We wait at least 10ms.
|
||||
* We wait at least 2ms.
|
||||
*/
|
||||
|
||||
mdelay(10);
|
||||
mdelay(2);
|
||||
|
||||
/*
|
||||
* Reset RBCR[01] back to zero as per magic incantation.
|
||||
|
|
|
@ -973,7 +973,8 @@ static void __rtl8169_check_link_status(struct net_device *dev,
|
|||
if (pm)
|
||||
pm_request_resume(&tp->pci_dev->dev);
|
||||
netif_carrier_on(dev);
|
||||
netif_info(tp, ifup, dev, "link up\n");
|
||||
if (net_ratelimit())
|
||||
netif_info(tp, ifup, dev, "link up\n");
|
||||
} else {
|
||||
netif_carrier_off(dev);
|
||||
netif_info(tp, ifdown, dev, "link down\n");
|
||||
|
@ -3757,7 +3758,8 @@ static void rtl_hw_start_8168(struct net_device *dev)
|
|||
RTL_W16(IntrMitigate, 0x5151);
|
||||
|
||||
/* Work around for RxFIFO overflow. */
|
||||
if (tp->mac_version == RTL_GIGA_MAC_VER_11) {
|
||||
if (tp->mac_version == RTL_GIGA_MAC_VER_11 ||
|
||||
tp->mac_version == RTL_GIGA_MAC_VER_22) {
|
||||
tp->intr_event |= RxFIFOOver | PCSTimeout;
|
||||
tp->intr_event &= ~RxOverflow;
|
||||
}
|
||||
|
@ -4639,12 +4641,33 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
|
|||
break;
|
||||
}
|
||||
|
||||
/* Work around for rx fifo overflow */
|
||||
if (unlikely(status & RxFIFOOver) &&
|
||||
(tp->mac_version == RTL_GIGA_MAC_VER_11)) {
|
||||
netif_stop_queue(dev);
|
||||
rtl8169_tx_timeout(dev);
|
||||
break;
|
||||
if (unlikely(status & RxFIFOOver)) {
|
||||
switch (tp->mac_version) {
|
||||
/* Work around for rx fifo overflow */
|
||||
case RTL_GIGA_MAC_VER_11:
|
||||
case RTL_GIGA_MAC_VER_22:
|
||||
case RTL_GIGA_MAC_VER_26:
|
||||
netif_stop_queue(dev);
|
||||
rtl8169_tx_timeout(dev);
|
||||
goto done;
|
||||
/* Testers needed. */
|
||||
case RTL_GIGA_MAC_VER_17:
|
||||
case RTL_GIGA_MAC_VER_19:
|
||||
case RTL_GIGA_MAC_VER_20:
|
||||
case RTL_GIGA_MAC_VER_21:
|
||||
case RTL_GIGA_MAC_VER_23:
|
||||
case RTL_GIGA_MAC_VER_24:
|
||||
case RTL_GIGA_MAC_VER_27:
|
||||
case RTL_GIGA_MAC_VER_28:
|
||||
/* Experimental science. Pktgen proof. */
|
||||
case RTL_GIGA_MAC_VER_12:
|
||||
case RTL_GIGA_MAC_VER_25:
|
||||
if (status == RxFIFOOver)
|
||||
goto done;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (unlikely(status & SYSErr)) {
|
||||
|
@ -4680,7 +4703,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
|
|||
(status & RxFIFOOver) ? (status | RxOverflow) : status);
|
||||
status = RTL_R16(IntrStatus);
|
||||
}
|
||||
|
||||
done:
|
||||
return IRQ_RETVAL(handled);
|
||||
}
|
||||
|
||||
|
|
|
@ -3690,7 +3690,7 @@ __vxge_hw_vpath_rts_table_get(struct __vxge_hw_vpath_handle *vp,
|
|||
if (status != VXGE_HW_OK)
|
||||
goto exit;
|
||||
|
||||
if ((rts_table != VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_DA) ||
|
||||
if ((rts_table != VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_DA) &&
|
||||
(rts_table !=
|
||||
VXGE_HW_RTS_ACS_STEER_CTRL_DATA_STRUCT_SEL_RTH_MULTI_IT))
|
||||
*data1 = 0;
|
||||
|
|
|
@ -838,9 +838,9 @@ int ath5k_hw_dma_stop(struct ath5k_hw *ah)
|
|||
for (i = 0; i < qmax; i++) {
|
||||
err = ath5k_hw_stop_tx_dma(ah, i);
|
||||
/* -EINVAL -> queue inactive */
|
||||
if (err != -EINVAL)
|
||||
if (err && err != -EINVAL)
|
||||
return err;
|
||||
}
|
||||
|
||||
return err;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ int ath5k_hw_get_frame_duration(struct ath5k_hw *ah,
|
|||
if (!ah->ah_bwmode) {
|
||||
dur = ieee80211_generic_frame_duration(sc->hw,
|
||||
NULL, len, rate);
|
||||
return dur;
|
||||
return le16_to_cpu(dur);
|
||||
}
|
||||
|
||||
bitrate = rate->bitrate;
|
||||
|
@ -265,8 +265,6 @@ static inline void ath5k_hw_write_rate_duration(struct ath5k_hw *ah)
|
|||
* what rate we should choose to TX ACKs. */
|
||||
tx_time = ath5k_hw_get_frame_duration(ah, 10, rate);
|
||||
|
||||
tx_time = le16_to_cpu(tx_time);
|
||||
|
||||
ath5k_hw_reg_write(ah, tx_time, reg);
|
||||
|
||||
if (!(rate->flags & IEEE80211_RATE_SHORT_PREAMBLE))
|
||||
|
|
|
@ -426,9 +426,8 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah,
|
|||
}
|
||||
|
||||
/* WAR for ASPM system hang */
|
||||
if (AR_SREV_9280(ah) || AR_SREV_9285(ah) || AR_SREV_9287(ah)) {
|
||||
if (AR_SREV_9285(ah) || AR_SREV_9287(ah))
|
||||
val |= (AR_WA_BIT6 | AR_WA_BIT7);
|
||||
}
|
||||
|
||||
if (AR_SREV_9285E_20(ah))
|
||||
val |= AR_WA_BIT23;
|
||||
|
|
|
@ -142,9 +142,6 @@ static void ath9k_deinit_priv(struct ath9k_htc_priv *priv)
|
|||
{
|
||||
ath9k_htc_exit_debug(priv->ah);
|
||||
ath9k_hw_deinit(priv->ah);
|
||||
tasklet_kill(&priv->swba_tasklet);
|
||||
tasklet_kill(&priv->rx_tasklet);
|
||||
tasklet_kill(&priv->tx_tasklet);
|
||||
kfree(priv->ah);
|
||||
priv->ah = NULL;
|
||||
}
|
||||
|
|
|
@ -1025,12 +1025,6 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
|
|||
int ret = 0;
|
||||
u8 cmd_rsp;
|
||||
|
||||
/* Cancel all the running timers/work .. */
|
||||
cancel_work_sync(&priv->fatal_work);
|
||||
cancel_work_sync(&priv->ps_work);
|
||||
cancel_delayed_work_sync(&priv->ath9k_led_blink_work);
|
||||
ath9k_led_stop_brightness(priv);
|
||||
|
||||
mutex_lock(&priv->mutex);
|
||||
|
||||
if (priv->op_flags & OP_INVALID) {
|
||||
|
@ -1044,8 +1038,23 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
|
|||
WMI_CMD(WMI_DISABLE_INTR_CMDID);
|
||||
WMI_CMD(WMI_DRAIN_TXQ_ALL_CMDID);
|
||||
WMI_CMD(WMI_STOP_RECV_CMDID);
|
||||
|
||||
tasklet_kill(&priv->swba_tasklet);
|
||||
tasklet_kill(&priv->rx_tasklet);
|
||||
tasklet_kill(&priv->tx_tasklet);
|
||||
|
||||
skb_queue_purge(&priv->tx_queue);
|
||||
|
||||
mutex_unlock(&priv->mutex);
|
||||
|
||||
/* Cancel all the running timers/work .. */
|
||||
cancel_work_sync(&priv->fatal_work);
|
||||
cancel_work_sync(&priv->ps_work);
|
||||
cancel_delayed_work_sync(&priv->ath9k_led_blink_work);
|
||||
ath9k_led_stop_brightness(priv);
|
||||
|
||||
mutex_lock(&priv->mutex);
|
||||
|
||||
/* Remove monitor interface here */
|
||||
if (ah->opmode == NL80211_IFTYPE_MONITOR) {
|
||||
if (ath9k_htc_remove_monitor_interface(priv))
|
||||
|
|
|
@ -598,8 +598,6 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid,
|
|||
err_queues:
|
||||
ath9k_hw_deinit(ah);
|
||||
err_hw:
|
||||
tasklet_kill(&sc->intr_tq);
|
||||
tasklet_kill(&sc->bcon_tasklet);
|
||||
|
||||
kfree(ah);
|
||||
sc->sc_ah = NULL;
|
||||
|
@ -807,9 +805,6 @@ static void ath9k_deinit_softc(struct ath_softc *sc)
|
|||
|
||||
ath9k_hw_deinit(sc->sc_ah);
|
||||
|
||||
tasklet_kill(&sc->intr_tq);
|
||||
tasklet_kill(&sc->bcon_tasklet);
|
||||
|
||||
kfree(sc->sc_ah);
|
||||
sc->sc_ah = NULL;
|
||||
}
|
||||
|
@ -824,6 +819,8 @@ void ath9k_deinit_device(struct ath_softc *sc)
|
|||
wiphy_rfkill_stop_polling(sc->hw->wiphy);
|
||||
ath_deinit_leds(sc);
|
||||
|
||||
ath9k_ps_restore(sc);
|
||||
|
||||
for (i = 0; i < sc->num_sec_wiphy; i++) {
|
||||
struct ath_wiphy *aphy = sc->sec_wiphy[i];
|
||||
if (aphy == NULL)
|
||||
|
|
|
@ -325,6 +325,8 @@ static bool ath_paprd_send_frame(struct ath_softc *sc, struct sk_buff *skb, int
|
|||
{
|
||||
struct ieee80211_hw *hw = sc->hw;
|
||||
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath_tx_control txctl;
|
||||
int time_left;
|
||||
|
||||
|
@ -342,8 +344,12 @@ static bool ath_paprd_send_frame(struct ath_softc *sc, struct sk_buff *skb, int
|
|||
init_completion(&sc->paprd_complete);
|
||||
sc->paprd_pending = true;
|
||||
txctl.paprd = BIT(chain);
|
||||
if (ath_tx_start(hw, skb, &txctl) != 0)
|
||||
|
||||
if (ath_tx_start(hw, skb, &txctl) != 0) {
|
||||
ath_dbg(common, ATH_DBG_XMIT, "PAPRD TX failed\n");
|
||||
dev_kfree_skb_any(skb);
|
||||
return false;
|
||||
}
|
||||
|
||||
time_left = wait_for_completion_timeout(&sc->paprd_complete,
|
||||
msecs_to_jiffies(ATH_PAPRD_TIMEOUT));
|
||||
|
@ -953,8 +959,6 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw)
|
|||
|
||||
spin_unlock_bh(&sc->sc_pcu_lock);
|
||||
ath9k_ps_restore(sc);
|
||||
|
||||
ath9k_setpower(sc, ATH9K_PM_FULL_SLEEP);
|
||||
}
|
||||
|
||||
int ath_reset(struct ath_softc *sc, bool retry_tx)
|
||||
|
@ -1309,6 +1313,9 @@ static void ath9k_stop(struct ieee80211_hw *hw)
|
|||
|
||||
spin_lock_bh(&sc->sc_pcu_lock);
|
||||
|
||||
/* prevent tasklets to enable interrupts once we disable them */
|
||||
ah->imask &= ~ATH9K_INT_GLOBAL;
|
||||
|
||||
/* make sure h/w will not generate any interrupt
|
||||
* before setting the invalid flag. */
|
||||
ath9k_hw_disable_interrupts(ah);
|
||||
|
@ -1326,6 +1333,12 @@ static void ath9k_stop(struct ieee80211_hw *hw)
|
|||
|
||||
spin_unlock_bh(&sc->sc_pcu_lock);
|
||||
|
||||
/* we can now sync irq and kill any running tasklets, since we already
|
||||
* disabled interrupts and not holding a spin lock */
|
||||
synchronize_irq(sc->irq);
|
||||
tasklet_kill(&sc->intr_tq);
|
||||
tasklet_kill(&sc->bcon_tasklet);
|
||||
|
||||
ath9k_ps_restore(sc);
|
||||
|
||||
sc->ps_idle = true;
|
||||
|
|
|
@ -726,9 +726,9 @@ static int efuse_pg_packet_read(struct ieee80211_hw *hw, u8 offset, u8 *data)
|
|||
}
|
||||
|
||||
static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr,
|
||||
u8 efuse_data, u8 offset, int *bcontinual,
|
||||
u8 *write_state, struct pgpkt_struct target_pkt,
|
||||
int *repeat_times, int *bresult, u8 word_en)
|
||||
u8 efuse_data, u8 offset, int *bcontinual,
|
||||
u8 *write_state, struct pgpkt_struct *target_pkt,
|
||||
int *repeat_times, int *bresult, u8 word_en)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct pgpkt_struct tmp_pkt;
|
||||
|
@ -744,8 +744,8 @@ static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr,
|
|||
tmp_pkt.word_en = tmp_header & 0x0F;
|
||||
tmp_word_cnts = efuse_calculate_word_cnts(tmp_pkt.word_en);
|
||||
|
||||
if (tmp_pkt.offset != target_pkt.offset) {
|
||||
efuse_addr = efuse_addr + (tmp_word_cnts * 2) + 1;
|
||||
if (tmp_pkt.offset != target_pkt->offset) {
|
||||
*efuse_addr = *efuse_addr + (tmp_word_cnts * 2) + 1;
|
||||
*write_state = PG_STATE_HEADER;
|
||||
} else {
|
||||
for (tmpindex = 0; tmpindex < (tmp_word_cnts * 2); tmpindex++) {
|
||||
|
@ -756,23 +756,23 @@ static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr,
|
|||
}
|
||||
|
||||
if (bdataempty == false) {
|
||||
efuse_addr = efuse_addr + (tmp_word_cnts * 2) + 1;
|
||||
*efuse_addr = *efuse_addr + (tmp_word_cnts * 2) + 1;
|
||||
*write_state = PG_STATE_HEADER;
|
||||
} else {
|
||||
match_word_en = 0x0F;
|
||||
if (!((target_pkt.word_en & BIT(0)) |
|
||||
if (!((target_pkt->word_en & BIT(0)) |
|
||||
(tmp_pkt.word_en & BIT(0))))
|
||||
match_word_en &= (~BIT(0));
|
||||
|
||||
if (!((target_pkt.word_en & BIT(1)) |
|
||||
if (!((target_pkt->word_en & BIT(1)) |
|
||||
(tmp_pkt.word_en & BIT(1))))
|
||||
match_word_en &= (~BIT(1));
|
||||
|
||||
if (!((target_pkt.word_en & BIT(2)) |
|
||||
if (!((target_pkt->word_en & BIT(2)) |
|
||||
(tmp_pkt.word_en & BIT(2))))
|
||||
match_word_en &= (~BIT(2));
|
||||
|
||||
if (!((target_pkt.word_en & BIT(3)) |
|
||||
if (!((target_pkt->word_en & BIT(3)) |
|
||||
(tmp_pkt.word_en & BIT(3))))
|
||||
match_word_en &= (~BIT(3));
|
||||
|
||||
|
@ -780,7 +780,7 @@ static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr,
|
|||
badworden = efuse_word_enable_data_write(
|
||||
hw, *efuse_addr + 1,
|
||||
tmp_pkt.word_en,
|
||||
target_pkt.data);
|
||||
target_pkt->data);
|
||||
|
||||
if (0x0F != (badworden & 0x0F)) {
|
||||
u8 reorg_offset = offset;
|
||||
|
@ -791,26 +791,26 @@ static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr,
|
|||
}
|
||||
|
||||
tmp_word_en = 0x0F;
|
||||
if ((target_pkt.word_en & BIT(0)) ^
|
||||
if ((target_pkt->word_en & BIT(0)) ^
|
||||
(match_word_en & BIT(0)))
|
||||
tmp_word_en &= (~BIT(0));
|
||||
|
||||
if ((target_pkt.word_en & BIT(1)) ^
|
||||
if ((target_pkt->word_en & BIT(1)) ^
|
||||
(match_word_en & BIT(1)))
|
||||
tmp_word_en &= (~BIT(1));
|
||||
|
||||
if ((target_pkt.word_en & BIT(2)) ^
|
||||
if ((target_pkt->word_en & BIT(2)) ^
|
||||
(match_word_en & BIT(2)))
|
||||
tmp_word_en &= (~BIT(2));
|
||||
|
||||
if ((target_pkt.word_en & BIT(3)) ^
|
||||
if ((target_pkt->word_en & BIT(3)) ^
|
||||
(match_word_en & BIT(3)))
|
||||
tmp_word_en &= (~BIT(3));
|
||||
|
||||
if ((tmp_word_en & 0x0F) != 0x0F) {
|
||||
*efuse_addr = efuse_get_current_size(hw);
|
||||
target_pkt.offset = offset;
|
||||
target_pkt.word_en = tmp_word_en;
|
||||
target_pkt->offset = offset;
|
||||
target_pkt->word_en = tmp_word_en;
|
||||
} else
|
||||
*bcontinual = false;
|
||||
*write_state = PG_STATE_HEADER;
|
||||
|
@ -821,8 +821,8 @@ static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr,
|
|||
}
|
||||
} else {
|
||||
*efuse_addr += (2 * tmp_word_cnts) + 1;
|
||||
target_pkt.offset = offset;
|
||||
target_pkt.word_en = word_en;
|
||||
target_pkt->offset = offset;
|
||||
target_pkt->word_en = word_en;
|
||||
*write_state = PG_STATE_HEADER;
|
||||
}
|
||||
}
|
||||
|
@ -938,7 +938,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw,
|
|||
efuse_write_data_case1(hw, &efuse_addr,
|
||||
efuse_data, offset,
|
||||
&bcontinual,
|
||||
&write_state, target_pkt,
|
||||
&write_state, &target_pkt,
|
||||
&repeat_times, &bresult,
|
||||
word_en);
|
||||
else
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue