diff --git a/src/add-ons/kernel/drivers/network/dec21xxx/dev/dc/glue.c b/src/add-ons/kernel/drivers/network/dec21xxx/dev/dc/glue.c index aaaac1e596..3d749a0859 100644 --- a/src/add-ons/kernel/drivers/network/dec21xxx/dev/dc/glue.c +++ b/src/add-ons/kernel/drivers/network/dec21xxx/dev/dc/glue.c @@ -16,16 +16,26 @@ #include "if_dcreg.h" + +int check_disable_interrupts_dc(device_t dev); +void reenable_interrupts_dc(device_t dev); + +extern int check_disable_interrupts_de(device_t dev); +extern void reenable_interrupts_de(device_t dev); + + HAIKU_FBSD_DRIVERS_GLUE(dec21xxx); HAIKU_DRIVER_REQUIREMENTS(FBSD_TASKQUEUES | FBSD_FAST_TASKQUEUE | FBSD_SWI_TASKQUEUE); + extern driver_t *DRIVER_MODULE_NAME(dc, pci); extern driver_t *DRIVER_MODULE_NAME(de, pci); -status_t __haiku_handle_fbsd_drivers_list(status_t (*handler)(driver_t *[])) +status_t +__haiku_handle_fbsd_drivers_list(status_t (*handler)(driver_t *[])) { - driver_t *drivers[] = { + driver_t *drivers[] = { DRIVER_MODULE_NAME(dc, pci), DRIVER_MODULE_NAME(de, pci), NULL @@ -33,6 +43,7 @@ status_t __haiku_handle_fbsd_drivers_list(status_t (*handler)(driver_t *[])) return (*handler)(drivers); } + extern driver_t *DRIVER_MODULE_NAME(acphy, miibus); extern driver_t *DRIVER_MODULE_NAME(amphy, miibus); extern driver_t *DRIVER_MODULE_NAME(dcphy, miibus); @@ -55,18 +66,11 @@ __haiku_select_miibus_driver(device_t dev) } -int check_disable_interrupts_dc(device_t dev); -void reenable_interrupts_dc(device_t dev); - -extern int check_disable_interrupts_de(device_t dev); -extern void reenable_interrupts_de(device_t dev); - - int HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev) { uint16 name = *(uint16*)dev->device_name; - switch(name) { + switch (name) { case 'cd': return check_disable_interrupts_dc(dev); case 'ed': @@ -84,7 +88,7 @@ void HAIKU_REENABLE_INTERRUPTS(device_t dev) { uint16 name = *(uint16*)dev->device_name; - switch(name) { + switch (name) { case 'cd': reenable_interrupts_dc(dev); break; @@ -98,7 +102,8 @@ HAIKU_REENABLE_INTERRUPTS(device_t dev) } -int check_disable_interrupts_dc(device_t dev) +int +check_disable_interrupts_dc(device_t dev) { struct dc_softc *sc = device_get_softc(dev); uint16_t status; @@ -126,12 +131,13 @@ int check_disable_interrupts_dc(device_t dev) CSR_WRITE_4(sc, DC_IMR, 0); HAIKU_INTR_REGISTER_LEAVE(); - + return 1; } -void reenable_interrupts_dc(device_t dev) +void +reenable_interrupts_dc(device_t dev) { struct dc_softc *sc = device_get_softc(dev); DC_LOCK(sc); diff --git a/src/add-ons/kernel/drivers/network/dec21xxx/dev/de/glue.c b/src/add-ons/kernel/drivers/network/dec21xxx/dev/de/glue.c index f0584b39c6..505d09da52 100644 --- a/src/add-ons/kernel/drivers/network/dec21xxx/dev/de/glue.c +++ b/src/add-ons/kernel/drivers/network/dec21xxx/dev/de/glue.c @@ -51,7 +51,7 @@ check_disable_interrupts_de(device_t dev) TULIP_CSR_WRITE(sc, csr_intr, 0); HAIKU_INTR_REGISTER_LEAVE(); - + return 1; } @@ -64,3 +64,4 @@ reenable_interrupts_de(device_t dev) TULIP_CSR_WRITE(sc, csr_intr, sc->tulip_intrmask); TULIP_UNLOCK(sc); } +