Lines Matching full:nic
47 #include "nic.h"
144 #define CR0_STOP 0x04 /* stop NIC, default = 1 */
145 #define CR0_STRT 0x02 /* start NIC */
170 #define CR_STOP 0x0004 /* stop NIC, default = 1 */
171 #define CR_STRT 0x0002 /* start NIC */
656 static void rhine_probe1 (struct nic *nic, int ioaddr,
662 static void rhine_init_ring (struct nic *dev);
664 static void rhine_reset (struct nic *nic);
665 static int rhine_poll (struct nic *nic, int retreive);
666 static void rhine_transmit (struct nic *nic, const char *d, unsigned int t,
671 rhine_init_ring (struct nic *nic) in rhine_init_ring() argument
673 struct rhine_private *tp = (struct rhine_private *) nic->priv_data; in rhine_init_ring()
887 void rhine_irq ( struct nic *nic, irq_action_t action ) { in rhine_irq() argument
888 struct rhine_private *tp = (struct rhine_private *) nic->priv_data; in rhine_irq()
895 intr_status = inw(nic->ioaddr + IntrStatus); in rhine_irq()
898 intr_status |= inb(nic->ioaddr + IntrStatus2) << 16; in rhine_irq()
902 outw(intr_status, nic->ioaddr + IntrEnable); in rhine_irq()
905 outw(0x0010, nic->ioaddr + 0x84); in rhine_irq()
913 struct nic *nic = (struct nic *)dev; in rhine_probe() local
917 rhine_probe1 (nic, pci->ioaddr, pci->dev_id, -1); in rhine_probe()
920 rhine_reset (nic); in rhine_probe()
923 nic->poll = rhine_poll; in rhine_probe()
924 nic->transmit = rhine_transmit; in rhine_probe()
925 nic->irqno = pci->irq; in rhine_probe()
926 nic->irq = rhine_irq; in rhine_probe()
927 nic->ioaddr = tp->ioaddr; in rhine_probe()
933 static void set_rx_mode(struct nic *nic __unused) { in set_rx_mode()
934 struct rhine_private *tp = (struct rhine_private *) nic->priv_data; in set_rx_mode()
947 rhine_probe1 (struct nic *nic, int ioaddr, int chip_id, int options) in rhine_probe1() argument
983 nic->node_addr[i] = inb (byPAR0 + i); in rhine_probe1()
984 printf ("IO address %hX Ethernet Address: %!\n", ioaddr, nic->node_addr); in rhine_probe1()
1054 nic->priv_data = &rhine; in rhine_probe1()
1074 struct nic *nic = (struct nic *)dev; in rhine_disable() local
1075 struct rhine_private *tp = (struct rhine_private *) nic->priv_data; in rhine_disable()
1079 rhine_reset(nic); in rhine_disable()
1092 rhine_reset (struct nic *nic) in rhine_reset() argument
1094 struct rhine_private *tp = (struct rhine_private *) nic->priv_data; in rhine_reset()
1158 rhine_init_ring (nic); in rhine_reset()
1164 set_rx_mode(nic); in rhine_reset()
1182 /* KICK NIC to WORK */ in rhine_reset()
1191 #define IOSYNC do { readb(nic->ioaddr + StationAddr); } while (0)
1194 rhine_poll (struct nic *nic, int retreive) in rhine_poll() argument
1196 struct rhine_private *tp = (struct rhine_private *) nic->priv_data; in rhine_poll()
1206 intr_status = inw(nic->ioaddr + IntrStatus); in rhine_poll()
1210 intr_status |= inb(nic->ioaddr + IntrStatus2) << 16; in rhine_poll()
1214 outb(0x08, nic->ioaddr + IntrStatus2); in rhine_poll()
1215 outw(intr_status & 0xffff, nic->ioaddr + IntrStatus); in rhine_poll()
1232 nic->packetlen = tp->rx_ring[tp->cur_rx].rx_status.bits.frame_length; in rhine_poll()
1233 memcpy (nic->packet, tp->rx_buffs[tp->cur_rx], nic->packetlen); in rhine_poll()
1241 outw(DEFAULT_INTR & ~IntrRxDone, nic->ioaddr + IntrStatus); in rhine_poll()
1249 rhine_transmit (struct nic *nic, in rhine_transmit() argument
1252 struct rhine_private *tp = (struct rhine_private *) nic->priv_data; in rhine_transmit()
1265 memcpy (tp->tx_buffs[entry] + ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ in rhine_transmit()