summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/if_ar.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-03-03 08:42:28 +0000
committerpeter <peter@FreeBSD.org>1996-03-03 08:42:28 +0000
commit6195d71f7ca9da292bed0d3c5cfcb5a8a5c5e87d (patch)
tree1b446579479ddd119b8c63e08fbb0e80923cb39a /sys/i386/isa/if_ar.c
parent21e63aa35d57f5cb1bcce1b1573087dd832366fe (diff)
downloadFreeBSD-src-6195d71f7ca9da292bed0d3c5cfcb5a8a5c5e87d.zip
FreeBSD-src-6195d71f7ca9da292bed0d3c5cfcb5a8a5c5e87d.tar.gz
Make the handshake lines do the right thing. This is untested by the author
but others say it's working. (DTR etc) Closes PR#884 Submitted-by: John Hay <jhay@mikom.csir.co.za>
Diffstat (limited to 'sys/i386/isa/if_ar.c')
-rw-r--r--sys/i386/isa/if_ar.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/sys/i386/isa/if_ar.c b/sys/i386/isa/if_ar.c
index adf0ed1..d4d9b9b 100644
--- a/sys/i386/isa/if_ar.c
+++ b/sys/i386/isa/if_ar.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ar.c,v 1.4 1995/12/15 00:54:03 bde Exp $
+ * $Id: if_ar.c,v 1.5 1996/02/06 18:50:32 wollman Exp $
*/
/*
@@ -710,10 +710,10 @@ static void ar_up(struct ar_softc *sc)
* And what about CTS/DCD etc... ?
*/
if(sc->hc->handshake & AR_SHSK_RTS)
- msci->ctl |= SCA_CTL_RTS;
+ msci->ctl &= ~SCA_CTL_RTS;
if(sc->hc->handshake & AR_SHSK_DTR) {
- sc->hc->txc_dtr[sc->scano] |= sc->scachan ?
- AR_TXC_DTR_DTR1 : AR_TXC_DTR_DTR0;
+ sc->hc->txc_dtr[sc->scano] &= sc->scachan ?
+ ~AR_TXC_DTR_DTR1 : ~AR_TXC_DTR_DTR0;
outb(sc->hc->iobase + sc->hc->txc_dtr_off[sc->scano],
sc->hc->txc_dtr[sc->scano]);
}
@@ -751,7 +751,7 @@ static void ar_down(struct ar_softc *sc)
msci->cmd = SCA_CMD_TXDISABLE;
if(sc->hc->handshake & AR_SHSK_RTS)
- msci->ctl &= ~SCA_CTL_RTS;
+ msci->ctl |= SCA_CTL_RTS;
if(sc->hc->handshake & AR_SHSK_DTR) {
sc->hc->txc_dtr[sc->scano] |= sc->scachan ?
AR_TXC_DTR_DTR1 : AR_TXC_DTR_DTR0;
@@ -789,17 +789,18 @@ void arc_init(struct isa_device *id)
M_DEVBUF, M_WAITOK);
bzero(sc, hc->numports * sizeof(struct ar_softc));
+ hc->txc_dtr[0] = AR_TXC_DTR_NOTRESET |
+ AR_TXC_DTR_DTR0 | AR_TXC_DTR_DTR1;
+ hc->txc_dtr[1] = AR_TXC_DTR_DTR0 | AR_TXC_DTR_DTR1;
+ hc->txc_dtr_off[0] = AR_TXC_DTR0;
+ hc->txc_dtr_off[1] = AR_TXC_DTR2;
+
/*
* reset the card and wait at least 1uS.
*/
- outb(hc->iobase + AR_TXC_DTR0, AR_TXC_DTR_RESET);
+ outb(hc->iobase + AR_TXC_DTR0, ~AR_TXC_DTR_NOTRESET & hc->txc_dtr[0]);
DELAY(2);
- outb(hc->iobase + AR_TXC_DTR0, AR_TXC_DTR_NOTRESET);
-
- hc->txc_dtr[0] = AR_TXC_DTR_NOTRESET;
- hc->txc_dtr[1] = 0;
- hc->txc_dtr_off[0] = AR_TXC_DTR0;
- hc->txc_dtr_off[1] = AR_TXC_DTR2;
+ outb(hc->iobase + AR_TXC_DTR0, hc->txc_dtr[0]);
/*
* Configure the card.
@@ -929,7 +930,7 @@ void ar_init_msci(struct ar_softc *sc)
* mode registers.
*/
msci->cmd = SCA_CMD_RXRESET;
- msci->ctl = SCA_CTL_IDLPAT | SCA_CTL_UDRNC;
+ msci->ctl = SCA_CTL_IDLPAT | SCA_CTL_UDRNC | SCA_CTL_RTS;
/*
* For now all interfaces are programmed to use the RX clock for
OpenPOWER on IntegriCloud