From abb6e9cc2a353b7b8432b8e6b66aa519a4ae65c9 Mon Sep 17 00:00:00 2001 From: Daniel Hellstrom Date: Thu, 26 Aug 2021 12:25:00 +0200 Subject: grlib,gr1553bc: set table size by default when allocating list table Unless it is set by the user the ISR will not process the list. --- bsps/shared/grlib/1553/gr1553bc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bsps/shared/grlib/1553/gr1553bc.c b/bsps/shared/grlib/1553/gr1553bc.c index cf18db0ad9..2cb86e93f3 100644 --- a/bsps/shared/grlib/1553/gr1553bc.c +++ b/bsps/shared/grlib/1553/gr1553bc.c @@ -281,7 +281,7 @@ int gr1553bc_list_table_alloc ) { struct gr1553bc_major *major; - int i, j, minor_cnt, size; + int i, j, minor_cnt; unsigned int table; struct gr1553bc_priv *bcpriv = list->bc; int retval = 0; @@ -293,7 +293,7 @@ int gr1553bc_list_table_alloc list->_table_custom = bdtab_custom; /* Get Size required for descriptors */ - size = gr1553bc_list_table_size(list); + list->table_size = gr1553bc_list_table_size(list); if ((unsigned int)bdtab_custom & 0x1) { /* Address given in Hardware accessible address, we @@ -306,11 +306,12 @@ int gr1553bc_list_table_alloc DMAMEM_TO_CPU, (void *)list->table_hw, (void **)&list->table_cpu, - size); + list->table_size); } else { if (bdtab_custom == NULL) { /* Allocate descriptors */ - list->_table = grlib_malloc(size + (GR1553BC_BD_ALIGN-1)); + list->_table = grlib_malloc(list->table_size + + (GR1553BC_BD_ALIGN-1)); if ( list->_table == NULL ) { retval = -1; goto err; @@ -335,7 +336,7 @@ int gr1553bc_list_table_alloc CPUMEM_TO_DMA, (void *)list->table_cpu, (void **)&list->table_hw, - size + list->table_size ); } else { list->table_hw = list->table_cpu; @@ -377,6 +378,7 @@ err: list->table_hw = 0; list->table_cpu = 0; list->_table = NULL; + list->table_size = 0; } return retval; } -- cgit v1.2.3