Re: [PATCH v5 3/3] leds/powernv: Add driver for PowerNV platform

2015-07-15 Thread Vasant Hegde
On 07/14/2015 02:30 PM, Jacek Anaszewski wrote: > Hi Vasant, Jacek, > > Thanks for the update. I think that we have still room > for improvements, please look at my comments below. Thanks for the detailed review. .../... >> @@ -0,0 +1,24 @@ >> +Device Tree binding for LEDs on IBM Power Syste

Re: BUG: sleeping function called from ras_epow_interrupt context

2015-07-15 Thread Thomas Huth
On 07/15/2015 09:58 PM, Nathan Fontenot wrote: > On 07/15/2015 09:35 AM, Thomas Huth wrote: >> On 07/14/2015 11:22 PM, Benjamin Herrenschmidt wrote: >>> On Tue, 2015-07-14 at 20:43 +0200, Thomas Huth wrote: Any suggestions how to fix this? Simply revert 587f83e8dd50d? Use mdelay() instead

Re: [2/2] powerpc/signal: Add helper function to fetch quad word aligned pointer

2015-07-15 Thread Michael Ellerman
On Mon, 2015-06-07 at 10:25:34 UTC, Anshuman Khandual wrote: > This patch adds one helper function 'vmx_reserve_addr' which computes > quad word aligned pointer for vmx_reserve array element in sigcontext > structure making the code more readable. > > Signed-off-by: Anshuman Khandual > --- > arc

Re: [RFC v4 17/25] powerpc, fbdev: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2015-07-15 Thread Finn Thain
On Wed, 15 Jul 2015, I wrote: > On Tue, 14 Jul 2015, Benjamin Herrenschmidt wrote: > > > Maybe we should have a dedicated accessor for "mac_xpram" ... > > ... I can see how to implement XPRAM for matroxfb and imsttfb I'll have to retract that. The video mode and color mode settings used by t

Re: [PATCH v4 0/6] powernv: cpufreq: Report frequency throttle by OCC

2015-07-15 Thread Viresh Kumar
On 13-07-15, 19:39, Shilpasri G Bhat wrote: > This patchset intends to add frequency throttle reporting mechanism > to powernv-cpufreq driver when OCC throttles the frequency. OCC is an > On-Chip-Controller which takes care of the power and thermal safety of > the chip. The CPU frequency can be thr

Re: [patch 00/20] powerpc: Interrupt cleanups and API change preparation

2015-07-15 Thread Michael Ellerman
On Mon, 2015-07-13 at 20:50 +, Thomas Gleixner wrote: > The following patch series contains the following changes: > > - Consolidation of chained interrupt handler setup/removal > > - Switch to functions which avoid a redundant interrupt > descriptor lookup > > - Preparatio

Re: [PATCH net-next] ibmveth: add support for TSO6

2015-07-15 Thread David Miller
From: Thomas Falcon Date: Tue, 14 Jul 2015 10:51:51 -0500 > This patch adds support for a new method of signalling the firmware > that TSO packets are being sent. The new method removes the need to > alter the ip and tcp checksums and allows TSO6 support. > > Signed-off-by: Thomas Falcon Appli

Re: [3/3] IRQ: Print "unexpected IRQ" messages consistently across architectures

2015-07-15 Thread Michael Ellerman
On Mon, 2015-07-13 at 13:35 -0500, Bjorn Helgaas wrote: > On Sun, Jul 12, 2015 at 10:23 PM, Michael Ellerman > wrote: > > On Sun, 2015-12-07 at 22:02:11 UTC, Bjorn Helgaas wrote: > >> Many architectures use a variant of "unexpected IRQ trap at vector %x" to > >> log unexpected IRQs. This is conf

Re: [RESEND,v3] powerpc/pseries: Limit EPOW reset event warnings

2015-07-15 Thread Michael Ellerman
On Wed, 2015-15-07 at 04:22:06 UTC, Kamalesh Babulal wrote: > Kernel prints respective warnings about various EPOW events for > user information/action after parsing EPOW interrupts.Prompting > user to take action depending upon the severity of the event. > > At times EPOW reset event warning, suc

Re: [RFC PATCH 11/12] selftests/seccomp: Make seccomp tests work on big endian

2015-07-15 Thread Michael Ellerman
On Wed, 2015-07-15 at 08:16 -0700, Kees Cook wrote: > On Wed, Jul 15, 2015 at 12:37 AM, Michael Ellerman > wrote: > > diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c > > b/tools/testing/selftests/seccomp/seccomp_bpf.c > > index b2374c131340..51adb9afb511 100644 > > --- a/tools/testing

Re: [RFC PATCH 09/12] powerpc/kernel: Add SIG_SYS support for compat tasks

2015-07-15 Thread Michael Ellerman
On Wed, 2015-07-15 at 08:12 -0700, Kees Cook wrote: > On Wed, Jul 15, 2015 at 12:37 AM, Michael Ellerman > wrote: > > diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c > > b/tools/testing/selftests/seccomp/seccomp_bpf.c > > index c5abe7fd7590..b2374c131340 100644 > > --- a/tools/testing

RE: [PATCH v2] powerpc/dts: Add and fix 1588 timer node for eTSEC

2015-07-15 Thread Lu Y . B .
Any comments? Thanks. > -Original Message- > From: Yangbo Lu [mailto:yangbo...@freescale.com] > Sent: Thursday, May 07, 2015 11:29 AM > To: linuxppc-dev@lists.ozlabs.org; linux-ker...@vger.kernel.org; Wood > Scott-B07421 > Cc: Lu Yangbo-B47093 > Subject: [PATCH v2] powerpc/dts: Add and fix

RE: powerpc/corenet: enable eSDHC

2015-07-15 Thread Lu Y . B .
Hi Scott, Now the patch below has been merged on git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git. This issue should have been resolved. Thanks. commit 5fd26c7ecb32082745b0bd33c8e35badd1cb5a91 Author: Ulf Hansson Date: Fri Jun 5 11:40:08 2015 +0200 mmc: sdhci: Restore b

Re: [PATCH 6/6] cputime: Introduce cputime_to_timespec64()/timespec64_to_cputime()

2015-07-15 Thread Baolin Wang
On 15 July 2015 at 19:55, Thomas Gleixner wrote: > On Wed, 15 Jul 2015, Baolin Wang wrote: > >> On 15 July 2015 at 18:31, Thomas Gleixner wrote: >> > On Wed, 15 Jul 2015, Baolin Wang wrote: >> > >> >> The cputime_to_timespec() and timespec_to_cputime() functions are >> >> not year 2038 safe on 32

Re: [RFC PATCH 1/2] powerpc/numa: fix cpu_to_node() usage during boot

2015-07-15 Thread Tejun Heo
Hello, On Wed, Jul 15, 2015 at 03:43:51PM -0700, Nishanth Aravamudan wrote: > Ok, thank you for clarifying! From a correctness perspective, even if > the numbers don't match NUMA nodes, should we expect the grouping to be > split along NUMA topology? Yeap, the groups get formed according to the n

Re: [RFC PATCH 1/2] powerpc/numa: fix cpu_to_node() usage during boot

2015-07-15 Thread Nishanth Aravamudan
On 15.07.2015 [16:35:16 -0400], Tejun Heo wrote: > Hello, > > On Thu, Jul 02, 2015 at 04:02:02PM -0700, Nishanth Aravamudan wrote: > > we currently emit at boot: > > > > [0.00] pcpu-alloc: [0] 0 1 2 3 [0] 4 5 6 7 > > > > After this commit, we correctly emit: > > > > [0.00] pcpu

Re: [RFC,1/2] powerpc/numa: fix cpu_to_node() usage during boot

2015-07-15 Thread Tejun Heo
Hello, On Fri, Jul 10, 2015 at 09:15:47AM -0700, Nishanth Aravamudan wrote: > On 08.07.2015 [16:16:23 -0700], Nishanth Aravamudan wrote: > > On 08.07.2015 [14:00:56 +1000], Michael Ellerman wrote: > > > On Thu, 2015-02-07 at 23:02:02 UTC, Nishanth Aravamudan wrote: > > > > Much like on x86, now th

Re: [RFC PATCH 1/2] powerpc/numa: fix cpu_to_node() usage during boot

2015-07-15 Thread Tejun Heo
Hello, On Thu, Jul 02, 2015 at 04:02:02PM -0700, Nishanth Aravamudan wrote: > we currently emit at boot: > > [0.00] pcpu-alloc: [0] 0 1 2 3 [0] 4 5 6 7 > > After this commit, we correctly emit: > > [0.00] pcpu-alloc: [0] 0 1 2 3 [1] 4 5 6 7 JFYI, the numbers in the brackets a

Re: BUG: sleeping function called from ras_epow_interrupt context

2015-07-15 Thread Nathan Fontenot
On 07/15/2015 09:35 AM, Thomas Huth wrote: > On 07/14/2015 11:22 PM, Benjamin Herrenschmidt wrote: >> On Tue, 2015-07-14 at 20:43 +0200, Thomas Huth wrote: >>> Any suggestions how to fix this? Simply revert 587f83e8dd50d? Use >>> mdelay() instead of msleep() in rtas_busy_delay()? Something more >>>

Re: [PATCH][v2] powerpc/fsl-booke: Add T1040D4RDB/T1042D4RDB board support

2015-07-15 Thread Scott Wood
On Wed, 2015-07-15 at 15:00 +0530, Priyanka Jain wrote: > T1040D4RDB/T1042D4RDB are Freescale Reference Design Board > which can support T1040/T1042 QorIQ Power > Architecture™ processor respectively > > T1040D4RDB/T1042D4RDB board Overview > - > - SERDES Connec

Re: [RFC PATCH 12/12] selftests/seccomp: Add powerpc support

2015-07-15 Thread Kees Cook
On Wed, Jul 15, 2015 at 12:37 AM, Michael Ellerman wrote: > Wire up the syscall number and regs so the tests work on powerpc. > > Signed-off-by: Michael Ellerman Acked-by: Kees Cook -Kees > --- > tools/testing/selftests/seccomp/seccomp_bpf.c | 9 - > 1 file changed, 8 insertions(+),

Re: [RFC PATCH 11/12] selftests/seccomp: Make seccomp tests work on big endian

2015-07-15 Thread Kees Cook
On Wed, Jul 15, 2015 at 12:37 AM, Michael Ellerman wrote: > The seccomp_bpf test uses BPF_LD|BPF_W|BPF_ABS to load 32-bit values > from seccomp_data->args. On big endian machines this will load the high > word of the argument, which is not what the test wants. > > Borrow a hack from samples/seccom

Re: [RFC PATCH 09/12] powerpc/kernel: Add SIG_SYS support for compat tasks

2015-07-15 Thread Kees Cook
On Wed, Jul 15, 2015 at 12:37 AM, Michael Ellerman wrote: > SIG_SYS was added in commit a0727e8ce513 "signal, x86: add SIGSYS info > and make it synchronous." > > Because we use the asm-generic struct siginfo, we got support for > SIG_SYS for free as part of that commit. > > However there was no c

Re: BUG: sleeping function called from ras_epow_interrupt context

2015-07-15 Thread Thomas Huth
On 07/14/2015 11:22 PM, Benjamin Herrenschmidt wrote: > On Tue, 2015-07-14 at 20:43 +0200, Thomas Huth wrote: >> Any suggestions how to fix this? Simply revert 587f83e8dd50d? Use >> mdelay() instead of msleep() in rtas_busy_delay()? Something more >> fancy? > > A proper fix would be more fancy, th

Re: [PATCH 6/6] nx-842-platform: if NX842 platform drivers are not modules, don't try to load them

2015-07-15 Thread Dan Streetman
On Mon, Jul 6, 2015 at 1:07 PM, Nishanth Aravamudan wrote: > On 06.07.2015 [16:13:07 +0800], Herbert Xu wrote: >> On Thu, Jul 02, 2015 at 03:42:26PM -0700, Nishanth Aravamudan wrote: >> > Based off the CONFIG_SPU_FS_MODULE code, only attempt to load platform >> > modules if the nx-842 pseries/powe

Re: [PATCH 5/6] [RFC] crypto/testmgr: add null test for 842 algorithm

2015-07-15 Thread Dan Streetman
On Mon, Jul 13, 2015 at 8:05 PM, Nishanth Aravamudan wrote: > On 13.07.2015 [17:05:36 -0700], Nishanth Aravamudan wrote: >> On 04.07.2015 [15:24:53 +0800], Herbert Xu wrote: >> > On Thu, Jul 02, 2015 at 03:41:19PM -0700, Nishanth Aravamudan wrote: >> > > Currently, when the nx-842-pseries driver l

Re: [PATCH v2 3/3] sched/preempt: fix cond_resched_lock() and cond_resched_softirq()

2015-07-15 Thread Peter Zijlstra
On Wed, Jul 15, 2015 at 03:52:34PM +0300, Konstantin Khlebnikov wrote: > On 15.07.2015 15:16, Eric Dumazet wrote: > >On Wed, 2015-07-15 at 12:52 +0300, Konstantin Khlebnikov wrote: > >>These functions check should_resched() before unlocking spinlock/bh-enable: > >>preempt_count always non-zero => s

Re: [PATCH v2 3/3] sched/preempt: fix cond_resched_lock() and cond_resched_softirq()

2015-07-15 Thread Konstantin Khlebnikov
On 15.07.2015 15:16, Eric Dumazet wrote: On Wed, 2015-07-15 at 12:52 +0300, Konstantin Khlebnikov wrote: These functions check should_resched() before unlocking spinlock/bh-enable: preempt_count always non-zero => should_resched() always returns false. cond_resched_lock() worked iff spin_needbre

Re: [PATCH v2 3/3] sched/preempt: fix cond_resched_lock() and cond_resched_softirq()

2015-07-15 Thread Eric Dumazet
On Wed, 2015-07-15 at 12:52 +0300, Konstantin Khlebnikov wrote: > These functions check should_resched() before unlocking spinlock/bh-enable: > preempt_count always non-zero => should_resched() always returns false. > cond_resched_lock() worked iff spin_needbreak is set. Interesting, this definite

Re: [PATCH 6/6] cputime: Introduce cputime_to_timespec64()/timespec64_to_cputime()

2015-07-15 Thread Thomas Gleixner
On Wed, 15 Jul 2015, Baolin Wang wrote: > On 15 July 2015 at 18:31, Thomas Gleixner wrote: > > On Wed, 15 Jul 2015, Baolin Wang wrote: > > > >> The cputime_to_timespec() and timespec_to_cputime() functions are > >> not year 2038 safe on 32bit systems due to that the struct timepsec > >> will over

Re: [PATCH 6/6] cputime: Introduce cputime_to_timespec64()/timespec64_to_cputime()

2015-07-15 Thread Baolin Wang
On 15 July 2015 at 18:31, Thomas Gleixner wrote: > On Wed, 15 Jul 2015, Baolin Wang wrote: > >> The cputime_to_timespec() and timespec_to_cputime() functions are >> not year 2038 safe on 32bit systems due to that the struct timepsec >> will overflow in 2038 year. > > And how is this relevant? cput

Re: [PATCH 1/3] panic: Disable crash_kexec_post_notifiers if kdump is not available

2015-07-15 Thread Hidehiro Kawai
(2015/07/15 0:40), Vivek Goyal wrote: > On Tue, Jul 14, 2015 at 03:34:30PM +, dwal...@fifo99.com wrote: >> On Tue, Jul 14, 2015 at 11:02:08AM -0400, Vivek Goyal wrote: >>> On Tue, Jul 14, 2015 at 01:59:19PM +, dwal...@fifo99.com wrote: On Mon, Jul 13, 2015 at 08:19:45PM -0500, Eric W.

Re: [PATCH 6/6] cputime: Introduce cputime_to_timespec64()/timespec64_to_cputime()

2015-07-15 Thread Thomas Gleixner
On Wed, 15 Jul 2015, Baolin Wang wrote: > The cputime_to_timespec() and timespec_to_cputime() functions are > not year 2038 safe on 32bit systems due to that the struct timepsec > will overflow in 2038 year. And how is this relevant? cputime is not based on wall clock time at all. So what has 203

Re: [PATCH v4 3/6] cpufreq: powernv: Register for OCC related opal_message notification

2015-07-15 Thread Shilpasri G Bhat
Hi Joel, On 07/15/2015 11:47 AM, Joel Stanley wrote: > Hello, > > On Mon, 2015-07-13 at 19:39 +0530, Shilpasri G Bhat wrote: >> diff --git a/drivers/cpufreq/powernv-cpufreq.c >> b/drivers/cpufreq/powernv-cpufreq.c >> index d0c18c9..1f59958 100644 >> --- a/drivers/cpufreq/powernv-cpufreq.c >> +++

[PATCH v2 1/3] drivers/xen/preempt: use need_resched() instead of should_resched()

2015-07-15 Thread Konstantin Khlebnikov
This code is used only when CONFIG_PREEMPT=n and only in non-atomic context: xen_in_preemptible_hcall is set only in privcmd_ioctl_hypercall(). Thus preempt_count is zero and should_resched() is equal to need_resched(). Signed-off-by: Konstantin Khlebnikov --- drivers/xen/preempt.c |2 +- 1

[PATCH v2 3/3] sched/preempt: fix cond_resched_lock() and cond_resched_softirq()

2015-07-15 Thread Konstantin Khlebnikov
These functions check should_resched() before unlocking spinlock/bh-enable: preempt_count always non-zero => should_resched() always returns false. cond_resched_lock() worked iff spin_needbreak is set. This patch adds argument "preempt_offset" to should_resched(). preempt_count offset constants f

[PATCH v2 2/3] KVM: PPC: Book3S HV: Use need_resched() instead of should_resched()

2015-07-15 Thread Konstantin Khlebnikov
Function should_resched() is equal to (!preempt_count() && need_resched()). In preemptive kernel preempt_count here is non-zero because of vc->lock. Signed-off-by: Konstantin Khlebnikov --- arch/powerpc/kvm/book3s_hv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/p

[PATCH][v2] powerpc/fsl-booke: Add T1040D4RDB/T1042D4RDB board support

2015-07-15 Thread Priyanka Jain
T1040D4RDB/T1042D4RDB are Freescale Reference Design Board which can support T1040/T1042 QorIQ Power Architecture™ processor respectively T1040D4RDB/T1042D4RDB board Overview - - SERDES Connections, 8 lanes supporting: - PCI - SGMII - SAT

Re: [PATCH] spi: mpc512x-psc: add support for Freescale MPC5125

2015-07-15 Thread Uwe Kleine-König
On Tue, Jul 14, 2015 at 10:54:42AM +0100, Mark Brown wrote: > On Tue, Jul 14, 2015 at 11:19:56AM +0200, Uwe Kleine-König wrote: > > > static const struct of_device_id mpc512x_psc_spi_of_match[] = { > > - { .compatible = "fsl,mpc5121-psc-spi", }, > > + { .compatible = "fsl,mpc5121-psc-spi", .d

[RFC PATCH 12/12] selftests/seccomp: Add powerpc support

2015-07-15 Thread Michael Ellerman
Wire up the syscall number and regs so the tests work on powerpc. Signed-off-by: Michael Ellerman --- tools/testing/selftests/seccomp/seccomp_bpf.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests

[RFC PATCH 11/12] selftests/seccomp: Make seccomp tests work on big endian

2015-07-15 Thread Michael Ellerman
The seccomp_bpf test uses BPF_LD|BPF_W|BPF_ABS to load 32-bit values from seccomp_data->args. On big endian machines this will load the high word of the argument, which is not what the test wants. Borrow a hack from samples/seccomp/bpf-helper.h which changes the offset on big endian to account for

[RFC PATCH 10/12] powerpc/kernel: Enable seccomp filter

2015-07-15 Thread Michael Ellerman
This commit enables seccomp filter on powerpc, now that we have all the necessary pieces in place. To support seccomp's desire to modify the syscall return value under some circumstances, we use a different ABI to the ptrace ABI. That is we use r3 as the syscall return value, and orig_gpr3 is the

[RFC PATCH 09/12] powerpc/kernel: Add SIG_SYS support for compat tasks

2015-07-15 Thread Michael Ellerman
SIG_SYS was added in commit a0727e8ce513 "signal, x86: add SIGSYS info and make it synchronous." Because we use the asm-generic struct siginfo, we got support for SIG_SYS for free as part of that commit. However there was no compat handling added for powerpc. That means we've been advertising the

[RFC PATCH 08/12] powerpc: Change syscall_get_nr() to return int

2015-07-15 Thread Michael Ellerman
The documentation for syscall_get_nr() in asm-generic says: Note this returns int even on 64-bit machines. Only 32 bits of system call number can be meaningful. If the actual arch value is 64 bits, this truncates to 32 bits so 0x means -1. However our implementation was never updated t

[RFC PATCH 07/12] powerpc: Use orig_gpr3 in syscall_get_arguments()

2015-07-15 Thread Michael Ellerman
Currently syscall_get_arguments() is used by syscall tracepoints, and collect_syscall() which is used in some debugging as well as /proc/pid/syscall. The current implementation just copies regs->gpr[3 .. 5] out, which is fine for all the current use cases. When we enable seccomp filter, that will

[RFC PATCH 06/12] powerpc: Rework syscall_get_arguments() so there is only one loop

2015-07-15 Thread Michael Ellerman
Currently syscall_get_arguments() has two loops, one for compat and one for regular tasks. In prepartion for the next patch, which changes which registers we use, switch it to only have one loop, so we only have one place to update. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/sy

[RFC PATCH 05/12] powerpc: Don't negate error in syscall_set_return_value()

2015-07-15 Thread Michael Ellerman
Currently the only caller of syscall_set_return_value() is seccomp filter, which is not enabled on powerpc. This means we have not noticed that our implementation of syscall_set_return_value() negates error, even though the value passed in is already negative. So remove the negation in syscall_se

[RFC PATCH 04/12] powerpc: Drop unused syscall_get_error()

2015-07-15 Thread Michael Ellerman
syscall_get_error() is unused, and never has been. It's also probably wrong, as it negates r3 before returning it, but that depends on what the caller is expecting. It also doesn't deal with compat, and doesn't deal with TIF_NOERROR. Although we could fix those, until it has a caller and it's cl

[RFC PATCH 03/12] powerpc/kernel: Change the do_syscall_trace_enter() API

2015-07-15 Thread Michael Ellerman
The API for calling do_syscall_trace_enter() is currently sensible enough, it just returns the (modified) syscall number. However once we enable seccomp filter it will get more complicated. When seccomp filter runs, the seccomp kernel code (via SECCOMP_RET_ERRNO), or a ptracer (via SECCOMP_RET_TRA

[RFC PATCH 02/12] powerpc/kernel: Switch to using MAX_ERRNO

2015-07-15 Thread Michael Ellerman
Currently on powerpc we have our own #define for the highest (negative) errno value, called _LAST_ERRNO. This is defined to be 516, for reasons which are not clear. The generic code, and x86, use MAX_ERRNO, which is defined to be 4095. In particular seccomp uses MAX_ERRNO to restrict the value th

[RFC PATCH 01/12] powerpc/kernel: Get pt_regs from r9 before calling do_syscall_trace_enter()

2015-07-15 Thread Michael Ellerman
To call do_syscall_trace_enter() we need pt_regs in r3, but we don't need to recalculate it based on r1, it's already in r9. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/entry_64.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/entry_64.S b/

Re: [RESEND PATCH v3] powerpc/pseries: Limit EPOW reset event warnings

2015-07-15 Thread Vipin K Parashar
On 07/15/2015 09:52 AM, Kamalesh Babulal wrote: Kernel prints respective warnings about various EPOW events for user information/action after parsing EPOW interrupts. Prompting user to take action depending upon the severity of the event. Second line probably isn't needed. Also below line can

[PATCH v3 46/46] usb: musb: gadget: add musb_match_ep() function

2015-07-15 Thread Robert Baldyga
Add 'match_ep' callback to utilize chip-specific knowledge in endpoint matching process. Function does the same that was done by chip-specific code inside of epautoconf. Now this code can be removed from there to separate generic code from platform specific logic. Signed-off-by: Robert Baldyga --

[PATCH v3 45/46] usb: gadget: goku_udc: add goku_match_ep() function

2015-07-15 Thread Robert Baldyga
Add 'match_ep' callback to utilize chip-specific knowledge in endpoint matching process. Function does the same that was done by chip-specific code inside of epautoconf. Now this code can be removed from there to separate generic code from platform specific logic. Signed-off-by: Robert Baldyga --

[PATCH v3 44/46] usb: gadget: net2280: add net2280_match_ep() function

2015-07-15 Thread Robert Baldyga
Add 'match_ep' callback to utilize chip-specific knowledge in endpoint matching process. Function does the same that was done by chip-specific code inside of epautoconf. Now this code can be removed from there to separate generic code from platform specific logic. Signed-off-by: Robert Baldyga --

[PATCH v3 43/46] usb: gadget: move find_ep() from epautoconf to gadget.h

2015-07-15 Thread Robert Baldyga
Move find_ep() function to gadget.h, rename it to gadget_find_ep_by_name() and make it static inline. It can be used in UDC drivers, especially in 'match_ep' callback after moving chip-specific endpoint matching logic from epautoconf to UDC drivers. Replace all calls of find_ep() function with gad

[PATCH v3 42/46] usb: gadget: move ep_matches() from epautoconf to udc-core

2015-07-15 Thread Robert Baldyga
Move ep_matches() function to udc-core and rename it to usb_gadget_ep_match_desc(). This function can be used by UDC drivers in 'match_ep' callback to avoid writing lots of repetitive code. Replace all calls of ep_matches() with usb_gadget_ep_match_desc(). Signed-off-by: Robert Baldyga --- driv

[PATCH v3 39/46] usb: gadget: epautoconf: remove ep and desc configuration from ep_matches()

2015-07-15 Thread Robert Baldyga
As function ep_matches() is used to match endpoint with usb descriptor it's highly unintuitive that it modifies endpoint and descriptor structures fields. This patch moves code configuring ep and desc from ep_matches() to usb_ep_autoconfig_ss(), so now function ep_matches() does nothing more than i

[PATCH v3 41/46] usb: gadget: add 'ep_match' callback to usb_gadget_ops

2015-07-15 Thread Robert Baldyga
Add callback that is called by epautoconf to allow UDC driver match the best endpoint for specific descriptor. It's intended to supply mechanism which allows to get rid of chip-specific endpoint matching code from epautoconf. If gadget has set 'ep_match' callback we prefer to call it first, and if

[PATCH v3 40/46] usb: gadget: epautoconf: rework ep_matches() function

2015-07-15 Thread Robert Baldyga
Rework ep_matches() function to make it shorter and more readable. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/epautoconf.c | 87 + 1 file changed, 35 insertions(+), 52 deletions(-) diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadge

[PATCH v3 36/46] usb: gadget: atmel_usba_udc: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/atmel_usba_udc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c index 37d414e..2

[PATCH v3 38/46] usb: gadget: epautoconf: remove pxa quirk from ep_matches()

2015-07-15 Thread Robert Baldyga
The same effect can be achieved by using capabilities flags, so now we can get rid of handling of hardware specific limitations in generic code. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/epautoconf.c | 5 - drivers/usb/gadget/udc/pxa25x_udc.c | 9 +++-- 2 files changed, 3

[PATCH v3 37/46] usb: gadget: epautoconf: add endpoint capabilities flags verification

2015-07-15 Thread Robert Baldyga
Introduce endpoint matching mechanism basing on endpoint capabilities flags. We check if endpoint supports transfer type and direction requested in ep descriptor. Since we have this new endpoint matching mechanism there is no need to have old code guessing endpoint capabilities basing on its name,

[PATCH v3 35/46] usb: renesas: gadget: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/renesas_usbhs/mod_gadget.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index dc2aa32..ed8d890 100

[PATCH v3 32/46] usb: gadget: udc-xilinx: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/udc-xilinx.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c index 1f24274..1cbb0ac 100644 --

[PATCH v3 34/46] usb: musb: gadget: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/musb/musb_gadget.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 625d482f..043248a 100644 --- a/driver

[PATCH v3 33/46] usb: isp1760: udc: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/isp1760/isp1760-udc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/isp1760/isp1760-udc.c b/drivers/usb/isp1760/isp1760-udc.c index 3699962..1c3d0fd 100644 ---

[PATCH v3 31/46] usb: gadget: s3c2410_udc: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/s3c2410_udc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/gadget/udc/s3c2410_udc.c b/drivers/usb/gadget/udc/s3c2410_udc.c index 5d9aa81..eb3571e 100

[PATCH v3 29/46] usb: gadget: r8a66597-udc: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/r8a66597-udc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c index 0293f71..baa0609

[PATCH v3 30/46] usb: gadget: s3c-hsudc: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/s3c-hsudc.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c index 85a712a..e9def42 1006

[PATCH v3 28/46] usb: gadget: pxa27x_udc: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/pxa27x_udc.h | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/usb/gadget/udc/pxa27x_udc.h b/drivers/usb/gadget/udc/px

[PATCH v3 27/46] usb: gadget: pxa25x_udc: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/pxa25x_udc.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c index f

[PATCH v3 26/46] usb: gadget: pch_ud: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/pch_udc.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/pch_udc.c b/drivers/usb/gadget/udc/pch_udc.c index 613547f..cc8f

[PATCH v3 25/46] usb: gadget: omap_udc: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/omap_udc.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c index e2fcdb8..9b7d394

[PATCH v3 24/46] usb: gadget: net2280: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/net2280.c | 50 ++-- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/ne

[PATCH v3 23/46] usb: gadget: net2272: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/net2272.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c index 195baf3..34ec1ec 100644 --- a/dr

[PATCH v3 22/46] usb: gadget: mv_udc_core: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/mv_udc_core.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/drivers/usb/gadget/udc/mv_udc_core.c index d32160d..306a7ff 100644

[PATCH v3 20/46] usb: gadget: m66592-udc: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/m66592-udc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/udc/m66592-udc.c b/drivers/usb/gadget/udc/m66592-udc.c index 309706f..e404553 10064

[PATCH v3 21/46] usb: gadget: mv_u3d_core: add ep capabilities support

2015-07-15 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/mv_u3d_core.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/gadget/udc/mv_u3d_core.c b/drivers/usb/gadget/udc/mv_u3d_core.c index ea35a24..4c48969 100644