freebsd-dev/sys/mips/mediatek
Hans Petter Selasky d3bf5efc1f Fix device delete child function.
When detaching device trees parent devices must be detached prior to
detaching its children. This is because parent devices can have
pointers to the child devices in their softcs which are not
invalidated by device_delete_child(). This can cause use after free
issues and panic().

Device drivers implementing trees, must ensure its detach function
detaches or deletes all its children before returning.

While at it remove now redundant device_detach() calls before
device_delete_child() and device_delete_children(), mostly in
the USB controller drivers.

Tested by:		Jan Henrik Sylvester <me@janh.de>
Reviewed by:		jhb
Differential Revision:	https://reviews.freebsd.org/D8070
MFC after:		2 weeks
2016-10-17 10:20:38 +00:00
..
fdt_reset_if.m
fdt_reset.c Use OF_prop_free instead of direct call to free(9) 2016-05-14 20:05:35 +00:00
fdt_reset.h
files.mediatek Build etherswitch support for appropriate Ralink/Mediatek SoCs 2016-05-25 06:47:28 +00:00
mtk_clock.c
mtk_dotg.c Fix device delete child function. 2016-10-17 10:20:38 +00:00
mtk_ehci.c Fix device delete child function. 2016-10-17 10:20:38 +00:00
mtk_gpio_v1.c Return the struct intr_pic pointer from intr_pic_register. This will be 2016-05-18 15:05:44 +00:00
mtk_gpio_v2.c Return the struct intr_pic pointer from intr_pic_register. This will be 2016-05-18 15:05:44 +00:00
mtk_intr_gic.c Return the struct intr_pic pointer from intr_pic_register. This will be 2016-05-18 15:05:44 +00:00
mtk_intr_v1.c Return the struct intr_pic pointer from intr_pic_register. This will be 2016-05-18 15:05:44 +00:00
mtk_intr_v2.c Return the struct intr_pic pointer from intr_pic_register. This will be 2016-05-18 15:05:44 +00:00
mtk_machdep.c Add support for boot arguments specification via fdt 2016-04-16 19:44:41 +00:00
mtk_ohci.c Fix device delete child function. 2016-10-17 10:20:38 +00:00
mtk_pcie.c Return the struct intr_pic pointer from intr_pic_register. This will be 2016-05-18 15:05:44 +00:00
mtk_pcie.h Move Mediatek/Ralink PCIe to NEW_PCIB 2016-04-12 07:21:22 +00:00
mtk_pinctrl.c Use OF_prop_free instead of direct call to free(9) 2016-05-14 20:05:35 +00:00
mtk_pinctrl.h Minor pinctrl fixes for Mediatek/Ralink 2016-04-23 04:19:42 +00:00
mtk_reset.c
mtk_soc.c Ralink: Add more SoC compatible strings 2016-05-19 06:29:43 +00:00
mtk_soc.h
mtk_spi_v1.c mtk_spi cleanup commented printfs 2016-05-06 05:24:10 +00:00
mtk_spi_v1.h Initial import of Ralink/Mediatek MIPS SoC support #6 2016-04-07 11:21:42 +00:00
mtk_spi_v2.c mtk_spi cleanup commented printfs 2016-05-06 05:24:10 +00:00
mtk_spi_v2.h Initial import of Ralink/Mediatek MIPS SoC support #6 2016-04-07 11:21:42 +00:00
mtk_sysctl.c
mtk_sysctl.h Allow RT3350 CPU clock to be detected as part of RT3050/RT3052 detection 2016-04-18 06:15:58 +00:00
mtk_usb_phy.c Add compat strings used by OpenWRT to some Mediatek/Ralink drivers 2016-04-20 14:47:16 +00:00
mtk_usb_phy.h Initial import of Ralink/Mediatek MIPS SoC support #5 2016-04-07 11:20:03 +00:00
mtk_xhci.c Fix device delete child function. 2016-10-17 10:20:38 +00:00
palmbus.c Introduce palmbus for Mediatek/Ralink SoCs 2016-04-23 04:21:18 +00:00
std.mediatek Build etherswitch support for appropriate Ralink/Mediatek SoCs 2016-05-25 06:47:28 +00:00
uart_dev_mtk.c Initial import of Ralink/Mediatek MIPS SoC support #4 2016-04-07 11:16:32 +00:00
uart_dev_mtk.h Initial import of Ralink/Mediatek MIPS SoC support #4 2016-04-07 11:16:32 +00:00