diff options
author | ml149210 <none@none> | 2007-05-26 05:29:40 -0700 |
---|---|---|
committer | ml149210 <none@none> | 2007-05-26 05:29:40 -0700 |
commit | 03a69b52ae9782ba394c209750ad0cda5c6c296a (patch) | |
tree | a2c9a03a9206984cf3c2d5c77bd43e5acd2e1021 /usr/src | |
parent | c165966d2681754edbe7637da5adf3e53b3f7132 (diff) | |
download | illumos-gate-03a69b52ae9782ba394c209750ad0cda5c6c296a.tar.gz |
6551951 BGE need to support NetXtreme 5755
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/pkgdefs/SUNWbge/postinstall | 2 | ||||
-rw-r--r-- | usr/src/uts/common/io/bge/bge_chip2.c | 33 | ||||
-rw-r--r-- | usr/src/uts/common/io/bge/bge_hw.h | 17 | ||||
-rw-r--r-- | usr/src/uts/common/io/bge/bge_main2.c | 2 |
4 files changed, 50 insertions, 4 deletions
diff --git a/usr/src/pkgdefs/SUNWbge/postinstall b/usr/src/pkgdefs/SUNWbge/postinstall index 24187e8666..0b7a35481a 100644 --- a/usr/src/pkgdefs/SUNWbge/postinstall +++ b/usr/src/pkgdefs/SUNWbge/postinstall @@ -161,6 +161,7 @@ then "pci14e4,1678" "pci14e4,1679" "pciex14e4,167a" + "pciex14e4,167b" "pci14e4,167d" "pciex14e4,169d"' \ -b "$BASEDIR" bge @@ -185,6 +186,7 @@ else if [ ${ARCH} = "sparc" ] "pci14e4,1677" "pci14e4,1678" "pciex14e4,167a" + "pciex14e4,167b" "pci14e4,167d"' \ -b "$BASEDIR" bge fi diff --git a/usr/src/uts/common/io/bge/bge_chip2.c b/usr/src/uts/common/io/bge/bge_chip2.c index cd08c47d9a..bb4d71b117 100644 --- a/usr/src/uts/common/io/bge/bge_chip2.c +++ b/usr/src/uts/common/io/bge/bge_chip2.c @@ -1856,6 +1856,7 @@ bge_nvmem_id(bge_t *bgep) case DEVICE_ID_5752: case DEVICE_ID_5752M: case DEVICE_ID_5754: + case DEVICE_ID_5755: case DEVICE_ID_5721: case DEVICE_ID_5714C: case DEVICE_ID_5714S: @@ -2047,6 +2048,24 @@ bge_chip_id_init(bge_t *bgep) dev_ok = B_TRUE; break; + case DEVICE_ID_5755: + cidp->chip_label = 5755; + cidp->pci_type = BGE_PCI_E; + cidp->mbuf_lo_water_rdma = RDMA_MBUF_LOWAT_5705; + cidp->mbuf_lo_water_rmac = MAC_RX_MBUF_LOWAT_5705; + cidp->mbuf_hi_water = MBUF_HIWAT_5705; + cidp->mbuf_base = bge_mbuf_pool_base_5705; + cidp->mbuf_length = bge_mbuf_pool_len_5705; + cidp->recv_slots = BGE_RECV_SLOTS_5705; + cidp->bge_mlcr_default |= MLCR_MISC_PINS_OUTPUT_ENABLE_1; + cidp->rx_rings = BGE_RECV_RINGS_MAX_5705; + cidp->tx_rings = BGE_SEND_RINGS_MAX_5705; + cidp->flags |= CHIP_FLAG_NO_JUMBO; + cidp->flags |= CHIP_FLAG_PARTIAL_CSUM; + cidp->statistic_type = BGE_STAT_REG; + dev_ok = B_TRUE; + break; + case DEVICE_ID_5706: cidp->chip_label = 5706; cidp->flags |= CHIP_FLAG_NO_JUMBO; @@ -2436,7 +2455,9 @@ bge_chip_reset_engine(bge_t *bgep, bge_regno_t regno) if (bgep->chipid.asic_rev == MHCR_CHIP_REV_5751_A0 || bgep->chipid.asic_rev == - MHCR_CHIP_REV_5721_A0) { + MHCR_CHIP_REV_5721_A0 || + bgep->chipid.asic_rev == + MHCR_CHIP_REV_5755_A0) { val32 = bge_reg_get32(bgep, PHY_TEST_CTRL_REG); if (val32 == (PHY_PCIE_SCRAM_MODE | @@ -3140,6 +3161,7 @@ bge_chip_reset(bge_t *bgep, boolean_t enable_dma) if ((bgep->chipid.chip_label == 5721) || (bgep->chipid.chip_label == 5751) || (bgep->chipid.chip_label == 5752) || + (bgep->chipid.chip_label == 5755) || (bgep->chipid.chip_label == 5789)) bge_reg_set32(bgep, TLP_CONTROL_REG, TLP_DATA_FIFO_PROTECT); @@ -3345,6 +3367,7 @@ bge_chip_start(bge_t *bgep, boolean_t reset_phys) uint32_t mtu; uint32_t maxring; uint32_t stats_mask; + uint32_t dma_wrprio; uint64_t ring; int retval = DDI_SUCCESS; @@ -3690,8 +3713,14 @@ bge_chip_start(bge_t *bgep, boolean_t reset_phys) if (DEVICE_5704_SERIES_CHIPSETS(bgep)) if (!bge_chip_enable_engine(bgep, DMA_COMPLETION_MODE_REG, 0)) retval = DDI_FAILURE; + dma_wrprio = (bge_dma_wrprio << DMA_PRIORITY_SHIFT) | + ALL_DMA_ATTN_BITS; + if (MHCR_CHIP_ASIC_REV(bgep->chipid.asic_rev) == + MHCR_CHIP_ASIC_REV_5755) { + dma_wrprio |= DMA_STATUS_TAG_FIX_CQ12384; + } if (!bge_chip_enable_engine(bgep, WRITE_DMA_MODE_REG, - (bge_dma_wrprio << DMA_PRIORITY_SHIFT) | ALL_DMA_ATTN_BITS)) + dma_wrprio)) retval = DDI_FAILURE; if (!bge_chip_enable_engine(bgep, READ_DMA_MODE_REG, (bge_dma_rdprio << DMA_PRIORITY_SHIFT) | ALL_DMA_ATTN_BITS)) diff --git a/usr/src/uts/common/io/bge/bge_hw.h b/usr/src/uts/common/io/bge/bge_hw.h index 3532963b13..8a1311b947 100644 --- a/usr/src/uts/common/io/bge/bge_hw.h +++ b/usr/src/uts/common/io/bge/bge_hw.h @@ -78,6 +78,7 @@ extern "C" { #define DEVICE_ID_5752 0x1600 #define DEVICE_ID_5752M 0x1601 #define DEVICE_ID_5754 0x167a +#define DEVICE_ID_5755 0x167b #define DEVICE_ID_5721 0x1659 #define DEVICE_ID_5714C 0x1668 #define DEVICE_ID_5714S 0x1669 @@ -157,7 +158,8 @@ extern "C" { (bgep->chipid.device == DEVICE_ID_5782) ||\ (bgep->chipid.device == DEVICE_ID_5788) ||\ (bgep->chipid.device == DEVICE_ID_5705_2) ||\ - (bgep->chipid.device == DEVICE_ID_5754)) + (bgep->chipid.device == DEVICE_ID_5754) ||\ + (bgep->chipid.device == DEVICE_ID_5755)) #define DEVICE_5721_SERIES_CHIPSETS(bgep) \ ((bgep->chipid.device == DEVICE_ID_5721) ||\ @@ -257,6 +259,9 @@ extern "C" { #define MHCR_CHIP_REV_5754_A0 0xb0000000 #define MHCR_CHIP_REV_5754_A1 0xb0010000 +#define MHCR_CHIP_REV_5755_A0 0xa0000000 +#define MHCR_CHIP_REV_5755_A1 0xa0010000 + #define MHCR_CHIP_ASIC_REV(ChipRevId) ((ChipRevId) & 0xf0000000) #define MHCR_CHIP_ASIC_REV_5700 (0x7 << 28) #define MHCR_CHIP_ASIC_REV_5701 (0x0 << 28) @@ -267,6 +272,7 @@ extern "C" { #define MHCR_CHIP_ASIC_REV_5714 (0x5 << 28) #define MHCR_CHIP_ASIC_REV_5752 (0x6 << 28) #define MHCR_CHIP_ASIC_REV_5754 (0xb << 28) +#define MHCR_CHIP_ASIC_REV_5755 ((uint32_t)0xa << 28) #define MHCR_CHIP_ASIC_REV_5715 ((uint32_t)0x9 << 28) @@ -576,6 +582,15 @@ extern "C" { #define ALL_DMA_ATTN_BITS 0x000003fc /* + * BCM5755, 5755M, 5906, 5906M only + * 1 - Enable Fix. Device will send out the status block before + * the interrupt message + * 0 - Disable fix. Device will send out the interrupt message + * before the status block + */ +#define DMA_STATUS_TAG_FIX_CQ12384 0x20000000 + +/* * End of state machine control register definitions */ diff --git a/usr/src/uts/common/io/bge/bge_main2.c b/usr/src/uts/common/io/bge/bge_main2.c index 1e049fbd89..245fbc9fa5 100644 --- a/usr/src/uts/common/io/bge/bge_main2.c +++ b/usr/src/uts/common/io/bge/bge_main2.c @@ -33,7 +33,7 @@ * This is the string displayed by modinfo, etc. * Make sure you keep the version ID up to date! */ -static char bge_ident[] = "Broadcom Gb Ethernet v0.56"; +static char bge_ident[] = "Broadcom Gb Ethernet v0.57"; /* * Property names |