summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-07-12qbman: unify qman and bman init in a sysinit_callHaiying Wang
and differ the initialization order for different partitions, e.g. the partition without qman/bman devices will wait till qman/bman devices are initialized or timeout setting expires. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Change-Id: If4f1e213609d1a093c009330fbf206a5deb99c5a Reviewed-on: http://git.am.freescale.net:8181/2818 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-12fsl_qman: return ERANGE if querying fq np fields fails due to invalid FQIDHaiying Wang
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Change-Id: I403a97ef3dc0f8d52e83e3155e6df6e944b51e55 Reviewed-on: http://git.am.freescale.net:8181/2817 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Thorpe Geoff-R01361 <Geoff.Thorpe@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-12qbman: remove spurious includesGeoff Thorpe
Neither of these files requires these includes. Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Change-Id: Ic1b14c959f246f4d9caf21516b11622cbc2ed4d3 Reviewed-on: http://git.am.freescale.net:8181/2416 Reviewed-by: Pledge Roy-R01356 <roy.pledge@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-12fsl_qbman: common portal lookup for usdpaa_irqGeoff Thorpe
The fsl_usdpaa.c code to find the portal that corresponds to a given mapped region already has to differentiate between qman and bman, so localise it there under a single function, rather than having fsl_usdpaa_irq.c distinguish as well and call qman and bman specific functions. Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Change-Id: Ib8ac94e04fcaff76240cf7835056538ce67d9701 Reviewed-on: http://git.am.freescale.net:8181/2634 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Pledge Roy-R01356 <roy.pledge@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-12fsl_usdpaa: some cleanups in the IRQ codeGeoff Thorpe
* do wake_up_all() outside the spinlock * map_irq() had incomplete handling for the case where the ioctl cmd is called more than once on the same IRQ FD, and it isn't really needed anyway, so instead refuse this explicitly. * kernel pr_err()s as a result of user errors is not a good idea, so changing the relevant ones to pr_debug(). * remove some redundand white-space * removed some trailing ";"s from functions Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Change-Id: Ieb2f4be392233a0f83333375e0ec91c9d592e748 Reviewed-on: http://git.am.freescale.net:8181/2633 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Pledge Roy-R01356 <roy.pledge@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-12fsl_usdpaa: fix warnings and white-spaceGeoff Thorpe
Also, the usdpaa_irq_handler() routine is made static. Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Change-Id: I0bbfd15b0743194ff8fba4fee938f3d703148b1a Reviewed-on: http://git.am.freescale.net:8181/2632 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Pledge Roy-R01356 <roy.pledge@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-12powerpc/b4860emu: Add device tree file for b4860emuYork Sun
B4860EMU is a emualtor target with minimum peripherals. It is based on B4860QDS and trimmed down most peripherals due to either not modeled or lack of board level connections. The main purpose of this minimum dts is to speed up booting on emulator. Signed-off-by: York Sun <yorksun@freescale.com> Change-Id: I1a58d3a277a6b6d862eb5171f0b0ab89b3fdfa7d Reviewed-on: http://git.am.freescale.net:8181/2264 Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-12powerpc/t4240emu: Add device tree file for t4240emuYork Sun
T4240EMU is an emulator target with minimum peripherals. It is based on T4240QDS and trimmed down most peripherals due to either not modeled or lack of board level connections. The main purpose of this minimum dts is to speed up booting on emulator. Signed-off-by: York Sun <yorksun@freescale.com> Change-Id: I419c414804eb443c186262e805036d754227e1a8 Reviewed-on: http://git.am.freescale.net:8181/2263 Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-12fsl_qbman: fix stockpile-debugging codeGeoff Thorpe
The check for concurrent access to unlocked stockpile state needs to avoid running checks when stockpiling is not enabled. Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Change-Id: Id266c29e7b4432e796c41a1dc899fbee1718336c Reviewed-on: http://git.am.freescale.net:8181/3000 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Ladouceur Jeffrey-R11498 <Jeffrey.Ladouceur@freescale.com> Reviewed-by: Wang Haiying-R54964 <Haiying.Wang@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-11Merge remote-tracking branch 'fsl_devel/sdk-v1.4.x' into sdk1.5Andy Fleming
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-11dpa_offload: Switch DPA Classifier from using fmd/crc64 to using lib/crc64Marian Chereji
The DPA Classifier is computing a CRC64 ECMA by using the Frame Manager driver. Because the CRC64 ECMA generic module was recently accepted in linux/lib it will now use this CRC64 module instead of the implementation from FMan driver. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I97acd884302d7ab53ec78b045dd5978da2bf904a Reviewed-on: http://git.am.freescale.net:8181/3257 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-11dpa_offload: Fix function free_resources to take in account errorsAnca Jeanina FLOAREA
Function free_resources was not taking in account error codes returned by free_cnts_resources and free_reqs_resources functions. In case an error occurred, function should be exited, so that the DPA Stats structure is not released. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: I74800a38f52634ca1e38e1d68d5637a4480bf525 Reviewed-on: http://git.am.freescale.net:8181/2967 Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@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-07-11dpa_offload: Improve error logging in DPA ClassifierMarian Chereji
The same error logging and display functions should be used all over the DPAA offloading drivers. "pr_err" calls were replaced with the newer "log_err" macros in DPA Classifier. Change-Id: I170b52ea716a5c0a5cae83a20e42a52fa55c8659 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/3008 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bulie Radu-Andrei-B37577 <Radu.Bulie@freescale.com> Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-11dpa_offload: Add protection against concurrent HM ops runtime modificationsMarian Chereji
When modifying a header manipulation operation at runtime, the DPA Classifier uses the FMD call FM_PCD_ManipNodeReplace. This function locks the entire PCD and will fail if the PCD is already locked (it is not a blocking function). The parallel access protection mechanism in DPA Classifier would only protect against parallel access ON THE SAME MANIP NODE. It used to ALLOW parallel access on DIFFERENT HM nodes, but this will fail due to the locking system in the FMD. This patch updates the locking mechanism in DPA Classifier for the HM runtime modification functions so that a single call to FM_PCD_ManipNodeReplace can happen at any one time. Change-Id: I833b96e177e57f76d109ec000bd34c603df5ba71 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/3007 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-07-06dpa_offload: Add support for header manipulation on DPA Classifier ↵Marian Chereji
next_table action The DPA Classifier API did not allow the user to add header manipulation on an entry whose action was sending the frames to a new classification table. This change adds this support to the DPA Classifier by adding an "hmd" (header manipulation descriptor) attribute to the "dpa_cls_tbl_next_table_desc" parameters structure. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I126cdfad8e76a8bec4453c8f7b506ad3380349e2 Reviewed-on: http://git.am.freescale.net:8181/3106 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05lib: Add CRC64 ECMA moduleMarian Chereji
Added implementation of CRC64 ECMA checksum. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Ibfe1fc6ec77b6748e30d362b776803b8574c3398 Reviewed-on: http://git.am.freescale.net:8181/3033 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Varvara Andrei-B21317 <andrei.varvara@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05dpa_offload: Added the implementation for Traffic Manager counter into DPA StatsAurelian Zanoschi
Added the Traffic Manager counter implementation into DPA Stats component. For getting the Class Queue or the Class Congestion Group counter values, the component will call QMan functions qman_ceetm_cq_get_dequeu_statistics, respectively qman_ceetm_ccg_get_reject_statistics. For both Traffic Manager Class or Congestion Group the values returned can be the number of bytes or the number of frames dequeued from a Class Queue, respectively rejected in all Class Queues that belong to the Congestion Group. Change-Id: I3d1e0b0c5a2e206de68d5745e02727b0e2aa0fad Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2877 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-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-07-05dpa_offload: Fix memory leak when plcr allocation failedAnca Jeanina FLOAREA
In function store_policy_param_to_sa_pol_list in case memory allocation of plcr failed, then the memory occupied by pol_entry needs to be released. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: I88fd3ba1403b6af4d41d06ebd179219db9b84420 Reviewed-on: http://git.am.freescale.net:8181/2970 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>
2013-07-05dpa_offload: Fix memory leaks for Classifier countersAnca Jeanina FLOAREA
For compat mode, the DPA Stats wrapper needs to allocate kernel-space memory to store the keys provided by the user-space application. After the driver call was successful, the memory must be released. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: I489a73896f50da125e331dea6e459703cbdd2e76 Reviewed-on: http://git.am.freescale.net:8181/2986 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05dpa_offload: Added checks for dpa stats user provided paramsAurelian Zanoschi
Added extra checks for user provided params at counter creation to avoid DPA Stats driver getting stuck. Change-Id: Ic1cef09937217529c34d9b8dfc1c608fe93c195d Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2876 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>
2013-07-05dpa_offload: Improved error messages with runtime information in DPA StatsAurelian Zanoschi
Updated all error messages from dpa_stats component by using the new macro's (log_err and log_warn) defined in dpa_offload. Added additional runtime information related to the counters that reported the error like counter id or member index for class counters Change-Id: Ib13652905bbbcb1da37385aa750d361452d7c09d Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2875 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>
2013-07-05dpa_offload: Add udev support for dpa_classifierMarian Chereji
Added udev support so that the device file /dev/dpa_classifier gets created automatically at boot up instead of the user needing to create it manually using mknod commands. Change-Id: Icb2212a3232fe7eddba750617059f8d8b0ba87b5 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/3009 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Varvara Andrei-B21317 <andrei.varvara@freescale.com> Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05dpa_offload: Add support for udev in DPA IPsec WrapperAndrei Varvara
the device file for ipsec character device is now created by udev deamon. Change-Id: I3ec41cbe2347c6f2b1d5e9e30c45d77e76dc9a38 Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/3016 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05dpa_offload: Fix l2_hdr_size correct usageAnca Jeanina FLOAREA
Function build_extended_encap_shared_descriptor had the fourth parameter as an uint8_t, but it must be uint32_t in order to store the l2_hdr_size. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: Iabcdc3f80aa372a695385d3d39f1759647651792 Reviewed-on: http://git.am.freescale.net:8181/2969 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Varvara Andrei-B21317 <andrei.varvara@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05powerpc/hibernate: PPC64 fix user threads access to kernel spaceWang Dongsheng
If PID is used in the TLB, after hibernation resume, the user threads will access to kernel space. We must restore PID register, because TLB will use PID. The hibernation suspend flow is trapped from user space to kernel space, the PID register is user thread pid. The hibernation resume is begin in kernel start flow, the PID alway 0. After the kernel thread back to user thread, there is not have context switch and the pid can not update, because the kernel thread is trapped form user space. So if we did't restore PID the user space of thread will be addressing in the kernel space. There are two ways to restore PID: 1/ In swsusp_arch_suspend/swsusp_arch_resume, save/resotre PID register. 2/ Form restore_processor_state to restore. this function will do context switch. switch_mmu_context(current->active_mm, current->active_mm) PPC32 Using the second method. For consistency reason, PPC64 using the same way. Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com> Change-Id: I0563be5cc5da67877e0083256c7425096cbc95e6 Reviewed-on: http://git.am.freescale.net:8181/2908 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Li Yang-R58472 <LeoLi@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-07Fix RaidEngine error status 3000000 issue.Xuelin Shi
When multi flows get into fsl_re_jr_dequeue(...), there is race condition issue about the hardware register writing. Move it into the locked area. Signed-off-by: Xuelin Shi <b29237@freescale.com> Change-Id: I8eb019b4433eab05cf96261326f7e4c1790ff6c6 Reviewed-on: http://git.am.freescale.net:8181/2901 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Li Yang-R58472 <LeoLi@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-07crypto: caam - Implement QI driver context updateVakul Garg
On a crypto transform, a setkey() operation can be performed multiple times e.g. when keys are changed. These requires updation of shared descriptor in caam_qi driver. The shared descriptor in case of QI driver is maintained inside driver context and it is prefixed with pre-header. When shared descriptor is updated by the driver application, it needs to be copied again into driver context and pre-header should also be updated. With this patch, the caam_qi driver provides new api caam_drv_ctx_update(). The caam_qi driver application has been updated to call this api when setkey() operation changes shared descriptor. Change-Id: Ice6065ac9461e2d7af2e19a8a8c6d2ad8b5394b8 Signed-off-by: Vakul Garg <vakul@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2847 Reviewed-by: Varvara Andrei-B21317 <andrei.varvara@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-06-07powerpc/bsc9132: dts: Add tbi handle to enet1 nodeHarninder Rai
Signed-off-by: Harninder Rai <harninder.rai@freescale.com> Change-Id: If1dcb88515b720a82d4193cbd11814c296cd1ed9 Reviewed-on: http://git.am.freescale.net:8181/2896 Reviewed-by: Burmi Naveen-B16502 <NaveenBurmi@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-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-06KVM: PPC: use pr_debug not printk for KVM debug printsStuart Yoder
the printk always executes whenever a vcpu is moved to a new physical cpu, which adds unnessary overhead to context switches...switch to pr_debug which only executes when enabled at compile time Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com> Change-Id: I9856ddcdb061ee6818e2b5ec090728ee1841c8f4 Reviewed-on: http://git.am.freescale.net:8181/2872 Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@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-06-05dpa_offload: Add required interfaces for IPsec offloading USDPAA use-caseMarian Chereji
The ipsec_offload application needs 2 Mac-less interfaces and 2 physical Ethernet interfaces in usdpaa. Signed-off-by: Alexandru Badicioiu <b15898@freescale.com> Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I7da4a92f72faa78cd4fb2d2cbaf2ab56b3aaf88c Reviewed-on: http://git.am.freescale.net:8181/2864 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-06-05Update RX default queue FQID for shared mac in T4/B4 device treesKuldip Giroh
- RX default FQID must match with the queue base in default distribution in the policy file. - RX error queue FQIDs are also updated for shared mac node. Signed-off-by: Kuldip Giroh <kuldip.giroh@freescale.com> Change-Id: If404811a621a97ef113685b608077e9a2c54f160 Reviewed-on: http://git.am.freescale.net:8181/2848 Reviewed-by: Garg Vakul-B16394 <vakul@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-06-04Update RX default queue FQID for shared mac in T4/B4 device treesKuldip Giroh
- RX default FQID must match with the queue base in default distribution in the policy file. - RX error queue FQIDs are also updated for shared mac node. Signed-off-by: Kuldip Giroh <kuldip.giroh@freescale.com> Change-Id: I85231f2b04203bdf6cdc5b37945db6314077ab68 Reviewed-on: http://git.am.freescale.net:8181/2837 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Garg Vakul-B16394 <vakul@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-06-03crypto: caam/qi - return 0 for success in alloc_cgrsHaiying Wang
Otherwise, unexpected cgrid releases and cgr delete will happen, which leads to cgr leaking issue later. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Change-Id: I468653655bcd4c9aa2528ea99d25b13b2d664223 Reviewed-on: http://git.am.freescale.net:8181/2824 Reviewed-by: Garg Vakul-B16394 <vakul@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-31Powerpc/dts: Correct sdhci quirk for bsc9131 and bsc9132Haijun.Zhang
We use property "sdhci,auto-cmd12" instead of "fsl,sdhci-auto-cmd12" to distinguish if the sdhc host has quirk SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12. Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com> Change-Id: Id994e69850578d907de047dde318883675911852 Reviewed-on: http://git.am.freescale.net:8181/2795 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Xie Xiaobo-R63061 <X.Xie@freescale.com> Reviewed-by: Rai Harninder-B01044 <harninder.rai@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-31powerpc/85xx: l2sram - Add compatible string for BSC9132 platformHarninder Rai
Signed-off-by: Harninder Rai <harninder.rai@freescale.com> Change-Id: Ia55010a7b82b67058e49677f2cac3030e3b3cdf1 Reviewed-on: http://git.am.freescale.net:8181/2814 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Burmi Naveen-B16502 <NaveenBurmi@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-31eSDHC: Revert: Remove Quirks for Multi block read and timeoutHarninder Rai
For BSC9132QDS platform, once Quirk related strings are corrected in device tree, the current mmc driver takes care of setting them. Signed-off-by: Harninder Rai <harninder.rai@freescale.com> Signed-off-by: Vijay Rai <vijay.rai@freescale.com> Signed-off-by: Naveen Burmi <naveenburmi@freescale.com> Change-Id: I46eb23eb234b40e0656637ce85d62debc0633a43 Reviewed-on: http://git.am.freescale.net:8181/2811 Reviewed-by: Zhang Haijun-B42677 <haijun.zhang@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Xie Xiaobo-R63061 <X.Xie@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-31dpa_offload: use the SEC Era information from the device treeAndrei Varvara
removed usage of deprecated function caam_get_era SEC Era available in the device tree Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Change-Id: I4e4bff72a9f0dccd80b17bb11d9a782decb1315a Reviewed-on: http://git.am.freescale.net:8181/2745 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Floarea Anca Jeanina-B12569 <anca.floarea@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-31dpaa_eth: Use the driver Tx queue selection mechanismIoana Radulescu
Fix the defconfigs such that the driver internal Tx queue selection mechanism is enabled. The alternative was using the kernel XPS, which causes massive damage to the recycling algorithm on forwarding scenarios. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@freescale.com> Change-Id: I983a0de4a4bd4b88d30595d74207250cf16968d7 Reviewed-on: http://git.am.freescale.net:8181/2808 Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@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>