summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale
AgeCommit message (Collapse)Author
2013-08-30Merge branch 'b4860rev2' into sdk-v1.4.xJ. German Rivera
2013-08-28fmd: fix muram size for b4860rev2Mandy Lavi
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: Id1be0b2511e5c36fd785f8ee72f4189305c7ac71 Reviewed-on: http://git.am.freescale.net:8181/4105 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2014-04-27dpaa_eth/mac: Sync with the unique MDIO bus name for "fixed-link" PHY(s)Shruti Kanetkar
'9e6c643 phy/fixed: use an unique MDIO bus name' changed the name of the fixed PHY bus to "fixed-0". This update has been already done for the non-dpaa SoC(s) in 'e5c7d1f of/mdio: fix fixed link bus name' Signed-off-by: Shruti Kanetkar <Shruti@Freescale.com> Change-Id: Ie2ead771bc74a2b62c26eca6b5618bdebbe1eb61 Reviewed-on: http://git.am.freescale.net:8181/4129 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Hamciuc Bogdan-BHAMCIU1 <bogdan.hamciuc@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-08-28dpaa_eth/mac: Sync with the unique MDIO bus name for "fixed-link" PHY(s)Shruti Kanetkar
'9e6c643 phy/fixed: use an unique MDIO bus name' changed the name of the fixed PHY bus to "fixed-0". This update has been already done for the non-dpaa SoC(s) in 'e5c7d1f of/mdio: fix fixed link bus name' Signed-off-by: Shruti Kanetkar <Shruti@Freescale.com> Change-Id: Ie2ead771bc74a2b62c26eca6b5618bdebbe1eb61 Reviewed-on: http://git.am.freescale.net:8181/4129 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Hamciuc Bogdan-BHAMCIU1 <bogdan.hamciuc@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-08-27Merge branch 'b4860rev2' into sdk-v1.4.xJ. German Rivera
2013-08-12fmd: remove unused macrosMandy Lavi
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: If2fda57aaf42719d0a3aae2256d513856583913b Reviewed-on: http://git.am.freescale.net:8181/3427 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-08-12fmd: handle erratum A006981Mandy Lavi
Changes open dma allocation to workaround erratum A006981 Also verify that it applies only to B4-rev1 while rev2 should have this erratum fixed Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: Icc0552269da9ad80763e8ad1394d6ad67ee143a8 Reviewed-on: http://git.am.freescale.net:8181/3428 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-08-12fmd: better support debug in preemptible kernelMandy Lavi
Prevent sleeping function to be called from invalid context Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: I1fa7619489248c823d55a96b00cc4b7bd75bbf6d Reviewed-on: http://git.am.freescale.net:8181/3430 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-08-08fmd: add ioctl support to both xxTableGetMissStatistics functionsMandy Lavi
FM_PCD_MatchTableGetMissStatistics and FM_PCD_HashTableGetMissStatistics Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: I56a02300f4603245344effc898ff9fdd137d8e4c Reviewed-on: http://git.am.freescale.net:8181/3905 Reviewed-by: Schmitt Richard-B43082 <B43082@freescale.com> Tested-by: Schmitt Richard-B43082 <B43082@freescale.com>
2013-08-08fmd: add T4/B4 definition FM_NO_GUARANTEED_RESET_VALUESMandy Lavi
Apparently reset values of B4/T4 in fmd are not completely reliable. will use this definition to force fman init values. Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: Id0b16cf7faf8c53ab9741bcd370e27e91a9ab2a0 Reviewed-on: http://git.am.freescale.net:8181/3904 Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Tested-by: Schmitt Richard-B43082 <B43082@freescale.com> Reviewed-by: Schmitt Richard-B43082 <B43082@freescale.com>
2013-08-08fmd: support retrieval of more statistics countersMandy Lavi
- miss entry in a CC Node - miss entry in the hash table Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: Iacbebff6f8f7ef1fa9c97b24d1072515f5098860 Reviewed-on: http://git.am.freescale.net:8181/3828 Reviewed-by: Lavi Mandy-R52568 <Mandy.Lavi@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Schmitt Richard-B43082 <B43082@freescale.com> Tested-by: Schmitt Richard-B43082 <B43082@freescale.com>
2013-08-07gianfar: Add ethtool -A support for pause frameClaudiu Manoil
Allow Rx/Tx pause frame configuration via ethtool. The gfar devices feature link autonegotioation by default. The device is being configured with the new pause frame settings during link autonegotiation (see adjust_link()). Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Change-Id: Icd0b4155ad10e6f9174ffe17c8bf5bec748f9142 Reviewed-on: http://git.am.freescale.net:8181/3651 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-08-07gianfar: Fix pause frame handling for half duplex linksClaudiu Manoil
MACCFG1 register bits to enable PAUSE frame handling are set by the driver unconditionally. Per 802.3 standard, PAUSE frame handling is a full duplex feature, and neither meaningful nor correct in half duplex. Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Change-Id: I3066169b9e96f1c29391ac7636a26ca4152129c3 Reviewed-on: http://git.am.freescale.net:8181/3650 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-22fmd: better support debug in preemptible kernelMandy Lavi
Prevent sleeping function to be called from invalid context Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: I1fa7619489248c823d55a96b00cc4b7bd75bbf6d Reviewed-on: http://git.am.freescale.net:8181/3430 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-22fmd: handle erratum A006981Mandy Lavi
Changes open dma allocation to workaround erratum A006981 Also verify that it applies only to B4-rev1 while rev2 should have this erratum fixed Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: Icc0552269da9ad80763e8ad1394d6ad67ee143a8 Reviewed-on: http://git.am.freescale.net:8181/3428 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-22fmd: remove unused macrosMandy Lavi
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: If2fda57aaf42719d0a3aae2256d513856583913b Reviewed-on: http://git.am.freescale.net:8181/3427 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-22gianfar: Fix illegal access when skb recycling disabledClaudiu Manoil
When the skb recycling feature is disabled via module param (gfar_skb_recycling_en), rec->local is being accessed while not initialized. Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Change-Id: I0f9d355302e694860cc3d46c296409126887b4a9 Reviewed-on: http://git.am.freescale.net:8181/3369 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-18fmd: COMPAT array size increased in order to be able to map more ccnode idsMandy Lavi
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> ENGR00270413 Change-Id: I9ca855698d1eaa93b7cb131d811f4c9dd6c72088 Reviewed-on: http://git.am.freescale.net:8181/3297 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-18fmd: fix wrapper error when adding range statistics countersMandy Lavi
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> ENGR00269928 Change-Id: I7fa7fec2f1eef4b8233ed0d0069e30557adb4bda Reviewed-on: http://git.am.freescale.net:8181/3296 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-18fmd: fix ambiguity with naming of ports in sysfsMandy Lavi
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> ENGR00258538 Change-Id: If05f2a070c35c9884782d879566b04f40accfab8 Reviewed-on: http://git.am.freescale.net:8181/3295 Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-18fmd: exposed muram free size through sysfsMandy Lavi
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: I69b5d2f92045daa71fd8dd6765596397fe736ef5 Reviewed-on: http://git.am.freescale.net:8181/3292 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Hamciuc Bogdan-BHAMCIU1 <bogdan.hamciuc@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-11dpaa_eth: Handle buffer pool depletionIoana Radulescu
If the system gets into an out-of-memory state, we are unable to refill the default buffer pool with new buffers. While this lasts, just release any incoming frame back to the pool without further processing. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@freescale.com> Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: Ia7fe59c44aa371f81540b45d197aef896b6d6b3a Reviewed-on: http://git.am.freescale.net:8181/3050 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05dpaa_eth: Fix pool counters on error pathBogdan Hamciuc
When system memory is depleted, the Rx buffers are put back into their pool. Bad accounting on that error path made it so the software software counters remained behind the hardware counters, eventually allowing for negative totals. Fix this and keep the software pool counters in sync with the hardware counters. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@freescale.com> Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: I46191bc38f12aa6a25378eba3e5891bc3f18cbc6 Reviewed-on: http://git.am.freescale.net:8181/3049 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-06-15Revert "fmd: Conditionally set default MAX_FRAME_SIZE"Bogdan Hamciuc
The initial patch was meant to allow the user to set any MTU she desires without rebooting the system and changing the kernel bootargs. This however led to problems when the user would manually choose FSL_DPAA_ETH_OPTIMIZE_FOR_IPFWD, because the default MAX_FRAME_SIZE=9600 would remain selected and this wasn't all that obvious. Reverting to the previous config selection is the best choice now. This reverts commit 68dbabbdb1e28169a372530ca3712c3b63296322. Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: I71499e9b86f8909d049ff4347c4fe035e67d704a Reviewed-on: http://git.am.freescale.net:8181/2971 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Schmitt Richard-B43082 <B43082@freescale.com> Tested-by: Schmitt Richard-B43082 <B43082@freescale.com>
2013-06-15dpaa_eth: Switch compile-time default optimizationBogdan Hamciuc
Move back to the "optimize for IPFWD" compile-time choice. This effectively reverts commit id 692f5140. Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: I9735f489789b7568ae6f6137387d01a92bec9ee2 Reviewed-on: http://git.am.freescale.net:8181/2972 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Schmitt Richard-B43082 <B43082@freescale.com> Tested-by: Schmitt Richard-B43082 <B43082@freescale.com>
2013-06-11fmd,dpaa_eth: Selectively reenable FMan allocation algorithmBogdan Hamciuc
On P3/P4/P5 platforms, as well as on P1023, FMan's default resource allocation values are not enough to enable jumbo frame forwarding in the absence of SG support. Enable the (previously deselected) FMan dynamic resource allocation algorithm on those platforms, if the legacy DPAA-Ethernet driver (missing SG support) is used. Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: I6dfc9e2c624c123febfc4d2cbe8fe1fda660525d Reviewed-on: http://git.am.freescale.net:8181/2929 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Lavi Mandy-R52568 <Mandy.Lavi@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-06-11dpaa_eth: Fix endless loop in case of memory depletionBogdan Hamciuc
Check the return value from the buffer-allocating function, in order to prevent looping forever if memory depletes. Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: Ia321b33ebb38012679248ae4905d4dafaa8efd7d Reviewed-on: http://git.am.freescale.net:8181/2928 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> 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-06-07dpaa_eth: Set a fixed upper limit for recycleable buffer sizeIoana Radulescu
Until now we considered a buffer recycleable if its size didn't exceed the buffer pool size by more than a certain amount. Recent changes in the stack however allow the allocation of skb buffers much larger than the requested size, which impacts our ability to recycle forwarded frames, especially when jumbo frame support is enabled. Make the recycling size upper limit a fixed and sufficiently large value, regardless of the default size of the buffer pool, in order to simplify recycling logic and guard against unfavourable cases. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@freescale.com> Change-Id: I311903357335492e821f51fac8a448d67fd73433 Reviewed-on: http://git.am.freescale.net:8181/2899 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Hamciuc Bogdan-BHAMCIU1 <bogdan.hamciuc@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-06-07dpaa_eth: Fix computation of cache paddingIoana Radulescu
When computing the padding between the beginning of a FD buffer and the head of the skb associated to it, we wrongly assume that this padding is always lower than PAGE_SIZE. In ip forward scenarios with jumbo frames support enabled and Rx extra headroom not zero, the above assumption is proven incorrect. Properly compute the padding size in order to avoid skb corruption. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@freescale.com> Change-Id: I24f08e3cc782a73cbd12d99445c326c530e3d8f2 Reviewed-on: http://git.am.freescale.net:8181/2898 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Hamciuc Bogdan-BHAMCIU1 <bogdan.hamciuc@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-06-06fmd: B4/T4: Changed allocation of liodnBase to the Host CommandMandy Lavi
Changed allocation of liodnBase to the Host Command. For Fmanv3 platforms the first (index 1) Offline Port is not used therefore the liodnBase should be set starting with index 2 not 1 CR:ENGR00261726 Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com>
2013-06-06dpaa_eth: Fix Tx/TxConfirm initialization bugBogdan Hamciuc
Due to a bad iterator, the Txq initialization logic mangled the Tx queues settings and their respective Tx Confirmation FQs assignments. Aside from the obvious structural problem, this created a nasty imbalance in transmit and confirmation FD processing, resulting in sustained degradation of termination use-cases. Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: Id28a8499c16405d7d4df5d2e66f1ece241409144 Reviewed-on: http://git.am.freescale.net:8181/2861 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@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-05-31powerpc/dpaa: workaround of fixed-linkShaohui Xie
fixed-link does not work in 3.8.x, to make XFI work which has no PHY, it's actually not necessary to use fixed-link, otherwise there will be more work and code changes to make fixed-link work in 3.8.x. For now, if driver does not find the phy_node of MAC, just set the mac_dev->phy_dev = NULL and return 0; we can get XFI work and this won't break other ethernet ports. It's only for SDK1.4, if we decide to bring fixed-link back, it can be done after SDK1.4. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Change-Id: I930edbe76f5d739f7d6565d3a7f8a3aabf224db0 Reviewed-on: http://git.am.freescale.net:8181/2797 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zang Tiefei-R61911 <tie-fei.zang@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-31dpaa_eth: Create TxConf FQs with HOLDACTIVE flagBogdan Hamciuc
Tx Confirmation FQs tend, with originating traffic, to generate a high number of portal interrupts. A machine doing only TCP transmits may well end up having more portal interrupts than its Rx peer. By setting the HOLDACTIVE flag on the Tx Confirmation FQs, we significantly reduce the number of portal interrupts in termination tests. The quantitative effect is anywhere between 2% and 4% on Tx-mainly cores (most visible in UDP_STREAM tests, least visible on TCP_STREAM). Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: I54e2e8287f72da0cfe231af91c624be805ddee17 Reviewed-on: http://git.am.freescale.net:8181/2815 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@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-05-31dpaa_eth: Increase maximum allowed size for buffer recycleIoana Radulescu
There is an upper limit for the size of a recycleable skb, in order to prevent unbounded growth of the recycled buffers. This limit was however too strict and could prevent recycling for some of the skbs found on the ipforward path. Relax the recycling condition, such as to also account for internal buffer padding, skb alignment padding and sh_info size. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@freescale.com> Change-Id: I0f0b8a48a564657dd107661d6bb5ad474ce8a7a8 Reviewed-on: http://git.am.freescale.net:8181/2807 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Hamciuc Bogdan-BHAMCIU1 <bogdan.hamciuc@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-30dpaa_eth: export interface type in sysfsCristian Sovaiala
For Mac-less interfaces we also export the index of the interface so that it can be used in udev rules for interface renaming. Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.com> Change-Id: I522c563ff876cf8c59aad492b057fe91b1f601f5 Reviewed-on: http://git.am.freescale.net:8181/2783 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Hamciuc Bogdan-BHAMCIU1 <bogdan.hamciuc@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-29dpaa_eth: Differentiate printouts from the Error FQBogdan Hamciuc
Print messages with error FD codes were identical on the Rx Default and Rx Error paths. Add a small text differentiator on the Rx Error path. Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: I5a1367e2a25df6117ca5454b77862a42714a3112 Reviewed-on: http://git.am.freescale.net:8181/2760 Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com> Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-29fmd: Conditionally set default MAX_FRAME_SIZEBogdan Hamciuc
FSL_FM_MAX_FRAME_SIZE used to be conservatively set to 1522, to accomodate the driver without S/G support. But in fact the default value should depend on whether S/G support is available or not. Using 9600 as the default max frame size, if S/G support is available in the DPAA Ethernet driver. Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: I82d4c0b41f4a46e3464eb4d64239bb3d4a4158dc Reviewed-on: http://git.am.freescale.net:8181/2759 Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@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-05-29dpaa_eth: Minor optimization to _dpa_cleanup_tx_fd()Bogdan Hamciuc
Factor number of skb fragments out of the for loop. Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: I750ebee25d92a9a609e1f17187c1e999d179836b Reviewed-on: http://git.am.freescale.net:8181/2758 Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@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-05-29dpaa_eth: Use page fragment for egress SGT bufferBogdan Hamciuc
Fragmented skbuffs are wrapped in SG frames before being enqueued to FMan's Tx port. A new buffer needs to be allocated on Tx (and freed on Tx Confirm) to contain the SGT. Up until now, this buffer was one full page. Using the page fragment APIs to get smaller buffers for the SGT. Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: I1da07141b119ca431e276025d833178cd73a1077 Reviewed-on: http://git.am.freescale.net:8181/2757 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> 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-05-29dpaa_eth: Reshuffle struct dpa_priv_sBogdan Hamciuc
Reorder fields in struct dpa_priv_s, based on the frequency of access on the hotpaths. Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: I06a97e6a647b44a5b398c4dd759460175e1b6bba Reviewed-on: http://git.am.freescale.net:8181/2756 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com> Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-29dpaa_eth: Remove unused dpa_priv_s argumentBogdan Hamciuc
Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Change-Id: I5a8f34a48fe549d00a49270fa1b0442ead3bf5fa Reviewed-on: http://git.am.freescale.net:8181/2755 Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> 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> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-29fmd: changed field name from portParams to port_paramsMandy Lavi
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: I5efcdbe646486c9b1b0863a714fc49bc7d7ccb3f Reviewed-on: http://git.am.freescale.net:8181/2754 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-28fmd: applied the appropriate liodn_offset to all VSPsMandy Lavi
CR:ENGR00263170 The previous default liodn_offset is no longer valid in sdk1.4 Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: I9acbe9433e4c569b197139d5d9201af740f318f0 Reviewed-on: http://git.am.freescale.net:8181/2732 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bulie Radu-Andrei-B37577 <Radu.Bulie@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-28gianfar: asf: optimizations for ASF IPsec forwardingRajan Gupta
Patch optimizes the skb clean up for packets processed by ASF IPsec by using gfar_asf_reclaim_skb() instead of skb_recycle(). Patch also re-cycles the SKB after DMA to eTsec, instead of recycling it when the TX BD is used next time. Change-Id: Iaa396ee2ac89a1ee8b5e8434870481f18674a6d9 Signed-off-by: Rajan Gupta <rajan.gupta@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2713 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Manoil Claudiu-B08782 <claudiu.manoil@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-24gianfar: Fix tx/rx queue dma_base programming for 36bit modeClaudiu Manoil
For 36 bit mode, TBASEH/RBASEH eTSEC regs need to be programmed with the upper 32-bit part of the DMA base addr of the BD region. This is needed when the BDs are allocated in L2 SRAM above the 4G boundary. For addresses below 4G, which is the default use case, these registers just maintain their default reset value of 0. Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Change-Id: I69e3b86c09ad11780d7124031dd582dc8cd697f0 Reviewed-on: http://git.am.freescale.net:8181/2696 Reviewed-by: Gupta Rajan-B15745 <rajan.gupta@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-24gianfar: Add BD rings allocation to L2 SRAMClaudiu Manoil
When this option is enabled the driver will try to allocate the buffer descriptors (BDs) to the L2 SRAM memory, using the powerpc/85xx cache-sram support API for the P1/P2 QorIQ platforms. For this to work, the size and the address of the SRAM region must be provided as kernel boot params. Should the attempt to allocate in L2 SRAM fail, the driver falls back to normal allocation of BDs as before (i.e. to DDR). The gfar_l2sram_en driver module param is provided to allow to disable the allocation to L2 SRAM at driver level (enabled by default). Sysfs stubs allow to enable/diable allocation of BDs to L2 SRAM for individual gianfar devices, as the L2 SRAM is an expensive resource. By default, each device has this feature enabled. This feature also disables the BD L2 stasing feature by default. Stasing however may still be configured per device via sysfs. Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Change-Id: Ie967cd24c2c6d6654b33d175be0d9e3c785c324a Reviewed-on: http://git.am.freescale.net:8181/2596 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Gupta Rajan-B15745 <rajan.gupta@freescale.com> Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-24dpaa_eth: Simplified allocation of private buffer poolMarian Rotariu
With this patch, some unnecessary instructions are removed. There is no need to know the CPU that executes the allocation procedure. This will eliminate some of dpa_make_private_pool() requirements (no need to disable thread migration or preemption). The CPU whose counters will be updated must now be provided to dpa_bp_add_8(). Change-Id: I09bc88a69649cd52ad1b0055c00117cff5313eac Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2689 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com> Reviewed-by: Hamciuc Bogdan-BHAMCIU1 <bogdan.hamciuc@freescale.com> Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-24fmd: fmd21.1 integrationMandy Lavi
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> - PFC Adjustments for PFC configuration constraints and limitations related to port prefetch mode - workaround ucode issues Fix the following HW erratas regarding discard/error frames on V3: FM_OP_NO_VSP_NO_RELEASE_ERRATA_FMAN_A006675 - Description: OP without VSP will cause buffer leaks when instructed to discard a frame. Workaround: FW will release the buffers. FM_ERROR_VSP_NO_MATCH_SW006 - Description: Any port with VSP enabled and multiple VSPs are configured on this port can cause a situation where an error frame will be enqueued to the error queue not with the default VSP. Workaround: FW will replaced the current VSP with the default VSP just before the frame is being enqueued to the error queue. - Chosen-node new parameter support errors-to-discard Usage: optional Value type: <u32> Definition: Specifies which errors should be discarded. Errors that are not in the mask, will not be discarded; I.e. those errors will be enqueued and sent to the default error queue. Change-Id: Ib468c67de88376e17d9c39ab5a0c8fc5b33b7b82 Reviewed-on: http://git.am.freescale.net:8181/2605 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Garg Vakul-B16394 <vakul@freescale.com> Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Wang Haiying-R54964 <Haiying.Wang@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-24gianfar: avoid allocating new skb to rx ring for fwd packets.Rajan Gupta
Patch enhances the performance for forwarded traffic by re-using the skb in rx ring instead of allocating a new skb. Changes are done under RX_TX_BUFF_XCHG patch which gets enabled for ASF enabled kernel only. Patch also removes per-cpu variables used in RX_TX_BUFF_XCHG patch, replacing with parameters in skbuff structures to enhance the performance. Change-Id: I2b3c1ec80fe3ef21ade9ce881d5cb86695169518 Signed-off-by: Rajan Gupta <rajan.gupta@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2678 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Manoil Claudiu-B08782 <claudiu.manoil@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-20Merge tag 'v3.8.13'Scott Wood
This is the 3.8.13 stable release