Fix a long standing confusion between n_mgm_command and mph_command_req
by removing the former completely. This makes isdntrace work again.
This commit is contained in:
parent
c34c58d78e
commit
4a7710e8d9
|
@ -27,7 +27,7 @@
|
||||||
* i4b_ctl.c - i4b system control port driver
|
* i4b_ctl.c - i4b system control port driver
|
||||||
* ------------------------------------------
|
* ------------------------------------------
|
||||||
*
|
*
|
||||||
* $Id: i4b_ctl.c,v 1.6 2002/03/16 16:56:03 martin Exp $
|
* $Id: i4b_ctl.c,v 1.7 2002/03/19 20:10:45 martin Exp $
|
||||||
*
|
*
|
||||||
* $FreeBSD$
|
* $FreeBSD$
|
||||||
*
|
*
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: i4b_ctl.c,v 1.6 2002/03/16 16:56:03 martin Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: i4b_ctl.c,v 1.7 2002/03/19 20:10:45 martin Exp $");
|
||||||
|
|
||||||
#include "isdnctl.h"
|
#include "isdnctl.h"
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ isdnctlioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||||
l2_softc_t * scl2;
|
l2_softc_t * scl2;
|
||||||
cst = (struct chipstat *)data;
|
cst = (struct chipstat *)data;
|
||||||
scl2 = (l2_softc_t*)isdn_find_l2_by_bri(cst->driver_unit);
|
scl2 = (l2_softc_t*)isdn_find_l2_by_bri(cst->driver_unit);
|
||||||
scl2->driver->n_mgmt_command(scl2->l1_token, CMR_GCST, cst);
|
scl2->driver->mph_command_req(scl2->l1_token, CMR_GCST, cst);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,7 +303,7 @@ isdnctlioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||||
l2_softc_t * scl2;
|
l2_softc_t * scl2;
|
||||||
cst = (struct chipstat *)data;
|
cst = (struct chipstat *)data;
|
||||||
scl2 = (l2_softc_t*)isdn_find_l2_by_bri(cst->driver_unit);
|
scl2 = (l2_softc_t*)isdn_find_l2_by_bri(cst->driver_unit);
|
||||||
scl2->driver->n_mgmt_command(scl2->l1_token, CMR_CCST, cst);
|
scl2->driver->mph_command_req(scl2->l1_token, CMR_CCST, cst);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: i4b_l1l2.h,v 1.2 2001/03/24 12:40:31 martin Exp $ */
|
/* $NetBSD: i4b_l1l2.h,v 1.3 2002/03/19 20:10:45 martin Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Martin Husemann. All rights reserved.
|
* Copyright (c) 2001 Martin Husemann. All rights reserved.
|
||||||
|
@ -66,9 +66,6 @@ struct isdn_layer1_bri_driver {
|
||||||
|
|
||||||
/* Request to execute an internal command. */
|
/* Request to execute an internal command. */
|
||||||
int (*mph_command_req)(isdn_layer1token, int, void *);
|
int (*mph_command_req)(isdn_layer1token, int, void *);
|
||||||
|
|
||||||
/* switch on/off trace */
|
|
||||||
void (*n_mgmt_command)(isdn_layer1token, int cmd, void *);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: i4b_l2.c,v 1.5 2001/11/13 01:06:21 lukem Exp $ */
|
/* $NetBSD: i4b_l2.c,v 1.6 2002/03/19 20:10:45 martin Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
|
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
* i4b_l2.c - ISDN layer 2 (Q.921)
|
* i4b_l2.c - ISDN layer 2 (Q.921)
|
||||||
* -------------------------------
|
* -------------------------------
|
||||||
*
|
*
|
||||||
* $Id: i4b_l2.c,v 1.5 2001/11/13 01:06:21 lukem Exp $
|
* $Id: i4b_l2.c,v 1.6 2002/03/19 20:10:45 martin Exp $
|
||||||
*
|
*
|
||||||
* $FreeBSD$
|
* $FreeBSD$
|
||||||
*
|
*
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: i4b_l2.c,v 1.5 2001/11/13 01:06:21 lukem Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: i4b_l2.c,v 1.6 2002/03/19 20:10:45 martin Exp $");
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
#include "i4bq921.h"
|
#include "i4bq921.h"
|
||||||
|
@ -295,8 +295,7 @@ int i4b_mdl_command_req(int bri, int command, void * parm)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX - check if we still need this (and the whole function
|
/* pass down to layer 1 driver */
|
||||||
pointer, when enable/disable is done properly) */
|
|
||||||
sc->driver->mph_command_req(sc->l1_token, command, parm);
|
sc->driver->mph_command_req(sc->l1_token, command, parm);
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
* i4b_l4if.c - Layer 3 interface to Layer 4
|
* i4b_l4if.c - Layer 3 interface to Layer 4
|
||||||
* -------------------------------------------
|
* -------------------------------------------
|
||||||
*
|
*
|
||||||
* $Id: i4b_l4if.c,v 1.4 2002/02/14 16:20:47 drochner Exp $
|
* $Id: i4b_l4if.c,v 1.5 2002/03/19 20:10:45 martin Exp $
|
||||||
*
|
*
|
||||||
* $FreeBSD$
|
* $FreeBSD$
|
||||||
*
|
*
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: i4b_l4if.c,v 1.4 2002/02/14 16:20:47 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: i4b_l4if.c,v 1.5 2002/03/19 20:10:45 martin Exp $");
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
#include "i4bq931.h"
|
#include "i4bq931.h"
|
||||||
|
@ -79,9 +79,6 @@ __KERNEL_RCSID(0, "$NetBSD: i4b_l4if.c,v 1.4 2002/02/14 16:20:47 drochner Exp $"
|
||||||
|
|
||||||
#include <netisdn/i4b_l4.h>
|
#include <netisdn/i4b_l4.h>
|
||||||
|
|
||||||
extern void isic_settrace(int unit, int val); /*XXX*/
|
|
||||||
extern int isic_gettrace(int unit); /*XXX*/
|
|
||||||
|
|
||||||
static void n_connect_request(u_int cdid);
|
static void n_connect_request(u_int cdid);
|
||||||
static void n_connect_response(u_int cdid, int response, int cause);
|
static void n_connect_response(u_int cdid, int response, int cause);
|
||||||
static void n_disconnect_request(u_int cdid, int cause);
|
static void n_disconnect_request(u_int cdid, int cause);
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
* i4btrc - device driver for trace data read device
|
* i4btrc - device driver for trace data read device
|
||||||
* ---------------------------------------------------
|
* ---------------------------------------------------
|
||||||
*
|
*
|
||||||
* $Id: i4b_trace.c,v 1.7 2002/03/16 16:56:05 martin Exp $
|
* $Id: i4b_trace.c,v 1.8 2002/03/19 20:10:45 martin Exp $
|
||||||
*
|
*
|
||||||
* last edit-date: [Fri Jan 5 11:33:47 2001]
|
* last edit-date: [Fri Jan 5 11:33:47 2001]
|
||||||
*
|
*
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: i4b_trace.c,v 1.7 2002/03/16 16:56:05 martin Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: i4b_trace.c,v 1.8 2002/03/19 20:10:45 martin Exp $");
|
||||||
|
|
||||||
#include "isdntrc.h"
|
#include "isdntrc.h"
|
||||||
|
|
||||||
|
@ -274,9 +274,9 @@ isdntrcclose(dev_t dev, int flag, int fmt, struct proc *p)
|
||||||
tx_l2sc = (l2_softc_t*)isdn_find_l2_by_bri(txunit);
|
tx_l2sc = (l2_softc_t*)isdn_find_l2_by_bri(txunit);
|
||||||
|
|
||||||
if (rx_l2sc != NULL)
|
if (rx_l2sc != NULL)
|
||||||
rx_l2sc->driver->n_mgmt_command(rx_l2sc->l1_token, CMR_SETTRACE, TRACE_OFF);
|
rx_l2sc->driver->mph_command_req(rx_l2sc->l1_token, CMR_SETTRACE, TRACE_OFF);
|
||||||
if (tx_l2sc != NULL)
|
if (tx_l2sc != NULL)
|
||||||
tx_l2sc->driver->n_mgmt_command(tx_l2sc->l1_token, CMR_SETTRACE, TRACE_OFF);
|
tx_l2sc->driver->mph_command_req(tx_l2sc->l1_token, CMR_SETTRACE, TRACE_OFF);
|
||||||
|
|
||||||
x = splnet();
|
x = splnet();
|
||||||
device_state[rxunit] = ST_IDLE;
|
device_state[rxunit] = ST_IDLE;
|
||||||
|
@ -287,7 +287,7 @@ isdntrcclose(dev_t dev, int flag, int fmt, struct proc *p)
|
||||||
} else {
|
} else {
|
||||||
l2_softc_t * l2sc = (l2_softc_t*)isdn_find_l2_by_bri(bri);
|
l2_softc_t * l2sc = (l2_softc_t*)isdn_find_l2_by_bri(bri);
|
||||||
if (l2sc != NULL) {
|
if (l2sc != NULL) {
|
||||||
l2sc->driver->n_mgmt_command(l2sc->l1_token, CMR_SETTRACE, TRACE_OFF);
|
l2sc->driver->mph_command_req(l2sc->l1_token, CMR_SETTRACE, TRACE_OFF);
|
||||||
x = splnet();
|
x = splnet();
|
||||||
device_state[bri] = ST_IDLE;
|
device_state[bri] = ST_IDLE;
|
||||||
splx(x);
|
splx(x);
|
||||||
|
@ -368,7 +368,7 @@ isdntrcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||||
case I4B_TRC_SET:
|
case I4B_TRC_SET:
|
||||||
if (l2sc == NULL)
|
if (l2sc == NULL)
|
||||||
return ENOTTY;
|
return ENOTTY;
|
||||||
l2sc->driver->n_mgmt_command(l2sc->l1_token, CMR_SETTRACE, (void *)*(unsigned long *)data);
|
l2sc->driver->mph_command_req(l2sc->l1_token, CMR_SETTRACE, (void *)*(unsigned long *)data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case I4B_TRC_SETA:
|
case I4B_TRC_SETA:
|
||||||
|
@ -401,8 +401,8 @@ isdntrcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||||
|
|
||||||
outunit = bri;
|
outunit = bri;
|
||||||
analyzemode = 1;
|
analyzemode = 1;
|
||||||
rx_l2sc->driver->n_mgmt_command(rx_l2sc->l1_token, CMR_SETTRACE, (void *)(unsigned long)(tsa->rxflags & (TRACE_I | TRACE_D_RX | TRACE_B_RX)));
|
rx_l2sc->driver->mph_command_req(rx_l2sc->l1_token, CMR_SETTRACE, (void *)(unsigned long)(tsa->rxflags & (TRACE_I | TRACE_D_RX | TRACE_B_RX)));
|
||||||
tx_l2sc->driver->n_mgmt_command(tx_l2sc->l1_token, CMR_SETTRACE, (void *)(unsigned long)(tsa->txflags & (TRACE_I | TRACE_D_RX | TRACE_B_RX)));
|
tx_l2sc->driver->mph_command_req(tx_l2sc->l1_token, CMR_SETTRACE, (void *)(unsigned long)(tsa->txflags & (TRACE_I | TRACE_D_RX | TRACE_B_RX)));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue