Home | History | Annotate | Download | only in netboot

Lines Matching refs:nic

67 #include "nic.h"
235 static int send_test_pkt(struct nic *nic)
245 memcpy(testpacket, nic->node_addr, ETH_ALEN);
246 memcpy(testpacket+ETH_ALEN, nic->node_addr, ETH_ALEN);
274 static int detect_aui(struct nic *nic)
281 if (send_test_pkt(nic)) {
287 static int detect_bnc(struct nic *nic)
294 if (send_test_pkt(nic)) {
304 static void cs89x0_reset(struct nic *nic)
338 nic->node_addr[i*2] |
339 (nic->node_addr[i*2+1] << 8));
364 struct nic *nic,
388 cs89x0_reset(nic);
393 outsw(eth_nic_base + TX_FRAME_PORT, nic->node_addr,
415 static int cs89x0_poll(struct nic *nic)
425 nic->packetlen = inw(eth_nic_base + RX_FRAME_PORT);
426 insw(eth_nic_base + RX_FRAME_PORT, nic->packet, nic->packetlen >> 1);
427 if (nic->packetlen & 1)
428 nic->packet[nic->packetlen-1] = inw(eth_nic_base + RX_FRAME_PORT);
432 static void cs89x0_disable(struct nic *nic)
434 cs89x0_reset(nic);
441 struct nic *cs89x0_probe(struct nic *nic, unsigned short *probe_addrs)
541 nic->node_addr[i] = ((unsigned char *)eeprom_buff)[i];
543 printf("%!\n", nic->node_addr);
575 cs89x0_reset(nic);
591 result = detect_aui(nic);
602 result = detect_bnc(nic);
618 if ((result = detect_aui(nic)) != 0)
621 if ((result = detect_bnc(nic)) != 0)
647 nic->reset = cs89x0_reset;
648 nic->poll = cs89x0_poll;
649 nic->transmit = cs89x0_transmit;
650 nic->disable = cs89x0_disable;
651 return (nic);