12 Jan, 2017
1 commit
-
commit e7c9a3d9e432200fd4c17855c2c23ac784d6e833 upstream.
The Octeon driver calls into PHYLIB which now checks for
net_device->dev.parent, so make sure we do set it before calling into
any MDIO/PHYLIB related function.Fixes: ec988ad78ed6 ("phy: Don't increment MDIO bus refcount unless it's a different owner")
Reported-by: Aaro Koskinen
Signed-off-by: Florian Fainelli
Signed-off-by: Greg Kroah-Hartman
20 Sep, 2016
1 commit
-
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 = e1Signed-off-by: Sandhya Bankar
Signed-off-by: Greg Kroah-Hartman
18 Sep, 2016
1 commit
-
Fixed three minor coding style issues.
Signed-off-by: Cathal Mullaney
Signed-off-by: Greg Kroah-Hartman
16 Sep, 2016
2 commits
-
Fixes the checkpatch issue Please don't use multiple blank lines.
Signed-off-by: Gargi Sharma
Signed-off-by: Greg Kroah-Hartman -
The ugly magic number 65392 is waiting for CVMX_IPD_MAX_MTU
to appear in the mips tree.Signed-off-by: Asbjoern Sloth Toennesen
Signed-off-by: Greg Kroah-Hartman
12 Sep, 2016
1 commit
-
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
Signed-off-by: Greg Kroah-Hartman
02 Sep, 2016
12 commits
-
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
Acked-by: David Daney
Signed-off-by: Greg Kroah-Hartman -
Prevent poll before the RX init has been completed.
Signed-off-by: Aaro Koskinen
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman -
Enable taking multiple RX groups into use.
Signed-off-by: Aaro Koskinen
Signed-off-by: Greg Kroah-Hartman -
Support enabling multiple RX groups.
Signed-off-by: Aaro Koskinen
Signed-off-by: Greg Kroah-Hartman -
Move group number into RX group data.
Signed-off-by: Aaro Koskinen
Signed-off-by: Greg Kroah-Hartman -
Move IRQ number into RX group specific data.
Signed-off-by: Aaro Koskinen
Signed-off-by: Greg Kroah-Hartman -
Create a struct for RX group specific data.
Signed-off-by: Aaro Koskinen
Signed-off-by: Greg Kroah-Hartman -
Move common poll code into a separate function.
Signed-off-by: Aaro Koskinen
Signed-off-by: Greg Kroah-Hartman -
Pass the NAPI instance reference to the interrupt handler.
This is preparation for having multiple NAPI instances.Signed-off-by: Aaro Koskinen
Signed-off-by: Greg Kroah-Hartman -
Use passed interrupt number in the handler, so we can avoid using
the global variable.Signed-off-by: Aaro Koskinen
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman
01 Sep, 2016
1 commit
-
Configure rx-delay/tx-delay when available.
Signed-off-by: Aaro Koskinen
Signed-off-by: Greg Kroah-Hartman
22 Aug, 2016
5 commits
-
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
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman -
There will be a separate banner message after pow0 is set up (or an
error message if it failed).Signed-off-by: Aaro Koskinen
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman
28 Mar, 2016
2 commits
-
Alignment should match open parenthesis. Checkpatch detected these
issues.Signed-off-by: Laura Garcia Liebana
Signed-off-by: Greg Kroah-Hartman -
Prefer the use of type int instead of int32_t. Checkpatch detected these
issues.Signed-off-by: Laura Garcia Liebana
Signed-off-by: Greg Kroah-Hartman
12 Mar, 2016
9 commits
-
Braces should be used on all arms of the if statement. Checkpatch
detected this issue.Signed-off-by: Laura Garcia Liebana
Signed-off-by: Greg Kroah-Hartman -
Avoid the use of multiple blank lines. Checkpatch detected these issues.
Signed-off-by: Laura Garcia Liebana
Signed-off-by: Greg Kroah-Hartman -
The lines should be adjusted to 80 characters. Checkpatch detected these
issues.Signed-off-by: Laura Garcia Liebana
Signed-off-by: Greg Kroah-Hartman -
Blank lines are not necessary after an open brace. Checkpatch detected
these issues.Signed-off-by: Laura Garcia Liebana
Signed-off-by: Greg Kroah-Hartman -
Remove commented source code. Checkpatch detected these issues.
Signed-off-by: Laura Garcia Liebana
Signed-off-by: Greg Kroah-Hartman -
Comparison to NULL should be avoided in conditions. Chackpatch detected
these issues.Signed-off-by: Laura Garcia Liebana
Signed-off-by: Greg Kroah-Hartman -
Blank line is inserted after a struct declaration. Checkpatch detected
these issues.Signed-off-by: Laura Garcia Liebana
Signed-off-by: Greg Kroah-Hartman -
Logical continuations should be on the previous line. Checkpatch detected this issue.
Signed-off-by: Laura Garcia Liebana
Signed-off-by: Greg Kroah-Hartman -
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
Acked-by: Tejun Heo
Signed-off-by: Greg Kroah-Hartman
21 Feb, 2016
2 commits
-
This patch fixes "blank lines aren't necessary after an open brace '{'"
checkpatch.pl warning in ethernet.cSigned-off-by: Dilek Uzulmez
Signed-off-by: Greg Kroah-Hartman -
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
Acked-by: David Daney
Signed-off-by: Greg Kroah-Hartman
15 Feb, 2016
1 commit
-
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
Signed-off-by: Greg Kroah-Hartman
12 Feb, 2016
2 commits
-
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
Signed-off-by: Greg Kroah-Hartman -
Add spaces around operators for better readability. Change suggested by
checkpatch.Signed-off-by: Janani Ravichandran
Signed-off-by: Greg Kroah-Hartman