tech-kern archive

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

Re: Attaching to an attribute



On Fri, 8 Dec 2017, Valery Ushakov wrote:

This, however, still highlights a problem.  How can a module device
driver attach wsmouse as a child regardless of how the kernel is
configured.

The device driver module does all appropriate initialization, which includes config_init_component(). That ends up calling parent "bus" drivers (or other attachment attributes drivers) to "rescan", which causes the parents to attach any potential new child.

So, if the configuration has "wsmouse* at wsmousedev?" all drivers offering the wsmousedev attribute are told to rescan... If the configuration has specific parents (ie, not attributes), then each of those parents get the rescan command.

Note that config(1) doesn't handle

	pseudoroot <attribute>

You need to list each possible parent, even if the attachemt is via an attribute:

	pseudoroot ums?
	pseudoroot xxxms?

	wsmouse* at wsmousedev?



+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+


Home | Main Index | Thread Index | Old Index