Merge remote-tracking branch 'origin/p-ti-linux-3.8.y' into p-ti-android-3.8.y
* origin/p-ti-linux-3.8.y: (28 commits)
Linux 3.8.8
tty: don't deadlock while flushing workqueue
x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal
x86, mm, paravirt: Fix vmalloc_fault oops during lazy MMU updates
sched_clock: Prevent 64bit inatomicity on 32bit systems
ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section
udl: handle EDID failure properly.
tracing: Fix possible NULL pointer dereferences
x86-32: Fix possible incomplete TLB invalidate with PAE pagetables
gpio: fix wrong checking condition for gpio range
kobject: fix kset_find_obj() race with concurrent last kobject_put()
vfs: Revert spurious fix to spinning prevention in prune_icache_sb
target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs
cifs: Allow passwords which begin with a delimitor
SCSI: libsas: fix handling vacant phy in sas_set_ex_phy()
GFS2: return error if malloc failed in gfs2_rs_alloc()
GFS2: Fix unlock of fcntl locks during withdrawn state
ipc: set msg back to -EAGAIN if copy wasn't performed
Revert "brcmsmac: support 4313iPA"
PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()
...
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
* origin/p-ti-linux-3.8.y: (28 commits)
Linux 3.8.8
tty: don't deadlock while flushing workqueue
x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal
x86, mm, paravirt: Fix vmalloc_fault oops during lazy MMU updates
sched_clock: Prevent 64bit inatomicity on 32bit systems
ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section
udl: handle EDID failure properly.
tracing: Fix possible NULL pointer dereferences
x86-32: Fix possible incomplete TLB invalidate with PAE pagetables
gpio: fix wrong checking condition for gpio range
kobject: fix kset_find_obj() race with concurrent last kobject_put()
vfs: Revert spurious fix to spinning prevention in prune_icache_sb
target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs
cifs: Allow passwords which begin with a delimitor
SCSI: libsas: fix handling vacant phy in sas_set_ex_phy()
GFS2: return error if malloc failed in gfs2_rs_alloc()
GFS2: Fix unlock of fcntl locks during withdrawn state
ipc: set msg back to -EAGAIN if copy wasn't performed
Revert "brcmsmac: support 4313iPA"
PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()
...
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Merge branch 'ti-linux-3.8.y' of git://git.ti.com/ti-linux-kernel/ti-linux-kernel into p-ti-linux-3.8.y
* 'ti-linux-3.8.y' of git://git.ti.com/ti-linux-kernel/ti-linux-kernel: (28 commits)
Linux 3.8.8
tty: don't deadlock while flushing workqueue
x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal
x86, mm, paravirt: Fix vmalloc_fault oops during lazy MMU updates
sched_clock: Prevent 64bit inatomicity on 32bit systems
ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section
udl: handle EDID failure properly.
tracing: Fix possible NULL pointer dereferences
x86-32: Fix possible incomplete TLB invalidate with PAE pagetables
gpio: fix wrong checking condition for gpio range
kobject: fix kset_find_obj() race with concurrent last kobject_put()
vfs: Revert spurious fix to spinning prevention in prune_icache_sb
target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs
cifs: Allow passwords which begin with a delimitor
SCSI: libsas: fix handling vacant phy in sas_set_ex_phy()
GFS2: return error if malloc failed in gfs2_rs_alloc()
GFS2: Fix unlock of fcntl locks during withdrawn state
ipc: set msg back to -EAGAIN if copy wasn't performed
Revert "brcmsmac: support 4313iPA"
PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()
...
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
* 'ti-linux-3.8.y' of git://git.ti.com/ti-linux-kernel/ti-linux-kernel: (28 commits)
Linux 3.8.8
tty: don't deadlock while flushing workqueue
x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal
x86, mm, paravirt: Fix vmalloc_fault oops during lazy MMU updates
sched_clock: Prevent 64bit inatomicity on 32bit systems
ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section
udl: handle EDID failure properly.
tracing: Fix possible NULL pointer dereferences
x86-32: Fix possible incomplete TLB invalidate with PAE pagetables
gpio: fix wrong checking condition for gpio range
kobject: fix kset_find_obj() race with concurrent last kobject_put()
vfs: Revert spurious fix to spinning prevention in prune_icache_sb
target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs
cifs: Allow passwords which begin with a delimitor
SCSI: libsas: fix handling vacant phy in sas_set_ex_phy()
GFS2: return error if malloc failed in gfs2_rs_alloc()
GFS2: Fix unlock of fcntl locks during withdrawn state
ipc: set msg back to -EAGAIN if copy wasn't performed
Revert "brcmsmac: support 4313iPA"
PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()
...
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Merge tag 'v3.8.8' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into ti-linux-3.8.y
This is the 3.8.8 stable release
* tag 'v3.8.8' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (28 commits)
Linux 3.8.8
tty: don't deadlock while flushing workqueue
x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal
x86, mm, paravirt: Fix vmalloc_fault oops during lazy MMU updates
sched_clock: Prevent 64bit inatomicity on 32bit systems
ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section
udl: handle EDID failure properly.
tracing: Fix possible NULL pointer dereferences
x86-32: Fix possible incomplete TLB invalidate with PAE pagetables
gpio: fix wrong checking condition for gpio range
kobject: fix kset_find_obj() race with concurrent last kobject_put()
vfs: Revert spurious fix to spinning prevention in prune_icache_sb
target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs
cifs: Allow passwords which begin with a delimitor
SCSI: libsas: fix handling vacant phy in sas_set_ex_phy()
GFS2: return error if malloc failed in gfs2_rs_alloc()
GFS2: Fix unlock of fcntl locks during withdrawn state
ipc: set msg back to -EAGAIN if copy wasn't performed
Revert "brcmsmac: support 4313iPA"
PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()
...
Signed-off-by: Dan Murphy <dmurphy@ti.com>
This is the 3.8.8 stable release
* tag 'v3.8.8' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (28 commits)
Linux 3.8.8
tty: don't deadlock while flushing workqueue
x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal
x86, mm, paravirt: Fix vmalloc_fault oops during lazy MMU updates
sched_clock: Prevent 64bit inatomicity on 32bit systems
ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section
udl: handle EDID failure properly.
tracing: Fix possible NULL pointer dereferences
x86-32: Fix possible incomplete TLB invalidate with PAE pagetables
gpio: fix wrong checking condition for gpio range
kobject: fix kset_find_obj() race with concurrent last kobject_put()
vfs: Revert spurious fix to spinning prevention in prune_icache_sb
target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs
cifs: Allow passwords which begin with a delimitor
SCSI: libsas: fix handling vacant phy in sas_set_ex_phy()
GFS2: return error if malloc failed in gfs2_rs_alloc()
GFS2: Fix unlock of fcntl locks during withdrawn state
ipc: set msg back to -EAGAIN if copy wasn't performed
Revert "brcmsmac: support 4313iPA"
PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()
...
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Linux 3.8.8
tty: don't deadlock while flushing workqueue
commit 852e4a8152b427c3f318bb0e1b5e938d64dcdc32 upstream.
Since commit 89c8d91e31f2 ("tty: localise the lock") I see a dead lock
in one of my dummy_hcd + g_nokia test cases. The first run was usually
okay, the second often resulted in a splat by lockdep and the third was
usually a dead lock.
Lockdep complained about tty->hangup_work and tty->legacy_mutex taken
both ways:
| ======================================================
| [ INFO: possible circular locking dependency detected ]
| 3.7.0-rc6+ #204 Not tainted
| -------------------------------------------------------
| kworker/2:1/35 is trying to acquire lock:
| (&tty->legacy_mutex){+.+.+.}, at: [<c14051e6>] tty_lock_nested+0x36/0x80
|
| but task is already holding lock:
| ((&tty->hangup_work)){+.+...}, at: [<c104f6e4>] process_one_work+0x124/0x5e0
|
| which lock already depends on the new lock.
|
| the existing dependency chain (in reverse order) is:
|
| -> #2 ((&tty->hangup_work)){+.+...}:
| [<c107fe74>] lock_acquire+0x84/0x190
| [<c104d82d>] flush_work+0x3d/0x240
| [<c12e6986>] tty_ldisc_flush_works+0x16/0x30
| [<c12e7861>] tty_ldisc_release+0x21/0x70
| [<c12e0dfc>] tty_release+0x35c/0x470
| [<c1105e28>] __fput+0xd8/0x270
| [<c1105fcd>] ____fput+0xd/0x10
| [<c1051dd9>] task_work_run+0xb9/0xf0
| [<c1002a51>] do_notify_resume+0x51/0x80
| [<c140550a>] work_notifysig+0x35/0x3b
|
| -> #1 (&tty->legacy_mutex/1){+.+...}:
| [<c107fe74>] lock_acquire+0x84/0x190
| [<c140276c>] mutex_lock_nested+0x6c/0x2f0
| [<c14051e6>] tty_lock_nested+0x36/0x80
| [<c1405279>] tty_lock_pair+0x29/0x70
| [<c12e0bb8>] tty_release+0x118/0x470
| [<c1105e28>] __fput+0xd8/0x270
| [<c1105fcd>] ____fput+0xd/0x10
| [<c1051dd9>] task_work_run+0xb9/0xf0
| [<c1002a51>] do_notify_resume+0x51/0x80
| [<c140550a>] work_notifysig+0x35/0x3b
|
| -> #0 (&tty->legacy_mutex){+.+.+.}:
| [<c107f3c9>] __lock_acquire+0x1189/0x16a0
| [<c107fe74>] lock_acquire+0x84/0x190
| [<c140276c>] mutex_lock_nested+0x6c/0x2f0
| [<c14051e6>] tty_lock_nested+0x36/0x80
| [<c140523f>] tty_lock+0xf/0x20
| [<c12df8e4>] __tty_hangup+0x54/0x410
| [<c12dfcb2>] do_tty_hangup+0x12/0x20
| [<c104f763>] process_one_work+0x1a3/0x5e0
| [<c104fec9>] worker_thread+0x119/0x3a0
| [<c1055084>] kthread+0x94/0xa0
| [<c140ca37>] ret_from_kernel_thread+0x1b/0x28
|
|other info that might help us debug this:
|
|Chain exists of:
| &tty->legacy_mutex --> &tty->legacy_mutex/1 --> (&tty->hangup_work)
|
| Possible unsafe locking scenario:
|
| CPU0 CPU1
| ---- ----
| lock((&tty->hangup_work));
| lock(&tty->legacy_mutex/1);
| lock((&tty->hangup_work));
| lock(&tty->legacy_mutex);
|
| *** DEADLOCK ***
Before the path mentioned tty_ldisc_release() look like this:
| tty_ldisc_halt(tty);
| tty_ldisc_flush_works(tty);
| tty_lock();
As it can be seen, it first flushes the workqueue and then grabs the
tty_lock. Now we grab the lock first:
| tty_lock_pair(tty, o_tty);
| tty_ldisc_halt(tty);
| tty_ldisc_flush_works(tty);
so lockdep's complaint seems valid.
The earlier version of this patch took the ldisc_mutex since the other
user of tty_ldisc_flush_works() (tty_set_ldisc()) did this.
Peter Hurley then said that it is should not be requried. Since it
wasn't done earlier, I dropped this part.
The code under tty_ldisc_kill() was executed earlier with the tty lock
taken so it is taken again.
I was able to reproduce the deadlock on v3.8-rc1, this patch fixes the
problem in my testcase. I didn't notice any problems so far.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: Bryan O'Donoghue <bryan.odonoghue.lkml@nexus-software.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 852e4a8152b427c3f318bb0e1b5e938d64dcdc32 upstream.
Since commit 89c8d91e31f2 ("tty: localise the lock") I see a dead lock
in one of my dummy_hcd + g_nokia test cases. The first run was usually
okay, the second often resulted in a splat by lockdep and the third was
usually a dead lock.
Lockdep complained about tty->hangup_work and tty->legacy_mutex taken
both ways:
| ======================================================
| [ INFO: possible circular locking dependency detected ]
| 3.7.0-rc6+ #204 Not tainted
| -------------------------------------------------------
| kworker/2:1/35 is trying to acquire lock:
| (&tty->legacy_mutex){+.+.+.}, at: [<c14051e6>] tty_lock_nested+0x36/0x80
|
| but task is already holding lock:
| ((&tty->hangup_work)){+.+...}, at: [<c104f6e4>] process_one_work+0x124/0x5e0
|
| which lock already depends on the new lock.
|
| the existing dependency chain (in reverse order) is:
|
| -> #2 ((&tty->hangup_work)){+.+...}:
| [<c107fe74>] lock_acquire+0x84/0x190
| [<c104d82d>] flush_work+0x3d/0x240
| [<c12e6986>] tty_ldisc_flush_works+0x16/0x30
| [<c12e7861>] tty_ldisc_release+0x21/0x70
| [<c12e0dfc>] tty_release+0x35c/0x470
| [<c1105e28>] __fput+0xd8/0x270
| [<c1105fcd>] ____fput+0xd/0x10
| [<c1051dd9>] task_work_run+0xb9/0xf0
| [<c1002a51>] do_notify_resume+0x51/0x80
| [<c140550a>] work_notifysig+0x35/0x3b
|
| -> #1 (&tty->legacy_mutex/1){+.+...}:
| [<c107fe74>] lock_acquire+0x84/0x190
| [<c140276c>] mutex_lock_nested+0x6c/0x2f0
| [<c14051e6>] tty_lock_nested+0x36/0x80
| [<c1405279>] tty_lock_pair+0x29/0x70
| [<c12e0bb8>] tty_release+0x118/0x470
| [<c1105e28>] __fput+0xd8/0x270
| [<c1105fcd>] ____fput+0xd/0x10
| [<c1051dd9>] task_work_run+0xb9/0xf0
| [<c1002a51>] do_notify_resume+0x51/0x80
| [<c140550a>] work_notifysig+0x35/0x3b
|
| -> #0 (&tty->legacy_mutex){+.+.+.}:
| [<c107f3c9>] __lock_acquire+0x1189/0x16a0
| [<c107fe74>] lock_acquire+0x84/0x190
| [<c140276c>] mutex_lock_nested+0x6c/0x2f0
| [<c14051e6>] tty_lock_nested+0x36/0x80
| [<c140523f>] tty_lock+0xf/0x20
| [<c12df8e4>] __tty_hangup+0x54/0x410
| [<c12dfcb2>] do_tty_hangup+0x12/0x20
| [<c104f763>] process_one_work+0x1a3/0x5e0
| [<c104fec9>] worker_thread+0x119/0x3a0
| [<c1055084>] kthread+0x94/0xa0
| [<c140ca37>] ret_from_kernel_thread+0x1b/0x28
|
|other info that might help us debug this:
|
|Chain exists of:
| &tty->legacy_mutex --> &tty->legacy_mutex/1 --> (&tty->hangup_work)
|
| Possible unsafe locking scenario:
|
| CPU0 CPU1
| ---- ----
| lock((&tty->hangup_work));
| lock(&tty->legacy_mutex/1);
| lock((&tty->hangup_work));
| lock(&tty->legacy_mutex);
|
| *** DEADLOCK ***
Before the path mentioned tty_ldisc_release() look like this:
| tty_ldisc_halt(tty);
| tty_ldisc_flush_works(tty);
| tty_lock();
As it can be seen, it first flushes the workqueue and then grabs the
tty_lock. Now we grab the lock first:
| tty_lock_pair(tty, o_tty);
| tty_ldisc_halt(tty);
| tty_ldisc_flush_works(tty);
so lockdep's complaint seems valid.
The earlier version of this patch took the ldisc_mutex since the other
user of tty_ldisc_flush_works() (tty_set_ldisc()) did this.
Peter Hurley then said that it is should not be requried. Since it
wasn't done earlier, I dropped this part.
The code under tty_ldisc_kill() was executed earlier with the tty lock
taken so it is taken again.
I was able to reproduce the deadlock on v3.8-rc1, this patch fixes the
problem in my testcase. I didn't notice any problems so far.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: Bryan O'Donoghue <bryan.odonoghue.lkml@nexus-software.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal
commit 511ba86e1d386f671084b5d0e6f110bb30b8eeb2 upstream.
Invoking arch_flush_lazy_mmu_mode() results in calls to
preempt_enable()/disable() which may have performance impact.
Since lazy MMU is not used on bare metal we can patch away
arch_flush_lazy_mmu_mode() so that it is never called in such
environment.
[ hpa: the previous patch "Fix vmalloc_fault oops during lazy MMU
updates" may cause a minor performance regression on
bare metal. This patch resolves that performance regression. It is
somewhat unclear to me if this is a good -stable candidate. ]
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: http://lkml.kernel.org/r/1364045796-10720-2-git-send-email-konrad.wilk@oracle.com
Tested-by: Josh Boyer <jwboyer@redhat.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 511ba86e1d386f671084b5d0e6f110bb30b8eeb2 upstream.
Invoking arch_flush_lazy_mmu_mode() results in calls to
preempt_enable()/disable() which may have performance impact.
Since lazy MMU is not used on bare metal we can patch away
arch_flush_lazy_mmu_mode() so that it is never called in such
environment.
[ hpa: the previous patch "Fix vmalloc_fault oops during lazy MMU
updates" may cause a minor performance regression on
bare metal. This patch resolves that performance regression. It is
somewhat unclear to me if this is a good -stable candidate. ]
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: http://lkml.kernel.org/r/1364045796-10720-2-git-send-email-konrad.wilk@oracle.com
Tested-by: Josh Boyer <jwboyer@redhat.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
x86, mm, paravirt: Fix vmalloc_fault oops during lazy MMU updates
commit 1160c2779b826c6f5c08e5cc542de58fd1f667d5 upstream.
In paravirtualized x86_64 kernels, vmalloc_fault may cause an oops
when lazy MMU updates are enabled, because set_pgd effects are being
deferred.
One instance of this problem is during process mm cleanup with memory
cgroups enabled. The chain of events is as follows:
- zap_pte_range enables lazy MMU updates
- zap_pte_range eventually calls mem_cgroup_charge_statistics,
which accesses the vmalloc'd mem_cgroup per-cpu stat area
- vmalloc_fault is triggered which tries to sync the corresponding
PGD entry with set_pgd, but the update is deferred
- vmalloc_fault oopses due to a mismatch in the PUD entries
The OOPs usually looks as so:
------------[ cut here ]------------
kernel BUG at arch/x86/mm/fault.c:396!
invalid opcode: 0000 [#1] SMP
.. snip ..
CPU 1
Pid: 10866, comm: httpd Not tainted 3.6.10-4.fc18.x86_64 #1
RIP: e030:[<ffffffff816271bf>] [<ffffffff816271bf>] vmalloc_fault+0x11f/0x208
.. snip ..
Call Trace:
[<ffffffff81627759>] do_page_fault+0x399/0x4b0
[<ffffffff81004f4c>] ? xen_mc_extend_args+0xec/0x110
[<ffffffff81624065>] page_fault+0x25/0x30
[<ffffffff81184d03>] ? mem_cgroup_charge_statistics.isra.13+0x13/0x50
[<ffffffff81186f78>] __mem_cgroup_uncharge_common+0xd8/0x350
[<ffffffff8118aac7>] mem_cgroup_uncharge_page+0x57/0x60
[<ffffffff8115fbc0>] page_remove_rmap+0xe0/0x150
[<ffffffff8115311a>] ? vm_normal_page+0x1a/0x80
[<ffffffff81153e61>] unmap_single_vma+0x531/0x870
[<ffffffff81154962>] unmap_vmas+0x52/0xa0
[<ffffffff81007442>] ? pte_mfn_to_pfn+0x72/0x100
[<ffffffff8115c8f8>] exit_mmap+0x98/0x170
[<ffffffff810050d9>] ? __raw_callee_save_xen_pmd_val+0x11/0x1e
[<ffffffff81059ce3>] mmput+0x83/0xf0
[<ffffffff810624c4>] exit_mm+0x104/0x130
[<ffffffff8106264a>] do_exit+0x15a/0x8c0
[<ffffffff810630ff>] do_group_exit+0x3f/0xa0
[<ffffffff81063177>] sys_exit_group+0x17/0x20
[<ffffffff8162bae9>] system_call_fastpath+0x16/0x1b
Calling arch_flush_lazy_mmu_mode immediately after set_pgd makes the
changes visible to the consistency checks.
RedHat-Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=914737
Tested-by: Josh Boyer <jwboyer@redhat.com>
Reported-and-Tested-by: Krishna Raman <kraman@redhat.com>
Signed-off-by: Samu Kallio <samu.kallio@aberdeencloud.com>
Link: http://lkml.kernel.org/r/1364045796-10720-1-git-send-email-konrad.wilk@oracle.com
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 1160c2779b826c6f5c08e5cc542de58fd1f667d5 upstream.
In paravirtualized x86_64 kernels, vmalloc_fault may cause an oops
when lazy MMU updates are enabled, because set_pgd effects are being
deferred.
One instance of this problem is during process mm cleanup with memory
cgroups enabled. The chain of events is as follows:
- zap_pte_range enables lazy MMU updates
- zap_pte_range eventually calls mem_cgroup_charge_statistics,
which accesses the vmalloc'd mem_cgroup per-cpu stat area
- vmalloc_fault is triggered which tries to sync the corresponding
PGD entry with set_pgd, but the update is deferred
- vmalloc_fault oopses due to a mismatch in the PUD entries
The OOPs usually looks as so:
------------[ cut here ]------------
kernel BUG at arch/x86/mm/fault.c:396!
invalid opcode: 0000 [#1] SMP
.. snip ..
CPU 1
Pid: 10866, comm: httpd Not tainted 3.6.10-4.fc18.x86_64 #1
RIP: e030:[<ffffffff816271bf>] [<ffffffff816271bf>] vmalloc_fault+0x11f/0x208
.. snip ..
Call Trace:
[<ffffffff81627759>] do_page_fault+0x399/0x4b0
[<ffffffff81004f4c>] ? xen_mc_extend_args+0xec/0x110
[<ffffffff81624065>] page_fault+0x25/0x30
[<ffffffff81184d03>] ? mem_cgroup_charge_statistics.isra.13+0x13/0x50
[<ffffffff81186f78>] __mem_cgroup_uncharge_common+0xd8/0x350
[<ffffffff8118aac7>] mem_cgroup_uncharge_page+0x57/0x60
[<ffffffff8115fbc0>] page_remove_rmap+0xe0/0x150
[<ffffffff8115311a>] ? vm_normal_page+0x1a/0x80
[<ffffffff81153e61>] unmap_single_vma+0x531/0x870
[<ffffffff81154962>] unmap_vmas+0x52/0xa0
[<ffffffff81007442>] ? pte_mfn_to_pfn+0x72/0x100
[<ffffffff8115c8f8>] exit_mmap+0x98/0x170
[<ffffffff810050d9>] ? __raw_callee_save_xen_pmd_val+0x11/0x1e
[<ffffffff81059ce3>] mmput+0x83/0xf0
[<ffffffff810624c4>] exit_mm+0x104/0x130
[<ffffffff8106264a>] do_exit+0x15a/0x8c0
[<ffffffff810630ff>] do_group_exit+0x3f/0xa0
[<ffffffff81063177>] sys_exit_group+0x17/0x20
[<ffffffff8162bae9>] system_call_fastpath+0x16/0x1b
Calling arch_flush_lazy_mmu_mode immediately after set_pgd makes the
changes visible to the consistency checks.
RedHat-Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=914737
Tested-by: Josh Boyer <jwboyer@redhat.com>
Reported-and-Tested-by: Krishna Raman <kraman@redhat.com>
Signed-off-by: Samu Kallio <samu.kallio@aberdeencloud.com>
Link: http://lkml.kernel.org/r/1364045796-10720-1-git-send-email-konrad.wilk@oracle.com
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sched_clock: Prevent 64bit inatomicity on 32bit systems
commit a1cbcaa9ea87b87a96b9fc465951dcf36e459ca2 upstream.
The sched_clock_remote() implementation has the following inatomicity
problem on 32bit systems when accessing the remote scd->clock, which
is a 64bit value.
CPU0 CPU1
sched_clock_local() sched_clock_remote(CPU0)
...
remote_clock = scd[CPU0]->clock
read_low32bit(scd[CPU0]->clock)
cmpxchg64(scd->clock,...)
read_high32bit(scd[CPU0]->clock)
While the update of scd->clock is using an atomic64 mechanism, the
readout on the remote cpu is not, which can cause completely bogus
readouts.
It is a quite rare problem, because it requires the update to hit the
narrow race window between the low/high readout and the update must go
across the 32bit boundary.
The resulting misbehaviour is, that CPU1 will see the sched_clock on
CPU1 ~4 seconds ahead of it's own and update CPU1s sched_clock value
to this bogus timestamp. This stays that way due to the clamping
implementation for about 4 seconds until the synchronization with
CLOCK_MONOTONIC undoes the problem.
The issue is hard to observe, because it might only result in a less
accurate SCHED_OTHER timeslicing behaviour. To create observable
damage on realtime scheduling classes, it is necessary that the bogus
update of CPU1 sched_clock happens in the context of an realtime
thread, which then gets charged 4 seconds of RT runtime, which results
in the RT throttler mechanism to trigger and prevent scheduling of RT
tasks for a little less than 4 seconds. So this is quite unlikely as
well.
The issue was quite hard to decode as the reproduction time is between
2 days and 3 weeks and intrusive tracing makes it less likely, but the
following trace recorded with trace_clock=global, which uses
sched_clock_local(), gave the final hint:
<idle>-0 0d..30 400269.477150: hrtimer_cancel: hrtimer=0xf7061e80
<idle>-0 0d..30 400269.477151: hrtimer_start: hrtimer=0xf7061e80 ...
irq/20-S-587 1d..32 400273.772118: sched_wakeup: comm= ... target_cpu=0
<idle>-0 0dN.30 400273.772118: hrtimer_cancel: hrtimer=0xf7061e80
What happens is that CPU0 goes idle and invokes
sched_clock_idle_sleep_event() which invokes sched_clock_local() and
CPU1 runs a remote wakeup for CPU0 at the same time, which invokes
sched_remote_clock(). The time jump gets propagated to CPU0 via
sched_remote_clock() and stays stale on both cores for ~4 seconds.
There are only two other possibilities, which could cause a stale
sched clock:
1) ktime_get() which reads out CLOCK_MONOTONIC returns a sporadic
wrong value.
2) sched_clock() which reads the TSC returns a sporadic wrong value.
#1 can be excluded because sched_clock would continue to increase for
one jiffy and then go stale.
#2 can be excluded because it would not make the clock jump
forward. It would just result in a stale sched_clock for one jiffy.
After quite some brain twisting and finding the same pattern on other
traces, sched_clock_remote() remained the only place which could cause
such a problem and as explained above it's indeed racy on 32bit
systems.
So while on 64bit systems the readout is atomic, we need to verify the
remote readout on 32bit machines. We need to protect the local->clock
readout in sched_clock_remote() on 32bit as well because an NMI could
hit between the low and the high readout, call sched_clock_local() and
modify local->clock.
Thanks to Siegfried Wulsch for bearing with my debug requests and
going through the tedious tasks of running a bunch of reproducer
systems to generate the debug information which let me decode the
issue.
Reported-by: Siegfried Wulsch <Siegfried.Wulsch@rovema.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1304051544160.21884@ionos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit a1cbcaa9ea87b87a96b9fc465951dcf36e459ca2 upstream.
The sched_clock_remote() implementation has the following inatomicity
problem on 32bit systems when accessing the remote scd->clock, which
is a 64bit value.
CPU0 CPU1
sched_clock_local() sched_clock_remote(CPU0)
...
remote_clock = scd[CPU0]->clock
read_low32bit(scd[CPU0]->clock)
cmpxchg64(scd->clock,...)
read_high32bit(scd[CPU0]->clock)
While the update of scd->clock is using an atomic64 mechanism, the
readout on the remote cpu is not, which can cause completely bogus
readouts.
It is a quite rare problem, because it requires the update to hit the
narrow race window between the low/high readout and the update must go
across the 32bit boundary.
The resulting misbehaviour is, that CPU1 will see the sched_clock on
CPU1 ~4 seconds ahead of it's own and update CPU1s sched_clock value
to this bogus timestamp. This stays that way due to the clamping
implementation for about 4 seconds until the synchronization with
CLOCK_MONOTONIC undoes the problem.
The issue is hard to observe, because it might only result in a less
accurate SCHED_OTHER timeslicing behaviour. To create observable
damage on realtime scheduling classes, it is necessary that the bogus
update of CPU1 sched_clock happens in the context of an realtime
thread, which then gets charged 4 seconds of RT runtime, which results
in the RT throttler mechanism to trigger and prevent scheduling of RT
tasks for a little less than 4 seconds. So this is quite unlikely as
well.
The issue was quite hard to decode as the reproduction time is between
2 days and 3 weeks and intrusive tracing makes it less likely, but the
following trace recorded with trace_clock=global, which uses
sched_clock_local(), gave the final hint:
<idle>-0 0d..30 400269.477150: hrtimer_cancel: hrtimer=0xf7061e80
<idle>-0 0d..30 400269.477151: hrtimer_start: hrtimer=0xf7061e80 ...
irq/20-S-587 1d..32 400273.772118: sched_wakeup: comm= ... target_cpu=0
<idle>-0 0dN.30 400273.772118: hrtimer_cancel: hrtimer=0xf7061e80
What happens is that CPU0 goes idle and invokes
sched_clock_idle_sleep_event() which invokes sched_clock_local() and
CPU1 runs a remote wakeup for CPU0 at the same time, which invokes
sched_remote_clock(). The time jump gets propagated to CPU0 via
sched_remote_clock() and stays stale on both cores for ~4 seconds.
There are only two other possibilities, which could cause a stale
sched clock:
1) ktime_get() which reads out CLOCK_MONOTONIC returns a sporadic
wrong value.
2) sched_clock() which reads the TSC returns a sporadic wrong value.
#1 can be excluded because sched_clock would continue to increase for
one jiffy and then go stale.
#2 can be excluded because it would not make the clock jump
forward. It would just result in a stale sched_clock for one jiffy.
After quite some brain twisting and finding the same pattern on other
traces, sched_clock_remote() remained the only place which could cause
such a problem and as explained above it's indeed racy on 32bit
systems.
So while on 64bit systems the readout is atomic, we need to verify the
remote readout on 32bit machines. We need to protect the local->clock
readout in sched_clock_remote() on 32bit as well because an NMI could
hit between the low and the high readout, call sched_clock_local() and
modify local->clock.
Thanks to Siegfried Wulsch for bearing with my debug requests and
going through the tedious tasks of running a bunch of reproducer
systems to generate the debug information which let me decode the
issue.
Reported-by: Siegfried Wulsch <Siegfried.Wulsch@rovema.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1304051544160.21884@ionos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section
commit 7f49ef69db6bbf756c0abca7e9b65b32e999eec8 upstream.
As ftrace_filter_lseek is now used with ftrace_pid_fops, it needs to
be moved out of the #ifdef CONFIG_DYNAMIC_FTRACE section as the
ftrace_pid_fops is defined when DYNAMIC_FTRACE is not.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 7f49ef69db6bbf756c0abca7e9b65b32e999eec8 upstream.
As ftrace_filter_lseek is now used with ftrace_pid_fops, it needs to
be moved out of the #ifdef CONFIG_DYNAMIC_FTRACE section as the
ftrace_pid_fops is defined when DYNAMIC_FTRACE is not.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
udl: handle EDID failure properly.
commit 1baee58638fc58248625255f5c5fcdb987f11b1f upstream.
Don't oops seems proper.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 1baee58638fc58248625255f5c5fcdb987f11b1f upstream.
Don't oops seems proper.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tracing: Fix possible NULL pointer dereferences
commit 6a76f8c0ab19f215af2a3442870eeb5f0e81998d upstream.
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic.
It can be easily reproduced with following command:
$ cd /sys/kernel/debug/tracing
$ echo 1234 | sudo tee -a set_ftrace_pid
In this example, GNU coreutils' tee opens the file with fopen(, "a")
and then the fopen() internally calls lseek().
Link: http://lkml.kernel.org/r/1365663302-2170-1-git-send-email-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 6a76f8c0ab19f215af2a3442870eeb5f0e81998d upstream.
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic.
It can be easily reproduced with following command:
$ cd /sys/kernel/debug/tracing
$ echo 1234 | sudo tee -a set_ftrace_pid
In this example, GNU coreutils' tee opens the file with fopen(, "a")
and then the fopen() internally calls lseek().
Link: http://lkml.kernel.org/r/1365663302-2170-1-git-send-email-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
x86-32: Fix possible incomplete TLB invalidate with PAE pagetables
commit 1de14c3c5cbc9bb17e9dcc648cda51c0c85d54b9 upstream.
This patch attempts to fix:
https://bugzilla.kernel.org/show_bug.cgi?id=56461
The symptom is a crash and messages like this:
chrome: Corrupted page table at address 34a03000
*pdpt = 0000000000000000 *pde = 0000000000000000
Bad pagetable: 000f [#1] PREEMPT SMP
Ingo guesses this got introduced by commit 611ae8e3f520 ("x86/tlb:
enable tlb flush range support for x86") since that code started to free
unused pagetables.
On x86-32 PAE kernels, that new code has the potential to free an entire
PMD page and will clear one of the four page-directory-pointer-table
(aka pgd_t entries).
The hardware aggressively "caches" these top-level entries and invlpg
does not actually affect the CPU's copy. If we clear one we *HAVE* to
do a full TLB flush, otherwise we might continue using a freed pmd page.
(note, we do this properly on the population side in pud_populate()).
This patch tracks whenever we clear one of these entries in the 'struct
mmu_gather', and ensures that we follow up with a full tlb flush.
BTW, I disassembled and checked that:
if (tlb->fullmm == 0)
and
if (!tlb->fullmm && !tlb->need_flush_all)
generate essentially the same code, so there should be zero impact there
to the !PAE case.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Artem S Tashkinov <t.artem@mailcity.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 1de14c3c5cbc9bb17e9dcc648cda51c0c85d54b9 upstream.
This patch attempts to fix:
https://bugzilla.kernel.org/show_bug.cgi?id=56461
The symptom is a crash and messages like this:
chrome: Corrupted page table at address 34a03000
*pdpt = 0000000000000000 *pde = 0000000000000000
Bad pagetable: 000f [#1] PREEMPT SMP
Ingo guesses this got introduced by commit 611ae8e3f520 ("x86/tlb:
enable tlb flush range support for x86") since that code started to free
unused pagetables.
On x86-32 PAE kernels, that new code has the potential to free an entire
PMD page and will clear one of the four page-directory-pointer-table
(aka pgd_t entries).
The hardware aggressively "caches" these top-level entries and invlpg
does not actually affect the CPU's copy. If we clear one we *HAVE* to
do a full TLB flush, otherwise we might continue using a freed pmd page.
(note, we do this properly on the population side in pud_populate()).
This patch tracks whenever we clear one of these entries in the 'struct
mmu_gather', and ensures that we follow up with a full tlb flush.
BTW, I disassembled and checked that:
if (tlb->fullmm == 0)
and
if (!tlb->fullmm && !tlb->need_flush_all)
generate essentially the same code, so there should be zero impact there
to the !PAE case.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Artem S Tashkinov <t.artem@mailcity.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
gpio: fix wrong checking condition for gpio range
commit ad4e1a7caf937ad395ced585ca85a7d14395dc80 upstream.
If index++ calculates from 0, the checking condition of "while
(index++)" fails & it doesn't check any more. It doesn't follow
the loop that used at here.
Replace it by endless loop at here. Then it keeps parsing
"gpio-ranges" property until it ends.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit ad4e1a7caf937ad395ced585ca85a7d14395dc80 upstream.
If index++ calculates from 0, the checking condition of "while
(index++)" fails & it doesn't check any more. It doesn't follow
the loop that used at here.
Replace it by endless loop at here. Then it keeps parsing
"gpio-ranges" property until it ends.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kobject: fix kset_find_obj() race with concurrent last kobject_put()
commit a49b7e82cab0f9b41f483359be83f44fbb6b4979 upstream.
Anatol Pomozov identified a race condition that hits module unloading
and re-loading. To quote Anatol:
"This is a race codition that exists between kset_find_obj() and
kobject_put(). kset_find_obj() might return kobject that has refcount
equal to 0 if this kobject is freeing by kobject_put() in other
thread.
Here is timeline for the crash in case if kset_find_obj() searches for
an object tht nobody holds and other thread is doing kobject_put() on
the same kobject:
THREAD A (calls kset_find_obj()) THREAD B (calls kobject_put())
splin_lock()
atomic_dec_return(kobj->kref), counter gets zero here
... starts kobject cleanup ....
spin_lock() // WAIT thread A in kobj_kset_leave()
iterate over kset->list
atomic_inc(kobj->kref) (counter becomes 1)
spin_unlock()
spin_lock() // taken
// it does not know that thread A increased counter so it
remove obj from list
spin_unlock()
vfree(module) // frees module object with containing kobj
// kobj points to freed memory area!!
kobject_put(kobj) // OOPS!!!!
The race above happens because module.c tries to use kset_find_obj()
when somebody unloads module. The module.c code was introduced in
commit 6494a93d55fa"
Anatol supplied a patch specific for module.c that worked around the
problem by simply not using kset_find_obj() at all, but rather than make
a local band-aid, this just fixes kset_find_obj() to be thread-safe
using the proper model of refusing the get a new reference if the
refcount has already dropped to zero.
See examples of this proper refcount handling not only in the kref
documentation, but in various other equivalent uses of this pattern by
grepping for atomic_inc_not_zero().
[ Side note: the module race does indicate that module loading and
unloading is not properly serialized wrt sysfs information using the
module mutex. That may require further thought, but this is the
correct fix at the kobject layer regardless. ]
Reported-analyzed-and-tested-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit a49b7e82cab0f9b41f483359be83f44fbb6b4979 upstream.
Anatol Pomozov identified a race condition that hits module unloading
and re-loading. To quote Anatol:
"This is a race codition that exists between kset_find_obj() and
kobject_put(). kset_find_obj() might return kobject that has refcount
equal to 0 if this kobject is freeing by kobject_put() in other
thread.
Here is timeline for the crash in case if kset_find_obj() searches for
an object tht nobody holds and other thread is doing kobject_put() on
the same kobject:
THREAD A (calls kset_find_obj()) THREAD B (calls kobject_put())
splin_lock()
atomic_dec_return(kobj->kref), counter gets zero here
... starts kobject cleanup ....
spin_lock() // WAIT thread A in kobj_kset_leave()
iterate over kset->list
atomic_inc(kobj->kref) (counter becomes 1)
spin_unlock()
spin_lock() // taken
// it does not know that thread A increased counter so it
remove obj from list
spin_unlock()
vfree(module) // frees module object with containing kobj
// kobj points to freed memory area!!
kobject_put(kobj) // OOPS!!!!
The race above happens because module.c tries to use kset_find_obj()
when somebody unloads module. The module.c code was introduced in
commit 6494a93d55fa"
Anatol supplied a patch specific for module.c that worked around the
problem by simply not using kset_find_obj() at all, but rather than make
a local band-aid, this just fixes kset_find_obj() to be thread-safe
using the proper model of refusing the get a new reference if the
refcount has already dropped to zero.
See examples of this proper refcount handling not only in the kref
documentation, but in various other equivalent uses of this pattern by
grepping for atomic_inc_not_zero().
[ Side note: the module race does indicate that module loading and
unloading is not properly serialized wrt sysfs information using the
module mutex. That may require further thought, but this is the
correct fix at the kobject layer regardless. ]
Reported-analyzed-and-tested-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
vfs: Revert spurious fix to spinning prevention in prune_icache_sb
commit 5b55d708335a9e3e4f61f2dadf7511502205ccd1 upstream.
Revert commit 62a3ddef6181 ("vfs: fix spinning prevention in prune_icache_sb").
This commit doesn't look right: since we are looking at the tail of the
list (sb->s_inode_lru.prev) if we want to skip an inode, we should put
it back at the head of the list instead of the tail, otherwise we will
keep spinning on it.
Discovered when investigating why prune_icache_sb came top in perf
reports of a swapping load.
Signed-off-by: Suleiman Souhlal <suleiman@google.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 5b55d708335a9e3e4f61f2dadf7511502205ccd1 upstream.
Revert commit 62a3ddef6181 ("vfs: fix spinning prevention in prune_icache_sb").
This commit doesn't look right: since we are looking at the tail of the
list (sb->s_inode_lru.prev) if we want to skip an inode, we should put
it back at the head of the list instead of the tail, otherwise we will
keep spinning on it.
Discovered when investigating why prune_icache_sb came top in perf
reports of a swapping load.
Signed-off-by: Suleiman Souhlal <suleiman@google.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs
commit 30f359a6f9da65a66de8cadf959f0f4a0d498bba upstream.
This patch fixes a bug where a handful of informational / control CDBs
that should be allowed during ALUA access state Standby/Offline/Transition
where incorrectly returning CHECK_CONDITION + ASCQ_04H_ALUA_TG_PT_*.
This includes INQUIRY + REPORT_LUNS, which would end up preventing LUN
registration when LUN scanning occured during these ALUA access states.
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 30f359a6f9da65a66de8cadf959f0f4a0d498bba upstream.
This patch fixes a bug where a handful of informational / control CDBs
that should be allowed during ALUA access state Standby/Offline/Transition
where incorrectly returning CHECK_CONDITION + ASCQ_04H_ALUA_TG_PT_*.
This includes INQUIRY + REPORT_LUNS, which would end up preventing LUN
registration when LUN scanning occured during these ALUA access states.
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cifs: Allow passwords which begin with a delimitor
commit c369c9a4a7c82d33329d869cbaf93304cc7a0c40 upstream.
Fixes a regression in cifs_parse_mount_options where a password
which begins with a delimitor is parsed incorrectly as being a blank
password.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit c369c9a4a7c82d33329d869cbaf93304cc7a0c40 upstream.
Fixes a regression in cifs_parse_mount_options where a password
which begins with a delimitor is parsed incorrectly as being a blank
password.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
SCSI: libsas: fix handling vacant phy in sas_set_ex_phy()
commit d4a2618fa77b5e58ec15342972bd3505a1c3f551 upstream.
If a result of the SMP discover function is PHY VACANT,
the content of discover response structure (dr) is not valid.
It sometimes happens that dr->attached_sas_addr can contain
even SAS address of other phy. In such case an invalid phy
is created, what causes NULL pointer dereference during
destruction of expander's phys.
So if a result of SMP function is PHY VACANT, the content of discover
response structure (dr) must not be copied to phy structure.
This patch fixes the following bug:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
IP: [<ffffffff811c9002>] sysfs_find_dirent+0x12/0x90
Call Trace:
[<ffffffff811c95f5>] sysfs_get_dirent+0x35/0x80
[<ffffffff811cb55e>] sysfs_unmerge_group+0x1e/0xb0
[<ffffffff813329f4>] dpm_sysfs_remove+0x24/0x90
[<ffffffff8132b0f4>] device_del+0x44/0x1d0
[<ffffffffa016fc59>] sas_rphy_delete+0x9/0x20 [scsi_transport_sas]
[<ffffffffa01a16f6>] sas_destruct_devices+0xe6/0x110 [libsas]
[<ffffffff8107ac7c>] process_one_work+0x16c/0x350
[<ffffffff8107d84a>] worker_thread+0x17a/0x410
[<ffffffff81081b76>] kthread+0x96/0xa0
[<ffffffff81464944>] kernel_thread_helper+0x4/0x10
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
Reviewed-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit d4a2618fa77b5e58ec15342972bd3505a1c3f551 upstream.
If a result of the SMP discover function is PHY VACANT,
the content of discover response structure (dr) is not valid.
It sometimes happens that dr->attached_sas_addr can contain
even SAS address of other phy. In such case an invalid phy
is created, what causes NULL pointer dereference during
destruction of expander's phys.
So if a result of SMP function is PHY VACANT, the content of discover
response structure (dr) must not be copied to phy structure.
This patch fixes the following bug:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
IP: [<ffffffff811c9002>] sysfs_find_dirent+0x12/0x90
Call Trace:
[<ffffffff811c95f5>] sysfs_get_dirent+0x35/0x80
[<ffffffff811cb55e>] sysfs_unmerge_group+0x1e/0xb0
[<ffffffff813329f4>] dpm_sysfs_remove+0x24/0x90
[<ffffffff8132b0f4>] device_del+0x44/0x1d0
[<ffffffffa016fc59>] sas_rphy_delete+0x9/0x20 [scsi_transport_sas]
[<ffffffffa01a16f6>] sas_destruct_devices+0xe6/0x110 [libsas]
[<ffffffff8107ac7c>] process_one_work+0x16c/0x350
[<ffffffff8107d84a>] worker_thread+0x17a/0x410
[<ffffffff81081b76>] kthread+0x96/0xa0
[<ffffffff81464944>] kernel_thread_helper+0x4/0x10
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
Reviewed-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
GFS2: return error if malloc failed in gfs2_rs_alloc()
commit 441362d06be349430d06e37286adce4b90e6ce96 upstream.
The error code in gfs2_rs_alloc() is set to ENOMEM when error
but never be used, instead, gfs2_rs_alloc() always return 0.
Fix to return 'error'.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 441362d06be349430d06e37286adce4b90e6ce96 upstream.
The error code in gfs2_rs_alloc() is set to ENOMEM when error
but never be used, instead, gfs2_rs_alloc() always return 0.
Fix to return 'error'.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
GFS2: Fix unlock of fcntl locks during withdrawn state
commit c2952d202f710d326ac36a8ea6bd216b20615ec8 upstream.
When withdraw occurs, we need to continue to allow unlocks of fcntl
locks to occur, however these will only be local, since the node has
withdrawn from the cluster. This prevents triggering a VFS level
bug trap due to locks remaining when a file is closed.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit c2952d202f710d326ac36a8ea6bd216b20615ec8 upstream.
When withdraw occurs, we need to continue to allow unlocks of fcntl
locks to occur, however these will only be local, since the node has
withdrawn from the cluster. This prevents triggering a VFS level
bug trap due to locks remaining when a file is closed.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ipc: set msg back to -EAGAIN if copy wasn't performed
commit 2dc958fa2fe6987e7ab106bd97029a09a82fcd8d upstream.
Make sure that msg pointer is set back to error value in case of
MSG_COPY flag is set and desired message to copy wasn't found. This
garantees that msg is either a error pointer or a copy address.
Otherwise the last message in queue will be freed without unlinking from
the queue (which leads to memory corruption) and the dummy allocated
copy won't be released.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 2dc958fa2fe6987e7ab106bd97029a09a82fcd8d upstream.
Make sure that msg pointer is set back to error value in case of
MSG_COPY flag is set and desired message to copy wasn't found. This
garantees that msg is either a error pointer or a copy address.
Otherwise the last message in queue will be freed without unlinking from
the queue (which leads to memory corruption) and the dummy allocated
copy won't be released.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Revert "brcmsmac: support 4313iPA"
commit 54683441a92ebe20c5282465ea6f21e5e74d2974 upstream.
This reverts commit b6fc28a158076ca2764edc9a6d1e1402f56e1c0c.
This commit is reported to cause a regression in the support for some
revisions of 4313 ePA devices.
http://marc.info/?l=linux-wireless&m=136360340200943&w=2
Conflicts:
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
Reported-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 54683441a92ebe20c5282465ea6f21e5e74d2974 upstream.
This reverts commit b6fc28a158076ca2764edc9a6d1e1402f56e1c0c.
This commit is reported to cause a regression in the support for some
revisions of 4313 ePA devices.
http://marc.info/?l=linux-wireless&m=136360340200943&w=2
Conflicts:
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
Reported-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()
commit 6f389a8f1dd22a24f3d9afc2812b30d639e94625 upstream.
As commit 40dc166c (PM / Core: Introduce struct syscore_ops for core
subsystems PM) say, syscore_ops operations should be carried with one
CPU on-line and interrupts disabled. However, after commit f96972f2d
(kernel/sys.c: call disable_nonboot_cpus() in kernel_restart()),
syscore_shutdown() is called before disable_nonboot_cpus(), so break
the rules. We have a MIPS machine with a 8259A PIC, and there is an
external timer (HPET) linked at 8259A. Since 8259A has been shutdown
too early (by syscore_shutdown()), disable_nonboot_cpus() runs without
timer interrupt, so it hangs and reboot fails. This patch call
syscore_shutdown() a little later (after disable_nonboot_cpus()) to
avoid reboot failure, this is the same way as poweroff does.
For consistency, add disable_nonboot_cpus() to kernel_halt().
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 6f389a8f1dd22a24f3d9afc2812b30d639e94625 upstream.
As commit 40dc166c (PM / Core: Introduce struct syscore_ops for core
subsystems PM) say, syscore_ops operations should be carried with one
CPU on-line and interrupts disabled. However, after commit f96972f2d
(kernel/sys.c: call disable_nonboot_cpus() in kernel_restart()),
syscore_shutdown() is called before disable_nonboot_cpus(), so break
the rules. We have a MIPS machine with a 8259A PIC, and there is an
external timer (HPET) linked at 8259A. Since 8259A has been shutdown
too early (by syscore_shutdown()), disable_nonboot_cpus() runs without
timer interrupt, so it hangs and reboot fails. This patch call
syscore_shutdown() a little later (after disable_nonboot_cpus()) to
avoid reboot failure, this is the same way as poweroff does.
For consistency, add disable_nonboot_cpus() to kernel_halt().
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
dmaengine: omap-dma: Start DMA without delay for cyclic channels
commit 765024697807ad1e1cac332aa891253ca4a339da upstream.
cyclic DMA is only used by audio which needs DMA to be started without a
delay.
If the DMA for audio is started using the tasklet we experience random
channel switch (to be more precise: channel shift).
Reported-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 765024697807ad1e1cac332aa891253ca4a339da upstream.
cyclic DMA is only used by audio which needs DMA to be started without a
delay.
If the DMA for audio is started using the tasklet we experience random
channel switch (to be more precise: channel shift).
Reported-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ARM: imx35 Bugfix admux clock
commit 75498083e25e96932ad998ffdeadb17234c68d3a upstream.
The admux clock seems to be the audmux clock as tests show. audmux does
not work without this clock enabled. Currently imx35 does not register a
clock device for audmux. This patch adds this registration. imx-audmux
driver already handles a clock device, so no changes are necessary
there.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 75498083e25e96932ad998ffdeadb17234c68d3a upstream.
The admux clock seems to be the audmux clock as tests show. audmux does
not work without this clock enabled. Currently imx35 does not register a
clock device for audmux. This patch adds this registration. imx-audmux
driver already handles a clock device, so no changes are necessary
there.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ARM: Kirkwood: Fix typo in the definition of ix2-200 rebuild LED
commit 8f08d6667287241f6818d35e02b223fb5df97cf1 upstream.
In the conversion to pinctrl, an error in the pins for the rebuild
LED was introduced. This patch assigns the correct pins and includes
the correct name for the LED in kirkwood-iomega_ix2_200.dts.
Signed-off-by: Nigel Roberts <nigel@nobiscuit.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 8f08d6667287241f6818d35e02b223fb5df97cf1 upstream.
In the conversion to pinctrl, an error in the pins for the rebuild
LED was introduced. This patch assigns the correct pins and includes
the correct name for the LED in kirkwood-iomega_ix2_200.dts.
Signed-off-by: Nigel Roberts <nigel@nobiscuit.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tracing: Fix double free when function profile init failed
commit 83e03b3fe4daffdebbb42151d5410d730ae50bd1 upstream.
On the failure path, stat->start and stat->pages will refer same page.
So it'll attempt to free the same page again and get kernel panic.
Link: http://lkml.kernel.org/r/1364820385-32027-1-git-send-email-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 83e03b3fe4daffdebbb42151d5410d730ae50bd1 upstream.
On the failure path, stat->start and stat->pages will refer same page.
So it'll attempt to free the same page again and get kernel panic.
Link: http://lkml.kernel.org/r/1364820385-32027-1-git-send-email-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ASoC: wm8903: Fix the bypass to HP/LINEOUT when no DAC or ADC is running
commit f1ca493b0b5e8f42d3b2dc8877860db2983f47b6 upstream.
The Charge Pump needs the DSP clock to work properly, without it the
bypass to HP/LINEOUT is not working properly. This requirement is not
mentioned in the datasheet but has been confirmed by Mark Brown from
Wolfson.
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit f1ca493b0b5e8f42d3b2dc8877860db2983f47b6 upstream.
The Charge Pump needs the DSP clock to work properly, without it the
bypass to HP/LINEOUT is not working properly. This requirement is not
mentioned in the datasheet but has been confirmed by Mark Brown from
Wolfson.
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ASoC: wm5102: Correct lookup of arizona struct in SYSCLK event
commit f6f629f8332ea70255f6c60c904270640a21a114 upstream.
Reported-by: Ryo Tsutsui <Ryo.Tsutsui@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit f6f629f8332ea70255f6c60c904270640a21a114 upstream.
Reported-by: Ryo Tsutsui <Ryo.Tsutsui@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ASoC: core: Fix to check return value of snd_soc_update_bits_locked()
commit 0eaa6cca1f75e12e4f5ec62cbe887330fe3b5fe9 upstream.
It can be 0 or 1 return value of snd_soc_update_bits_locked() when it is
success. So just check return value is negative.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 0eaa6cca1f75e12e4f5ec62cbe887330fe3b5fe9 upstream.
It can be 0 or 1 return value of snd_soc_update_bits_locked() when it is
success. So just check return value is negative.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_*
commit 889d66848b12d891248b03abcb2a42047f8e172a upstream.
The usb_control_msg() function expects __u16 types and performs
the endianness conversions by itself.
However, in three places, a conversion is performed before it is
handed over to usb_control_msg(), which leads to a double conversion
(= no conversion):
* snd_usb_nativeinstruments_boot_quirk()
* snd_nativeinstruments_control_get()
* snd_nativeinstruments_control_put()
Caught by sparse:
sound/usb/mixer_quirks.c:512:38: warning: incorrect type in argument 6 (different base types)
sound/usb/mixer_quirks.c:512:38: expected unsigned short [unsigned] [usertype] index
sound/usb/mixer_quirks.c:512:38: got restricted __le16 [usertype] <noident>
sound/usb/mixer_quirks.c:543:35: warning: incorrect type in argument 5 (different base types)
sound/usb/mixer_quirks.c:543:35: expected unsigned short [unsigned] [usertype] value
sound/usb/mixer_quirks.c:543:35: got restricted __le16 [usertype] <noident>
sound/usb/mixer_quirks.c:543:56: warning: incorrect type in argument 6 (different base types)
sound/usb/mixer_quirks.c:543:56: expected unsigned short [unsigned] [usertype] index
sound/usb/mixer_quirks.c:543:56: got restricted __le16 [usertype] <noident>
sound/usb/quirks.c:502:35: warning: incorrect type in argument 5 (different base types)
sound/usb/quirks.c:502:35: expected unsigned short [unsigned] [usertype] value
sound/usb/quirks.c:502:35: got restricted __le16 [usertype] <noident>
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 889d66848b12d891248b03abcb2a42047f8e172a upstream.
The usb_control_msg() function expects __u16 types and performs
the endianness conversions by itself.
However, in three places, a conversion is performed before it is
handed over to usb_control_msg(), which leads to a double conversion
(= no conversion):
* snd_usb_nativeinstruments_boot_quirk()
* snd_nativeinstruments_control_get()
* snd_nativeinstruments_control_put()
Caught by sparse:
sound/usb/mixer_quirks.c:512:38: warning: incorrect type in argument 6 (different base types)
sound/usb/mixer_quirks.c:512:38: expected unsigned short [unsigned] [usertype] index
sound/usb/mixer_quirks.c:512:38: got restricted __le16 [usertype] <noident>
sound/usb/mixer_quirks.c:543:35: warning: incorrect type in argument 5 (different base types)
sound/usb/mixer_quirks.c:543:35: expected unsigned short [unsigned] [usertype] value
sound/usb/mixer_quirks.c:543:35: got restricted __le16 [usertype] <noident>
sound/usb/mixer_quirks.c:543:56: warning: incorrect type in argument 6 (different base types)
sound/usb/mixer_quirks.c:543:56: expected unsigned short [unsigned] [usertype] index
sound/usb/mixer_quirks.c:543:56: got restricted __le16 [usertype] <noident>
sound/usb/quirks.c:502:35: warning: incorrect type in argument 5 (different base types)
sound/usb/quirks.c:502:35: expected unsigned short [unsigned] [usertype] value
sound/usb/quirks.c:502:35: got restricted __le16 [usertype] <noident>
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ARM: OMAP: android_omap_defconfig: Sync omap2plus_defconfig
part-1:
Sync omap2plus_defconfig:
This picks up the below patches to android_omap_defconfig
1)
commit b09f88c2d2c6aa6847e5c9d6efe0a700a08f9f85
Revert "ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module"
2)
commit 1ccfc404ff4d00c1ac82674d29589d626dedfbd1
arm: configs: disable unused sata configs
3)
e04bc502311d83435d164149318bb651bb766ebc
ARM: omap2plus_defconfig: Enable USB Video class drivers
4)
commit 4404b635bd7b41815647a7225734ac1408bd391f
ARM: OMAP2+: omap2plus_defconfig: Enable RTC support
5)
commit 3dec7e931e13a3ce5b95b4bb135e75d53706c38e
ARM: OMAP2+: Enable cpufreq-cpu0 Config options for cpufreq
6)
commit 16697b9e2cddf4750574f14d72178ed86d579642
ARM: OMAP2+: Enable DSS and OMAPDRM
--
part-2:
This patch also updates android_omap_defconfig cleanly
according to "make savedefconfig"
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
part-1:
Sync omap2plus_defconfig:
This picks up the below patches to android_omap_defconfig
1)
commit b09f88c2d2c6aa6847e5c9d6efe0a700a08f9f85
Revert "ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module"
2)
commit 1ccfc404ff4d00c1ac82674d29589d626dedfbd1
arm: configs: disable unused sata configs
3)
e04bc502311d83435d164149318bb651bb766ebc
ARM: omap2plus_defconfig: Enable USB Video class drivers
4)
commit 4404b635bd7b41815647a7225734ac1408bd391f
ARM: OMAP2+: omap2plus_defconfig: Enable RTC support
5)
commit 3dec7e931e13a3ce5b95b4bb135e75d53706c38e
ARM: OMAP2+: Enable cpufreq-cpu0 Config options for cpufreq
6)
commit 16697b9e2cddf4750574f14d72178ed86d579642
ARM: OMAP2+: Enable DSS and OMAPDRM
--
part-2:
This patch also updates android_omap_defconfig cleanly
according to "make savedefconfig"
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Merge remote-tracking branch 'origin/p-ti-linux-3.8.y' into p-ti-android-3.8.y
* origin/p-ti-linux-3.8.y: (114 commits)
drm.h: Fix DRM compilation with bare-metal toolchain
Revert "ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module"
mmc:fix max discard sectors limit
arm: configs: disable unused sata configs
ARM: dts: omap3-beagle-xm: Add USB Host support
dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver
ARM: OMAP3: Beagle: Fix USB Host on beagle xM Ax/Bx
USB: ehci-omap: Fix stale dma_mask on repeated modprobe/rmmod
ARM: omap2plus_defconfig: Enable USB Video class drivers
usb: dwc3: set 'mode' based on selected Kconfig choices
usb: dwc3: remove dwc3 dependency on host AND gadget.
drivers: usb: otg: palmas: enable VBUS on ID connect interrupt
drivers: regulator: palmas: add an API to set/clear the switch bit on SMPS10
usb: dwc3: gadget: free trb pool only from epnum 2
ARM: OMAP: Display: Fix compile issues
ARM: DTS: OMAP5-uevm: pull-up Palmas MSECURE line
ARM/dts: omap5-sevm: Enable palmas on i2c1 bus
ARM: OMAP2+: omap2plus_defconfig: Enable RTC support
ARM: dts: AM33XX: Enable system power off control in am335x-bone
ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone
...
Conflicts:
drivers/hid/hid-magicmouse.c
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
* origin/p-ti-linux-3.8.y: (114 commits)
drm.h: Fix DRM compilation with bare-metal toolchain
Revert "ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module"
mmc:fix max discard sectors limit
arm: configs: disable unused sata configs
ARM: dts: omap3-beagle-xm: Add USB Host support
dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver
ARM: OMAP3: Beagle: Fix USB Host on beagle xM Ax/Bx
USB: ehci-omap: Fix stale dma_mask on repeated modprobe/rmmod
ARM: omap2plus_defconfig: Enable USB Video class drivers
usb: dwc3: set 'mode' based on selected Kconfig choices
usb: dwc3: remove dwc3 dependency on host AND gadget.
drivers: usb: otg: palmas: enable VBUS on ID connect interrupt
drivers: regulator: palmas: add an API to set/clear the switch bit on SMPS10
usb: dwc3: gadget: free trb pool only from epnum 2
ARM: OMAP: Display: Fix compile issues
ARM: DTS: OMAP5-uevm: pull-up Palmas MSECURE line
ARM/dts: omap5-sevm: Enable palmas on i2c1 bus
ARM: OMAP2+: omap2plus_defconfig: Enable RTC support
ARM: dts: AM33XX: Enable system power off control in am335x-bone
ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone
...
Conflicts:
drivers/hid/hid-magicmouse.c
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Merge branch 'ti-linux-3.8.y' of git://git.ti.com/ti-linux-kernel/ti-linux-kernel into p-ti-linux-3.8.y
* 'ti-linux-3.8.y' of git://git.ti.com/ti-linux-kernel/ti-linux-kernel: (37 commits)
Revert "ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module"
mmc:fix max discard sectors limit
arm: configs: disable unused sata configs
ARM: dts: omap3-beagle-xm: Add USB Host support
dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver
ARM: OMAP3: Beagle: Fix USB Host on beagle xM Ax/Bx
USB: ehci-omap: Fix stale dma_mask on repeated modprobe/rmmod
ARM: omap2plus_defconfig: Enable USB Video class drivers
usb: dwc3: set 'mode' based on selected Kconfig choices
usb: dwc3: remove dwc3 dependency on host AND gadget.
drivers: usb: otg: palmas: enable VBUS on ID connect interrupt
drivers: regulator: palmas: add an API to set/clear the switch bit on SMPS10
usb: dwc3: gadget: free trb pool only from epnum 2
ARM: OMAP: Display: Fix compile issues
ARM: DTS: OMAP5-uevm: pull-up Palmas MSECURE line
ARM/dts: omap5-sevm: Enable palmas on i2c1 bus
ARM: OMAP2+: omap2plus_defconfig: Enable RTC support
ARM: dts: AM33XX: Enable system power off control in am335x-bone
ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone
rtc: OMAP: Add system pm_power_off to rtc driver
...
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
* 'ti-linux-3.8.y' of git://git.ti.com/ti-linux-kernel/ti-linux-kernel: (37 commits)
Revert "ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module"
mmc:fix max discard sectors limit
arm: configs: disable unused sata configs
ARM: dts: omap3-beagle-xm: Add USB Host support
dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver
ARM: OMAP3: Beagle: Fix USB Host on beagle xM Ax/Bx
USB: ehci-omap: Fix stale dma_mask on repeated modprobe/rmmod
ARM: omap2plus_defconfig: Enable USB Video class drivers
usb: dwc3: set 'mode' based on selected Kconfig choices
usb: dwc3: remove dwc3 dependency on host AND gadget.
drivers: usb: otg: palmas: enable VBUS on ID connect interrupt
drivers: regulator: palmas: add an API to set/clear the switch bit on SMPS10
usb: dwc3: gadget: free trb pool only from epnum 2
ARM: OMAP: Display: Fix compile issues
ARM: DTS: OMAP5-uevm: pull-up Palmas MSECURE line
ARM/dts: omap5-sevm: Enable palmas on i2c1 bus
ARM: OMAP2+: omap2plus_defconfig: Enable RTC support
ARM: dts: AM33XX: Enable system power off control in am335x-bone
ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone
rtc: OMAP: Add system pm_power_off to rtc driver
...
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
drm.h: Fix DRM compilation with bare-metal toolchain
From: Paul Sokolovsky <paul.sokolovsky@linaro.org>
An ifdef in drm.h expects to be compiled with full-fledged Linux
toolchain, but it's common to compile kernel with just bare-metal
toolchain which doesn't define __linux__. So, also add __KERNEL__
check.
This fixes below error with arm-eabi-4.6
In file included from include/drm/drmP.h:75:0,
from drivers/gpu/drm/drm_auth.c:36:
include/uapi/drm/drm.h:47:24: fatal error:
sys/ioccom.h: No such file or directory compilation terminated
[nm@ti.com: port forward to 3.9-rc6 and post to dri devel for feedback as RFC]
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
From: Paul Sokolovsky <paul.sokolovsky@linaro.org>
An ifdef in drm.h expects to be compiled with full-fledged Linux
toolchain, but it's common to compile kernel with just bare-metal
toolchain which doesn't define __linux__. So, also add __KERNEL__
check.
This fixes below error with arm-eabi-4.6
In file included from include/drm/drmP.h:75:0,
from drivers/gpu/drm/drm_auth.c:36:
include/uapi/drm/drm.h:47:24: fatal error:
sys/ioccom.h: No such file or directory compilation terminated
[nm@ti.com: port forward to 3.9-rc6 and post to dri devel for feedback as RFC]
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Merge branch 'connectivity-linux-3.8.y' of git://gitorious.ti.com/ti-linux-kernel/connectivity-linux-feature-tree into ti-linux-3.8.y
TI-Feature: connectivity_base
TI-Tree: git://gitorious.ti.com/ti-linux-kernel/connectivity-linux-feature-tree.git
TI-Branch: connectivity-linux-3.8.y
* 'connectivity-linux-3.8.y' of git://gitorious.ti.com/ti-linux-kernel/connectivity-linux-feature-tree:
mmc:fix max discard sectors limit
arm: configs: disable unused sata configs
ARM: dts: omap3-beagle-xm: Add USB Host support
dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver
ARM: OMAP3: Beagle: Fix USB Host on beagle xM Ax/Bx
USB: ehci-omap: Fix stale dma_mask on repeated modprobe/rmmod
ARM: omap2plus_defconfig: Enable USB Video class drivers
usb: dwc3: set 'mode' based on selected Kconfig choices
usb: dwc3: remove dwc3 dependency on host AND gadget.
drivers: usb: otg: palmas: enable VBUS on ID connect interrupt
drivers: regulator: palmas: add an API to set/clear the switch bit on SMPS10
usb: dwc3: gadget: free trb pool only from epnum 2
Signed-off-by: Dan Murphy <dmurphy@ti.com>
TI-Feature: connectivity_base
TI-Tree: git://gitorious.ti.com/ti-linux-kernel/connectivity-linux-feature-tree.git
TI-Branch: connectivity-linux-3.8.y
* 'connectivity-linux-3.8.y' of git://gitorious.ti.com/ti-linux-kernel/connectivity-linux-feature-tree:
mmc:fix max discard sectors limit
arm: configs: disable unused sata configs
ARM: dts: omap3-beagle-xm: Add USB Host support
dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver
ARM: OMAP3: Beagle: Fix USB Host on beagle xM Ax/Bx
USB: ehci-omap: Fix stale dma_mask on repeated modprobe/rmmod
ARM: omap2plus_defconfig: Enable USB Video class drivers
usb: dwc3: set 'mode' based on selected Kconfig choices
usb: dwc3: remove dwc3 dependency on host AND gadget.
drivers: usb: otg: palmas: enable VBUS on ID connect interrupt
drivers: regulator: palmas: add an API to set/clear the switch bit on SMPS10
usb: dwc3: gadget: free trb pool only from epnum 2
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Merge branch 'omap5_audio_video-3.8.y' of git://gitorious.ti.com/~a0393947/ti-linux-kernel/audio-video-linux-feature-tree into ti-linux-3.8.y
TI-Feature: omap5_audio_video_base
TI-Tree: git://gitorious.ti.com/~a0393947/ti-linux-kernel/audio-video-linux-feature-tree
TI-Branch: omap5_audio_video-3.8.y
* 'omap5_audio_video-3.8.y' of git://gitorious.ti.com/~a0393947/ti-linux-kernel/audio-video-linux-feature-tree:
Revert "ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module"
Signed-off-by: Dan Murphy <dmurphy@ti.com>
TI-Feature: omap5_audio_video_base
TI-Tree: git://gitorious.ti.com/~a0393947/ti-linux-kernel/audio-video-linux-feature-tree
TI-Branch: omap5_audio_video-3.8.y
* 'omap5_audio_video-3.8.y' of git://gitorious.ti.com/~a0393947/ti-linux-kernel/audio-video-linux-feature-tree:
Revert "ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module"
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Revert "ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module"
This reverts commit 4961d10f551490e4b37676bf1687eea0bc751431.
Enabling audio is causing random kernel panics, disabling it for now.
Signed-off-by: Archit Taneja <archit@ti.com>
This reverts commit 4961d10f551490e4b37676bf1687eea0bc751431.
Enabling audio is causing random kernel panics, disabling it for now.
Signed-off-by: Archit Taneja <archit@ti.com>
10 years agoMerge branch 'omap5-sata-mmc-3.8-mkfsext4-fix' of git://git.ti.com/~balajitk/ti-linux...
Merge branch 'omap5-sata-mmc-3.8-mkfsext4-fix' of git://git.ti.com/~balajitk/ti-linux-kernel/omap-hsmmc into connectivity-linux-3.8.y
* 'omap5-sata-mmc-3.8-mkfsext4-fix' of git://git.ti.com/~balajitk/ti-linux-kernel/omap-hsmmc:
mmc:fix max discard sectors limit
arm: configs: disable unused sata configs
* 'omap5-sata-mmc-3.8-mkfsext4-fix' of git://git.ti.com/~balajitk/ti-linux-kernel/omap-hsmmc:
mmc:fix max discard sectors limit
arm: configs: disable unused sata configs
mmc:fix max discard sectors limit
If multiple discard requests get merged, merged discard request's
size exceeds 4GB, there is possibility that merged discard request's
__data_len field may overflow.
Add BLK_DEF_MAX_DISCARD_SECTORS macro to limit max discard sectors
to be under 4G / 512 sectors.
This fixes mkfs.ext4 failure with mmc/sd partition size more than 4GBytes.
Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Vivek Trivedi <t.vivek@samsung.com>
Tested-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
If multiple discard requests get merged, merged discard request's
size exceeds 4GB, there is possibility that merged discard request's
__data_len field may overflow.
Add BLK_DEF_MAX_DISCARD_SECTORS macro to limit max discard sectors
to be under 4G / 512 sectors.
This fixes mkfs.ext4 failure with mmc/sd partition size more than 4GBytes.
Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Vivek Trivedi <t.vivek@samsung.com>
Tested-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
arm: configs: disable unused sata configs
Port Multiplier support and ATA SFF support
is not applicable for OMAP5, keep it disabled
to resolve softreset failure on re-init.
Signed-off-by: Balaji T K <balajitk@ti.com>
Port Multiplier support and ATA SFF support
is not applicable for OMAP5, keep it disabled
to resolve softreset failure on re-init.
Signed-off-by: Balaji T K <balajitk@ti.com>
10 years agoMerge branch 'usbhost-3.8.y' of git://gitorious.ti.com/~rogerq/ti-linux-kernel/usbhos...
Merge branch 'usbhost-3.8.y' of git://gitorious.ti.com/~rogerq/ti-linux-kernel/usbhost-feature-tree into connectivity-linux-3.8.y
* 'usbhost-3.8.y' of git://gitorious.ti.com/~rogerq/ti-linux-kernel/usbhost-feature-tree:
ARM: dts: omap3-beagle-xm: Add USB Host support
ARM: OMAP3: Beagle: Fix USB Host on beagle xM Ax/Bx
USB: ehci-omap: Fix stale dma_mask on repeated modprobe/rmmod
ARM: omap2plus_defconfig: Enable USB Video class drivers
* 'usbhost-3.8.y' of git://gitorious.ti.com/~rogerq/ti-linux-kernel/usbhost-feature-tree:
ARM: dts: omap3-beagle-xm: Add USB Host support
ARM: OMAP3: Beagle: Fix USB Host on beagle xM Ax/Bx
USB: ehci-omap: Fix stale dma_mask on repeated modprobe/rmmod
ARM: omap2plus_defconfig: Enable USB Video class drivers
Merge branch 'mcspi_dma_channel_fixv4' of git://gitorious.org/linux-connectivity/linux-connectivity into connectivity-linux-3.8.y
* 'mcspi_dma_channel_fixv4' of git://gitorious.org/linux-connectivity/linux-connectivity:
dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver
* 'mcspi_dma_channel_fixv4' of git://gitorious.org/linux-connectivity/linux-connectivity:
dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver
ARM: dts: omap3-beagle-xm: Add USB Host support
Provide RESET and Power regulators for the USB PHY,
the USB Host port mode and the PHY device.
Also provide pin multiplexer information for USB host
pins.
For rev Ax/Bx boards the USB_PWR_EN signal's polarity
is reversed so we create a new dts file 'omap3-beagle-xm-ab.dts'
for it.
CC: Benoît Cousson <b-cousson@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Provide RESET and Power regulators for the USB PHY,
the USB Host port mode and the PHY device.
Also provide pin multiplexer information for USB host
pins.
For rev Ax/Bx boards the USB_PWR_EN signal's polarity
is reversed so we create a new dts file 'omap3-beagle-xm-ab.dts'
for it.
CC: Benoît Cousson <b-cousson@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver
If the device-tree blob is present during boot, then register the SDMA
controller with the device-tree DMA driver so that we can use device-tree
to look-up DMA client information.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
[Rebased it on internal connectivity tree(3.8) as a fix
for mcspi dma channel allocation]
If the device-tree blob is present during boot, then register the SDMA
controller with the device-tree DMA driver so that we can use device-tree
to look-up DMA client information.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
[Rebased it on internal connectivity tree(3.8) as a fix
for mcspi dma channel allocation]
ARM: OMAP3: Beagle: Fix USB Host on beagle xM Ax/Bx
On Beagle xM Rev. Ax/Bx, the USB power enable GPIO logic is
reversed when compared to other revisions i.e. it is
active high instead of active low.
Use the beagle_config.usb_pwr_level flag correctly so that
the power regulator can be configured at runtime.
Signed-off-by: Roger Quadros <rogerq@ti.com>
On Beagle xM Rev. Ax/Bx, the USB power enable GPIO logic is
reversed when compared to other revisions i.e. it is
active high instead of active low.
Use the beagle_config.usb_pwr_level flag correctly so that
the power regulator can be configured at runtime.
Signed-off-by: Roger Quadros <rogerq@ti.com>
USB: ehci-omap: Fix stale dma_mask on repeated modprobe/rmmod
The address of 'omap_ehci_dma_mask' would change each time the module
is removed and re-inserted. This will cause page faults if any
driver tries to access the old dma_mask pointer.
Unconditionally re-setting the dma_mask pointer will fix this problem.
Signed-off-by: Roger Quadros <rogerq@ti.com>
The address of 'omap_ehci_dma_mask' would change each time the module
is removed and re-inserted. This will cause page faults if any
driver tries to access the old dma_mask pointer.
Unconditionally re-setting the dma_mask pointer will fix this problem.
Signed-off-by: Roger Quadros <rogerq@ti.com>
ARM: omap2plus_defconfig: Enable USB Video class drivers
USB Webcams need the USB Video Class drivers in order to
work. Enable them so we can test USB Webcams.
Signed-off-by: Roger Quadros <rogerq@ti.com>
USB Webcams need the USB Video Class drivers in order to
work. Enable them so we can test USB Webcams.
Signed-off-by: Roger Quadros <rogerq@ti.com>
10 years agoMerge remote-tracking branch 'ti-linux-kernel/ti-linux-3.8.y' into connectivity-linux...
Merge remote-tracking branch 'ti-linux-kernel/ti-linux-3.8.y' into connectivity-linux-3.8.y
* ti-linux-kernel/ti-linux-3.8.y: (100 commits)
ARM: OMAP: Display: Fix compile issues
ARM: DTS: OMAP5-uevm: pull-up Palmas MSECURE line
ARM/dts: omap5-sevm: Enable palmas on i2c1 bus
ARM: OMAP2+: omap2plus_defconfig: Enable RTC support
ARM: dts: AM33XX: Enable system power off control in am335x-bone
ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone
rtc: OMAP: Add system pm_power_off to rtc driver
ARM: dts: OMAP2+: Identify GPIO banks that are always powered
ARM: dts: OMAP4: Fix ethernet IRQ for OMAP4 boards
ARM: dts: Add OMAP3430 SDP NOR flash memory binding
ARM: dts: Add NOR flash bindings for OMAP2420 H4
ARM: dts: Update OMAP3430 SDP NAND and ONENAND properties
ARM: dts: OMAP3: Add support for OMAP3430 SDP board
ARM: dts: OMAP3: Add reg and interrupt properties for gpio
ARM: dts: OMAP3+: Correct gpio #interrupts-cells property
ARM: dts: Add OMAP2 gpio bindings
ARM: dts: Add GPMC node for OMAP2, OMAP4 and OMAP5
ARM: dts: OMAP2+: Add SDMA controller bindings and nodes
ARM: dts: OMAP2+: Add PMU nodes
ARM: OMAP2+: Prepare for device-tree PMU support
...
* ti-linux-kernel/ti-linux-3.8.y: (100 commits)
ARM: OMAP: Display: Fix compile issues
ARM: DTS: OMAP5-uevm: pull-up Palmas MSECURE line
ARM/dts: omap5-sevm: Enable palmas on i2c1 bus
ARM: OMAP2+: omap2plus_defconfig: Enable RTC support
ARM: dts: AM33XX: Enable system power off control in am335x-bone
ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone
rtc: OMAP: Add system pm_power_off to rtc driver
ARM: dts: OMAP2+: Identify GPIO banks that are always powered
ARM: dts: OMAP4: Fix ethernet IRQ for OMAP4 boards
ARM: dts: Add OMAP3430 SDP NOR flash memory binding
ARM: dts: Add NOR flash bindings for OMAP2420 H4
ARM: dts: Update OMAP3430 SDP NAND and ONENAND properties
ARM: dts: OMAP3: Add support for OMAP3430 SDP board
ARM: dts: OMAP3: Add reg and interrupt properties for gpio
ARM: dts: OMAP3+: Correct gpio #interrupts-cells property
ARM: dts: Add OMAP2 gpio bindings
ARM: dts: Add GPMC node for OMAP2, OMAP4 and OMAP5
ARM: dts: OMAP2+: Add SDMA controller bindings and nodes
ARM: dts: OMAP2+: Add PMU nodes
ARM: OMAP2+: Prepare for device-tree PMU support
...
usb: dwc3: set 'mode' based on selected Kconfig choices
Now that machines may select dwc3's working mode (HOST only,
GADGET only or DUAL_ROLE) via Kconfig, let's set dwc3's mode
based on that, rather than fixing it to whatever hardware
says.
This way we can skip initializing Gadget/Host in case
we are using Host-only/Gadget-only mode respectively.
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit cd051da2c81c8a86f331b4caa0c135c33d3ea3f6)
Conflicts:
drivers/usb/dwc3/core.c
Now that machines may select dwc3's working mode (HOST only,
GADGET only or DUAL_ROLE) via Kconfig, let's set dwc3's mode
based on that, rather than fixing it to whatever hardware
says.
This way we can skip initializing Gadget/Host in case
we are using Host-only/Gadget-only mode respectively.
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit cd051da2c81c8a86f331b4caa0c135c33d3ea3f6)
Conflicts:
drivers/usb/dwc3/core.c
usb: dwc3: remove dwc3 dependency on host AND gadget.
DWC3 controller curretly depends on USB && USB_GADGET.
Some hardware may like to use only host feature on dwc3,
or only gadget feature.
So, removing this dependency of USB_DWC3 on USB and USB_GADGET.
Adding the mode of operaiton of DWC3 also here
HOST/GADGET/DUAL_ROLE based on which features are enabled.
[ balbi@ti.com :
. make sure we have default modes for all possible Kernel
configurations.
. Remove the config -> menuconfig change as it's unnecessary
. switch over to IS_ENABLED() ]
CC: Doug Anderson <dianders@chromium.org>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 388e5c51135f817f01177c42261f1116a6d7f2ad)
DWC3 controller curretly depends on USB && USB_GADGET.
Some hardware may like to use only host feature on dwc3,
or only gadget feature.
So, removing this dependency of USB_DWC3 on USB and USB_GADGET.
Adding the mode of operaiton of DWC3 also here
HOST/GADGET/DUAL_ROLE based on which features are enabled.
[ balbi@ti.com :
. make sure we have default modes for all possible Kernel
configurations.
. Remove the config -> menuconfig change as it's unnecessary
. switch over to IS_ENABLED() ]
CC: Doug Anderson <dianders@chromium.org>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 388e5c51135f817f01177c42261f1116a6d7f2ad)
Merge branch 'connectivity-linux-3.8.y-host-mode' of git://gitorious.org/linux-usb/linux-usb into connectivity-linux-3.8.y
* 'connectivity-linux-3.8.y-host-mode' of git://gitorious.org/linux-usb/linux-usb:
drivers: usb: otg: palmas: enable VBUS on ID connect interrupt
drivers: regulator: palmas: add an API to set/clear the switch bit on SMPS10
* 'connectivity-linux-3.8.y-host-mode' of git://gitorious.org/linux-usb/linux-usb:
drivers: usb: otg: palmas: enable VBUS on ID connect interrupt
drivers: regulator: palmas: add an API to set/clear the switch bit on SMPS10
drivers: usb: otg: palmas: enable VBUS on ID connect interrupt
When OMAP has to act in host mode, it has to supply VBUS to the
connected device. So on detection of ID interrupt, set the switch bit in
SMPS10 regulator for supplying VBUS and on disconnect clear the switch
bit.
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
When OMAP has to act in host mode, it has to supply VBUS to the
connected device. So on detection of ID interrupt, set the switch bit in
SMPS10 regulator for supplying VBUS and on disconnect clear the switch
bit.
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers: regulator: palmas: add an API to set/clear the switch bit on SMPS10
Added an API to set/clear the switch bit on SMPS10 which can be used by
palmas usb. The switch bit should be set in order for palmas to
supply VBUS and is needed when OMAP is acting as USB HOST.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Added an API to set/clear the switch bit on SMPS10 which can be used by
palmas usb. The switch bit should be set in order for palmas to
supply VBUS and is needed when OMAP is acting as USB HOST.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Merge branch 'omap5_audio_video-3.8.y' of git://gitorious.ti.com/~a0393947/ti-linux-kernel/audio-video-linux-feature-tree into ti-linux-3.8.y
TI-Feature: omap5_audio_video_base
TI-Tree: git://gitorious.ti.com/~a0393947/ti-linux-kernel/audio-video-linux-feature-tree
TI-Branch: omap5_audio_video-3.8.y
* 'omap5_audio_video-3.8.y' of git://gitorious.ti.com/~a0393947/ti-linux-kernel/audio-video-linux-feature-tree:
ARM: OMAP: Display: Fix compile issues
ASoC: omap-abe-core: Call driver_deffered_probe_trigger only if built in
ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module
Signed-off-by: Dan Murphy <dmurphy@ti.com>
TI-Feature: omap5_audio_video_base
TI-Tree: git://gitorious.ti.com/~a0393947/ti-linux-kernel/audio-video-linux-feature-tree
TI-Branch: omap5_audio_video-3.8.y
* 'omap5_audio_video-3.8.y' of git://gitorious.ti.com/~a0393947/ti-linux-kernel/audio-video-linux-feature-tree:
ARM: OMAP: Display: Fix compile issues
ASoC: omap-abe-core: Call driver_deffered_probe_trigger only if built in
ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Merge branch 'pm-linux-3.8.y' of git://git.ti.com/~kristo/ti-linux-kernel/pm-linux-feature-tree into ti-linux-3.8.y
TI-Feature: power_management
TI-Tree: git://git.ti.com/~kristo/ti-linux-kernel/pm-linux-feature-tree.git
TI-Branch: pm-linux-3.8.y
* 'pm-linux-3.8.y' of git://git.ti.com/~kristo/ti-linux-kernel/pm-linux-feature-tree:
ARM: DTS: OMAP5-uevm: pull-up Palmas MSECURE line
ARM/dts: omap5-sevm: Enable palmas on i2c1 bus
Conflicts:
arch/arm/boot/dts/omap5-sevm.dts
arch/arm/boot/dts/omap5-uevm.dts
Signed-off-by: Dan Murphy <dmurphy@ti.com>
TI-Feature: power_management
TI-Tree: git://git.ti.com/~kristo/ti-linux-kernel/pm-linux-feature-tree.git
TI-Branch: pm-linux-3.8.y
* 'pm-linux-3.8.y' of git://git.ti.com/~kristo/ti-linux-kernel/pm-linux-feature-tree:
ARM: DTS: OMAP5-uevm: pull-up Palmas MSECURE line
ARM/dts: omap5-sevm: Enable palmas on i2c1 bus
Conflicts:
arch/arm/boot/dts/omap5-sevm.dts
arch/arm/boot/dts/omap5-uevm.dts
Signed-off-by: Dan Murphy <dmurphy@ti.com>
usb: dwc3: gadget: free trb pool only from epnum 2
we never allocate a TRB pool for physical endpoints
0 and 1 so trying to free it (a invalid TRB pool pointer)
will lead us in a warning while removing dwc3.ko module.
In order to fix the situation, all we have to do is skip
dwc3_free_trb_pool() for physical endpoints 0 and 1 just
as we while deleting endpoints from the endpoints list.
[ balbi@ti.com : fix a possible memory leak, improve
commit log ]
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
we never allocate a TRB pool for physical endpoints
0 and 1 so trying to free it (a invalid TRB pool pointer)
will lead us in a warning while removing dwc3.ko module.
In order to fix the situation, all we have to do is skip
dwc3_free_trb_pool() for physical endpoints 0 and 1 just
as we while deleting endpoints from the endpoints list.
[ balbi@ti.com : fix a possible memory leak, improve
commit log ]
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agoMerge branch 'platform-base-3.8.y' of git://gitorious.ti.com/~rrnayak/ti-linux-kernel...
Merge branch 'platform-base-3.8.y' of git://gitorious.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree into ti-linux-3.8.y
TI-Feature: platform_base
TI-Tree: git://gitorious.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree
TI-Branch: platform-base-3.8.y
* 'platform-base-3.8.y' of git://gitorious.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree:
ARM: OMAP2+: omap2plus_defconfig: Enable RTC support
ARM: dts: AM33XX: Enable system power off control in am335x-bone
ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone
rtc: OMAP: Add system pm_power_off to rtc driver
ARM: dts: OMAP2+: Identify GPIO banks that are always powered
ARM: dts: OMAP4: Fix ethernet IRQ for OMAP4 boards
ARM: dts: Add OMAP3430 SDP NOR flash memory binding
ARM: dts: Add NOR flash bindings for OMAP2420 H4
ARM: dts: Update OMAP3430 SDP NAND and ONENAND properties
ARM: dts: OMAP3: Add support for OMAP3430 SDP board
ARM: dts: OMAP3: Add reg and interrupt properties for gpio
ARM: dts: OMAP3+: Correct gpio #interrupts-cells property
ARM: dts: Add OMAP2 gpio bindings
ARM: dts: Add GPMC node for OMAP2, OMAP4 and OMAP5
ARM: dts: OMAP2+: Add SDMA controller bindings and nodes
ARM: dts: OMAP2+: Add PMU nodes
ARM: OMAP2+: Prepare for device-tree PMU support
ARM: dts: OMAP3: reduce GPMC mapped registers address space
ARM: dts: OMAP3: Add GPMC controller
Conflicts:
arch/arm/boot/dts/omap3.dtsi
arch/arm/boot/dts/omap4.dtsi
Signed-off-by: Dan Murphy <dmurphy@ti.com>
TI-Feature: platform_base
TI-Tree: git://gitorious.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree
TI-Branch: platform-base-3.8.y
* 'platform-base-3.8.y' of git://gitorious.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree:
ARM: OMAP2+: omap2plus_defconfig: Enable RTC support
ARM: dts: AM33XX: Enable system power off control in am335x-bone
ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone
rtc: OMAP: Add system pm_power_off to rtc driver
ARM: dts: OMAP2+: Identify GPIO banks that are always powered
ARM: dts: OMAP4: Fix ethernet IRQ for OMAP4 boards
ARM: dts: Add OMAP3430 SDP NOR flash memory binding
ARM: dts: Add NOR flash bindings for OMAP2420 H4
ARM: dts: Update OMAP3430 SDP NAND and ONENAND properties
ARM: dts: OMAP3: Add support for OMAP3430 SDP board
ARM: dts: OMAP3: Add reg and interrupt properties for gpio
ARM: dts: OMAP3+: Correct gpio #interrupts-cells property
ARM: dts: Add OMAP2 gpio bindings
ARM: dts: Add GPMC node for OMAP2, OMAP4 and OMAP5
ARM: dts: OMAP2+: Add SDMA controller bindings and nodes
ARM: dts: OMAP2+: Add PMU nodes
ARM: OMAP2+: Prepare for device-tree PMU support
ARM: dts: OMAP3: reduce GPMC mapped registers address space
ARM: dts: OMAP3: Add GPMC controller
Conflicts:
arch/arm/boot/dts/omap3.dtsi
arch/arm/boot/dts/omap4.dtsi
Signed-off-by: Dan Murphy <dmurphy@ti.com>
ARM: OMAP: Display: Fix compile issues
Fixed compile issues when DRM is disabled.
Signed-off-by: Andy Gross <andy.gross@ti.com>
Fixed compile issues when DRM is disabled.
Signed-off-by: Andy Gross <andy.gross@ti.com>
ARM: DTS: OMAP5-uevm: pull-up Palmas MSECURE line
Palmas MSECURE line must be pulled up, otherwise some of the PMIC
registers will be read-only. This fixes the problem with RTC
not updating properly.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Tom Rini <trini@ti.com>
Palmas MSECURE line must be pulled up, otherwise some of the PMIC
registers will be read-only. This fixes the problem with RTC
not updating properly.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Tom Rini <trini@ti.com>
ARM/dts: omap5-sevm: Enable palmas on i2c1 bus
Patch adds palmas support for sEvm wakeup boards.
This is needed to enable cpufreq on sEvms.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Andrii.Tseglytskyi <andrii.tseglytskyi@ti.com>
Patch adds palmas support for sEvm wakeup boards.
This is needed to enable cpufreq on sEvms.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Andrii.Tseglytskyi <andrii.tseglytskyi@ti.com>
Merge branch 'platform-base-3.8.y' of https://github.com/hvaibhav/am335x-linux into platform-base-3.8.y
ARM: OMAP2+: omap2plus_defconfig: Enable RTC support
AM33XX family of devices use RTC module, one has to manually enable
this support to use RTC features. So this patch enable RTC driver in
omap2plus_defconfig.
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Reviewed-by: Russ Dill <russ.dill@ti.com>
Acked-by: Russ Dill <russ.dill@ti.com>
AM33XX family of devices use RTC module, one has to manually enable
this support to use RTC features. So this patch enable RTC driver in
omap2plus_defconfig.
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Reviewed-by: Russ Dill <russ.dill@ti.com>
Acked-by: Russ Dill <russ.dill@ti.com>
ARM: dts: AM33XX: Enable system power off control in am335x-bone
Enable system power off control for BeagleBone in am335x-bone.dts file
under rtc node. RTC is the incharge of controlling the system power.
This flag is used by the driver to hook up the pm_power_off system call.
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Reviewed-by: Russ Dill <russ.dill@ti.com>
Acked-by: Russ Dill <russ.dill@ti.com>
Enable system power off control for BeagleBone in am335x-bone.dts file
under rtc node. RTC is the incharge of controlling the system power.
This flag is used by the driver to hook up the pm_power_off system call.
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Reviewed-by: Russ Dill <russ.dill@ti.com>
Acked-by: Russ Dill <russ.dill@ti.com>
ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone
Set ti,pmic-shutdown-controller for BeagleBone in am335x-bone.dts
file, this flag is used by the driver to set tps65217 PMIC status
to OFF when PWR_EN toggle.
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Reviewed-by: Russ Dill <russ.dill@ti.com>
Acked-by: Russ Dill <russ.dill@ti.com>
Set ti,pmic-shutdown-controller for BeagleBone in am335x-bone.dts
file, this flag is used by the driver to set tps65217 PMIC status
to OFF when PWR_EN toggle.
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Reviewed-by: Russ Dill <russ.dill@ti.com>
Acked-by: Russ Dill <russ.dill@ti.com>
rtc: OMAP: Add system pm_power_off to rtc driver
Add system power off control to rtc driver which is the in-charge
of controlling the BeagleBone system power. The power_off routine
can be hooked up to "pm_power_off" system call.
System power off sequence:-
* Set PMIC STATUS_OFF when PMIC_POWER_EN is pulled low
* Enable PMIC_POWER_EN in rtc module
* Set rtc ALARM2 time
* Enable ALARM2 interrupt
Signed-off-by: Colin Foe-Parker <colin.foeparker@logicpd.com>
[anilkumar@ti.com: move poweroff additions to rtc driver]
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Reviewed-by: Russ Dill <russ.dill@ti.com>
Acked-by: Russ Dill <russ.dill@ti.com>
Add system power off control to rtc driver which is the in-charge
of controlling the BeagleBone system power. The power_off routine
can be hooked up to "pm_power_off" system call.
System power off sequence:-
* Set PMIC STATUS_OFF when PMIC_POWER_EN is pulled low
* Enable PMIC_POWER_EN in rtc module
* Set rtc ALARM2 time
* Enable ALARM2 interrupt
Signed-off-by: Colin Foe-Parker <colin.foeparker@logicpd.com>
[anilkumar@ti.com: move poweroff additions to rtc driver]
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Reviewed-by: Russ Dill <russ.dill@ti.com>
Acked-by: Russ Dill <russ.dill@ti.com>
ARM: dts: OMAP2+: Identify GPIO banks that are always powered
Add the "ti,gpio-always-on" property to the appropriate GPIO banks to
indicate which banks are always powered and will never lose logic state.
Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Add the "ti,gpio-always-on" property to the appropriate GPIO banks to
indicate which banks are always powered and will never lose logic state.
Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
ARM: dts: OMAP4: Fix ethernet IRQ for OMAP4 boards
Commit ff5c9059 (ARM: dts: OMAP3+: Correct gpio #interrupts-cells
property) updated the number of interrupt cells required for configuring
gpios as interrupts for other devices (such as ethernet controllers).
This update allowed the interrupt type (edge, level, etc) to be
configured via device-tree (as described in the
Documentation/devicetree/bindings/gpio/gpio-omap.txt).
This broke ethernet support on the OMAP4 SDP board that defines a gpio
as the ethernet IRQ because the interrupt type (level, edge, etc) was
not getting configured correctly. This board use the ks8851 ethernet
chip which has an active low interrupt. Fix this by defining the gpio
interrupt as active-low in the device-tree binding.
Please note that the OMAP4-VAR-SOM also uses the same ethernet
controller and it is expected it will have the same problem. So the
same fix is also applied to this board.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Commit ff5c9059 (ARM: dts: OMAP3+: Correct gpio #interrupts-cells
property) updated the number of interrupt cells required for configuring
gpios as interrupts for other devices (such as ethernet controllers).
This update allowed the interrupt type (edge, level, etc) to be
configured via device-tree (as described in the
Documentation/devicetree/bindings/gpio/gpio-omap.txt).
This broke ethernet support on the OMAP4 SDP board that defines a gpio
as the ethernet IRQ because the interrupt type (level, edge, etc) was
not getting configured correctly. This board use the ks8851 ethernet
chip which has an active low interrupt. Fix this by defining the gpio
interrupt as active-low in the device-tree binding.
Please note that the OMAP4-VAR-SOM also uses the same ethernet
controller and it is expected it will have the same problem. So the
same fix is also applied to this board.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
ARM: dts: Add OMAP3430 SDP NOR flash memory binding
Add device-tree node for the 128MB NOR on the OMAP3430-SDP board.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Add device-tree node for the 128MB NOR on the OMAP3430-SDP board.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
ARM: dts: Add NOR flash bindings for OMAP2420 H4
Add device-tree node for the 64MB NOR on the OMAP2420-H4 board.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Add device-tree node for the 64MB NOR on the OMAP2420-H4 board.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
ARM: dts: Update OMAP3430 SDP NAND and ONENAND properties
The GPMC timing properties for device-tree have been updated by adding
a "-ns" or "-ps" suffix to indicate the units of time the property
represents (as suggested by Rob Herring). Therefore, update the timing
property names for the OMAP3430 SDP NAND and ONENAND devices.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
The GPMC timing properties for device-tree have been updated by adding
a "-ns" or "-ps" suffix to indicate the units of time the property
represents (as suggested by Rob Herring). Therefore, update the timing
property names for the OMAP3430 SDP NAND and ONENAND devices.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
ARM: dts: OMAP3: Add support for OMAP3430 SDP board
Adds basic device-tree support for OMAP3430 SDP board which has 256MB
of RAM, 128MB ONENAND flash, 256MB NAND flash and uses the TWL4030
power management IC.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
Adds basic device-tree support for OMAP3430 SDP board which has 256MB
of RAM, 128MB ONENAND flash, 256MB NAND flash and uses the TWL4030
power management IC.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
ARM: dts: OMAP3: Add reg and interrupt properties for gpio
The OMAP3 gpio bindings are currently missing the reg and interrupt
properties and so add these properties.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
The OMAP3 gpio bindings are currently missing the reg and interrupt
properties and so add these properties.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
ARM: dts: OMAP3+: Correct gpio #interrupts-cells property
The OMAP gpio binding documention [1] states that the #interrupts-cells
property for gpio controllers should be 2. Currently, for OMAP3+ devices
the #interrupt-cells is set to 1. By setting this property to 2, it
allows clients to pass a 2nd parameter indicating the sensitivity (level
or edge) and polarity (high or low) of the interrupt. The OMAP gpio
controllers support these options and so update the #interrupt-cells
property for OMAP3+ devices to 2.
[1] Documentation/devicetree/bindings/gpio/gpio-omap.txt
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
The OMAP gpio binding documention [1] states that the #interrupts-cells
property for gpio controllers should be 2. Currently, for OMAP3+ devices
the #interrupt-cells is set to 1. By setting this property to 2, it
allows clients to pass a 2nd parameter indicating the sensitivity (level
or edge) and polarity (high or low) of the interrupt. The OMAP gpio
controllers support these options and so update the #interrupt-cells
property for OMAP3+ devices to 2.
[1] Documentation/devicetree/bindings/gpio/gpio-omap.txt
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
ARM: dts: Add OMAP2 gpio bindings
Add gpios bindings for OMAP2420 and OMAP2430 devices.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
Add gpios bindings for OMAP2420 and OMAP2430 devices.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
ARM: dts: Add GPMC node for OMAP2, OMAP4 and OMAP5
Add the device-tree node for GPMC on OMAP2, OMAP4 and OMAP5 devices.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
Add the device-tree node for GPMC on OMAP2, OMAP4 and OMAP5 devices.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
ARM: dts: OMAP2+: Add SDMA controller bindings and nodes
Add SDMA controller binding for OMAP2+ devices and populate DMA client
information for SPI and MMC peripheral on OMAP3+ devices. Please note
that OMAP24xx devices do not have SPI and MMC bindings available yet and
so DMA client information is not populated.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
Add SDMA controller binding for OMAP2+ devices and populate DMA client
information for SPI and MMC peripheral on OMAP3+ devices. Please note
that OMAP24xx devices do not have SPI and MMC bindings available yet and
so DMA client information is not populated.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
ARM: dts: OMAP2+: Add PMU nodes
Add PMU nodes for OMAP2, OMAP3 and OMAP4460 devices.
Please note that the node for OMAP4460 has been placed in a separate
header file for OMAP4460, because the node is not compatible with
OMAP4430. The node for OMAP4430 is not included because PMU is not
currently supported on OMAP4430 due to the absence of a cross-trigger
interface driver.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
Add PMU nodes for OMAP2, OMAP3 and OMAP4460 devices.
Please note that the node for OMAP4460 has been placed in a separate
header file for OMAP4460, because the node is not compatible with
OMAP4430. The node for OMAP4430 is not included because PMU is not
currently supported on OMAP4430 due to the absence of a cross-trigger
interface driver.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
ARM: OMAP2+: Prepare for device-tree PMU support
If device-tree is present, then do not create the PMU device from within
the OMAP specific PMU code. This is required to allow device-tree to
create the PMU device from the PMU device-tree node.
PMU is not currently supported for OMAP4430 (due to a dependency on
having a cross-trigger interface driver) and so ensure that this
indicated on boot with or without device-tree.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
If device-tree is present, then do not create the PMU device from within
the OMAP specific PMU code. This is required to allow device-tree to
create the PMU device from the PMU device-tree node.
PMU is not currently supported for OMAP4430 (due to a dependency on
having a cross-trigger interface driver) and so ensure that this
indicated on boot with or without device-tree.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
ARM: dts: OMAP3: reduce GPMC mapped registers address space
Currently the OMAP General-Purpose Memory Controller (GPMC) device
node maps 16 MB of address space for its hardware registers.
This is because the OMAP Technical Reference Manual says that the
GPMC module register address space size is 16 MB. But in practice
the maximum address offset used by a GPMC register is 0x02d0.
So, there is no need to map such a big address space for GPMC regs.
This change was suggested by Jon Hunter [1].
[1]: https://patchwork.kernel.org/patch/2057111/
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Currently the OMAP General-Purpose Memory Controller (GPMC) device
node maps 16 MB of address space for its hardware registers.
This is because the OMAP Technical Reference Manual says that the
GPMC module register address space size is 16 MB. But in practice
the maximum address offset used by a GPMC register is 0x02d0.
So, there is no need to map such a big address space for GPMC regs.
This change was suggested by Jon Hunter [1].
[1]: https://patchwork.kernel.org/patch/2057111/
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
ARM: dts: OMAP3: Add GPMC controller
Add device-tree support for the GPMC controller on the OMAP3.
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Add device-tree support for the GPMC controller on the OMAP3.
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Merge branch 'ti-linux-3.8.y' of git://git.ti.com/ti-linux-kernel/ti-linux-kernel into p-ti-linux-3.8.y
* 'ti-linux-3.8.y' of git://git.ti.com/ti-linux-kernel/ti-linux-kernel: (75 commits)
Linux 3.8.7
Revert "tty/8250_pnp: serial port detection regression since v3.7"
rt2x00: rt2x00pci_regbusy_read() - only print register access failure once
mwifiex: complete last internal scan
can: gw: use kmem_cache_free() instead of kfree()
NFSv4: Doh! Typo in the fix to nfs41_walk_client_list
vfio-pci: Fix possible integer overflow
r8169: fix auto speed down issue
drm/i915: add quirk to invert brightness on Packard Bell NCL20
drm/i915: add quirk to invert brightness on eMachines e725
drm/i915: add quirk to invert brightness on eMachines G725
ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440
cpufreq: exynos: Get booting freq value in exynos_cpufreq_init
msi-wmi: Fix memory leak
thermal: return an error on failure to register thermal class
Revert "PCI/ACPI: Request _OSC control before scanning PCI root bus"
x86: Fix rebuild with EFI_STUB enabled
drm/i915: Fix build failure
NFSv4/4.1: Fix bugs in nfs4[01]_walk_client_list
NFSv4: Fix a memory leak in nfs4_discover_server_trunking
...
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
* 'ti-linux-3.8.y' of git://git.ti.com/ti-linux-kernel/ti-linux-kernel: (75 commits)
Linux 3.8.7
Revert "tty/8250_pnp: serial port detection regression since v3.7"
rt2x00: rt2x00pci_regbusy_read() - only print register access failure once
mwifiex: complete last internal scan
can: gw: use kmem_cache_free() instead of kfree()
NFSv4: Doh! Typo in the fix to nfs41_walk_client_list
vfio-pci: Fix possible integer overflow
r8169: fix auto speed down issue
drm/i915: add quirk to invert brightness on Packard Bell NCL20
drm/i915: add quirk to invert brightness on eMachines e725
drm/i915: add quirk to invert brightness on eMachines G725
ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440
cpufreq: exynos: Get booting freq value in exynos_cpufreq_init
msi-wmi: Fix memory leak
thermal: return an error on failure to register thermal class
Revert "PCI/ACPI: Request _OSC control before scanning PCI root bus"
x86: Fix rebuild with EFI_STUB enabled
drm/i915: Fix build failure
NFSv4/4.1: Fix bugs in nfs4[01]_walk_client_list
NFSv4: Fix a memory leak in nfs4_discover_server_trunking
...
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Revert "arm: OMAP2+: defconfig: reconfigure according to savedefconfig"
This reverts commit 1465f7429fd1114b65824eb55ac9e838771f9f55.
Equivalent correct fix has to be submitted on top of ti-linux-3.8.y
to avoid dependency merge issues.
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
This reverts commit 1465f7429fd1114b65824eb55ac9e838771f9f55.
Equivalent correct fix has to be submitted on top of ti-linux-3.8.y
to avoid dependency merge issues.
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Merge branch 'linux-3.8.y' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into ti-linux-3.8.y
* 'linux-3.8.y' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (66 commits)
Linux 3.8.7
Revert "tty/8250_pnp: serial port detection regression since v3.7"
rt2x00: rt2x00pci_regbusy_read() - only print register access failure once
mwifiex: complete last internal scan
can: gw: use kmem_cache_free() instead of kfree()
NFSv4: Doh! Typo in the fix to nfs41_walk_client_list
vfio-pci: Fix possible integer overflow
r8169: fix auto speed down issue
drm/i915: add quirk to invert brightness on Packard Bell NCL20
drm/i915: add quirk to invert brightness on eMachines e725
drm/i915: add quirk to invert brightness on eMachines G725
ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440
cpufreq: exynos: Get booting freq value in exynos_cpufreq_init
msi-wmi: Fix memory leak
thermal: return an error on failure to register thermal class
Revert "PCI/ACPI: Request _OSC control before scanning PCI root bus"
x86: Fix rebuild with EFI_STUB enabled
drm/i915: Fix build failure
NFSv4/4.1: Fix bugs in nfs4[01]_walk_client_list
NFSv4: Fix a memory leak in nfs4_discover_server_trunking
...
Signed-off-by: Dan Murphy <dmurphy@ti.com>
* 'linux-3.8.y' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (66 commits)
Linux 3.8.7
Revert "tty/8250_pnp: serial port detection regression since v3.7"
rt2x00: rt2x00pci_regbusy_read() - only print register access failure once
mwifiex: complete last internal scan
can: gw: use kmem_cache_free() instead of kfree()
NFSv4: Doh! Typo in the fix to nfs41_walk_client_list
vfio-pci: Fix possible integer overflow
r8169: fix auto speed down issue
drm/i915: add quirk to invert brightness on Packard Bell NCL20
drm/i915: add quirk to invert brightness on eMachines e725
drm/i915: add quirk to invert brightness on eMachines G725
ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440
cpufreq: exynos: Get booting freq value in exynos_cpufreq_init
msi-wmi: Fix memory leak
thermal: return an error on failure to register thermal class
Revert "PCI/ACPI: Request _OSC control before scanning PCI root bus"
x86: Fix rebuild with EFI_STUB enabled
drm/i915: Fix build failure
NFSv4/4.1: Fix bugs in nfs4[01]_walk_client_list
NFSv4: Fix a memory leak in nfs4_discover_server_trunking
...
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Linux 3.8.7
Revert "tty/8250_pnp: serial port detection regression since v3.7"
commit c12f9ea28e9fbe7b1f4cefc953bee33298370683 upstream.
This reverts commit 77e372a3d82e5e4878ce1962207edd766773cc76.
Checking for disabled resources board breaks detection pnp on another
board "AMI UEFI implementation (Version: 0406 Release Date: 06/06/2012)".
I'm working with the reporter of the original bug to write and test
a better fix.
https://bugzilla.redhat.com/show_bug.cgi?id=928246
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit c12f9ea28e9fbe7b1f4cefc953bee33298370683 upstream.
This reverts commit 77e372a3d82e5e4878ce1962207edd766773cc76.
Checking for disabled resources board breaks detection pnp on another
board "AMI UEFI implementation (Version: 0406 Release Date: 06/06/2012)".
I'm working with the reporter of the original bug to write and test
a better fix.
https://bugzilla.redhat.com/show_bug.cgi?id=928246
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rt2x00: rt2x00pci_regbusy_read() - only print register access failure once
commit 83589b30f1e1dc9898986293c9336b8ce1705dec upstream.
BugLink: http://bugs.launchpad.net/bugs/1128840
It appears that when this register read fails it never recovers, so
I think there is no need to repeat the same error message ad infinitum.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Cc: users@rt2x00.serialmonkey.com
Cc: netdev@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 83589b30f1e1dc9898986293c9336b8ce1705dec upstream.
BugLink: http://bugs.launchpad.net/bugs/1128840
It appears that when this register read fails it never recovers, so
I think there is no need to repeat the same error message ad infinitum.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Cc: users@rt2x00.serialmonkey.com
Cc: netdev@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mwifiex: complete last internal scan
commit 21de979ecfc7b7f9442f8aea9a54b3ab670d0151 upstream.
We are waiting on first scan command of internal scan request
before association, so we should complete on last internal scan
command response.
Tested-by: Daniel Drake <dsd@laptop.org>
Tested-by: Marco Cesarano <marco@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 21de979ecfc7b7f9442f8aea9a54b3ab670d0151 upstream.
We are waiting on first scan command of internal scan request
before association, so we should complete on last internal scan
command response.
Tested-by: Daniel Drake <dsd@laptop.org>
Tested-by: Marco Cesarano <marco@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
can: gw: use kmem_cache_free() instead of kfree()
commit 3480a2125923e4b7a56d79efc76743089bf273fc upstream.
Memory allocated by kmem_cache_alloc() should be freed using
kmem_cache_free(), not kfree().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 3480a2125923e4b7a56d79efc76743089bf273fc upstream.
Memory allocated by kmem_cache_alloc() should be freed using
kmem_cache_free(), not kfree().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NFSv4: Doh! Typo in the fix to nfs41_walk_client_list
commit eb04e0ac198cec3bab407ad220438dfa65c19c67 upstream.
Make sure that we set the status to 0 on success. Missed in testing
because it never appears when doing multiple mounts to _different_
servers.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit eb04e0ac198cec3bab407ad220438dfa65c19c67 upstream.
Make sure that we set the status to 0 on success. Missed in testing
because it never appears when doing multiple mounts to _different_
servers.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
vfio-pci: Fix possible integer overflow
commit 904c680c7bf016a8619a045850937427f8d7368c upstream.
The VFIO_DEVICE_SET_IRQS ioctl takes a start and count parameter, both
of which are unsigned. We attempt to bounds check these, but fail to
account for the case where start is a very large number, allowing
start + count to wrap back into the valid range. Bounds check both
start and start + count.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 904c680c7bf016a8619a045850937427f8d7368c upstream.
The VFIO_DEVICE_SET_IRQS ioctl takes a start and count parameter, both
of which are unsigned. We attempt to bounds check these, but fail to
account for the case where start is a very large number, allowing
start + count to wrap back into the valid range. Bounds check both
start and start + count.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
r8169: fix auto speed down issue
commit e2409d83434d77874b461b78af6a19cd6e6a1280 upstream.
It would cause no link after suspending or shutdowning when the
nic changes the speed to 10M and connects to a link partner which
forces the speed to 100M.
Check the link partner ability to determine which speed to set.
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit e2409d83434d77874b461b78af6a19cd6e6a1280 upstream.
It would cause no link after suspending or shutdowning when the
nic changes the speed to 10M and connects to a link partner which
forces the speed to 100M.
Check the link partner ability to determine which speed to set.
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drm/i915: add quirk to invert brightness on Packard Bell NCL20
commit 5559ecadad5a73b27f863e92f4b4f369501dce6f upstream.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44156
Reported-by: Alan Zimmerman <alan.zimm@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 5559ecadad5a73b27f863e92f4b4f369501dce6f upstream.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44156
Reported-by: Alan Zimmerman <alan.zimm@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drm/i915: add quirk to invert brightness on eMachines e725
commit 01e3a8feb40e54b962a20fa7eb595c5efef5e109 upstream.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=31522#c35
[Note: There are more than one broken setups in the bug. This fixes one.]
Reported-by: Martins <andrissr@inbox.lv>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 01e3a8feb40e54b962a20fa7eb595c5efef5e109 upstream.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=31522#c35
[Note: There are more than one broken setups in the bug. This fixes one.]
Reported-by: Martins <andrissr@inbox.lv>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drm/i915: add quirk to invert brightness on eMachines G725
commit 1ffff60320879830e469e26062c18f75236822ba upstream.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59628
Reported-by: Roland Gruber <post@rolandgruber.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 1ffff60320879830e469e26062c18f75236822ba upstream.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59628
Reported-by: Roland Gruber <post@rolandgruber.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440
commit 60db7e5f9c9a25a7a9b01007e6e3f5a93bc16a3a upstream.
The soft-reset control register is located in the XMU controller space.
Map this controller space before writing to the soft-reset controller
register.
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Girish K S <ks.giri@samsung.com>
Signed-off-by: Kukjin <kgene.kim@samsung.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 60db7e5f9c9a25a7a9b01007e6e3f5a93bc16a3a upstream.
The soft-reset control register is located in the XMU controller space.
Map this controller space before writing to the soft-reset controller
register.
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Girish K S <ks.giri@samsung.com>
Signed-off-by: Kukjin <kgene.kim@samsung.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cpufreq: exynos: Get booting freq value in exynos_cpufreq_init
commit 6e45eb12fd1c741d556bf264ee98853b5f3104e5 upstream.
Boot_freq is for saving booting freq. But exynos_cpufreq_cpu_init
is called in hotplug. If boot_freq is existed in exynos_cpufreq_cpu_init,
boot_freq could be changed.
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 6e45eb12fd1c741d556bf264ee98853b5f3104e5 upstream.
Boot_freq is for saving booting freq. But exynos_cpufreq_cpu_init
is called in hotplug. If boot_freq is existed in exynos_cpufreq_cpu_init,
boot_freq could be changed.
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
msi-wmi: Fix memory leak
commit 51c94491c82c3d9029f6e87a1a153db321d88e35 upstream.
Fix memory leak - don't forget to kfree ACPI object when returning from
msi_wmi_notify() after suppressing key event.
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Acked-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 51c94491c82c3d9029f6e87a1a153db321d88e35 upstream.
Fix memory leak - don't forget to kfree ACPI object when returning from
msi_wmi_notify() after suppressing key event.
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Acked-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
thermal: return an error on failure to register thermal class
commit da28d966f6aa942ae836d09729f76a1647932309 upstream.
The return code from the registration of the thermal class is used to
unallocate resources, but this failure isn't passed back to the caller of
thermal_init. Return this failure back to the caller.
This bug was introduced in changeset 4cb18728 which overwrote the return code
when the variable was re-used to catch the return code of the registration of
the genetlink thermal socket family.
Signed-off-by: Richard Guy Briggs <rbriggs@redhat.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Cc: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit da28d966f6aa942ae836d09729f76a1647932309 upstream.
The return code from the registration of the thermal class is used to
unallocate resources, but this failure isn't passed back to the caller of
thermal_init. Return this failure back to the caller.
This bug was introduced in changeset 4cb18728 which overwrote the return code
when the variable was re-used to catch the return code of the registration of
the genetlink thermal socket family.
Signed-off-by: Richard Guy Briggs <rbriggs@redhat.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Cc: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>