pcnet: only disable interrupts, without acknowledging them.

* related bug #10088.
This commit is contained in:
Jérôme Duval
2013-10-16 17:34:29 +02:00
parent f289aa4c74
commit a905216770
@@ -8,39 +8,11 @@
#include <dev/pcn/if_pcnreg.h>
#define PCN_CSR_SETBIT(sc, reg, x) \
pcn_csr_write(sc, reg, pcn_csr_read(sc, reg) | (x))
#define PCN_CSR_CLRBIT(sc, reg, x) \
pcn_csr_write(sc, reg, pcn_csr_read(sc, reg) & ~(x))
int check_disable_interrupts_pcn(device_t dev);
void reenable_interrupts_pcn(device_t dev);
static u_int32_t
pcn_csr_read(sc, reg)
struct pcn_softc *sc;
int reg;
{
CSR_WRITE_4(sc, PCN_IO32_RAP, reg);
return(CSR_READ_4(sc, PCN_IO32_RDP));
}
static void
pcn_csr_write(sc, reg, val)
struct pcn_softc *sc;
int reg;
int val;
{
CSR_WRITE_4(sc, PCN_IO32_RAP, reg);
CSR_WRITE_4(sc, PCN_IO32_RDP, val);
return;
}
int
check_disable_interrupts_pcn(device_t dev)
{
@@ -60,8 +32,8 @@ check_disable_interrupts_pcn(device_t dev)
return 0;
}
/* set the new flags, disable interrupts */
PCN_CSR_CLRBIT(sc, PCN_CSR_CSR, PCN_CSR_INTEN);
/* disable interrupts */
CSR_WRITE_4(sc, PCN_IO32_RDP, 0);
HAIKU_INTR_REGISTER_LEAVE();
@@ -73,5 +45,6 @@ void
reenable_interrupts_pcn(device_t dev)
{
struct pcn_softc *sc = device_get_softc(dev);
PCN_CSR_SETBIT(sc, PCN_CSR_CSR, PCN_CSR_INTEN);
CSR_WRITE_4(sc, PCN_IO32_RAP, PCN_CSR_CSR);
CSR_WRITE_4(sc, PCN_IO32_RDP, PCN_CSR_INTEN);
}