2 * Copyright 2008-2010, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
10 #include <sys/taskqueue.h>
12 #include <machine/bus.h>
14 #include <pci/if_rlreg.h>
17 extern driver_t
*DRIVER_MODULE_NAME(rgephy
, miibus
);
18 extern driver_t
*DRIVER_MODULE_NAME(rlphy
, miibus
);
21 HAIKU_FBSD_DRIVER_GLUE(rtl81xx
, re
, pci
);
22 HAIKU_DRIVER_REQUIREMENTS(FBSD_TASKQUEUES
| FBSD_FAST_TASKQUEUE
);
26 __haiku_select_miibus_driver(device_t dev
)
28 driver_t
*drivers
[] = {
29 DRIVER_MODULE_NAME(rgephy
, miibus
),
30 DRIVER_MODULE_NAME(rlphy
, miibus
),
34 return __haiku_probe_miibus(dev
, drivers
);
39 HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev
)
41 struct rl_softc
*sc
= device_get_softc(dev
);
44 status
= CSR_READ_2(sc
, RL_ISR
);
47 if (status
!= 0 && (status
& RL_INTRS
) == 0) {
48 CSR_WRITE_2(sc
, RL_ISR
, status
);
51 if ((status
& RL_INTRS
) == 0)
54 CSR_WRITE_2(sc
, RL_IMR
, 0);
60 HAIKU_REENABLE_INTERRUPTS(device_t dev
)
62 struct rl_softc
*sc
= device_get_softc(dev
);
64 CSR_WRITE_2(sc
, RL_IMR
, RL_INTRS
);