NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/59678 ("ring->queued > 0" panic from utwn)



The following reply was made to PR kern/59678; it has been noted by GNATS.

From: Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
To: David Brownlee <abs%absd.org@localhost>
Cc: gnats-bugs%netbsd.org@localhost,
 kern-bug-people%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost
Subject: Re: kern/59678 ("ring->queued > 0" panic from utwn)
Date: Sat, 4 Oct 2025 05:53:58 +1000

 --Boundary-00=_XnC4oBWPMRmYAbf
 Content-Type: Text/Plain;
   charset="utf-8"
 Content-Transfer-Encoding: 7bit
 
 Hi David,
 
 I've received patches from sc_dying for better handing of xhci events with 
 regards to the ZLP that is now added on every USBD_FORCE_SHORT_XFER.
 
 Please apply this patch to your -11 srcs and let me know if it works better.
 
 This way it'll will quicken my testing and hopefully the patch will be 
 commited soon.
 
 
 Best regards,
 
 Nat
 
 --Boundary-00=_XnC4oBWPMRmYAbf
 Content-Type: text/x-patch;
   charset="ISO-8859-1";
   name="xhci-zlp.patch.1"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="xhci-zlp.patch.1"
 
 --- sys/dev/usb/xhci.c.orig	2025-08-24 09:59:43.231022329 +0000
 +++ sys/dev/usb/xhci.c	2025-09-10 08:27:57.172289557 +0000
 @@ -2576,6 +2576,20 @@ xhci_event_transfer(struct xhci_softc * 
  			return;
  	}
  
 +	/*
 +	 * If next event will be from zero-length packet,
 +	 * suppress notification of first event.
 +	 */
 +	if (xfertype == UE_BULK &&
 +	    err == USBD_NORMAL_COMPLETION &&
 +	    (xfer->ux_flags & USBD_FORCE_SHORT_XFER) &&
 +	    XHCI_TRB_2_REM_GET(le32toh(xr->xr_trb[idx].trb_2)) != 0) {
 +		DPRINTFN(100, "short xfer %#jx: suppress notification status "
 +		    "%ju pipe %#jx", (uintptr_t)xfer, xfer->ux_status,
 +		    (uintptr_t)xfer->ux_pipe, 0);
 +		return;
 +	}
 +
  	if ((trb_3 & XHCI_TRB_3_ED_BIT) == 0 ||
  	    (trb_0 & 0x3) == 0x0) {
  		/*
 
 --Boundary-00=_XnC4oBWPMRmYAbf--
 


Home | Main Index | Thread Index | Old Index