- 13 Aug, 2016 1 commit
-
-
Sunil Goutham authored
On 88xx all LMACs in a BGX will be in same mode but on 81xx BGX can be split as two and there can be LMACs configured in different modes. These changes move lmac_type, lane2serdes fields into per lmac struct from BGX struct. Got rid of qlm_mode field which has become redundant with these changes. And now no of valid LMACs is read from CSRs configured by low level firmware and figuring out the same based on QLM mode is discarded Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 29 Jun, 2016 1 commit
-
-
Sunil Goutham authored
Check for SMU RX local/remote faults along with SPU LINK status. Otherwise at times link is UP at our end but DOWN at link partner's side. Also due to an issue in BGX it's rarely seen that initialization doesn't happen properly and SMU RX reports faults with everything fine at SPU. This patch tries to reinitialize LMAC to fix it. Also fixed LMAC disable sequence to properly bring down link. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
Tao Wang <tao.wang@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 19 May, 2016 1 commit
-
-
Heinrich Schuchardt authored
In function bgx_lmac_handler only use a member of lmac after checking it is not null. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by:
David Daney <david.daney@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 14 Apr, 2016 1 commit
-
-
David Daney authored
commit b7d3e3d3 ("net: thunderx: Don't leak phy device references on -EPROBE_DEFER condition.") incorrectly moved the call to of_node_put() outside of the loop. Under normal loop exit, the node has already had of_node_put() called, so the extra call results in: [ 8.228020] ERROR: Bad of_node_put() on /soc@0/pci@848000000000/mrml-bridge0@1,0/bgx0/xlaui00 [ 8.239433] CPU: 16 PID: 608 Comm: systemd-udevd Not tainted 4.6.0-rc1-numa+ #157 [ 8.247380] Hardware name: www.cavium.com EBB8800/EBB8800, BIOS 0.3 Mar 2 2016 [ 8.273541] Call trace: [ 8.273550] [<fffffc0008097364>] dump_backtrace+0x0/0x210 [ 8.273557] [<fffffc0008097598>] show_stack+0x24/0x2c [ 8.273560] [<fffffc0008399ed0>] dump_stack+0x8c/0xb4 [ 8.273566] [<fffffc00085aa828>] of_node_release+0xa8/0xac [ 8.273570] [<fffffc000839cad8>] kobject_cleanup+0x8c/0x194 [ 8.273573] [<fffffc000839c97c>] kobject_put+0x44/0x6c [ 8.273576] [<fffffc00085a9ab0>] of_node_put+0x24/0x30 [ 8.273587] [<fffffc0000bd0f74>] bgx_probe+0x17c/0xcd8 [thunder_bgx] [ 8.273591] [<fffffc00083ed220>] pci_device_probe+0xa0/0x114 [ 8.273596] [<fffffc0008473fbc>] driver_probe_device+0x178/0x418 [ 8.273599] [<fffffc000847435c>] __driver_attach+0x100/0x118 [ 8.273602] [<fffffc0008471b58>] bus_for_each_dev+0x6c/0xac [ 8.273605] [<fffffc0008473884>] driver_attach+0x30/0x38 [ 8.273608] [<fffffc00084732f4>] bus_add_driver+0x1f8/0x29c [ 8.273611] [<fffffc0008475028>] driver_register+0x70/0x110 [ 8.273617] [<fffffc00083ebf08>] __pci_register_driver+0x60/0x6c [ 8.273623] [<fffffc0000bf0040>] bgx_init_module+0x40/0x48 [thunder_bgx] [ 8.273626] [<fffffc0008090d04>] do_one_initcall+0xcc/0x1c0 [ 8.273631] [<fffffc0008198abc>] do_init_module+0x68/0x1c8 [ 8.273635] [<fffffc0008125668>] load_module+0xf44/0x11f4 [ 8.273638] [<fffffc0008125b64>] SyS_finit_module+0xb8/0xe0 [ 8.273641] [<fffffc0008093b30>] el0_svc_naked+0x24/0x28 Go back to the previous (correct) code that only did the extra of_node_put() call on early exit from the loop. Signed-off-by:
David Daney <david.daney@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 16 Mar, 2016 1 commit
-
-
David Daney authored
It is possible, although unlikely, that probing will find the phy_device for the first LMAC of a thunder BGX device, but then need to fail with -EPROBE_DEFER on a subsequent LMAC. In this case, we need to call put_device() on each of the phy_devices that were obtained, but will be unused due to returning -EPROBE_DEFER. Also, since we can break out of the probing loop early, we need to explicitly call of_node_put() outside of the loop. Signed-off-by:
David Daney <david.daney@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 14 Mar, 2016 1 commit
-
-
David Daney authored
Remove the call to force the octeon-mdio driver to be loaded. Allow the standard driver loading mechanisms to load the PHY drivers, and use -EPROBE_DEFER to cause the BGX driver to be probed only after the PHY drivers are available. Reorder the setting of MAC addresses and PHY probing to allow BGX LMACs with no attached PHY to still be assigned a MAC address. Signed-off-by:
David Daney <david.daney@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 11 Feb, 2016 2 commits
-
-
Robert Richter authored
Signed-off-by:
Robert Richter <rrichter@cavium.com> Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David Daney authored
In the case of OF device tree, the firmware information is attached to the BGX device structure in the standard manner, so use the firmware iterators and accessors where possible. Signed-off-by:
David Daney <david.daney@cavium.com> Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 02 Dec, 2015 4 commits
-
-
Sunil Goutham authored
Enable or disable BGX LMAC's RX/TX based on corresponding VF's status. If otherwise, when multiple LMAC's physical link is up then packets from all LMAC's whose corresponding VF is not yet initialized will get forwarded to VF0. This is due to VNIC's default configuration where CPI, RSSI e.t.c point to VF0/QSET0/RQ0. This patch will prevent multiple copies of packets on VF0. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
Call netif_carrier_on() only if interface's link is up. Switching this on upon IFF_UP by default, is causing issues with ethernet channel bonding in LACP mode. Initial NETDEV_CHANGE notification was being skipped. Also fixed some issues with link/speed/duplex reporting via ethtool. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thanneeru Srinivasulu authored
While VNIC or BGX driver teardown, wait for already scheduled delayed work to finish before destroying it. Signed-off-by:
Thanneeru Srinivasulu <tsrinivasulu@caviumnetworks.com> Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thanneeru Srinivasulu authored
Signed-off-by:
Thanneeru Srinivasulu <tsrinivasulu@caviumnetworks.com> Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 27 Oct, 2015 1 commit
-
-
Julia Lawall authored
for_each_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr ): // <smpl> @@ local idexpression r.n; expression r,e; @@ for_each_child_of_node(r,n) { ... ( of_node_put(n); | e = n | + of_node_put(n); ? break; ) ... } ... when != n // </smpl> Signed-off-by:
Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 31 Aug, 2015 1 commit
-
-
Sunil Goutham authored
Support for setting VF's corresponding BGX LMAC in internal loopback mode. This mode can be used for verifying basic HW functionality such as packet I/O, RX checksum validation, CQ/RBDR interrupts, stats e.t.c. Useful when DUT has no external network connectivity. 'loopback' mode can be enabled or disabled via ethtool. Note: This feature is not supported when no of VFs enabled are morethan no of physical interfaces i.e active BGX LMACs Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
Aleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 11 Aug, 2015 2 commits
-
-
David Daney authored
Currently there is no way to get the MAC address in a firmware independent manner, so set the MAC address of the device directly from the ACPI tables. The binding agrees with the proposed standard here: http://www.uefi.org/sites/default/files/resources/nic-request-v2.pdf Based on code from: Narinder Dhillon <ndhillon@cavium.com> Tomasz Nowicki <tomasz.nowicki@linaro.org> Robert Richter <rrichter@cavium.com> Signed-off-by:
Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by:
Robert Richter <rrichter@cavium.com> Signed-off-by:
David Daney <david.daney@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Robert Richter authored
Separate DT code in preparation for follow-on ACPI integration. Based on code from: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by:
Robert Richter <rrichter@cavium.com> Signed-off-by:
David Daney <david.daney@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 30 Jul, 2015 1 commit
-
-
Thanneeru Srinivasulu authored
Cortina phy does not have kernel driver and we don't attach device with phy layer for intefaces like XFI, XLAUI etc, Hence check for interface type before calling disconnect. Signed-off-by:
Thanneeru Srinivasulu <tsrinivasulu@caviumnetworks.com> Signed-off-by:
Aleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 02 Jun, 2015 4 commits
-
-
Aleksey Makarov authored
This fixes sparse messages like this: drivers/net/ethernet/cavium/thunder/nicvf_main.c:1141:26: sparse: symbol 'nicvf_get_stats64' was not declared. Should it be static? Also remove unused declarations Reported-by:
kbuild test robot <fengguang.wu@intel.com> Signed-off-by:
Aleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Aleksey Makarov authored
They were left from development stage Reported-by:
kbuild test robot <fengguang.wu@intel.com> Signed-off-by:
Aleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Aleksey Makarov authored
This fixes sparse message: drivers/net/ethernet/cavium/thunder/nicvf_main.c:385:40: sparse: cast to restricted __le64 Reported-by:
kbuild test robot <fengguang.wu@intel.com> Signed-off-by:
Aleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Robert Richter authored
There are duplicate NODE_ID macro definitions. Move all of them to nic.h for usage in nic and bgx driver and introduce nic_get_node_id() helper function. This patch also fixes 64bit mask which should have been ULL by reworking the node calculation. Signed-off-by:
Robert Richter <rrichter@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 27 May, 2015 1 commit
-
-
Sunil Goutham authored
This patch adds support for the Cavium ThunderX network controller. The driver is on the pci bus and thus requires the Thunder PCIe host controller driver to be enabled. Signed-off-by:
Maciej Czekaj <mjc@semihalf.com> Signed-off-by:
David Daney <david.daney@cavium.com> Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
Ganapatrao Kulkarni <ganapatrao.kulkarni@caviumnetworks.com> Signed-off-by:
Aleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by:
Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by:
Robert Richter <rrichter@cavium.com> Signed-off-by:
Kamil Rytarowski <kamil@semihalf.com> Signed-off-by:
Thanneeru Srinivasulu <tsrinivasulu@caviumnetworks.com> Signed-off-by:
Sruthi Vangala <svangala@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-