summaryrefslogtreecommitdiffstats
path: root/drivers/staging/fwserial
AgeCommit message (Collapse)Author
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman
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>
2016-10-16Staging: fwserial: remove unused function fill_unplug_reqBhumika Goyal
The function fill_unplug_req is not used anywhere in the kernel, so remove it. Done using Coccinelle. @r1@ identifier func; type T; @@ static T func(...) { ... } @r@ identifier r1.func; @@ func @delete depends on !r@ identifier r1.func; type r1.T; @@ - static T func(...){...} Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-13staging: fwserial: fix checkpatch permission warningsSimon Chopin
Fix the following warnings: Symbolic permissions are not preferred. Consider using octal permissions. Signed-off-by: Simon Chopin <chopin.simon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-20Merge tag 'staging-4.7-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO driver updates from Greg KH: "Here's the big staging and iio driver update for 4.7-rc1. I think we almost broke even with this release, only adding a few more lines than we removed, which isn't bad overall given that there's a bunch of new iio drivers added. The Lustre developers seem to have woken up from their sleep and have been doing a great job in cleaning up the code and pruning unused or old cruft, the filesystem is almost readable :) Other than that, just a lot of basic coding style cleanups in the churn. All have been in linux-next for a while with no reported issues" * tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (938 commits) Staging: emxx_udc: emxx_udc: fixed coding style issue staging/gdm724x: fix "alignment should match open parenthesis" issues staging/gdm724x: Fix avoid CamelCase staging: unisys: rename misleading var ii with frag staging: unisys: visorhba: switch success handling to error handling staging: unisys: visorhba: main path needs to flow down the left margin staging: unisys: visorinput: handle_locking_key() simplifications staging: unisys: visorhba: fail gracefully for thread creation failures staging: unisys: visornic: comment restructuring and removing bad diction staging: unisys: fix format string %Lx to %llx for u64 staging: unisys: remove unused struct members staging: unisys: visorchannel: correct variable misspelling staging: unisys: visorhba: replace functionlike macro with function staging: dgnc: Need to check for NULL of ch staging: dgnc: remove redundant condition check staging: dgnc: fix 'line over 80 characters' staging: dgnc: clean up the dgnc_get_modem_info() staging: lustre: lnet: enable configuration per NI interface staging: lustre: o2iblnd: properly set ibr_why staging: lustre: o2iblnd: remove last of kiblnd_tunables_fini ...
2016-04-30tty: Replace TTY_THROTTLED bit tests with tty_throttled()Peter Hurley
Abstract TTY_THROTTLED bit tests with tty_throttled(). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29staging: fwserial: (coding style) removing "!= NULL" to comply with ↵Dominique van den Broeck
checkpatch.pl Removing two "!= NULL" from fwserial.c as suggested by checkpatch.pl. Note that the associated expression "port->port.console" is a 1-bit-field that is already assumed as an implicit boolean (that is: without comparison) Signed-off-by: Dominique van den Broeck <domdevlin@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29staging: fwserial: (coding style) Turning every "unsigned" into "unsigned int"Dominique van den Broeck
Coding-style-only modifications to remove every warning saying: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Compiled against revision "next-20160327". (checkpatch.pl was updated to treat "UNSPECIFIED_INT" warnings as of commit a1ce18e4f941d20 ) Signed-off-by: Dominique van den Broeck <domdevlin@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: fwserial: (coding-style) rewrite comparisons to NULL as "!fifo->data"Christian Colic
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>
2016-02-07drivers:staging:fwserial Fix No space is necessary after a castBogicevic Sasa
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>
2016-01-28Staging: fwserial: Declare fwtty_port_get as staticShraddha Barke
Declare the function fwtty_port_get as static since it is used only in this particular file. Also remove the corresponding declaration from header file. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15Staging: fwserial: Declare fwtty_port_put as staticShraddha Barke
Declare the function fwtty_port_put as static since it is used only in this particular file. Also remove the corresponding declaration from header file. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15Staging: fwserial: Remove unused fwtty_bind_console from headerShraddha Barke
fwtty_bind_console is defined in header file but not used. Thus remove the definition. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31staging: fwserial: fix resource leakVladimirs Ambrosovs
This patch fixes the leak, which was present in fwserial driver in the init function. In case the tty driver allocation failed the function returned error, leaving debugfs entry in the filesystem. To fix the issue additional error label was added, so that the code will jump to it in case of allocation failure, and free debugfs entries. Signed-off-by: Vladimirs Ambrosovs <rodriguez.twister@gmail.com> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08Staging: fixed multiple spelling errors.Carlos E. Garcia
Fixed multiple spelling errors. Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15staging: fwserial: remove extra parentheses around function argumentsAya Mahfouz
Removes extra parentheses around function arguments. Issue detected and resolved using the following coccinelle script: @@ expression e; identifier f; @@ f(..., -( e -) ,...); Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: fwserial: remove multiple blank linesLe Tan
This patch fixes the multiple blank lines issue complained by checkpatch.pl by removing useless blank lines. Signed-off-by: Le Tan <tamlokveer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18staging/fwserial: (coding style) remove not needed return statementsRadek Dostal
Style-only modifications to make checkpatch.pl -f a bit happier. Fixes warning: "void function return statements are not generally useful" Signed-off-by: Radek Dostal <rd@radekdostal.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18staging/fwserial: (coding style) add blank line after every declarationRadek Dostal
Style-only modifications to make checkpatch.pl -f a bit happier. Fixes warning: "Missing a blank line after declarations" Signed-off-by: Radek Dostal <rd@radekdostal.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25drivers/staging: Use RCU_INIT_POINTER(x, NULL) in fwserial/fwserial.cMonam Agarwal
This patch replaces rcu_assign_pointer(x, NULL) with RCU_INIT_POINTER(x, NULL) The rcu_assign_pointer() ensures that the initialization of a structure is carried out before storing a pointer to that structure. And in the case of the NULL pointer, there is no structure to initialize. So, rcu_assign_pointer(p, NULL) can be safely converted to RCU_INIT_POINTER(p, NULL) Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25fwserial: (coding style) removing FSF postal addressDominique van den Broeck
Style-only modifications to make checkpatch.pl --file --strict a bit happier. Removing FSF postal address from file top comment since it has changed in the past, as stated by checkpatch.pl. Signed-off-by: Dominique van den Broeck <domdevlin@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25fwserial: (coding style) useless "extern" & spaceDominique van den Broeck
Style-only modifications to make checkpatch.pl --file --strict a bit happier. Removed useless "extern" in dma_fifo.h ; Removed one supernumerary space. Signed-off-by: Dominique van den Broeck <domdevlin@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25fwserial: (coding style) if/else bracket matchingDominique van den Broeck
Style-only modifications to make checkpatch.pl --file --strict a bit happier. if/else bracket matching (either none or both options should be bracketed). Signed-off-by: Dominique van den Broeck <domdevlin@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25fwserial: (coding style) open parenthesis alignmentsDominique van den Broeck
Style-only modifications to make checkpatch.pl --file --strict a bit happier. Open parenthesis alignments. Signed-off-by: Dominique van den Broeck <domdevlin@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07staging/fwserial: don't use PREPARE_WORKTejun Heo
PREPARE_[DELAYED_]WORK() are being phased out. They have few users and a nasty surprise in terms of reentrancy guarantee as workqueue considers work items to be different if they don't have the same work function. fwtty_peer->work is multiplexed with multiple work functions. Introduce fwserial_peer_workfn() which invokes fwtty_peer->workfn and always use it as the work function and update the users to set the ->workfn field instead of overriding the work function using PREPARE_WORK(). It would probably be best to route this with other related updates through the workqueue tree. Compile tested. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Peter Hurley <peter@hurleysoftware.com>
2013-12-08staging/fwserial: Add Kconfig options for max portsPeter Hurley
Allow kernel configuration of max supported ports for TTY-over-Firewire driver. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08staging/fwserial: Rename data profiling functionsPeter Hurley
Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08staging/fwserial: Up the tty buffer limit to 128KPeter Hurley
The firewire driver can overrun the tty buffers before the line discipline can throttle the input; up the buffer limit. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08staging/fwserial: Rip out rx bufferingPeter Hurley
Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17Staging: fwserial: wrap a line that exceeds 80 charactersJon Bernard
This is a patch to fwserial.c that wraps a line which previously exceeded the 80 character limit warning found by checkpatch.pl. This driver is now warning and error free, according to checkpatch.pl Signed-off-by: Jon Bernard <jbernard@tuxion.com> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-10Merge tag 'firewire-updates' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire updates from Stefan Richter: "Make struct ieee1394_device_id.driver_data actually avaliable to 1394 protocol drivers. This is especially useful to 1394 audio drivers for model-specific parameters and methods" * tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: remove support of fw_driver.driver.probe and .remove methods firewire: introduce fw_driver.probe and .remove methods
2013-06-09firewire: introduce fw_driver.probe and .remove methodsStefan Richter
FireWire upper layer drivers are converted from generic struct driver.probe() and .remove() to bus-specific struct fw_driver.probe() and .remove(). The new .probe() adds a const struct ieee1394_device_id *id argument, indicating the entry in the driver's device identifiers table which matched the fw_unit to be probed. This new argument is used by the snd-firewire-speakers driver to look up device-specific parameters and methods. There is at least one other FireWire audio driver currently in development in which this will be useful too. The new .remove() drops the unused error return code. Although all in-tree drivers are being converted to the new methods, support for the old methods is left in place in this commit. This allows public developer trees to merge this commit and then move to the new fw_driver methods. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Acked-by: Clemens Ladisch <clemens@ladisch.de> (for sound/firewire/) Cc: Peter Hurley <peter@hurleysoftware.com> (for drivers/staging/fwserial/)
2013-05-30staging: fwserial: Use normal logging stylesJoe Perches
Logging messages without newline termination are subject to interleaving by other messages. Avoid this by adding newlines to each message. Neaten fwtty_<level> logging macros. Convert driver_err to pr_err. Add #define pr_fmt to prefix those messages. Remove now unused driver_err macro. Signed-off-by: Joe Perches <joe@perches.com> Cc: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-29Merge tag 'tty-3.10-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver update from Greg Kroah-Hartman: "Here's the big tty/serial driver merge request for 3.10-rc1 Once again, Jiri has a number of TTY driver fixes and cleanups, and Peter Hurley came through with a bunch of ldisc fixes that resolve a number of reported issues. There are some other serial driver cleanups as well. All of these have been in the linux-next tree for a while" * tag 'tty-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (117 commits) tty/serial/sirf: fix MODULE_DEVICE_TABLE serial: mxs: drop superfluous {get|put}_device serial: mxs: fix buffer overflow ARM: PL011: add support for extended FIFO-size of PL011-r1p5 serial_core.c: add put_device() after device_find_child() tty: Fix unsafe bit ops in tty_throttle_safe/unthrottle_safe serial: sccnxp: Replace pdata.init/exit with regulator API serial: sccnxp: Do not override device name TTY: pty, fix compilation warning TTY: rocket, fix compilation warning TTY: ircomm: fix DTR being raised on hang up TTY: synclinkmp: fix DTR being raised on hang up TTY: synclink_gt: fix DTR being raised on hang up TTY: synclink: fix DTR being raised on hang up serial: 8250_dw: Fix the stub for dw8250_probe_acpi() serial: 8250_dw: Convert to devm_ioremap() serial: 8250_dw: Set port capabilities based on CPR register serial: 8250_dw: Let ACPI code extract the DMA client info serial: 8250_dw: Support clk framework also with ACPI serial: 8250_dw: Enable runtime PM ...
2013-04-08staging/fwserial: Replace seq_printf with seq_putsValentin Ilie
Fix checkpatch warning about seq_printf. Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-18TTY: add tty_port_tty_wakeup helperJiri Slaby
It allows for cleaning up on a considerable amount of places. They did port_get, wakeup, kref_put. Now the only thing needed is to call tty_port_tty_wakeup which does exactly that. One exception is ifx6x60 where tty_wakeup was open-coded. We now call tty_wakeup properly there. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-21Merge tag 'tty-3.9-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial patches from Greg Kroah-Hartman: "Here's the big tty/serial driver patches for 3.9-rc1. More tty port rework and fixes from Jiri here, as well as lots of individual serial driver updates and fixes. All of these have been in the linux-next tree for a while." * tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (140 commits) tty: mxser: improve error handling in mxser_probe() and mxser_module_init() serial: imx: fix uninitialized variable warning serial: tegra: assume CONFIG_OF TTY: do not update atime/mtime on read/write lguest: select CONFIG_TTY to build properly. ARM defconfigs: add missing inclusions of linux/platform_device.h fb/exynos: include platform_device.h ARM: sa1100/assabet: include platform_device.h directly serial: imx: Fix recursive locking bug pps: Fix build breakage from decoupling pps from tty tty: Remove ancient hardpps() pps: Additional cleanups in uart_handle_dcd_change pps: Move timestamp read into PPS code proper pps: Don't crash the machine when exiting will do pps: Fix a use-after free bug when unregistering a source. pps: Use pps_lookup_dev to reduce ldisc coupling pps: Add pps_lookup_dev() function tty: serial: uartlite: Support uartlite on big and little endian systems tty: serial: uartlite: Fix sparse and checkpatch warnings serial/arc-uart: Miscll DT related updates (Grant's review comments) ... Fix up trivial conflicts, mostly just due to the TTY config option clashing with the EXPERIMENTAL removal.
2013-01-31staging/fwserial: Fix compiler warningPeter Hurley
Fix: drivers/staging/fwserial/fwserial.c:581:3: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-31staging/fwserial: Annotate rcu pointers with __rcuPeter Hurley
Fixes these sparse warnings: drivers/staging/fwserial/fwserial.c:430:16: sparse: incompatible types in comparison expression (different address spaces) drivers/staging/fwserial/fwserial.c:699:30: sparse: incompatible types in comparison expression (different address spaces) drivers/staging/fwserial/fwserial.c:802:16: sparse: incompatible types in comparison expression (different address spaces) drivers/staging/fwserial/fwserial.c:898:16: sparse: incompatible types in comparison expression (different address spaces) drivers/staging/fwserial/fwserial.c:1842:14: sparse: incompatible types in comparison expression (different address spaces) Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29staging/fwserial: Fix endian issue in unit directoryPeter Hurley
Reported-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29staging/fwserial: add diagnostic for buffer overflowPeter Hurley
Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29staging/fwserial: Remove reference to removed constantPeter Hurley
FWSERIAL_TTY_START_MINOR was removed. The minor_start is allocated by tty_alloc_driver(). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29staging/fwserial: Don't use deprecated alloc_tty_driver()Peter Hurley
Use tty_alloc_driver() instead. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29staging/fwserial: Factor unstable stats/debug/status info to debugfsPeter Hurley
Add the following file hierarchy to debugfs: <debugfs>-+ +- firewire_serial -+- <unit> -+- peers | +- stats | +- <unit> -+- peers +- stats The 'peers' file (read-only) contains status and configuration info for attached peers for the given fwserial unit. The 'stats' file (read-only) contains statistics and data profiling information for each tty port for the given fwserial unit. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29staging/fwserial: Cleanup /proc/tty/driver/ filePeter Hurley
Factor out extra stats, data profiles, debugging info and peer info from procfs file in preparation for using debugfs instead. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29staging/fwserial: Create loop device the 'tty' wayPeter Hurley
Register a second tty driver to create loopback devices for each firewire node. Note that the loopback devices are numbered from 0; the tty->index is transformed when used to index the port table. Remove the hack that previously enabled this. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29staging/fwserial: Fix sparse build warningsPeter Hurley
Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29staging/fwserial: Release port regardless of unplug response codePeter Hurley
After sending the unplug response, release the port even if an error occurred. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29staging/fwserial: Only reset port status for attached peersPeter Hurley
When a port has been reserved in an attempt to connect to a peer but that attempt does not succeed, releasing the port should not reset the port line status. Although resetting is functionally harmless, it can appear as if a remote peer dropped carrier to a port it was not attached to (which can be confusing). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29staging/fwserial: Drop suggestion for helper fn integrationPeter Hurley
The firewire core does not require or want the suggested helper fns; drop suggestion from TODO file. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29staging/fwserial: Assume firmware is OHCI-complaintPeter Hurley
Devices which are OHCI v1.0/ v1.1/ v1.2-draft compliant or RFC 2734 compliant are required by specification to support max_rec of 8 (512 bytes) or more. Accept reported value. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>