summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/dpa/dpaa_eth_proxy.c
AgeCommit message (Collapse)Author
2015-03-23dpaa_eth: Fix Shared-MAC and MACless compilation issueCristian Sovaiala
Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.com> Change-Id: Icdfb39e75fd1c7268b26209f1bcd9b0755e6192f Reviewed-on: http://git.am.freescale.net:8181/33299 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Tested-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com>
2015-02-25dpaa_eth: adjust advanced drivers to older kernelMadalin Bucur
Support for multiple drivers per kernel module comes in kernel 3.14 so we are forced to generate several modules for the advanced drivers. This patch can be dropped when the code is rebased on a kernel newer than 3.14. The problem is with the MODULE_DEVICE_TABLE macro that only from 3.14 generates different named structured based on the name parameter. The change that introduces that also needs a synchronized change in scripts/mod/file2alias.c. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
2015-02-25dpaa_eth: use common initialization functionMadalin Bucur
Use a common initialization function for MACless, shared and proxy Ethernet drivers. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: I7a0ec70b33ad7ad92cb559dbd828572f83b5c98e Reviewed-on: http://git.am.freescale.net:8181/15296 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Cristian Bercaru <cristian.bercaru@freescale.com> Conflicts: drivers/net/ethernet/freescale/dpa/dpaa_eth_base.c
2014-07-07dpaa_eth: Implement suspend/resume instead of suspend_noirq/resume_noirqCristian Sovaiala
Due to external constraints (modules loading order and registry configuration order in Auto Response mode) we need to implement suspend/resume instead of suspend_noirq/resume_noirq callbacks. Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.com>
2014-03-24dpaa_eth: add print for proxy probeMarian Rotariu
There is no indication that the proxy interface successfully initialized the attached MAC device. In this way, the user does not know if the device tree is misconfigured or the MAC device successfully probed. Other ways to check the MAC initialization exists, like MAC mem mapped registers, but a simple message in the bootlog seems way more user-friendly. Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Change-Id: I79b38719e6b49d8a4557b885a2b13854961f9b32 Reviewed-on: http://git.am.freescale.net:8181/9258 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> (cherry picked from commit f217d812c07a1be0563dffe40f4736442b5f99ee) Reviewed-on: http://git.am.freescale.net:8181/9263
2014-02-18dpaa_eth: fix PM functions for proxy driverMarian Rotariu
Run-time information regarding proxy interface should be stored and acquired only through dev_set_drvdata() and dev_get_drvdata() primitives. This information is essential for macless driver capability of controling a MAC device. Change-Id: Icaad66952874e5835b1086c0aa225ae331fc6f5f Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/8725 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> (cherry picked from commit 50e51c4f00960b29644398532cf2481e46945f9e) Reviewed-on: http://git.am.freescale.net:8181/8908 Tested-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2014-02-10dpaa_eth: remove unnecessary checkMadalin Bucur
Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: Ie97ed82463c34a6472b4f13a4ddfb6c83c6d91da Reviewed-on: http://git.am.freescale.net:8181/8653 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com>
2014-02-10dpaa_eth: include mac.h where requiredMadalin Bucur
Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: Id2e7c768df4faf1230b7e52cc3de6bc601a9184c Reviewed-on: http://git.am.freescale.net:8181/8648 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Reviewed-by: Ruxandra Ioana Radulescu <ruxandra.radulescu@freescale.com>
2014-01-06dpaa_eth: replaced printk() with pr_info()Madalin Bucur
Replaced occurences of printk() with pr_info(). Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: I9b7dbcd6ed4915e03b29fd4d8d2edd9856c83b58 Reviewed-on: http://git.am.freescale.net:8181/7450 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Reviewed-by: Marian Cristian Rotariu <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/7699
2014-01-06dpaa_eth: reduce pr_fmt() verbosityMadalin Bucur
Make pr_fmt() less verbose except for the case when FSL_DPAA_ETH_DEBUG is enabled. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: Ibaee9a31a0bdfc72c5ec4314b27fd0996bfdbaf5 Reviewed-on: http://git.am.freescale.net:8181/7449 Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Marian Cristian Rotariu <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/7698
2014-01-06dpaa_eth: fix several checkpatch reportsMadalin Bucur
Fix several issues reported by checkpatch. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: I59430f58c570e06aad7ef7d990e37a45402f296f Reviewed-on: http://git.am.freescale.net:8181/7448 Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Reviewed-by: Marian Cristian Rotariu <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/7697
2014-01-06dpaa_eth: Add support for Power Management in DPAA Proxy DriverCristian Sovaiala
Implement Power Management suspend_noirq/resume_noirq specific callbacks where we disable/enable the port. The ports initialized by the Proxy Driver (and belonging to USDPAA) do not have the AutoResponse capability enabled therefore we always disable the port during the suspend sequence. Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.com> Change-Id: Id370d5319f886a7c51aca71f4f3d003568c1f629 Reviewed-on: http://git.am.freescale.net:8181/6845 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Ruxandra Ioana Radulescu <ruxandra.radulescu@freescale.com> Reviewed-by: Marian Cristian Rotariu <marian.rotariu@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/7694 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Tested-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2014-01-06dpaa_eth: Check error codes for FMan port enable and disableCristian Bercaru
The calling functions check the error codes of 'fm_port_enable' and 'fm_port_disable'. When an error occurs they do the necessary cleanups and resets and return an error. Signed-off-by: Cristian Bercaru <cristian.bercaru@freescale.com> Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: I1055a4e2d0a20d4645b18739a6dc6e4027cb3494 Reviewed-on: http://git.am.freescale.net:8181/6856 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Ruxandra Ioana Radulescu <ruxandra.radulescu@freescale.com> Reviewed-by: Marian Cristian Rotariu <marian.rotariu@freescale.com> Reviewed-by: Thomas Trefny <Tom.Trefny@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/7677 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Tested-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2014-01-06dpaa_eth: proxy: treat error when starting proxy port failsCristian Bercaru
The proxy interface start might fail because of various reasons. In some of these cases, such as failing to start the mac device, the driver has to stop the FMan ports. Signed-off-by: Cristian Bercaru <cristian.bercaru@freescale.com> Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: I10e8d494760f9ec31efed9a0716b0306ce68959c Reviewed-on: http://git.am.freescale.net:8181/6854 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Ruxandra Ioana Radulescu <ruxandra.radulescu@freescale.com> Reviewed-by: Marian Cristian Rotariu <marian.rotariu@freescale.com> Reviewed-by: Thomas Trefny <Tom.Trefny@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/7672 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Tested-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2013-11-14dpaa_eth: remove pr_alert from proxy interfaceMarian Rotariu
With this patch the user will be able to configure the debug message display through netdev. Also, an unused variable declaration was removed. Change-Id: I203cc77fffd14ecbad8a5d115232d9eab1188168 Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/6315 Reviewed-by: Ruxandra Ioana Radulescu <ruxandra.radulescu@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Thomas Trefny <Tom.Trefny@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2013-11-14dpaa_eth: macless control over mac deviceMarian Rotariu
This patch adds a new feature to macless DPAA Ethernet Driver. The macless interface is now able to control a mac device through proxy DPAA Ethernet Driver. To do that, it maintains a reference to a proxy interface. The proxy interface offers a simple API to macless interface for start/stop and for adding and removing mac unicast and multicast addresses. Additionally, this patch will generalize some of mac API handlers. In previous implementation, the mac handler and net_device structure belong to the same network interface. With this patch, mac handler and net_device structure could belong to different network interfaces. This is needed for the new macless multicast capability, when the proxy interface that contains the mac device reference should configure multicast addresses on behalf of a macless interface. This feature is optional and can be activated by setting "proxy" attribute in the device tree node of the macless interfaces. Look in feature design document for more details. Change-Id: I92bf506324a9a834fdf27cbf989df817751b446d Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/6102 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Ruxandra Ioana Radulescu <ruxandra.radulescu@freescale.com> Reviewed-by: Thomas Trefny <Tom.Trefny@freescale.com>
2013-08-15dpaa_eth: solve several code style issuesMadalin Bucur
Fix a series of checkpatch complaints in the dpaa_eth code. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: I341d5835bb0a4491456947b8e1ae714e095cd580 Reviewed-on: http://git.am.freescale.net:8181/3811 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Rivera Jose-B46482 <Jose.G.Rivera@freescale.com>
2013-08-14dpaa_eth: move non-upstreamable common code to dpaa_eth_baseMadalin Bucur
The common code contains some parts that are not used in the private interface code. Moved that code to a new file. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: I5095bc0e7503c413d39e78cd5dff7bf84eebaca9 Reviewed-on: http://git.am.freescale.net:8181/3810 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Rivera Jose-B46482 <Jose.G.Rivera@freescale.com>
2013-07-30dpaa_eth: bpool probing code separationMadalin Bucur
First changes in the series that will separate bpool initialization for private and other drivers. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: I96ff087f37c0dd7117d9aabc3cf3554bf2c35684 Reviewed-on: http://git.am.freescale.net:8181/3560 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-15dpaa_eth: move common code to a separate fileMadalin Bucur
Created dpaa_eth_common.c to hold all common code. Moved legacy non-SG related code to its own file. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: I5a79559714f515e6889655a1cc7256a556043c45 Reviewed-on: http://git.am.freescale.net:8181/3096 Reviewed-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-15dpaa_eth: remove module loading order dependencyMadalin Bucur
The dpa_rx_extra_headroom and dpa_max_frm are set by each module init functions so there is no chance they are used before being initialized. Also use the dpa_rx_extra_headroom for SG driver. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: If521e1f41e4857b5d03963aaa9fb2fa898a2183c Reviewed-on: http://git.am.freescale.net:8181/3095 Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-15dpaa_eth: free buf_layout on error pathsMadalin Bucur
The allocated buf_layout must be freed on all error paths. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: Icf2e68f90c28adcc99fdc56492942f3595033b21 Reviewed-on: http://git.am.freescale.net:8181/3093 Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-15dpaa_eth: cleanup module load bannerMadalin Bucur
Remove function and line number from module load prints. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: I9d34d6066c51263a04157f9f9d6b275fce706392 Reviewed-on: http://git.am.freescale.net:8181/3090 Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-15dpaa_eth: move proxy initialization code to a new fileMadalin Bucur
Separated the code related to proxy interface initialization. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: Iee4f7c1ee359775901c7ac960df45537495baf47 Reviewed-on: http://git.am.freescale.net:8181/3086 Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>