Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 May 2025 14:49:15 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        Warner Losh <imp@bsdimp.com>
Cc:        usb@freebsd.org, current@freebsd.org
Subject:   Re: panic in usb_detach_device / device_printf
Message-ID:  <49292416-982q-388o-304r-46p050pns429@yvfgf.mnoonqbm.arg>
In-Reply-To: <CANCZdfrhoqfereUux7c0d1Ls=-2=STxYWnhMZ=V3%2B2komM4XMg@mail.gmail.com>
References:  <9p19rsns-ro3r-so94-14p1-2s9p61377q73@yvfgf.mnoonqbm.arg> <CANCZdfru-ZiDoB7y6jXmXYw7TB02cKFfHu_UBQcKgyuR7hgZPw@mail.gmail.com> <q7ro4ro5-4q6s-90r2-9125-s401spp9s66p@yvfgf.mnoonqbm.arg> <CANCZdfrhoqfereUux7c0d1Ls=-2=STxYWnhMZ=V3%2B2komM4XMg@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

On Sat, 10 May 2025, Warner Losh wrote:

> OK. Sorry for the top post.
>
> I need to recreate this because this data is already freed and corrupted.
>
> So is this panic in bhyve? What's the bhyve configuration you are using?
> You say this happens as you move the xhci pass through device back to
> the host. Does the same thing happen if you instead devctl detach the xhciX
> the device instead? It looks like you have a da0 device on the usb bus, any
> others?

"Seems xhci -> ppt"  So this is on the base system moving the XHCI to
ppt to be used in bhyve, otherwise it wouldn't detach all the USB
devices but create them.  I booted a non-FreeBSD guest.

The da0 is created by a blank adapter in the
ugen0.7: <Card Reader Realtek Semiconductor Corp.> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (200mA)
<Generic- SD/MMC 1.00>             at scbus1 target 0 lun 0 (da0,pass1)
There's no card there.  But it's been like this for years; even before
the reader was supported and I've done this regularly.

> I need a way to reproduce it, and I kinda get what you're doing, but step
> by step instructions would be way better...  And it may be a week before
> I get to it: my daughter is graduating next Friday, so my whole routine and
> schedule is off.

# pciconf -l pci0:0:20:0
xhci0@pci0:0:20:0:      class=0x0c0330 rev=0x21 hdr=0x00 vendor=0x8086 device=0x9d2f subvendor=0x17aa subdevice=0x225d

I cannot reproduce it anymore.  history is gone sadly.  I do not
know what I typed anymore.
My bhyve.sh has these as comments so I likely just pasted them when
bhyve refused to start because of no ppt0 not being there already.

#   devctl detach pci0:0:20:0 || true
#   devctl set driver pci0:0:20:0 ppt || true

/bz

-- 
Bjoern A. Zeeb                                                     r15:7


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49292416-982q-388o-304r-46p050pns429>