summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2015-03-20fmd: fix reading fm_port_ipv4_opt to not panicMandy Lavi
Change-Id: Id4166dad03d6e51202caa367de188ff8486fa9dc Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28750 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Igal Liberman <Igal.Liberman@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-19dpaa_eth: remove unused argumentMadalin Bucur
Removed unnecessary argument to dpa_bp_free(). Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: Ib16b37b0057857875805eb5692e1fd5a273883cb Reviewed-on: http://git.am.freescale.net:8181/32981 Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Reviewed-by: Marian Cristian Rotariu <marian.rotariu@freescale.com>
2015-03-18dpaa_eth: use proper recycling conditionMadalin Bucur
The condition that needs to be evaluated to determine if a certain fd is to be recycled (buffers released in the buffer pool by HW) is (fd.bpid != 0xff). Several places in the code were using the previous condition (fd.cmd & FM_FD_CMD_FCO) that is always true after the unification of the recycling and confirmation paths. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: I23789acc6879086f356ca9accfe400122fd4f0f3 Reviewed-on: http://git.am.freescale.net:8181/32879 Reviewed-by: Marian Cristian Rotariu <marian.rotariu@freescale.com>
2015-03-17fmd: MACSEC integrationMandy Lavi
This is the MACSEC lower API integration. Change-Id: I3b6f172b323f1e297d6202856524ac059b7745c1 Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/19442 Reviewed-by: Mandy Lavi <Mandy.Lavi@freescale.com> Tested-by: Mandy Lavi <Mandy.Lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28484 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-17fmd: disable auto-neg if ports is SGMII2.5GMandy Lavi
In order to do so it was also required to introduce a new if type for SGMII2.5G Change-Id: Iddbe223d8b716c3ed348c7a8a53bee0c037f04f4 Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/23474 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Shengzhou Liu <Shengzhou.Liu@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-17fmd: Render match table key statistics accessible from user spaceMarian Chereji
The key statistics for match tables are not accessible from user space using fmlib. This update implements the support for the function FM_PCD_MatchTableGetKeyStatistics to be accessible from user space. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Ibcf40fdcf7a60afc65b2f926c2a1474513ae8950 Reviewed-on: http://git.am.freescale.net:8181/25376 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Mandy Lavi <Mandy.Lavi@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-17gianfar: Reduce logging noise seen due to phy polling if link is downGuenter Roeck
Commit 6ce29b0e2a04 ("gianfar: Avoid unnecessary reg accesses in adjust_link()") eliminates unnecessary calls to adjust_link for phy devices which don't support interrupts and need polling. As part of that work, the 'new_state' local flag, which was used to reduce logging noise on the console, was eliminated. Unfortunately, that means that a 'Link is Down' log message will now be issued continuously if a link is configured as UP, the link state is down, and the associated phy requires polling. This occurs because priv->oldduplex is -1 in this case, which always differs from phydev->duplex. In addition, phydev->speed may also differ from priv->oldspeed. gfar_update_link_state() is therefore called each time a phy is polled, even if the link state did not change. Cc: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net> Change-Id: Iab3e64c4c5828133ff0e1441a087e55c5287408f Reviewed-on: http://git.am.freescale.net:8181/32703 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-17gianfar: correct the bad expression while writing bit-patternSanjeev Sharma
This patch correct the bad expression while writing the bit-pattern from software's buffer to hardware registers. Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com> Signed-off-by: David S. Miller <davem@davemloft.net> Change-Id: I3cdc480f17d1c18f47c5dbea47b843c76c9669a2 Reviewed-on: http://git.am.freescale.net:8181/32702 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-17net: gianfar: remove the unneeded check of disabled deviceKevin Hao
Since commit cd1e65044d44 ("of/device: Don't register disabled devices"), the disabled device will not be registered at all. So we don't need to do the check again in the platform device driver. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Change-Id: I3a851a9b6eb649a1fa9694970c6aa34d11f76fda Reviewed-on: http://git.am.freescale.net:8181/32701 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-17net: gianfar: add missing __iomem annotationKevin Hao
Fix the following spare warning: drivers/net/ethernet/freescale/gianfar.c:3521:60: warning: incorrect type in argument 1 (different address spaces) drivers/net/ethernet/freescale/gianfar.c:3521:60: expected unsigned int [noderef] <asn:2>*addr drivers/net/ethernet/freescale/gianfar.c:3521:60: got unsigned int [usertype] *rfbptr drivers/net/ethernet/freescale/gianfar.c:205:16: warning: incorrect type in assignment (different address spaces) drivers/net/ethernet/freescale/gianfar.c:205:16: expected unsigned int [usertype] *rfbptr drivers/net/ethernet/freescale/gianfar.c:205:16: got unsigned int [noderef] <asn:2>*<noident> drivers/net/ethernet/freescale/gianfar.c:2918:44: warning: incorrect type in argument 1 (different address spaces) drivers/net/ethernet/freescale/gianfar.c:2918:44: expected unsigned int [noderef] <asn:2>*addr drivers/net/ethernet/freescale/gianfar.c:2918:44: got unsigned int [usertype] *rfbptr Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Change-Id: I85e5f6de656028a5ff96a0083fd36aa07869e6dc Reviewed-on: http://git.am.freescale.net:8181/32700 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-17net: gianfar: mark the local functions staticKevin Hao
Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> The results of backporting this upstream fix to SDK are: * removal of unused lock|unlock_tx_qs(); * gfar_new_skb() cannot be made static beacause it is exported to ASF; Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Change-Id: I42b348fbfa33858b0db84c1055dd6b92000e3b3e Reviewed-on: http://git.am.freescale.net:8181/32699 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-17gianfar: Add FCS to rx buffer size (fix)Claudiu Manoil
For each Rx frame the eTSEC writes its FCS (Frame Check Sequence) to the Rx buffer. The eTSEC h/w manual states in the "Receive Buffer Descriptor Field Descriptions" table: "Data length is the number of octets written by the eTSEC into this BD's data buffer if L is cleared (the value is equal to MRBLR), or, if L is set, the length of the frame including *CRC*, FCB (if RCTRL[PRSDEP > 00), preamble (if MACCFG2[PreAmRxEn]=1), time stamp (if RCTRL[TS] = 1) and any padding (RCTRL[PAL])." Though the FCS bytes are removed by the driver before passing the skb to the net stack, the Rx buffer size computation does not currently take into account the FCS bytes (4 bytes). Because the Rx buffer size is multiple of 512 bytes, leaving out the FCS is not a problem for the default MTU of 1500, as the Rx buffer size is 1536 in this case. However, for custom MTUs, where the difference between the MTU size and the Rx buffer size is less, this can be a problem as the computed Rx buffer size won't be enough to accomodate the FCS for a received frame that is big enough (close to MTU size). In such case the received frame is considered to be incomplete (L flag not set in the RxBD status) and silently dropped. Note that the driver does not currently support S/G on Rx, so it has to compute its Rx buffer size based on the MTU of the device. Reported-by: Kristian Otnes <kotnes@cisco.com> Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net> Change-Id: I75eab6badeb8cd57afffee4e88a2e47fc1685a2f Reviewed-on: http://git.am.freescale.net:8181/32698 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-17fmd: optimize shared schemes used for IPR across multiple portsMandy Lavi
Change-Id: Ifb357bd9b78c06042aa6e9fbb7c50b821f955064 Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32794 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Liron Himi <Liron.Himi@freescale.com> Reviewed-by: Pinghua An <pinghua.an@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-16fmd: Fix "owner" update in remove PCD chain with header manipulationMarian Chereji
When user askes to update a particular CC Node which points to another CC node that contains entries with header manipulation the owner of the header manipulation node is increased. This patch decreases back the owner explicitly, as owner shouldn't be changed in this situation. Signed-off-by: Ella Segal <ella.segal@freescale.com> Reviewed-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Ibf963791198d47ade1d376ec1bf8902f510b9900 Reviewed-on: http://git.am.freescale.net:8181/30463 Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-13Merge remote-tracking branch 'dpaa/dpaa-next'Olivia Yin-R63875
2015-03-12dpaa_eth: fix udev interferenceMadalin Bucur
udev renames each new interface as soon as it's created so all interfaces are named eth1, resulting in name conflicts for the debugfs files created based on device name. This patch fixes that problem by imposing eth1..N naming for the debugfs entries. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: I105c0b1bf0cc604ae6c3f18eb74769b05e0367a2 Reviewed-on: http://git.am.freescale.net:8181/32669 Reviewed-by: Marian Cristian Rotariu <marian.rotariu@freescale.com>
2015-03-11dpaa_eth: fix unused variable warningMadalin Bucur
Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
2015-03-11dpaa_eth: remove unnecessary operation for onicRotariu Marian Cristian-B44860
Protocol and nexthdr, variables from ipv4 and ipv6 layers, are 1 byte long, therefore no byte order conversion is needed. Signed-off-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Change-Id: Ibaa4da641b2eeb29c8186aac9714b154eee5ab13 Reviewed-on: http://git.am.freescale.net:8181/20908 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32488
2015-03-11dpaa_eth: add reference for ioremap callsMarian-Cristian Rotariu
Signed-off-by: Marian-Cristian Rotariu <marian.rotariu@freescale.com> Change-Id: I3b79c9bb946102f52361278126d12606a1c5652e Reviewed-on: http://git.am.freescale.net:8181/32485 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2015-03-11dpaa_eth: mark per CPU variablesRotariu Marian Cristian-B44860
This annotation helps sparse track and signal issues related to per-CPU variables. Signed-off-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Change-Id: I197d6225b5b6447c78f09865c3bd09b62e43ab04 Reviewed-on: http://git.am.freescale.net:8181/20905 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32487
2015-03-11dpaa_eth: fix PFC supportMadalin Bucur
PFC support code was using a removed FQ type. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
2015-03-11dpaa_eth: fix the address settings of a FDMarian-Cristian Rotariu
There is no need to set high and low addresses separately. Signed-off-by: Marian-Cristian Rotariu <marian.rotariu@freescale.com> Change-Id: I584d11704d7d0f790ccbab7b35c7ec2ba7b1402a Reviewed-on: http://git.am.freescale.net:8181/32484 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2015-03-11dpaa_eth: memset the local declared arrayMarian-Cristian Rotariu
For some reason, in the simulator, the newly declared local array does not have the value set on 0. This patch will memset the array to 0. These values are sent to the BMan driver. Signed-off-by: Marian-Cristian Rotariu <marian.rotariu@freescale.com> Change-Id: I1a8c9c48748885e021d7d45ce3286e23a4e3c39d Reviewed-on: http://git.am.freescale.net:8181/30393 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-by: Yang Li <LeoLi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32505
2015-03-11dpaa_eth: fix debugfs errorsMarian-Cristian Rotariu
This patch removes one header dependency and attaches the debugfs directory of the DPAA Ethernet driver to the root directory of the debugfs. Signed-off-by: Marian-Cristian Rotariu <marian.rotariu@freescale.com> Change-Id: Ib84fcbd86be7e9666ff8274c2aa52915771df988 Reviewed-on: http://git.am.freescale.net:8181/29106 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-by: Mingkai Hu <Mingkai.Hu@freescale.com> Reviewed-by: Yang Li <LeoLi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32504
2015-03-11dpaa_eth: fix endianness issue in the dts parserMarian-Cristian Rotariu
The phandle value in the dtb is a BE value and will not be properly parsed on a LE architecture. This patch adds the proper device tree parser API call that has the conversion to a proper architecture integrated in its implementation. Change-Id: I2c462acaf0801bb47a2179e02fc9c8d610a6f0ff Signed-off-by: Marian-Cristian Rotariu <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/25779 Reviewed-on: http://git.am.freescale.net:8181/32503 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2015-03-11dpaa_eth: make the S/G rx routine endian portableMarian-Cristian Rotariu
This patch modifies the shared S/G rx routine used by shared and macless driver to properly receive the S/G frames from FMan. Signed-off-by: Marian-Cristian Rotariu <marian.rotariu@freescale.com> Change-Id: Icc467cb9ced12db75db28876e606e23fd3ee7788 Reviewed-on: http://git.am.freescale.net:8181/22852 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32502
2015-03-11dpaa_eth: convert sg entry to be endian portableMarian-Cristian Rotariu
The S/G entry resides in the main memory and is used directly by the FMan, therefore it needs proper conversion on both rx and tx. Change-Id: I4d85d80589fb8b72e98a13b9665ff2ebffcfc387 Reviewed-on: http://git.am.freescale.net:8181/22443 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-by: Marian Cristian Rotariu <marian.rotariu@freescale.com> Tested-by: Marian Cristian Rotariu <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32501
2015-03-11dpaa_eth: make the common code endian portableMarian-Cristian Rotariu
The parse results structure is in the main memory and is used by the FMan, which is BE. Also, the release function for an SG table entry should use the address in a proper CPU endianness. Signed-off-by: Marian-Cristian Rotariu <marian.rotariu@freescale.com> Change-Id: Iddc6ee051426a1a584e3a8b15a18b6b1544d8b49 Reviewed-on: http://git.am.freescale.net:8181/22451 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32500
2015-03-11dpaa_eth: make onic dt parser unaware of endianessRotariu Marian Cristian-B44860
The device tree values are stored in BE format. It is the of parser and driver parser job to convert the data into CPU endianness. This patch converts bpid, fqids values and phandles to CPU endianness. Change-Id: I0ea0453151f7e175c5112f145c47c6bc182a6694 Signed-off-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/20909 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32499
2015-03-11mac: make the dt parser endianness-freeRotariu Marian Cristian-B44860
The OF API used in the mac dev driver parses the device tree and uses raw pointers to data. If the CPU is LE the values read will be mixed and the device will not probe. This patch belongs to the big effort of porting eth & mac drivers to ARM architecture. Signed-off-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Change-Id: Ibb7893d950e92bf4038cf565172a77432adc1055 Reviewed-on: http://git.am.freescale.net:8181/20928 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32498
2015-03-11dpaa_eth: fix static declarations for onicRotariu Marian Cristian-B44860
The function should be properly declared as being extern or static. The lack of scope identifier will result in a sparse error. Change-Id: I32713c3c806ed6d14ae9c33d732fe42aec354b2f Signed-off-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/20906 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32497
2015-03-11offline_port: convert dt into CPU endiannessRotariu Marian Cristian-B44860
The device tree values are stored in BE format by the dt compiler. In order to support different architectures, not only BE, the values read by the offline port driver should be converted into CPU endianness. This patch convert the dt values into CPU endianness and fixes some sparse errors related to endianness. Signed-off-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Change-Id: Id7adce3b6f73619c58ac1cee9201bb63131f8d58 Reviewed-on: http://git.am.freescale.net:8181/21083 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32496
2015-03-11dpaa_eth: convert fq dts entries to CPU endianessRotariu Marian Cristian-B44860
The data related to fqs from dts are in BE. In order to be used by the CPU, the data need to be converted into CPU endianess. Because the current fqids structure is used in many ways and in many files, the code for endianess conversion is not localized. To make this patch as simple as possible, an intermediary variable was used. Change-Id: I1beec33fa3ce816899e3bb02e0cf88ed0b0d0520 Signed-off-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/20964 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32495
2015-03-11dpaa_eth: fix forward declarations for maclessRotariu Marian Cristian-B44860
The function should be properly declared as being extern or static. The lack of scope identifier together with the lack of the forward declaration will result in a sparse error. Change-Id: I0b976be7c27d9b6ae66d1725433fb1aefcc407ba Signed-off-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/20937 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32494
2015-03-11dpaa_eth: remove unnecessary conversionRotariu Marian Cristian-B44860
Protocol and nexthdr, variables from ipv4 and ipv6 layers, are 1 byte long, therefore no byte order conversion is needed. Change-Id: I487b044d9ad942cf39ccbb500318ae8d7d0d9e08 Signed-off-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/20934 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32493
2015-03-11dpaa_eth: move static variable definitionRotariu Marian Cristian-B44860
The definition of any static variable should be in the header file. Error reported by sparse. Change-Id: Ic419e2cd80c05d1b4618d9260a61b6857aa4874a Signed-off-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/20986 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32492
2015-03-11dpaa_eth: convert bp dts node in CPU endianessRotariu Marian Cristian-B44860
The addresses used to parse the device tree contain BE data as the entire device tree data. Because the CPU operates with bp data, conversion to CPU endianess is needed. Change-Id: I0f876bde5bbb9832f15289b6ecb192f6c3ba5f56 Signed-off-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/20933 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32491
2015-03-11dpaa_eth: convert define into net byte orderRotariu Marian Cristian-B44860
All the constant definitions are used in CPU endianess and the skb fields are in network byte order. A conversion should be used. Signed-off-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Change-Id: I0b07bb64b9cb2cf5c490e63152da0dd26e67131c Reviewed-on: http://git.am.freescale.net:8181/20985 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32490
2015-03-09bonding: Fix compile warningJianhua Xie
Change-Id: I3845a805706eb1f78ecd4e208c26252cec3bf5a3 Reviewed-on: http://git.am.freescale.net:8181/30479 Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
2015-03-09bonding: Remove unnecessary qman_query_fq()Jianhua Xie
when qman_init_fq() returns 0, which means fq init OK. qman_query_fq is not mandatory required any more. Change-Id: Ied9c151de47b3521949237fb123dd5be3081edfb Reviewed-on: http://git.am.freescale.net:8181/30329 Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
2015-03-09FMD: Reset FManV3L DEFAULT_totalFifoSize to default 156KJianhua Xie
In T1040RMDPAAAP_Rev.C, at page 103, Figure A-38 says that the Reset value of FMan_V3L of BMI Configuration 1 Register (FMBM_CFG1) is 0x026F0000, which implies that FBPS should be 0x26F = 623. So the size of free buffer pool is 624 * 256bytes = 156KB, and 156K = 5*0x6400 + 0xa00 + 2*0x3200 = 5*1G + 1*OH + 2*OP. So it is OK to most cases while keep the default reset value for FMBM_CFG1. Without this vaule, sometimes DPA Eth driver (offline port) and FMD driver might report errors like below while more than 1 offline ports are added in t1040rdb/qds dts. dpa-fman0-oh@2 { compatible = "fsl,dpa-oh"; /* Define frame queues for the OH port*/ /* <OH Rx error, OH Rx default> */ fsl,qman-frame-queues-oh = <0x68 1 0x69 1>; fsl,bman-buffer-pools = <&bp6>; fsl,qman-frame-queues-tx = <0x90 8>; fsl,fman-oh-port = <&fman0_oh2>; }; dpa-fman0-oh@3 { compatible = "fsl,dpa-oh"; fsl,bman-buffer-pools = <&bp6>; /* Define frame queues for the OH port*/ /* <OH Rx error, OH Rx default> */ fsl,qman-frame-queues-oh = <0x52 1 0x53 1>; fsl,fman-oh-port = <&fman0_oh3>; }; /* The following OP is used as inbound OP*/ dpa-fman0-oh@4 { compatible = "fsl,dpa-oh"; fsl,bman-buffer-pools = <&bp6>; /* Define frame queues for the OH port*/ /* <OH Rx error, OH Rx default> */ fsl,qman-frame-queues-oh = <0x54 1 0x55 1>; fsl,fman-oh-port = <&fman0_oh4>; }; DPA offline port reports errors as below: ...... fsl_dpa_proxy: FSL DPAA Proxy initialization driver () fsl_oh: FSL FMan Offline Parsing port driver () fsl_oh dpa-fman0-oh.24: Found OH node handle compatible with fsl,dpa-oh. fsl_oh dpa-fman0-oh.24: Allocating 0 ingress frame queues duples fsl_oh dpa-fman0-oh.24: OH port /soc@ffe000000/fman@400000/port@83000 enabled. fsl_oh dpa-fman0-oh.24: Default egress frame queue: 105 fsl_oh dpa-fman0-oh.24: Default error frame queue: 104 fsl_oh dpa-fman0-oh.24: Initialized queues: fsl_oh dpa-fman0-oh.25: Found OH node handle compatible with fsl,dpa-oh. fsl_oh dpa-fman0-oh.25: Allocating 0 ingress frame queues duples fsl_oh dpa-fman0-oh.25: OH port /soc@ffe000000/fman@400000/port@84000 enabled. fsl_oh dpa-fman0-oh.25: Default egress frame queue: 83 fsl_oh dpa-fman0-oh.25: Default error frame queue: 82 fsl_oh dpa-fman0-oh.25: Initialized queues: fsl_oh dpa-fman0-oh.26: Found OH node handle compatible with fsl,dpa-oh. fsl_oh dpa-fman0-oh.26: Allocating 0 ingress frame queues duples cpu1/1: ! MAJOR FM Error [CPU01, drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c:2669 FmSetSizeOfFifo]: Resource Is Unavailable; cpu1/1: Requested fifo size and extra size exceed total FIFO size.cpu1/1: cpu1/1: ! MAJOR FM Error [CPU01, drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c:2060 FmGetSetPortParams]: Resource Is Unavailable; cpu1/1: cpu1/1: cpu1/1: ! MAJOR FM-Port Error [CPU01, drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c:2392 FM_PORT_Init]: Resource Is Unavailable; cpu1/1: cpu1/1: cpu1/1: ! MAJOR FM Error [CPU01, drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm_port.c:871 InitFmPortDev]: Invalid State; cpu1/1: cpu1/1: cpu1/1: ! CRITICAL FM-Port Error [CPU01, drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c:3174 FM_PORT_Enable]: Invalid State; cpu1/1: cpu1/1: fsl_oh: probe of dpa-fman0-oh.26 failed with error 39 Reviewed-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28233 Reviewed-on: http://git.am.freescale.net:8181/28619 Change-Id: If44ede3d08bd079bef710e12c527101485d1ba29 CC: Jiafei Pan <Jiafei.Pan@freescale.com> Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
2015-03-09bonding: Add ping monitor support when link failoverJianhua Xie
when one of slaves link is down, ping reportes failed. This patch adds some debugging information to track it. Change-Id: Ied9a2f067e0b19ac4c1e94b52ea67245c04169e4 Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28618 Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
2015-03-09bonding: fix OHFRIENDNAMSIZ issueJianhua Xie
Add 1 byte for store '\0' for future sprintf calling. Change-Id: I7911c22c0ce54144ef4e0acb43302d92e1379dcf Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28617 Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
2015-03-09bonding: fix release_pcd_mem() calltraceJianhua Xie
Add NULL pointer checking to avoid release_pcd_mem calltrace while release memory. Change-Id: I83a3ed6dcd8fcff22db75dba6670ce03d427c04a Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28616 Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
2015-03-09bonding: Replace a micro SLAVE_IS_OK with IS_UPJianhua Xie
At the hot path, use IS_UP() to instead of SLAVE_IS_OK() to reduce unnecessary condition checking. Change-Id: Ib17db501fb214f74e489940912a3c3be3920f633 Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28615 Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
2015-03-09bonding: Remove a pair of duplicate readlock()Jianhua Xie
Near the caller, old codes have below read lock: ...... readlock(bond->lock); ...... readlock(bond->lock); readunlock(bond->lock); ... readunlock(bond->unlock); ...... The read lock in middle of above lines is unnecessary, which should be removed. Change-Id: Icbb1b3a15007d413101c8a36151e85dfaedd6e68 Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28614 Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
2015-03-09bonding: Refactor public subroutine op_alloc_pool_channelJianhua Xie
Old codes hide alloc_pool_channel in a subroutine, which method can't create multiple pool channels. This patch is abstracting allocation pool channel relative codes to a new subroutine, which can create multiple pool channel for different bonding instances. Change-Id: I428bf4dae0386aeb9557959f641cfd55ad707988 Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28613 Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
2015-03-09bonding: Fix klocwork issues.Jianhua Xie
Change-Id: Iedc5272bd1c367fc6944ff277b5207df44a00890 Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28612 Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
2015-03-09bonding: Refactor is_dpa_eth_port()Jianhua Xie
Change-Id: Ie5718f4acc69fe8b9990885820727422ee7ae8b7 Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28611 Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
2015-03-09bonding: Refactor CEETM QoS APIsJianhua Xie
Old codes parsed node full name to get information which ceetm required. This patch replaces the old method with the standard sys_call of_property_read_u32. Change-Id: I364b3b66837eab2e14a33977a182add3d48a273f Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28610 Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>