|
|
| version 1.5, 2004/02/05 13:32:07 | version 1.6, 2004/02/05 17:51:43 |
|---|---|
| Line 45 | Line 45 |
| #include <sys/conf.h> | #include <sys/conf.h> |
| #include <sys/sysctl.h> | #include <sys/sysctl.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 642 fw_reset_crom(struct firewire_comm *fc) | Line 642 fw_reset_crom(struct firewire_comm *fc) |
| crom_add_entry(root, CSRKEY_NCAP, 0x0083c0); /* XXX */ | crom_add_entry(root, CSRKEY_NCAP, 0x0083c0); /* XXX */ |
| /* private company_id */ | /* private company_id */ |
| crom_add_entry(root, CSRKEY_VENDOR, CSRVAL_VENDOR_PRIVATE); | crom_add_entry(root, CSRKEY_VENDOR, CSRVAL_VENDOR_PRIVATE); |
| #ifdef __DragonFly__ | |
| crom_add_simple_text(src, root, &buf->vendor, "DragonFly Project"); | |
| crom_add_entry(root, CSRKEY_HW, __DragonFly_cc_version); | |
| #else | |
| crom_add_simple_text(src, root, &buf->vendor, "FreeBSD Project"); | crom_add_simple_text(src, root, &buf->vendor, "FreeBSD Project"); |
| crom_add_entry(root, CSRKEY_HW, __FreeBSD_version); | crom_add_entry(root, CSRKEY_HW, __FreeBSD_version); |
| #endif | |
| crom_add_simple_text(src, root, &buf->hw, hostname); | crom_add_simple_text(src, root, &buf->hw, hostname); |
| } | } |
| Line 1847 fw_rcv(struct fw_rcv_buf *rb) | Line 1852 fw_rcv(struct fw_rcv_buf *rb) |
| fp->mode.rreqq.dest_lo); | fp->mode.rreqq.dest_lo); |
| if(bind == NULL){ | if(bind == NULL){ |
| printf("Unknown service addr 0x%04x:0x%08x %s(%x)" | printf("Unknown service addr 0x%04x:0x%08x %s(%x)" |
| #if __FreeBSD_version >= 500000 | #if defined(__DragonFly__) || __FreeBSD_version < 500000 |
| " src=0x%x data=%x\n", | |
| #else | |
| " src=0x%x data=%lx\n", | " src=0x%x data=%lx\n", |
| #else | |
| " src=0x%x data=%x\n", | |
| #endif | #endif |
| fp->mode.wreqq.dest_hi, fp->mode.wreqq.dest_lo, | fp->mode.wreqq.dest_hi, fp->mode.wreqq.dest_lo, |
| tcode_str[tcode], tcode, | tcode_str[tcode], tcode, |
| Line 1969 fw_rcv(struct fw_rcv_buf *rb) | Line 1974 fw_rcv(struct fw_rcv_buf *rb) |
| STAILQ_INSERT_TAIL(&xferq->q, rb->xfer, link); | STAILQ_INSERT_TAIL(&xferq->q, rb->xfer, link); |
| splx(s); | splx(s); |
| sc = device_get_softc(rb->fc->bdev); | sc = device_get_softc(rb->fc->bdev); |
| #if __FreeBSD_version >= 500000 | #if defined(__DragonFly__) || __FreeBSD_version < 500000 |
| if (SEL_WAITING(&xferq->rsel)) | |
| #else | |
| if (&xferq->rsel.si_pid != 0) | if (&xferq->rsel.si_pid != 0) |
| #else | |
| if (SEL_WAITING(&xferq->rsel)) | |
| #endif | #endif |
| selwakeuppri(&xferq->rsel, FWPRI); | selwakeuppri(&xferq->rsel, FWPRI); |
| if (xferq->flag & FWXFERQ_WAKEUP) { | if (xferq->flag & FWXFERQ_WAKEUP) { |
| Line 2220 static int | Line 2225 static int |
| fw_modevent(module_t mode, int type, void *data) | fw_modevent(module_t mode, int type, void *data) |
| { | { |
| int err = 0; | int err = 0; |
| #if __FreeBSD_version >= 500000 | #if defined(__FreeBSD__) && __FreeBSD_version >= 500000 |
| static eventhandler_tag fwdev_ehtag = NULL; | static eventhandler_tag fwdev_ehtag = NULL; |
| #endif | #endif |
| switch (type) { | switch (type) { |
| case MOD_LOAD: | case MOD_LOAD: |
| #if __FreeBSD_version >= 500000 | #if defined(__FreeBSD__) && __FreeBSD_version >= 500000 |
| fwdev_ehtag = EVENTHANDLER_REGISTER(dev_clone, | fwdev_ehtag = EVENTHANDLER_REGISTER(dev_clone, |
| fwdev_clone, 0, 1000); | fwdev_clone, 0, 1000); |
| #endif | #endif |
| break; | break; |
| case MOD_UNLOAD: | case MOD_UNLOAD: |
| #if __FreeBSD_version >= 500000 | #if defined(__FreeBSD__) && __FreeBSD_version >= 500000 |
| if (fwdev_ehtag != NULL) | if (fwdev_ehtag != NULL) |
| EVENTHANDLER_DEREGISTER(dev_clone, fwdev_ehtag); | EVENTHANDLER_DEREGISTER(dev_clone, fwdev_ehtag); |
| #endif | #endif |