Lines Matching refs:ei_local

97 #define ei_reset_8390 (ei_local->reset_8390)
98 #define ei_block_output (ei_local->block_output)
99 #define ei_block_input (ei_local->block_input)
100 #define ei_get_8390_hdr (ei_local->get_8390_hdr)
126 * this with ei_local->page_lock. Nobody should assume or set the page other
206 struct ei_device *ei_local = netdev_priv(dev);
216 spin_lock_irqsave(&ei_local->page_lock, flags);
221 spin_unlock_irqrestore(&ei_local->page_lock, flags);
222 ei_local->irqlock = 0;
234 struct ei_device *ei_local = netdev_priv(dev);
241 spin_lock_irqsave(&ei_local->page_lock, flags);
243 spin_unlock_irqrestore(&ei_local->page_lock, flags);
259 struct ei_device *ei_local = netdev_priv(dev);
265 spin_lock_irqsave(&ei_local->page_lock, flags);
268 spin_unlock_irqrestore(&ei_local->page_lock, flags);
277 ei_local->interface_num ^= 1; /* Try a different xcvr. */
283 spin_lock(&ei_local->page_lock);
289 spin_unlock(&ei_local->page_lock);
306 struct ei_device *ei_local = netdev_priv(dev);
324 spin_lock_irqsave(&ei_local->page_lock, flags);
326 spin_unlock_irqrestore(&ei_local->page_lock, flags);
335 spin_lock(&ei_local->page_lock);
337 ei_local->irqlock = 1;
347 if (ei_local->tx1 == 0) {
348 output_page = ei_local->tx_start_page;
349 ei_local->tx1 = send_length;
350 if ((netif_msg_tx_queued(ei_local)) &&
351 ei_local->tx2 > 0)
354 ei_local->tx2, ei_local->lasttx, ei_local->txing);
355 } else if (ei_local->tx2 == 0) {
356 output_page = ei_local->tx_start_page + TX_PAGES/2;
357 ei_local->tx2 = send_length;
358 if ((netif_msg_tx_queued(ei_local)) &&
359 ei_local->tx1 > 0)
362 ei_local->tx1, ei_local->lasttx, ei_local->txing);
364 netif_dbg(ei_local, tx_err, dev,
366 ei_local->tx1, ei_local->tx2, ei_local->lasttx);
367 ei_local->irqlock = 0;
370 spin_unlock(&ei_local->page_lock);
384 if (!ei_local->txing) {
385 ei_local->txing = 1;
387 if (output_page == ei_local->tx_start_page) {
388 ei_local->tx1 = -1;
389 ei_local->lasttx = -1;
391 ei_local->tx2 = -1;
392 ei_local->lasttx = -2;
395 ei_local->txqueue++;
397 if (ei_local->tx1 && ei_local->tx2)
403 ei_local->irqlock = 0;
406 spin_unlock(&ei_local->page_lock);
432 struct ei_device *ei_local = netdev_priv(dev);
438 spin_lock(&ei_local->page_lock);
440 if (ei_local->irqlock) {
448 spin_unlock(&ei_local->page_lock);
454 netif_dbg(ei_local, intr, dev, "interrupt(isr=%#2.2x)\n",
493 if (interrupts && (netif_msg_intr(ei_local))) {
506 spin_unlock(&ei_local->page_lock);
536 /* ei_local is used on some platforms via the EI_SHIFT macro */
537 struct ei_device *ei_local __maybe_unused = netdev_priv(dev);
582 struct ei_device *ei_local = netdev_priv(dev);
591 ei_local->txqueue--;
593 if (ei_local->tx1 < 0) {
594 if (ei_local->lasttx != 1 && ei_local->lasttx != -1)
596 ei_local->name, ei_local->lasttx, ei_local->tx1);
597 ei_local->tx1 = 0;
598 if (ei_local->tx2 > 0) {
599 ei_local->txing = 1;
600 NS8390_trigger_send(dev, ei_local->tx2, ei_local->tx_start_page + 6);
602 ei_local->tx2 = -1;
603 ei_local->lasttx = 2;
605 ei_local->lasttx = 20;
606 ei_local->txing = 0;
608 } else if (ei_local->tx2 < 0) {
609 if (ei_local->lasttx != 2 && ei_local->lasttx != -2)
611 ei_local->name, ei_local->lasttx, ei_local->tx2);
612 ei_local->tx2 = 0;
613 if (ei_local->tx1 > 0) {
614 ei_local->txing = 1;
615 NS8390_trigger_send(dev, ei_local->tx1, ei_local->tx_start_page);
617 ei_local->tx1 = -1;
618 ei_local->lasttx = 1;
620 ei_local->lasttx = 10;
621 ei_local->txing = 0;
625 ei_local->lasttx);
662 struct ei_device *ei_local = netdev_priv(dev);
667 int num_rx_pages = ei_local->stop_page-ei_local->rx_start_page;
679 if (this_frame >= ei_local->stop_page)
680 this_frame = ei_local->rx_start_page;
688 if ((netif_msg_rx_status(ei_local)) &&
689 this_frame != ei_local->current_page &&
693 this_frame, ei_local->current_page);
713 ei_local->current_page = rxing_page;
714 ei_outb(ei_local->current_page-1, e8390_base+EN0_BOUNDARY);
720 netif_dbg(ei_local, rx_status, dev,
731 netif_err(ei_local, rx_err, dev,
749 netif_err(ei_local, rx_err, dev,
761 if (next_frame >= ei_local->stop_page) {
764 next_frame = ei_local->rx_start_page;
766 ei_local->current_page = next_frame;
792 /* ei_local is used on some platforms via the EI_SHIFT macro */
793 struct ei_device *ei_local __maybe_unused = netdev_priv(dev);
802 netif_dbg(ei_local, rx_err, dev, "Receiver overrun\n");
859 struct ei_device *ei_local = netdev_priv(dev);
866 spin_lock_irqsave(&ei_local->page_lock, flags);
871 spin_unlock_irqrestore(&ei_local->page_lock, flags);
907 struct ei_device *ei_local = netdev_priv(dev);
910 memset(ei_local->mcfilter, 0, 8);
912 make_mc_bits(ei_local->mcfilter, dev);
914 memset(ei_local->mcfilter, 0xFF, 8); /* mcast set to accept-all */
933 ei_outb_p(ei_local->mcfilter[i], e8390_base + EN1_MULT_SHIFT(i));
935 if (ei_inb_p(e8390_base + EN1_MULT_SHIFT(i)) != ei_local->mcfilter[i])
959 struct ei_device *ei_local = netdev_priv(dev);
961 spin_lock_irqsave(&ei_local->page_lock, flags);
963 spin_unlock_irqrestore(&ei_local->page_lock, flags);
976 struct ei_device *ei_local = netdev_priv(dev);
980 spin_lock_init(&ei_local->page_lock);
982 ei_local->msg_enable = netif_msg_init(msg_enable, default_msg_level);
984 if (netif_msg_drv(ei_local) && (version_printed++ == 0))
1017 struct ei_device *ei_local = netdev_priv(dev);
1019 int endcfg = ei_local->word16
1020 ? (0x48 | ENDCFG_WTS | (ei_local->bigendian ? ENDCFG_BOS : 0))
1034 ei_outb_p(ei_local->tx_start_page, e8390_base + EN0_TPSR);
1035 ei_local->tx1 = ei_local->tx2 = 0;
1036 ei_outb_p(ei_local->rx_start_page, e8390_base + EN0_STARTPG);
1037 ei_outb_p(ei_local->stop_page-1, e8390_base + EN0_BOUNDARY); /* 3c503 says 0x3f,NS0x26*/
1038 ei_local->current_page = ei_local->rx_start_page; /* assert boundary+1 */
1039 ei_outb_p(ei_local->stop_page, e8390_base + EN0_STOPPG);
1049 if ((netif_msg_probe(ei_local)) &&
1055 ei_outb_p(ei_local->rx_start_page, e8390_base + EN1_CURPAG);
1058 ei_local->tx1 = ei_local->tx2 = 0;
1059 ei_local->txing = 0;
1079 struct ei_device *ei_local __attribute((unused)) = netdev_priv(dev);