This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16910 )
Change subject: HACK: Solve weird problem wih lost OUT transfer on ping-pong endpoint
......................................................................
HACK: Solve weird problem wih lost OUT transfer on ping-pong endpoint
This adds an unconditional endpoint reset procedure to every SET_FEATURE(UnHalt).
It doesn't really make sense that this is required, *particularly* as
we *MUST NOT* set bEndpoint->bank to 0 here.
Without this patch, I'm observing the following problem:
Every first OUT transfer after a SET_INTERFACE + UNHALT on a bulk endpoint
is lost. "lost" means that it completes successfully on the host, can
be seen completing successfully with an ACK on a USB bus analyzer,
but still doesn't show up in the firmware. No Endpoint Interrupt
is generated.
This can be reproduced by calling libusb_set_interface_alt_setting()
from the host and then submitting a single OUT transfer.
Change-Id: I18ed530e617baddf76e8f9829512443ce2a76e0d
---
M firmware/atmel_softpack_libraries/libchip_sam3s/source/USBD_HAL.c
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/10/16910/1
diff --git a/firmware/atmel_softpack_libraries/libchip_sam3s/source/USBD_HAL.c b/firmware/atmel_softpack_libraries/libchip_sam3s/source/USBD_HAL.c
index 1ebab5b..e6edda6 100644
--- a/firmware/atmel_softpack_libraries/libchip_sam3s/source/USBD_HAL.c
+++ b/firmware/atmel_softpack_libraries/libchip_sam3s/source/USBD_HAL.c
@@ -1672,6 +1672,10 @@
UDP->UDP_RST_EP |= 1 << bEndpoint;
UDP->UDP_RST_EP &= ~(1 << bEndpoint);
}
+
+ /* This fixes a weird bug with regard to ping-pong OUT endpoints */
+ UDP->UDP_RST_EP |= 1 << bEndpoint;
+ UDP->UDP_RST_EP &= ~(1 << bEndpoint);
}
/* Return Halt status */
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16910
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I18ed530e617baddf76e8f9829512443ce2a76e0d
Gerrit-Change-Number: 16910
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200117/ebf6ab9f/attachment.htm>