Port-arm archive

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

Re: Panic with ehci in Orange PI PC





On 17/01/2018 17:25, trebol wrote:


On Wed, 17 Jan 2018, Nick Hudson wrote:

On 01/15/18 18:09, trebol wrote:
Hello, if you want I'll send a PR.

panic: kernel diagnostic assertion "j < exfer->ex_nsqtd" failed: file "/usr/src/sys/dev/usb/ehci.c", line 2980 j=1 nsqtd=1
cpu0: Begin traceback...
0x99e6192c: netbsd:db_panic+0xc
0x99e61944: netbsd:vpanic+0x1a4
0x99e6195c: netbsd:__udivmoddi4
0x99e619fc: netbsd:ehci_reset_sqtd_chain.isra.2+0x4f4
0x99e61a44: netbsd:ehci_device_bulk_start+0xb8
0x99e61a6c: netbsd:usbd_transfer+0xb4
0x99e61adc: netbsd:athn_usb_start+0x1f8
0x99e61b04: netbsd:if_transmit+0x108
0x99e61b44: netbsd:ether_output+0x464
0x99e61b6c: netbsd:ip_if_output+0x60
0x99e61c5c: netbsd:ip_output+0x114c
0x99e61d34: netbsd:tcp_output+0x1b48
0x99e61e9c: netbsd:tcp_input+0x11f8
0x99e61f64: netbsd:ipintr+0xa10
0x99e61fac: netbsd:softint_dispatch+0xd4
Bad frame pointer: 0x807cdf6c
cpu0: End traceback...

This happen randomly with an Atheros usb wireless card.

regards,
trebol.


OK, I see the bug... will try and cook up a patch

PRs are always good as I'm likely to forget:)

Nick



All right, I'll send one.

Did you do this? I didn't spot it yet.

I think this patch will fix it for athn

Nick
Index: sys/dev/usb/if_athn_usb.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/if_athn_usb.c,v
retrieving revision 1.24
diff -u -p -r1.24 if_athn_usb.c
--- sys/dev/usb/if_athn_usb.c	18 Oct 2017 16:01:58 -0000	1.24
+++ sys/dev/usb/if_athn_usb.c	17 Jan 2018 21:22:57 -0000
@@ -671,7 +671,7 @@ athn_usb_alloc_rx_list(struct athn_usb_s
 		data->sc = usc;	/* Backpointer for callbacks. */
 
 		error = usbd_create_xfer(usc->usc_rx_data_pipe,
-		    ATHN_USB_RXBUFSZ, USBD_SHORT_XFER_OK, 0, &data->xfer);
+		    ATHN_USB_RXBUFSZ, 0, 0, &data->xfer);
 		if (error) {
 			aprint_error_dev(usc->usc_dev,
 			    "could not allocate xfer\n");
@@ -718,7 +718,7 @@ athn_usb_alloc_tx_list(struct athn_usb_s
 		data->sc = usc;	/* Backpointer for callbacks. */
 
 		error = usbd_create_xfer(usc->usc_tx_data_pipe,
-		    ATHN_USB_TXBUFSZ, USBD_SHORT_XFER_OK, 0, &data->xfer);
+		    ATHN_USB_TXBUFSZ, USBD_FORCE_SHORT_XFER, 0, &data->xfer);
 		if (error) {
 			aprint_error_dev(usc->usc_dev,
 			    "could not create xfer on TX pipe\n");


Home | Main Index | Thread Index | Old Index