From: ljsebald <ljs...@us...> - 2023-09-03 02:01:42
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 44b00171ed98a48dce83a640af9eae66e5fe7454 (commit) via dd6971aeb1e58be17bba560474c1cc8ee8734b42 (commit) from 7b0304a5462a93cdbb247b05d5652fe8cf65d290 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 44b00171ed98a48dce83a640af9eae66e5fe7454 Merge: 7b0304a dd6971a Author: Lawrence Sebald <ljs...@us...> Date: Sat Sep 2 22:01:02 2023 -0400 Merge pull request #289 from snickerbockers/master bba: don't shut it down if it hasnt been initialized commit dd6971aeb1e58be17bba560474c1cc8ee8734b42 Author: snickerbockers <sni...@wa...> Date: Sat Sep 2 20:46:24 2023 -0400 bba: don't shut it down if it hasnt been initialized KOS crashes during shutdown if there isn't a BBA plugged in because bba_if.if_stop and bba_if.if_shutdown will both be NULL. This is a problem if you don't have one plugged in and you're trying to debug using dcload-serial because it will reboot the dreamcast instead of returning to the bootloader. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/network/broadband_adapter.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c index 0347231..6cc387a 100644 --- a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c +++ b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c @@ -1310,8 +1310,10 @@ int bba_init(void) { /* Shutdown */ int bba_shutdown(void) { /* Shutdown hardware */ - bba_if.if_stop(&bba_if); - bba_if.if_shutdown(&bba_if); + if(bba_if.flags & NETIF_RUNNING) + bba_if.if_stop(&bba_if); + if(bba_if.flags & NETIF_INITIALIZED) + bba_if.if_shutdown(&bba_if); #ifdef TX_SEMA sem_destroy(&tx_sema); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |