summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMandy Lavi <mandy.lavi@freescale.com>2015-05-06 12:16:54 (GMT)
committerHonghua Yin <Hong-Hua.Yin@freescale.com>2015-05-08 02:13:55 (GMT)
commitd345eaf21d8c9b032d8e9d6facf316a2b2b90ef5 (patch)
tree67c9af6ff908b72ce987c0120ed4233c477f1ec4
parent75fa2a4a3309c181dd64a1a7ded69ab0615b646c (diff)
downloadlinux-fsl-qoriq-d345eaf21d8c9b032d8e9d6facf316a2b2b90ef5.tar.xz
fmd: fix total-fifo-size related error messages
Change-Id: Ibb15bb7b55678030e577c7ec6e0f0980b49e985b Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/36009 Reviewed-by: Eyal Harari <Eyal.Harari@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com> Tested-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
-rw-r--r--drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c b/drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c
index 16dd8aa..fe05428 100644
--- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c
+++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c
@@ -153,7 +153,7 @@ static t_Error CheckFmParameters(t_Fm *p_Fm)
if (!p_Fm->p_FmStateStruct->totalFifoSize ||
(p_Fm->p_FmStateStruct->totalFifoSize > BMI_MAX_FIFO_SIZE))
RETURN_ERROR(MAJOR, E_INVALID_VALUE,
- ("totalFifoSize (curr - %d) has to be in the range 256 - %d",
+ ("totalFifoSize (currently defined as %d) has to be in the range of 256 to %d",
p_Fm->p_FmStateStruct->totalFifoSize,
BMI_MAX_FIFO_SIZE));
if (!p_Fm->p_FmStateStruct->totalNumOfTasks ||
@@ -2637,8 +2637,15 @@ t_Error FmSetSizeOfFifo(t_Handle h_Fm,
/* check that there are enough uncommitted fifo size */
if ((p_Fm->p_FmStateStruct->accumulatedFifoSize - currentVal + sizeOfFifo) >
- (p_Fm->p_FmStateStruct->totalFifoSize - p_Fm->p_FmStateStruct->extraFifoPoolSize))
- RETURN_ERROR(MAJOR, E_NOT_AVAILABLE, ("Requested fifo size and extra size exceed total FIFO size."));
+ (p_Fm->p_FmStateStruct->totalFifoSize - p_Fm->p_FmStateStruct->extraFifoPoolSize)){
+ REPORT_ERROR(MAJOR, E_INVALID_VALUE,
+ ("Port request fifo size + accumulated size > total FIFO size:"));
+ RETURN_ERROR(MAJOR, E_INVALID_VALUE,
+ ("port 0x%x requested %d bytes, extra size = %d, accumulated size = %d total size = %d",
+ hardwarePortId, sizeOfFifo, p_Fm->p_FmStateStruct->extraFifoPoolSize,
+ p_Fm->p_FmStateStruct->accumulatedFifoSize,
+ p_Fm->p_FmStateStruct->totalFifoSize));
+ }
else
{
/* update accumulated */