Date: Thu, 28 Nov 2024 18:33:20 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 262690] "driver bug: Unable to set devclass" for atrtc Message-ID: <bug-262690-227-MaaiQDu1S1@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-262690-227@https.bugs.freebsd.org/bugzilla/> References: <bug-262690-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262690 --- Comment #5 from John F. Carr <jfc@mit.edu> --- If I boot verbose I see atrtc: atrtc-1 already exists; skipping it This message comes from devclass_alloc_unit. printf("%s: %s%d already exists; skipping it\n", dc->name, dc->name, *uni= tp); So *unitp =3D=3D -1. Variable int unit =3D *unitp; was initialized to -1, or DEVICE_UNIT_ANY. So this BUS_HINT_DEVICE_UNIT ca= ll must have happened. /* Ask the parent bus if it wants to wire this device. */ if (unit =3D=3D DEVICE_UNIT_ANY) BUS_HINT_DEVICE_UNIT(device_get_parent(dev), dev, dc->name, &unit); The printf is guarded by if (unit !=3D DEVICE_UNIT_ANY) so BUS_HINT_DEVICE_UNIT must have assigned a unit number. This macro invok= es a bus_hint_device_unit method. There are only three of these, one each for isa, pci, and acpica. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-262690-227-MaaiQDu1S1>