Linux-Hams archive - April 1997: Re: scc driver is still freezing the system, who can/will repair the dr iver

Re: scc driver is still freezing the system, who can/will repair the dr iver

Joerg Reuter (gicq.miqszs@gedik.net)
Thu, 03 Apr 1997 00:45:07 +0200


This is a multipart MIME message.

--==_Exmh_14756999120
Content-Type: text/plain; charset=us-ascii

Hello folks,

> I am one of many which use the pa0hzp opto-scc card
> But since kernel 2.1.23 the linux driver
> freezes the who linux system without leaving any message
> in the /var/log files

Does AltGr + ScrLck still give you a register dump? What's the
value after EIP?

Anyone with problems those problems: Could you please try the
attached patch? Even if it won't work I've include a calibrate
routine. Currently it seems to send out only zero's, but I'll
have to find my Z8530 programming manual first and need
access to an oszilloscope first... The first attachment is
a small program to start the calibration. Scc.h has undergone
some cosmetic changes as well (changed some #defines into
enums).

If the lock-ups remain: Can you try to #define SCC_DISABLE_ALL_INTS
and tell me the results, please?

73 de Joerg

--==_Exmh_14756999120
Content-Type: application/octet-stream ; name="scccal.c"
Content-Description: scccal.c
Content-Disposition: attachment; filename="scccal.c"

/*
scccal.c - Set Z8530 SCC driver parameters

Copyright 1994-1996, by Joerg Reuter tfm.uairgd@ceproas.cz

This program is intended for Amateur Radio use. If you are running it
for commercial purposes, please drop me a note. I am nosy...

! You m u s t recognize the appropriate legislations of your country !
! before you connect a radio to the SCC board and start to transmit or !
! receive. The GPL allows you to use the d r i v e r, NOT the RADIO! !

For non-Amateur-Radio use please note that you might need a special
allowance/licence from the designer of the SCC Board and/or the
MODEM.

This program is free software; you can redistribute it and/or modify
it under the terms of the (modified) GNU General Public License
delivered with the LinuX kernel source.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should find a copy of the GNU General Public License in
/usr/src/linux/COPYING;

*/

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <termios.h>
#include <string.h>
#include <ctype.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <linux/timer.h>
#ifdef CONFIG_SCC_STANDALONE
#include "scc.h"
#else
#include <linux/scc.h>
#endif
#include <linux/fs.h>
#include <linux/tty.h>
#include <linux/if.h>

#include "sccutils.h"

#define RCS_ID "$Id:$"

static int myatoi(char *s)
{
if (tolower(*s) == 'x' || tolower(*(s+1)) == 'x')
return strtol(s+2, NULL, 16);
else
return strtol(s, NULL, 10);
}

int main(int argc, char **argv)
{
int fd;
int param, val;
struct scc_calibrate cal;
int error;
struct ifreq ifr;

check_version();

if (argc < 3)
{
fprintf(stderr, "\nusage: %s dev seconds [pattern]\n", argv[0]);
fprintf(stderr, "example: %s scc0 30 0x7e\n\n", argv[0]);
exit(1);
}

fd = socket(AF_AX25, SOCK_DGRAM, 0);
strcpy(ifr.ifr_name, argv[1]);

cal.pattern = 0x7e;
cal.time = myatoi(argv[2]);

if (cal.time == 0 || cal.time > 300)
{
fprintf(stderr, "ERROR: invalid duration");
exit(1);
}

if (argc > 3)
cal.pattern = myatoi(argv[3]);

printf("Sending calibration pattern 0x%2.2x for %d seconds on port %s.\n",
cal.pattern, cal.time, argv[1]);

ifr.ifr_data = (caddr_t) &cal;
error = ioctl(fd, SIOCSCCCAL, &ifr);

if (error < 0)
{
perror("ERROR: ioctl() failed");
exit(1);
}

close(fd);
return 0;
}

--==_Exmh_14756999120
Content-Type: application/patch ; name="z8530drv-diff.gz"
Content-Description: z8530drv-diff.gz
Content-Transfer-Encoding: x-uuencode
Content-Disposition: attachment; filename="z8530drv-diff.gz"

begin 664 z8530drv-diff.gz
M'XL("*'?0C,"`WHX-3,P9')V+61I9F8`S5IY=^+($?];_A05;]XN&'%(7#[B
MG6%`MLE@[``^LDF>GBP)6P$D5A(^,CO?/57=K0,A//9DDQ>_&4#=U=5U_*JZ
MNEOE<AGFCKMZKEJ^\VC[0=6UPVI@qeurcu.vhodibc@oshean.org:6E7V054.:[7#VH&D5%KM
MG5*I!&F2!E(12;U]J*H['S]"69$;4**/CQ]W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