Lines Matching defs:nic

47 #include "nic.h"
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)
673 struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
887 void rhine_irq ( struct nic *nic, irq_action_t action ) {
888 struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
895 intr_status = inw(nic->ioaddr + IntrStatus);
898 intr_status |= inb(nic->ioaddr + IntrStatus2) << 16;
902 outw(intr_status, nic->ioaddr + IntrEnable);
905 outw(0x0010, nic->ioaddr + 0x84);
913 struct nic *nic = (struct nic *)dev;
917 rhine_probe1 (nic, pci->ioaddr, pci->dev_id, -1);
920 rhine_reset (nic);
923 nic->poll = rhine_poll;
924 nic->transmit = rhine_transmit;
925 nic->irqno = pci->irq;
926 nic->irq = rhine_irq;
927 nic->ioaddr = tp->ioaddr;
933 static void set_rx_mode(struct nic *nic __unused) {
934 struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
947 rhine_probe1 (struct nic *nic, int ioaddr, int chip_id, int options)
983 nic->node_addr[i] = inb (byPAR0 + i);
984 printf ("IO address %hX Ethernet Address: %!\n", ioaddr, nic->node_addr);
1054 nic->priv_data = &rhine;
1074 struct nic *nic = (struct nic *)dev;
1075 struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
1079 rhine_reset(nic);
1092 rhine_reset (struct nic *nic)
1094 struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
1158 rhine_init_ring (nic);
1164 set_rx_mode(nic);
1191 #define IOSYNC do { readb(nic->ioaddr + StationAddr); } while (0)
1194 rhine_poll (struct nic *nic, int retreive)
1196 struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
1206 intr_status = inw(nic->ioaddr + IntrStatus);
1210 intr_status |= inb(nic->ioaddr + IntrStatus2) << 16;
1214 outb(0x08, nic->ioaddr + IntrStatus2);
1215 outw(intr_status & 0xffff, nic->ioaddr + IntrStatus);
1232 nic->packetlen = tp->rx_ring[tp->cur_rx].rx_status.bits.frame_length;
1233 memcpy (nic->packet, tp->rx_buffs[tp->cur_rx], nic->packetlen);
1241 outw(DEFAULT_INTR & ~IntrRxDone, nic->ioaddr + IntrStatus);
1249 rhine_transmit (struct nic *nic,
1252 struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
1265 memcpy (tp->tx_buffs[entry] + ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */