Lines Matching refs:nic
3 Schneider & Koch G16 NIC driver for Etherboot
67 #include "nic.h"
465 static int SK_probe1(struct nic *nic, short ioaddr1);
467 static void SK_reset(struct nic *nic);
468 static int SK_poll(struct nic *nic);
470 struct nic *nic,
475 static void SK_disable(struct nic *nic);
476 struct nic *SK_probe(struct nic *nic, unsigned short *probe_addrs);
483 static int SK_lance_init(struct nic *nic, unsigned short mode);
495 static void SK_print_pos(struct nic *nic, char *text);
496 static void SK_print_ram(struct nic *nic);
502 static void SK_reset(struct nic *nic)
505 SK_lance_init(nic, MODE_NORMAL);
511 static int SK_poll(struct nic *nic)
520 p = nic->priv_data;
588 * Copy data out of our receive descriptor into nic->packet.
594 memcpy(nic->packet, (unsigned char *) (rmdp->u.buffer & 0x00ffffff), nic->packetlen = len);
619 struct nic *nic,
633 p = nic->priv_data;
639 memcpy(&p->ram->tmdbuf[p->tmdnum][ETH_ALEN], nic->node_addr, ETH_ALEN); /* src */
714 SK_lance_init(nic, MODE_NORMAL);
731 static void SK_disable(struct nic *nic)
744 struct nic *SK_probe(struct nic *nic, unsigned short *probe_addrs)
750 nic->priv_data = &p_data;
758 if (SK_probe1(nic, ioaddr) >= 0)
764 /* point to NIC specific routines */
765 nic->reset = SK_reset;
766 nic->poll = SK_poll;
767 nic->transmit = SK_transmit;
768 nic->disable = SK_disable;
769 return nic;
777 int SK_probe1(struct nic *nic, short ioaddr1)
802 SK_print_pos(nic, "POS registers after ROM, RAM config");
812 *(nic->node_addr+i) = board->rom[j];
817 if (!(*(nic->node_addr+0) == SK_MAC0 &&
818 *(nic->node_addr+1) == SK_MAC1 &&
819 *(nic->node_addr+2) == SK_MAC2) )
827 p = nic->priv_data;
836 (unsigned int) ioaddr, (unsigned int) p->ram, nic->node_addr);
851 if (!(i = SK_lance_init(nic, MODE_NORMAL))) /* LANCE init OK? */
866 SK_lance_init(nic, MODE_DTX | MODE_DRX);
872 SK_lance_init(nic, MODE_NORMAL);
875 SK_print_pos(nic, "POS regs before returning OK");
889 SK_print_pos(nic, "End of SK_probe1");
890 SK_print_ram(nic);
897 static int SK_lance_init(struct nic *nic, unsigned short mode)
900 struct priv *p = (struct priv *) nic->priv_data;
955 (p->ram)->ib.paddr[i] = *(nic->node_addr+i);
1018 SK_print_pos(nic, "LANCE INIT failed");
1107 static void SK_print_pos(struct nic *nic, char *text)
1123 static void SK_print_ram(struct nic *nic)
1127 struct priv *p = (struct priv *) nic->priv_data;