|
|
| version 1.5, 2004/02/05 13:32:08 | version 1.6, 2004/02/05 17:51:44 |
|---|---|
| Line 55 | Line 55 |
| #include <machine/bus.h> | #include <machine/bus.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 1216 fwohci_db_init(struct fwohci_softc *sc, | Line 1216 fwohci_db_init(struct fwohci_softc *sc, |
| /*nsegments*/ dbch->ndesc > 3 ? dbch->ndesc - 2 : 1, | /*nsegments*/ dbch->ndesc > 3 ? dbch->ndesc - 2 : 1, |
| /*maxsegsz*/ MAX_REQCOUNT, | /*maxsegsz*/ MAX_REQCOUNT, |
| /*flags*/ 0, | /*flags*/ 0, |
| #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 1824 busresetout: | Line 1824 busresetout: |
| #ifndef ACK_ALL | #ifndef ACK_ALL |
| OWRITE(sc, FWOHCI_INTSTATCLR, OHCI_INT_DMA_IR); | OWRITE(sc, FWOHCI_INTSTATCLR, OHCI_INT_DMA_IR); |
| #endif | #endif |
| #if __FreeBSD_version >= 500000 | #if defined(__DragonFly__) || __FreeBSD_version < 500000 |
| irstat = atomic_readandclear_int(&sc->irstat); | |
| #else | |
| irstat = sc->irstat; | irstat = sc->irstat; |
| sc->irstat = 0; | sc->irstat = 0; |
| #else | |
| irstat = atomic_readandclear_int(&sc->irstat); | |
| #endif | #endif |
| for(i = 0; i < fc->nisodma ; i++){ | for(i = 0; i < fc->nisodma ; i++){ |
| struct fwohci_dbch *dbch; | struct fwohci_dbch *dbch; |
| Line 1848 busresetout: | Line 1848 busresetout: |
| #ifndef ACK_ALL | #ifndef ACK_ALL |
| OWRITE(sc, FWOHCI_INTSTATCLR, OHCI_INT_DMA_IT); | OWRITE(sc, FWOHCI_INTSTATCLR, OHCI_INT_DMA_IT); |
| #endif | #endif |
| #if __FreeBSD_version >= 500000 | #if defined(__DragonFly__) || __FreeBSD_version < 500000 |
| itstat = atomic_readandclear_int(&sc->itstat); | |
| #else | |
| itstat = sc->itstat; | itstat = sc->itstat; |
| sc->itstat = 0; | sc->itstat = 0; |
| #else | |
| itstat = atomic_readandclear_int(&sc->itstat); | |
| #endif | #endif |
| for(i = 0; i < fc->nisodma ; i++){ | for(i = 0; i < fc->nisodma ; i++){ |
| if((itstat & (1 << i)) != 0){ | if((itstat & (1 << i)) != 0){ |
| Line 2365 print_db(struct fwohcidb_tr *db_tr, stru | Line 2365 print_db(struct fwohcidb_tr *db_tr, stru |
| res = FWOHCI_DMA_READ(db[i].db.desc.res); | res = FWOHCI_DMA_READ(db[i].db.desc.res); |
| key = cmd & OHCI_KEY_MASK; | key = cmd & OHCI_KEY_MASK; |
| stat = res >> OHCI_STATUS_SHIFT; | stat = res >> OHCI_STATUS_SHIFT; |
| #if __FreeBSD_version >= 500000 | #if defined(__DragonFly__) || __FreeBSD_version < 500000 |
| printf("%08jx %s %s %s %s %5d %08x %08x %04x:%04x", | |
| (uintmax_t)db_tr->bus_addr, | |
| #else | |
| printf("%08x %s %s %s %s %5d %08x %08x %04x:%04x", | printf("%08x %s %s %s %s %5d %08x %08x %04x:%04x", |
| db_tr->bus_addr, | db_tr->bus_addr, |
| #else | |
| printf("%08jx %s %s %s %s %5d %08x %08x %04x:%04x", | |
| (uintmax_t)db_tr->bus_addr, | |
| #endif | #endif |
| dbcode[(cmd >> 28) & 0xf], | dbcode[(cmd >> 28) & 0xf], |
| dbkey[(cmd >> 24) & 0x7], | dbkey[(cmd >> 24) & 0x7], |