Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/thorpej-devvp]: src/sys Revert the t_dev -> t_devvp change in struct tty...
details: https://anonhg.NetBSD.org/src/rev/aa8fc4e1108b
branches: thorpej-devvp
changeset: 514631:aa8fc4e1108b
user: fvdl <fvdl%NetBSD.org@localhost>
date: Sat Oct 13 17:42:31 2001 +0000
description:
Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
diffstat:
sys/arch/alpha/a12/a12dc.c | 17 ++--
sys/arch/alpha/alpha/promcons.c | 17 ++--
sys/arch/alpha/tc/scc.c | 27 +++----
sys/arch/amiga/dev/ite.c | 8 +-
sys/arch/amiga/dev/mfc.c | 26 +++---
sys/arch/amiga/dev/msc.c | 57 +++++++--------
sys/arch/amiga/dev/ser.c | 37 +++++----
sys/arch/arc/dev/pccons.c | 6 +-
sys/arch/arm/footbridge/footbridge_com.c | 10 +-
sys/arch/arm/sa11x0/sa11x0_com.c | 14 ++--
sys/arch/arm32/shark/pccons.c | 8 +-
sys/arch/arm32/vidc/console/console.c | 8 +-
sys/arch/arm32/vidc/console/vidcrender.c | 5 +-
sys/arch/atari/dev/ite.c | 9 +-
sys/arch/atari/dev/ser.c | 14 ++--
sys/arch/atari/dev/zs.c | 73 ++++++++++++--------
sys/arch/bebox/isa/pccons.c | 10 +-
sys/arch/hp300/dev/apci.c | 10 +-
sys/arch/hp300/dev/dca.c | 10 +-
sys/arch/hp300/dev/dcm.c | 43 ++++++------
sys/arch/hp300/dev/ite.c | 8 +-
sys/arch/hpcarm/sa11x0/sa11x0_com.c | 14 ++--
sys/arch/hpcmips/tx/txcom.c | 10 +-
sys/arch/i386/isa/pccons.c | 13 ++-
sys/arch/luna68k/dev/siotty.c | 12 +-
sys/arch/macppc/dev/ofcons.c | 6 +-
sys/arch/macppc/dev/z8530tty.c | 17 ++--
sys/arch/pc532/dev/scn.c | 18 ++--
sys/arch/pmax/dev/dc.c | 52 +++++++-------
sys/arch/pmax/dev/dtop.c | 8 +-
sys/arch/pmax/dev/rcons.c | 7 +-
sys/arch/pmax/tc/scc.c | 44 ++++++------
sys/arch/prep/isa/pccons.c | 6 +-
sys/arch/sh3/dev/sci.c | 12 +-
sys/arch/sh3/dev/scif.c | 12 +-
sys/arch/sparc/dev/kd.c | 6 +-
sys/arch/sparc64/dev/kd.c | 6 +-
sys/arch/sparc64/dev/pcons.c | 14 ++-
sys/arch/sun3/conf/DISKLESS | 4 +-
sys/arch/sun3/dev/kd.c | 6 +-
sys/arch/vax/uba/qv.c | 6 +-
sys/arch/vax/vax/gencons.c | 10 +-
sys/arch/x68k/dev/com.c | 10 +-
sys/arch/x68k/dev/ite.c | 12 +--
sys/arch/x86_64/isa/pccons.c | 6 +-
sys/compat/common/tty_43.c | 14 ++-
sys/dev/arcbios/arcbios_tty.c | 6 +-
sys/dev/cons.c | 15 ++-
sys/dev/hpc/biconsdev.c | 5 +-
sys/dev/ic/cd18xx.c | 107 ++++++++++++++++--------------
sys/dev/ic/clmpcc.c | 12 +-
sys/dev/ic/com.c | 26 +++----
sys/dev/ic/cy.c | 16 ++--
sys/dev/ic/z8530sc.c | 11 +-
sys/dev/ic/z8530sc.h | 4 +-
sys/dev/ic/z8530tty.c | 52 ++++-----------
sys/dev/ofw/ofcons.c | 6 +-
sys/dev/pci/cz.c | 12 ++-
sys/dev/qbus/dhu.c | 21 +++--
sys/dev/qbus/dl.c | 8 +-
sys/dev/qbus/dz.c | 10 +-
sys/dev/qbus/qd.c | 8 +-
sys/dev/sbus/magma.c | 18 ++--
sys/dev/sun/kbd_zs.c | 7 +-
sys/dev/sun/ms_zs.c | 7 +-
sys/dev/sun/sunkbd.c | 4 +-
sys/dev/sun/sunms.c | 4 +-
sys/dev/usb/ucom.c | 22 +++---
sys/dev/wscons/wsdisplay.c | 13 +--
sys/kern/kern_acct.c | 4 +-
sys/kern/kern_sysctl.c | 8 +-
sys/kern/tty.c | 43 +++++------
sys/kern/tty_pty.c | 11 +-
sys/miscfs/procfs/procfs_status.c | 6 +-
sys/net/if_pppvar.h | 3 +-
sys/net/ppp_tty.c | 14 ++-
sys/sys/conf.h | 4 +-
sys/sys/tty.h | 16 +++-
78 files changed, 626 insertions(+), 619 deletions(-)
diffs (truncated from 4740 to 300 lines):
diff -r 25fa5c2c37aa -r aa8fc4e1108b sys/arch/alpha/a12/a12dc.c
--- a/sys/arch/alpha/a12/a12dc.c Thu Oct 11 12:33:57 2001 +0000
+++ b/sys/arch/alpha/a12/a12dc.c Sat Oct 13 17:42:31 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: a12dc.c,v 1.5.6.1 2001/10/10 11:55:48 fvdl Exp $ */
+/* $NetBSD: a12dc.c,v 1.5.6.2 2001/10/13 17:42:31 fvdl Exp $ */
/* [Notice revision 2.2]
* Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@@ -64,7 +64,7 @@
#ifndef BSIDE
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: a12dc.c,v 1.5.6.1 2001/10/10 11:55:48 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a12dc.c,v 1.5.6.2 2001/10/13 17:42:31 fvdl Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -150,7 +150,7 @@
/* note that we've attached the chipset; can't have 2 A12Cs. */
a12dcfound = 1;
- printf(": driver %s\n", "$Revision: 1.5.6.1 $");
+ printf(": driver %s\n", "$Revision: 1.5.6.2 $");
tp = a12dc_tty[0] = ttymalloc();
tp->t_oproc = a12dcstart;
@@ -253,7 +253,8 @@
int flag, mode;
struct proc *p;
{
- int unit = minor(vdev_rdev(devvp));
+ dev_t dev = vdev_rdev(devvp);
+ int unit = minor(dev);
struct tty *tp;
int s;
@@ -280,7 +281,7 @@
tp->t_oproc = a12dcstart;
tp->t_param = a12dcparam;
- tp->t_devvp = devvp;
+ tp->t_dev = dev;
if ((tp->t_state & TS_ISOPEN) == 0) {
tp->t_state |= TS_CARR_ON;
ttychars(tp);
@@ -370,7 +371,7 @@
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
if (error >= 0)
return error;
- error = ttioctl(tp, cmd, data, flag, p);
+ error = ttioctl(tp, devvp, cmd, data, flag, p);
if (error >= 0)
return error;
@@ -403,7 +404,7 @@
}
tp->t_state |= TS_BUSY;
while (tp->t_outq.c_cc != 0)
- a12dccnputc(vdev_rdev(tp->t_devvp), getc(&tp->t_outq));
+ a12dccnputc(tp->t_dev, getc(&tp->t_outq));
tp->t_state &= ~TS_BUSY;
out:
splx(s);
@@ -435,7 +436,7 @@
struct tty *tp = v;
u_char c;
- while (a12dccnlookc(vdev_rdev(tp->t_devvp), &c)) {
+ while (a12dccnlookc(tp->t_dev, &c)) {
if (tp->t_state & TS_ISOPEN)
(*tp->t_linesw->l_rint)(c, tp);
}
diff -r 25fa5c2c37aa -r aa8fc4e1108b sys/arch/alpha/alpha/promcons.c
--- a/sys/arch/alpha/alpha/promcons.c Thu Oct 11 12:33:57 2001 +0000
+++ b/sys/arch/alpha/alpha/promcons.c Sat Oct 13 17:42:31 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: promcons.c,v 1.18.6.3 2001/10/10 11:55:48 fvdl Exp $ */
+/* $NetBSD: promcons.c,v 1.18.6.4 2001/10/13 17:42:32 fvdl Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: promcons.c,v 1.18.6.3 2001/10/10 11:55:48 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: promcons.c,v 1.18.6.4 2001/10/13 17:42:32 fvdl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -46,8 +46,6 @@
#include <sys/device.h>
#include <sys/vnode.h>
-#include <miscfs/specfs/specdev.h>
-
#include <uvm/uvm_extern.h>
#include <machine/conf.h>
@@ -69,7 +67,8 @@
int
promopen(struct vnode *devvp, int flag, int mode, struct proc *p)
{
- int unit = minor(vdev_rdev(devvp));
+ dev_t dev = vdev_rdev(devvp);
+ int unit = minor(dev);
struct tty *tp;
int s;
int error = 0, setuptimeout = 0;
@@ -89,7 +88,7 @@
tp->t_oproc = promstart;
tp->t_param = promparam;
- tp->t_devvp = devvp;
+ tp->t_dev = dev;
if ((tp->t_state & TS_ISOPEN) == 0) {
tp->t_state |= TS_CARR_ON;
ttychars(tp);
@@ -172,7 +171,7 @@
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
if (error >= 0)
return error;
- error = ttioctl(tp, cmd, data, flag, p);
+ error = ttioctl(tp, devvp, cmd, data, flag, p);
if (error >= 0)
return error;
@@ -203,7 +202,7 @@
}
tp->t_state |= TS_BUSY;
while (tp->t_outq.c_cc != 0)
- promcnputc(vdev_rdev(tp->t_devvp), getc(&tp->t_outq));
+ promcnputc(tp->t_dev, getc(&tp->t_outq));
tp->t_state &= ~TS_BUSY;
out:
splx(s);
@@ -230,7 +229,7 @@
struct tty *tp = v;
u_char c;
- while (promcnlookc(vdev_rdev(tp->t_devvp), &c)) {
+ while (promcnlookc(tp->t_dev, &c)) {
if (tp->t_state & TS_ISOPEN)
(*tp->t_linesw->l_rint)(c, tp);
}
diff -r 25fa5c2c37aa -r aa8fc4e1108b sys/arch/alpha/tc/scc.c
--- a/sys/arch/alpha/tc/scc.c Thu Oct 11 12:33:57 2001 +0000
+++ b/sys/arch/alpha/tc/scc.c Sat Oct 13 17:42:31 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scc.c,v 1.57.2.3 2001/10/10 11:55:48 fvdl Exp $ */
+/* $NetBSD: scc.c,v 1.57.2.4 2001/10/13 17:42:32 fvdl Exp $ */
/*
* Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: scc.c,v 1.57.2.3 2001/10/10 11:55:48 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scc.c,v 1.57.2.4 2001/10/13 17:42:32 fvdl Exp $");
#include "opt_ddb.h"
#include "opt_dec_3000_300.h"
@@ -481,7 +481,7 @@
}
tp->t_oproc = sccstart;
tp->t_param = sccparam;
- tp->t_devvp = devvp;
+ tp->t_dev = rdev;
if ((tp->t_state & TS_ISOPEN) == 0 && tp->t_wopen == 0) {
ttychars(tp);
firstopen = 1;
@@ -624,7 +624,7 @@
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
if (error >= 0)
return (error);
- error = ttioctl(tp, cmd, data, flag, p);
+ error = ttioctl(tp, devvp, cmd, data, flag, p);
if (error >= 0)
return (error);
@@ -682,10 +682,9 @@
{
register struct scc_softc *sc;
- sc = vdev_privdata(tp->t_devvp);
-
/* Extract the softc and call cold_sccparam to do all the work. */
- return cold_sccparam(tp, t, sc, SCCLINE(vdev_rdev(tp->t_devvp)));
+ sc = scc_cd.cd_devs[SCCUNIT(tp->t_dev)];
+ return cold_sccparam(tp, t, sc, SCCLINE(tp->t_dev));
}
@@ -950,11 +949,10 @@
register int cc, chan;
u_char temp;
int s, sendone;
- dev_t rdev;
- rdev = vdev_rdev(tp->t_devvp);
- sc = vdev_privdata(tp->t_devvp);
- dp = &sc->scc_pdma[SCCLINE(rdev)];
+ sc = scc_cd.cd_devs[SCCUNIT(tp->t_dev)];
+ dp = &sc->scc_pdma[SCCLINE(tp->t_dev)];
+
regs = (scc_regmap_t *)dp->p_addr;
s = spltty();
if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP))
@@ -1010,12 +1008,9 @@
register struct pdma *dp;
register struct scc_softc *sc;
register int s;
- dev_t rdev;
- sc = vdev_privdata(tp->t_devvp);
- rdev = vdev_rdev(tp->t_devvp);
-
- dp = &sc->scc_pdma[SCCLINE(rdev)];
+ sc = scc_cd.cd_devs[SCCUNIT(tp->t_dev)];
+ dp = &sc->scc_pdma[SCCLINE(tp->t_dev)];
s = spltty();
if (tp->t_state & TS_BUSY) {
dp->p_end = dp->p_mem;
diff -r 25fa5c2c37aa -r aa8fc4e1108b sys/arch/amiga/dev/ite.c
--- a/sys/arch/amiga/dev/ite.c Thu Oct 11 12:33:57 2001 +0000
+++ b/sys/arch/amiga/dev/ite.c Sat Oct 13 17:42:31 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ite.c,v 1.56.4.1 2001/10/10 11:55:50 fvdl Exp $ */
+/* $NetBSD: ite.c,v 1.56.4.2 2001/10/13 17:42:33 fvdl Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -464,7 +464,7 @@
}
tp->t_oproc = itestart;
tp->t_param = ite_param;
- tp->t_devvp = devvp;
+ tp->t_dev = dev;
if ((tp->t_state & TS_ISOPEN) == 0 && tp->t_wopen == 0) {
ttychars(tp);
tp->t_iflag = TTYDEF_IFLAG;
@@ -602,7 +602,7 @@
error = tp->t_linesw->l_ioctl(tp, cmd, addr, flag, p);
if (error >= 0)
return (error);
- error = ttioctl(tp, cmd, addr, flag, p);
+ error = ttioctl(tp, devvp, cmd, addr, flag, p);
if (error >= 0)
return (error);
@@ -667,7 +667,7 @@
int s, len;
dev_t dev;
- dev = vdev_rdev(tp->t_devvp);
+ dev = tp->t_dev;
ip = getitesp(dev);
KDASSERT(tp);
diff -r 25fa5c2c37aa -r aa8fc4e1108b sys/arch/amiga/dev/mfc.c
--- a/sys/arch/amiga/dev/mfc.c Thu Oct 11 12:33:57 2001 +0000
+++ b/sys/arch/amiga/dev/mfc.c Sat Oct 13 17:42:31 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfc.c,v 1.24.4.1 2001/10/10 11:55:51 fvdl Exp $ */
+/* $NetBSD: mfc.c,v 1.24.4.2 2001/10/13 17:42:33 fvdl Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@@ -487,7 +487,7 @@
tp->t_oproc = (void (*) (struct tty *)) mfcsstart;
tp->t_param = mfcsparam;
- tp->t_devvp = devvp;
+ tp->t_dev = dev;
tp->t_hwiflow = mfcshwiflow;
vdev_setprivdata(devvp, sc);
@@ -558,7 +558,7 @@
* Reset the tty pointer, as there could have been a dialout
* use of the tty with a dialin open waiting.
*/
- tp->t_devvp = devvp;
+ tp->t_dev = dev;
return tp->t_linesw->l_open(devvp, tp);
}
@@ -692,7 +692,7 @@
if (error >= 0)
return(error);
- error = ttioctl(tp, cmd, data, flag, p);
+ error = ttioctl(tp, devvp, cmd, data, flag, p);
if (error >= 0)
return(error);
@@ -754,11 +754,11 @@
struct termios *t;
{
Home |
Main Index |
Thread Index |
Old Index