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 tx_ring tulip_bss.tx_ring 437 #define txb tulip_bss.txb 438 #define rx_ring tulip_bss.rx_ring 439 #define rxb tulip_bss.rxb 451 {
"Asante", 0, 0, 0x94, {0x1e00, 0x0000, 0x0800, 0x0100, 0x018c,
452 0x0000, 0x0000, 0xe078, 0x0001, 0x0050, 0x0018 }},
453 {
"SMC9332DST", 0, 0, 0xC0, { 0x1e00, 0x0000, 0x0800, 0x041f,
458 {
"Cogent EM100", 0, 0, 0x92, { 0x1e00, 0x0000, 0x0800, 0x063f,
465 {
"Maxtech NX-110", 0, 0, 0xE8, { 0x1e00, 0x0000, 0x0800, 0x0513,
471 {
"Accton EN1207", 0, 0, 0xE8, { 0x1e00, 0x0000, 0x0800, 0x051F,
478 {
NULL, 0, 0, 0, {}}};
480 static const char *
block_name[] = {
"21140 non-MII",
"21140 MII PHY",
481 "21142 Serial PHY",
"21142 MII PHY",
"21143 SYM PHY",
"21143 reset method"};
495 unsigned int s,
const char *p);
538 #define mdio_delay() inl(mdio_addr) 543 #define MDIO_SHIFT_CLK 0x10000 544 #define MDIO_DATA_WRITE0 0x00000 545 #define MDIO_DATA_WRITE1 0x20000 546 #define MDIO_ENB 0x00000 547 #define MDIO_ENB_IN 0x40000 548 #define MDIO_DATA_READ 0x80000 558 int read_cmd = (0xf6 << 10) | (phy_id << 5) | location;
566 outl(0x60020000 + (phy_id<<23) + (location<<18),
ioaddr + 0xA0);
578 return inl(
ioaddr + 0xB4 + (location<<2));
579 else if (location == 17)
581 else if (location >= 29 && location <= 31)
582 return inl(
ioaddr + 0xD4 + ((location-29)<<2));
588 for (i = 32; i >= 0; i--) {
595 for (i = 15; i >= 0; i--) {
604 for (i = 19; i > 0; i--) {
611 return (
retval>>1) & 0xffff;
617 int cmd = (0x5002 << 16) | (phy_id << 23) | (location<<18) |
value;
626 if ( ! (
inl(
ioaddr + 0xA0) & 0x80000000))
637 else if (location == 17)
639 else if (location >= 29 && location <= 31)
645 for (i = 32; i >= 0; i--) {
652 for (i = 31; i >= 0; i--) {
660 for (i = 2; i > 0; i--) {
679 unsigned short retval = 0;
689 for (i = 4 + addr_len; i >= 0; i--) {
698 for (i = 16; i > 0; i--) {
718 int new_advertise = 0;
726 for (i = 0; i < 8; i ++)
739 DBG(
"%s: Old format EEPROM on '%s' board.\n%s: Using substitute media control info.\n",
745 DBG(
"%s: Old style EEPROM with no media selection information.\n",
752 DBG(
"%s: Multiport cards (%d ports) may not work correctly.\n",
759 DBG2(
"%s: No Valid Media Table. ee_data[27] = %hhX\n",
766 DBG(
"%s: 21041 Media table, default media %hX (%s).\n",
769 for (i = 0; i <
count; i++) {
770 unsigned char media_block = *p++;
772 if (media_block & 0x40)
775 case 0: new_advertise |= 0x0020;
break;
776 case 4: new_advertise |= 0x0040;
break;
778 DBG(
"%s: 21041 media #%d, %s.\n",
782 unsigned char csr12dir = 0;
803 for (i = 0; i <
count; i++) {
806 if ((p[0] & 0x80) == 0) {
808 leaf->
media = p[0] & 0x3f;
810 if ((p[2] & 0x61) == 0x01)
814 switch(leaf->
type = p[1]) {
817 leaf->
media = p[2] & 0x0f;
824 if ((p[2] & 0x3f) == 0) {
825 u32 base15 = (p[2] & 0x40) ?
get_u16(p + 7) : 0x0008;
826 u16 *p1 = (
u16 *)(p + (p[2] & 0x40 ? 9 : 3));
834 switch (leaf->
media) {
835 case 0: new_advertise |= 0x0020;
break;
836 case 4: new_advertise |= 0x0040;
break;
837 case 3: new_advertise |= 0x0080;
break;
838 case 5: new_advertise |= 0x0100;
break;
839 case 6: new_advertise |= 0x0200;
break;
846 p += (p[0] & 0x3f) + 1;
848 if (leaf->
media == 11) {
850 DBG2(
"%s: MII interface PHY %d, setup/reset sequences %d/%d long, capabilities %hhX %hhX.\n",
854 DBG(
"%s: Index #%d - Media %s (#%d) described " 855 "by a %s (%d) block.\n",
890 tx_ring[0].status = 0x00000000;
896 tx_ring[1].status = 0x00000000;
957 outl(addr_high + (addr_high<<16),
ioaddr + 0xB8);
984 u32 tx_flags = 0x08000000 | 192;
988 for (i=0; i<192; i++)
1041 unsigned int s,
const char *p)
1085 DBG (
"TX Timeout!\n");
1104 if ( ! retrieve )
return 1;
1180 static unsigned char last_phys_addr[
ETH_ALEN] = {0x00,
'L',
'i',
'n',
'u',
'x'};
1190 tp = &tulip_bss.tpx;
1213 DBG2 (
"%s: Looking for Tulip Chip: Vendor=%hX Device=%hX\n",
tp->
nic_name,
1230 DBG (
"%s: Unknown Tulip Chip: Vendor=%hX Device=%hX\n",
tp->
nic_name,
1249 DBG(
"%s: The Tulip chip at %X is not functioning.\n",
1261 DBG(
" 21040 compatible mode.");
1272 int value, boguscnt = 100000;
1275 while (value < 0 && --boguscnt > 0);
1277 sum +=
value & 0xff;
1280 for (i = 0; i < 3; i++) {
1281 int value, boguscnt = 100000;
1285 while (value < 0 && --boguscnt > 0);
1287 sum +=
value & 0xffff;
1300 for (i = 0; i <
sizeof(
ee_data)/2; i++)
1307 for (i = 0; i < 8; i ++)
1315 sum +=
ee_data[i + sa_offset];
1327 if (sum == 0 || sum ==
ETH_ALEN*0xff) {
1352 static const u16 media2advert[] = { 0x20, 0x40, 0x03e0, 0x60,
1353 0x80, 0x100, 0x200 };
1386 unsigned int phy, phy_idx;
1399 for (phy = 0, phy_idx = 0; phy < 32 && phy_idx <
sizeof(
tp->
phys);
1402 if ((mii_status & 0x8301) == 0x8001 ||
1403 ((mii_status & 0x8000) == 0 && (mii_status & 0x7800) != 0)) {
1415 tp->
phys[phy_idx++] = phy;
1416 DBG(
"%s: MII transceiver %d config %hX status %hX advertising %hX.\n",
1417 tp->
nic_name, phy, mii_reg0, mii_status, mii_advert);
1419 if (mii_advert != to_advert) {
1420 DBG(
"%s: Advertising %hX on PHY %d previously advertising %hX.\n",
1432 DBG(
"%s: ***WARNING***: No MII transceiver found!\n",
1508 DBG2(
"%s: Restarting internal NWay autonegotiation, %X.\n",
1544 DBG(
"%s: Using user-specified media %s.\n",
1553 DBG(
"%s: Using EEPROM-set media %s.\n",
1586 DBG2(
"%s: Using MII transceiver %d, status %hX.\n",
1647 if (phy_reg & 0x78000000) {
1648 if (phy_reg & 0x20000000)
tp->
if_port = 5;
1649 else if (phy_reg & 0x40000000)
tp->
if_port = 3;
1650 else if (phy_reg & 0x10000000)
tp->
if_port = 4;
1651 else if (phy_reg & 0x08000000)
tp->
if_port = 0;
1653 new_csr6 = (
tp->
if_port & 1) ? 0x01860000 : 0x00420000;
1657 if (phy_reg & 0x30000000) {
1659 new_csr6 |= 0x00000200;
1661 DBG2(
"%s: PNIC autonegotiated status %X, %s.\n",
1663 if (
tp->
csr6 != new_csr6) {
1682 unsigned char *p = mleaf->
leafdata;
1683 switch (mleaf->
type) {
1685 DBG2(
"%s: Using a 21140 non-MII transceiver" 1686 " with control setting %hhX.\n",
1692 new_csr6 = 0x02000000 | ((p[2] & 0x71) << 18);
1696 u32 csr13val, csr14val, csr15dir, csr15val;
1697 for (i = 0; i < 5; i++)
1698 setup[i] =
get_u16(&p[i*2 + 1]);
1706 unsigned char *rst = rleaf->
leafdata;
1707 DBG2(
"%s: Resetting the transceiver.\n",
1709 for (i = 0; i < rst[0]; i++)
1712 DBG2(
"%s: 21143 non-MII %s transceiver control %hX/%hX.\n",
1715 csr13val = setup[0];
1716 csr14val = setup[1];
1717 csr15dir = (setup[3]<<16) | setup[2];
1718 csr15val = (setup[4]<<16) | setup[2];
1726 csr14val = 0x0003FF7F;
1727 csr15dir = (setup[0]<<16) | 0x0008;
1728 csr15val = (setup[1]<<16) | 0x0008;
1739 DBG2(
"%s: Setting CSR15 to %X/%X.\n",
1741 if (mleaf->
type == 4)
1742 new_csr6 = 0x82020000 | ((setup[2] & 0x71) << 18);
1744 new_csr6 = 0x82420000;
1749 int init_length = p[1];
1753 new_csr6 = 0x020E0000;
1754 if (mleaf->
type == 3) {
1755 u16 *init_sequence = (
u16*)(p+2);
1756 u16 *reset_sequence = &((
u16*)(p+3))[init_length];
1757 int reset_length = p[2 + init_length*2];
1758 misc_info = reset_sequence + reset_length;
1760 for (i = 0; i < reset_length; i++)
1762 for (i = 0; i < init_length; i++)
1765 u8 *init_sequence = p + 2;
1766 u8 *reset_sequence = p + 3 + init_length;
1767 int reset_length = p[2 + init_length];
1768 misc_info = (
u16*)(reset_sequence + reset_length);
1771 for (i = 0; i < reset_length; i++)
1774 for (i = 0; i < init_length; i++)
1781 DBG2(
"%s: Advertising %hX on MII %d.\n",
1788 DBG(
"%s: Invalid media table selection %d.\n",
1790 new_csr6 = 0x020E0000;
1792 DBG2(
"%s: Using media type %s, CSR12 is %hhX.\n",
1797 DBG2(
"%s: 21041 using media %s, CSR12 is %hX.\n",
1804 new_csr6 = 0x80020000;
1808 DBG2(
"%s: PNIC PHY status is %hX, media %s.\n",
1811 new_csr6 = 0x810C0000;
1817 new_csr6 = 0x00420000;
1822 new_csr6 = 0x01860000;
1827 new_csr6 = 0x00420000;
1833 DBG2(
"%s: 21040 media type is %s, CSR12 is %hhX.\n",
1853 new_csr6 = 0x020E0000;
1855 new_csr6 = 0x028600000;
1857 new_csr6 = 0x038600000;
1858 DBG2(
"%s: No media description table, assuming " 1859 "%s transceiver, CSR12 %hhX.\n",
1876 unsigned int bmsr, lpa, negotiated, new_csr6;
1881 DBG2(
"%s: MII status %#x, Link partner report %#x.\n",
1886 if ((bmsr & 4) == 0) {
1888 if ((new_bmsr & 4) == 0) {
1889 DBG2(
"%s: No link beat on the MII interface," 1900 if(negotiated & 0x380) new_csr6 &= ~0x400000;
1901 else new_csr6 |= 0x400000;
1903 else new_csr6 &= ~0x200;
1905 if (new_csr6 !=
tp->
csr6) {
1908 DBG(
"%s: Setting %s-duplex based on MII" 1909 "#%d link partner capability of %#x.\n",
1920 PCI_ROM(0x1011, 0x0002,
"dc21040",
"Digital Tulip", 0),
1921 PCI_ROM(0x1011, 0x0009,
"ds21140",
"Digital Tulip Fast", 0),
1922 PCI_ROM(0x1011, 0x0014,
"dc21041",
"Digital Tulip+", 0),
1923 PCI_ROM(0x1011, 0x0019,
"ds21142",
"Digital Tulip 21142", 0),
1924 PCI_ROM(0x104a, 0x0981,
"tulip-0981",
"Tulip 0x104a 0x0981", 0),
1925 PCI_ROM(0x104a, 0x2774,
"SGThomson-STE10100A",
"Tulip 0x104a 0x2774", 0),
1926 PCI_ROM(0x10b7, 0x9300,
"3csoho100b-tx",
"3ComSOHO100B-TX", 0),
1927 PCI_ROM(0x10b9, 0x5261,
"ali1563",
"ALi 1563 integrated ethernet", 0),
1928 PCI_ROM(0x10d9, 0x0512,
"mx98713",
"Macronix MX987x3", 0),
1929 PCI_ROM(0x10d9, 0x0531,
"mx98715",
"Macronix MX987x5", 0),
1930 PCI_ROM(0x1113, 0x1216,
"an983",
"ADMTek AN983 Comet", 0),
1931 PCI_ROM(0x1113, 0x1217,
"mxic-98715",
"Macronix MX987x5", 0),
1932 PCI_ROM(0x1113, 0x9511,
"tulip-9511",
"Tulip 0x1113 0x9511", 0),
1933 PCI_ROM(0x115d, 0x0003,
"xircomtulip",
"Xircom Tulip", 0),
1934 PCI_ROM(0x1186, 0x1561,
"tulip-1561",
"Tulip 0x1186 0x1561", 0),
1935 PCI_ROM(0x11ad, 0x0002,
"82c168",
"Netgear FA310TX", 0),
1936 PCI_ROM(0x11ad, 0xc115,
"lc82c115",
"LinkSys LNE100TX", 0),
1937 PCI_ROM(0x11f6, 0x9881,
"rl100tx",
"Compex RL100-TX", 0),
1938 PCI_ROM(0x1259, 0xa120,
"tulip-a120",
"Tulip 0x1259 0xa120", 0),
1939 PCI_ROM(0x125b, 0x1400,
"ax88140",
"ASIX AX88140", 0),
1940 PCI_ROM(0x1282, 0x9009,
"dm9009",
"Davicom 9009", 0),
1941 PCI_ROM(0x1282, 0x9100,
"dm9100",
"Davicom 9100", 0),
1942 PCI_ROM(0x1282, 0x9102,
"dm9102",
"Davicom 9102", 0),
1943 PCI_ROM(0x1282, 0x9132,
"dm9132",
"Davicom 9132", 0),
1944 PCI_ROM(0x1317, 0x0981,
"an981",
"ADMtek AN981 Comet", 0),
1945 PCI_ROM(0x1317, 0x0985,
"centaur-p",
"ADMtek Centaur-P", 0),
1946 PCI_ROM(0x1317, 0x1985,
"centaur-c",
"ADMTek Centaur-C", 0),
1947 PCI_ROM(0x1317, 0x9511,
"an983b",
"ADMTek Comet 983b", 0),
1948 PCI_ROM(0x13d1, 0xab02,
"tulip-ab02",
"Tulip 0x13d1 0xab02", 0),
1949 PCI_ROM(0x13d1, 0xab03,
"tulip-ab03",
"Tulip 0x13d1 0xab03", 0),
1950 PCI_ROM(0x13d1, 0xab08,
"tulip-ab08",
"Tulip 0x13d1 0xab08", 0),
1951 PCI_ROM(0x14f1, 0x1803,
"lanfinity",
"Conexant LANfinity", 0),
1952 PCI_ROM(0x1626, 0x8410,
"tulip-8410",
"Tulip 0x1626 0x8410", 0),
1953 PCI_ROM(0x1737, 0xab08,
"tulip-1737-ab08",
"Tulip 0x1737 0xab08", 0),
1954 PCI_ROM(0x1737, 0xab09,
"tulip-ab09",
"Tulip 0x1737 0xab09", 0),
1955 PCI_ROM(0x8086, 0x0039,
"intel21145",
"Intel Tulip", 0),
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]
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.
static void tulip_disable(struct nic *nic)
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)
uint16_t 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)
DRIVER("Tulip", nic_driver, pci_driver, tulip_driver, tulip_probe, tulip_disable)
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)
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.
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.
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)