Lines Matching refs:sp
73 int RXFReset(sp, f) /* (CCBPtr sp, ADSP_FRAMEPtr f) */
74 CCBPtr sp;
84 hi = sp->recvSeq + CalcRecvWdw(sp);
89 if (BETWEEN(sp->recvSeq, pktFirstByteSeq, hi)) /* Is this acceptable? */
91 sp->recvSeq = pktFirstByteSeq;
92 while ((mp = sp->rbuf_mb)) { /* clear the receive queue */
93 sp->rbuf_mb = gbuf_next(mp);
96 if (sp->crbuf_mb) {
97 gbuf_freem(sp->crbuf_mb);
98 sp->crbuf_mb = 0;
100 sp->rData = 0;
101 sp->rbufFull = 0;
102 sp->userFlags |= eFwdReset; /* Set forward reset received Flag */
112 completepb(sp, pb);
113 sp->userFlags &= ~eFwdReset;
117 sp->sendCtl |= B_CTL_FRESETACK; /* Ack it if it's OK, or a duplicate */
118 sp->callSend = 1;
138 int RXFResetAck(sp, f) /* (CCBPtr sp, ADSP_FRAMEPtr f) */
139 CCBPtr sp;
144 if (sp->frpb == 0) /* Not expecting frwd reset Ack packet */
149 if (BETWEEN(sp->sendSeq, PktNextRecvSeq, sp->sendWdwSeq+1)) {
152 RemoveTimerElem(&adspGlobal.fastTimers, &sp->ResetTimer);
158 pb = sp->frpb; /* Unlink copy of user's parameter block */
159 sp->frpb = (struct adspcmd *)pb->qLink;
162 completepb(sp, pb); /* complete(pb, 0); */
164 if (sp->state == sClosing) /* this ack may allow us to close... */
165 CheckOkToClose(sp);
167 if (sp->frpb) /* Another to send? */
169 sp->callSend = 1;
170 sp->sendCtl |= B_CTL_FRESET;
192 int adspReset(sp, pb) /* (DSPPBPtr pb) */
193 CCBPtr sp;
199 if (sp == 0) {
204 if (sp->state != sOpen) {
210 while ((mp = sp->sbuf_mb)) { /* clear the send queue */
211 sp->sbuf_mb = gbuf_next(mp);
214 if (sp->csbuf_mb) {
215 gbuf_freem(sp->csbuf_mb);
216 sp->csbuf_mb = 0;
218 sp->sData = 0;
219 sp->writeFlush = 0;
220 sp->sendCtl |= B_CTL_FRESET;
222 sp->firstRtmtSeq = sp->sendSeq; /* Reset sequence #'s */
229 qAddToEnd((struct qlink **)&sp->frpb, (struct qlink *)rpb);
237 CheckSend(sp);