Added ISAR firmware support
This commit is contained in:
parent
e3a1cf85c0
commit
835bb26785
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
.\" $Id: hisaxctrl.man.in,v 1.1 1997/10/23 22:43:24 fritz Exp $
|
.\" $Id: hisaxctrl.man.in,v 1.2 1998/10/13 23:07:33 keil Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" CHECKIN $Date: 1997/10/23 22:43:24 $
|
.\" CHECKIN $Date: 1998/10/13 23:07:33 $
|
||||||
.\"
|
.\"
|
||||||
.\" Process this file with
|
.\" Process this file with
|
||||||
.\" groff -man -Tascii hisaxctrl.1 for ASCII output, or
|
.\" groff -man -Tascii hisaxctrl.1 for ASCII output, or
|
||||||
|
@ -8,14 +8,14 @@
|
||||||
.\"
|
.\"
|
||||||
.TH HISAXCTRL 8 "@MANDATE@" isdn4k-utils-@I4LVERSION@ "Linux System Administration"
|
.TH HISAXCTRL 8 "@MANDATE@" isdn4k-utils-@I4LVERSION@ "Linux System Administration"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
hisaxctrl \- configure HiSax-Module-logging
|
hisaxctrl \- configure HiSax-Module
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B hisaxctrl
|
.B hisaxctrl
|
||||||
.I DriverId DebugCmd DebugFlags
|
.I DriverId command parameters
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B hisaxctrl
|
.B hisaxctrl
|
||||||
is used to setup the logging-level of the HiSax-ISDN devicedriver. All
|
is used to setup the HiSax-ISDN device driver.
|
||||||
logging-output is sent to the device /dev/isdnctrl. So you can show it
|
All logging-output is sent to the device /dev/isdnctrl. So you can show it
|
||||||
by executing
|
by executing
|
||||||
.BR "cat /dev/isdnctrl" .
|
.BR "cat /dev/isdnctrl" .
|
||||||
.LP
|
.LP
|
||||||
|
@ -34,11 +34,13 @@ the DriverId is set by appending
|
||||||
to the commandline.
|
to the commandline.
|
||||||
.LP
|
.LP
|
||||||
.TP
|
.TP
|
||||||
.I DebugCmd
|
.I command
|
||||||
is an integer selecting the debug category. The following values are
|
is an integer selecting the setup category. The following values are
|
||||||
defined:
|
defined for setting the logging-level of the HiSax-ISDN device driver:
|
||||||
.LP
|
.LP
|
||||||
.RS
|
.RS
|
||||||
|
.BR " 0" " reports card status infos."
|
||||||
|
.br
|
||||||
.BR " 1" " selects generic debugging."
|
.BR " 1" " selects generic debugging."
|
||||||
.br
|
.br
|
||||||
.BR 11 " selects layer 1 developement debugging."
|
.BR 11 " selects layer 1 developement debugging."
|
||||||
|
@ -46,11 +48,29 @@ defined:
|
||||||
.BR 13 " selects layer 3 developement debugging."
|
.BR 13 " selects layer 3 developement debugging."
|
||||||
.br
|
.br
|
||||||
.RE
|
.RE
|
||||||
|
.LP
|
||||||
|
the following commands are used to enable special features during runtime
|
||||||
|
of the HiSax-ISDN device driver.
|
||||||
|
.LP
|
||||||
|
.RS
|
||||||
|
.BR " 2" " set B-channel ON delay to parameter (in ms)"
|
||||||
|
.br
|
||||||
|
.BR " 5" " set B-channel in leased mode"
|
||||||
|
.br
|
||||||
|
.BR " 6" " set B-channel in TESTLOOP mode"
|
||||||
|
.br
|
||||||
|
.BR " 7" " set/reset card in Point To Point mode"
|
||||||
|
.br
|
||||||
|
.BR " 8" " set card in FIXED TEI mode "
|
||||||
|
.br
|
||||||
|
.BR " 9" " load firmware for DSP cards"
|
||||||
|
.br
|
||||||
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.I DebugFlag
|
.I parameter
|
||||||
is an integer representing a bitmask. Every bit in this mask switches
|
For debug setings this is an integer representing a bitmask. Every bit in
|
||||||
a debug facility on or off. Depending on the selected category,
|
this mask switches a debug facility on or off. Depending on the selected
|
||||||
the following values are defined:
|
category, the following values are defined:
|
||||||
.LP
|
.LP
|
||||||
.RS
|
.RS
|
||||||
.RB With " generic debugging " selected:
|
.RB With " generic debugging " selected:
|
||||||
|
@ -114,7 +134,7 @@ the following values are defined:
|
||||||
.BI hisaxctrl " HiSax 1 0x3ff"
|
.BI hisaxctrl " HiSax 1 0x3ff"
|
||||||
enables full generic debugging.
|
enables full generic debugging.
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
\(co 1997 by Karten Keil <keil@temic-ech.spacenet.de>
|
\(co 1997 by Karsten Keil <keil@temic-ech.spacenet.de>
|
||||||
.LP
|
.LP
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR isdnctrl "(8), " telesctrl "(8), " isdn_cause "(7), " isdninfo (4).
|
.BR isdnctrl "(8), " telesctrl "(8), " isdn_cause "(7), " isdninfo (4).
|
||||||
|
|
|
@ -8,6 +8,33 @@
|
||||||
#include <linux/isdn.h>
|
#include <linux/isdn.h>
|
||||||
|
|
||||||
char *progname;
|
char *progname;
|
||||||
|
unsigned char *buffer = NULL;
|
||||||
|
#define MAX_SIZE 0x10000
|
||||||
|
|
||||||
|
unsigned char *
|
||||||
|
read_firmware(unsigned char *fname)
|
||||||
|
{
|
||||||
|
FILE *infile;
|
||||||
|
int *p, cnt;
|
||||||
|
|
||||||
|
if (!(infile = fopen(fname, "rb"))) {
|
||||||
|
fprintf(stderr, "cannot open file %s\n", fname);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
p = (int *) buffer = (unsigned char *) malloc(MAX_SIZE+4);
|
||||||
|
if (!buffer) {
|
||||||
|
fprintf(stderr, "cannot get %d byte memory\n", MAX_SIZE+4);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
cnt = fread(buffer + 4, 1, MAX_SIZE, infile);
|
||||||
|
fclose(infile);
|
||||||
|
if (cnt==MAX_SIZE) {
|
||||||
|
fprintf(stderr, "wrong filesize\n");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
*p = cnt;
|
||||||
|
return(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
usage()
|
usage()
|
||||||
|
@ -32,8 +59,12 @@ main(int argc, char *argv[])
|
||||||
if (argc != 4)
|
if (argc != 4)
|
||||||
usage();
|
usage();
|
||||||
strcpy(ioctl_s.drvid, argv[1]);
|
strcpy(ioctl_s.drvid, argv[1]);
|
||||||
ioctl_s.arg = strtol(argv[3], NULL, 0);
|
|
||||||
cmd = strtol(argv[2], NULL, 0);
|
cmd = strtol(argv[2], NULL, 0);
|
||||||
|
if (cmd == 9) {
|
||||||
|
ioctl_s.arg = (ulong) read_firmware(argv[3]);
|
||||||
|
} else {
|
||||||
|
ioctl_s.arg = strtol(argv[3], NULL, 0);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ioctl_s.drvid[0] = '\0';
|
ioctl_s.drvid[0] = '\0';
|
||||||
ioctl_s.arg = 0;
|
ioctl_s.arg = 0;
|
||||||
|
@ -47,5 +78,7 @@ main(int argc, char *argv[])
|
||||||
if (ioctl(fd, IIOCDRVCTL + cmd, &ioctl_s) < 0)
|
if (ioctl(fd, IIOCDRVCTL + cmd, &ioctl_s) < 0)
|
||||||
perror(argv[1]);
|
perror(argv[1]);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
if (buffer)
|
||||||
|
free(buffer);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue