aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging
AgeCommit message (Collapse)AuthorFilesLines
2017-11-02staging: rtl8188eu: Fix bug introduced by convert timers to use timer_setup()Gravatar Hans de Goede 1-1/+1
Commit b7749656e946 ("staging: rtl8188eu: Convert timers to use timer_setup()") introduces a copy and paste error which causes the rtl8188eu driver to no longer function. This commit fixes this. Fixes: b7749656e946 ("staging: rtl8188eu: Convert timers to use timer_setup()") Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02staging: rtl8188eu: Revert part of "staging: rtl8188eu: fix comments with ↵Gravatar Hans de Goede 1-1/+1
lines over 80 characters" Commit 74e1e498e84e ("staging: rtl8188eu: fix comments with lines over 80 characters") not only changed comments but also changed an if check: -if (pmlmepriv->cur_network.join_res != true) { +if (!(pmlmepriv->cur_network.join_res)) { This is not equivalent as join_res is an int and can have values such as -2 and -3. Note for the next time, please only make one type of changes in a single clean-up commit. Fixes: 74e1e498e84e ("staging: rtl8188eu: fix comments with lines over 80 ...") Cc: Juliana Rodrigues <juliana.orod@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02staging: unisys: Fix incorrect unisys MAINTAINERS patternGravatar Tom Saeger 1-1/+1
Fix stale path to documentation in MAINTAINERS file. Signed-off-by: Tom Saeger <tom.saeger@oracle.com> Acked-by: David Kershner <david.kershne@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02staging: ion: simplify ioctl args checking functionGravatar Benjamin Gaignard 1-6/+5
Make arguments checking more easy to read. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Acked-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02staging: android: ion: remove redundant variable tableGravatar Colin Ian King 1-2/+0
Variable table is being set but is never read, it is therefore redundant and can be removed. Cleans up clang warning: drivers/staging/android/ion/ion.c:112:2: warning: Value stored to 'table' is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02staging: vc04_services: Convert timers to use timer_setup()Gravatar Kees Cook 2-10/+8
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Additionally removes invalid NULL check, as pointed out by Dan Carpenter. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Eric Anholt <eric@anholt.net> Cc: Stefan Wahren <stefan.wahren@i2se.com> Cc: Michael Zoran <mzoran@crowfest.net> Cc: Keerthi Reddy <keerthigd4990@gmail.com> Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook <keescook@chromium.org> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02staging: greybus: spilib: fix use-after-free after deregistrationGravatar Johan Hovold 1-3/+5
Remove erroneous spi_master_put() after controller deregistration which would access the already freed spi controller. Note that spi_unregister_master() drops our only controller reference. Fixes: ba3e67001b42 ("greybus: SPI: convert to a gpbridge driver") Cc: stable <stable@vger.kernel.org> # 4.9 Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02staging: ccree: Fix indentation in ssi_buffer_mgr.cGravatar Stephen Brennan 1-8/+8
In particular, fixes some over-indented if statement bodies as well as a couple lines indented with spaces. checkpatch.pl now reports no warnings on this file other than 80 character warnings. Signed-off-by: Stephen Brennan <stephen@brennan.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02staging: ccree: fix 64 bit scatter/gather DMA opsGravatar Gilad Ben-Yossef 1-1/+1
Fix a wrong offset used in splitting a 64 DMA address to MSB/LSB parts needed for scatter/gather HW descriptors causing operations relying on them to fail on 64 bit platforms. Fixes: c6f7f2f4591f ("staging: ccree: refactor LLI access macros") Reported-by: Stuart Yoder <stuart.yoder@arm.com> Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGravatar Greg Kroah-Hartman 174-0/+174
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-27Merge tag 'iio-for-4.15c' of ↵Gravatar Greg Kroah-Hartman 2-275/+167
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Third set of new device support, cleanups and features for IIO in the 4.15 cycle New device support * ti-dac082s085 dac - new driver supporting 8, 10 and 12 bit TI DACs with 2 and 4 channels: DAC082S085, DAC102S085, DAC122S085, DAC104s085 and DAC124S085. Minor features and cleanps * adc12138 - make array ch_to_mux static for small object code size reduction. * sun4i-gpadc - use of_device_get_match_data rather than opencoding it. * stm32 trigger - add tim15 tigger on STM32H7 - check clock rate to avoid potential division by zero * tsl2x7x staging cleanups. - move *_thresh_period to being created by IIO core. - remove unused tsl2x7x_parse_result structure. - sort includes - drop a repeat iio_dev forward definition - fix some code alignment of defines. - use IIO_CONST_ATTR for constant string attribute - drop some unnecessary parentheses - fix various alignment with parenthese - rename power defines for readability reasons - fix a missaligned break statement - Tidy up function definitions so they fit on a single line.
2017-10-23Merge 4.14-rc6 into staging-nextGravatar Greg Kroah-Hartman 3-15/+10
We want the IIO and staging driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-23Merge 4.14-rc6 into usb-nextGravatar Greg Kroah-Hartman 3-15/+10
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-23Merge tag 'staging-4.14-rc6' of ↵Gravatar Linus Torvalds 2-13/+8
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO fixes from Greg KH: "Here are a small number of patches to resolve some reported IIO and a staging driver problem. Nothing major here, full details are in the shortlog below. All have been in linux-next with no reported issues" * tag 'staging-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: bcm2835-audio: Fix memory corruption iio: adc: at91-sama5d2_adc: fix probe error on missing trigger property iio: adc: dln2-adc: fix build error iio: dummy: events: Add missing break staging: iio: ade7759: fix signed extension bug on shift of a u8 iio: pressure: zpa2326: Remove always-true check which confuses gcc iio: proximity: as3935: noise detection + threshold changes
2017-10-23staging: vc04_services: Remove unnecessary bracesGravatar Mihaela Muraru 1-10/+16
Remove unnecessary braces for single statements also declare a local variable "platform_state" of type "struct vchiq_2835_state", to avoid the multiple cast. Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-21staging: iio: tsl2x7x: put function definitions on a single lineGravatar Brian Masney 1-5/+3
The functions tsl2x7x_invoke_change() and tsl2x7x_prox_calculate() are short enough that the return value and static declaration can be moved onto the same line with the function name. This patch makes that change to increase code readability. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-21staging: iio: tsl2x7x: fix alignment of break statementsGravatar Brian Masney 1-2/+2
Correct the alignment of the break statements to match the alignment of the rest of the code within the case statements. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-21staging: iio: tsl2x7x: rename power defines to improve code readabilityGravatar Brian Masney 1-5/+5
The LED power defines are named like TSL2X7X_mAXXX. Rename these values to TSL2X7X_XXX_mA to improve code readability. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-21staging: iio: tsl2x7x: correct alignment of parenthesisGravatar Brian Masney 1-17/+18
Correct error from checkpatch.pl to improve code readibility: Alignment should match open parenthesis. An unnecessary cast to 'struct tsl2x7x_lux *' was removed and the return value of static definition of in_illuminance0_calibscale_available_show() was put on its own line due to the length of that sysfs attribute. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-21staging: iio: tsl2x7x: correct alignment of parenthesisGravatar Brian Masney 1-9/+8
Correct error from checkpatch.pl to improve code readibility: Alignment should match open parenthesis. This involved shortening the name of tsl2x7x_als_gainadj and tsl2x7x_prx_gainadj to tsl2x7x_als_gain and tsl2x7x_prx_gain respectively. This also required removing the ch0lux and ch1lux local variables in order to get the line short enough. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-21staging: iio: tsl2x7x: remove unnecessary parenthesesGravatar Brian Masney 1-8/+8
This patch fixes the error 'Unnecessary parentheses around 'XXX' from checkpatch.pl. It also fixes several other places with unnecessary parentheses that checkpatch.pl did not detect. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-21staging: iio: tsl2x7x: convert in_proximity0_calibscale_available to use ↵Gravatar Brian Masney 1-11/+4
IIO_CONST_ATTR The sysfs attribute in_proximity0_calibscale_available is currently created by using DEVICE_ATTR_RO(). Convert this over to use IIO_CONST_ATTR(). Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-21staging: iio: tsl2x7x: changed #defines to be aligned on the same columnGravatar Brian Masney 1-66/+66
Some of the existing #defines have tabs between the name, and the value, while others have spaces. The alignment of the values mostly has a consistent layout, but there are some that don't. Change all of the defines so that the name and value is separated by tabs and all of the values start on the same column to increase code readability. This patch also removes the unnecessary parentheses around the value of TSL2X7X_MAX_TIMER_CNT. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-21staging: iio: tsl2x7x: remove unnecessary struct iio_dev definitionGravatar Brian Masney 1-2/+0
tsl2x7x.h has a blank definition for 'struct iio_dev' that is not needed. This patch removes that definition. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-21staging: iio: tsl2x7x: sort #includesGravatar Brian Masney 1-5/+5
Sort the #include statements for increased code readability. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-21staging: iio: tsl2x7x: remove unused tsl2x7x_parse_result structureGravatar Brian Masney 1-5/+0
The structure tsl2x7x_parse_result is not used so this patch removes its definition. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-21staging: iio: tsl2x7x: migrate *_thresh_period sysfs attributes to ↵Gravatar Brian Masney 1-144/+52
iio_event_spec The sysfs attributes in_intensity0_thresh_period and in_proximity0_thresh_period are currently directly created by the driver. This patch migrates the creation of these sysfs attributes from the driver to using the IIO core via iio_event_spec. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-20staging: lustre: lllite: fix multi line comments styleGravatar Aastha Gupta 3-5/+7
This patch fixes checkpatch.pl warnings: WARNING: Block comments should align the * on each line WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: lustre: llite: fix coding style for error messagesGravatar Aastha Gupta 1-6/+5
The "DFID" part should be added to the same line as the rest of the message, to match current coding style. Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: lustre: llite: fix lines over 80 characters in llite filesGravatar Aastha Gupta 12-39/+74
This fixes checkpatch.pl warning: WARNING: line over 80 characters Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: lustre: ldlm: fix lines over 80 characters in ldlm filesGravatar Aastha Gupta 8-36/+65
This patch fixes checkpatch.pl warning: WARNING: line over 80 characters Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: lustre: fld: fix line over 80 charactersGravatar Aastha Gupta 1-1/+2
This patch fixes checkpatch.pl warning: WARNING: line over 80 characters Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: lustre: fid: fix line over 80 charactersGravatar Aastha Gupta 1-1/+2
This patch fixes checkpatch.pl warning: WARNING: line over 80 characters Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: lustre: drop macro that has no usesGravatar Aastha Gupta 1-2/+0
This patch removes DLUBUF and PLUBUF macro, both of which have no users. Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: rtl8188eu: use pr_cont()Gravatar Aastha Gupta 1-2/+2
Using 'printk("\n")' is not preferred anymore as printks without KERN_CONT are emitted on a new line and KERN_CONT is required to continue lines so use pr_cont. Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: rtl8188eu: add spaces around '|'Gravatar Aastha Gupta 1-3/+3
Fixes 'use spaces around '|' ' as reported by checkpatch.pl Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: rtl8188eu: prefer using BIT macroGravatar Aastha Gupta 1-39/+39
Fixes checkpatch.pl: Use BIT(x) instead of using (1<<x) Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: gdm724x: fix return codes in gdm_lteGravatar Andrii Vladyka 1-7/+7
fix return codes in gdm_lte in gdm724x driver Signed-off-by: Andrii Vladyka <tulup@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: gdm724x: check for skb->len in gdm_lte_emulate_arpGravatar Andrii Vladyka 1-0/+5
check for skb->len in gdm_lte_emulate_arp in gdm724x driver Signed-off-by: Andrii Vladyka <tulup@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging/irda-usb: Convert timers to use timer_setup()Gravatar Kees Cook 2-14/+7
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This requires adding a pointer to hold the timer's target URB, as there won't be a way to pass this in the future. Cc: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: wlan-ng: Convert timers to use timer_setup()Gravatar Kees Cook 3-19/+16
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Sergio Paracuellos <sergio.paracuellos@gmail.com> Cc: Adrien Descamps <adrien.descamps@gmail.com> Cc: Thibaut SAUTEREAU <thibaut.sautereau@telecom-sudparis.eu> Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging/irda/bfin_sir: Convert timers to use timer_setup()Gravatar Kees Cook 1-5/+7
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging/irda/net: Convert timers to use timer_setup()Gravatar Kees Cook 15-90/+79
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Samuel Ortiz <samuel@sortiz.org> Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: Johannes Berg <johannes.berg@intel.com> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: fsl-dpaa2/eth: Add firmware versionGravatar Ioana Radulescu 4-1/+55
Include firmware version in the driver information exported through ethtool. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: fsl-dpaa2/eth: Don't use netdev_err too earlyGravatar Ioana Radulescu 1-1/+1
Early during probe the netdevice name is not initialized yet, so use dev_err instead of netdev_err when printing error messages. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: fsl-dpaa2/eth: Use implicit clear of link interruptGravatar Ioana Radulescu 1-9/+3
dpni_get_irq_status() also looks at the input value of its status parameter, and if not null it automatically clears from pending state the bits that are set there. Use this feature to avoid a separate MC command for clearing the interrupt event bits after reading the status. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: fsl-dpaa2/eth: Fix double DMA unmapGravatar Ioana Radulescu 1-2/+9
In case we fail to allocate a skb for a fragmented ingress frame, the cleanup function will attempt to unmap again the first frame fragment, which had already been unmapped during early Rx processing. Avoid this by freeing the first buffer immediately in case we hit an error, leaving the cleanup function to free only the subsequent buffers. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: fsl-dpaa2/eth: Refactor interrupt arming in NAPI pollGravatar Ioana Radulescu 1-2/+1
Take into consideration the return value of napi_complete_done(), since there might be an indication that it's not suitable to enable driver interrupts yet. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: fsl-dpaa2/eth: Check if notification rearm is successfulGravatar Ioana Radulescu 1-0/+2
In case dpaa2_io_service_rearm() fails with an error other then EBUSY, it will do so silently; add a check for this and a warning message, as a failure here means we're unable to receive any more traffic on the current cpu. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: fsl-dpaa2/eth: Check SGT final bit is presentGravatar Ioana Radulescu 1-0/+2
For scatter-gather ingress frames, we expect to receive a list of fragments from the hardware, last of which is marked with a "final" bit. Add a check to make sure the Rx frame has this bit set correctly; there's not much we can do in case of a malformed frame, but at least issue a warning. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>