File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- /* $NetBSD: xhci.c,v 1.191 2025/10/05 20:04:30 riastradh Exp $ */
1+ /* $NetBSD: xhci.c,v 1.192 2025/10/10 20:21:05 nat Exp $ */
22
33/*
44 * Copyright (c) 2013 Jonathan A. Kollasch
3434 */
3535
3636#include <sys/cdefs.h>
37- __KERNEL_RCSID (0 , "$NetBSD: xhci.c,v 1.191 2025/10/05 20:04:30 riastradh Exp $" );
37+ __KERNEL_RCSID (0 , "$NetBSD: xhci.c,v 1.192 2025/10/10 20:21:05 nat Exp $" );
3838
3939#ifdef _KERNEL_OPT
4040#include "opt_usb.h"
@@ -2576,6 +2576,20 @@ xhci_event_transfer(struct xhci_softc * const sc,
25762576 return ;
25772577 }
25782578
2579+ /*
2580+ * If next event will be from zero-length packet,
2581+ * suppress notification of first event.
2582+ */
2583+ if (xfertype == UE_BULK &&
2584+ err == USBD_NORMAL_COMPLETION &&
2585+ (xfer -> ux_flags & USBD_FORCE_SHORT_XFER ) &&
2586+ XHCI_TRB_2_REM_GET (le32toh (xr -> xr_trb [idx ].trb_2 )) != 0 ) {
2587+ DPRINTFN (100 , "short xfer %#jx: suppress notification status "
2588+ "%ju pipe %#jx" , (uintptr_t )xfer , xfer -> ux_status ,
2589+ (uintptr_t )xfer -> ux_pipe , 0 );
2590+ return ;
2591+ }
2592+
25792593 if ((trb_3 & XHCI_TRB_3_ED_BIT ) == 0 ||
25802594 (trb_0 & 0x3 ) == 0x0 ) {
25812595 /*
You can’t perform that action at this time.
0 commit comments