summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJianhua Xie <Jianhua.Xie@freescale.com>2015-01-12 09:16:11 (GMT)
committerJianhua Xie <Jianhua.Xie@freescale.com>2015-03-09 06:55:08 (GMT)
commit3bbcd2a141e24655dd60f8b11829efaa7118c520 (patch)
treed5aac3d5bc62c2be25d7a7e2d7c948c3b53acdfe
parent5043c400cd6a60412599f52263b47df9edacbb58 (diff)
downloadlinux-fsl-qoriq-3bbcd2a141e24655dd60f8b11829efaa7118c520.tar.xz
FMD: Reset FManV3L DEFAULT_totalFifoSize to default 156K
In T1040RMDPAAAP_Rev.C, at page 103, Figure A-38 says that the Reset value of FMan_V3L of BMI Configuration 1 Register (FMBM_CFG1) is 0x026F0000, which implies that FBPS should be 0x26F = 623. So the size of free buffer pool is 624 * 256bytes = 156KB, and 156K = 5*0x6400 + 0xa00 + 2*0x3200 = 5*1G + 1*OH + 2*OP. So it is OK to most cases while keep the default reset value for FMBM_CFG1. Without this vaule, sometimes DPA Eth driver (offline port) and FMD driver might report errors like below while more than 1 offline ports are added in t1040rdb/qds dts. dpa-fman0-oh@2 { compatible = "fsl,dpa-oh"; /* Define frame queues for the OH port*/ /* <OH Rx error, OH Rx default> */ fsl,qman-frame-queues-oh = <0x68 1 0x69 1>; fsl,bman-buffer-pools = <&bp6>; fsl,qman-frame-queues-tx = <0x90 8>; fsl,fman-oh-port = <&fman0_oh2>; }; dpa-fman0-oh@3 { compatible = "fsl,dpa-oh"; fsl,bman-buffer-pools = <&bp6>; /* Define frame queues for the OH port*/ /* <OH Rx error, OH Rx default> */ fsl,qman-frame-queues-oh = <0x52 1 0x53 1>; fsl,fman-oh-port = <&fman0_oh3>; }; /* The following OP is used as inbound OP*/ dpa-fman0-oh@4 { compatible = "fsl,dpa-oh"; fsl,bman-buffer-pools = <&bp6>; /* Define frame queues for the OH port*/ /* <OH Rx error, OH Rx default> */ fsl,qman-frame-queues-oh = <0x54 1 0x55 1>; fsl,fman-oh-port = <&fman0_oh4>; }; DPA offline port reports errors as below: ...... fsl_dpa_proxy: FSL DPAA Proxy initialization driver () fsl_oh: FSL FMan Offline Parsing port driver () fsl_oh dpa-fman0-oh.24: Found OH node handle compatible with fsl,dpa-oh. fsl_oh dpa-fman0-oh.24: Allocating 0 ingress frame queues duples fsl_oh dpa-fman0-oh.24: OH port /soc@ffe000000/fman@400000/port@83000 enabled. fsl_oh dpa-fman0-oh.24: Default egress frame queue: 105 fsl_oh dpa-fman0-oh.24: Default error frame queue: 104 fsl_oh dpa-fman0-oh.24: Initialized queues: fsl_oh dpa-fman0-oh.25: Found OH node handle compatible with fsl,dpa-oh. fsl_oh dpa-fman0-oh.25: Allocating 0 ingress frame queues duples fsl_oh dpa-fman0-oh.25: OH port /soc@ffe000000/fman@400000/port@84000 enabled. fsl_oh dpa-fman0-oh.25: Default egress frame queue: 83 fsl_oh dpa-fman0-oh.25: Default error frame queue: 82 fsl_oh dpa-fman0-oh.25: Initialized queues: fsl_oh dpa-fman0-oh.26: Found OH node handle compatible with fsl,dpa-oh. fsl_oh dpa-fman0-oh.26: Allocating 0 ingress frame queues duples cpu1/1: ! MAJOR FM Error [CPU01, drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c:2669 FmSetSizeOfFifo]: Resource Is Unavailable; cpu1/1: Requested fifo size and extra size exceed total FIFO size.cpu1/1: cpu1/1: ! MAJOR FM Error [CPU01, drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c:2060 FmGetSetPortParams]: Resource Is Unavailable; cpu1/1: cpu1/1: cpu1/1: ! MAJOR FM-Port Error [CPU01, drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c:2392 FM_PORT_Init]: Resource Is Unavailable; cpu1/1: cpu1/1: cpu1/1: ! MAJOR FM Error [CPU01, drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm_port.c:871 InitFmPortDev]: Invalid State; cpu1/1: cpu1/1: cpu1/1: ! CRITICAL FM-Port Error [CPU01, drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c:3174 FM_PORT_Enable]: Invalid State; cpu1/1: cpu1/1: fsl_oh: probe of dpa-fman0-oh.26 failed with error 39 Reviewed-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28233 Reviewed-on: http://git.am.freescale.net:8181/28619 Change-Id: If44ede3d08bd079bef710e12c527101485d1ba29 CC: Jiafei Pan <Jiafei.Pan@freescale.com> Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
-rw-r--r--drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.h b/drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.h
index b7b42b5..4c1897b 100644
--- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.h
+++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.h
@@ -331,8 +331,9 @@ switch (exception){ \
#else /* (DPAA_VERSION < 11) */
/* Defaults are registers' reset values */
-#define DEFAULT_totalFifoSize(major, minor) \
- (((major == 6) && ((minor == 1) || (minor == 4))) ? (142*KILOBYTE) : (295*KILOBYTE))
+#define DEFAULT_totalFifoSize(major, minor) \
+ (((major == 6) && ((minor == 1) || (minor == 4))) ? \
+ (156*KILOBYTE) : (295*KILOBYTE))
#define DEFAULT_totalNumOfTasks 124