summaryrefslogtreecommitdiffstats
path: root/sys/i4b
diff options
context:
space:
mode:
authorhm <hm@FreeBSD.org>2002-08-27 14:19:28 +0000
committerhm <hm@FreeBSD.org>2002-08-27 14:19:28 +0000
commit27048fe6d8348ca7eff4d88793ab0ce192a5c5b9 (patch)
tree3e401b4ad17c62a44bcbeae081b79d8bc4990c1d /sys/i4b
parent7e25ea6e98b06483add5900af149af0bbe460ebb (diff)
downloadFreeBSD-src-27048fe6d8348ca7eff4d88793ab0ce192a5c5b9.zip
FreeBSD-src-27048fe6d8348ca7eff4d88793ab0ce192a5c5b9.tar.gz
Bugfix to enable dialer "connected" response.
Diffstat (limited to 'sys/i4b')
-rw-r--r--sys/i4b/driver/i4b_tel.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/i4b/driver/i4b_tel.c b/sys/i4b/driver/i4b_tel.c
index 92cf3f7..e8513db3 100644
--- a/sys/i4b/driver/i4b_tel.c
+++ b/sys/i4b/driver/i4b_tel.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Sun Mar 17 09:52:06 2002]
+ * last edit-date: [Tue Aug 27 13:54:08 2002]
*
*---------------------------------------------------------------------------*/
@@ -507,12 +507,15 @@ i4btelread(dev_t dev, struct uio *uio, int ioflag)
{
sc->devstate |= ST_RDWAITDATA;
+ NDBGL4(L4_TELDBG, "i4btel%d, wait for result!", unit);
+
if((error = tsleep((caddr_t) &sc->result,
TTIPRI | PCATCH,
"rtel1", 0 )) != 0)
{
sc->devstate &= ~ST_RDWAITDATA;
splx(s);
+ NDBGL4(L4_TELDBG, "i4btel%d, wait for result: sleep error!", unit);
return(error);
}
}
@@ -520,16 +523,19 @@ i4btelread(dev_t dev, struct uio *uio, int ioflag)
if(!(sc->devstate & ST_ISOPEN))
{
splx(s);
+ NDBGL4(L4_TELDBG, "i4btel%d, wait for result: device closed!", unit);
return(EIO);
}
if(sc->result != 0)
{
+ NDBGL4(L4_TELDBG, "i4btel%d, wait for result: 0x%02x!", unit, sc->result);
error = uiomove(&sc->result, 1, uio);
sc->result = 0;
}
else
{
+ NDBGL4(L4_TELDBG, "i4btel%d, wait for result: result=0!", unit);
error = EIO;
}
@@ -800,8 +806,9 @@ tel_connect(int unit, void *cdp)
sc = &tel_sc[unit][FUNCDIAL];
- if(sc->devstate == ST_ISOPEN)
+ if(sc->devstate & ST_ISOPEN)
{
+ NDBGL4(L4_TELDBG, "i4btel%d, tel_connect!", unit);
sc->result = RSP_CONN;
if(sc->devstate & ST_RDWAITDATA)
@@ -845,6 +852,7 @@ tel_disconnect(int unit, void *cdp)
if(sc->devstate & ST_ISOPEN)
{
+ NDBGL4(L4_TELDBG, "i4btel%d, tel_disconnect!", unit);
sc->result = RSP_HUP;
if(sc->devstate & ST_RDWAITDATA)
@@ -872,7 +880,8 @@ tel_dialresponse(int unit, int status, cause_t cause)
NDBGL4(L4_TELDBG, "i4btel%d, status=%d, cause=0x%4x", unit, status, cause);
if((sc->devstate == ST_ISOPEN) && status)
- {
+ {
+ NDBGL4(L4_TELDBG, "i4btel%d, tel_dialresponse!", unit);
sc->result = RSP_NOA;
if(sc->devstate & ST_RDWAITDATA)
OpenPOWER on IntegriCloud