]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netat/adsp_reset.c
xnu-792.25.20.tar.gz
[apple/xnu.git] / bsd / netat / adsp_reset.c
index bcb738907d96adc490834d8bccb619abf13ab6e5..6f19c238ebe3cdde2cab6fad9babe21f00d33560 100644 (file)
@@ -72,10 +72,8 @@ int RXFReset(sp, f)          /* (CCBPtr sp, ADSP_FRAMEPtr f) */
     unsigned int hi;
     register gbuf_t *mp;
     register struct adspcmd *pb;
-    int s;
 
-    ATDISABLE(s, sp->lock);
-    pktFirstByteSeq = netdw(UAL_VALUE(f->pktFirstByteSeq));
+    pktFirstByteSeq = UAL_VALUE_NTOH(f->pktFirstByteSeq);
     
     hi = sp->recvSeq + CalcRecvWdw(sp);
 
@@ -114,7 +112,6 @@ int RXFReset(sp, f)         /* (CCBPtr sp, ADSP_FRAMEPtr f) */
        sp->callSend = 1;
     }
 
-    ATENABLE(s, sp->lock);
     return 0;
 }
 
@@ -137,13 +134,11 @@ int RXFResetAck(sp, f)            /* (CCBPtr sp, ADSP_FRAMEPtr f) */
     ADSP_FRAMEPtr f;
 {
     unsigned int  PktNextRecvSeq;
-    int s;
 
     if (sp->frpb == 0)         /* Not expecting frwd reset Ack packet */
        return 1;
 
-    ATDISABLE(s, sp->lock);
-    PktNextRecvSeq = netdw(UAL_VALUE(f->pktNextRecvSeq));
+    PktNextRecvSeq = UAL_VALUE_NTOH(f->pktNextRecvSeq);
 
     if (BETWEEN(sp->sendSeq, PktNextRecvSeq, sp->sendWdwSeq+1)) {
        struct adspcmd *pb;
@@ -170,7 +165,6 @@ int RXFResetAck(sp, f)              /* (CCBPtr sp, ADSP_FRAMEPtr f) */
        }
     }
 
-    ATENABLE(s, sp->lock);
     return 0;
 }
 
@@ -193,7 +187,6 @@ int adspReset(sp, pb)               /* (DSPPBPtr pb) */
     CCBPtr sp;
     struct adspcmd *pb;
 {
-    int s;
     register gbuf_t *mp;
     register struct adspcmd *rpb;
        
@@ -207,7 +200,6 @@ int adspReset(sp, pb)               /* (DSPPBPtr pb) */
        return EINVAL;
     }
        
-    ATDISABLE(s, sp->lock);
 
     while (mp = sp->sbuf_mb) { /* clear the send queue */
        sp->sbuf_mb = gbuf_next(mp);
@@ -235,7 +227,6 @@ int adspReset(sp, pb)               /* (DSPPBPtr pb) */
                                 * bookkeeping for it.  yetch! */
            adspioc_ack(0, pb->ioc, pb->gref);
     }
-    ATENABLE(s, sp->lock);
 
     CheckSend(sp);
     return STR_IGNORE;