Return to BSD News archive
Received: by minnie.vk1xwt.ampr.org with NNTP
id AA27 ; Wed, 27 Jan 93 13:11:02 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!spool.mu.edu!uunet!gatech!udel!sbcs.sunysb.edu!stark.UUCP!gene
From: gene@stark.uucp (Gene Stark)
Newsgroups: comp.unix.bsd
Subject: Xten and patch00061 (FIX)
Date: 26 Jan 93 08:53:43
Organization: Gene Stark's home system
Lines: 60
Distribution: world
Message-ID: <GENE.93Jan26085343@stark.stark.uucp>
NNTP-Posting-Host: stark.uucp
These patches are for my "tw" X-10 driver, which can be found on ref.tfs.com
in directory /usr/src/sys.extras/stark-xten.
You MUST apply these diffs if you have installed patch00061 in patchkit-0.2.
DON'T apply them if you didn't install that patch.
*** /sys/i386/isa/tw.c.pl1 Wed Dec 2 09:31:20 1992
--- /sys/i386/isa/tw.c Tue Jan 26 07:56:30 1993
***************
*** 199,205 ****
struct tw_sc {
u_int sc_port; /* I/O Port */
u_int sc_state; /* Current software control state */
! struct proc *sc_selp; /* Process sleeping on select */
u_char sc_xphase; /* Current state of sync (for transmitter) */
u_char sc_rphase; /* Current state of sync (for receiver) */
u_char sc_flags; /* Flags for current reception */
--- 199,205 ----
struct tw_sc {
u_int sc_port; /* I/O Port */
u_int sc_state; /* Current software control state */
! pid_t sc_selp; /* Process sleeping on select */
u_char sc_xphase; /* Current state of sync (for transmitter) */
u_char sc_rphase; /* Current state of sync (for receiver) */
u_char sc_flags; /* Flags for current reception */
***************
*** 411,416 ****
--- 411,417 ----
struct proc *p;
{
struct tw_sc *sc;
+ struct proc *pp;
int s, i;
sc = &tw_sc[TWUNIT(dev)];
***************
*** 419,428 ****
splx(s);
return(1);
}
! if(sc->sc_selp && sc->sc_selp->p_wchan == (caddr_t)&selwait) {
sc->sc_state |= TWS_COLL;
} else {
! sc->sc_selp = p;
}
splx(s);
return(0);
--- 420,430 ----
splx(s);
return(1);
}
! if(sc->sc_selp && (pp = pfind(sc->sc_selp))
! && pp->p_wchan == (caddr_t)&selwait) {
sc->sc_state |= TWS_COLL;
} else {
! sc->sc_selp = p->p_pid;
}
splx(s);
return(0);