Skip to content

Commit 7f7baed

Browse files
pcercueiQuzarDC
authored andcommitted
bba: Fix config defines
The __is_defined() macro only resolves to 1 if the macro it's used with is defined to 1; any other value will cause __is_defined() to resolve to 0. Fix the RX_NOWRAP / TX_SEMA macros that were set, but not properly set to 1. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
1 parent 5098110 commit 7f7baed

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

kernel/arch/dreamcast/hardware/network/broadband_adapter.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@
2929

3030
#define RTL_MEM (0x1840000)
3131

32-
#define RX_NOWRAP RT_RXC_WRAP /* Default to no wrapping */
32+
#define RX_NOWRAP 1 /* Default to no wrapping */
3333
#define RX_BUFFER_SHIFT 1 /* 0 : 8Kb, 1 : 16Kb, 2 : 32Kb, 3 : 64Kb */
3434

3535
#define RX_CONFIG_DEFAULT (RT_ERTH(0) | RT_RXC_RXFTH(0) | \
36-
RT_RXC_RBLEN(RX_BUFFER_SHIFT) | RT_RXC_MXDMA(6) | RX_NOWRAP)
36+
RT_RXC_RBLEN(RX_BUFFER_SHIFT) | RT_RXC_MXDMA(6) | \
37+
(RX_NOWRAP ? RT_RXC_WRAP : 0))
3738

3839
#define RX_BUFFER_LEN (0x2000 << RX_BUFFER_SHIFT)
3940

@@ -54,7 +55,7 @@
5455
it might be a good idea to protect bba_tx with a semaphore from inside.
5556
I'm not sure lwip needs that, but dcplaya does when using both lwip and its
5657
own dcload syscalls emulation.*/
57-
#define TX_SEMA
58+
#define TX_SEMA 1
5859

5960
/* If this is defined, the dma buffer will be located in P2 area, and no call to
6061
dcache_inval_range need to be done before receiving data.

0 commit comments

Comments
 (0)