platform/kernel/linux-rpi.git
8 years agostaging/lustre: Remove unused LUSTRE_VERSION_ALLOWED_OFFSET define
Oleg Drokin [Wed, 10 Feb 2016 18:00:22 +0000 (13:00 -0500)]
staging/lustre: Remove unused LUSTRE_VERSION_ALLOWED_OFFSET define

LUSTRE_VERSION_ALLOWED_OFFSET is only used on the server to disallow
connection of old userspace clients.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: Update internal client version.
Oleg Drokin [Wed, 10 Feb 2016 18:00:21 +0000 (13:00 -0500)]
staging/lustre: Update internal client version.

While initial code drop was corresponding to 2.3.64, lots of
different changes went in since then, and also quite a bunch of fixes,
but almost none of the new features.
Code-wise we are almost at 2.5.0, so let's call it 2.4.60 - this is a
version that was never reached in the actual pre-2.5 development, so
it should be a clear distinction of where we are now.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: Adjust import state history output format
Oleg Drokin [Wed, 10 Feb 2016 18:00:20 +0000 (13:00 -0500)]
staging/lustre: Adjust import state history output format

New test scripts expect spaces around state names and square brackets
when parsing debugfs output, so add them to avoid false failures.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre/obdecho: Better handle invalid create requests
Oleg Drokin [Wed, 10 Feb 2016 18:00:19 +0000 (13:00 -0500)]
staging/lustre/obdecho: Better handle invalid create requests

When gettng an invalid create request in echo code (wrong group,
or no group at all), just return an error instead of crashing.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre/obdecho: Remove always true condition
Oleg Drokin [Wed, 10 Feb 2016 18:00:18 +0000 (13:00 -0500)]
staging/lustre/obdecho: Remove always true condition

Dan Carpenter noticed that since we already checked for
(oa->o_valid & OBD_MD_FLID) == 0, that means
(oa->o_valid & OBD_MD_FLID) is always true after that so
no point in checking for it.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Modify arguments of sizeof() to pointer variables
Janani Ravichandran [Thu, 11 Feb 2016 03:47:33 +0000 (22:47 -0500)]
staging: lustre: Modify arguments of sizeof() to pointer variables

Take the size of a dereference to a variable rather than the associated
type, to make the code more resistant to type changes in the future.
The type of the pointer variable here is the same as the type in the
argument that is being replaced in sizeof().

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lov_pool: Fixed a return coding style warning.
Rakhi Sharma [Wed, 10 Feb 2016 08:43:47 +0000 (14:13 +0530)]
staging: lustre: lov_pool: Fixed a return coding style warning.

Remove unusefull return at the end of void function.
WARNING: void function return statements are not generally useful.

Signed-off-by: Rakhi Sharma <rakhish1994@gmail.com>
Changes in v3:
  shortened the subject line and make the discription more clear.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre: lnet: Remove explicit NULL comparision
Bhumika Goyal [Tue, 9 Feb 2016 13:12:53 +0000 (18:42 +0530)]
Staging: lustre: lnet: Remove explicit NULL comparision

Replaced explicit NULL comparision with its simplier form.
Found using coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agomisc: panel, convert struct to bitmap
Daniel Chromik [Thu, 11 Feb 2016 12:29:23 +0000 (13:29 +0100)]
misc: panel, convert struct to bitmap

There is an anonymous struct which is actually used as a bitmap. So
convert the struct to a bitmap and change code accordingly where
needed.

This also allows for a cleanup of set_data_bits and set_ctrl_bits as
they can use a common helper now. The helper can also be converted to
a for loop instead of doing bit OR. And given it is a for loop now,
bit masking (using BIT_MSK) is moved from the callers there too.

Signed-off-by: Daniel Chromik <daniel.chromik@seznam.cz>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Acked-by: Willy Tarreau <willy@haproxy.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: iio: Remove parantheses around right hand side of assignment
Janani Ravichandran [Tue, 9 Feb 2016 18:40:28 +0000 (13:40 -0500)]
staging: iio: Remove parantheses around right hand side of assignment

Remove parantheses on the right hand side of assignments as they are not
needed. Coccinelle patch used:
@@
expression a, b, c, d;
@@

(
  a = (c == d)
|
  a =
- (
  b
- )
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: nvec: Remove unneeded comment
Janani Ravichandran [Tue, 9 Feb 2016 19:52:51 +0000 (14:52 -0500)]
staging: nvec: Remove unneeded comment

Remove this comment as it does not have a meaning here.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: goldfish: Change form of NULL comparisons
Janani Ravichandran [Tue, 9 Feb 2016 22:51:03 +0000 (17:51 -0500)]
staging: goldfish: Change form of NULL comparisons

Change null comparisons of the form x == NULL to !x. This was suggested
by checkpatch.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rdma: Use kcalloc instead of kzalloc
Janani Ravichandran [Tue, 9 Feb 2016 22:06:27 +0000 (17:06 -0500)]
staging: rdma: Use kcalloc instead of kzalloc

Use kcalloc rather than kzalloc when multiplied by size to prevent
integer overflows. This change also makes code nicer to read.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rts5208: remove unnecessary parantheses
Haneen Mohammed [Tue, 9 Feb 2016 20:06:40 +0000 (23:06 +0300)]
Staging: rts5208: remove unnecessary parantheses

This patch removes unnecessary parantheses around rtsx->pci->dev.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rts5208: fix check for dma mapping error
Haneen Mohammed [Tue, 9 Feb 2016 20:03:05 +0000 (23:03 +0300)]
Staging: rts5208: fix check for dma mapping error

use dma_mapping_error() instead of comparing the returned address with
zero after dma_map_single().

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging:wlan-ng:Merged two lines into one
Bhumika Goyal [Mon, 8 Feb 2016 19:58:10 +0000 (01:28 +0530)]
Staging:wlan-ng:Merged two lines into one

The last two lines of these functions are compressed into one.
Also removed the variable ret as it is now not used.
Found using coccinelle:
@@
expression e, ret;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: emxx_udc: Alligned to match '('
Anjali Menon [Sat, 16 Jan 2016 10:35:15 +0000 (16:05 +0530)]
staging: emxx_udc: Alligned to match '('

Allignment matched to the open parenthesis to avoid the
check detected by the checkpatch.pl.

CHECK: Alignment should match open parenthesis

Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: r8192U: Fix check pointer after usage problem
Larry Finger [Tue, 5 Jan 2016 02:30:58 +0000 (20:30 -0600)]
staging: r8192U: Fix check pointer after usage problem

In routine rtl8192_tx_isr(), pointer skb is dereferenced before it is
checked for NULL. This patch has only been compile-tested, as I do not
have the hardware. This problem was reported at
https://bugzilla.kernel.org/show_bug.cgi?id=109951.

Fixes: bugzilla.kernel.org: #109951
Reported-by: Yong Shi <brave_shi@163.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Yong Shi <brave_shi@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lusture: obdclass: Remove return statement in void function
Bhaktipriya Shridhar [Thu, 31 Dec 2015 11:44:33 +0000 (17:14 +0530)]
staging: lusture: obdclass: Remove return statement in void function

Fix the following checkpatch.pl warning:
WARNING: void function return statements are not generally useful

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodrivers: staging: xgifb: vgatypes.h: fixed coding style warnings
Saatvik Arya [Wed, 3 Feb 2016 02:27:49 +0000 (07:57 +0530)]
drivers: staging: xgifb: vgatypes.h: fixed coding style warnings

fixed warnings about comment block coding style

Signed-off-by: Saatvik Arya <aryasaatvik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: Don't use multiple blank lines
Benoit Hiller [Sun, 3 Jan 2016 05:27:54 +0000 (00:27 -0500)]
staging: xgifb: Don't use multiple blank lines

Remove multiple blank lines. Problem found using checkpatch.pl
"CHECK: Please don't use multiple blank lines"

Signed-off-by: Benoit Hiller <benoit.hiller@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: mt29f: clean up existing kernel-doc
Manuel Pégourié-Gonnard [Tue, 29 Dec 2015 11:32:21 +0000 (12:32 +0100)]
staging: mt29f: clean up existing kernel-doc

The existing kerneldoc blocs had a few issues:
- some of them didn't start with /**
- some used -- instead of - to separate the short description
- some descriptions had text looking like section headers
- some descriptions started with "to" while some used the imperative: use the
  imperative everywhere
- some had a "with:" at the end of the shortdesc that didn't make sense once
  formatted by kernel-docs
- two argument names where out of sync with the prototype

Signed-off-by: Manuel Pégourié-Gonnard <mpg@elzevir.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: mt29f: fix usage of coma operator
Manuel Pégourié-Gonnard [Tue, 29 Dec 2015 11:32:22 +0000 (12:32 +0100)]
staging: mt29f: fix usage of coma operator

Using the coma operator for multiple assignments is unnecessary and just looks
weird here.

Signed-off-by: Manuel Pégourié-Gonnard <mpg@elzevir.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: mt29f: fix unchecked malloc()
Manuel Pégourié-Gonnard [Tue, 29 Dec 2015 11:32:20 +0000 (12:32 +0100)]
staging: mt29f: fix unchecked malloc()

The pointer is unconditionally dereferenced a few lines later, we need to make
sure it isn't NULL.

Signed-off-by: Manuel Pégourié-Gonnard <mpg@elzevir.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: gdm72xx: Prefer using the BIT macro
Shraddha Barke [Sat, 26 Dec 2015 21:14:45 +0000 (02:44 +0530)]
Staging: gdm72xx: Prefer using the BIT macro

Replace bit shifting on 1 with the BIT(x) macro

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: gdm72xx: Remove multiple blank lines
Shraddha Barke [Sat, 26 Dec 2015 21:14:44 +0000 (02:44 +0530)]
Staging: gdm72xx: Remove multiple blank lines

Remove extra blank line which is not necessary. Warning detected using
checkpatch.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: gdm72xx: Remove space after cast
Shraddha Barke [Sat, 26 Dec 2015 21:14:43 +0000 (02:44 +0530)]
Staging: gdm72xx: Remove space after cast

Fix the checkpatch warning "No space is necessary after cast"

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: gdm72xx: Add appropriate comment for spinlock_t definition
Shraddha Barke [Sat, 26 Dec 2015 21:14:42 +0000 (02:44 +0530)]
Staging: gdm72xx: Add appropriate comment for spinlock_t definition

Fix checkpatch issue: "CHECK: spinlock_t definition without comment".

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: gdm72xx: Add space around that "+", "&" and "|"
Shraddha Barke [Sat, 26 Dec 2015 21:14:40 +0000 (02:44 +0530)]
Staging: gdm72xx: Add space around that "+", "&" and "|"

Add missing spaces around "+", "&" and "|" to follow kernel coding
style. Warning detected by checkpatch.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: gs_fpgaboot: fix data types in gs_fpgaboot.c
Ben Marsh [Mon, 1 Feb 2016 11:13:50 +0000 (12:13 +0100)]
Staging: gs_fpgaboot: fix data types in gs_fpgaboot.c

This is a patch to gs_fpgaboot.c to convert data types to kernel types
as identified by checkpatch.pl.

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: gs_fpgaboot: fix memory allocation in gs_fpgaboot.c
Ben Marsh [Mon, 1 Feb 2016 10:59:52 +0000 (11:59 +0100)]
Staging: gs_fpgaboot: fix memory allocation in gs_fpgaboot.c

This is a patch for gs_fpgaboot.c that fixes a memory allocation problem
identified by checkpatch.pl.

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: clocking-wizard: CHECK:Please use a blank line
SirnamSwetha [Sat, 30 Jan 2016 20:51:52 +0000 (02:21 +0530)]
Staging: clocking-wizard: CHECK:Please use a blank line

This patch fixes the checkpatch.pl issue:

CHECK: Please use a blank line after function/struct/union/enum declarations

Signed-off-by: SirnamSwetha <theonly.ultimate@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: clocking-wizard: Avoid CamelCase
SirnamSwetha [Sat, 30 Jan 2016 20:46:26 +0000 (02:16 +0530)]
Staging: clocking-wizard: Avoid CamelCase

This patch fixes the checkpatch.pl issue:

CHECK: Avoid CamelCase: <WZRD_CLkOUT0_FRAC_EN>

CHECK: Avoid CamelCase: <WZRD_CLkFBOUT_FRAC_EN>

Signed-off-by: SirnamSwetha <theonly.ultimate@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: Removed blank lines
Anjali Menon [Sat, 21 Nov 2015 17:35:17 +0000 (23:05 +0530)]
staging: rts5208: Removed blank lines

Removed multiple blank lines to avoid the check detected
by checkpatch.pl.

CHECK: Please don't use multiple blank lines

Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: Remove unnecessary synchronize_irq() before free_irq()
Lars-Peter Clausen [Sat, 21 Nov 2015 11:20:30 +0000 (12:20 +0100)]
staging: rts5208: Remove unnecessary synchronize_irq() before free_irq()

Calling synchronize_irq() right before free_irq() is quite useless. On one
hand the IRQ can easily fire again before free_irq() is entered, on the
other hand free_irq() itself calls synchronize_irq() internally (in a race
condition free way), before any state associated with the IRQ is freed.

Patch was generated using the following semantic patch:
// <smpl>
@@
expression irq;
@@
-synchronize_irq(irq);
 free_irq(irq, ...);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ste_rmi4: avoid unused function warnings
Arnd Bergmann [Fri, 20 Nov 2015 21:59:14 +0000 (22:59 +0100)]
staging: ste_rmi4: avoid unused function warnings

The rmi4 touchscreen driver encloses the power-management
functions in #ifdef CONFIG_PM, but the smtcfb_pci_suspend/resume
functions are only really used when CONFIG_PM_SLEEP is also
set, as a frequent gcc warning shows:

ste_rmi4/synaptics_i2c_rmi4.c:1050:12: warning: 'synaptics_rmi4_suspend' defined but not used
ste_rmi4/synaptics_i2c_rmi4.c:1084:12: warning: 'synaptics_rmi4_resume' defined but not used

This changes the driver to remove the #ifdef and instead mark
the functions as __maybe_unused, which is a nicer anyway, as it
provides build testing for all the code in all configurations
and is harder to get wrong.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: ste_rmi4: constify synaptics_rmi4_platform_data structures
Julia Lawall [Wed, 30 Dec 2015 10:58:43 +0000 (11:58 +0100)]
Staging: ste_rmi4: constify synaptics_rmi4_platform_data structures

This synaptics_rmi4_platform_data structure is never modified, so declare
it as const.  Others are already const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192e: use to_delayed_work
Geliang Tang [Mon, 28 Dec 2015 15:43:39 +0000 (23:43 +0800)]
staging: rtl8192e: use to_delayed_work

Use to_delayed_work() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192e: Clean unnecessary blank lines
Amadeusz Pawlik [Sat, 19 Dec 2015 15:36:35 +0000 (16:36 +0100)]
staging: rtl8192e: Clean unnecessary blank lines

Fixes a couple of issues detected by checkpatch with regard to blank lines.

Signed-off-by: Amadeusz Pawlik <potrzebye@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192e: remove unnecessary multiple blank lines
Christian Colic [Thu, 3 Dec 2015 12:17:40 +0000 (13:17 +0100)]
staging: rtl8192e: remove unnecessary multiple blank lines

remove multiple blank lines to fix some checkpatch checks

Signed-off-by: Christian Colic <colic.christian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging:rtl8192e: Usage count off by one
Sean MacLennan [Mon, 16 Nov 2015 00:51:43 +0000 (19:51 -0500)]
staging:rtl8192e: Usage count off by one

The rtllib driver is not calling try_module_get() when loading the
encryption modules. Because of this, you can never remove the module
once you have used it one (i.e. bring up the wireless interface).

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Tested-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: nvec: replace led_classdev_register
Hari Prasath Gujulan Elango [Thu, 21 Jan 2016 10:23:46 +0000 (10:23 +0000)]
staging: nvec: replace led_classdev_register

Replace the led_classdev_register() with the platform managed version
devm_led_classdev_register() & henceforth remove the redundant
nvec_paz00_remove() function.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: nvec: fix block comments
Simon Guinot [Wed, 9 Dec 2015 07:14:06 +0000 (08:14 +0100)]
staging: nvec: fix block comments

This patch fixes a couple of checkpatch warnings about block comments.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: board: Blank lines aren't necessary before a close brace
SirnamSwetha [Fri, 29 Jan 2016 23:45:40 +0000 (05:15 +0530)]
Staging: board: Blank lines aren't necessary before a close brace

Fix checkpatch.pl issue

CHECK: Blank lines aren't necessary before a close brace

Signed-off-by: SirnamSwetha <theonly.ultimate@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: board: Fix checkpatch.pl issue
SirnamSwetha [Fri, 29 Jan 2016 23:37:19 +0000 (05:07 +0530)]
Staging: board: Fix checkpatch.pl issue

This patch fixes the checkpatch issue.

CHECK: Please don't use multiple blank lines

Signed-off-by: SirnamSwetha <theonly.ultimate@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: Fix block comments use * on subsequent lines in r8192U_wx.c
Byeoungwook Kim [Mon, 1 Feb 2016 05:35:06 +0000 (14:35 +0900)]
staging: rtl8192u: Fix block comments use * on subsequent lines in r8192U_wx.c

clean up checkpatch warning:
WARNING: Block comments use * on subsequent lines

Signed-off-by: Byeoungwook Kim <quddnr145@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/rtl8192u: fixed typos
Yannik Schmidt [Sat, 2 Jan 2016 15:02:28 +0000 (16:02 +0100)]
staging/rtl8192u: fixed typos

Fixed all checkpatch-warnings concerning typos in r8192U_core.c.

Signed-off-by: Yannik Schmidt <yannik.schmidt@thermoscan.de>
Signed-off-by: Lukas Lehnert <lukas.lehnert@web.de>
CC: linux-kernel@i4.cs.fau.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: use to_delayed_work
Geliang Tang [Mon, 28 Dec 2015 15:43:38 +0000 (23:43 +0800)]
staging: rtl8192u: use to_delayed_work

Use to_delayed_work() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: fix large frame size compiler warning
Okash Khawaja [Thu, 17 Dec 2015 20:30:38 +0000 (20:30 +0000)]
staging: rtl8192u: fix large frame size compiler warning

This patch fixes following compiler warning:

drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c: In function
‘RxReorderIndicatePacket’:
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:758:1: warning: the
frame size of 1064 bytes is larger than 1024 bytes
[-Wframe-larger-than=]

It replaces the statically allocated array prxbIndicateArray with
a kmalloc'd one.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8192u: Fix block comment formatting
Gavin Thomas Claugus [Fri, 11 Dec 2015 02:35:35 +0000 (21:35 -0500)]
Staging: rtl8192u: Fix block comment formatting

Change block comments to comply with checkpatch style
guidelines.

Signed-off-by: Gavin Thomas Claugus <gclaugus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: use list_first_entry_or_null()
Geliang Tang [Mon, 1 Feb 2016 14:47:03 +0000 (22:47 +0800)]
staging: rtl8712: use list_first_entry_or_null()

Use list_first_entry_or_null() instead of list_empty() + LIST_CONTAINOR()
to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8712: rtl8712_cmd: Fixed a warning.
Rakhi Sharma [Fri, 29 Jan 2016 07:07:06 +0000 (12:37 +0530)]
Staging: rtl8712: rtl8712_cmd: Fixed a warning.

Warning:Comparisons should place the constant on the right side of the test
Fixed by placing the comparisions constant on right side of the test.

Signed-off-by: Rakhi Sharma <rakhish1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: memory corruption in wpa_set_encryption()
Dan Carpenter [Sat, 30 Jan 2016 14:41:10 +0000 (17:41 +0300)]
staging: rtl8712: memory corruption in wpa_set_encryption()

->KeyMaterial is declared as a 16 byte array, but we only ever allocate
either 5 or 13 bytes of it.  The problem is that we memset() all 16
bytes to zero so we're memsetting past the end of the allocated memory.

I fixed this in slightly lazy way, by just allocating 16 bytes.  This
works but there is a lot more cleanup you could do to this code if you
wanted.  Which is why this code is in staging.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8712: Remove unnecessary cast on void pointer
Lucas Tanure [Wed, 20 Jan 2016 02:52:13 +0000 (00:52 -0200)]
Staging: rtl8712: Remove unnecessary cast on void pointer

The conversion from void pointer to any other pointer type is guaranteed
by the C programming language.

The semantic patch used to find this:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Lucas Tanure <tanure@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: consolidate kmalloc + memset 0 to kzalloc
Nicholas Mc Guire [Tue, 5 Jan 2016 20:04:13 +0000 (21:04 +0100)]
staging: rtl8712: consolidate kmalloc + memset 0 to kzalloc

This is an API consolidation only. The use of kmalloc + memset to 0
here is equivalent to kzalloc.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Improve suspend/resume functionality.
Hemmo Nieminen [Thu, 3 Dec 2015 22:11:32 +0000 (00:11 +0200)]
staging: rtl8712: Improve suspend/resume functionality.

Cancel pending URBs during suspend operation to avoid receiving ESHUTDOWN
in read/write completion callbacks while the device is suspended.

Receiving ESHUTDOWN in read/write completion callbacks will cause the
driver to enter a non-functioning "stopped" state from which the driver is
unable to recover without reloading the module.

Signed-off-by: Hemmo Nieminen <hemmo.nieminen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Cleanup _io_ops wrappers
Mauro Dreissig [Sun, 22 Nov 2015 22:02:19 +0000 (20:02 -0200)]
staging: rtl8712: Cleanup _io_ops wrappers

This removes ugly and unnecessary declarations.

Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Remove unused CamelCase define
Michael Hornung [Wed, 18 Nov 2015 19:59:17 +0000 (20:59 +0100)]
staging: rtl8712: Remove unused CamelCase define

* Remove unused CamelCase in order to get rid of the corresponding
  checkpatch.pl "CHECK: Avoid CamelCase: <IEEE80211_QoS_DATAGRP>"

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Coding style: Fix alignment
Michael Hornung [Wed, 18 Nov 2015 19:59:16 +0000 (20:59 +0100)]
staging: rtl8712: Coding style: Fix alignment

* Fix alignment which did not match open parenthesis

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Replace FSF mailing address by URL
Michael Hornung [Wed, 18 Nov 2015 19:59:15 +0000 (20:59 +0100)]
staging: rtl8712: Replace FSF mailing address by URL

* Fix checkpatch.pl output about not including the paragraph
  about writing to the Free Software Foundation's mailing address

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Coding style: Fix missing spaces
Michael Hornung [Wed, 18 Nov 2015 19:59:14 +0000 (20:59 +0100)]
staging: rtl8712: Coding style: Fix missing spaces

* Add missing spaces around bitwise OR operation in order to get
  rid of checkpatch.pl's "CHECK: spaces preferred around that '|'"

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Coding style: Make use of BIT macro
Michael Hornung [Wed, 18 Nov 2015 19:59:13 +0000 (20:59 +0100)]
staging: rtl8712: Coding style: Make use of BIT macro

* Replace all occurences of (1<<x) by BIT(x) in order to get rid
  of checkpatch.pl "CHECK" output "Prefer using the BIT macro"

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Coding style: Remove multiple blank lines
Michael Hornung [Wed, 18 Nov 2015 19:59:12 +0000 (20:59 +0100)]
staging: rtl8712: Coding style: Remove multiple blank lines

* Remove multiple blank lines in order to get rid of checkpatch.pl
  "CHECK" output

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: rtl871x_sta_mgt: Remove wrapper function
Amitoj Kaur Chawla [Wed, 4 Nov 2015 21:06:58 +0000 (02:36 +0530)]
staging: rtl8712: rtl871x_sta_mgt: Remove wrapper function

Remove wrapper function mfree_sta_priv_lock() that can be replaced by a
direct call to mfree_all_stainfo().

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8723au: Fixes unnecessary return warning
Bhaktipriya Shridhar [Sat, 30 Jan 2016 05:57:47 +0000 (11:27 +0530)]
staging: rtl8723au: Fixes unnecessary return warning

This patch fixes checkpatch.pl warning in rtw_mlme_ext.c file.
WARNING: void function return statements are not generally useful

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8723au: use %pM and %ph formatting
Daniil Leshchev [Thu, 31 Dec 2015 12:36:42 +0000 (15:36 +0300)]
staging: rtl8723au: use %pM and %ph formatting

use %pM and %ph specifiers instead of placing each byte on stack.
(staging/rtl8723au/TODO)

Signed-off-by: Daniil Leshchev <meleodr@gmail.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8723au: change parameter type in rtl8723a_set_rssi_cmd declaration
Anatoly Stepanov [Thu, 17 Dec 2015 13:47:36 +0000 (16:47 +0300)]
staging: rtl8723au: change parameter type in rtl8723a_set_rssi_cmd declaration

Previosly the function had the following prototype:
int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u8 *param)

My suggestion here is to modify the prototype this way:
int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u32 param)

We can do this based on the following considerations:
1. rtl8723a_set_rssi_cmd is used only with 32-bit "param" values
2. There's no point in using "u8 *param" until we pass param length
3. As we just read "param", it's ok to pass it by value

Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8723au: hal: rtl8723a_hal_init: fixed 4 spelling errors.
Jiading Gai [Wed, 16 Dec 2015 13:24:58 +0000 (08:24 -0500)]
staging: rtl8723au: hal: rtl8723a_hal_init: fixed 4 spelling errors.

Fixed four spelling errors.

Signed-off-by: Jiading Gai <jiading.gai.github@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: fbtft: add ssd1325 controller support
Alexey Mednyy [Wed, 27 Jan 2016 09:04:34 +0000 (12:04 +0300)]
Staging: fbtft: add ssd1325 controller support

That patch adds support for SSD1325 controller.
That is 4bpp grayscale OLED display controller present in several
displays eq: Winstar WEX012864

Signed-off-by: Alexey Mednyy <swexru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: fbtft: add ssd1305 controller support
Alexey Mednyy [Wed, 27 Jan 2016 09:04:23 +0000 (12:04 +0300)]
Staging: fbtft: add ssd1305 controller support

That patch adds support for SSD1305 controller.
That is monochrome OLED display controller present in several
displays eq: Winstar WEX012864

Signed-off-by: Alexey Mednyy <swexru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: use to_platform_device()
Geliang Tang [Sun, 27 Dec 2015 13:15:46 +0000 (21:15 +0800)]
staging: fbtft: use to_platform_device()

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: use to_spi_device
Geliang Tang [Tue, 22 Dec 2015 16:18:43 +0000 (00:18 +0800)]
staging: fbtft: use to_spi_device

Use to_spi_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Remove unused and duplicated defines
Priit Laes [Sun, 20 Dec 2015 18:36:07 +0000 (20:36 +0200)]
staging: fbtft: Remove unused and duplicated defines

This patch makes use of the standard MIPI Display Command Set to remove
some of duplicate defines from the headers.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Use standard MIPI DCS command defines for hx8340bn
Priit Laes [Sun, 20 Dec 2015 18:35:55 +0000 (20:35 +0200)]
staging: fbtft: Use standard MIPI DCS command defines for hx8340bn

This patch makes use of the standard MIPI Display Command Set to remove
some of the magic constants found in source code.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Use standard MIPI DCS command defines for tinylcd
Priit Laes [Sun, 20 Dec 2015 18:36:06 +0000 (20:36 +0200)]
staging: fbtft: Use standard MIPI DCS command defines for tinylcd

This patch makes use of the standard MIPI Display Command Set to remove
some of the magic constants found in source code.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Use standard MIPI DCS command defines for fbtft driver
Priit Laes [Sun, 20 Dec 2015 18:36:05 +0000 (20:36 +0200)]
staging: fbtft: Use standard MIPI DCS command defines for fbtft driver

This patch makes use of the standard MIPI Display Command Set to remove
some of the magic constants found in source code.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Use standard MIPI DCS command defines for st7735r
Priit Laes [Sun, 20 Dec 2015 18:36:04 +0000 (20:36 +0200)]
staging: fbtft: Use standard MIPI DCS command defines for st7735r

This patch makes use of the standard MIPI Display Command Set to remove
some of the magic constants found in source code.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Use standard MIPI DCS command defines for s6d02a1
Priit Laes [Sun, 20 Dec 2015 18:36:03 +0000 (20:36 +0200)]
staging: fbtft: Use standard MIPI DCS command defines for s6d02a1

This patch makes use of the standard MIPI Display Command Set to remove
some of the magic constants found in source code.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Use standard MIPI DCS command defines for ili9486
Priit Laes [Sun, 20 Dec 2015 18:36:02 +0000 (20:36 +0200)]
staging: fbtft: Use standard MIPI DCS command defines for ili9486

This patch makes use of the standard MIPI Display Command Set to remove
some of the magic constants found in source code.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Use standard MIPI DCS command defines for ili9481
Priit Laes [Sun, 20 Dec 2015 18:36:01 +0000 (20:36 +0200)]
staging: fbtft: Use standard MIPI DCS command defines for ili9481

This patch makes use of the standard MIPI Display Command Set to remove
some of the magic constants found in source code.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Use standard MIPI DCS command defines for ili9341
Priit Laes [Sun, 20 Dec 2015 18:36:00 +0000 (20:36 +0200)]
staging: fbtft: Use standard MIPI DCS command defines for ili9341

This patch makes use of the standard MIPI Display Command Set to remove
some of the magic constants found in source code.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Use standard MIPI DCS command defines for ili9340
Priit Laes [Sun, 20 Dec 2015 18:35:59 +0000 (20:35 +0200)]
staging: fbtft: Use standard MIPI DCS command defines for ili9340

This patch makes use of the standard MIPI Display Command Set to remove
some of the magic constants found in source code.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Use standard MIPI DCS command defines for ili9163
Priit Laes [Sun, 20 Dec 2015 18:35:58 +0000 (20:35 +0200)]
staging: fbtft: Use standard MIPI DCS command defines for ili9163

This patch makes use of the standard MIPI Display Command Set to remove
some of the magic constants found in source code.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Use standard MIPI DCS command defines for hx8357d
Priit Laes [Sun, 20 Dec 2015 18:35:57 +0000 (20:35 +0200)]
staging: fbtft: Use standard MIPI DCS command defines for hx8357d

This patch makes use of the standard MIPI Display Command Set to remove
some of the magic constants found in source code.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: Use standard MIPI DCS command defines for hx8353d
Priit Laes [Sun, 20 Dec 2015 18:35:56 +0000 (20:35 +0200)]
staging: fbtft: Use standard MIPI DCS command defines for hx8353d

This patch makes use of the standard MIPI Display Command Set to remove
some of the magic constants found in source code.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: fbtft: Removed commented out/dead code
Ben Gilbert [Mon, 14 Dec 2015 19:32:21 +0000 (19:32 +0000)]
Staging: fbtft: Removed commented out/dead code

Deleted various commented out lines that have been replaced by write_reg()

Signed-off-by: Ben Gilbert <gillie59978@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: fbtft: fbtft-core: Removed unnecessary checks
Nizam Haider [Sun, 22 Nov 2015 04:09:26 +0000 (09:39 +0530)]
Staging: fbtft: fbtft-core: Removed unnecessary checks

The driver core clears the driver data to NULL after device_release
or on probe failure.

Signed-off-by: Nizam Haider <nijamh@cdac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fwserial: (coding-style) rewrite comparisons to NULL as "!fifo->data"
Christian Colic [Tue, 17 Nov 2015 12:56:31 +0000 (13:56 +0100)]
staging: fwserial: (coding-style) rewrite comparisons to NULL as "!fifo->data"

Rewrite multiple comparisons to NULL as "!fifo->data"
to fix the last coding style problems of this file.

Signed-off-by: Christian Colic <colic.christian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodrivers:staging:fwserial Fix No space is necessary after a cast
Bogicevic Sasa [Fri, 13 Nov 2015 13:55:47 +0000 (14:55 +0100)]
drivers:staging:fwserial Fix No space is necessary after a cast

This fixes all "No space is necessary after a cast" messages

Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging:octeon:removed blank line after {
Bhumika Goyal [Tue, 2 Feb 2016 19:38:03 +0000 (01:08 +0530)]
Staging:octeon:removed blank line after {

Removed blank line after curly braces.
Found using checkpatch.pl.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodrivers: staging: octeon-usb: octeon-hcd.c: fixed coding style related warnings
Saatvik Arya [Sun, 3 Jan 2016 17:12:40 +0000 (22:42 +0530)]
drivers: staging: octeon-usb: octeon-hcd.c: fixed coding style related warnings

fixed coding style warnings related to comment blocks

Signed-off-by: Saatvik Arya <aryasaatvik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon: Fix logic for waking octeon ethernet tx queue.
Luuk Paulussen [Tue, 22 Dec 2015 20:51:14 +0000 (09:51 +1300)]
staging: octeon: Fix logic for waking octeon ethernet tx queue.

Only wake tx queue when driver queue is back within bounds.

The logic here was just reenabling the queue when any buffers had been
freed.  the queue was stopped whenever the length exceeded 1000
(MAX_OUT_QUEUE_DEPTH), but then was essentially immediately started again.
On a congested link, the queue length would just keep increasing up to
around 8000 (for average size packets), at which point the hardware would
start refusing the packets and they would begin to be dropped.
This prevented the qdisc layer from effectively managing and prioritising
packets, as essentially all packets were being allowed into the driver
queue and then were being dropped by the hardware.

This change only restarts the queue if the length is less than 1000
(MAX_OUT_QUEUE_DEPTH).

Reviewed-by: Kyeong Yoo <kyeong.yoo@alliedtelesis.co.nz>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Richard Laing <richard.laing@alliedtelesis.co.nz>
Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon-ethernet: fix TCP/UDP checksum calc
Hamish Martin [Mon, 21 Dec 2015 21:23:58 +0000 (10:23 +1300)]
staging: octeon-ethernet: fix TCP/UDP checksum calc

If the network portion of a frame is preceded by more than 14 bytes of
data, the checksum calculated in the HW is done over the wrong data and
is put in the wrong place.
In our use case an Octeon ethernet controller is connected to a Broadcom
switch chip. Extra data is included in the frame prior to egressing the
Octeon ethernet (i.e. 4 bytes of an 802.1Q tag, 4 bytes of a proprietary
BCM tag later stripped by the switch chip). This extra data causes the
checksum calculation to be incorrect.
The fix in this patch is to make use of the network header offset of the
skb. This enables the checksum to be calculated correctly.
This has been tested in both the configuration with the switch chip in
the egress path (as described above) and in a simple connection direct
to the wire.

Reviewed-by: Richard Laing <richard.laing@alliedtelesis.co.nz>
Reviewed-by: Tim Beale <tim.beale@alliedtelesis.co.nz>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: Added MSI support to the MC bus driver
J. German Rivera [Wed, 6 Jan 2016 22:03:29 +0000 (16:03 -0600)]
staging: fsl-mc: Added MSI support to the MC bus driver

Initialize/Cleanup ITS-MSI support for the MC bus driver at driver
init/exit time. Associate an MSI domain with each DPAA2 child device.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: Added DPRC interrupt handler
J. German Rivera [Wed, 6 Jan 2016 22:03:28 +0000 (16:03 -0600)]
staging: fsl-mc: Added DPRC interrupt handler

The interrupt handler for DPRC IRQs is added. DPRC IRQs are
generated for hot plug events related to DPAA2 objects in a given
DPRC. These events include, creating/destroying DPAA2 objects in
the DPRC, changing the "plugged" state of DPAA2 objects and moving
objects between DPRCs.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: Fixed bug in dprc_probe() error path
J. German Rivera [Wed, 6 Jan 2016 22:03:27 +0000 (16:03 -0600)]
staging: fsl-mc: Fixed bug in dprc_probe() error path

Destroy mc_io in error path in dprc_probe() only if the mc_io was
created in this function.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: set MSI domain for DPRC objects
J. German Rivera [Wed, 6 Jan 2016 22:03:26 +0000 (16:03 -0600)]
staging: fsl-mc: set MSI domain for DPRC objects

THE MSI domain associated with a root DPRC object is
obtained form the device tree. Child DPRCs inherit
the parent DPRC MSI domain.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: Populate the IRQ pool for an MC bus instance
J. German Rivera [Wed, 6 Jan 2016 22:03:25 +0000 (16:03 -0600)]
staging: fsl-mc: Populate the IRQ pool for an MC bus instance

Scan the corresponding DPRC container to get total count
of IRQs needed by all its child DPAA2 objects. Then,
preallocate a set of MSI IRQs with the DPRC's ICID
(GIT-ITS device Id) to populate the the DPRC's IRQ pool.
Each child DPAA2 object in the DPRC and the DPRC object itself
will allocate their necessary MSI IRQs from the DPRC's IRQ pool,
in their driver probe function.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: Changed DPRC built-in portal's mc_io to be atomic
J. German Rivera [Wed, 6 Jan 2016 22:03:24 +0000 (16:03 -0600)]
staging: fsl-mc: Changed DPRC built-in portal's mc_io to be atomic

The DPRC built-in portal's mc_io is used to send commands to the MC
to program MSIs for MC objects. This is done by the
fsl_mc_msi_write_msg() callback, which is invoked by the generic MSI
layer with interrupts disabled. As a result, the mc_io used in
fsl_mc_msi_write_msg needs to be an atomic mc_io.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: Extended MC bus allocator to include IRQs
J. German Rivera [Wed, 6 Jan 2016 22:03:23 +0000 (16:03 -0600)]
staging: fsl-mc: Extended MC bus allocator to include IRQs

All the IRQs for DPAA2 objects in the same DPRC must use
the ICID of that DPRC, as their device Id in the GIC-ITS.
Thus, all these IRQs must share the same ITT table in the GIC.
As a result, a pool of IRQs with the same device Id must be
preallocated per DPRC (fsl-mc bus instance). So, the fsl-mc
bus object allocator is extended to also provide services
to allocate IRQs to DPAA2 devices, from their parent fsl-mc bus
IRQ pool.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>