Deleted Added
full compact
siba_core.c (219902) siba_core.c (227701)
1/*-
2 * Copyright (c) 2009-2010 Weongyo Jeong <weongyo@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009-2010 Weongyo Jeong <weongyo@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/siba/siba_core.c 219902 2011-03-23 13:10:15Z jhb $");
31__FBSDID("$FreeBSD: head/sys/dev/siba/siba_core.c 227701 2011-11-19 10:11:50Z hselasky $");
32
33/*
34 * the Sonics Silicon Backplane driver.
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/module.h>

--- 169 unchanged lines hidden (view full) ---

209 siba_powerdown_sub(siba);
210
211 return (bus_generic_attach(siba->siba_dev));
212}
213
214int
215siba_core_detach(struct siba_softc *siba)
216{
32
33/*
34 * the Sonics Silicon Backplane driver.
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/module.h>

--- 169 unchanged lines hidden (view full) ---

209 siba_powerdown_sub(siba);
210
211 return (bus_generic_attach(siba->siba_dev));
212}
213
214int
215siba_core_detach(struct siba_softc *siba)
216{
217 device_t *devlistp;
218 int devcnt, error = 0, i;
219
220 error = device_get_children(siba->siba_dev, &devlistp, &devcnt);
221 if (error != 0)
222 return (0);
223
224 for ( i = 0 ; i < devcnt ; i++)
225 device_delete_child(siba->siba_dev, devlistp[i]);
226 free(devlistp, M_TEMP);
217 /* detach & delete all children */
218 device_delete_all_children(siba->siba_dev);
227 return (0);
228}
229
230static void
231siba_pci_gpio(struct siba_softc *siba, uint32_t what, int on)
232{
233 uint32_t in, out;
234 uint16_t status;

--- 2352 unchanged lines hidden ---
219 return (0);
220}
221
222static void
223siba_pci_gpio(struct siba_softc *siba, uint32_t what, int on)
224{
225 uint32_t in, out;
226 uint16_t status;

--- 2352 unchanged lines hidden ---