Ignore:
Timestamp:
Apr 21, 2004, 10:43:04 AM (17 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
f05b2ac
Parents:
48ea3df
Message:

Remove stray white spaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/mvme167/network/network.c

    r48ea3df r6128a4a  
    66#define KERNEL
    77
    8 /* 
     8/*
    99 *  Selectively define to debug the network driver. If you define any of these
    1010 *  you must run with polled console I/O.
    1111 */
    12  
    13 /* 
     12
     13/*
    1414#define DBG_ADD_CMD
    1515#define DBG_WAIT
     
    262262    return sc->pScp;
    263263  }
    264    
     264
    265265  /* allocate enough memory for the Scp block to be aligned on 16 byte boundary */
    266266  malloc_16byte_aligned( (void *)&(sc->base_scp), (void *)&(sc->pScp), sizeof( i596_scp ) );
    267                                        
     267
    268268  #ifdef DBG_MEM
    269269  printk(("uti596_scp_alloc: Scp base address is %p\n", sc->base_scp))
     
    277277/*
    278278 *  uti596_writePortFunction
    279  * 
     279 *
    280280 *  Write the command into the PORT.
    281  * 
     281 *
    282282 *  Input parameters:
    283283 *    addr - 16-byte aligned address to write into the PORT.
     
    287287 *
    288288 *  Return value: NONE
    289  *   
     289 *
    290290 *  The Motorola manual swapped the high and low registers.
    291291 */
     
    302302/*
    303303 *  uti596_portReset
    304  * 
     304 *
    305305 *  Issue a port Reset to the uti596
    306  * 
     306 *
    307307 *  Input parameters: NONE
    308308 *
     
    339339{
    340340  rtems_interval ticks_per_second, start_ticks, end_ticks;
    341  
     341
    342342  stp->results = 0xFFFFFFFF;
    343343  uti596_writePortFunction( stp, UTI596_SELFTEST_PORT_FUNCTION );
     
    345345  rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second);
    346346        rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
    347         end_ticks = start_ticks + ticks_per_second;     
    348        
     347        end_ticks = start_ticks + ticks_per_second;
     348
    349349  do {
    350350    if( stp->results != 0xFFFFFFFF )
     
    371371#endif
    372372
    373  
     373
    374374/* currently unused by RTEMS */
    375375#if 0
     
    394394{
    395395  rtems_interval ticks_per_second, start_ticks, end_ticks;
    396  
     396
    397397  dp->dump_status = 0;
    398398  uti596_writePortFunction( dp, UTI596_DUMP_PORT_FUNCTION );
     
    400400  rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second);
    401401        rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
    402         end_ticks = start_ticks + ticks_per_second;     
    403        
     402        end_ticks = start_ticks + ticks_per_second;
     403
    404404  do {
    405405    if( dp->dump_status != 0xA006 )
     
    429429 *
    430430 *  Wait for a certain condition.
    431  * 
     431 *
    432432 *  Input parameters:
    433433 *    sc - pointer to the uti596_softc struct
     
    455455
    456456  switch( waitType ) {
    457  
     457
    458458    case UTI596_NO_WAIT:
    459459      return 0;
     
    466466                          else
    467467                                  rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
    468                        
     468
    469469                  } while (start_ticks <= end_ticks);
    470                  
     470
    471471                  if( (sc->scb.command != 0) || (start_ticks > end_ticks) ) {
    472472                          printf("i82596 timed out with status %x, cmd %x.\n",
     
    476476      else
    477477        return 0;
    478  
     478
    479479    case UTI596_WAIT_FOR_INITIALIZATION:
    480480                  do {
     
    505505                                        rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
    506506                        } while (start_ticks <= end_ticks);
    507                        
     507
    508508                  if (start_ticks > end_ticks ) {
    509509                    #ifdef DBG_WAIT
     
    521521         return -1;
    522522}
    523  
    524  
     523
     524
    525525/*
    526526 *  uti596_issueCA
     
    528528 *  Issue a Channel Attention command. Possibly wait for the
    529529 *  command to start or complete.
    530  * 
     530 *
    531531 *  Input parameters:
    532532 *    sc - pointer to the uti596_softc
     
    547547  /* Issue Channel Attention */
    548548  i82596->chan_attn = 0x00000000;
    549  
     549
    550550  return (uti596_wait ( sc, waitType ));
    551551}
     
    554554/*
    555555 *  uti596_addCmd
    556  * 
     556 *
    557557 *  Add a uti596_cmd onto the end of the CBL command chain,
    558558 *      or to the start if the chain is empty.
    559  * 
     559 *
    560560 *  Input parameters:
    561561 *      pCmd - a pointer to the command to be added.
    562562 *
    563  *  Output parameters: NONE 
     563 *  Output parameters: NONE
    564564 *
    565565 *  Return value: NONE
     
    581581
    582582  _ISR_Disable(level);
    583    
     583
    584584  if (uti596_softc.pCmdHead == I596_NULL) {
    585585    uti596_softc.pCmdHead = uti596_softc.pCmdTail = uti596_softc.scb.pCmd = pCmd;
     
    589589                uti596_softc.scb.command = CUC_START;
    590590        uti596_issueCA ( &uti596_softc, UTI596_NO_WAIT );
    591      
     591
    592592        _ISR_Enable(level);
    593593  }
     
    608608/*
    609609 *  uti596_addPolledCmd
    610  * 
     610 *
    611611 *  Add a single uti596_cmd to the end of the command block list
    612612 *  for processing, send a CU_START and wait for its acceptance
    613  * 
     613 *
    614614 *  Input parameters:
    615615 *      sc - a pointer to the uti596_softc struct
     
    654654/*
    655655 *  uti596_CU_dump
    656  * 
     656 *
    657657 *  Dump the LANC 82596 registers
    658658 *      The outcome is the same as the portDump() but executed
    659659 *      via the CU instead of via a PORT access.
    660  * 
     660 *
    661661 *  Input parameters:
    662662 *      drp - a pointer to a i596_dump_result structure.
     
    682682/*
    683683 *  uti596_dump_scb
    684  * 
     684 *
    685685 *  Dump the system control block
    686686 *  This function expands to nothing when using interrupt driven I/O
    687  * 
     687 *
    688688 *  Input parameters: NONE
    689689 *
     
    736736
    737737  uti596_writePortFunction( sc->pScp, UTI596_SCP_PORT_FUNCTION );
    738  
     738
    739739  /* Issue CA: pass the scb address to the 596 */
    740740  return ( uti596_issueCA ( sc, UTI596_WAIT_FOR_INITIALIZATION ) );
     
    744744/*
    745745 *  uti596_diagnose
    746  * 
     746 *
    747747 *  Send a diagnose command to the CU
    748  * 
     748 *
    749749 *  Input parameters: NONE
    750750 *
     
    772772/*
    773773 *  uti596_configure
    774  * 
     774 *
    775775 *  Send the CU a configure command with the desired
    776776 *  configuration structure
    777  * 
     777 *
    778778 *  Input parameters:
    779779 *      sc - a pointer to the uti596_softc struct
     
    784784 *      0 if successful, -1 otherwise
    785785 */
    786 static int uti596_configure ( 
     786static int uti596_configure (
    787787        uti596_softc_ * sc
    788788)
     
    800800/*
    801801 *  uti596_IAsetup
    802  * 
     802 *
    803803 *  Send the CU an Individual Address setup command with
    804804 *  the ethernet hardware address
    805  * 
     805 *
    806806 *  Input parameters:
    807807 *      sc - a pointer to the uti596_softc struct
     
    817817{
    818818        int i;
    819        
     819
    820820  sc->set_add.cmd.command = CmdSASetup;
    821821  for ( i=0; i<6; i++) {
     
    833833/*
    834834 *  uti596_initTBD
    835  * 
     835 *
    836836 *  Initialize transmit buffer descriptors
    837837 *    dynamically allocate mem for the number of tbd's required
    838  * 
     838 *
    839839 *  Input parameters:
    840840 *      sc - a pointer to the uti596_softc struct
     
    881881/*
    882882 *  uti596_initRFA
    883  * 
     883 *
    884884 *  Initialize the Receive Frame Area
    885885 *    dynamically allocate mem for the number of rfd's required
    886  * 
     886 *
    887887 *  Input parameters:
    888888 *      sc - a pointer to the uti596_softc struct
     
    920920    if ( pRfd != NULL ) {
    921921      uti596_softc.countRFD++;                          /* update count */
    922       uti596_softc.pEndRFA->next = 
     922      uti596_softc.pEndRFA->next =
    923923        (i596_rfd *) word_swap ((unsigned long) pRfd);  /* write the link */
    924924      uti596_softc.pEndRFA = pRfd;                                                                              /* move the end */
     
    965965/*
    966966 *  uti596_initMem
    967  * 
     967 *
    968968 *  Initialize the 82596 memory structures for Tx and Rx
    969969 *    dynamically allocate mem for the number of tbd's required
    970  * 
     970 *
    971971 *  Input parameters:
    972972 *      sc - a pointer to the uti596_softc struct
     
    995995    printk(("init_rfd: only able to allocate %d receive frame descriptors\n", i))
    996996  }
    997                
     997
    998998  /*
    999999   * Write the SCB with a pointer to the receive frame area
     
    10341034 *
    10351035 *  Reset the 82596 and initialize it with a new SCP.
    1036  * 
     1036 *
    10371037 *  Input parameters:
    10381038 *    sc - pointer to the uti596_softc
     
    10561056   */
    10571057  sc->pScp->sysbus = 0x54;
    1058  
     1058
    10591059  /* provide the iscp to the scp, keep a pointer for our use */
    10601060  sc->pScp->iscp_pointer = word_swap((unsigned long)&sc->iscp);
     
    10711071  /* Set up the 82596 */
    10721072  uti596_setScpAndScb( sc );
    1073  
     1073
    10741074  /* clear the scb command word */
    10751075  sc->scb.command = 0;
     
    10821082 *  Reset the 82596 and initialize it with a new SCP. Enable bus snooping.
    10831083 *  Install the interrupt handlers.
    1084  * 
     1084 *
    10851085 *  Input parameters:
    10861086 *    sc - pointer to the uti596_softc
     
    11021102
    11031103  uti596_initialize( sc );
    1104  
     1104
    11051105  /*
    11061106   * Configure interrupt control in PCCchip2
     
    11121112                                                                                                                                         * on read access and sink any data on write
    11131113                                                                                                                                         */
    1114   /* 
     1114  /*
    11151115   * Install the interrupt handler
    11161116   * calls rtems_interrupt_catch
    1117    */ 
     1117   */
    11181118  dummy = (rtems_isr_entry) set_vector( uti596_DynamicInterruptHandler, 0x57, 1 );
    11191119
     
    11311131 *
    11321132 *  Reset the 82596 and initialize it with an SCP.
    1133  * 
     1133 *
    11341134 *  Input parameters:
    11351135 *    sc - pointer to the uti596_softc
     
    11561156  #endif
    11571157  uti596_initialize( sc );
    1158  
     1158
    11591159  /*
    11601160   * Wake the transmitter if needed.
     
    11791179/*
    11801180 *  uti596_clearListStatus
    1181  * 
     1181 *
    11821182 *  Clear the stat fields for all RFDs
    1183  * 
     1183 *
    11841184 *  Input parameters:
    11851185 *      pRfd - a pointer to the head of the RFA
    11861186 *
    1187  *  Output parameters: NONE 
     1187 *  Output parameters: NONE
    11881188 *
    11891189 *  Return value: NONE
     
    12021202/*
    12031203 *  uti596_reset
    1204  * 
     1204 *
    12051205 *  Reset the 82596 and reconfigure
    1206  * 
     1206 *
    12071207 *  Input parameters: NONE
    12081208 *
    1209  *  Output parameters: NONE 
     1209 *  Output parameters: NONE
    12101210 *
    12111211 *  Return value: NONE
     
    12241224  sc->resetDone = 0;
    12251225        uti596_wait ( sc, UTI596_WAIT_FOR_CU_ACCEPT );
    1226   uti596_reset_hardware ( &uti596_softc ); 
     1226  uti596_reset_hardware ( &uti596_softc );
    12271227
    12281228        #ifdef DBG_RESET
     
    12581258
    12591259  /* Re-address the head of the RFA in the SCB */
    1260   sc->scb.pRfd =  sc->pBeginRFA; 
     1260  sc->scb.pRfd =  sc->pBeginRFA;
    12611261  sc->scb.rfd_pointer = word_swap((unsigned long)sc->pBeginRFA);
    12621262
     
    12711271  sc->resetDone = 1;
    12721272  uti596_issueCA ( sc, UTI596_WAIT_FOR_CU_ACCEPT );
    1273  
     1273
    12741274  UTI_596_ASSERT(sc->pCmdHead == I596_NULL, "Reset: CMD not cleared\n")
    12751275
     
    12821282/*
    12831283 *  uti596_dequeue
    1284  * 
     1284 *
    12851285 *  Remove an RFD from the received fram queue
    1286  * 
     1286 *
    12871287 *  Input parameters:
    12881288 *      ppQ - a pointer to a i596_rfd pointer
    12891289 *
    1290  *  Output parameters: NONE 
     1290 *  Output parameters: NONE
    12911291 *
    12921292 *  Return value:
     
    12991299  ISR_Level level;
    13001300  i596_rfd * pRfd;
    1301  
     1301
    13021302  _ISR_Disable(level);
    13031303
     
    13071307     return I596_NULL;
    13081308  }
    1309  
    1310         /* 
     1309
     1310        /*
    13111311         * Point to the dequeued buffer, then
    13121312         * adjust the queue pointer and detach the buffer
    13131313         */
    1314   pRfd = *ppQ;     
     1314  pRfd = *ppQ;
    13151315  *ppQ = (i596_rfd *) word_swap ((unsigned long) pRfd->next);
    13161316  pRfd->next = I596_NULL;  /* unlink the rfd being returned */
     
    13231323/*
    13241324 *  uti596_append
    1325  * 
     1325 *
    13261326 *  Remove an RFD buffer from the RFA and tack it on to
    13271327 *      the received frame queue for processing.
    1328  * 
     1328 *
    13291329 *  Input parameters:
    13301330 *       ppQ - a pointer to the queue pointer
    13311331 *      pRfd - a pointer to the buffer to be returned
    13321332 *
    1333  *  Output parameters: NONE 
     1333 *  Output parameters: NONE
    13341334 *
    13351335 *  Return value: NONE
    1336  */ 
     1336 */
    13371337
    13381338void uti596_append(
     
    13711371/*
    13721372 *  uti596_supplyFD
    1373  * 
     1373 *
    13741374 *  Return a buffer (RFD) to the receive frame area (RFA).
    13751375 *  Call with interrupts disabled.
    1376  * 
     1376 *
    13771377 *  Input parameters:
    13781378 *      pRfd - a pointer to the buffer to be returned
    13791379 *
    1380  *  Output parameters: NONE 
     1380 *  Output parameters: NONE
    13811381 *
    13821382 *  Return value: NONE
     
    13891389
    13901390 UTI_596_ASSERT(pRfd != I596_NULL, "Supplying NULL RFD!\n")
    1391  
     1391
    13921392 pRfd -> cmd  = CMD_EOL;
    13931393 pRfd -> pRbd = I596_NULL;
     
    14091409   return;
    14101410 }
    1411  
     1411
    14121412 /*
    14131413  * Check if the last RFD is used/read by the 596.
     
    14171417 /* C = complete, B = busy (prefetched) */
    14181418 if ( pLastRfd != I596_NULL && ! (pLastRfd -> stat & ( STAT_C | STAT_B ) )) {
    1419  
     1419
    14201420   /*
    14211421    * Not yet too late to add it
     
    14551455     }
    14561456     else {
    1457      
     1457
    14581458       uti596_softc.pEndRFA = pRfd;   /* the RFA has been extended */
    1459        
     1459
    14601460       if ( ( uti596_softc.scb.status & SCB_STAT_RNR ||
    14611461              uti596_softc.scb.status & RU_NO_RESOURCES ) &&
    14621462              uti596_softc.countRFD > 1 ) {
    1463              
     1463
    14641464         /* Ensure that beginRFA is not EOL */
    14651465         uti596_softc.pBeginRFA -> cmd &= ~CMD_EOL;
     
    14771477         uti596_softc.scb.pRfd = uti596_softc.pBeginRFA;
    14781478         uti596_softc.scb.rfd_pointer = word_swap ((unsigned long) uti596_softc.pBeginRFA);
    1479          
     1479
    14801480         /* Don't ack RNR! The receiver should be stopped in this case */
    14811481         uti596_softc.scb.command = RX_START | SCB_STAT_RNR;
    1482          
     1482
    14831483         UTI_596_ASSERT( !(uti596_softc.scb.status & SCB_STAT_FR),"FRAME RECEIVED INT COMING!\n")
    14841484
     
    15071507/*
    15081508 *  send_packet
    1509  * 
     1509 *
    15101510 *  Send a raw ethernet packet, add a
    15111511 *      transmit command to the CBL
    1512  * 
     1512 *
    15131513 *  Input parameters:
    15141514 *      ifp - a pointer to the ifnet structure
    15151515 *        m     -       a pointer to the mbuf being sent
    15161516 *
    1517  *  Output parameters: NONE 
     1517 *  Output parameters: NONE
    15181518 *
    15191519 *  Return value: NONE
     
    17021702    ifp->if_mtu = ETHERMTU;
    17031703
    1704   /* 
     1704  /*
    17051705   * Check whether parameters should be obtained from NVRAM. If
    17061706   * yes, and if an IP address, netmask, or ethernet address are
    17071707   * provided in NVRAM, cheat, and stuff them into the ifconfig
    17081708   * structure, OVERRIDING and existing or NULL values.
    1709    * 
     1709   *
    17101710   * Warning: If values are provided in NVRAM, the ifconfig entries
    17111711   * must be NULL because buffer memory allocated to hold the
     
    17191719  if ( !(j1 & 0x10) ) {
    17201720        /* Jumper J1-4 is on, configure from NVRAM */
    1721  
     1721
    17221722    if ( (addr = nvram->ipaddr) ) {
    17231723      /* We have a non-zero entry, copy the value */
     
    17271727        rtems_panic("Can't allocate ip_address buffer!\n");
    17281728    }
    1729    
     1729
    17301730    if ( (addr = nvram->netmask) ) {
    17311731      /* We have a non-zero entry, copy the value */
     
    17401740     * NVRAM parameter the highest priority if J1-4 indicates we are configuring
    17411741     * from NVRAM.
    1742      * 
     1742     *
    17431743     * If the ethernet address is specified in NVRAM, go ahead and copy it.
    17441744     * (ETHER_ADDR_LEN = 6 bytes).
     
    18281828{
    18291829  uti596_softc_ *sc = ifp->if_softc;
    1830  
     1830
    18311831        #ifdef DBG_START
    18321832  printk(("uti596_start: begins\n"))
    18331833        #endif
    1834        
     1834
    18351835  rtems_event_send (sc->txDaemonTid, START_TRANSMIT_EVENT);
    18361836  ifp->if_flags |= IFF_OACTIVE;
     
    18911891  sc->scb.command = RX_START;
    18921892  uti596_issueCA ( sc, UTI596_WAIT_FOR_CU_ACCEPT );
    1893  
     1893
    18941894  /*
    18951895   * Tell the world that we're running.
     
    18981898  #ifdef DBG_INIT
    18991899  printk(("uti596_init: completed.\n"))
    1900   #endif 
     1900  #endif
    19011901}
    19021902
     
    19411941 *
    19421942 *  Description: Transmit task
    1943  * 
     1943 *
    19441944 *  Algorithm: Get mbufs to be transmitted, stuff into RFDs, send
    1945  * 
     1945 *
    19461946 ***********************************************************************/
    19471947
     
    21822182 if ( scbStatus ) {
    21832183   /* acknowledge interrupts */
    2184    
     2184
    21852185   /* Write to the ICLR bit in the PCCchip2 control registers to clear
    21862186    * the INT status bit. Clearing INT here *before* sending the CA signal
     
    21892189    pccchip2->LANC_int_ctl |=0x08;
    21902190    pccchip2->LANC_berr_ctl |=0x08;
    2191    
     2191
    21922192    /* printk(("***INFO: ACK %x\n", scbStatus))*/
    2193    
     2193
    21942194    /* Send the CA signal to acknowledge interrupt */
    21952195    uti596_softc.scb.command = scbStatus;
     
    22432243    else {
    22442244        printk(("*****WARNING: RNR condition with NULL BeginRFA\n"))
    2245     }         
     2245    }
    22462246  }
    22472247
     
    22522252  if ( scbStatus & SCB_STAT_FR ) {
    22532253    uti596_softc.rxInterrupts++;
    2254  
     2254
    22552255                #ifdef DBG_ISR
    22562256    printk(("uti596_DynamicInterruptHandler: Frame received\n"))
     
    23542354      */
    23552355      UTI_596_ASSERT(uti596_softc.pCmdHead == I596_NULL, "****ERROR: command serialization failed\n")
    2356                    
     2356
    23572357      /* What if the command did not complete OK? */
    23582358      switch ( pIsrCmd->command & 0x7) {
     
    24492449      }
    24502450    } /* end if pIsrCmd != NULL && pIsrCmd->stat & STAT_C  */
    2451    
     2451
    24522452    else {
    2453       if ( pIsrCmd != I596_NULL ) { 
     2453      if ( pIsrCmd != I596_NULL ) {
    24542454        /* The command MAY be NULL from a RESET */
    24552455        /* Reset the ethernet card, and wake the transmitter (if necessary) */
     
    24762476
    24772477
    2478  /* 
     2478 /*
    24792479  * If the receiver has stopped,
    24802480  * check if this is a No Resources scenario,
     
    26072607        #endif
    26082608  count_rx=0;
    2609  
    2610  
     2609
     2610
    26112611 /* Do this last, to ensure that the reset is called at the right time. */
    26122612  if ( uti596_softc.nic_reset ) {
     
    26262626 *             driver ioctl function
    26272627 *             handles SIOCGIFADDR, SIOCSIFADDR, SIOCSIFFLAGS
    2628  *             
     2628 *
    26292629 ***********************************************************************/
    2630  
     2630
    26312631static int uti596_ioctl(
    26322632  struct ifnet *ifp,
     
    26852685      break;
    26862686  }
    2687  
     2687
    26882688  return error;
    26892689}
     
    27572757
    27582758  printk(("savedQ:\n"))
    2759  
     2759
    27602760  for( pRfd = uti596_softc.pSavedRfdQueue;
    27612761       pRfd != I596_NULL;
     
    27632763      printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd))
    27642764  }
    2765      
     2765
    27662766  printk(("Inbound:\n"))
    2767  
     2767
    27682768  for( pRfd = uti596_softc.pInboundFrameQueue;
    27692769       pRfd != I596_NULL;
     
    27712771    printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd))
    27722772  }
    2773    
     2773
    27742774  printk(("Last Unk: %p\n", uti596_softc.pLastUnkRFD ))
    27752775  printk(("RFA:\n"))
    2776  
     2776
    27772777  for( pRfd = uti596_softc.pBeginRFA;
    27782778       pRfd != I596_NULL;
     
    27852785/*
    27862786 *  show_buffers
    2787  * 
     2787 *
    27882788 *  Print out the RFA and frame queues
    27892789 */
     
    27982798
    27992799  printk(("\nRFA: \n"))
    2800  
     2800
    28012801  for ( pRfd = uti596_softc.pBeginRFA;
    28022802        pRfd != I596_NULL;
     
    28062806        }
    28072807  printk(("\nInbound: \n"))
    2808  
     2808
    28092809  for ( pRfd = uti596_softc.pInboundFrameQueue;
    28102810        pRfd != I596_NULL;
     
    28152815
    28162816  printk(("\nSaved: \n"))
    2817  
     2817
    28182818  for ( pRfd = uti596_softc.pSavedRfdQueue;
    28192819        pRfd != I596_NULL;
     
    28222822             pRfd, pRfd->stat, pRfd->cmd))
    28232823  }
    2824            
     2824
    28252825  printk(("\nUnknown: %p\n",uti596_softc.pLastUnkRFD))
    28262826}
     
    28512851
    28522852  printk(("\nRFA:\n"))
    2853  
     2853
    28542854  for ( pRfd = uti596_softc.pBeginRFA;
    28552855        pRfd != I596_NULL &&
     
    28882888        printk ((" %2.2X", add[i]))
    28892889  }
    2890  
     2890
    28912891  printk (("\n"))
    28922892  printk (("frame type %2.2X%2.2X\n", add[12], add[13]))
    28932893
    2894   if ( add[12] == 0x08 && add[13] == 0x06 ) { 
     2894  if ( add[12] == 0x08 && add[13] == 0x06 ) {
    28952895    /* an ARP */
    28962896    printk (("Hardware type : %2.2X%2.2X\n", add[14],add[15]))
     
    29062906    printk (("%x\n", add[27]))
    29072907    printk (("Sender IP addr: "))
    2908    
     2908
    29092909    for ( i=0; i< 3 ; i++) {
    29102910      printk (("%u.", add[28 + i]))
     
    29122912    printk (("%u\n", add[31]))
    29132913    printk (("Target Enet addr: "))
    2914    
     2914
    29152915    for ( i=0; i< 5 ; i++) {
    29162916      printk (( "%x:", add[32 + i]))
     
    29372937    printk (("IP packet type: %2.2X code %2.2X\n", add[34],add[35]))
    29382938    printk (("Source IP address: "))
    2939    
     2939
    29402940    for ( i=0; i< 3 ; i++) {
    29412941      printk (("%u.", add[26 + i]))
     
    29432943    printk (("%u\n", add[29]))
    29442944    printk (("Destination IP address: "))
    2945    
     2945
    29462946    for ( i=0; i< 3 ; i++) {
    29472947      printk (("%u.", add[30 + i]))
     
    30113011    printk (("%x\n", add[27]))
    30123012    printk (("Sender IP addr: "))
    3013    
     3013
    30143014    for ( i=0; i< 3 ; i++) {
    30153015      printk (("%u.", add[28 + i]))
     
    30173017    printk (("%u\n", add[31]))
    30183018    printk (("Target Enet addr: "))
    3019    
     3019
    30203020    for ( i=0; i< 5 ; i++) {
    3021       printk (( "%x:", add[32 + i]))   
     3021      printk (( "%x:", add[32 + i]))
    30223022    }
    30233023    printk (("%x\n", add[37]))
     
    30413041    printk (("IP packet type: %2.2X code %2.2X\n", add[34],add[35]))
    30423042    printk (("Source IP address: "))
    3043    
     3043
    30443044    for ( i=0; i< 3 ; i++) {
    30453045      printk(( "%u.", add[26 + i]))
     
    30473047    printk(("%u\n", add[29]))
    30483048    printk(("Destination IP address: "))
    3049    
     3049
    30503050    for ( i=0; i< 3 ; i++) {
    30513051      printk(( "%u.", add[30 + i]))
     
    30543054    printk(("********************IP Packet Data*******************\n"))
    30553055    length -=20;
    3056    
     3056
    30573057    for ( i=0; i < length ; i++) {
    30583058      printk(("0x%2.2x ", add[34+i]))
     
    30823082  printk (("print_echo: begins"))
    30833083
    3084   if ( add[12] == 0x08 && add[13] == 0x00 ) { 
     3084  if ( add[12] == 0x08 && add[13] == 0x00 ) {
    30853085    /* an IP packet */
    30863086    printk (("Packet Location %p\n", add))
     
    30983098    printk (("\n"))
    30993099    printk (("frame type %2.2X%2.2X\n", add[12], add[13]))
    3100    
     3100
    31013101    printk (("*********************IP HEADER******************\n"))
    31023102    printk (("IP version/IPhdr length: %2.2X TOS: %2.2X\n", add[14] , add[15]))
     
    31083108    printk (("IP packet type: %2.2X code %2.2X\n", add[34],add[35]))
    31093109    printk (("Source IP address: "))
    3110    
     3110
    31113111    for ( i=0; i< 3 ; i++) {
    31123112      printk (("%u.", add[26 + i]))
     
    31143114    printk (("%u\n", add[29]))
    31153115    printk (("Destination IP address: "))
    3116    
     3116
    31173117    for ( i=0; i< 3 ; i++) {
    31183118      printk (("%u.", add[30 + i]))
     
    31213121    printk(("********************IP Packet Data*******************\n"))
    31223122    length -=20;
    3123    
     3123
    31243124    for ( i=0; i < length ; i++) {
    31253125      printk(("0x%2.2x ", add[34+i]))
Note: See TracChangeset for help on using the changeset viewer.