<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/ow, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>chore: replace {0, 0} with {DEV,KOBJ}METHOD_END</title>
<updated>2026-02-25T05:59:34+00:00</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2026-02-21T06:14:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0fc6c3f731a2cca3120798806c330a3081c9424b'/>
<id>0fc6c3f731a2cca3120798806c330a3081c9424b</id>
<content type='text'>
Both of the aforementioned macros have been present in FreeBSD
for well over a decade: 2009 for `KOBJMETHOD_END`; 2011 for
`DEVMETHOD_END`.

Adapt all hardcoded references of `{0, 0}` with `DEVMETHOD_END`
and `KOBJMETHOD_END` as appropriate. This helps ensure that
future adaptations to drivers following patterns documented
in driver(9) can be made more easily/without issue.

MFC after:	1 week
Differential Revision:	 https://reviews.freebsd.org/D55414
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both of the aforementioned macros have been present in FreeBSD
for well over a decade: 2009 for `KOBJMETHOD_END`; 2011 for
`DEVMETHOD_END`.

Adapt all hardcoded references of `{0, 0}` with `DEVMETHOD_END`
and `KOBJMETHOD_END` as appropriate. This helps ensure that
future adaptations to drivers following patterns documented
in driver(9) can be made more easily/without issue.

MFC after:	1 week
Differential Revision:	 https://reviews.freebsd.org/D55414
</pre>
</div>
</content>
</entry>
<entry>
<title>bus: Document special ranges of IVARs</title>
<updated>2026-02-17T20:45:13+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2026-02-17T20:45:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6cf4e30252fe48b230b9d76cac20576d5b3d2ffa'/>
<id>6cf4e30252fe48b230b9d76cac20576d5b3d2ffa</id>
<content type='text'>
Some IVAR indices are special in that they have global meaning across
multiple buses where as other IVARs are always private to the local bus.
Try to document this a bit and add constants for the various ranges to
avoid future conflicts.

This is a no-op, but IVAR indices are now generally defined as enums
as that makes it easier to define them in terms of ranges.

Reviewed by:	imp, royger, andrew
Differential Revision:	https://reviews.freebsd.org/D54159
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some IVAR indices are special in that they have global meaning across
multiple buses where as other IVARs are always private to the local bus.
Try to document this a bit and add constants for the various ranges to
avoid future conflicts.

This is a no-op, but IVAR indices are now generally defined as enums
as that makes it easier to define them in terms of ranges.

Reviewed by:	imp, royger, andrew
Differential Revision:	https://reviews.freebsd.org/D54159
</pre>
</div>
</content>
</entry>
<entry>
<title>Use bus_generic_detach instead of device_delete_children in detach</title>
<updated>2025-01-02T18:24:28+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-01-02T18:24:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3ddaf8200bc90b1410755ebac7b5c979ea90a2f6'/>
<id>3ddaf8200bc90b1410755ebac7b5c979ea90a2f6</id>
<content type='text'>
While here, check for errors from bus_generic_detach and move it to
the start of detach if necessary.

Differential Revision:	https://reviews.freebsd.org/D47969
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While here, check for errors from bus_generic_detach and move it to
the start of detach if necessary.

Differential Revision:	https://reviews.freebsd.org/D47969
</pre>
</div>
</content>
</entry>
<entry>
<title>bus_generic_detach: Delete children after detaching them</title>
<updated>2025-01-02T18:21:30+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-01-02T18:21:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b196276c20b577b364372f1aa1a646b9ce34bf5c'/>
<id>b196276c20b577b364372f1aa1a646b9ce34bf5c</id>
<content type='text'>
This provides better semantics as a standalone DEVMETHOD for
device_attach as bus drivers should remove child devices they created
as part of detach cleanup.  The implementation calls
bus_detach_children() first to permit child devices an opportunity to
veto the detach operation.  If that succeeds, device_delete_children()
is used to delete the child devices.

This requires fixing various drivers that were deleting devices
explicitly (via a device_t pointer cached in the softc) after calling
bus_generic_detach to stop doing that and just rely on
bus_generic_detach to remove child devices.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47959
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This provides better semantics as a standalone DEVMETHOD for
device_attach as bus drivers should remove child devices they created
as part of detach cleanup.  The implementation calls
bus_detach_children() first to permit child devices an opportunity to
veto the detach operation.  If that succeeds, device_delete_children()
is used to delete the child devices.

This requires fixing various drivers that were deleting devices
explicitly (via a device_t pointer cached in the softc) after calling
bus_generic_detach to stop doing that and just rely on
bus_generic_detach to remove child devices.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47959
</pre>
</div>
</content>
</entry>
<entry>
<title>bus_delayed_attach_children: Switch return type to void</title>
<updated>2024-12-06T22:27:14+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-12-06T22:27:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=34f5de82e8fcf0ab335a708a9141a5f4240a4c64'/>
<id>34f5de82e8fcf0ab335a708a9141a5f4240a4c64</id>
<content type='text'>
This function never fails similar to bus_attach_children.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47677
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function never fails similar to bus_attach_children.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47677
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace calls to bus_generic_attach with bus_attach_children</title>
<updated>2024-12-06T22:26:16+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-12-06T22:26:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=18250ec6c089c0c50cbd9fd87d78e03ff89916df'/>
<id>18250ec6c089c0c50cbd9fd87d78e03ff89916df</id>
<content type='text'>
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47675
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47675
</pre>
</div>
</content>
</entry>
<entry>
<title>ow: Use a bus_child_deleted method to free ivars for children</title>
<updated>2024-11-01T14:08:52+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-11-01T14:08:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=79dfe2b761891eb3ab1b6a769d4f6adc97335350'/>
<id>79dfe2b761891eb3ab1b6a769d4f6adc97335350</id>
<content type='text'>
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47364
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47364
</pre>
</div>
</content>
</entry>
<entry>
<title>newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANY</title>
<updated>2024-07-25T04:22:58+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-07-25T04:22:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5b56413d04e608379c9a306373554a8e4d321bc0'/>
<id>5b56413d04e608379c9a306373554a8e4d321bc0</id>
<content type='text'>
Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Automated cleanup of cdefs and other formatting</title>
<updated>2023-11-27T05:24:00+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-11-24T20:12:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fdafd315ad0d0f28a11b9fb4476a9ab059c62b92'/>
<id>fdafd315ad0d0f28a11b9fb4476a9ab059c62b92</id>
<content type='text'>
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+&lt;sys/cdefs.h&gt;.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/types.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/param.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/capsicum.h&gt;/

Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+&lt;sys/cdefs.h&gt;.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/types.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/param.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/capsicum.h&gt;/

Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line bare tag</title>
<updated>2023-08-16T17:55:17+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=78d146160dc5339c9cdf7799551bcc442a6eb95b'/>
<id>78d146160dc5339c9cdf7799551bcc442a6eb95b</id>
<content type='text'>
Remove /^\s*\$FreeBSD\$$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*\$FreeBSD\$$\n/
</pre>
</div>
</content>
</entry>
</feed>
