Lines Matching refs:priv

231 	ibmlana_priv *priv = (ibmlana_priv *) dev->priv;  in InitDscrs()  local
245 priv->tdastart = addr = 0; in InitDscrs()
246 priv->txbufstart = baddr = sizeof(tda_t) * TXBUFCNT; in InitDscrs()
256 tda.link = priv->tdastart; in InitDscrs()
267 priv->rxbufcnt = (dev->mem_end - dev->mem_start - baddr) / in InitDscrs()
272 priv->rrastart = raddr = priv->txbufstart + (TXBUFCNT * PKTSIZE); in InitDscrs()
273 priv->rdastart = addr = in InitDscrs()
274 priv->rrastart + (priv->rxbufcnt * sizeof(rra_t)); in InitDscrs()
275 priv->rxbufstart = baddr = in InitDscrs()
276 priv->rdastart + (priv->rxbufcnt * sizeof(rda_t)); in InitDscrs()
277 for (z = 0; z < priv->rxbufcnt; z++) { in InitDscrs()
289 if (z < priv->rxbufcnt - 1) in InitDscrs()
303 priv->nextrxdescr = 0; in InitDscrs()
304 priv->lastrxdescr = priv->rxbufcnt - 1; in InitDscrs()
305 priv->nexttxdescr = 0; in InitDscrs()
306 priv->currtxdescr = 0; in InitDscrs()
307 priv->txusedcnt = 0; in InitDscrs()
308 memset(priv->txused, 0, sizeof(priv->txused)); in InitDscrs()
315 ibmlana_priv *priv = (ibmlana_priv *) dev->priv; in InitSONIC() local
320 outw(priv->rrastart, dev->base_addr + SONIC_RSA); in InitSONIC()
321 outw(priv->rrastart + (priv->rxbufcnt * sizeof(rra_t)), in InitSONIC()
323 outw(priv->rrastart, dev->base_addr + SONIC_RRP); in InitSONIC()
324 outw(priv->rrastart, dev->base_addr + SONIC_RWP); in InitSONIC()
343 outw(priv->rdastart, dev->base_addr + SONIC_CRDA); in InitSONIC()
536 ibmlana_priv *priv = (ibmlana_priv *) dev->priv; in StartTx() local
539 addr = priv->tdastart + (descr * sizeof(tda_t)); in StartTx()
547 priv->currtxdescr = descr; in StartTx()
559 ibmlana_priv *priv = (ibmlana_priv *) dev->priv; in irqrbe_handler() local
563 outw(priv->rrastart, dev->base_addr + SONIC_RRP); in irqrbe_handler()
564 outw(priv->rrastart, dev->base_addr + SONIC_RWP); in irqrbe_handler()
571 ibmlana_priv *priv = (ibmlana_priv *) dev->priv; in irqrx_handler() local
581 priv->rdastart + (priv->nextrxdescr * sizeof(rda_t)); in irqrx_handler()
583 priv->rdastart + (priv->lastrxdescr * sizeof(rda_t)); in irqrx_handler()
608 priv->stat.rx_dropped++; in irqrx_handler()
625 priv->stat.rx_packets++; in irqrx_handler()
627 priv->stat.rx_bytes += rda.length; in irqrx_handler()
639 priv->stat.rx_errors++; in irqrx_handler()
642 priv->stat.rx_frame_errors++; in irqrx_handler()
645 priv->stat.rx_crc_errors++; in irqrx_handler()
663 priv->lastrxdescr = priv->nextrxdescr; in irqrx_handler()
664 if ((++priv->nextrxdescr) >= priv->rxbufcnt) in irqrx_handler()
665 priv->nextrxdescr = 0; in irqrx_handler()
673 ibmlana_priv *priv = (ibmlana_priv *) dev->priv; in irqtx_handler() local
679 dev->mem_start + priv->tdastart + in irqtx_handler()
680 (priv->currtxdescr * sizeof(tda_t)), sizeof(tda_t)); in irqtx_handler()
684 priv->stat.tx_packets++; in irqtx_handler()
686 priv->stat.tx_bytes += tda.length; in irqtx_handler()
691 priv->txused[priv->currtxdescr] = 0; in irqtx_handler()
692 priv->txusedcnt--; in irqtx_handler()
696 if (priv->txusedcnt > 0) in irqtx_handler()
697 StartTx(dev, (priv->currtxdescr + 1) % TXBUFCNT); in irqtx_handler()
711 ibmlana_priv *priv = (ibmlana_priv *) dev->priv; in irqtxerr_handler() local
717 dev->mem_start + priv->tdastart + in irqtxerr_handler()
718 (priv->currtxdescr * sizeof(tda_t)), sizeof(tda_t)); in irqtxerr_handler()
722 priv->stat.tx_errors++; in irqtxerr_handler()
724 priv->stat.tx_carrier_errors++; in irqtxerr_handler()
726 priv->stat.tx_aborted_errors++; in irqtxerr_handler()
728 priv->stat.tx_window_errors++; in irqtxerr_handler()
730 priv->stat.tx_fifo_errors++; in irqtxerr_handler()
734 priv->txused[priv->currtxdescr] = 0; in irqtxerr_handler()
735 priv->txusedcnt--; in irqtxerr_handler()
739 if (priv->txusedcnt > 0) in irqtxerr_handler()
740 StartTx(dev, (priv->currtxdescr + 1) % TXBUFCNT); in irqtxerr_handler()
819 ibmlana_priv *priv; in ibmlana_getinfo() local
825 if (dev->priv == NULL) in ibmlana_getinfo()
827 priv = (ibmlana_priv *) dev->priv; in ibmlana_getinfo()
831 len += sprintf(buf + len, "IRQ: %d\n", priv->realirq); in ibmlana_getinfo()
837 MediaNames[priv->medium]); in ibmlana_getinfo()
853 ibmlana_priv *priv = (ibmlana_priv *) dev->priv; in ibmlana_open() local
858 request_irq(priv->realirq, irq_handler, in ibmlana_open()
865 dev->irq = priv->realirq; in ibmlana_open()
907 ibmlana_priv *priv = (ibmlana_priv *) dev->priv; in ibmlana_tx() local
926 if (priv->txusedcnt >= TXBUFCNT) { in ibmlana_tx()
928 priv->stat.tx_dropped++; in ibmlana_tx()
937 baddr = priv->txbufstart + (priv->nexttxdescr * PKTSIZE); in ibmlana_tx()
958 addr = priv->tdastart + (priv->nexttxdescr * sizeof(tda_t)); in ibmlana_tx()
968 priv->txusedcnt++; in ibmlana_tx()
969 priv->txused[priv->nexttxdescr] = 1; in ibmlana_tx()
973 if (priv->txusedcnt >= TXBUFCNT) in ibmlana_tx()
980 if (priv->txusedcnt == 1) in ibmlana_tx()
981 StartTx(dev, priv->nexttxdescr); in ibmlana_tx()
982 priv->nexttxdescr = (priv->nexttxdescr + 1) % TXBUFCNT; in ibmlana_tx()
1002 ibmlana_priv *priv = (ibmlana_priv *) dev->priv; in ibmlana_stats() local
1004 return &(priv->stat); in ibmlana_stats()
1039 ibmlana_priv *priv; in ibmlana_probe() local
1128 priv = dev->priv = in ibmlana_probe()
1130 if (!priv) { in ibmlana_probe()
1134 priv->slot = slot; in ibmlana_probe()
1135 priv->realirq = irq; in ibmlana_probe()
1136 priv->medium = medium; in ibmlana_probe()
1137 memset(&(priv->stat), 0, sizeof(struct net_device_stats)); in ibmlana_probe()
1170 dev->name, priv->realirq, dev->base_addr, in ibmlana_probe()
1174 printk("%s: %s medium\n", dev->name, MediaNames[priv->medium]); in ibmlana_probe()
1224 ibmlana_priv *priv; in cleanup_module() local
1234 if (dev->priv != NULL) { in cleanup_module()
1235 priv = (ibmlana_priv *) dev->priv; in cleanup_module()
1243 mca_mark_as_unused(priv->slot); in cleanup_module()
1245 mca_set_adapter_name(priv->slot, ""); in cleanup_module()
1246 mca_set_adapter_procfn(priv->slot, NULL, NULL); in cleanup_module()
1247 kfree(dev->priv); in cleanup_module()
1248 dev->priv = NULL; in cleanup_module()