freebsd-dev/sys/arm
Luiz Otavio O Souza 1210d2685f Fix cpsw_detach() to not panic when called from cpsw_attach().
For an unkown reason (at moment), sometimes if_cpsw cannot read from PHY
and fails to attach calling cpsw_detach() which end up in a panic.

Fix it by doing the proper check before detach the miibus and also fix the
leak of few variables.

And to actually make it work, ether_ifattach() has to be moved to the end
of cpsw_attach() to avoid a race where calling ether_ifdetach() before
domain_init() (which will only run later on) would make it crash at
INP_INFO_RLOCK() on in_pcbpurgeif0().

Tested on:	BBB (am335x)
MFC after:	1 week
2014-10-24 21:08:02 +00:00
..
allwinner Allow timer0 to run at full 24MHz not at 24MHz/16 by setting prescale to 1. 2014-10-02 06:00:55 +00:00
altera/socfpga Provide a character device allowing us to access BERI memory regions. 2014-10-22 11:30:03 +00:00
arm Fix a bug where DMA maps created with bus_dmamap_create() won't increment 2014-10-24 19:18:39 +00:00
at91 Fix the definitioin of AT91SAM9G45_IRQ_PIOE and rename it to 2014-09-27 14:39:00 +00:00
broadcom/bcm2835 Fix the mtx_sleep() error checking, catch all errors and not only 2014-10-20 18:04:20 +00:00
cavium/cns11xx Mechanically convert to if_inc_counter(). 2014-09-19 09:20:16 +00:00
conf Add COMPAT_FREEBSD9 and COMPAT_FREEBSD10 options to wrap code that 2014-10-24 19:58:24 +00:00
freescale Install a temporary workaround to avoid problems in fdt data with linux's 2014-10-23 22:21:22 +00:00
include Add an elf not so kgdb detects the kernel as a FreeBSD elf file. The 2014-10-18 13:38:04 +00:00
lpc Mechanically convert to if_inc_counter(). 2014-09-19 09:20:16 +00:00
mv Rename OF_xref_phandle() to OF_node_from_xref() and add a new function 2014-09-01 18:51:01 +00:00
rockchip Rename OF_xref_phandle() to OF_node_from_xref() and add a new function 2014-09-01 18:51:01 +00:00
samsung Add driver for Synopsys DesignWare Mobile Storage Host Controller. 2014-10-07 17:39:30 +00:00
ti Fix cpsw_detach() to not panic when called from cpsw_attach(). 2014-10-24 21:08:02 +00:00
versatile Move if_smc_fdt.c to live in sys/dev/smc. It's not specific to the ARM 2014-09-10 10:59:17 +00:00
xilinx Fixes and enhancements for the if_cgem driver... 2014-09-03 17:51:03 +00:00
xscale Mechanically convert to if_inc_counter(). 2014-09-19 09:20:16 +00:00