• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asus-wl-520gu-7.0.1.45/src/et/sys/

Lines Matching defs:et

51 void et_init(et_info_t *et);
52 void et_reset(et_info_t *et);
53 void et_link_up(et_info_t *et);
54 void et_link_down(et_info_t *et);
55 int et_up(et_info_t *et);
56 int et_down(et_info_t *et, int reset);
57 void et_dump(et_info_t *et, struct bcmstrbuf *b);
59 void et_intrson(et_info_t *et);
62 et_init(et_info_t *et)
64 ET_TRACE(("et%d: et_init\n", et->etc->unit));
66 etc_reset(et->etc);
67 etc_init(et->etc);
71 et_reset(et_info_t *et)
73 ET_TRACE(("et%d: et_reset\n", et->etc->unit));
75 etc_reset(et->etc);
79 et_link_up(et_info_t *et)
81 ET_ERROR(("et%d: link up (%d%s)\n",
82 et->etc->unit, et->etc->speed, (et->etc->duplex? "FD" : "HD")));
86 et_link_down(et_info_t *et)
88 ET_ERROR(("et%d: link down\n", et->etc->unit));
92 et_up(et_info_t *et)
94 if (et->etc->up)
97 ET_TRACE(("et%d: et_up\n", et->etc->unit));
99 etc_up(et->etc);
102 TIMER_SET(et->timer, CFE_HZ / 2);
108 et_down(et_info_t *et, int reset)
110 ET_TRACE(("et%d: et_down\n", et->etc->unit));
113 TIMER_CLEAR(et->timer);
115 etc_down(et->etc, reset);
121 et_dump(et_info_t *et, struct bcmstrbuf *b)
126 et_info_t *et_phyfind(et_info_t *et, uint coreunit);
127 uint16 et_phyrd(et_info_t *et, uint phyaddr, uint reg);
128 void et_phywr(et_info_t *et, uint reg, uint phyaddr, uint16 val);
132 * Find the et associated with the same chip as <et>
136 et_phyfind(et_info_t *et, uint coreunit)
140 /* walk the list et's */
142 if (et->etc == NULL)
153 et_phyrd(et_info_t *et, uint phyaddr, uint reg)
155 return et->etc->chops->phyrd(et->etc->ch, phyaddr, reg);
160 et_phywr(et_info_t *et, uint phyaddr, uint reg, uint16 val)
162 et->etc->chops->phywr(et->etc->ch, phyaddr, reg, val);
188 et_info_t *et;
196 if (!(et = (et_info_t *) KMALLOC(sizeof(et_info_t), 0))) {
197 ET_ERROR(("et%d: KMALLOC failed\n", unit));
200 bzero(et, sizeof(et_info_t));
202 et->osh = osl_attach(et);
203 ASSERT(et->osh);
206 if ((et->etc = etc_attach(et, VENDOR_BROADCOM, device, unit, et->osh, probe_ptr)) == NULL) {
207 ET_ERROR(("et%d: etc_attach failed\n", unit));
208 KFREE(et);
213 et->etc->chops->intrsoff(et->etc->ch);
216 et->next = et_list;
217 et_list = et;
220 et->etc->chops->longname(et->etc->ch, name, sizeof (name));
221 printf("et%d: %s %s\n", unit, name, EPI_VERSION_STR);
223 cfe_attach(drv, et, NULL, name);
242 et_info_t *et = (et_info_t *) ctx->dev_softc;
244 ET_TRACE(("et%d: et_open\n", et->etc->unit));
246 return et_up(et);
266 et_info_t *et = (et_info_t *) ctx->dev_softc;
273 ET_TRACE(("et%d: et_read\n", et->etc->unit));
279 events = et->etc->chops->getintrevents(et->etc->ch, FALSE);
284 if (!(p = et->etc->chops->rx(et->etc->ch)))
299 ET_ERROR(("et%d: rx: crc error (odd nibbles) from %s\n", et->etc->unit, eabuf));
302 ET_ERROR(("et%d: rx: symbol error from %s\n", et->etc->unit, eabuf));
305 ET_ERROR(("et%d: rx: crc error from %s\n", et->etc->unit, eabuf));
308 ET_ERROR(("et%d: rx: fifo overflow\n", et->etc->unit));
313 ET_PRHDR("rx", (struct ether_header *) buffer->buf_ptr, buffer->buf_retlen, et->etc->unit);
314 ET_PRPKT("rxpkt", buffer->buf_ptr, buffer->buf_retlen, et->etc->unit);
318 PKTFREE(et->osh, p, FALSE);
322 et->etc->chops->rxfill(et->etc->ch);
343 et_info_t *et = (et_info_t *) ctx->dev_softc;
346 events = et->etc->chops->getintrevents(et->etc->ch, FALSE);
368 et_info_t *et = ctx->dev_softc;
372 ET_ERROR(("et%d: PKTGET failed\n", et->etc->unit));
378 ET_PRHDR("tx", (struct ether_header *) PKTDATA(NULL, p), PKTLEN(NULL, p), et->etc->unit);
379 ET_PRPKT("txpkt", PKTDATA(NULL, p), PKTLEN(NULL, p), et->etc->unit);
381 ASSERT(*et->etc->txavail > 0);
384 et->etc->chops->tx(et->etc->ch, p);
387 while (!(et->etc->chops->getintrevents(et->etc->ch, FALSE) & INTR_TX));
390 et->etc->chops->txreclaim(et->etc->ch, FALSE);
410 et_info_t *et = (et_info_t *) ctx->dev_softc;
413 ET_TRACE(("et%d: et_ioctl: cmd 0x%x\n", et->etc->unit, buffer->buf_ioctlcmd));
418 bcopy(&et->etc->cur_etheraddr, buffer->buf_ptr, ETHER_ADDR_LEN);
422 bcopy(buffer->buf_ptr, &et->etc->cur_etheraddr, ETHER_ADDR_LEN);
423 et_init(et);
428 if (et->etc->linkstate) {
429 if (et->etc->speed == 10)
430 val = et->etc->duplex ? ETHER_SPEED_10FDX : ETHER_SPEED_10HDX;
431 else if (et->etc->speed == 100)
432 val = et->etc->duplex ? ETHER_SPEED_100FDX : ETHER_SPEED_100HDX;
451 return etc_ioctl(et->etc, ETCSPEED, &val);
454 *((int *) buffer->buf_ptr) = (int) et->etc->linkstate;
458 *((int *) buffer->buf_ptr) = et->etc->loopbk;
467 return etc_ioctl(et->etc, ETCLOOP, &val);
492 et_info_t *et = (et_info_t *) ctx->dev_softc;
494 ET_TRACE(("et%d: et_close\n", et->etc->unit));
496 return et_down(et, 1);
500 et_intrson(et_info_t *et)
503 ET_TRACE(("et%d: et_intrson\n", et->etc->unit));
522 et_info_t *et = (et_info_t *) ctx->dev_softc;
524 if (TIMER_RUNNING(et->timer) &&
525 TIMER_EXPIRED(et->timer)) {
526 etc_watchdog(et->etc);
527 TIMER_SET(et->timer, CFE_HZ / 2);
554 et_info_t *et;
567 for (et = et_list; et; et = et->next)
568 if (et == dev->dev_softc)
570 if (!et && !(et = et_list))
585 if ((ret = etc_ioctl(et->etc, ETCDUMP, arg))) {
611 return etc_ioctl(et->etc, cmd, arg);
617 cmd_addcmd("et",
621 "et command [args..]\n\n"