• Home
  • Raw
  • Download

Lines Matching refs:nic

478 static int mdio_read(struct nic *nic, int phy_id, int location);
479 static void mdio_write(struct nic *nic, int phy_id, int location, int value);
481 static void parse_eeprom(struct nic *nic);
482 struct nic *tulip_probe(struct nic *nic, unsigned short *io_addrs,
484 static void tulip_init_ring(struct nic *nic);
485 static void tulip_reset(struct nic *nic);
486 static void tulip_transmit(struct nic *nic, const char *d, unsigned int t,
488 static int tulip_poll(struct nic *nic);
489 static void tulip_disable(struct nic *nic);
490 static void nway_start(struct nic *nic);
491 static void pnic_do_nway(struct nic *nic);
492 static void select_media(struct nic *nic, int startup);
493 static void init_media(struct nic *nic);
494 static void start_link(struct nic *nic);
495 static int tulip_check_duplex(struct nic *nic);
568 int mdio_read(struct nic *nic, int phy_id, int location) in mdio_read() argument
629 void mdio_write(struct nic *nic, int phy_id, int location, int value) in mdio_write() argument
734 static void parse_eeprom(struct nic *nic) in parse_eeprom() argument
753 if (nic->node_addr[0] == eeprom_fixups[i].addr0 in parse_eeprom()
754 && nic->node_addr[1] == eeprom_fixups[i].addr1 in parse_eeprom()
755 && nic->node_addr[2] == eeprom_fixups[i].addr2) { in parse_eeprom()
756 if (nic->node_addr[2] == 0xE8 && ee_data[0x1a] == 0x55) in parse_eeprom()
902 static void tulip_init_ring(struct nic *nic) in tulip_init_ring() argument
942 static void tulip_reset(struct nic *nic) in tulip_reset() argument
971 tulip_init_ring(nic); in tulip_reset()
974 u32 addr_high = (nic->node_addr[1]<<8) + (nic->node_addr[0]<<0); in tulip_reset()
976 outl((nic->node_addr[5]<<8) + nic->node_addr[4] + in tulip_reset()
977 (nic->node_addr[3]<<24) + (nic->node_addr[2]<<16), in tulip_reset()
984 u32 addr_low = cpu_to_le32(get_unaligned((u32 *)nic->node_addr)); in tulip_reset()
985 u32 addr_high = cpu_to_le32(get_unaligned((u16 *)(nic->node_addr+4))); in tulip_reset()
1012 txb[0] = nic->node_addr[0]; in tulip_reset()
1013 txb[1] = nic->node_addr[1]; in tulip_reset()
1014 txb[4] = nic->node_addr[2]; in tulip_reset()
1015 txb[5] = nic->node_addr[3]; in tulip_reset()
1016 txb[8] = nic->node_addr[4]; in tulip_reset()
1017 txb[9] = nic->node_addr[5]; in tulip_reset()
1028 init_media(nic); in tulip_reset()
1050 tulip_check_duplex(nic); in tulip_reset()
1060 static void tulip_transmit(struct nic *nic, const char *d, unsigned int t, in tulip_transmit() argument
1075 memcpy(txb + ETH_ALEN, nic->node_addr, ETH_ALEN); in tulip_transmit()
1120 static int tulip_poll(struct nic *nic) in tulip_poll() argument
1135 nic->packetlen = (rx_ring[tp->cur_rx].status & 0x3FFF0000) >> 16; in tulip_poll()
1146 memcpy(nic->packet, rxb + tp->cur_rx * BUFLEN, nic->packetlen); in tulip_poll()
1158 static void tulip_disable(struct nic *nic) in tulip_disable() argument
1178 struct nic *tulip_probe(struct nic *nic, unsigned short *io_addrs, in tulip_probe() argument
1289 nic->node_addr[i] = value; in tulip_probe()
1299 put_unaligned(le16_to_cpu(value), ((u16*)nic->node_addr) + i); in tulip_probe()
1304 put_unaligned(inl(ioaddr + 0xA4), (u32 *)nic->node_addr); in tulip_probe()
1305 put_unaligned(inl(ioaddr + 0xA8), (u16 *)(nic->node_addr + 4)); in tulip_probe()
1307 sum += nic->node_addr[i]; in tulip_probe()
1327 nic->node_addr[i] = ee_data[i + sa_offset]; in tulip_probe()
1332 if ((nic->node_addr[0] == 0xA0 || nic->node_addr[0] == 0xC0) in tulip_probe()
1333 && nic->node_addr[1] == 0x00) in tulip_probe()
1335 char tmp = nic->node_addr[i]; in tulip_probe()
1336 nic->node_addr[i] = nic->node_addr[i+1]; in tulip_probe()
1337 nic->node_addr[i+1] = tmp; in tulip_probe()
1343 nic->node_addr[i] = last_phys_addr[i]; in tulip_probe()
1344 nic->node_addr[i] = last_phys_addr[i] + 1; in tulip_probe()
1348 last_phys_addr[i] = nic->node_addr[i]; in tulip_probe()
1350 printf("%s: %! at ioaddr %hX\n", tp->nic_name, nic->node_addr, ioaddr); in tulip_probe()
1373 parse_eeprom(nic); in tulip_probe()
1376 start_link(nic); in tulip_probe()
1379 tulip_reset(nic); in tulip_probe()
1381 nic->reset = tulip_reset; in tulip_probe()
1382 nic->poll = tulip_poll; in tulip_probe()
1383 nic->transmit = tulip_transmit; in tulip_probe()
1384 nic->disable = tulip_disable; in tulip_probe()
1389 return nic; in tulip_probe()
1392 static void start_link(struct nic *nic) in start_link() argument
1409 select_media(nic, 2); in start_link()
1418 int mii_status = mdio_read(nic, phy, 1); in start_link()
1421 int mii_reg0 = mdio_read(nic, phy, 0); in start_link()
1422 int mii_advert = mdio_read(nic, phy, 4); in start_link()
1439 mdio_write(nic, phy, 4, to_advert); in start_link()
1442 mdio_write(nic, phy, 0, mii_reg0 | in start_link()
1483 nway_start(nic); in start_link()
1511 static void nway_start(struct nic *nic) in nway_start() argument
1547 static void init_media(struct nic *nic) in init_media() argument
1599 select_media(nic, 1); in init_media()
1605 nway_start(nic); in init_media()
1609 select_media(nic, 1); in init_media()
1613 tp->nic_name, tp->phys[0], mdio_read(nic, tp->phys[0], 1)); in init_media()
1621 nway_start(nic); in init_media()
1624 nway_start(nic); in init_media()
1632 pnic_do_nway(nic); in init_media()
1661 select_media(nic, 1); in init_media()
1665 static void pnic_do_nway(struct nic *nic) in pnic_do_nway() argument
1702 static void select_media(struct nic *nic, int startup) in select_media() argument
1831 mdio_write(nic, tp->phys[phy_num], 4, tp->mii_advertise); in select_media()
1937 static int tulip_check_duplex(struct nic *nic) in tulip_check_duplex() argument
1941 bmsr = mdio_read(nic, tp->phys[0], 1); in tulip_check_duplex()
1942 lpa = mdio_read(nic, tp->phys[0], 5); in tulip_check_duplex()
1953 int new_bmsr = mdio_read(nic, tp->phys[0], 1); in tulip_check_duplex()