Lines Matching refs:ei_local

98 #define ei_reset_8390 (ei_local->reset_8390)
99 #define ei_block_output (ei_local->block_output)
100 #define ei_block_input (ei_local->block_input)
101 #define ei_get_8390_hdr (ei_local->get_8390_hdr)
127 * this with ei_local->page_lock. Nobody should assume or set the page other
207 struct ei_device *ei_local = netdev_priv(dev);
217 spin_lock_irqsave(&ei_local->page_lock, flags);
222 spin_unlock_irqrestore(&ei_local->page_lock, flags);
223 ei_local->irqlock = 0;
235 struct ei_device *ei_local = netdev_priv(dev);
242 spin_lock_irqsave(&ei_local->page_lock, flags);
244 spin_unlock_irqrestore(&ei_local->page_lock, flags);
260 struct ei_device *ei_local = netdev_priv(dev);
266 spin_lock_irqsave(&ei_local->page_lock, flags);
269 spin_unlock_irqrestore(&ei_local->page_lock, flags);
278 ei_local->interface_num ^= 1; /* Try a different xcvr. */
284 spin_lock(&ei_local->page_lock);
290 spin_unlock(&ei_local->page_lock);
307 struct ei_device *ei_local = netdev_priv(dev);
325 spin_lock_irqsave(&ei_local->page_lock, flags);
327 spin_unlock_irqrestore(&ei_local->page_lock, flags);
336 spin_lock(&ei_local->page_lock);
338 ei_local->irqlock = 1;
348 if (ei_local->tx1 == 0) {
349 output_page = ei_local->tx_start_page;
350 ei_local->tx1 = send_length;
351 if ((netif_msg_tx_queued(ei_local)) &&
352 ei_local->tx2 > 0)
355 ei_local->tx2, ei_local->lasttx, ei_local->txing);
356 } else if (ei_local->tx2 == 0) {
357 output_page = ei_local->tx_start_page + TX_PAGES/2;
358 ei_local->tx2 = send_length;
359 if ((netif_msg_tx_queued(ei_local)) &&
360 ei_local->tx1 > 0)
363 ei_local->tx1, ei_local->lasttx, ei_local->txing);
365 netif_dbg(ei_local, tx_err, dev,
367 ei_local->tx1, ei_local->tx2, ei_local->lasttx);
368 ei_local->irqlock = 0;
371 spin_unlock(&ei_local->page_lock);
385 if (!ei_local->txing) {
386 ei_local->txing = 1;
388 if (output_page == ei_local->tx_start_page) {
389 ei_local->tx1 = -1;
390 ei_local->lasttx = -1;
392 ei_local->tx2 = -1;
393 ei_local->lasttx = -2;
396 ei_local->txqueue++;
398 if (ei_local->tx1 && ei_local->tx2)
404 ei_local->irqlock = 0;
407 spin_unlock(&ei_local->page_lock);
433 struct ei_device *ei_local = netdev_priv(dev);
439 spin_lock(&ei_local->page_lock);
441 if (ei_local->irqlock) {
449 spin_unlock(&ei_local->page_lock);
455 netif_dbg(ei_local, intr, dev, "interrupt(isr=%#2.2x)\n",
494 if (interrupts && (netif_msg_intr(ei_local))) {
507 spin_unlock(&ei_local->page_lock);
537 /* ei_local is used on some platforms via the EI_SHIFT macro */
538 struct ei_device *ei_local __maybe_unused = netdev_priv(dev);
583 struct ei_device *ei_local = netdev_priv(dev);
592 ei_local->txqueue--;
594 if (ei_local->tx1 < 0) {
595 if (ei_local->lasttx != 1 && ei_local->lasttx != -1)
597 ei_local->name, ei_local->lasttx, ei_local->tx1);
598 ei_local->tx1 = 0;
599 if (ei_local->tx2 > 0) {
600 ei_local->txing = 1;
601 NS8390_trigger_send(dev, ei_local->tx2, ei_local->tx_start_page + 6);
603 ei_local->tx2 = -1;
604 ei_local->lasttx = 2;
606 ei_local->lasttx = 20;
607 ei_local->txing = 0;
609 } else if (ei_local->tx2 < 0) {
610 if (ei_local->lasttx != 2 && ei_local->lasttx != -2)
612 ei_local->name, ei_local->lasttx, ei_local->tx2);
613 ei_local->tx2 = 0;
614 if (ei_local->tx1 > 0) {
615 ei_local->txing = 1;
616 NS8390_trigger_send(dev, ei_local->tx1, ei_local->tx_start_page);
618 ei_local->tx1 = -1;
619 ei_local->lasttx = 1;
621 ei_local->lasttx = 10;
622 ei_local->txing = 0;
626 ei_local->lasttx);
663 struct ei_device *ei_local = netdev_priv(dev);
668 int num_rx_pages = ei_local->stop_page-ei_local->rx_start_page;
680 if (this_frame >= ei_local->stop_page)
681 this_frame = ei_local->rx_start_page;
689 if ((netif_msg_rx_status(ei_local)) &&
690 this_frame != ei_local->current_page &&
694 this_frame, ei_local->current_page);
714 ei_local->current_page = rxing_page;
715 ei_outb(ei_local->current_page-1, e8390_base+EN0_BOUNDARY);
721 netif_dbg(ei_local, rx_status, dev,
732 netif_err(ei_local, rx_err, dev,
750 netif_err(ei_local, rx_err, dev,
762 if (next_frame >= ei_local->stop_page) {
765 next_frame = ei_local->rx_start_page;
767 ei_local->current_page = next_frame;
793 /* ei_local is used on some platforms via the EI_SHIFT macro */
794 struct ei_device *ei_local __maybe_unused = netdev_priv(dev);
803 netif_dbg(ei_local, rx_err, dev, "Receiver overrun\n");
860 struct ei_device *ei_local = netdev_priv(dev);
867 spin_lock_irqsave(&ei_local->page_lock, flags);
872 spin_unlock_irqrestore(&ei_local->page_lock, flags);
908 struct ei_device *ei_local = netdev_priv(dev);
911 memset(ei_local->mcfilter, 0, 8);
913 make_mc_bits(ei_local->mcfilter, dev);
915 memset(ei_local->mcfilter, 0xFF, 8); /* mcast set to accept-all */
934 ei_outb_p(ei_local->mcfilter[i], e8390_base + EN1_MULT_SHIFT(i));
936 if (ei_inb_p(e8390_base + EN1_MULT_SHIFT(i)) != ei_local->mcfilter[i])
960 struct ei_device *ei_local = netdev_priv(dev);
962 spin_lock_irqsave(&ei_local->page_lock, flags);
964 spin_unlock_irqrestore(&ei_local->page_lock, flags);
977 struct ei_device *ei_local = netdev_priv(dev);
981 spin_lock_init(&ei_local->page_lock);
983 ei_local->msg_enable = netif_msg_init(msg_enable, default_msg_level);
985 if (netif_msg_drv(ei_local) && (version_printed++ == 0))
1018 struct ei_device *ei_local = netdev_priv(dev);
1020 int endcfg = ei_local->word16
1021 ? (0x48 | ENDCFG_WTS | (ei_local->bigendian ? ENDCFG_BOS : 0))
1035 ei_outb_p(ei_local->tx_start_page, e8390_base + EN0_TPSR);
1036 ei_local->tx1 = ei_local->tx2 = 0;
1037 ei_outb_p(ei_local->rx_start_page, e8390_base + EN0_STARTPG);
1038 ei_outb_p(ei_local->stop_page-1, e8390_base + EN0_BOUNDARY); /* 3c503 says 0x3f,NS0x26*/
1039 ei_local->current_page = ei_local->rx_start_page; /* assert boundary+1 */
1040 ei_outb_p(ei_local->stop_page, e8390_base + EN0_STOPPG);
1050 if ((netif_msg_probe(ei_local)) &&
1056 ei_outb_p(ei_local->rx_start_page, e8390_base + EN1_CURPAG);
1059 ei_local->tx1 = ei_local->tx2 = 0;
1060 ei_local->txing = 0;
1080 struct ei_device *ei_local __attribute((unused)) = netdev_priv(dev);