Deleted Added
full compact
fwohci_pci.c (108527) fwohci_pci.c (108530)
1/*
2 * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
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

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

25 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 *
1/*
2 * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
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

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

25 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 *
33 * $FreeBSD: head/sys/dev/firewire/fwohci_pci.c 108527 2003-01-01 04:23:54Z simokawa $
33 * $FreeBSD: head/sys/dev/firewire/fwohci_pci.c 108530 2003-01-01 08:25:32Z simokawa $
34 */
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/kernel.h>
39#include <sys/module.h>
40#include <sys/bus.h>
41#include <sys/queue.h>

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

248static int
249fwohci_pci_detach(device_t self)
250{
251 fwohci_softc_t *sc = device_get_softc(self);
252 int s;
253
254
255 s = splfw();
34 */
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/kernel.h>
39#include <sys/module.h>
40#include <sys/bus.h>
41#include <sys/queue.h>

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

248static int
249fwohci_pci_detach(device_t self)
250{
251 fwohci_softc_t *sc = device_get_softc(self);
252 int s;
253
254
255 s = splfw();
256
257 fwohci_shutdown(self);
256 bus_generic_detach(self);
257
258 /* disable interrupts that might have been switched on */
259 if (sc->bst && sc->bsh)
260 bus_space_write_4(sc->bst, sc->bsh,
261 FWOHCI_INTMASKCLR, OHCI_INT_EN);
262
263 if (sc->irq_res) {

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

300{
301 device_printf(dev, "fwoch_pci_suspend\n");
302 return 0;
303}
304
305static int
306fwohci_pci_resume(device_t dev)
307{
258 bus_generic_detach(self);
259
260 /* disable interrupts that might have been switched on */
261 if (sc->bst && sc->bsh)
262 bus_space_write_4(sc->bst, sc->bsh,
263 FWOHCI_INTMASKCLR, OHCI_INT_EN);
264
265 if (sc->irq_res) {

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

302{
303 device_printf(dev, "fwoch_pci_suspend\n");
304 return 0;
305}
306
307static int
308fwohci_pci_resume(device_t dev)
309{
310 fwohci_softc_t *sc = device_get_softc(dev);
311
308 device_printf(dev, "fwoch_pci_resume\n");
312 device_printf(dev, "fwoch_pci_resume\n");
313 fwohci_reset(sc, dev);
309 return 0;
310}
311
312static device_method_t fwohci_methods[] = {
313 /* Device interface */
314 DEVMETHOD(device_probe, fwohci_pci_probe),
315 DEVMETHOD(device_attach, fwohci_pci_attach),
316 DEVMETHOD(device_detach, fwohci_pci_detach),

--- 20 unchanged lines hidden ---
314 return 0;
315}
316
317static device_method_t fwohci_methods[] = {
318 /* Device interface */
319 DEVMETHOD(device_probe, fwohci_pci_probe),
320 DEVMETHOD(device_attach, fwohci_pci_attach),
321 DEVMETHOD(device_detach, fwohci_pci_detach),

--- 20 unchanged lines hidden ---