|
|
| version 1.4, 2004/02/05 13:32:08 | version 1.5, 2004/02/05 17:51:44 |
|---|---|
| Line 47 | Line 47 |
| #include <machine/bus.h> | #include <machine/bus.h> |
| #include <sys/rman.h> | #include <sys/rman.h> |
| #include <sys/malloc.h> | #include <sys/malloc.h> |
| #if __FreeBSD_version >= 501102 | #if defined(__FreeBSD__) && __FreeBSD_version >= 501102 |
| #include <sys/lock.h> | #include <sys/lock.h> |
| #include <sys/mutex.h> | #include <sys/mutex.h> |
| #endif | #endif |
| #include <machine/resource.h> | #include <machine/resource.h> |
| #if __FreeBSD_version < 500000 | #if defined(__DragonFly__) || __FreeBSD_version < 500000 |
| #include <machine/clock.h> /* for DELAY() */ | #include <machine/clock.h> /* for DELAY() */ |
| #endif | #endif |
| Line 194 fwohci_pci_probe( device_t dev ) | Line 194 fwohci_pci_probe( device_t dev ) |
| return ENXIO; | return ENXIO; |
| } | } |
| #if __FreeBSD_version < 500000 | #if defined(__DragonFly__) || __FreeBSD_version < 500000 |
| static void | static void |
| fwohci_dummy_intr(void *arg) | fwohci_dummy_intr(void *arg) |
| { | { |
| Line 246 fwohci_pci_attach(device_t self) | Line 246 fwohci_pci_attach(device_t self) |
| fwohci_softc_t *sc = device_get_softc(self); | fwohci_softc_t *sc = device_get_softc(self); |
| int err; | int err; |
| int rid; | int rid; |
| #if __FreeBSD_version < 500000 | #if defined(__DragonFly__) || __FreeBSD_version < 500000 |
| int intr; | int intr; |
| /* For the moment, put in a message stating what is wrong */ | /* For the moment, put in a message stating what is wrong */ |
| intr = pci_read_config(self, PCIR_INTLINE, 1); | intr = pci_read_config(self, PCIR_INTLINE, 1); |
| Line 291 fwohci_pci_attach(device_t self) | Line 291 fwohci_pci_attach(device_t self) |
| INTR_TYPE_NET, | INTR_TYPE_NET, |
| #endif | #endif |
| (driver_intr_t *) fwohci_intr, sc, &sc->ih); | (driver_intr_t *) fwohci_intr, sc, &sc->ih); |
| #if __FreeBSD_version < 500000 | #if defined(__DragonFly__) || __FreeBSD_version < 500000 |
| /* XXX splcam() should mask this irq for sbp.c*/ | /* XXX splcam() should mask this irq for sbp.c*/ |
| err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_CAM, | err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_CAM, |
| (driver_intr_t *) fwohci_dummy_intr, sc, &sc->ih_cam); | (driver_intr_t *) fwohci_dummy_intr, sc, &sc->ih_cam); |
| Line 318 fwohci_pci_attach(device_t self) | Line 318 fwohci_pci_attach(device_t self) |
| /*nsegments*/0x20, | /*nsegments*/0x20, |
| /*maxsegsz*/0x8000, | /*maxsegsz*/0x8000, |
| /*flags*/BUS_DMA_ALLOCNOW, | /*flags*/BUS_DMA_ALLOCNOW, |
| #if __FreeBSD_version >= 501102 | #if defined(__FreeBSD__) && __FreeBSD_version >= 501102 |
| /*lockfunc*/busdma_lock_mutex, | /*lockfunc*/busdma_lock_mutex, |
| /*lockarg*/&Giant, | /*lockarg*/&Giant, |
| #endif | #endif |
| Line 373 fwohci_pci_detach(device_t self) | Line 373 fwohci_pci_detach(device_t self) |
| /* XXX or should we panic? */ | /* XXX or should we panic? */ |
| device_printf(self, "Could not tear down irq, %d\n", | device_printf(self, "Could not tear down irq, %d\n", |
| err); | err); |
| #if __FreeBSD_version < 500000 | #if defined(__DragonFly__) || __FreeBSD_version < 500000 |
| bus_teardown_intr(self, sc->irq_res, sc->ih_cam); | bus_teardown_intr(self, sc->irq_res, sc->ih_cam); |
| bus_teardown_intr(self, sc->irq_res, sc->ih_bio); | bus_teardown_intr(self, sc->irq_res, sc->ih_bio); |
| #endif | #endif |