119 #define TX_TIME_OUT 2*TICKS_PER_SEC 123 #define get_unaligned(ptr) (*(ptr)) 124 #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) )) 125 #define get_u16(ptr) (*(u16 *)(ptr)) 126 #define virt_to_le32desc(addr) virt_to_bus(addr) 128 #define TULIP_IOTYPE PCI_USES_MASTER | PCI_USES_IO | PCI_ADDR0 129 #define TULIP_SIZE 0x80 135 #define FULL_DUPLEX_MAGIC 0x6969 137 static const int csr0 = 0x01A00000 | 0x8000;
140 #define MEDIA_MASK 31 142 "10baseT",
"10base2",
"AUI",
"100baseTx",
143 "10baseT-FDX",
"100baseTx-FDX",
"100baseT4",
"100baseFx",
144 "100baseFx-FDX",
"MII 10baseT",
"MII 10baseT-FDX",
"MII",
145 "10baseT(forced)",
"MII 100baseTx",
"MII 100baseTx-FDX",
"MII 100baseT4",
146 "MII 100baseFx-HDX",
"MII 100baseFx-FDX",
"Home-PNA 1Mbps",
"Invalid-19",
177 {
"Digital DC21040 Tulip", { 0x00021011, 0xffffffff, 0, 0, 0, 0 },
179 {
"Digital DC21041 Tulip", { 0x00141011, 0xffffffff, 0, 0, 0, 0 },
181 {
"Digital DS21140A Tulip", { 0x00091011, 0xffffffff, 0,0, 0x20,0xf0 },
183 {
"Digital DS21140 Tulip", { 0x00091011, 0xffffffff, 0, 0, 0, 0 },
185 {
"Digital DS21143 Tulip", { 0x00191011, 0xffffffff, 0,0, 65,0xff },
187 {
"Digital DS21142 Tulip", { 0x00191011, 0xffffffff, 0, 0, 0, 0 },
189 {
"Kingston KNE110tx (PNIC)", { 0x000211AD, 0xffffffff, 0xf0022646, 0xffffffff, 0, 0 },
191 {
"Lite-On 82c168 PNIC", { 0x000211AD, 0xffffffff, 0, 0, 0, 0 },
193 {
"Macronix 98713 PMAC", { 0x051210d9, 0xffffffff, 0, 0, 0, 0 },
195 {
"Macronix 98715 PMAC", { 0x053110d9, 0xffffffff, 0, 0, 0, 0 },
197 {
"Macronix 98725 PMAC", { 0x053110d9, 0xffffffff, 0, 0, 0, 0 },
199 {
"ASIX AX88141", { 0x1400125B, 0xffffffff, 0,0, 0x10, 0xf0 },
201 {
"ASIX AX88140", { 0x1400125B, 0xffffffff, 0, 0, 0, 0 },
203 {
"Lite-On LC82C115 PNIC-II", { 0xc11511AD, 0xffffffff, 0, 0, 0, 0 },
205 {
"ADMtek AN981 Comet", { 0x09811317, 0xffffffff, 0, 0, 0, 0 },
207 {
"ADMTek AN983 Comet", { 0x12161113, 0xffffffff, 0, 0, 0, 0 },
209 {
"ADMTek Comet AN983b", { 0x95111317, 0xffffffff, 0, 0, 0, 0 },
211 {
"ADMtek Centaur-P", { 0x09851317, 0xffffffff, 0, 0, 0, 0 },
213 {
"ADMtek Centaur-C", { 0x19851317, 0xffffffff, 0, 0, 0, 0 },
215 {
"Compex RL100-TX", { 0x988111F6, 0xffffffff, 0, 0, 0, 0 },
217 {
"Intel 21145 Tulip", { 0x00398086, 0xffffffff, 0, 0, 0, 0 },
219 {
"Xircom Tulip clone", { 0x0003115d, 0xffffffff, 0, 0, 0, 0 },
221 {
"Davicom DM9102", { 0x91021282, 0xffffffff, 0, 0, 0, 0 },
223 {
"Davicom DM9100", { 0x91001282, 0xffffffff, 0, 0, 0, 0 },
225 {
"Macronix mxic-98715 (EN1217)", { 0x12171113, 0xffffffff, 0, 0, 0, 0 },
227 {
"3Com 3cSOHO100B-TX (ADMtek Centuar)", { 0x930010b7, 0xffffffff, 0, 0, 0, 0 },
229 {
"SG Thomson STE10/100A", { 0x2774104a, 0xffffffff, 0, 0, 0, 0 },
231 {
NULL, { 0, 0, 0, 0, 0, 0 }, 0, 0, 0 },
246 {
"Digital DC21040 Tulip", 0},
276 {0,0,0,16, 3,19,16,24, 27,4,7,5, 0,20,23,20, 20,31,0,0, };
277 static u8 t21040_csr13[] = {2,0x0C,8,4, 4,0,0,0, 0,0,0,0, 4,0,0,0};
342 #define EEPROM_ADDRLEN 6 343 #define EEPROM_SIZE 128 346 #define EE_WRITE_CMD (5 << addr_len) 347 #define EE_READ_CMD (6 << addr_len) 348 #define EE_ERASE_CMD (7 << addr_len) 351 #define EE_SHIFT_CLK 0x02 353 #define EE_DATA_WRITE 0x04 354 #define EE_WRITE_0 0x01 355 #define EE_WRITE_1 0x05 356 #define EE_DATA_READ 0x08 357 #define EE_ENB (0x4800 | EE_CS) 362 #define eeprom_delay() inl(ee_addr) 374 #define DESC_RING_WRAP 0x02000000 427 #define TX_RING_SIZE 2 428 #define RX_RING_SIZE 4 436 #define tulip_bss NIC_FAKE_BSS ( struct tulip_bss ) 437 #define tx_ring tulip_bss.tx_ring 438 #define txb tulip_bss.txb 439 #define rx_ring tulip_bss.rx_ring 440 #define rxb tulip_bss.rxb 452 {
"Asante", 0, 0, 0x94, {0x1e00, 0x0000, 0x0800, 0x0100, 0x018c,
453 0x0000, 0x0000, 0xe078, 0x0001, 0x0050, 0x0018 }},
454 {
"SMC9332DST", 0, 0, 0xC0, { 0x1e00, 0x0000, 0x0800, 0x041f,
459 {
"Cogent EM100", 0, 0, 0x92, { 0x1e00, 0x0000, 0x0800, 0x063f,
466 {
"Maxtech NX-110", 0, 0, 0xE8, { 0x1e00, 0x0000, 0x0800, 0x0513,
472 {
"Accton EN1207", 0, 0, 0xE8, { 0x1e00, 0x0000, 0x0800, 0x051F,
479 {
NULL, 0, 0, 0, {}}};
481 static const char *
block_name[] = {
"21140 non-MII",
"21140 MII PHY",
482 "21142 Serial PHY",
"21142 MII PHY",
"21143 SYM PHY",
"21143 reset method"};
496 unsigned int s,
const char *p);
539 #define mdio_delay() inl(mdio_addr) 544 #define MDIO_SHIFT_CLK 0x10000 545 #define MDIO_DATA_WRITE0 0x00000 546 #define MDIO_DATA_WRITE1 0x20000 547 #define MDIO_ENB 0x00000 548 #define MDIO_ENB_IN 0x40000 549 #define MDIO_DATA_READ 0x80000 559 int read_cmd = (0xf6 << 10) | (phy_id << 5) | location;
567 outl(0x60020000 + (phy_id<<23) + (location<<18),
ioaddr + 0xA0);
579 return inl(
ioaddr + 0xB4 + (location<<2));
580 else if (location == 17)
582 else if (location >= 29 && location <= 31)
583 return inl(
ioaddr + 0xD4 + ((location-29)<<2));
589 for (i = 32; i >= 0; i--) {
596 for (i = 15; i >= 0; i--) {
605 for (i = 19; i > 0; i--) {
612 return (
retval>>1) & 0xffff;
618 int cmd = (0x5002 << 16) | (phy_id << 23) | (location<<18) |
value;
627 if ( ! (
inl(
ioaddr + 0xA0) & 0x80000000))
638 else if (location == 17)
640 else if (location >= 29 && location <= 31)
646 for (i = 32; i >= 0; i--) {
653 for (i = 31; i >= 0; i--) {
661 for (i = 2; i > 0; i--) {
680 unsigned short retval = 0;
690 for (i = 4 + addr_len; i >= 0; i--) {
699 for (i = 16; i > 0; i--) {
719 int new_advertise = 0;
727 for (i = 0; i < 8; i ++)
740 DBG(
"%s: Old format EEPROM on '%s' board.\n%s: Using substitute media control info.\n",
746 DBG(
"%s: Old style EEPROM with no media selection information.\n",
753 DBG(
"%s: Multiport cards (%d ports) may not work correctly.\n",
760 DBG2(
"%s: No Valid Media Table. ee_data[27] = %hhX\n",
767 DBG(
"%s: 21041 Media table, default media %hX (%s).\n",
770 for (i = 0; i <
count; i++) {
771 unsigned char media_block = *p++;
773 if (media_block & 0x40)
776 case 0: new_advertise |= 0x0020;
break;
777 case 4: new_advertise |= 0x0040;
break;
779 DBG(
"%s: 21041 media #%d, %s.\n",
783 unsigned char csr12dir = 0;
804 for (i = 0; i <
count; i++) {
807 if ((p[0] & 0x80) == 0) {
809 leaf->
media = p[0] & 0x3f;
811 if ((p[2] & 0x61) == 0x01)
815 switch(leaf->
type = p[1]) {
818 leaf->
media = p[2] & 0x0f;
825 if ((p[2] & 0x3f) == 0) {
826 u32 base15 = (p[2] & 0x40) ?
get_u16(p + 7) : 0x0008;
827 u16 *p1 = (
u16 *)(p + (p[2] & 0x40 ? 9 : 3));
835 switch (leaf->
media) {
836 case 0: new_advertise |= 0x0020;
break;
837 case 4: new_advertise |= 0x0040;
break;
838 case 3: new_advertise |= 0x0080;
break;
839 case 5: new_advertise |= 0x0100;
break;
840 case 6: new_advertise |= 0x0200;
break;
847 p += (p[0] & 0x3f) + 1;
849 if (leaf->
media == 11) {
851 DBG2(
"%s: MII interface PHY %d, setup/reset sequences %d/%d long, capabilities %hhX %hhX.\n",
855 DBG(
"%s: Index #%d - Media %s (#%d) described " 856 "by a %s (%d) block.\n",
891 tx_ring[0].status = 0x00000000;
897 tx_ring[1].status = 0x00000000;
958 outl(addr_high + (addr_high<<16),
ioaddr + 0xB8);
985 u32 tx_flags = 0x08000000 | 192;
989 for (i=0; i<192; i++)
1042 unsigned int s,
const char *p)
1086 DBG (
"TX Timeout!\n");
1105 if ( ! retrieve )
return 1;
1181 static unsigned char last_phys_addr[
ETH_ALEN] = {0x00,
'L',
'i',
'n',
'u',
'x'};
1214 DBG2 (
"%s: Looking for Tulip Chip: Vendor=%hX Device=%hX\n",
tp->
nic_name,
1231 DBG (
"%s: Unknown Tulip Chip: Vendor=%hX Device=%hX\n",
tp->
nic_name,
1250 DBG(
"%s: The Tulip chip at %X is not functioning.\n",
1262 DBG(
" 21040 compatible mode.");
1273 int value, boguscnt = 100000;
1276 while (value < 0 && --boguscnt > 0);
1278 sum +=
value & 0xff;
1281 for (i = 0; i < 3; i++) {
1282 int value, boguscnt = 100000;
1286 while (value < 0 && --boguscnt > 0);
1288 sum +=
value & 0xffff;
1301 for (i = 0; i <
sizeof(
ee_data)/2; i++)
1308 for (i = 0; i < 8; i ++)
1316 sum +=
ee_data[i + sa_offset];
1328 if (sum == 0 || sum ==
ETH_ALEN*0xff) {
1353 static const u16 media2advert[] = { 0x20, 0x40, 0x03e0, 0x60,
1354 0x80, 0x100, 0x200 };
1387 unsigned int phy, phy_idx;
1400 for (phy = 0, phy_idx = 0; phy < 32 && phy_idx <
sizeof(
tp->
phys);
1403 if ((mii_status & 0x8301) == 0x8001 ||
1404 ((mii_status & 0x8000) == 0 && (mii_status & 0x7800) != 0)) {
1416 tp->
phys[phy_idx++] = phy;
1417 DBG(
"%s: MII transceiver %d config %hX status %hX advertising %hX.\n",
1418 tp->
nic_name, phy, mii_reg0, mii_status, mii_advert);
1420 if (mii_advert != to_advert) {
1421 DBG(
"%s: Advertising %hX on PHY %d previously advertising %hX.\n",
1433 DBG(
"%s: ***WARNING***: No MII transceiver found!\n",
1509 DBG2(
"%s: Restarting internal NWay autonegotiation, %X.\n",
1545 DBG(
"%s: Using user-specified media %s.\n",
1554 DBG(
"%s: Using EEPROM-set media %s.\n",
1587 DBG2(
"%s: Using MII transceiver %d, status %hX.\n",
1648 if (phy_reg & 0x78000000) {
1649 if (phy_reg & 0x20000000)
tp->
if_port = 5;
1650 else if (phy_reg & 0x40000000)
tp->
if_port = 3;
1651 else if (phy_reg & 0x10000000)
tp->
if_port = 4;
1652 else if (phy_reg & 0x08000000)
tp->
if_port = 0;
1654 new_csr6 = (
tp->
if_port & 1) ? 0x01860000 : 0x00420000;
1658 if (phy_reg & 0x30000000) {
1660 new_csr6 |= 0x00000200;
1662 DBG2(
"%s: PNIC autonegotiated status %X, %s.\n",
1664 if (
tp->
csr6 != new_csr6) {
1683 unsigned char *p = mleaf->
leafdata;
1684 switch (mleaf->
type) {
1686 DBG2(
"%s: Using a 21140 non-MII transceiver" 1687 " with control setting %hhX.\n",
1693 new_csr6 = 0x02000000 | ((p[2] & 0x71) << 18);
1697 u32 csr13val, csr14val, csr15dir, csr15val;
1698 for (i = 0; i < 5; i++)
1699 setup[i] =
get_u16(&p[i*2 + 1]);
1707 unsigned char *rst = rleaf->
leafdata;
1708 DBG2(
"%s: Resetting the transceiver.\n",
1710 for (i = 0; i < rst[0]; i++)
1713 DBG2(
"%s: 21143 non-MII %s transceiver control %hX/%hX.\n",
1716 csr13val = setup[0];
1717 csr14val = setup[1];
1718 csr15dir = (setup[3]<<16) | setup[2];
1719 csr15val = (setup[4]<<16) | setup[2];
1727 csr14val = 0x0003FF7F;
1728 csr15dir = (setup[0]<<16) | 0x0008;
1729 csr15val = (setup[1]<<16) | 0x0008;
1740 DBG2(
"%s: Setting CSR15 to %X/%X.\n",
1742 if (mleaf->
type == 4)
1743 new_csr6 = 0x82020000 | ((setup[2] & 0x71) << 18);
1745 new_csr6 = 0x82420000;
1750 int init_length = p[1];
1754 new_csr6 = 0x020E0000;
1755 if (mleaf->
type == 3) {
1756 u16 *init_sequence = (
u16*)(p+2);
1757 u16 *reset_sequence = &((
u16*)(p+3))[init_length];
1758 int reset_length = p[2 + init_length*2];
1759 misc_info = reset_sequence + reset_length;
1761 for (i = 0; i < reset_length; i++)
1763 for (i = 0; i < init_length; i++)
1766 u8 *init_sequence = p + 2;
1767 u8 *reset_sequence = p + 3 + init_length;
1768 int reset_length = p[2 + init_length];
1769 misc_info = (
u16*)(reset_sequence + reset_length);
1772 for (i = 0; i < reset_length; i++)
1775 for (i = 0; i < init_length; i++)
1782 DBG2(
"%s: Advertising %hX on MII %d.\n",
1789 DBG(
"%s: Invalid media table selection %d.\n",
1791 new_csr6 = 0x020E0000;
1793 DBG2(
"%s: Using media type %s, CSR12 is %hhX.\n",
1798 DBG2(
"%s: 21041 using media %s, CSR12 is %hX.\n",
1805 new_csr6 = 0x80020000;
1809 DBG2(
"%s: PNIC PHY status is %hX, media %s.\n",
1812 new_csr6 = 0x810C0000;
1818 new_csr6 = 0x00420000;
1823 new_csr6 = 0x01860000;
1828 new_csr6 = 0x00420000;
1834 DBG2(
"%s: 21040 media type is %s, CSR12 is %hhX.\n",
1854 new_csr6 = 0x020E0000;
1856 new_csr6 = 0x028600000;
1858 new_csr6 = 0x038600000;
1859 DBG2(
"%s: No media description table, assuming " 1860 "%s transceiver, CSR12 %hhX.\n",
1877 unsigned int bmsr, lpa, negotiated, new_csr6;
1882 DBG2(
"%s: MII status %#x, Link partner report %#x.\n",
1887 if ((bmsr & 4) == 0) {
1889 if ((new_bmsr & 4) == 0) {
1890 DBG2(
"%s: No link beat on the MII interface," 1901 if(negotiated & 0x380) new_csr6 &= ~0x400000;
1902 else new_csr6 |= 0x400000;
1904 else new_csr6 &= ~0x200;
1906 if (new_csr6 !=
tp->
csr6) {
1909 DBG(
"%s: Setting %s-duplex based on MII" 1910 "#%d link partner capability of %#x.\n",
1921 PCI_ROM(0x1011, 0x0002,
"dc21040",
"Digital Tulip", 0),
1922 PCI_ROM(0x1011, 0x0009,
"ds21140",
"Digital Tulip Fast", 0),
1923 PCI_ROM(0x1011, 0x0014,
"dc21041",
"Digital Tulip+", 0),
1924 PCI_ROM(0x1011, 0x0019,
"ds21142",
"Digital Tulip 21142", 0),
1925 PCI_ROM(0x104a, 0x0981,
"tulip-0981",
"Tulip 0x104a 0x0981", 0),
1926 PCI_ROM(0x104a, 0x2774,
"SGThomson-STE10100A",
"Tulip 0x104a 0x2774", 0),
1927 PCI_ROM(0x10b7, 0x9300,
"3csoho100b-tx",
"3ComSOHO100B-TX", 0),
1928 PCI_ROM(0x10b9, 0x5261,
"ali1563",
"ALi 1563 integrated ethernet", 0),
1929 PCI_ROM(0x10d9, 0x0512,
"mx98713",
"Macronix MX987x3", 0),
1930 PCI_ROM(0x10d9, 0x0531,
"mx98715",
"Macronix MX987x5", 0),
1931 PCI_ROM(0x1113, 0x1216,
"an983",
"ADMTek AN983 Comet", 0),
1932 PCI_ROM(0x1113, 0x1217,
"mxic-98715",
"Macronix MX987x5", 0),
1933 PCI_ROM(0x1113, 0x9511,
"tulip-9511",
"Tulip 0x1113 0x9511", 0),
1934 PCI_ROM(0x115d, 0x0003,
"xircomtulip",
"Xircom Tulip", 0),
1935 PCI_ROM(0x1186, 0x1561,
"tulip-1561",
"Tulip 0x1186 0x1561", 0),
1936 PCI_ROM(0x11ad, 0x0002,
"82c168",
"Netgear FA310TX", 0),
1937 PCI_ROM(0x11ad, 0xc115,
"lc82c115",
"LinkSys LNE100TX", 0),
1938 PCI_ROM(0x11f6, 0x9881,
"rl100tx",
"Compex RL100-TX", 0),
1939 PCI_ROM(0x1259, 0xa120,
"tulip-a120",
"Tulip 0x1259 0xa120", 0),
1940 PCI_ROM(0x125b, 0x1400,
"ax88140",
"ASIX AX88140", 0),
1941 PCI_ROM(0x1282, 0x9009,
"dm9009",
"Davicom 9009", 0),
1942 PCI_ROM(0x1282, 0x9100,
"dm9100",
"Davicom 9100", 0),
1943 PCI_ROM(0x1282, 0x9102,
"dm9102",
"Davicom 9102", 0),
1944 PCI_ROM(0x1282, 0x9132,
"dm9132",
"Davicom 9132", 0),
1945 PCI_ROM(0x1317, 0x0981,
"an981",
"ADMtek AN981 Comet", 0),
1946 PCI_ROM(0x1317, 0x0985,
"centaur-p",
"ADMtek Centaur-P", 0),
1947 PCI_ROM(0x1317, 0x1985,
"centaur-c",
"ADMTek Centaur-C", 0),
1948 PCI_ROM(0x1317, 0x9511,
"an983b",
"ADMTek Comet 983b", 0),
1949 PCI_ROM(0x13d1, 0xab02,
"tulip-ab02",
"Tulip 0x13d1 0xab02", 0),
1950 PCI_ROM(0x13d1, 0xab03,
"tulip-ab03",
"Tulip 0x13d1 0xab03", 0),
1951 PCI_ROM(0x13d1, 0xab08,
"tulip-ab08",
"Tulip 0x13d1 0xab08", 0),
1952 PCI_ROM(0x14f1, 0x1803,
"lanfinity",
"Conexant LANfinity", 0),
1953 PCI_ROM(0x1626, 0x8410,
"tulip-8410",
"Tulip 0x1626 0x8410", 0),
1954 PCI_ROM(0x1737, 0xab08,
"tulip-1737-ab08",
"Tulip 0x1737 0xab08", 0),
1955 PCI_ROM(0x1737, 0xab09,
"tulip-ab09",
"Tulip 0x1737 0xab09", 0),
1956 PCI_ROM(0x8086, 0x0039,
"intel21145",
"Intel Tulip", 0),
unsigned char txb[BUFLEN]
unsigned char rxb[RX_RING_SIZE *BUFLEN]
PCI_DRIVER(tulip_driver, tulip_nics, PCI_NO_CLASS)
#define TICKS_PER_SEC
Number of ticks per second.
uint16_t inw(volatile uint16_t *io_addr)
Read 16-bit word from I/O-mapped device.
unsigned char ehdr[ETH_HLEN]
#define outw(data, io_addr)
unsigned long ioaddr
I/O address.
static const char * block_name[]
static int mdio_read(struct nic *nic, int phy_id, int location)
static void tulip_irq(struct nic *nic __unused, irq_action_t action __unused)
static void select_media(struct nic *nic, int startup)
static void nway_start(struct nic *nic)
unsigned int default_port
static struct tulip_chip_table tulip_tbl[]
struct mediatable * mtable
static const char media_cap[32]
static u16 t21041_csr14[]
static unsigned char ee_data[EEPROM_SIZE]
DRIVER("Tulip", nic_driver, pci_driver, tulip_driver, tulip_probe, tulip_disable, tulip_bss)
static u16 t21041_csr15[]
void adjust_pci_device(struct pci_device *pci)
Enable PCI device.
static void tulip_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p)
static void whereami(const char *str)
int dummy_connect(struct nic *nic __unused)
#define FULL_DUPLEX_MAGIC
void * memcpy(void *dest, const void *src, size_t len) __nonnull
static u16 t21041_csr13[]
uint16_t device
Device ID.
pseudo_bit_t value[0x00020]
#define __unused
Declare a variable or data structure as unused.
unsigned char eeprom[EEPROM_SIZE]
static void tulip_wait(unsigned int nticks)
static int tulip_probe(struct nic *nic, struct pci_device *pci)
static int tulip_check_duplex(struct nic *nic)
static unsigned int count
Number of entries.
u8 media_table_storage[(sizeof(struct mediatable)+32 *sizeof(struct medialeaf))]
static struct tulip_private * tp
static void pnic_do_nway(struct nic *nic)
static struct pci_device_id tulip_nics[]
#define cpu_to_le32(value)
static const struct pci_id_info pci_id_tbl[]
static void mdio_write(struct nic *nic, int phy_id, int location, int value)
#define outl(data, io_addr)
const char * eth_ntoa(const void *ll_addr)
Transcribe Ethernet address.
#define put_unaligned(val, ptr)
unsigned int full_duplex_lock
static void tulip_reset(struct nic *nic)
A PCI device ID list entry.
#define le16_to_cpu(value)
uint16_t vendor
Vendor ID.
static const char *const medianame[32]
struct pci_id_info::match_info id
static struct fixups eeprom_fixups[]
unsigned char * node_addr
static int tulip_poll(struct nic *nic, int retrieve)
enum pci_id_flags_bits pci_flags
static void parse_eeprom(struct nic *nic)
struct tulip_tx_desc tx_ring[TX_RING_SIZE]
static struct nic_operations tulip_operations
#define virt_to_le32desc(addr)
uint32_t inl(volatile uint32_t *io_addr)
Read 32-bit dword from I/O-mapped device.
static int read_eeprom(unsigned long ioaddr, int location, int addr_len)
struct pci_device_id * id
Driver device ID.
int pci_write_config_dword(struct pci_device *pci, unsigned int where, uint32_t value)
Write 32-bit dword to PCI configuration space.
#define PCI_REVISION
PCI revision.
struct tulip_rx_desc rx_ring[RX_RING_SIZE]
static void set_rx_mode(struct nic *nic __unused)
static void start_link(struct nic *nic)
unsigned long currticks(void)
Get current system time in ticks.
#define DBG(...)
Print a debugging message.
struct nic_operations * nic_op
static void tulip_init_ring(struct nic *nic)
static u16 t21142_csr14[]
static struct command_descriptor read_cmd
"read" command descriptor
int(* connect)(struct nic *)
#define NULL
NULL pointer (VOID *)
#define get_unaligned(ptr)
#define PCI_ROM(_vendor, _device, _name, _description, _data)
void startup(void)
Start up iPXE.
static void tulip_disable(struct nic *nic, void *hwdev)
int pci_read_config_byte(struct pci_device *pci, unsigned int where, uint8_t *value)
Read byte from PCI configuration space.
static void init_media(struct nic *nic)