summaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon
Commit message (Collapse)AuthorAgeFilesLines
* Staging: octeon: Add missing of_node_put after calling of_parse_phandle.Sandhya Bankar2016-09-201-0/+1
| | | | | | | | | | | | | | | | | | of_node_put needs to be called when the device node which is got from of_parse_phandle is no longer used. This patch is found by below coccinelle script: @@ expression e,e1,e2; @@ *e = of_parse_phandle(...) ... when != of_node_put(e) when != true e == NULL when != e2 = e e = e1 Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: octeon: ethernet-rx: fixed three redundant blank line style issuesCathal Mullaney2016-09-181-3/+0
| | | | | | | Fixed three minor coding style issues. Signed-off-by: Cathal Mullaney <chuckleberryfinn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: remove multiple blank linesGargi Sharma2016-09-161-2/+0
| | | | | | | Fixes the checkpatch issue Please don't use multiple blank lines. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: use defines instead of magic numbersAsbjoern Sloth Toennesen2016-09-151-6/+12
| | | | | | | | The ugly magic number 65392 is waiting for CVMX_IPD_MAX_MTU to appear in the mips tree. Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.st> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: stop using cvmx_helper_link_autoconf()Aaro Koskinen2016-09-122-3/+8
| | | | | | | | Stop using cvmx_helper_link_autoconf(). We want to remove it in the future, as it duplicates link state information into platform code for no reason. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Use IS_ENABLED() instead of checking for built-in or moduleJavier Martinez Canillas2016-09-021-1/+1
| | | | | | | | | | | | The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: David Daney <david.daney@cavium.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: prevent poll during rx initAaro Koskinen2016-09-021-0/+6
| | | | | | | Prevent poll before the RX init has been completed. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: set up pknd for all interfacesAaro Koskinen2016-09-021-0/+2
| | | | | | | | | RX path uses pknd to find the correct device, and we maintain 1:1 port to pknd mapping. However, this is only set for XAUI interfaces (in the arch code). But it should be set for all interface types. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: enable taking multiple rx groups into useAaro Koskinen2016-09-021-2/+47
| | | | | | | Enable taking multiple RX groups into use. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: support enabling multiple rx groupsAaro Koskinen2016-09-023-53/+81
| | | | | | | Support enabling multiple RX groups. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: move group number into rx group dataAaro Koskinen2016-09-021-9/+11
| | | | | | | Move group number into RX group data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: move irq into rx group specific dataAaro Koskinen2016-09-021-7/+10
| | | | | | | Move IRQ number into RX group specific data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: create a struct for rx group specific dataAaro Koskinen2016-09-021-6/+9
| | | | | | | Create a struct for RX group specific data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: move common poll code into a separate functionAaro Koskinen2016-09-021-10/+19
| | | | | | | Move common poll code into a separate function. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: pass the NAPI instance reference to irq handlerAaro Koskinen2016-09-021-4/+4
| | | | | | | | Pass the NAPI instance reference to the interrupt handler. This is preparation for having multiple NAPI instances. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: use passed interrupt number in the handlerAaro Koskinen2016-09-021-3/+3
| | | | | | | | Use passed interrupt number in the handler, so we can avoid using the global variable. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: disable rx interrupts in oct_rx_shutdownAaro Koskinen2016-09-022-9/+9
| | | | | | | | Disable RX interrupts in oct_rx_shutdown(). This way we don't need to expose the RX IRQ numbers outside the RX module. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: configure rx-delay/tx-delayAaro Koskinen2016-09-011-1/+13
| | | | | | | Configure rx-delay/tx-delay when available. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* net: ethernet: octeon: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-08-211-21/+2
| | | | | | | | | | | | There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. There was a check on CAP_NET_ADMIN in cvm_oct_set_settings, but this check is already done in dev_ethtool, so no need to repeat it before calling the generic function. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* net: ethernet: octeon: use phydev from struct net_devicePhilippe Reynes2016-08-214-37/+26
| | | | | | | | | | The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: delete redundant log messageAaro Koskinen2016-08-211-1/+0
| | | | | | | | There will be a separate banner message after pow0 is set up (or an error message if it failed). Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: check for pow0 before calling interface helperAaro Koskinen2016-08-211-3/+4
| | | | | | | | | | Check for pow0 port first before calling the interface helper. This avoids the following error log when setting up pow0 interface: cvmx_helper_get_interface_num: Illegal IPD port number Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: validate interface before calling INDEXAaro Koskinen2016-08-211-3/+3
| | | | | | | | | | | | Some helper functions call INDEX before checking if the interface is valid. Since pow0 is not a real interface, we get the following errors: cvmx_helper_get_interface_index_num: Illegal IPD port number Fix by using INDEX only when needed with real interfaces. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Fix alignment with open parenthesisLaura Garcia Liebana2016-03-284-8/+10
| | | | | | | | Alignment should match open parenthesis. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Use type int instead of int32_tLaura Garcia Liebana2016-03-281-5/+5
| | | | | | | | Prefer the use of type int instead of int32_t. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Fix braces in condition statementLaura Garcia Liebana2016-03-111-1/+2
| | | | | | | | Braces should be used on all arms of the if statement. Checkpatch detected this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Remove multiple blank linesLaura Garcia Liebana2016-03-111-2/+0
| | | | | | | Avoid the use of multiple blank lines. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Fix lines over 80 charactersLaura Garcia Liebana2016-03-111-3/+7
| | | | | | | | The lines should be adjusted to 80 characters. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Remove blank lines after open braceLaura Garcia Liebana2016-03-113-4/+0
| | | | | | | | Blank lines are not necessary after an open brace. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Fix block commentsLaura Garcia Liebana2016-03-112-40/+13
| | | | | | | Remove commented source code. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Remove comparison to NULLLaura Garcia Liebana2016-03-114-7/+7
| | | | | | | | Comparison to NULL should be avoided in conditions. Chackpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Insert blank line after struct declarationLaura Garcia Liebana2016-03-111-0/+5
| | | | | | | | Blank line is inserted after a struct declaration. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Move logical operators on the correct lineLaura Garcia Liebana2016-03-112-16/+16
| | | | | | | Logical continuations should be on the previous line. Checkpatch detected this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Convert create_singlethread_workqueue()Bhaktipriya Shridhar2016-03-112-18/+4
| | | | | | | | | | | | | | | | | With conccurency managed workqueues, use of dedicated workqueues can be replaced by system_wq. Drop cvm_oct_poll_queue by using system_wq. There are multiple work items per cvm_oct_poll_queue (viz. cvm_oct_rx_refill_work, port_periodic_work) and different cvm_oct_poll_queues need not be be ordered. Hence, concurrency can be increased by switching to system_wq. All work items are sync canceled in cvm_oct_remove() so it is guaranteed that no work is in flight by the time exit path runs. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: octeon: Remove blank lines after open bracesDilek Uzulmez2016-02-201-1/+0
| | | | | | | | This patch fixes "blank lines aren't necessary after an open brace '{'" checkpatch.pl warning in ethernet.c Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: drop atomic usage from rx countersAaro Koskinen2016-02-202-32/+4
| | | | | | | | | | | | We have only one NAPI poll running at a time, so virtual port rx counters can be updated normally. Update of rx_dropped can still race with the gathering of statistics, but full accuracy is not required there. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Acked-by: David Daney <david.daney@cavium.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: support fixed-link physAaro Koskinen2016-02-141-0/+9
| | | | | | | | Support fixed-link PHYs. This allows to remove some of the board-specific link cvmx_helper code in the future. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: refactor rgmii 10 mbps preamble error checkingAaro Koskinen2016-02-114-225/+87
| | | | | | | | | | | | | | | | | | | | | Refactor RGMII 10 Mbps preamble error checking. The current implementation does not work correctly in phydev mode since only the link status changes trigger the callback, and if we stay on 10 Mbps operation the periodic checks for error counters are never done. Provide a periodic worker also during the phydev operation, and notify the link status changes through the phydev instead of the inband status change interrupt. This also has the benefit that we don't need to use legacy CVMX MDIO calls to check the PHY state, and we can avoid races that trigger bogus "Using 10Mbps with software preamble removal" logs when interfaces are being bringed up. It also avoids some corner-case crashes when the in-band interrupt triggers while the interface is being taken down. Tested on EdgeRouter Lite & D-Link DSR-1000N. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Add spaces around operatorsJanani Ravichandran2016-02-111-4/+5
| | | | | | | | Add spaces around operators for better readability. Change suggested by checkpatch. Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging:octeon:removed blank line after {Bhumika Goyal2016-02-071-4/+0
| | | | | | | | 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>
* staging: octeon: Fix logic for waking octeon ethernet tx queue.Luuk Paulussen2016-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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>
* staging: octeon-ethernet: fix TCP/UDP checksum calcHamish Martin2016-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* Merge tag 'staging-4.5-rc1' of ↵Linus Torvalds2016-01-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the big staging driver pull request for 4.5-rc1. Lots of cleanups and fixes here, not as many as some releases, but 800+ isn't that bad. Full details in the shortlog. All of these have been in linux-next for a while" * tag 'staging-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (843 commits) Revert "arm64: dts: Add dts files to enable ION on Hi6220 SoC." staging: gdm724x: constify tty_port_operations structs staging: gdm72xx: add userspace data struct staging: gdm72xx: Replace timeval with ktime_t iio: adc: ina2xx: Fix incorrect report of data endianness to userspace. iio: light: us5182d: Refactor read_raw function iio: light: us5182d: Add interrupt support and events iio: light: us5182d: Fix enable status inconcistency iio: Make IIO value formating function globally available. staging: emxx_udc: use list_first_entry_or_null() staging/emxx_udc: fix 64-bit warnings STAGING: COMEDI: Using kernel types in plx9080.h STAGING: COMEDI: Added spaces around binary operators in plx9080.h STAGING: COMEDI: Fixed format of comments in plx9080.h staging: comedi: comedilib.h: Coding style warning fix for block comments staging: comedi: s526: add macros for counter control reg values staging: comedi: s526: replace counter mode bitfield struct staging: comedi: check for more errors for zero-length write staging: comedi: simplify returned errors for comedi_write() staging: comedi: return error on "write" if no command set up ...
| * staging: octeon: Add space around '+'Burcin Akalin2015-11-151-1/+1
| | | | | | | | | | | | | | | | | | Add space around operator '+'. Problem found using checkpatch.pl CHECK: spaces preferred around that '+' (ctx:VxV) Signed-off-by: Burcin Akalin <brcnakalin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | net: ethernet-rgmii.c: Fix breakage from moving phdev busAndrew Lunn2016-01-101-3/+3
|/ | | | | | | | The mdio device patches moved the bus member in phy_device into a substructure. This driver got missed. Fix it. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* staging: octeon: Do not use multiple blank lines.Burcin Akalin2015-10-241-1/+0
| | | | | | | | Remove multiple blank lines. Problem found using checkpatch.pl "CHECK: Please don't use multiple blank lines". Signed-off-by: Burcin Akalin <brcnakalin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Remove explicit NULL comparisonMuhammad Falak R Wani2015-10-241-1/+1
| | | | | | | Remove the explicit NULL comparison and rewrite in a compact form. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon: Remove explicit NULL comparisonMuhammad Falak R Wani2015-10-241-1/+1
| | | | | | | Remove the explicit NULL comparison and rewrite in a compact form. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-ethernet: move cvm_oct_xaui_open()Aaro Koskinen2015-10-174-34/+5
| | | | | | | | cvm_oct_xaui_open() is trivial and does not need a dedicated file. Move it to the main file. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-ethernet: drop poll_now parameter from cvm_oct_common_openAaro Koskinen2015-10-175-7/+6
| | | | | | | Drop redundant poll_now parameter from cvm_oct_common_open. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud