From dba85789c14b9caa558999f31f5aa2fb13ea0e86 Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Sat, 7 Oct 2000 16:15:12 +0000 Subject: Correct interrupt ack'ing for CardBus and MiniPCI. I hope this fixes 3c556. --- sys/dev/ic/xl.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'sys') diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c index fc9158302ae..9a29c0d2504 100644 --- a/sys/dev/ic/xl.c +++ b/sys/dev/ic/xl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xl.c,v 1.11 2000/09/30 14:07:10 aaron Exp $ */ +/* $OpenBSD: xl.c,v 1.12 2000/10/07 16:15:11 aaron Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -2038,13 +2038,12 @@ void xl_init(xsc) * Enable interrupts. */ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ACK|0xFF); + CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_STAT_ENB|XL_INTRS); + CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ENB|XL_INTRS); if (sc->intr_ack) (*sc->intr_ack)(sc); - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_STAT_ENB|XL_INTRS); - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ENB|XL_INTRS); - /* Set the RX early threshold */ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_THRESH|(XL_PACKET_SIZE >>2)); CSR_WRITE_2(sc, XL_DMACTL, XL_DMACTL_UP_RX_EARLY); @@ -2371,11 +2370,8 @@ void xl_stop(sc) CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_STAT_ENB|0); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ENB|0); -#if 0 - if (sc->xl_bustype == XL_BUS_CARDBUS) - bus_space_write_4(sc->xl_funct, sc->xl_funch, XL_CARDBUS_INTR, - XL_CARDBUS_INTR_ACK); -#endif + if (sc->intr_ack) + (*sc->intr_ack)(sc); /* Stop the stats updater. */ untimeout(xl_stats_update, sc); -- cgit v1.2.3