|
iPXE
|
Go to the source code of this file.
Data Structures | |
| struct | pci_id_info |
| struct | pci_id_info::match_info |
| struct | tulip_chip_table |
| struct | medialeaf |
| struct | mediatable |
| struct | mediainfo |
| struct | tulip_rx_desc |
| struct | tulip_tx_desc |
| struct | tulip_private |
| struct | tulip_bss |
| struct | fixups |
Macros | |
| #define | TX_TIME_OUT 2*TICKS_PER_SEC |
| #define | get_unaligned(ptr) |
| #define | put_unaligned(val, ptr) |
| #define | get_u16(ptr) |
| #define | virt_to_le32desc(addr) |
| #define | TULIP_IOTYPE PCI_USES_MASTER | PCI_USES_IO | PCI_ADDR0 |
| #define | TULIP_SIZE 0x80 |
| #define | FULL_DUPLEX_MAGIC 0x6969 |
| #define | MEDIA_MASK 31 |
| #define | EEPROM_ADDRLEN 6 |
| #define | EEPROM_SIZE 128 /* 2 << EEPROM_ADDRLEN */ |
| #define | EE_WRITE_CMD (5 << addr_len) |
| #define | EE_READ_CMD (6 << addr_len) |
| #define | EE_ERASE_CMD (7 << addr_len) |
| #define | EE_SHIFT_CLK 0x02 /* EEPROM shift clock. */ |
| #define | EE_CS 0x01 /* EEPROM chip select. */ |
| #define | EE_DATA_WRITE 0x04 /* EEPROM chip data in. */ |
| #define | EE_WRITE_0 0x01 |
| #define | EE_WRITE_1 0x05 |
| #define | EE_DATA_READ 0x08 /* EEPROM chip data out. */ |
| #define | EE_ENB (0x4800 | EE_CS) |
| #define | eeprom_delay() |
| #define | BUFLEN 1536 |
| #define | DESC_RING_WRAP 0x02000000 |
| #define | TX_RING_SIZE 2 |
| #define | RX_RING_SIZE 4 |
| #define | tulip_bss NIC_FAKE_BSS ( struct tulip_bss ) |
| #define | tx_ring tulip_bss.tx_ring |
| #define | txb tulip_bss.txb |
| #define | rx_ring tulip_bss.rx_ring |
| #define | rxb tulip_bss.rxb |
| #define | mdio_delay() |
| #define | MDIO_SHIFT_CLK 0x10000 |
| #define | MDIO_DATA_WRITE0 0x00000 |
| #define | MDIO_DATA_WRITE1 0x20000 |
| #define | MDIO_ENB 0x00000 /* Ignore the 0x02000 databook setting. */ |
| #define | MDIO_ENB_IN 0x40000 |
| #define | MDIO_DATA_READ 0x80000 |
Functions | |
| FILE_LICENCE (GPL_ANY) | |
| static int | mdio_read (struct nic *nic, int phy_id, int location) |
| static void | mdio_write (struct nic *nic, int phy_id, int location, int value) |
| static int | read_eeprom (unsigned long ioaddr, int location, int addr_len) |
| static void | parse_eeprom (struct nic *nic) |
| static int | tulip_probe (struct nic *nic, struct pci_device *pci) |
| static void | tulip_init_ring (struct nic *nic) |
| static void | tulip_reset (struct nic *nic) |
| static void | tulip_transmit (struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p) |
| static int | tulip_poll (struct nic *nic, int retrieve) |
| static void | tulip_disable (struct nic *nic, void *hwdev) |
| static void | nway_start (struct nic *nic) |
| static void | pnic_do_nway (struct nic *nic) |
| static void | select_media (struct nic *nic, int startup) |
| static void | init_media (struct nic *nic) |
| static void | start_link (struct nic *nic) |
| static int | tulip_check_duplex (struct nic *nic) |
| static void | tulip_wait (unsigned int nticks) |
| static void | whereami (const char *str) |
| int | mdio_read (struct nic *nic __unused, int phy_id, int location) |
| void | mdio_write (struct nic *nic __unused, int phy_id, int location, int value) |
| static void | tulip_init_ring (struct nic *nic __unused) |
| static void | set_rx_mode (struct nic *nic __unused) |
| static void | tulip_disable (struct nic *nic, void *hwdev __unused) |
| static void | tulip_irq (struct nic *nic __unused, irq_action_t action __unused) |
| static void | nway_start (struct nic *nic __unused) |
| static void | pnic_do_nway (struct nic *nic __unused) |
| PCI_DRIVER (tulip_driver, tulip_nics, PCI_NO_CLASS) | |
| DRIVER ("Tulip", nic_driver, pci_driver, tulip_driver, tulip_probe, tulip_disable, tulip_bss) | |
Variables | |
| static const int | csr0 = 0x01A00000 | 0x8000 |
| static const char *const | medianame [32] |
| static const struct pci_id_info | pci_id_tbl [] |
| static struct tulip_chip_table | tulip_tbl [] |
| static const char | media_cap [32] |
| static u8 | t21040_csr13 [] = {2,0x0C,8,4, 4,0,0,0, 0,0,0,0, 4,0,0,0} |
| static u16 | t21041_csr13 [] = { 0xEF01, 0xEF09, 0xEF09, 0xEF01, 0xEF09, } |
| static u16 | t21041_csr14 [] = { 0xFFFF, 0xF7FD, 0xF7FD, 0x7F3F, 0x7F3D, } |
| static u16 | t21041_csr15 [] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, } |
| static u16 | t21142_csr14 [] = { 0xFFFF, 0x0705, 0x0705, 0x0000, 0x7F3D, } |
| static u32 | ioaddr |
| static struct tulip_private * | tp |
| static struct fixups | eeprom_fixups [] |
| static const char * | block_name [] |
| static struct nic_operations | tulip_operations |
| static struct pci_device_id | tulip_nics [] |
| #define TX_TIME_OUT 2*TICKS_PER_SEC |
| #define get_unaligned | ( | ptr | ) |
Definition at line 123 of file tulip.c.
Referenced by parse_eeprom(), and tulip_reset().
| #define put_unaligned | ( | val, | |
| ptr ) |
Definition at line 124 of file tulip.c.
Referenced by tulip_probe().
| #define get_u16 | ( | ptr | ) |
Definition at line 125 of file tulip.c.
Referenced by parse_eeprom(), and select_media().
| #define virt_to_le32desc | ( | addr | ) |
Definition at line 126 of file tulip.c.
Referenced by tulip_init_ring(), tulip_reset(), and tulip_transmit().
| #define TULIP_IOTYPE PCI_USES_MASTER | PCI_USES_IO | PCI_ADDR0 |
| #define FULL_DUPLEX_MAGIC 0x6969 |
Definition at line 135 of file tulip.c.
Referenced by select_media().
| #define MEDIA_MASK 31 |
Definition at line 140 of file tulip.c.
Referenced by parse_eeprom().
| #define EEPROM_SIZE 128 /* 2 << EEPROM_ADDRLEN */ |
| #define eeprom_delay | ( | ) |
| #define DESC_RING_WRAP 0x02000000 |
Definition at line 374 of file tulip.c.
Referenced by tulip_init_ring().
| #define tulip_bss NIC_FAKE_BSS ( struct tulip_bss ) |
Definition at line 436 of file tulip.c.
Referenced by DRIVER(), and tulip_probe().
| #define mdio_delay | ( | ) |
Definition at line 539 of file tulip.c.
Referenced by mdio_read(), and mdio_write().
| #define MDIO_SHIFT_CLK 0x10000 |
Definition at line 544 of file tulip.c.
Referenced by mdio_read(), and mdio_write().
| #define MDIO_DATA_WRITE1 0x20000 |
Definition at line 546 of file tulip.c.
Referenced by mdio_read(), and mdio_write().
| #define MDIO_ENB 0x00000 /* Ignore the 0x02000 databook setting. */ |
Definition at line 547 of file tulip.c.
Referenced by mdio_read(), and mdio_write().
| #define MDIO_ENB_IN 0x40000 |
Definition at line 548 of file tulip.c.
Referenced by mdio_read(), and mdio_write().
| #define MDIO_DATA_READ 0x80000 |
Definition at line 549 of file tulip.c.
Referenced by mdio_read().
| enum tulip_chips |
| enum pci_id_flags_bits |
| Enumerator | |
|---|---|
| PCI_USES_IO | |
| PCI_USES_MEM | |
| PCI_USES_MASTER | |
| PCI_ADDR0 | |
| PCI_ADDR1 | |
| PCI_ADDR2 | |
| PCI_ADDR3 | |
| PCI_ADDR_64BITS | |
| PCI_NO_ACPI_WAKE | |
| PCI_NO_MIN_LATENCY | |
| PCI_UNUSED_IRQ | |
Definition at line 156 of file tulip.c.
| enum tbl_flag |
| enum MediaIs |
| Enumerator | |
|---|---|
| MediaIsFD | |
| MediaAlwaysFD | |
| MediaIsMII | |
| MediaIsFx | |
| MediaIs100 | |
Definition at line 271 of file tulip.c.
| enum tulip_offsets |
| enum status_bits |
| enum csr6_mode_bits |
| enum desc_status_bits |
| FILE_LICENCE | ( | GPL_ANY | ) |
|
static |
Referenced by start_link(), and tulip_check_duplex().
|
static |
Referenced by select_media(), and start_link().
|
static |
Definition at line 677 of file tulip.c.
References CSR9, EE_CS, EE_DATA_READ, EE_DATA_WRITE, EE_ENB, EE_READ_CMD, EE_SHIFT_CLK, eeprom_delay, inl, ioaddr, outl, read_cmd, retval, and whereami().
Referenced by tulip_probe().
|
static |
Definition at line 716 of file tulip.c.
References block_name, bp, count, CSR12_IN_SROM, mediatable::csr12dir, mediatable::csr15dir, mediatable::csr15val, DBG, DBG2, DC21041, mediatable::defaultmedia, ee_data, eeprom_fixups, get_u16, get_unaligned, mediatable::has_mii, mediatable::has_nonmii, mediatable::has_reset, mediatable::leafcount, medialeaf::leafdata, media, medialeaf::media, MEDIA_MASK, medianame, memcpy(), mediatable::mleaf, name, nic::node_addr, NULL, tp, medialeaf::type, u16, u32, and whereami().
Referenced by tulip_probe().
|
static |
Definition at line 1174 of file tulip.c.
References adjust_pci_device(), chip_idx, COMET, csr0, CSR5, CSR6, CSR7, CSR8, CSR9, DBG, DBG2, DC21040, DC21041, DC21143, pci_device::device, ee_data, EEPROM_SIZE, ETH_ALEN, eth_ntoa(), HAS_8023X, HAS_MEDIA_TABLE, HAS_PWRDWN, pci_device::id, inl, ioaddr, nic::ioaddr, pci_device::ioaddr, nic::irqno, IS_ASIX, LC82C168, le16_to_cpu, media_cap, MediaIsMII, memcpy(), name, pci_device_id::name, nic::nic_op, nic::node_addr, outl, parse_eeprom(), pci_id_tbl, pci_read_config_byte(), PCI_REVISION, pci_write_config_dword(), put_unaligned, read_eeprom(), start_link(), TICKS_PER_SEC, tmp, tp, tulip_bss, tulip_operations, tulip_reset(), tulip_tbl, tulip_wait(), u16, u32, u8, value, pci_device::vendor, and whereami().
Referenced by DRIVER().
|
static |
Referenced by tulip_reset().
|
static |
Definition at line 924 of file tulip.c.
References COMET, cpu_to_le32, CSR0, CSR1, CSR13, CSR14, CSR3, CSR4, CSR6, currticks(), DBG, get_unaligned, init_media(), inl, ioaddr, IS_ASIX, LC82C168, MC_HASH_ONLY, nic::node_addr, outl, PNIC2, rx_ring, set_rx_mode(), status, tp, tulip_check_duplex(), tulip_init_ring(), tulip_wait(), tx_ring, TX_TIME_OUT, txb, u16, u32, virt_to_le32desc, and whereami().
Referenced by tulip_disable(), and tulip_probe().
|
static |
Definition at line 1041 of file tulip.c.
References cpu_to_le32, CSR1, CSR4, CSR6, currticks(), DBG, DBG2, ETH_ALEN, ETH_HLEN, ETH_ZLEN, htons, inl, ioaddr, memcpy(), nic::node_addr, outl, status, tp, tx_ring, TX_TIME_OUT, txb, u16, u32, u8, virt_to_le32desc, and whereami().
|
static |
Definition at line 1096 of file tulip.c.
References BUFLEN, memcpy(), nic::packet, nic::packetlen, rx_ring, RX_RING_SIZE, rxb, tp, and whereami().
|
static |
Referenced by init_media(), and start_link().
|
static |
References startup().
Referenced by init_media().
|
static |
Definition at line 1673 of file tulip.c.
References CSR11, CSR12, mediatable::csr12dir, CSR13, CSR14, CSR15, DBG, DBG2, DC21040, DC21041, FULL_DUPLEX_MAGIC, get_u16, mediatable::has_reset, inl, ioaddr, LC82C168, medialeaf::leafdata, mdio_write(), media_cap, MediaAlwaysFD, MediaIsFx, MediaIsMII, medianame, mediatable::mleaf, outl, port, startup(), t21040_csr13, t21041_csr13, t21041_csr14, t21041_csr15, t21142_csr14, tp, medialeaf::type, u16, u32, u8, and whereami().
Referenced by init_media(), and start_link().
|
static |
Definition at line 1526 of file tulip.c.
References AX88140, AX88141, COMET, COMPEX9881, CSR12, CSR13, CSR14, CSR15, CSR5, CSR6, DBG, DBG2, DC21041, DC21142, DC21143, inl, inw, ioaddr, LC82C168, mdio_read(), media_cap, MediaAlwaysFD, MediaIsMII, medianame, MX98713, MX98715, MX98725, NULL, nway_start(), outl, PNIC2, pnic_do_nway(), select_media(), tp, TPLnkPass, and whereami().
Referenced by tulip_reset().
|
static |
Definition at line 1378 of file tulip.c.
References ALWAYS_CHECK_MII, COMET, COMPEX9881, CSR12, CSR13, CSR14, CSR15, CSR6, DBG, DC21040, DC21041, DC21140, DC21142, HAS_MII, inl, ioaddr, LC82C168, mdio_read(), mdio_write(), media_cap, MediaIs100, MediaIsMII, MX98713, MX98715, MX98725, nway_start(), outl, PNIC2, select_media(), tp, and whereami().
Referenced by tulip_probe().
|
static |
Definition at line 1875 of file tulip.c.
References DBG, DBG2, mdio_read(), and tp.
Referenced by tulip_reset().
|
static |
Definition at line 519 of file tulip.c.
References currticks().
Referenced by tulip_probe(), and tulip_reset().
|
static |
Definition at line 513 of file tulip.c.
References DBGP.
Referenced by init_media(), mdio_read(), mdio_write(), nway_start(), parse_eeprom(), pnic_do_nway(), read_eeprom(), select_media(), start_link(), tulip_disable(), tulip_init_ring(), tulip_poll(), tulip_probe(), tulip_reset(), and tulip_transmit().
Definition at line 556 of file tulip.c.
References __unused, COMET, CSR9, inl, ioaddr, LC82C168, MDIO_DATA_READ, MDIO_DATA_WRITE1, mdio_delay, MDIO_ENB, MDIO_ENB_IN, MDIO_SHIFT_CLK, outl, read_cmd, retval, tp, and whereami().
Definition at line 615 of file tulip.c.
References __unused, cmd, COMET, CSR9, inl, ioaddr, LC82C168, MDIO_DATA_WRITE1, mdio_delay, MDIO_ENB, MDIO_ENB_IN, MDIO_SHIFT_CLK, outl, tp, value, and whereami().
Definition at line 870 of file tulip.c.
References __unused, BUFLEN, cpu_to_le32, DESC_RING_WRAP, rx_ring, RX_RING_SIZE, rxb, tp, tx_ring, txb, virt_to_le32desc, and whereami().
|
static |
|
static |
Definition at line 1495 of file tulip.c.
References __unused, CSR12, CSR13, CSR14, CSR15, CSR6, DBG2, DC21041, ioaddr, outl, outw, PNIC2, tp, and whereami().
Definition at line 1641 of file tulip.c.
References __unused, CSR12, CSR6, DBG2, inl, ioaddr, medianame, outl, tp, u32, and whereami().
| PCI_DRIVER | ( | tulip_driver | , |
| tulip_nics | , | ||
| PCI_NO_CLASS | ) |
References tulip_nics.
| DRIVER | ( | "Tulip" | , |
| nic_driver | , | ||
| pci_driver | , | ||
| tulip_driver | , | ||
| tulip_probe | , | ||
| tulip_disable | , | ||
| tulip_bss | ) |
References tulip_bss, tulip_disable(), and tulip_probe().
|
static |
Definition at line 137 of file tulip.c.
Referenced by tulip_probe().
|
static |
Definition at line 141 of file tulip.c.
Referenced by init_media(), parse_eeprom(), pnic_do_nway(), and select_media().
|
static |
Definition at line 176 of file tulip.c.
Referenced by tulip_probe().
|
static |
Referenced by tulip_probe().
|
static |
Definition at line 275 of file tulip.c.
Referenced by init_media(), select_media(), start_link(), and tulip_probe().
|
static |
Definition at line 277 of file tulip.c.
Referenced by select_media().
|
static |
Definition at line 280 of file tulip.c.
Referenced by select_media().
|
static |
Definition at line 281 of file tulip.c.
Referenced by select_media().
|
static |
Definition at line 282 of file tulip.c.
Referenced by select_media().
|
static |
Definition at line 287 of file tulip.c.
Referenced by select_media().
|
static |
Definition at line 442 of file tulip.c.
Referenced by __mdio_read(), __mdio_write(), __tg3_set_coalesce(), __tg3_set_mac_addr(), __tg3_set_rx_mode(), _tw32_flush(), fiber_autoneg(), init_media(), mdio_read(), mdio_write(), nway_start(), parse_eeprom(), pnic_do_nway(), select_media(), set_rx_mode(), sis190_default_phy(), sis190_down(), sis190_free(), sis190_get_mac_addr_from_apc(), sis190_get_mac_addr_from_eeprom(), sis190_hw_start(), sis190_init_board(), sis190_init_phy(), sis190_init_ring(), sis190_init_ring_indexes(), sis190_init_rxfilter(), sis190_irq(), sis190_mii_probe(), sis190_mii_probe_88e1111_fixup(), sis190_mii_remove(), sis190_open(), sis190_phy_task(), sis190_phy_task(), sis190_poll(), sis190_probe(), sis190_process_rx(), sis190_process_tx(), sis190_remove(), sis190_rx_fill(), sis190_set_rgmii(), sis190_set_rx_mode(), sis190_set_speed_auto(), sis190_transmit(), sky2_ramset(), start_link(), tg3_5700_link_polarity(), tg3_abort_hw(), tg3_adv_1000T_flowctrl_ok(), tg3_alloc_consistent(), tg3_aux_stat_to_speed_duplex(), tg3_bmcr_reset(), tg3_chip_reset(), tg3_clear_mac_status(), tg3_close(), tg3_copper_is_advertising_all(), tg3_disable_ints(), tg3_disable_nvram_access(), tg3_do_test_dma(), tg3_enable_ints(), tg3_enable_nvram_access(), tg3_fiber_aneg_smachine(), tg3_free_consistent(), tg3_generate_fw_event(), tg3_get_device_address(), tg3_get_eeprom_hw_cfg(), tg3_get_invariants(), tg3_halt(), tg3_init_5401phy_dsp(), tg3_init_bcm8002(), tg3_init_bufmgr_config(), tg3_init_hw(), tg3_init_one(), tg3_init_rings(), tg3_irq(), tg3_issue_otp_command(), tg3_link_report(), tg3_lookup_by_subsys(), tg3_mdio_init(), tg3_nvram_exec_cmd(), tg3_nvram_lock(), tg3_nvram_phys_addr(), tg3_nvram_read(), tg3_nvram_read_be32(), tg3_nvram_read_using_eeprom(), tg3_nvram_unlock(), tg3_open(), tg3_phy_apply_otp(), tg3_phy_autoneg_cfg(), tg3_phy_auxctl_read(), tg3_phy_auxctl_write(), tg3_phy_copper_begin(), tg3_phy_init_link_config(), tg3_phy_probe(), tg3_phy_reset(), tg3_phy_reset_5703_4_5(), tg3_phy_reset_chanpat(), tg3_phy_set_wirespeed(), tg3_phy_toggle_automdix(), tg3_phy_write_and_check_testpat(), tg3_phydsp_write(), tg3_poll(), tg3_poll_fw(), tg3_poll_link(), tg3_read32_mbox_5906(), tg3_read_indirect_mbox(), tg3_read_indirect_reg32(), tg3_read_mem(), tg3_read_otp_phycfg(), tg3_readphy(), tg3_refill_prod_ring(), tg3_reset_hw(), tg3_restore_pci_state(), tg3_rings_reset(), tg3_rx_complete(), tg3_rx_prodring_alloc(), tg3_rx_prodring_fini(), tg3_save_pci_state(), tg3_set_bdinfo(), tg3_set_power_state_0(), tg3_set_txd(), tg3_setup_copper_phy(), tg3_setup_fiber_by_hand(), tg3_setup_fiber_hw_autoneg(), tg3_setup_fiber_mii_phy(), tg3_setup_fiber_phy(), tg3_setup_flow_control(), tg3_setup_phy(), tg3_setup_rxbd_thresholds(), tg3_stop_block(), tg3_stop_fw(), tg3_switch_clocks(), tg3_test_and_report_link_chg(), tg3_test_dma(), tg3_transmit(), tg3_tx_avail(), tg3_tx_complete(), tg3_ump_link_report(), tg3_wait_for_event_ack(), tg3_wait_macro_done(), tg3_write32_mbox_5906(), tg3_write_indirect_mbox(), tg3_write_indirect_reg32(), tg3_write_mem(), tg3_write_sig_pre_reset(), tg3_writephy(), tulip_check_duplex(), tulip_init_ring(), tulip_poll(), tulip_probe(), tulip_reset(), tulip_transmit(), and tw32_mailbox_flush().
|
static |
Referenced by parse_eeprom().
|
static |
Definition at line 481 of file tulip.c.
Referenced by parse_eeprom().
|
static |
Definition at line 1163 of file tulip.c.
Referenced by tulip_probe().
|
static |
Definition at line 1920 of file tulip.c.
Referenced by PCI_DRIVER().