From cdf2b6b39ffb9bcfb10386201ce13eef3a3eb0dc Mon Sep 17 00:00:00 2001 From: Quentin Smith Date: Thu, 18 Mar 2021 03:35:13 +0000 Subject: [PATCH 1/2] Initialize selevreq selevreq was previously being passed to ioctl without being fully initialized. --- src/raspberrypi/gpiobus.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raspberrypi/gpiobus.h b/src/raspberrypi/gpiobus.h index 943e3f5b..a3f64bec 100644 --- a/src/raspberrypi/gpiobus.h +++ b/src/raspberrypi/gpiobus.h @@ -645,7 +645,7 @@ private: DWORD signals; // All bus signals #if defined(USE_SEL_EVENT_ENABLE) && !defined(BAREMETAL) - struct gpioevent_request selevreq; // SEL signal event request + struct gpioevent_request selevreq = {}; // SEL signal event request int epfd; // epoll file descriptor #endif // USE_SEL_EVENT_ENABLE && !BAREMETAL From 5f7a0a0d86999ff1d5ec2c9f74c7ec4720ea425d Mon Sep 17 00:00:00 2001 From: Quentin Smith Date: Thu, 18 Mar 2021 03:36:08 +0000 Subject: [PATCH 2/2] Fix CD support on DaynaPort branch The CD device relies on SASIDEV.buf being at least 0x800 long. --- src/raspberrypi/controllers/sasidev_ctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raspberrypi/controllers/sasidev_ctrl.cpp b/src/raspberrypi/controllers/sasidev_ctrl.cpp index 6fc5987c..caa0aa54 100644 --- a/src/raspberrypi/controllers/sasidev_ctrl.cpp +++ b/src/raspberrypi/controllers/sasidev_ctrl.cpp @@ -54,7 +54,7 @@ SASIDEV::SASIDEV(Device *dev) #ifdef RASCSI ctrl.execstart = 0; #endif // RASCSI - ctrl.bufsize = ETH_FRAME_LEN + 16 + ETH_FCS_LEN; + ctrl.bufsize = std::max(0x800, ETH_FRAME_LEN + 16 + ETH_FCS_LEN); ctrl.buffer = (BYTE *)malloc(ctrl.bufsize); memset(ctrl.buffer, 0x00, ctrl.bufsize); ctrl.blocks = 0;