|
|
| version 1.11, 2003/11/20 22:07:33 | version 1.12, 2004/02/13 01:33:19 |
|---|---|
| Line 335 typedef struct Asr_softc { | Line 335 typedef struct Asr_softc { |
| LIST_HEAD(,ccb_hdr) ha_ccb; /* ccbs in use */ | LIST_HEAD(,ccb_hdr) ha_ccb; /* ccbs in use */ |
| struct cam_path * ha_path[MAX_CHANNEL+1]; | struct cam_path * ha_path[MAX_CHANNEL+1]; |
| struct cam_sim * ha_sim[MAX_CHANNEL+1]; | struct cam_sim * ha_sim[MAX_CHANNEL+1]; |
| #if __FreeBSD_version >= 400000 | #if defined(__DragonFly__) || __FreeBSD_version >= 400000 |
| struct resource * ha_mem_res; | struct resource * ha_mem_res; |
| struct resource * ha_mes_res; | struct resource * ha_mes_res; |
| struct resource * ha_irq_res; | struct resource * ha_irq_res; |
| Line 420 STATIC Asr_softc_t * Asr_softc; | Line 420 STATIC Asr_softc_t * Asr_softc; |
| */ | */ |
| /* Externally callable routines */ | /* Externally callable routines */ |
| #if __FreeBSD_version >= 400000 | #if defined(__DragonFly__) || __FreeBSD_version >= 400000 |
| #define PROBE_ARGS IN device_t tag | #define PROBE_ARGS IN device_t tag |
| #define PROBE_RET int | #define PROBE_RET int |
| #define PROBE_SET() u_long id = (pci_get_device(tag)<<16)|pci_get_vendor(tag) | #define PROBE_SET() u_long id = (pci_get_device(tag)<<16)|pci_get_vendor(tag) |
| Line 487 STATIC void asr_poll ( | Line 487 STATIC void asr_poll ( |
| * Here is the auto-probe structure used to nest our tests appropriately | * Here is the auto-probe structure used to nest our tests appropriately |
| * during the startup phase of the operating system. | * during the startup phase of the operating system. |
| */ | */ |
| #if __FreeBSD_version >= 400000 | #if defined(__DragonFly__) || __FreeBSD_version >= 400000 |
| STATIC device_method_t asr_methods[] = { | STATIC device_method_t asr_methods[] = { |
| DEVMETHOD(device_probe, asr_probe), | DEVMETHOD(device_probe, asr_probe), |
| DEVMETHOD(device_attach, asr_attach), | DEVMETHOD(device_attach, asr_attach), |
| Line 2551 asr_hbareset( | Line 2551 asr_hbareset( |
| */ | */ |
| STATIC int | STATIC int |
| asr_pci_map_mem ( | asr_pci_map_mem ( |
| #if __FreeBSD_version >= 400000 | #if defined(__DragonFly__) || __FreeBSD_version >= 400000 |
| IN device_t tag, | IN device_t tag, |
| #else | #else |
| IN pcici_t tag, | IN pcici_t tag, |
| Line 2561 asr_pci_map_mem ( | Line 2561 asr_pci_map_mem ( |
| int rid; | int rid; |
| u_int32_t p, l, s; | u_int32_t p, l, s; |
| #if __FreeBSD_version >= 400000 | #if defined(__DragonFly__) || __FreeBSD_version >= 400000 |
| /* | /* |
| * I2O specification says we must find first *memory* mapped BAR | * I2O specification says we must find first *memory* mapped BAR |
| */ | */ |
| Line 2804 asr_pci_map_mem ( | Line 2804 asr_pci_map_mem ( |
| */ | */ |
| STATIC int | STATIC int |
| asr_pci_map_int ( | asr_pci_map_int ( |
| #if __FreeBSD_version >= 400000 | #if defined(__DragonFly__) || __FreeBSD_version >= 400000 |
| IN device_t tag, | IN device_t tag, |
| #else | #else |
| IN pcici_t tag, | IN pcici_t tag, |
| #endif | #endif |
| IN Asr_softc_t * sc) | IN Asr_softc_t * sc) |
| { | { |
| #if __FreeBSD_version >= 400000 | #if defined(__DragonFly__) || __FreeBSD_version >= 400000 |
| int rid = 0; | int rid = 0; |
| sc->ha_irq_res = bus_alloc_resource(tag, SYS_RES_IRQ, &rid, | sc->ha_irq_res = bus_alloc_resource(tag, SYS_RES_IRQ, &rid, |
| Line 2891 asr_attach (ATTACH_ARGS) | Line 2891 asr_attach (ATTACH_ARGS) |
| ATTACH_RETURN(ENXIO); | ATTACH_RETURN(ENXIO); |
| } | } |
| /* Enable if not formerly enabled */ | /* Enable if not formerly enabled */ |
| #if __FreeBSD_version >= 400000 | #if defined(__DragonFly__) || __FreeBSD_version >= 400000 |
| pci_write_config (tag, PCIR_COMMAND, | pci_write_config (tag, PCIR_COMMAND, |
| pci_read_config (tag, PCIR_COMMAND, sizeof(char)) | pci_read_config (tag, PCIR_COMMAND, sizeof(char)) |
| | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN, sizeof(char)); | | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN, sizeof(char)); |