opnsense-src/sys/dev/iicbus
John Baldwin 1ab14e185a Check for errors when detaching children first, not last
These detach routines in these drivers all ended with 'return
(bus_generic_detach())' meaning that if any child device failed to
detach, the parent driver was left in a mostly destroyed state, but
still marked attached.  Instead, bus drivers should detach child
drivers first and return errors before destroying driver state in the
parent.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47387

(cherry picked from commit d412c07617eb35435668b024bc2cecda05f57f1f)
2025-02-27 10:17:49 -05:00
..
adc iicbus: Move ADC drivers into a new adc subfolder 2023-10-18 16:32:11 +02:00
controller vf_i2c: Don't hold a mutex across bus_generic_detach 2024-11-30 21:46:05 -05:00
gpio sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
mux iicbus/mux/pca954x: add support for PCA9546 I2C Switch 2024-04-01 23:46:10 +00:00
pmic Check for errors when detaching children first, not last 2025-02-27 10:17:49 -05:00
pwm iicbus: Move adm1030 and adt746x to new pwm subdirectory 2023-10-18 16:32:10 +02:00
rtc ds1307(4): Fix a typo in a source code comment 2024-04-27 07:49:47 +02:00
sensor iicbus: Move i2c sensors drivers into new sensor subdirectory 2023-10-18 16:32:14 +02:00
acpi_iicbus.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
icee.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_ic.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
iic.c uio: Use switch statements when handling UIO_READ vs UIO_WRITE 2024-11-30 08:55:57 -05:00
iic.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
iic_recover_bus.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
iic_recover_bus.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
iicbb.c iicbb: Fix pause_sbt() arguments order 2024-01-19 11:34:58 -05:00
iicbb_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
iicbus.c iicbus: Use a bus_child_deleted method to free ivars for children 2024-11-30 21:46:06 -05:00
iicbus.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
iicbus_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
iichid.c iichid(4): Do not power down opened device in attach handler 2024-11-12 07:08:33 +03:00
iiconf.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
iiconf.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
iicsmb.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ofw_iicbus.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ofw_iicbus_if.m spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00