[BACK]Return to if_ie.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / acorn32 / podulebus

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/acorn32/podulebus/if_ie.c between version 1.42 and 1.42.2.2

version 1.42, 2018/06/26 06:47:57 version 1.42.2.2, 2020/04/08 14:07:24
Line 206  ie_cli(struct ie_softc *sc)
Line 206  ie_cli(struct ie_softc *sc)
         WriteByte(sc->sc_fastbase + (IE_CONTROL<<2), IE_CONT_CLI);          WriteByte(sc->sc_fastbase + (IE_CONTROL<<2), IE_CONT_CLI);
 }  }
   
 /*  /*
  * Wake the i82586 chip up and get it to do something   * Wake the i82586 chip up and get it to do something
  */   */
   
Line 297  ieprobe(device_t parent, cfdata_t cf, vo
Line 297  ieprobe(device_t parent, cfdata_t cf, vo
 /*  /*
  * Attach our driver to the interfaces it uses   * Attach our driver to the interfaces it uses
  */   */
   
 void  void
 ieattach(device_t parent, device_t self, void *aux)  ieattach(device_t parent, device_t self, void *aux)
 {  {
Line 429  ieattach(device_t parent, device_t self,
Line 429  ieattach(device_t parent, device_t self,
                                         crc32(idrom,28), *(u_long *)(idrom+28));                                          crc32(idrom,28), *(u_long *)(idrom+28));
             for ( i=0; i<32; i+=8 ) {              for ( i=0; i<32; i+=8 ) {
                 printf ( "IDROM: %02x %02x %02x %02x %02x %02x %02x %02x\n",                  printf ( "IDROM: %02x %02x %02x %02x %02x %02x %02x %02x\n",
                     idrom[0+i], idrom[1+i], idrom[2+i], idrom[3+i],                      idrom[0+i], idrom[1+i], idrom[2+i], idrom[3+i],
                     idrom[4+i], idrom[5+i], idrom[6+i], idrom[7+i] );                      idrom[4+i], idrom[5+i], idrom[6+i], idrom[7+i] );
             }              }
             printf ( "ie: I'll ignore this fact for now!\n" );              printf ( "ie: I'll ignore this fact for now!\n" );
Line 447  ieattach(device_t parent, device_t self,
Line 447  ieattach(device_t parent, device_t self,
         ifp->if_start = iestart;          ifp->if_start = iestart;
         ifp->if_ioctl = ieioctl;          ifp->if_ioctl = ieioctl;
         ifp->if_watchdog = iewatchdog;          ifp->if_watchdog = iewatchdog;
         ifp->if_flags = IFF_BROADCAST | IFF_NOTRAILERS;          ifp->if_flags = IFF_BROADCAST;
   
         /* Signed, dated then sent */          /* Signed, dated then sent */
         if_attach (ifp);          if_attach (ifp);
         if_deferred_start_init(ifp, NULL);          if_deferred_start_init(ifp, NULL);
         ether_ifattach(ifp, hwaddr);          ether_ifattach(ifp, hwaddr);
   
         /* "Hmm," said nuts, "what if the attach fails" */          /* "Hmm," said nuts, "what if the attach fails" */
   
         /* Write some pretty things on the annoucement line */          /* Write some pretty things on the annoucement line */
         printf ( ": %s using %dk card ram",          printf ( ": %s using %dk card ram",
             ether_sprintf(hwaddr),              ether_sprintf(hwaddr),
Line 479  ieattach(device_t parent, device_t self,
Line 479  ieattach(device_t parent, device_t self,
   
         printf("\n");          printf("\n");
 }  }
   
   
 /*  /*
  * Oh no!! Where's my shorts!!! I'm sure I put them on this morning   * Oh no!! Where's my shorts!!! I'm sure I put them on this morning
  */   */
Line 679  iewatchdog(struct ifnet *ifp)
Line 679  iewatchdog(struct ifnet *ifp)
         struct ie_softc *sc = ifp->if_softc;          struct ie_softc *sc = ifp->if_softc;
   
         log(LOG_ERR, "%s: device timeout\n", device_xname(sc->sc_dev));          log(LOG_ERR, "%s: device timeout\n", device_xname(sc->sc_dev));
         ++ifp->if_oerrors;          if_statinc(ifp, if_oerrors);
         iereset(sc);          iereset(sc);
 }  }
   
 /*  /*
  * Start the time-domain-refloctometer running   * Start the time-domain-refloctometer running
  */   */
   
Line 789  setup_rfa(struct ie_softc *sc, u_long pt
Line 789  setup_rfa(struct ie_softc *sc, u_long pt
             host2ie(sc, &rbd, ptr, sizeof rbd);              host2ie(sc, &rbd, ptr, sizeof rbd);
             ptr+=sizeof rbd;              ptr+=sizeof rbd;
   
             sc->cbuffs[i] = ptr;              sc->cbuffs[i] = ptr;
             ptr+=IE_RXBUF_SIZE;              ptr+=IE_RXBUF_SIZE;
         }          }
         rbd.ie_rbd_next = sc->rbuffs[0];          rbd.ie_rbd_next = sc->rbuffs[0];
Line 1131  ieget(struct ie_softc *sc, int *to_bpf )
Line 1131  ieget(struct ie_softc *sc, int *to_bpf )
                 void *newdata = (void *)                  void *newdata = (void *)
                     ALIGN(m->m_data + sizeof(struct ether_header)) -                      ALIGN(m->m_data + sizeof(struct ether_header)) -
                     sizeof(struct ether_header);                      sizeof(struct ether_header);
                 len -= newdata - m->m_data;                  len -= newdata - m->m_data;
                 m->m_data = newdata;                  m->m_data = newdata;
         }          }
   
Line 1274  ie_read_frame(struct ie_softc *sc, int n
Line 1274  ie_read_frame(struct ie_softc *sc, int n
     }      }
   
     if ( m==0 ) {      if ( m==0 ) {
         ifp->if_ierrors++;          if_statinc(ifp, if_ierrors);
         return;          return;
     }      }
   
Line 1415  iexmit(struct ie_softc *sc)
Line 1415  iexmit(struct ie_softc *sc)
   
     struct ie_xmit_cmd xc;      struct ie_xmit_cmd xc;
     struct ie_xmit_buf xb;      struct ie_xmit_buf xb;
   
     ie2host(sc, sc->xmit_buffs[sc->xctail], (char *)&xb, sizeof xb );      ie2host(sc, sc->xmit_buffs[sc->xctail], (char *)&xb, sizeof xb );
     xb.ie_xmit_flags |= IE_XMIT_LAST;      xb.ie_xmit_flags |= IE_XMIT_LAST;
     xb.ie_xmit_next = 0xffff;      xb.ie_xmit_next = 0xffff;
Line 1491  iestart(struct ifnet *ifp)
Line 1491  iestart(struct ifnet *ifp)
                         len = ETHER_MIN_LEN - ETHER_CRC_LEN;                          len = ETHER_MIN_LEN - ETHER_CRC_LEN;
                         buffer += ETHER_MIN_LEN - ETHER_CRC_LEN;                          buffer += ETHER_MIN_LEN - ETHER_CRC_LEN;
                 }                  }
   
                 /* When we write directly to the card we dont need this */                  /* When we write directly to the card we dont need this */
                 if (len&1)                  if (len&1)
                     host2ie(sc, txbuf, sc->xmit_cbuffs[sc->xchead], len+1 );                      host2ie(sc, txbuf, sc->xmit_cbuffs[sc->xchead], len+1 );
Line 1499  iestart(struct ifnet *ifp)
Line 1499  iestart(struct ifnet *ifp)
                     host2ie(sc, txbuf, sc->xmit_cbuffs[sc->xchead], len );                      host2ie(sc, txbuf, sc->xmit_cbuffs[sc->xchead], len );
   
                 /* sc->xmit_buffs[sc->xchead]->ie_xmit_flags = len; */                  /* sc->xmit_buffs[sc->xchead]->ie_xmit_flags = len; */
   
                 WRITE_MEMBER(sc,struct ie_xmit_buf, ie_xmit_flags,                  WRITE_MEMBER(sc,struct ie_xmit_buf, ie_xmit_flags,
                                 sc->xmit_buffs[sc->xchead], len)                                  sc->xmit_buffs[sc->xchead], len)
   
Line 1521  ietint(struct ie_softc *sc)
Line 1521  ietint(struct ie_softc *sc)
   
     ifp->if_timer=0;      ifp->if_timer=0;
     ifp->if_flags &= ~IFF_OACTIVE;      ifp->if_flags &= ~IFF_OACTIVE;
   
     READ_MEMBER(sc,struct ie_xmit_cmd, ie_xmit_status,      READ_MEMBER(sc,struct ie_xmit_cmd, ie_xmit_status,
         sc->xmit_cmds[sc->xctail], status );          sc->xmit_cmds[sc->xctail], status );
   
     if (!(status&IE_STAT_COMPL) || (status & IE_STAT_BUSY) )      if (!(status&IE_STAT_COMPL) || (status & IE_STAT_BUSY) )
         printf ( "ietint: command still busy!\n" );          printf ( "ietint: command still busy!\n" );
   
     if ( status & IE_STAT_OK ) {      if ( status & IE_STAT_OK ) {
         ifp->if_opackets++;          if_statinc(ifp, if_opackets);
         ifp->if_collisions += status & IE_XS_MAXCOLL;          if_statadd(ifp, if_collisions, status & IE_XS_MAXCOLL);
     } else {      } else {
         ifp->if_oerrors++;          if_statinc(ifp, if_oerrors);
         if ( status & IE_STAT_ABORT )          if ( status & IE_STAT_ABORT )
             printf ( "ie: send aborted\n" );              printf ( "ie: send aborted\n" );
         if ( status & IE_XS_LATECOLL )          if ( status & IE_XS_LATECOLL )
Line 1545  ietint(struct ie_softc *sc)
Line 1545  ietint(struct ie_softc *sc)
             printf ( "ie: DMA underrun\n" );              printf ( "ie: DMA underrun\n" );
         if ( status & IE_XS_EXCMAX )          if ( status & IE_XS_EXCMAX )
             printf ( "ie: too many collisions\n" );              printf ( "ie: too many collisions\n" );
         ifp->if_collisions+=16;          if_statadd(ifp, if_collisions, 16);
     }      }
     /* Done with the buffer */      /* Done with the buffer */
     sc->xmit_free++;      sc->xmit_free++;
     sc->xctail = (sc->xctail + 1 ) % NTXBUF;      sc->xctail = (sc->xctail + 1 ) % NTXBUF;
   
     /* Start the next packet transmitting, if any */      /* Start the next packet transmitting, if any */
     if ( sc->xmit_free<NTXBUF )      if ( sc->xmit_free<NTXBUF )
         iexmit(sc);          iexmit(sc);

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.42.2.2

CVSweb <webmaster@jp.NetBSD.org>