From d8ace2b3d0a52ed2c7df45f30b51ff56e7b5890f Mon Sep 17 00:00:00 2001 From: Micah Elizabeth Scott <micah@scanlime.org> Date: Mon, 7 Oct 2013 17:23:22 -0700 Subject: [PATCH] Fix SIE stall caused by unhelpful Teensy usb_dev code The original Teensy USB driver contained some code to helpfully clear any pending IN transactions when a new SETUP comes in. But this violates hardware's assumptions by messing with BDT entries from buffers that are still owned by hardware. Argh! This was causing the SIE to lock up while processing a SETUP immediately after a long control OUT transaction. --- bootloader/usb_dev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/bootloader/usb_dev.c b/bootloader/usb_dev.c index 1bd97ed..7b17e1f 100644 --- a/bootloader/usb_dev.c +++ b/bootloader/usb_dev.c @@ -317,8 +317,6 @@ static void usb_control(uint32_t stat) // clear any leftover pending IN transactions ep0_tx_ptr = NULL; - table[index(0, TX, EVEN)].desc = 0; - table[index(0, TX, ODD)].desc = 0; // first IN or OUT after Setup is always DATA1 ep0_tx_data_toggle = 1; -- GitLab