NetBSD Problem Report #52911

From www@NetBSD.org  Sun Jan  7 22:42:46 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 43FA37A111
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  7 Jan 2018 22:42:46 +0000 (UTC)
Message-Id: <20180107224245.0A2E97A220@mollari.NetBSD.org>
Date: Sun,  7 Jan 2018 22:42:45 +0000 (UTC)
From: jmcneill@invisible.ca
Reply-To: jmcneill@invisible.ca
To: gnats-bugs@NetBSD.org
Subject: xhci: panic while plugging in USB device
X-Send-Pr-Version: www-1.0

>Number:         52911
>Category:       kern
>Synopsis:       xhci: panic while plugging in USB device
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    skrll
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 07 22:45:00 +0000 2018
>Closed-Date:    Wed Apr 05 08:46:09 +0000 2023
>Last-Modified:  Wed Apr 05 08:46:09 +0000 2023
>Originator:     Jared McNeill
>Release:        8.99.11
>Organization:
>Environment:
NetBSD 8.99.11 (TEGRA) #0: Fri Jan  5 10:04:13 UTC 2018
        mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/TEGRA

>Description:
tx1# panic: kernel diagnostic assertion "bus->ub_devices[usb_addr2dindex(dev->ud_addr)] == NULL" failed: file "/usr/src/sys/dev/usb/xhci.c", line 2357 addr 1 already allocated
Stopped in pid 0.48 (system) at netbsd:cpu_Debugger+0x4:        bx      r14
db{0}> tr                          
0x9c1bfe04: netbsd:vpanic+0x14
0x9c1bfe1c: netbsd:__udivmoddi4
0x9c1bfeb4: netbsd:xhci_new_device+0x6c0
0x9c1bff0c: netbsd:usbd_new_device+0x44
0x9c1bff64: netbsd:uhub_explore+0x2f0
0x9c1bff8c: netbsd:usb_discover.isra.2+0x7c
0x9c1bffac: netbsd:usb_event_thread+0x88


usb0 at xhci0: USB revision 3.0
uhub0 at usb0: vendor 0000 (0000) xHCI Root Hub (0000), class 9/0, rev 3.00/1.00, addr 0
usb1 at xhci0: USB revision 2.0
uhub1 at usb1: vendor 0000 (0000) xHCI Root Hub (0000), class 9/0, rev 2.00/1.00, addr 0


tx1# usbdevs -v
Controller /dev/usb0:
addr 0: super speed, self powered, config 1, xHCI Root Hub(0x0000), vendor 0000(0x0000), rev 1.00(0x0100)
 port 1 addr 1: super speed, power 64 mA, config 2, USB 10/100/1000 LAN(0x09ff), Nvidia(0x0955), rev 30.00(0x3000), serial 000001000000
 port 2 disabled
 port 3 disabled
 port 4 disabled
Controller /dev/usb1:
addr 0: high speed, self powered, config 1, xHCI Root Hub(0x0000), vendor 0000(0x0000), rev 1.00(0x0100)
 port 1 powered
 port 2 powered
 port 3 powered
 port 4 powered
 port 5 powered

>How-To-Repeat:
Plug a USB3 memory stick in to a Jetson TX1 board.
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->skrll
Responsible-Changed-By: skrll@NetBSD.org
Responsible-Changed-When: Thu, 18 Jan 2018 21:17:45 +0000
Responsible-Changed-Why:
Take


From: "Jonathan A. Kollasch" <jakllsch@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52911 CVS commit: src/sys/dev/usb
Date: Mon, 14 May 2018 00:26:02 +0000

 Module Name:	src
 Committed By:	jakllsch
 Date:		Mon May 14 00:26:02 UTC 2018

 Modified Files:
 	src/sys/dev/usb: xhci.c

 Log Message:
 With the hope it fixes PR #52911, be extra paranoid about assuring the
 Device Context DMA memory is sync'd immediately before reading from it.


 To generate a diff of this commit:
 cvs rdiff -u -r1.91 -r1.92 src/sys/dev/usb/xhci.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: jakllsch@NetBSD.org
State-Changed-When: Sun, 18 Dec 2022 16:52:12 +0000
State-Changed-Why:
potential fix was commited (in 2018)


State-Changed-From-To: feedback->closed
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Wed, 05 Apr 2023 08:46:09 +0000
State-Changed-Why:
No longer able to test.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.