summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale
AgeCommit message (Collapse)Author
2014-10-08dpaa_eth: check qman_query_cgr return valueMadalin Bucur
Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: I21558e105b5c3092e96b7e98b570e5613e8bc771 Reviewed-on: http://git.am.freescale.net:8181/17399 Reviewed-by: Cristian Bercaru <cristian.bercaru@freescale.com>
2014-09-19FMD: DSAR: Don't disable/enable Tx explicitly. Change call to exit DSAR to ↵Eyal Harari
fm_soc_resume Signed-off-by: Eyal Harari <Eyal.Harari@freesacle.com> Change-Id: I888b95ca0c7f2e13266ecf81c41e779666a6e612 Reviewed-on: http://git.am.freescale.net:8181/19106 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
2014-09-05dpaa_eth: merge recycle and confirmation queuesMarian Rotariu
In FMan v3, special transmission queues, called recycle queues, were created because it was believed that the FCO flag from the FD is not enough to differentiate between frames that are recyclable and those who are not. The frame queue flags were used to signal the BMI to release the buffers back to the default buffer pool. The last findings and FMan improvements permit recycling activation only by using FD fields. With this patch, the recycling frame queues are not needed anymore. This patch also removes the code dependency on the FMan version and improves TCP traffic in forwarding scenarios due to single transmission queues, reducing the out-of-order segments. Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Change-Id: Idd4fea4ef7883563df67cf21dea9e87435b2dee8 Reviewed-on: http://git.am.freescale.net:8181/16872 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Tested-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2014-09-05FMD: DSAR: call device_set_wakeup_enable only for AR. Do it in .suspend and ↵Eyal Harari
.resume Signed-off-by: Eyal Harari <Eyal.Harari@freesacle.com>
2014-09-05FMD: DS: configure SCFG_FMCLKDPSLPCR for all DS cases, not only AREyal Harari
Signed-off-by: Eyal Harari <Eyal.Harari@freesacle.com>
2014-09-05FMD: DSAR: configure conflict detection bit for ARP and NDEyal Harari
Signed-off-by: Eyal Harari <Eyal.Harari@freesacle.com>
2014-09-05FMD: DSAR: fixed compatibility of structures t_FmPortDsarOidsEntry and ↵Eyal Harari
auto_res_snmp_entry Signed-off-by: Eyal Harari <Eyal.Harari@freesacle.com>
2014-08-21FMD: fix build for p4080 and other old archsEyal Harari
Signed-off-by: Eyal Harari <Eyal.Harari@freesacle.com> Change-Id: I8b02d8538c564fb2deb849a2053c5a6b82661fc6 Reviewed-on: http://git.am.freescale.net:8181/17192 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Mandy Lavi <Mandy.Lavi@freescale.com> Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
2014-07-29DSAR: change name of variables to reflect their correct behaviourEyal Harari
Signed-off-by: Eyal Harari <Eyal.Harari@freesacle.com>
2014-07-29DSAR: configure tcp flags in DSAR tablesEyal Harari
Signed-off-by: Eyal Harari <Eyal.Harari@freesacle.com>
2014-07-21FMD: DSAR - fix deep sleep entry sequenceEyal Harari
The current sequence fixes the order of operations executed when entering deep sleep state. It also implements a workaround for a hardware bug by writing to fm_cld register - disabling DMA after a short idle period. Signed-off-by: Eyal Harari <Eyal.Harari@freesacle.com> Change-Id: I2c73406543495dad5a7fb240a2e8fab01b81e05e
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-06-17dpaa_eth: fix CSUM for maclessMarian Rotariu
Macless is a type of generic DPAA driver that does not know its immediate underlying HW block on TX. It can be connected with an OH port, a TX port, directly with another Macless driver in Macless-Macless scenario or with another HW module. Because not all HW modules know how to calculate CSUM, Macless triggers software computation of the CSUM. If another HW block modifies the frame it needs to trigger the Parser to recalculate CSUM. This patch adds different default values for the parse results structure that forbids the Parser from doing CSUM validation or computation. The _DTC and _RPD flags inside the Frame Descriptor are enabled together. This is the only way to deactivate HW CSUM in all the flows. Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Change-Id: I6f2e27825f082c9319ff44241d19b06bda3faf47 Reviewed-on: http://git.am.freescale.net:8181/13671 Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2014-06-17dpaa_eth: clean-up code for maclessMarian Rotariu
Remove unused local variable and unnecessary CGR function calls. Macless does not use CGR capabilities or specific port fqs. Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Change-Id: I13ac2037266948a22ab16606bd65e9e965d9aa32 Reviewed-on: http://git.am.freescale.net:8181/13672 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>
2014-06-13onic: add periodic drainingMarian Rotariu
In unidirectional flows, like UDP, generated by kernel through onic driver, the traffic can block because of numerous frames that are in HW and not released fast enough by the driver. This patch adds a timer that releases frames periodically, regardless of the reception and transmission rates. This mechanism was chosen instead of the workqueue mechanism because of its higher priority, larger than RX and TX procedures. Change-Id: I141fcb7c2857a726e5e3954cabefb923c8ac0aac Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/13569 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2014-06-04fmd: add new attribute total-fifo-size to fman chosen nodeMandy Lavi
This will enable increasing the total allowed fifo-size to more than 120KB for FManV1 parts (up to 160KB) for the purpose of better traffic performance in case that jumbo frames are involved Change-Id: I3e357e08656af7d4f6c7e1c071212ccc81825449 Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/13297 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Nir Erez <nir.erez@freescale.com> Reviewed-by: Thomas Trefny <Tom.Trefny@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-06-03dpa_eth: add FSL_DPAA_DBG_LOOP debug optionMadalin Bucur
Add debug option to divert traffic received on one DPAA interface directly to another DPAA interface. By default this option is disabled. When enabled special debugfs entries appear for each DPAA interface that allow changing the divert state from disabled (-1) to enabled by writing the Tx interface number in them. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: I7c92d074980dadef55077e43616cb3caa2787838 Reviewed-on: http://git.am.freescale.net:8181/13043 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-06-03onic: increase frequency of drainingMarian Rotariu
The draining function will be executed when each CPU has added more than 8 buffers in the draining pool. In some conditions, the sock buffers waits for the Ethernet driver to release the buffer in order to continue its transmission. To avoid memory depletion in the sock buffers, the Ethernet driver will release faster the received skb from the stack. This patch makes onic to call the drain procedure on RX path also even if there is only one buffer in the bpool. Change-Id: I19f800bbd17c23fda5739b7613fab3da355c6fbc Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/13095 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-29FMD: add dependency on CONFIG_FSL_QORIQ_PM for calling fsl_set_power_except()Eyal Harari
Signed-off-by: Eyal Harari <Eyal.Harari@freesacle.com> Change-Id: If804bfb9694ad08330e7a7c083cec9970ad4954d Reviewed-on: http://git.am.freescale.net:8181/13062 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Mandy Lavi <Mandy.Lavi@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-29fmd: fix potentially uninitialized pointerMandy Lavi
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: I5ef4f9bd5f0cb1d9b43d8bcc4ac7b1efb3b0bd38 Reviewed-on: http://git.am.freescale.net:8181/12856 Reviewed-by: Nir Erez <nir.erez@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Tested-by: Jose Rivera <German.Rivera@freescale.com> (cherry picked from commit 39967816be45a10552e25ec27e2d20de0a466534) Reviewed-on: http://git.am.freescale.net:8181/13060
2014-05-29fmd: enable addition of CCtable entry not linked to a keygenMandy Lavi
This fixes the problem that if at a time, a path between a keygen and a CCtable is broken (e.g. by deleting an entry in a previous table) then it is impossible to add any entry in that table or in any tables that are "behind" it until a new path would be created Also fixing the case w.r.t. to share CC nodes when deleting entry in a CC node attached to first port will corrupt context of ccnode shared with other ports. Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: I089982acee71c489b6ed9275b641afa74315c18f Reviewed-on: http://git.am.freescale.net:8181/12820 Reviewed-by: Nir Erez <nir.erez@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Tested-by: Jose Rivera <German.Rivera@freescale.com> (cherry picked from commit e25a50bbcd56f0c1f4a725b70eab5f75604d14a3) Reviewed-on: http://git.am.freescale.net:8181/13059
2014-05-28FMD: DSAR: stabilize DSAREyal Harari
Signed-off-by: Eyal Harari <Eyal.Harari@freesacle.com> Change-Id: Ica2eaeb13ecd0a2ad3084ad427a3e2f2da86b21f Reviewed-on: http://git.am.freescale.net:8181/13019 Reviewed-by: Mandy Lavi <Mandy.Lavi@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Tested-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-28FMD: DSAR: Conditionally compile started_ar_enter variableCristian Sovaiala
started_ar_enter variable is defined inside CONFIG_PM so guard the variable all over it is referenced. Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.com> Change-Id: I3a9ea33b20c947909689f63fddd8152f5f38c9f9 Reviewed-on: http://git.am.freescale.net:8181/13010 Reviewed-by: Eyal Harari <Eyal.Harari@freescale.com> Reviewed-by: Cristian Bercaru <cristian.bercaru@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2014-05-27FMD: DSAR: workaround patch which enables AR in DSEyal Harari
Signed-off-by: Eyal Harari <Eyal.Harari@freesacle.com> Change-Id: I90e7e97c9ff8a149893c8244cb0e8376c66eb2ad Reviewed-on: http://git.am.freescale.net:8181/12925 Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Tested-by: Richard Schmitt <richard.schmitt@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Tested-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-27dpaa_eth: Remove dependency check of fm_port_suspend/fm_port_resumeCristian Sovaiala
The APIs are implemented in FMD so no need to have this check in place. Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.com> Change-Id: Ia69b55b0f77600459ef211c624ff46cdbf1479e1 Reviewed-on: http://git.am.freescale.net:8181/12871 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-by: Eyal Harari <Eyal.Harari@freescale.com>
2014-05-21dpaa: remove FMan dynamic algorithm dependenciesCristian Bercaru
The DPAA jumbo frames optimizations do not depend anymore on the FMan dynamic resource allocation algorithm and are available on all platforms. Signed-off-by: Cristian Bercaru <cristian.bercaru@freescale.com> Change-Id: Ia270d0aeba9801d67fa401bae4215ab1f25040fe Reviewed-on: http://git.am.freescale.net:8181/12501 Reviewed-by: Mandy Lavi <Mandy.Lavi@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-21fmd: disabling OH ports no longer availableCristian Bercaru
With this patch, the option FMAN_DISABLE_OH_TO_REUSE_RESOURCES is not availeble anymore because it depends on FMAN_RESOURCE_ALLOCATION_ALGORITHM, which no longer exists. Signed-off-by: Cristian Bercaru <cristian.bercaru@freescale.com> Change-Id: I67a1e45f8b8b11c9b191cae0d8c9b56bdc912876 Reviewed-on: http://git.am.freescale.net:8181/12502 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Mandy Lavi <Mandy.Lavi@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-19fmd: change p1023 DEFAULT_totalFifoSize to 49KBMandy Lavi
49KB can accomodate buffers for 2x1G + 1xOH + 1xOP Change-Id: Ib2da4bb8e9d393f207bb756cf1b5a3ab1e75cdd2 Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/12499 Reviewed-by: Nir Erez <nir.erez@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Tested-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-19fmd: change fmanV3L DEFAULT_totalFifoSize to 142KMandy Lavi
142KB can accomodate buffers for 5x1G + 1xOH + 1xOP 5*0x6400+0xa00+0x3200=140KB Change-Id: I37d7a1713101796cf3ab942ad4981d0070df4a98 Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/12473 Reviewed-by: Jianhua Xie <jianhua.xie@freescale.com> Reviewed-by: Nir Erez <nir.erez@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Tested-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-19fmd: tgec and dtsec adjust to NO_IRQ eq 0Mandy Lavi
Change-Id: Ided02763bb84061238a52d00bc3976a6681c5bfc Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/12455 Reviewed-by: Nir Erez <nir.erez@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Tested-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-16gianfar: Revert BQL support in GianfarClaudiu Manoil
Remove BQL support from Gianfar. The original upstream commit that added BQL to Gianfar does not revert cleanly: "d8a0f1b gianfar: Add support for byte queue limits." BQL has been integrated in Gianfar by the upstream comunity with no clear reason why would it be required / how would it benefit to this particular driver. Only a few drivers have it integrated. BQL adds processing overhead to the Tx path and potential functional issues as it may stop the transmission, which could result in tx timeout. Change-Id: I71e0a99d9616bf86dd98c795a927c89f881b4b08 Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/12254 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jianhua Xie <jianhua.xie@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-16fmd: fman advanced args should not be mandatoryMandy Lavi
Change-Id: I0080ab68d4658bf8eb855b6c4b43ed2526f2a878 Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/12366 Reviewed-by: Nir Erez <nir.erez@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Tested-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-16fmd: remove wrong assumption wrt num of portsMandy Lavi
Change-Id: I54409ee49f85935ced3f9c2038a8dfcc801e6f6e Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/12365 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Nir Erez <nir.erez@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-14Merge remote-tracking branch 'origin/sdk-v1.6.x' into sdk-v1.6.xScott Wood
2014-05-14FMD: Added functions for fm soc configuration during Deep SleepEyal Harari
Signed-off-by: Eyal Harari <Eyal.Harari@freesacle.com> Change-Id: I2b775e3609510a0290e751adc1cf3726cf11904f Reviewed-on: http://git.am.freescale.net:8181/12341 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-14Merge remote-tracking branch 'stable/linux-3.12.y' into sdk-v1.6.xScott Wood
Signed-off-by: Scott Wood <scottwood@freescale.com> Conflicts: arch/sparc/Kconfig drivers/tty/tty_buffer.c
2014-05-14onic: disable buffer deallocationMarian Rotariu
In some complex scenarios, VSP cannot be enabled on Tx O/H port. To support these scenarios, a new attribute was added to onic dts node. The user should guarantee that other hw modules will release the buffers into onic draining pool, otherwise the system will leak memory. Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Signed-off-by: Ioana Tibuleac <ioana.tibuleac@freescale.com> Change-Id: Ieb6d1c9cc7d165ad71165a58bd2dbd7b46a70dbc Reviewed-on: http://git.am.freescale.net:8181/12332 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-14dpaa_eth: Reordering of FMD API calls in suspend/resume callbacksCristian Sovaiala
Reordered the fm_port_suspend/resume, set_wol API calls. Besides that, in resume callback we do not suspend the port anymore in case of error such as when the setting of MG bit fails. The goto labels have been updated accordingly. Change-Id: I1e8cbe29be4f30129162f0c152bd2914615b7b98 Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/12326 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-by: Ruxandra Ioana Radulescu <ruxandra.radulescu@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Reviewed-by: Marian Cristian Rotariu <marian.rotariu@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-13dpa_eth: set skb->data for recycled framesMadalin Bucur
Set skb->data to point towards the origin of the mapped area for recycled frames. The skb->data value is adjusted with the fd offset on reception so it needs to point towards the origin of the buffer as seen by hardware. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Change-Id: I33d96a6c56cc3c05a2331368c375ff0ce8431ae8 Reviewed-on: http://git.am.freescale.net:8181/12293 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Ruxandra Ioana Radulescu <ruxandra.radulescu@freescale.com> Reviewed-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-13Revert "fman: updating default value of FSL_FM_RX_EXTRA_HEADROOM from 64 to ↵Richard Schmitt
128 bytes" This reverts commit 98345f7c55a5a52b30aa0982cec8644ad9636bdb. Change-Id: I7cc841b30ed0e23728b40dd10057edb9c54d07fe Reviewed-on: http://git.am.freescale.net:8181/12289 Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Tested-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-13fman: Add t10xx port constraintJianhua Xie
There are two FMAN V3 version: FMAN_V3H and FMAN_V3L. Some hardware resources are different between the two version. T1040, T1042, T1020, T1022 belong to FMAN_V3L, there are 4 Offline/Host Command Ports (O/H n) in FMAN_V3L. But there are 6 Offline/Host Command Ports (O/H n) in FMAN_V3H. This patch is correcting some definition like INTG_MAX_NUM_OF_FM, FM_MAX_NUM_OF_10G_MACS, FM_MAX_NUM_OF_1G_MACS and etc. according to (T1040RM Rev D, 04/2014) Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com> Change-Id: I3f7fa9b70fad30b49cd76da57429ab8ad08b5176 Reviewed-on: http://git.am.freescale.net:8181/12241 Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-12onic: fix MTU handlingMarian Rotariu
The MTU known by the network device driver was initialized with a default value (1500) and could not be validated in accordance with DPAA values. This patch initializes the MTU with proper values and adds the posibility to be changed and validated at run-time. Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Change-Id: I44b9a9e18dbb45669e16913f0f5bdc290ec3e6b2 Reviewed-on: http://git.am.freescale.net:8181/11833 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>
2014-05-09onic: fix RX PCD fqs initializationMarian Rotariu
RX PCD fqs should have rx default handler not the error handler. This patch solves this problem and clarifies some comments related to fqs initialization. Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Change-Id: I9624a3dfce594b2b4d0fe99567dfdd8ea3cab1e0 Reviewed-on: http://git.am.freescale.net:8181/11841 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>
2014-05-09gianfar: Avoid unnecessary reg accesses in adjust_link()Claudiu Manoil
For phy devices that don't issue interrupts upon link state changes, phylib polls the link state resulting in repeated calls to adjust_link(), even if the link state didn't change. As a result, some mac registers are repeatedly read and written with the same values, which is not ok. To fix this, adjust_link() has been refactored to check first whether the link state has changed and to take action only if needed, updating mac registers and local state variables. The 'new_state' local flag, set if one of the link params changed (link, speed or duplex), has been rendered useless and removed by this refactoring. Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net> Change-Id: I796d506bfd7193f9206c122d64844b43015c09a9 Reviewed-on: http://git.am.freescale.net:8181/11912 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jianhua Xie <jianhua.xie@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-09gianfar: Use netif_device_{detach,attach}() around resetClaudiu Manoil
We need to keep the TX queues stopped throughout a reset, without triggering the TX watchdog and regardless of the link state. Given the way the watchdog works, the proper way to do this is to use netif_device_{detach,attach}() just as we do around suspend/resume. netif_device_detach() can be called to stop TX queues in a control operation other than ndo_stop, and in our case this is insured by testing the driver's RESETTING state flag. napi_disable() is called before the stopping the TX queues to make sure that the poll function is not running, and therefore there can be no netif_wake_queue() calls. (Inspired by sfc.) Change-Id: Ie00ddaf39e454938b4ab5418d038de5d1a277b03 Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/11994 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Rajan Gupta <rajan.gupta@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-09asf_gfar: Patch to fix the crash seen in ifup for bsc9132.Sandeep Malik
ASF uses two TX queues to avoid contention. BSC9132 even though having controller which can support two groups was having the DTS file written for one group. To fix this we allow ASF to override the default tx queue mapping with the "fsl,tx-bit-map" value given in the DT. This patch resolves the crash seen in case of bsc9132 board when the network interface is up and trying to xmit the packet. Signed-off-by: Sandeep Malik <Sandeep.Malik@freescale.com> --- CQ:ENGR311623 Change-Id: I9d61b0ac73674774f4b674836478048e9a0c8873 Reviewed-on: http://git.am.freescale.net:8181/12091 Reviewed-by: Claudiu Manoil <claudiu.manoil@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-09fman: updating default value of FSL_FM_RX_EXTRA_HEADROOM from 64 to 128 bytesAlok Makhariya
64 is not enough to handle IPv6-IPSec and it will impact both Linux and ASF IPSec-IPv6 performance so updating the headroom to 128 bytes CR:ENGR00309290 Signed-off-by: Alok Makhariya <B46187@freescale.com> Change-Id: Iae44de3c58d616a846a5f04d2f3013f7c7581ad7 Reviewed-on: http://git.am.freescale.net:8181/12056 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Hemant Agrawal <hemant@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-08gianfar: Check if phydev present on ethtool -AClaudiu Manoil
This fixes a seg fault on 'ethtool -A' entry if the interface is down. Obviously we need to have the phy device initialized / "connected" (see of_phy_connect()) to be able to advertise pause frame capabilities. Fixes: 23402bddf9e56eecb27bbd1e5467b3b79b3dbe58 Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net> Change-Id: I94f1a677dafca91e68029acce120e7417c75ff8f Reviewed-on: http://git.am.freescale.net:8181/11514 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jianhua Xie <jianhua.xie@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-08gianfar: 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 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 (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). Change-Id: I087e97baf289111a0841fdf69592c56d3a9a0310 Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/11624 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jianhua Xie <jianhua.xie@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-06onic: add basic ethtool handlersMarian Rotariu
This patch adds ethtool handlers for some basic operations: set/get the message level, get driver information, notify the user that the driver does not have rings by setting rings parameters to 0 values and that some MAC device related operations are not supported. Change-Id: Id8f4d3e9152f48e94822c04e34c5894ffd00ec1b Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/11659 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>