Source-Changes archive

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

CVS commit: src



Module Name:    src
Committed By:   thorpej
Date:           Sat Jan 17 02:01:39 UTC 2026

Modified Files:
        src/sys/dev/pad: pad.c
        src/sys/kern: subr_autoconf.c subr_userconf.c
        src/sys/rump/librump/rumpkern: rump_autoconf.c
        src/sys/sys: device.h param.h
        src/usr.bin/config: defs.h mkioconf.c sem.c

Log Message:
Allow "attach" directives to have interface attributes, rather than
restricting them to plain attributes only.

Consider the case of a USB controller for which there is a generic
driver with multiple front-end bus attachments.  Normally, a USB
controller driver carries the interface attribute necessary to attach
a USB root hub / bus instance.  But, on some systems, a platform-specific
attachment may have other nodes in the device tree that are needed to
enable or configure the USB controller, that appear in the device tree
as children of the USB controller.  These devices may need to attach
using a different interface attribute, unrelated to USB functionality.

Prior to this change, it would have been necessary to put the platform-
specific interface attribute onto the generic driver.  But that comes
with side-effects on other platforms where that driver might be used.

In an ideal scenario, an attachment with special requirements should be
able to carry attachment-specific interface attributes to handle those
requirements, and this change enables that.  When searching for prospective
parents, the autoconfiguration machinery first consults the cfdriver for
interface attributes, as before, and checks potential cfattach instances
if a cfdriver match isn't found.

A separate list of attachment-specific interface attributes is maintained
by the autoconfiguration machinery in the kernel.  They are not hung off
of the cfattach directly, as they are with cfdriver instances, because
config(1) does not control the cfattach; individual driver front-ends do.
By arranging it this way, there is minimal impact to non-generated code.

This changes the "cfattachinit" structure, and thus changes the ABI for
kernel modules.

Bienvenidos a NetBSD 11.99.5!


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/dev/pad/pad.c
cvs rdiff -u -r1.317 -r1.318 src/sys/kern/subr_autoconf.c
cvs rdiff -u -r1.28 -r1.29 src/sys/kern/subr_userconf.c
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/librump/rumpkern/rump_autoconf.c
cvs rdiff -u -r1.192 -r1.193 src/sys/sys/device.h
cvs rdiff -u -r1.742 -r1.743 src/sys/sys/param.h
cvs rdiff -u -r1.109 -r1.110 src/usr.bin/config/defs.h
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/config/mkioconf.c
cvs rdiff -u -r1.87 -r1.88 src/usr.bin/config/sem.c

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




Home | Main Index | Thread Index | Old Index