Lines Matching refs:nic
28 #include "nic.h"
65 static void t595_reset(struct nic *nic)
109 outb(nic->node_addr[i], BASE + VX_W2_ADDR_0 + i);
163 struct nic *nic,
211 outsw(BASE + VX_W1_TX_PIO_WR_1, nic->node_addr, ETH_ALEN/2);
228 static int t595_poll(struct nic *nic)
269 insw(BASE + VX_W1_RX_PIO_RD_1, nic->packet, rx_fifo / 2);
271 nic->packet[rx_fifo-1]=inb(BASE + VX_W1_RX_PIO_RD_1);
272 nic->packetlen=rx_fifo;
282 insw(BASE + VX_W1_RX_PIO_RD_1, nic->packet+nic->packetlen, rx_fifo / 2);
284 nic->packet[nic->packetlen+rx_fifo-1]=inb(BASE + VX_W1_RX_PIO_RD_1);
285 nic->packetlen+=rx_fifo;
292 printf("=%d",nic->packetlen);
303 type = (nic->packet[12]<<8) | nic->packet[13];
304 if(nic->packet[0]+nic->packet[1]+nic->packet[2]+nic->packet[3]+nic->packet[4]+
305 nic->packet[5] == 0xFF*ETH_ALEN)
441 static void t595_disable(struct nic *nic)
453 struct nic *t595_probe(struct nic *nic, unsigned short *probeaddrs, struct pci_device *pci)
479 p = (unsigned short *) nic->node_addr;
487 printf("Ethernet address: %!\n", nic->node_addr);
489 t595_reset(nic);
490 nic->reset = t595_reset;
491 nic->poll = t595_poll;
492 nic->transmit = t595_transmit;
493 nic->disable = t595_disable;
494 return nic;