• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/et/sys/

Lines Matching defs:et

60 void et_init(et_info_t *et, uint options);
61 void et_reset(et_info_t *et);
62 void et_link_up(et_info_t *et);
63 void et_link_down(et_info_t *et);
64 int et_up(et_info_t *et);
65 int et_down(et_info_t *et, int reset);
66 void et_dump(et_info_t *et, struct bcmstrbuf *b);
68 void et_intrson(et_info_t *et);
71 et_init(et_info_t *et, uint options)
73 ET_TRACE(("et%d: et_init\n", et->etc->unit));
75 etc_reset(et->etc);
76 etc_init(et->etc, options);
80 et_reset(et_info_t *et)
82 ET_TRACE(("et%d: et_reset\n", et->etc->unit));
84 etc_reset(et->etc);
88 et_link_up(et_info_t *et)
90 ET_ERROR(("et%d: link up (%d%s)\n",
91 et->etc->unit, et->etc->speed, (et->etc->duplex? "FD" : "HD")));
95 et_link_down(et_info_t *et)
97 ET_ERROR(("et%d: link down\n", et->etc->unit));
101 et_up(et_info_t *et)
103 if (et->etc->up)
106 ET_TRACE(("et%d: et_up\n", et->etc->unit));
108 etc_up(et->etc);
111 TIMER_SET(et->timer, CFE_HZ / 2);
117 et_down(et_info_t *et, int reset)
119 ET_TRACE(("et%d: et_down\n", et->etc->unit));
122 TIMER_CLEAR(et->timer);
124 etc_down(et->etc, reset);
130 et_dump(et_info_t *et, struct bcmstrbuf *b)
133 etc_dump(et->etc, b);
137 et_info_t *et_phyfind(et_info_t *et, uint coreunit);
138 uint16 et_phyrd(et_info_t *et, uint phyaddr, uint reg);
139 void et_phywr(et_info_t *et, uint reg, uint phyaddr, uint16 val);
143 * Find the et associated with the same chip as <et>
147 et_phyfind(et_info_t *et, uint coreunit)
151 /* walk the list et's */
153 if (et->etc == NULL)
164 et_phyrd(et_info_t *et, uint phyaddr, uint reg)
166 return et->etc->chops->phyrd(et->etc->ch, phyaddr, reg);
171 et_phywr(et_info_t *et, uint phyaddr, uint reg, uint16 val)
173 et->etc->chops->phywr(et->etc->ch, phyaddr, reg, val);
198 et_info_t *et;
206 if (!(et = (et_info_t *) KMALLOC(sizeof(et_info_t), 0))) {
207 ET_ERROR(("et%d: KMALLOC failed\n", unit));
210 bzero(et, sizeof(et_info_t));
212 et->osh = osl_attach(et);
213 ASSERT(et->osh);
221 if ((et->etc = etc_attach(et, VENDOR_BROADCOM, device, unit, et->osh, probe_ptr)) == NULL) {
222 ET_ERROR(("et%d: etc_attach failed\n", unit));
223 KFREE(et);
228 et->etc->chops->intrsoff(et->etc->ch);
231 et->next = et_list;
232 et_list = et;
235 et->etc->chops->longname(et->etc->ch, name, sizeof (name));
236 printf("et%d: %s %s\n", unit, name, EPI_VERSION_STR);
238 cfe_attach(drv, et, NULL, name);
257 et_info_t *et = (et_info_t *) ctx->dev_softc;
259 ET_TRACE(("et%d: et_open\n", et->etc->unit));
261 return et_up(et);
281 et_info_t *et = (et_info_t *) ctx->dev_softc;
288 ET_TRACE(("et%d: et_read\n", et->etc->unit));
294 events = et->etc->chops->getintrevents(et->etc->ch, FALSE);
301 if (!(p = et->etc->chops->rx(et->etc->ch)))
311 flags = RXH_FLAGS(et->etc, rxh);
315 if (RXH_OVERSIZE(et->etc, rxh)) {
316 ET_ERROR(("et%d: rx: over size packet from %s\n", et->etc->unit, eabuf));
318 if (RXH_CRC(et->etc, rxh)) {
319 ET_ERROR(("et%d: rx: crc error from %s\n", et->etc->unit, eabuf));
321 if (RXH_OVF(et->etc, rxh)) {
322 ET_ERROR(("et%d: rx: fifo overflow\n", et->etc->unit));
324 if (RXH_NO(et->etc, rxh)) {
325 ET_ERROR(("et%d: rx: crc error (odd nibbles) from %s\n",
326 et->etc->unit, eabuf));
328 if (RXH_RXER(et->etc, rxh)) {
329 ET_ERROR(("et%d: rx: symbol error from %s\n", et->etc->unit, eabuf));
335 buffer->buf_retlen, et->etc->unit);
336 ET_PRPKT("rxpkt", buffer->buf_ptr, buffer->buf_retlen, et->etc->unit);
340 PKTFREE(et->osh, p, FALSE);
344 et->etc->chops->rxfill(et->etc->ch);
365 et_info_t *et = (et_info_t *) ctx->dev_softc;
368 events = et->etc->chops->getintrevents(et->etc->ch, FALSE);
390 et_info_t *et = ctx->dev_softc;
395 ET_ERROR(("et%d: PKTGET failed\n", et->etc->unit));
401 ET_PRHDR("tx", (struct ether_header *)PKTDATA(NULL, p), PKTLEN(NULL, p), et->etc->unit);
402 ET_PRPKT("txpkt", PKTDATA(NULL, p), PKTLEN(NULL, p), et->etc->unit);
404 ASSERT(*et->etc->txavail[TX_Q0] > 0);
407 et->etc->chops->tx(et->etc->ch, p);
409 while (((events = et->etc->chops->getintrevents(et->etc->ch, FALSE)) & (INTR_ERROR | INTR_TX)) == 0);
412 et->etc->chops->txreclaim(et->etc->ch, FALSE);
432 et_info_t *et = (et_info_t *) ctx->dev_softc;
435 ET_TRACE(("et%d: et_ioctl: cmd 0x%x\n", et->etc->unit, buffer->buf_ioctlcmd));
440 bcopy(&et->etc->cur_etheraddr, buffer->buf_ptr, ETHER_ADDR_LEN);
444 bcopy(buffer->buf_ptr, &et->etc->cur_etheraddr, ETHER_ADDR_LEN);
445 et_init(et, ET_INIT_DEF_OPTIONS);
450 if (et->etc->linkstate) {
451 if (et->etc->speed == 10)
452 val = et->etc->duplex ? ETHER_SPEED_10FDX : ETHER_SPEED_10HDX;
453 else if (et->etc->speed == 100)
454 val = et->etc->duplex ? ETHER_SPEED_100FDX : ETHER_SPEED_100HDX;
455 else if (et->etc->speed == 1000)
477 return etc_ioctl(et->etc, ETCSPEED, &val);
480 *((int *) buffer->buf_ptr) = (int) et->etc->linkstate;
484 *((int *) buffer->buf_ptr) = et->etc->loopbk;
493 return etc_ioctl(et->etc, ETCLOOP, &val);
518 et_info_t *et = (et_info_t *) ctx->dev_softc;
520 ET_TRACE(("et%d: et_close\n", et->etc->unit));
522 return et_down(et, 1);
526 et_intrson(et_info_t *et)
529 ET_TRACE(("et%d: et_intrson\n", et->etc->unit));
548 et_info_t *et = (et_info_t *) ctx->dev_softc;
550 if (TIMER_RUNNING(et->timer) &&
551 TIMER_EXPIRED(et->timer)) {
552 etc_watchdog(et->etc);
553 TIMER_SET(et->timer, CFE_HZ / 2);
580 et_info_t *et;
593 for (et = et_list; et; et = et->next)
594 if (et == dev->dev_softc)
596 if (!et && !(et = et_list))
612 if ((ret = etc_ioctl(et->etc, ETCDUMP, arg))) {
641 return etc_ioctl(et->etc, cmd, arg);
647 cmd_addcmd("et",
651 "et command [args..]\n\n"