diff options
Diffstat (limited to 'drivers/net/tg3.h')
| -rw-r--r-- | drivers/net/tg3.h | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 3ecf356cfb08..92f53000bce6 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
| @@ -24,6 +24,8 @@ | |||
| 24 | 24 | ||
| 25 | #define RX_COPY_THRESHOLD 256 | 25 | #define RX_COPY_THRESHOLD 256 |
| 26 | 26 | ||
| 27 | #define TG3_RX_INTERNAL_RING_SZ_5906 32 | ||
| 28 | |||
| 27 | #define RX_STD_MAX_SIZE 1536 | 29 | #define RX_STD_MAX_SIZE 1536 |
| 28 | #define RX_STD_MAX_SIZE_5705 512 | 30 | #define RX_STD_MAX_SIZE_5705 512 |
| 29 | #define RX_JUMBO_MAX_SIZE 0xdeadbeef /* XXX */ | 31 | #define RX_JUMBO_MAX_SIZE 0xdeadbeef /* XXX */ |
| @@ -129,6 +131,7 @@ | |||
| 129 | #define CHIPREV_ID_5752_A0_HW 0x5000 | 131 | #define CHIPREV_ID_5752_A0_HW 0x5000 |
| 130 | #define CHIPREV_ID_5752_A0 0x6000 | 132 | #define CHIPREV_ID_5752_A0 0x6000 |
| 131 | #define CHIPREV_ID_5752_A1 0x6001 | 133 | #define CHIPREV_ID_5752_A1 0x6001 |
| 134 | #define CHIPREV_ID_5906_A1 0xc001 | ||
| 132 | #define GET_ASIC_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 12) | 135 | #define GET_ASIC_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 12) |
| 133 | #define ASIC_REV_5700 0x07 | 136 | #define ASIC_REV_5700 0x07 |
| 134 | #define ASIC_REV_5701 0x00 | 137 | #define ASIC_REV_5701 0x00 |
| @@ -141,6 +144,7 @@ | |||
| 141 | #define ASIC_REV_5714 0x09 | 144 | #define ASIC_REV_5714 0x09 |
| 142 | #define ASIC_REV_5755 0x0a | 145 | #define ASIC_REV_5755 0x0a |
| 143 | #define ASIC_REV_5787 0x0b | 146 | #define ASIC_REV_5787 0x0b |
| 147 | #define ASIC_REV_5906 0x0c | ||
| 144 | #define GET_CHIP_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 8) | 148 | #define GET_CHIP_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 8) |
| 145 | #define CHIPREV_5700_AX 0x70 | 149 | #define CHIPREV_5700_AX 0x70 |
| 146 | #define CHIPREV_5700_BX 0x71 | 150 | #define CHIPREV_5700_BX 0x71 |
| @@ -646,7 +650,8 @@ | |||
| 646 | #define SNDDATAI_SCTRL_FORCE_ZERO 0x00000010 | 650 | #define SNDDATAI_SCTRL_FORCE_ZERO 0x00000010 |
| 647 | #define SNDDATAI_STATSENAB 0x00000c0c | 651 | #define SNDDATAI_STATSENAB 0x00000c0c |
| 648 | #define SNDDATAI_STATSINCMASK 0x00000c10 | 652 | #define SNDDATAI_STATSINCMASK 0x00000c10 |
| 649 | /* 0xc14 --> 0xc80 unused */ | 653 | #define ISO_PKT_TX 0x00000c20 |
| 654 | /* 0xc24 --> 0xc80 unused */ | ||
| 650 | #define SNDDATAI_COS_CNT_0 0x00000c80 | 655 | #define SNDDATAI_COS_CNT_0 0x00000c80 |
| 651 | #define SNDDATAI_COS_CNT_1 0x00000c84 | 656 | #define SNDDATAI_COS_CNT_1 0x00000c84 |
| 652 | #define SNDDATAI_COS_CNT_2 0x00000c88 | 657 | #define SNDDATAI_COS_CNT_2 0x00000c88 |
| @@ -997,11 +1002,13 @@ | |||
| 997 | #define BUFMGR_MB_MACRX_LOW_WATER 0x00004414 | 1002 | #define BUFMGR_MB_MACRX_LOW_WATER 0x00004414 |
| 998 | #define DEFAULT_MB_MACRX_LOW_WATER 0x00000020 | 1003 | #define DEFAULT_MB_MACRX_LOW_WATER 0x00000020 |
| 999 | #define DEFAULT_MB_MACRX_LOW_WATER_5705 0x00000010 | 1004 | #define DEFAULT_MB_MACRX_LOW_WATER_5705 0x00000010 |
| 1005 | #define DEFAULT_MB_MACRX_LOW_WATER_5906 0x00000004 | ||
| 1000 | #define DEFAULT_MB_MACRX_LOW_WATER_JUMBO 0x00000098 | 1006 | #define DEFAULT_MB_MACRX_LOW_WATER_JUMBO 0x00000098 |
| 1001 | #define DEFAULT_MB_MACRX_LOW_WATER_JUMBO_5780 0x0000004b | 1007 | #define DEFAULT_MB_MACRX_LOW_WATER_JUMBO_5780 0x0000004b |
| 1002 | #define BUFMGR_MB_HIGH_WATER 0x00004418 | 1008 | #define BUFMGR_MB_HIGH_WATER 0x00004418 |
| 1003 | #define DEFAULT_MB_HIGH_WATER 0x00000060 | 1009 | #define DEFAULT_MB_HIGH_WATER 0x00000060 |
| 1004 | #define DEFAULT_MB_HIGH_WATER_5705 0x00000060 | 1010 | #define DEFAULT_MB_HIGH_WATER_5705 0x00000060 |
| 1011 | #define DEFAULT_MB_HIGH_WATER_5906 0x00000010 | ||
| 1005 | #define DEFAULT_MB_HIGH_WATER_JUMBO 0x0000017c | 1012 | #define DEFAULT_MB_HIGH_WATER_JUMBO 0x0000017c |
| 1006 | #define DEFAULT_MB_HIGH_WATER_JUMBO_5780 0x00000096 | 1013 | #define DEFAULT_MB_HIGH_WATER_JUMBO_5780 0x00000096 |
| 1007 | #define BUFMGR_RX_MB_ALLOC_REQ 0x0000441c | 1014 | #define BUFMGR_RX_MB_ALLOC_REQ 0x0000441c |
| @@ -1138,7 +1145,12 @@ | |||
| 1138 | #define TX_CPU_STATE 0x00005404 | 1145 | #define TX_CPU_STATE 0x00005404 |
| 1139 | #define TX_CPU_PGMCTR 0x0000541c | 1146 | #define TX_CPU_PGMCTR 0x0000541c |
| 1140 | 1147 | ||
| 1148 | #define VCPU_STATUS 0x00005100 | ||
| 1149 | #define VCPU_STATUS_INIT_DONE 0x04000000 | ||
| 1150 | #define VCPU_STATUS_DRV_RESET 0x08000000 | ||
| 1151 | |||
| 1141 | /* Mailboxes */ | 1152 | /* Mailboxes */ |
| 1153 | #define GRCMBOX_BASE 0x00005600 | ||
| 1142 | #define GRCMBOX_INTERRUPT_0 0x00005800 /* 64-bit */ | 1154 | #define GRCMBOX_INTERRUPT_0 0x00005800 /* 64-bit */ |
| 1143 | #define GRCMBOX_INTERRUPT_1 0x00005808 /* 64-bit */ | 1155 | #define GRCMBOX_INTERRUPT_1 0x00005808 /* 64-bit */ |
| 1144 | #define GRCMBOX_INTERRUPT_2 0x00005810 /* 64-bit */ | 1156 | #define GRCMBOX_INTERRUPT_2 0x00005810 /* 64-bit */ |
| @@ -1398,7 +1410,10 @@ | |||
| 1398 | #define GRC_EEPROM_CTRL 0x00006840 | 1410 | #define GRC_EEPROM_CTRL 0x00006840 |
| 1399 | #define GRC_MDI_CTRL 0x00006844 | 1411 | #define GRC_MDI_CTRL 0x00006844 |
| 1400 | #define GRC_SEEPROM_DELAY 0x00006848 | 1412 | #define GRC_SEEPROM_DELAY 0x00006848 |
| 1401 | /* 0x684c --> 0x6c00 unused */ | 1413 | /* 0x684c --> 0x6890 unused */ |
| 1414 | #define GRC_VCPU_EXT_CTRL 0x00006890 | ||
| 1415 | #define GRC_VCPU_EXT_CTRL_HALT_CPU 0x00400000 | ||
| 1416 | #define GRC_VCPU_EXT_CTRL_DISABLE_WOL 0x20000000 | ||
| 1402 | #define GRC_FASTBOOT_PC 0x00006894 /* 5752, 5755, 5787 */ | 1417 | #define GRC_FASTBOOT_PC 0x00006894 /* 5752, 5755, 5787 */ |
| 1403 | 1418 | ||
| 1404 | /* 0x6c00 --> 0x7000 unused */ | 1419 | /* 0x6c00 --> 0x7000 unused */ |
| @@ -1485,9 +1500,17 @@ | |||
| 1485 | #define NVRAM_WRITE1 0x00007028 | 1500 | #define NVRAM_WRITE1 0x00007028 |
| 1486 | /* 0x702c --> 0x7400 unused */ | 1501 | /* 0x702c --> 0x7400 unused */ |
| 1487 | 1502 | ||
| 1488 | /* 0x7400 --> 0x8000 unused */ | 1503 | /* 0x7400 --> 0x7c00 unused */ |
| 1504 | #define PCIE_TRANSACTION_CFG 0x00007c04 | ||
| 1505 | #define PCIE_TRANS_CFG_1SHOT_MSI 0x20000000 | ||
| 1506 | #define PCIE_TRANS_CFG_LOM 0x00000020 | ||
| 1507 | |||
| 1489 | 1508 | ||
| 1490 | #define TG3_EEPROM_MAGIC 0x669955aa | 1509 | #define TG3_EEPROM_MAGIC 0x669955aa |
| 1510 | #define TG3_EEPROM_MAGIC_FW 0xa5000000 | ||
| 1511 | #define TG3_EEPROM_MAGIC_FW_MSK 0xff000000 | ||
| 1512 | #define TG3_EEPROM_MAGIC_HW 0xabcd | ||
| 1513 | #define TG3_EEPROM_MAGIC_HW_MSK 0xffff | ||
| 1491 | 1514 | ||
| 1492 | /* 32K Window into NIC internal memory */ | 1515 | /* 32K Window into NIC internal memory */ |
| 1493 | #define NIC_SRAM_WIN_BASE 0x00008000 | 1516 | #define NIC_SRAM_WIN_BASE 0x00008000 |
| @@ -1537,6 +1560,7 @@ | |||
| 1537 | #define FWCMD_NICDRV_FIX_DMAR 0x00000005 | 1560 | #define FWCMD_NICDRV_FIX_DMAR 0x00000005 |
| 1538 | #define FWCMD_NICDRV_FIX_DMAW 0x00000006 | 1561 | #define FWCMD_NICDRV_FIX_DMAW 0x00000006 |
| 1539 | #define FWCMD_NICDRV_ALIVE2 0x0000000d | 1562 | #define FWCMD_NICDRV_ALIVE2 0x0000000d |
| 1563 | #define FWCMD_NICDRV_ALIVE3 0x0000000e | ||
| 1540 | #define NIC_SRAM_FW_CMD_LEN_MBOX 0x00000b7c | 1564 | #define NIC_SRAM_FW_CMD_LEN_MBOX 0x00000b7c |
| 1541 | #define NIC_SRAM_FW_CMD_DATA_MBOX 0x00000b80 | 1565 | #define NIC_SRAM_FW_CMD_DATA_MBOX 0x00000b80 |
| 1542 | #define NIC_SRAM_FW_ASF_STATUS_MBOX 0x00000c00 | 1566 | #define NIC_SRAM_FW_ASF_STATUS_MBOX 0x00000c00 |
| @@ -1604,6 +1628,7 @@ | |||
| 1604 | #define MII_TG3_DSP_RW_PORT 0x15 /* DSP coefficient read/write port */ | 1628 | #define MII_TG3_DSP_RW_PORT 0x15 /* DSP coefficient read/write port */ |
| 1605 | 1629 | ||
| 1606 | #define MII_TG3_DSP_ADDRESS 0x17 /* DSP address register */ | 1630 | #define MII_TG3_DSP_ADDRESS 0x17 /* DSP address register */ |
| 1631 | #define MII_TG3_EPHY_PTEST 0x17 /* 5906 PHY register */ | ||
| 1607 | 1632 | ||
| 1608 | #define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */ | 1633 | #define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */ |
| 1609 | 1634 | ||
| @@ -1617,6 +1642,8 @@ | |||
| 1617 | #define MII_TG3_AUX_STAT_100FULL 0x0500 | 1642 | #define MII_TG3_AUX_STAT_100FULL 0x0500 |
| 1618 | #define MII_TG3_AUX_STAT_1000HALF 0x0600 | 1643 | #define MII_TG3_AUX_STAT_1000HALF 0x0600 |
| 1619 | #define MII_TG3_AUX_STAT_1000FULL 0x0700 | 1644 | #define MII_TG3_AUX_STAT_1000FULL 0x0700 |
| 1645 | #define MII_TG3_AUX_STAT_100 0x0008 | ||
| 1646 | #define MII_TG3_AUX_STAT_FULL 0x0001 | ||
| 1620 | 1647 | ||
| 1621 | #define MII_TG3_ISTAT 0x1a /* IRQ status register */ | 1648 | #define MII_TG3_ISTAT 0x1a /* IRQ status register */ |
| 1622 | #define MII_TG3_IMASK 0x1b /* IRQ mask register */ | 1649 | #define MII_TG3_IMASK 0x1b /* IRQ mask register */ |
| @@ -1627,6 +1654,9 @@ | |||
| 1627 | #define MII_TG3_INT_DUPLEXCHG 0x0008 | 1654 | #define MII_TG3_INT_DUPLEXCHG 0x0008 |
| 1628 | #define MII_TG3_INT_ANEG_PAGE_RX 0x0400 | 1655 | #define MII_TG3_INT_ANEG_PAGE_RX 0x0400 |
| 1629 | 1656 | ||
| 1657 | #define MII_TG3_EPHY_TEST 0x1f /* 5906 PHY register */ | ||
| 1658 | #define MII_TG3_EPHY_SHADOW_EN 0x80 | ||
| 1659 | |||
| 1630 | /* There are two ways to manage the TX descriptors on the tigon3. | 1660 | /* There are two ways to manage the TX descriptors on the tigon3. |
| 1631 | * Either the descriptors are in host DMA'able memory, or they | 1661 | * Either the descriptors are in host DMA'able memory, or they |
| 1632 | * exist only in the cards on-chip SRAM. All 16 send bds are under | 1662 | * exist only in the cards on-chip SRAM. All 16 send bds are under |
| @@ -2203,7 +2233,6 @@ struct tg3 { | |||
| 2203 | #define TG3_FLG2_PCI_EXPRESS 0x00000200 | 2233 | #define TG3_FLG2_PCI_EXPRESS 0x00000200 |
| 2204 | #define TG3_FLG2_ASF_NEW_HANDSHAKE 0x00000400 | 2234 | #define TG3_FLG2_ASF_NEW_HANDSHAKE 0x00000400 |
| 2205 | #define TG3_FLG2_HW_AUTONEG 0x00000800 | 2235 | #define TG3_FLG2_HW_AUTONEG 0x00000800 |
| 2206 | #define TG3_FLG2_PHY_JUST_INITTED 0x00001000 | ||
| 2207 | #define TG3_FLG2_PHY_SERDES 0x00002000 | 2236 | #define TG3_FLG2_PHY_SERDES 0x00002000 |
| 2208 | #define TG3_FLG2_CAPACITIVE_COUPLING 0x00004000 | 2237 | #define TG3_FLG2_CAPACITIVE_COUPLING 0x00004000 |
| 2209 | #define TG3_FLG2_FLASH 0x00008000 | 2238 | #define TG3_FLG2_FLASH 0x00008000 |
| @@ -2236,6 +2265,12 @@ struct tg3 { | |||
| 2236 | u16 asf_counter; | 2265 | u16 asf_counter; |
| 2237 | u16 asf_multiplier; | 2266 | u16 asf_multiplier; |
| 2238 | 2267 | ||
| 2268 | /* 1 second counter for transient serdes link events */ | ||
| 2269 | u32 serdes_counter; | ||
| 2270 | #define SERDES_AN_TIMEOUT_5704S 2 | ||
| 2271 | #define SERDES_PARALLEL_DET_TIMEOUT 1 | ||
| 2272 | #define SERDES_AN_TIMEOUT_5714S 1 | ||
| 2273 | |||
| 2239 | struct tg3_link_config link_config; | 2274 | struct tg3_link_config link_config; |
| 2240 | struct tg3_bufmgr_config bufmgr_config; | 2275 | struct tg3_bufmgr_config bufmgr_config; |
| 2241 | 2276 | ||
| @@ -2276,6 +2311,8 @@ struct tg3 { | |||
| 2276 | #define PHY_ID_BCM5780 0x60008350 | 2311 | #define PHY_ID_BCM5780 0x60008350 |
| 2277 | #define PHY_ID_BCM5755 0xbc050cc0 | 2312 | #define PHY_ID_BCM5755 0xbc050cc0 |
| 2278 | #define PHY_ID_BCM5787 0xbc050ce0 | 2313 | #define PHY_ID_BCM5787 0xbc050ce0 |
| 2314 | #define PHY_ID_BCM5756 0xbc050ed0 | ||
| 2315 | #define PHY_ID_BCM5906 0xdc00ac40 | ||
| 2279 | #define PHY_ID_BCM8002 0x60010140 | 2316 | #define PHY_ID_BCM8002 0x60010140 |
| 2280 | #define PHY_ID_INVALID 0xffffffff | 2317 | #define PHY_ID_INVALID 0xffffffff |
| 2281 | #define PHY_ID_REV_MASK 0x0000000f | 2318 | #define PHY_ID_REV_MASK 0x0000000f |
| @@ -2302,7 +2339,8 @@ struct tg3 { | |||
| 2302 | (X) == PHY_ID_BCM5705 || (X) == PHY_ID_BCM5750 || \ | 2339 | (X) == PHY_ID_BCM5705 || (X) == PHY_ID_BCM5750 || \ |
| 2303 | (X) == PHY_ID_BCM5752 || (X) == PHY_ID_BCM5714 || \ | 2340 | (X) == PHY_ID_BCM5752 || (X) == PHY_ID_BCM5714 || \ |
| 2304 | (X) == PHY_ID_BCM5780 || (X) == PHY_ID_BCM5787 || \ | 2341 | (X) == PHY_ID_BCM5780 || (X) == PHY_ID_BCM5787 || \ |
| 2305 | (X) == PHY_ID_BCM5755 || (X) == PHY_ID_BCM8002) | 2342 | (X) == PHY_ID_BCM5755 || (X) == PHY_ID_BCM5756 || \ |
| 2343 | (X) == PHY_ID_BCM5906 || (X) == PHY_ID_BCM8002) | ||
| 2306 | 2344 | ||
| 2307 | struct tg3_hw_stats *hw_stats; | 2345 | struct tg3_hw_stats *hw_stats; |
| 2308 | dma_addr_t stats_mapping; | 2346 | dma_addr_t stats_mapping; |
