Lines Matching full:nic
47 #include "nic.h"
140 #define CR0_STOP 0x04 /* stop NIC, default = 1 */
141 #define CR0_STRT 0x02 /* start NIC */
166 #define CR_STOP 0x0004 /* stop NIC, default = 1 */
167 #define CR_STRT 0x0002 /* start NIC */
655 static struct nic *rhine_probe1 (struct nic *dev, int ioaddr,
661 static void rhine_init_ring (struct nic *dev);
662 static void rhine_disable (struct nic *nic);
663 static void rhine_reset (struct nic *nic);
664 static int rhine_poll (struct nic *nic);
665 static void rhine_transmit (struct nic *nic, const char *d, unsigned int t,
674 rhine_init_ring (struct nic *nic)
676 struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
857 struct nic *
858 rhine_probe (struct nic *nic, unsigned short *probeaddrs,
863 nic = rhine_probe1 (nic, pci->ioaddr, 0, -1);
865 if (nic)
867 nic->poll = rhine_poll;
868 nic->transmit = rhine_transmit;
869 nic->reset = rhine_reset;
870 nic->disable = rhine_disable;
871 rhine_reset (nic);
873 return nic;
876 static struct nic *
877 rhine_probe1 (struct nic *nic, int ioaddr, int chip_id, int options)
890 nic->node_addr[i] = inb (byPAR0 + i);
891 printf ("IO address %hX Ethernet Address: %!\n", ioaddr, nic->node_addr);
960 nic->priv_data = &rhine;
974 return nic;
978 rhine_disable (struct nic *nic)
980 struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
994 rhine_reset (struct nic *nic)
996 struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
1067 rhine_init_ring (nic);
1088 /* KICK NIC to WORK */
1098 rhine_poll (struct nic *nic)
1100 struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
1119 nic->packetlen = tp->rx_ring[tp->cur_rx].rx_status.bits.frame_length;
1120 memcpy (nic->packet, tp->rx_buffs[tp->cur_rx], nic->packetlen);
1131 rhine_transmit (struct nic *nic,
1134 struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
1147 memcpy (tp->tx_buffs[entry] + ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */