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.188.2.1 2025/09/12 14:48:04 snj Exp $ */
1+ /* $NetBSD: xhci.c,v 1.188.2.2 2025/10/11 10:43:25 martin 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.188.2.1 2025/09/12 14:48:04 snj Exp $" );
37+ __KERNEL_RCSID (0 , "$NetBSD: xhci.c,v 1.188.2.2 2025/10/11 10:43:25 martin Exp $" );
3838
3939#ifdef _KERNEL_OPT
4040#include "opt_usb.h"
@@ -2561,6 +2561,20 @@ xhci_event_transfer(struct xhci_softc * const sc,
25612561 return ;
25622562 }
25632563
2564+ /*
2565+ * If next event will be from zero-length packet,
2566+ * suppress notification of first event.
2567+ */
2568+ if (xfertype == UE_BULK &&
2569+ err == USBD_NORMAL_COMPLETION &&
2570+ (xfer -> ux_flags & USBD_FORCE_SHORT_XFER ) &&
2571+ XHCI_TRB_2_REM_GET (le32toh (xr -> xr_trb [idx ].trb_2 )) != 0 ) {
2572+ DPRINTFN (100 , "short xfer %#jx: suppress notification status "
2573+ "%ju pipe %#jx" , (uintptr_t )xfer , xfer -> ux_status ,
2574+ (uintptr_t )xfer -> ux_pipe , 0 );
2575+ return ;
2576+ }
2577+
25642578 if ((trb_3 & XHCI_TRB_3_ED_BIT ) == 0 ||
25652579 (trb_0 & 0x3 ) == 0x0 ) {
25662580 /*
You can’t perform that action at this time.
0 commit comments