Lines Matching refs:sp
137 int adspOpen(sp, pb) /* (DSPPBPtr pb) */
138 register CCBPtr sp;
144 if (sp == 0) {
149 if ((sp->state != sClosed) ||
150 (sp->removing)) { /* The CCB must be closed */
163 sp->openInterval = pb->u.openParams.ocInterval;
165 sp->openInterval = ocIntervalDefault;
168 sp->openRetrys = pb->u.openParams.ocMaximum;
170 sp->openRetrys = ocMaximumDefault;
172 sp->remoteAddress = *((AddrUnionPtr)&pb->u.openParams.remoteAddress);
177 if (sp->sbuf_mb) { /* clear the send queue */
178 gbuf_freel(sp->sbuf_mb);
179 sp->sbuf_mb = 0;
181 if (sp->csbuf_mb) {
182 gbuf_freem(sp->csbuf_mb);
183 sp->csbuf_mb = 0;
185 if (sp->rbuf_mb) { /* clear the receive queue */
186 gbuf_freel(sp->rbuf_mb);
187 sp->rbuf_mb = 0;
189 if (sp->crbuf_mb) {
190 gbuf_freem(sp->crbuf_mb);
191 sp->crbuf_mb = 0;
194 sp->rData = 0; /* Flag both buffers as empty */
195 sp->sData = 0;
196 sp->recvQPending = 0; /* No bytes in receive queue */
201 sp->userFlags = 0;
202 sp->sendDataAck = 0;
203 sp->sendAttnAck = 0;
204 sp->sendAttnData = 0;
205 sp->callSend = 0;
206 sp->removing = 0;
207 sp->writeFlush = 0;
212 sp->roundTrip = sp->rtmtInterval;
213 sp->deviation = 0;
218 sp->badSeqCnt = 0;
222 sp->pktSendMax = 1; /* Slow start says we should set this to 1 */
223 sp->pktSendCnt = 0;
224 sp->rbufFull = 0;
225 sp->resentData = 0;
226 sp->noXmitFlow = 0;
227 sp->waitingAck = 0;
233 sp->remCID = pb->u.openParams.remoteCID;
234 sp->sendSeq = sp->firstRtmtSeq = pb->u.openParams.sendSeq;
235 sp->sendWdwSeq = sp->sendSeq + pb->u.openParams.sendWindow;
236 sp->attnSendSeq = pb->u.openParams.attnSendSeq;
238 sp->remCID = 0;
239 sp->sendSeq = 0;
240 sp->sendWdwSeq = 0;
241 sp->attnSendSeq = 0;
245 sp->recvSeq = pb->u.openParams.recvSeq;
246 sp->attnRecvSeq = pb->u.openParams.attnRecvSeq;
247 UAS_ASSIGN_HTON(sp->f.CID, sp->locCID); /* Preset the CID in the ADSP header */
249 InsertTimerElem(&adspGlobal.slowTimers, &sp->ProbeTimer,
250 sp->probeInterval);
253 sp->locCID = NextCID();
254 sp->recvSeq = 0;
255 sp->attnRecvSeq = 0;
262 sp->openState = xlateOpenTbl[ocMode-ocRequest];
263 sp->state = xlateStateTbl[ocMode-ocRequest];
280 sp->opb = (struct adspcmd *)gbuf_rptr(mp);
281 sp->opb->ioc = 0; /* unlink saved pb from ioctl block */
282 sp->opb->mp = mp;
288 sp->sendCtl |= (1 << (ocMode == ocRequest ?
290 CheckSend(sp);