Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Update from Bill Studenmund <wrstuden%zembu.com@localhost>:
details: https://anonhg.NetBSD.org/src/rev/3d757e91f99d
branches: trunk
changeset: 486472:3d757e91f99d
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue May 23 01:02:21 2000 +0000
description:
Update from Bill Studenmund <wrstuden%zembu.com@localhost>:
Correctly send and receive BREAKs -- still needs to do something
intelligent with them. Some additional debugging goo.
diffstat:
sys/dev/pci/cz.c | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diffs (88 lines):
diff -r 47a0c4b884d2 -r 3d757e91f99d sys/dev/pci/cz.c
--- a/sys/dev/pci/cz.c Tue May 23 00:46:53 2000 +0000
+++ b/sys/dev/pci/cz.c Tue May 23 01:02:21 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cz.c,v 1.3 2000/05/19 06:01:14 thorpej Exp $ */
+/* $NetBSD: cz.c,v 1.4 2000/05/23 01:02:21 thorpej Exp $ */
/*-
* Copyright (c) 2000 Zembu Labs, Inc.
@@ -101,7 +101,7 @@
(C_IN_MDSR | C_IN_MRI | C_IN_MRTS | C_IN_MCTS | C_IN_TXBEMPTY | \
C_IN_TXFEMPTY | C_IN_TXLOWWM | C_IN_RXHIWM | C_IN_RXNNDT | \
C_IN_MDCD | C_IN_PR_ERROR | C_IN_FR_ERROR | C_IN_OVR_ERROR | \
- C_IN_RXOFL | C_IN_IOCTLW)
+ C_IN_RXOFL | C_IN_IOCTLW | C_IN_RXBRK)
/*
* cztty_softc:
@@ -757,6 +757,12 @@
CHNCTL_RS_STATUS)));
break;
+ case C_CM_MDSR:
+ case C_CM_MRI:
+ case C_CM_CTS:
+ case C_CM_RTS:
+ break;
+
case C_CM_PR_ERROR:
sc->sc_parity_errors++;
goto error_common;
@@ -773,6 +779,10 @@
cztty_diag, sc);
break;
+ case C_CM_RXBRK:
+ printf("Got BREAK\n");
+ break;
+
default:
#ifdef CZ_DEBUG
printf("%s: channel %d: Unknown interrupt 0x%x\n",
@@ -891,6 +901,9 @@
CZ_FWCTL_WRITE(cz, BRDCTL_HCMD_CHANNEL, sc->sc_channel);
CZ_PLX_WRITE(cz, PLX_PCI_LOCAL_DOORBELL, C_CM_IOCTL);
+#ifdef CZ_DEBUG
+ printf("last close with %d open channels and no interrupt handler == %d", cz->cz_nopenchan, (cz->cz_ih == NULL));
+#endif
if ((--cz->cz_nopenchan == 0) && (cz->cz_ih == NULL)) {
#ifdef CZ_DEBUG
printf("%s: Disabling polling\n", cz->cz_dev.dv_xname);
@@ -955,6 +968,7 @@
cz_wait_pci_doorbell(cz, "czopen");
CZTTY_CHAN_WRITE(sc, CHNCTL_OP_MODE, C_CH_ENABLE);
+ sc->sc_chanctl_rs_control |= C_RS_DTR | C_RS_CTS | C_RS_RTS;
/*
* Initialize the termios status to the defaults. Add in the
@@ -1353,11 +1367,9 @@
if (ISSET(t->c_cflag, CRTSCTS)) {
sc->sc_rs_control_dtr = C_RS_DTR;
sc->sc_chanctl_hw_flow = C_RS_CTS | C_RS_RTS;
-#if 0
} else if (ISSET(t->c_cflag, MDMBUF)) {
- sc->sc_rs_control_dtr = C_RS_RTS;
+ sc->sc_rs_control_dtr = 0;
sc->sc_chanctl_hw_flow = C_RS_DCD | C_RS_DTR;
-#endif
} else {
/*
* If no flow control, then always set RTS. This will make
@@ -1392,6 +1404,14 @@
CZTTY_CHAN_WRITE(sc, CHNCTL_HW_FLOW, sc->sc_chanctl_hw_flow);
CZTTY_CHAN_WRITE(sc, CHNCTL_RS_CONTROL, sc->sc_chanctl_rs_control);
+#ifdef CZ_DEBUG
+ printf(
+ "cz0: baud %d data %x parity %x\n\thwflow %x rscont %x dtrflg %x\n",
+ sc->sc_chanctl_comm_baud, sc->sc_chanctl_comm_data_l,
+ sc->sc_chanctl_comm_parity, sc->sc_chanctl_hw_flow,
+ sc->sc_chanctl_rs_control, sc->sc_rs_control_dtr);
+#endif
+
CZ_FWCTL_WRITE(cz, BRDCTL_HCMD_CHANNEL, sc->sc_channel);
CZ_PLX_WRITE(cz, PLX_PCI_LOCAL_DOORBELL, C_CM_IOCTL);
Home |
Main Index |
Thread Index |
Old Index