diff options
author | Toomas Soome <tsoome@me.com> | 2019-01-18 18:26:23 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2019-04-10 17:22:27 +0300 |
commit | b37cc459553d18521fb935664dd7deb03b07c6a7 (patch) | |
tree | 127b1de9f39aaf3cedcc5b52f358ce38606e10db /usr/src | |
parent | 1aa5f89221657a92fc85060db4d7cc17b91007e1 (diff) | |
download | illumos-joyent-b37cc459553d18521fb935664dd7deb03b07c6a7.tar.gz |
10628 nxge: NULL pointer errors
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Gergő Doma <domag02@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/io/nxge/npi/npi_zcp.c | 21 | ||||
-rw-r--r-- | usr/src/uts/common/io/nxge/nxge_fflp.c | 10 | ||||
-rw-r--r-- | usr/src/uts/common/io/nxge/nxge_hw.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/io/nxge/nxge_ipp.c | 16 | ||||
-rw-r--r-- | usr/src/uts/common/io/nxge/nxge_kstats.c | 20 | ||||
-rw-r--r-- | usr/src/uts/common/io/nxge/nxge_mac.c | 20 | ||||
-rw-r--r-- | usr/src/uts/common/io/nxge/nxge_main.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/io/nxge/nxge_rxdma.c | 17 | ||||
-rw-r--r-- | usr/src/uts/common/io/nxge/nxge_txc.c | 12 | ||||
-rw-r--r-- | usr/src/uts/common/io/nxge/nxge_zcp.c | 24 |
10 files changed, 68 insertions, 76 deletions
diff --git a/usr/src/uts/common/io/nxge/npi/npi_zcp.c b/usr/src/uts/common/io/nxge/npi/npi_zcp.c index aca0b99d0c..547678b030 100644 --- a/usr/src/uts/common/io/nxge/npi/npi_zcp.c +++ b/usr/src/uts/common/io/nxge/npi/npi_zcp.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <npi_zcp.h> static int zcp_mem_read(npi_handle_t, uint16_t, uint8_t, @@ -310,7 +308,7 @@ npi_zcp_tt_static_entry(npi_handle_t handle, io_op_t op, uint16_t flow_id, return (NPI_FAILURE | NPI_ZCP_FLOW_ID_INVALID); } - if (zcp_mem_read(handle, flow_id, ZCP_RAM_SEL_TT_STATIC, NULL, + if (zcp_mem_read(handle, flow_id, ZCP_RAM_SEL_TT_STATIC, 0, (zcp_ram_unit_t *)&val) != 0) { NPI_ERROR_MSG((handle.function, NPI_ERR_CTL, " npi_zcp_tt_static_entry" @@ -385,8 +383,7 @@ npi_zcp_tt_static_entry(npi_handle_t handle, io_op_t op, uint16_t flow_id, } if (zcp_mem_write(handle, flow_id, ZCP_RAM_SEL_TT_STATIC, - byte_en, NULL, - (zcp_ram_unit_t *)&val) != 0) { + byte_en, 0, (zcp_ram_unit_t *)&val) != 0) { NPI_ERROR_MSG((handle.function, NPI_ERR_CTL, " npi_zcp_tt_static_entry" " HW Error: ZCP_RAM_ACC <0x%x>", @@ -434,7 +431,7 @@ npi_zcp_tt_dynamic_entry(npi_handle_t handle, io_op_t op, uint16_t flow_id, return (NPI_FAILURE | NPI_ZCP_FLOW_ID_INVALID); } - if (zcp_mem_read(handle, flow_id, ZCP_RAM_SEL_TT_DYNAMIC, NULL, + if (zcp_mem_read(handle, flow_id, ZCP_RAM_SEL_TT_DYNAMIC, 0, (zcp_ram_unit_t *)&val) != 0) { NPI_ERROR_MSG((handle.function, NPI_ERR_CTL, " npi_zcp_tt_dynamic_entry" @@ -501,8 +498,7 @@ npi_zcp_tt_dynamic_entry(npi_handle_t handle, io_op_t op, uint16_t flow_id, } if (zcp_mem_write(handle, flow_id, ZCP_RAM_SEL_TT_DYNAMIC, - byte_en, NULL, - (zcp_ram_unit_t *)&val) != 0) { + byte_en, 0, (zcp_ram_unit_t *)&val) != 0) { NPI_ERROR_MSG((handle.function, NPI_ERR_CTL, " npi_zcp_tt_dynamic_entry" " HW Error: ZCP_RAM_ACC <0x%x>", @@ -557,7 +553,7 @@ npi_zcp_tt_bam_entry(npi_handle_t handle, io_op_t op, uint16_t flow_id, return (NPI_FAILURE | NPI_ZCP_BAM_WORD_EN_INVALID); } - if (zcp_mem_read(handle, flow_id, ZCP_RAM_SEL_BAM0 + bankn, NULL, + if (zcp_mem_read(handle, flow_id, ZCP_RAM_SEL_BAM0 + bankn, 0, (zcp_ram_unit_t *)&val) != 0) { NPI_ERROR_MSG((handle.function, NPI_ERR_CTL, " npi_zcp_tt_bam_entry" @@ -568,8 +564,7 @@ npi_zcp_tt_bam_entry(npi_handle_t handle, io_op_t op, uint16_t flow_id, if (op == OP_SET) { if (zcp_mem_write(handle, flow_id, ZCP_RAM_SEL_BAM0 + bankn, - word_en, NULL, - (zcp_ram_unit_t *)&val) != 0) { + word_en, 0, (zcp_ram_unit_t *)&val) != 0) { NPI_ERROR_MSG((handle.function, NPI_ERR_CTL, " npi_zcp_tt_bam_entry" " HW Error: ZCP_RAM_ACC <0x%x>", @@ -605,7 +600,7 @@ npi_zcp_tt_cfifo_entry(npi_handle_t handle, io_op_t op, uint8_t portn, } if (op == OP_SET) { - if (zcp_mem_write(handle, NULL, ZCP_RAM_SEL_CFIFO0 + portn, + if (zcp_mem_write(handle, 0, ZCP_RAM_SEL_CFIFO0 + portn, 0x1ffff, entryn, data) != 0) { NPI_ERROR_MSG((handle.function, NPI_ERR_CTL, " npi_zcp_tt_cfifo_entry" @@ -614,7 +609,7 @@ npi_zcp_tt_cfifo_entry(npi_handle_t handle, io_op_t op, uint8_t portn, return (NPI_FAILURE | NPI_ZCP_MEM_WRITE_FAILED); } } else { - if (zcp_mem_read(handle, NULL, ZCP_RAM_SEL_CFIFO0 + portn, + if (zcp_mem_read(handle, 0, ZCP_RAM_SEL_CFIFO0 + portn, entryn, data) != 0) { NPI_ERROR_MSG((handle.function, NPI_ERR_CTL, " npi_zcp_tt_cfifo_entry" diff --git a/usr/src/uts/common/io/nxge/nxge_fflp.c b/usr/src/uts/common/io/nxge/nxge_fflp.c index ac1528275a..109aa99b3d 100644 --- a/usr/src/uts/common/io/nxge/nxge_fflp.c +++ b/usr/src/uts/common/io/nxge/nxge_fflp.c @@ -858,7 +858,7 @@ nxge_status_t nxge_classify_exit_sw(p_nxge_t nxgep) { NXGE_DEBUG_MSG((nxgep, FFLP_CTL, "==> nxge_classify_exit_sw")); - nxgep->classifier.state = NULL; + nxgep->classifier.state = 0; NXGE_DEBUG_MSG((nxgep, FFLP_CTL, "<== nxge_classify_exit_sw")); return (NXGE_OK); } @@ -2175,7 +2175,7 @@ nxge_fflp_handle_sys_errors(p_nxge_t nxgep) portn)); } statsp->errlog.vlan = (uint32_t)vlan_err.value; - NXGE_FM_REPORT_ERROR(nxgep, NULL, NULL, + NXGE_FM_REPORT_ERROR(nxgep, 0, 0, NXGE_FM_EREPORT_FFLP_VLAN_PAR_ERR); npi_fflp_vlan_error_clear(handle); } @@ -2206,7 +2206,7 @@ nxge_fflp_handle_sys_errors(p_nxge_t nxgep) } statsp->errlog.tcam = (uint32_t)tcam_err.value; - NXGE_FM_REPORT_ERROR(nxgep, NULL, NULL, + NXGE_FM_REPORT_ERROR(nxgep, 0, 0, NXGE_FM_EREPORT_FFLP_TCAM_ERR); npi_fflp_tcam_error_clear(handle); } @@ -2228,7 +2228,7 @@ nxge_fflp_handle_sys_errors(p_nxge_t nxgep) statsp->hash_pio_err[rdc_grp]++; statsp->errlog.hash_pio[rdc_grp] = (uint32_t)fcram_err.value; - NXGE_FM_REPORT_ERROR(nxgep, NULL, NULL, + NXGE_FM_REPORT_ERROR(nxgep, 0, 0, NXGE_FM_EREPORT_FFLP_HASHT_DATA_ERR); npi_fflp_fcram_error_clear(handle, rdc_grp); } @@ -2255,7 +2255,7 @@ nxge_fflp_handle_sys_errors(p_nxge_t nxgep) fcram2_err.bits.ldw.h1, fcram2_err.bits.ldw.subarea, fcram2_err.bits.ldw.syndrome)); - NXGE_FM_REPORT_ERROR(nxgep, NULL, NULL, + NXGE_FM_REPORT_ERROR(nxgep, 0, 0, NXGE_FM_EREPORT_FFLP_HASHT_LOOKUP_ERR); } statsp->errlog.hash_lookup1 = (uint32_t)fcram1_err.value; diff --git a/usr/src/uts/common/io/nxge/nxge_hw.c b/usr/src/uts/common/io/nxge/nxge_hw.c index d37f723370..343c7d55ac 100644 --- a/usr/src/uts/common/io/nxge/nxge_hw.c +++ b/usr/src/uts/common/io/nxge/nxge_hw.c @@ -347,7 +347,7 @@ nxge_check_xaui_xfp(p_nxge_t nxgep) } if (status != NXGE_OK) { - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_XAUI_ERR); if (DDI_FM_EREPORT_CAP(nxgep->fm_capabilities)) { NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, diff --git a/usr/src/uts/common/io/nxge/nxge_ipp.c b/usr/src/uts/common/io/nxge/nxge_ipp.c index deb1ad0b98..6b98ce3458 100644 --- a/usr/src/uts/common/io/nxge/nxge_ipp.c +++ b/usr/src/uts/common/io/nxge/nxge_ipp.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <nxge_impl.h> #include <nxge_ipp.h> @@ -365,7 +363,7 @@ nxge_ipp_handle_sys_errors(p_nxge_t nxgep) if ((rs = npi_ipp_get_state_mach(handle, portn, &errlogp->state_mach)) != NPI_SUCCESS) return (NXGE_ERROR | rs); - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_IPP_SOP_MISS); if (statsp->sop_miss < IPP_MAX_ERR_SHOW) NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, @@ -380,7 +378,7 @@ nxge_ipp_handle_sys_errors(p_nxge_t nxgep) if ((rs = npi_ipp_get_state_mach(handle, portn, &errlogp->state_mach)) != NPI_SUCCESS) return (NXGE_ERROR | rs); - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_IPP_EOP_MISS); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_ipp_err_evnts: fatal error: eop_miss\n")); @@ -398,7 +396,7 @@ nxge_ipp_handle_sys_errors(p_nxge_t nxgep) if ((rs = npi_ipp_get_ecc_syndrome(handle, portn, &errlogp->ecc_syndrome)) != NPI_SUCCESS) return (NXGE_ERROR | rs); - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_IPP_DFIFO_UE); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_ipp_err_evnts: fatal error: dfifo_ue\n")); @@ -407,7 +405,7 @@ nxge_ipp_handle_sys_errors(p_nxge_t nxgep) } if (istatus.bits.w0.pre_fifo_perr) { statsp->pfifo_perr++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_IPP_PFIFO_PERR); if (statsp->pfifo_perr < IPP_MAX_ERR_SHOW) NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, @@ -417,7 +415,7 @@ nxge_ipp_handle_sys_errors(p_nxge_t nxgep) } if (istatus.bits.w0.pre_fifo_overrun) { statsp->pfifo_over++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_IPP_PFIFO_OVER); if (statsp->pfifo_over < IPP_MAX_ERR_SHOW) NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, @@ -427,7 +425,7 @@ nxge_ipp_handle_sys_errors(p_nxge_t nxgep) } if (istatus.bits.w0.pre_fifo_underrun) { statsp->pfifo_und++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_IPP_PFIFO_UND); if (statsp->pfifo_und < IPP_MAX_ERR_SHOW) NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, @@ -474,7 +472,7 @@ nxge_ipp_handle_sys_errors(p_nxge_t nxgep) * not report the error if it is port2. */ if (portn != 2) { - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_IPP_ECC_ERR_MAX); if (statsp->ecc_err_cnt < (IPP_MAX_ERR_SHOW * IPP_ECC_CNT_MASK)) { diff --git a/usr/src/uts/common/io/nxge/nxge_kstats.c b/usr/src/uts/common/io/nxge/nxge_kstats.c index 34cfafc58d..cb3ad901de 100644 --- a/usr/src/uts/common/io/nxge/nxge_kstats.c +++ b/usr/src/uts/common/io/nxge/nxge_kstats.c @@ -134,7 +134,7 @@ nxge_kstat_index_t nxge_rdc_stats[] = { {RDC_STAT_ID_MIS, KSTAT_DATA_ULONG, "rdc_id_mismatch"}, {RDC_STAT_ZCP_EOP, KSTAT_DATA_ULONG, "rdc_zcp_eop"}, {RDC_STAT_IPP_EOP, KSTAT_DATA_ULONG, "rdc_ipp_eop"}, - {RDC_STAT_END, NULL, NULL} + {RDC_STAT_END, KSTAT_DATA_ULONG, NULL} }; typedef enum { @@ -152,7 +152,7 @@ nxge_kstat_index_t nxge_rdc_sys_stats[] = { {RDC_SYS_STAT_ID_MISMATCH, KSTAT_DATA_UINT64, "rdc_stat_id_mismatch"}, {RDC_SYS_STAT_IPP_EOP_ERR, KSTAT_DATA_UINT64, "rdc_ipp_eop_err"}, {RDC_SYS_STAT_ZCP_EOP_ERR, KSTAT_DATA_UINT64, "rdc_zcp_eop_err"}, - {RDC_SYS_STAT_END, NULL, NULL} + {RDC_SYS_STAT_END, KSTAT_DATA_UINT64, NULL} }; typedef enum { @@ -213,7 +213,7 @@ nxge_kstat_index_t nxge_tdc_stats[] = { {TDC_STAT_TX_DDI_PKTS, KSTAT_DATA_ULONG, "tdc_tx_ddi_pkts"}, {TDC_STAT_TX_DVMA_PKTS, KSTAT_DATA_ULONG, "tdc_tx_dvma_pkts"}, {TDC_STAT_TX_MAX_PEND, KSTAT_DATA_ULONG, "tdc_tx_max_pend"}, - {TDC_STAT_END, NULL, NULL} + {TDC_STAT_END, KSTAT_DATA_ULONG, NULL} }; /* IPP Statistics definitions */ @@ -240,7 +240,7 @@ nxge_kstat_index_t nxge_ipp_stats[] = { {IPP_STAT_PFIFO_UND, KSTAT_DATA_ULONG, "rxipp_pfifo_und"}, {IPP_STAT_BAD_CS, KSTAT_DATA_ULONG, "rxipp_bad_cs"}, {IPP_STAT_BAD_DIS, KSTAT_DATA_ULONG, "rxipp_bad_dis"}, - {IPP_STAT_END, NULL, NULL} + {IPP_STAT_END, KSTAT_DATA_ULONG, NULL} }; /* TXC Statistics definitions */ @@ -271,7 +271,7 @@ nxge_kstat_index_t nxge_txc_stats[] = { {TXC_STAT_LENGTH_FAILED, KSTAT_DATA_ULONG, "txc_length_failed"}, {TXC_STAT_PKT_ASSY_DEAD, KSTAT_DATA_ULONG, "txc_pkt_assy_dead"}, {TXC_STAT_REORDER_ERR, KSTAT_DATA_ULONG, "txc_reorder_err"}, - {TXC_STAT_END, NULL, NULL} + {TXC_STAT_END, KSTAT_DATA_ULONG, NULL} }; typedef enum { @@ -362,7 +362,7 @@ nxge_kstat_index_t nxge_xmac_stats[] = { {XMAC_STAT_XPCS_SYMBOL_L3_ERR_CNT, KSTAT_DATA_ULONG, "xpcs_ln3_symbol_err_cnt"}, #endif - {XMAC_STAT_END, NULL, NULL} + {XMAC_STAT_END, KSTAT_DATA_ULONG, NULL} }; typedef enum { @@ -398,7 +398,7 @@ nxge_kstat_index_t nxge_bmac_stats[] = { {BMAC_STAT_RX_PAUSE_CNT, KSTAT_DATA_ULONG, "rxmac_pause_cnt"}, {BMAC_STAT_RX_PAUSE_STATE, KSTAT_DATA_ULONG, "txmac_pause_state"}, {BMAC_STAT_RX_NOPAUSE_STATE, KSTAT_DATA_ULONG, "tx_nopause_state"}, - {BMAC_STAT_END, NULL, NULL} + {BMAC_STAT_END, KSTAT_DATA_ULONG, NULL} }; typedef enum { @@ -437,7 +437,7 @@ nxge_kstat_index_t nxge_zcp_stats[] = { {ZCP_STAT_ZCP_TT_INDEX_ERR, KSTAT_DATA_ULONG, "zcp_zcp_tt_index_err"}, {ZCP_STAT_ZCP_ACCESS_FAIL, KSTAT_DATA_ULONG, "zcp_access_fail"}, {ZCP_STAT_ZCP_ACCESS_FAIL, KSTAT_DATA_ULONG, "zcp_cfifo_ecc"}, - {ZCP_STAT_END, NULL, NULL} + {ZCP_STAT_END, KSTAT_DATA_ULONG, NULL} }; typedef enum { @@ -469,7 +469,7 @@ nxge_kstat_index_t nxge_fflp_stats[] = { {FFLP_STAT_HASH_P5_PIO_ERR, KSTAT_DATA_ULONG, "fflp_hash_p5_pio_err"}, {FFLP_STAT_HASH_P6_PIO_ERR, KSTAT_DATA_ULONG, "fflp_hash_p6_pio_err"}, {FFLP_STAT_HASH_P7_PIO_ERR, KSTAT_DATA_ULONG, "fflp_hash_p7_pio_err"}, - {FFLP_STAT_END, NULL, NULL} + {FFLP_STAT_END, KSTAT_DATA_ULONG, NULL} }; typedef enum { @@ -513,7 +513,7 @@ nxge_kstat_index_t nxge_mmac_stats[] = { {MMAC_ADDR_POOL14, KSTAT_DATA_UINT64, "mmac_addr_14"}, {MMAC_ADDR_POOL15, KSTAT_DATA_UINT64, "mmac_addr_15"}, {MMAC_ADDR_POOL16, KSTAT_DATA_UINT64, "mmac_addr_16"}, - {MMAC_STATS_END, NULL, NULL}, + {MMAC_STATS_END, KSTAT_DATA_UINT64, NULL}, }; /* ARGSUSED */ diff --git a/usr/src/uts/common/io/nxge/nxge_mac.c b/usr/src/uts/common/io/nxge/nxge_mac.c index 291272536d..ea41b54ed1 100644 --- a/usr/src/uts/common/io/nxge/nxge_mac.c +++ b/usr/src/uts/common/io/nxge/nxge_mac.c @@ -6944,7 +6944,7 @@ nxge_mac_intr(void *arg1, void *arg2) if (status & ICFG_XMAC_TX_ALL) { if (status & ICFG_XMAC_TX_UNDERRUN) { statsp->xmac_stats.tx_underflow_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_TXMAC_UNDERFLOW); } if (status & ICFG_XMAC_TX_MAX_PACKET_ERR) { @@ -6956,12 +6956,12 @@ nxge_mac_intr(void *arg1, void *arg2) } if (status & ICFG_XMAC_TX_OVERFLOW) { statsp->xmac_stats.tx_overflow_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_TXMAC_OVERFLOW); } if (status & ICFG_XMAC_TX_FIFO_XFR_ERR) { statsp->xmac_stats.tx_fifo_xfr_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_TXMAC_TXFIFO_XFR_ERR); } if (status & ICFG_XMAC_TX_BYTE_CNT_EXP) { @@ -6983,7 +6983,7 @@ nxge_mac_intr(void *arg1, void *arg2) statsp->xmac_stats.rx_overflow_err++; if (status & ICFG_XMAC_RX_UNDERFLOW) { statsp->xmac_stats.rx_underflow_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_RXMAC_UNDERFLOW); } /* @@ -7082,12 +7082,12 @@ nxge_mac_intr(void *arg1, void *arg2) if (status & ICFG_BMAC_TX_ALL) { if (status & ICFG_BMAC_TX_UNDERFLOW) { statsp->bmac_stats.tx_underrun_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_TXMAC_UNDERFLOW); } if (status & ICFG_BMAC_TX_MAXPKTSZ_ERR) { statsp->bmac_stats.tx_max_pkt_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_TXMAC_MAX_PKT_ERR); } if (status & ICFG_BMAC_TX_BYTE_CNT_EXP) { @@ -7115,19 +7115,19 @@ nxge_mac_intr(void *arg1, void *arg2) if (status & ICFG_BMAC_RX_CRC_ERR_CNT_EXP) { statsp->bmac_stats.rx_crc_err_cnt += BMAC_CRC_ER_CNT_MASK; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_RXMAC_CRC_ERRCNT_EXP); } if (status & ICFG_BMAC_RX_LEN_ERR_CNT_EXP) { statsp->bmac_stats.rx_len_err_cnt += MAC_LEN_ER_CNT_MASK; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_RXMAC_LENGTH_ERRCNT_EXP); } if (status & ICFG_BMAC_RX_VIOL_ERR_CNT_EXP) statsp->bmac_stats.rx_viol_err_cnt += BMAC_CD_VIO_CNT_MASK; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_RXMAC_VIOL_ERRCNT_EXP); } if (status & ICFG_BMAC_RX_BYTE_CNT_EXP) { @@ -7137,7 +7137,7 @@ nxge_mac_intr(void *arg1, void *arg2) if (status & ICFG_BMAC_RX_ALIGNERR_CNT_EXP) { statsp->bmac_stats.rx_align_err_cnt += BMAC_AL_ER_CNT_MASK; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_RXMAC_ALIGN_ECNT_EXP); } diff --git a/usr/src/uts/common/io/nxge/nxge_main.c b/usr/src/uts/common/io/nxge/nxge_main.c index a2ef343c76..ed0d1db6eb 100644 --- a/usr/src/uts/common/io/nxge/nxge_main.c +++ b/usr/src/uts/common/io/nxge/nxge_main.c @@ -3652,7 +3652,7 @@ nxge_dma_mem_free(p_nxge_dma_common_t dma_p) } #endif dma_p->kaddrp = NULL; - dma_p->alength = NULL; + dma_p->alength = 0; } static void diff --git a/usr/src/uts/common/io/nxge/nxge_rxdma.c b/usr/src/uts/common/io/nxge/nxge_rxdma.c index 0f2385e840..10ce6773fc 100644 --- a/usr/src/uts/common/io/nxge/nxge_rxdma.c +++ b/usr/src/uts/common/io/nxge/nxge_rxdma.c @@ -1230,7 +1230,7 @@ nxge_rxdma_hw_mode(p_nxge_t nxgep, boolean_t enable) if (set->owned.map == 0) { NXGE_DEBUG_MSG((nxgep, RX_CTL, "nxge_rxdma_regs_dump_channels: no channels")); - return (NULL); + return (0); } for (rdc = 0; rdc < NXGE_MAX_RDCS; rdc++) { @@ -2482,7 +2482,7 @@ nxge_receive_packet(p_nxge_t nxgep, " 0x%llx", channel, rcr_entry)); } #endif - NXGE_FM_REPORT_ERROR(nxgep, nxgep->mac.portnum, NULL, + NXGE_FM_REPORT_ERROR(nxgep, nxgep->mac.portnum, 0, NXGE_FM_EREPORT_RDMC_DCF_ERR); } else if (pkt_too_long_err) { rdc_stats->pkt_too_long_err++; @@ -4493,7 +4493,7 @@ nxge_rxdma_handle_sys_errors(p_nxge_t nxgep) if (stat.bits.ldw.id_mismatch) { statsp->id_mismatch++; - NXGE_FM_REPORT_ERROR(nxgep, nxgep->mac.portnum, NULL, + NXGE_FM_REPORT_ERROR(nxgep, nxgep->mac.portnum, 0, NXGE_FM_EREPORT_RDMC_ID_MISMATCH); /* Global fatal error encountered */ } @@ -4561,14 +4561,14 @@ nxge_rxdma_handle_port_errors(p_nxge_t nxgep, uint32_t ipp_status, if (ipp_status & (0x1 << portn)) { statsp->ipp_eop_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_RDMC_IPP_EOP_ERR); rxport_fatal = B_TRUE; } if (zcp_status & (0x1 << portn)) { statsp->zcp_eop_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_RDMC_ZCP_EOP_ERR); rxport_fatal = B_TRUE; } @@ -4949,9 +4949,10 @@ nxge_rxdma_databuf_free(p_rx_rbr_ring_t rbr_p) "==> nxge_rxdma_databuf_free: free chunk %d " "kaddrp $%p chunk size %d", index, kaddr, chunk_size)); - if (kaddr == NULL) continue; + if (kaddr == 0) + continue; nxge_free_buf(rbr_p->rbr_alloc_type, kaddr, chunk_size); - ring_info->buffer[index].kaddr = NULL; + ring_info->buffer[index].kaddr = 0; } NXGE_DEBUG_MSG((NULL, DMA_CTL, "<== nxge_rxdma_databuf_free")); @@ -4966,7 +4967,7 @@ nxge_free_buf(buf_alloc_type_t alloc_type, uint64_t kaddr, uint32_t buf_size) { NXGE_DEBUG_MSG((NULL, DMA_CTL, "==> nxge_free_buf")); - if (kaddr == NULL || !buf_size) { + if (kaddr == 0 || !buf_size) { NXGE_ERROR_MSG((NULL, NXGE_ERR_CTL, "==> nxge_free_buf: invalid kaddr $%p size to free %d", kaddr, buf_size)); diff --git a/usr/src/uts/common/io/nxge/nxge_txc.c b/usr/src/uts/common/io/nxge/nxge_txc.c index 6d75f477f8..7f9e34dbfa 100644 --- a/usr/src/uts/common/io/nxge/nxge_txc.c +++ b/usr/src/uts/common/io/nxge/nxge_txc.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/nxge/nxge_impl.h> #include <sys/nxge/nxge_txc.h> @@ -412,7 +410,7 @@ nxge_txc_handle_port_errors(p_nxge_t nxgep, uint32_t err_status) if (err_status & TXC_INT_STAT_RO_CORR_ERR) { statsp->ro_correct_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_TXC_RO_CORRECT_ERR); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_txc_err_evnts: " @@ -420,7 +418,7 @@ nxge_txc_handle_port_errors(p_nxge_t nxgep, uint32_t err_status) } if (err_status & TXC_INT_STAT_RO_UNCORR_ERR) { statsp->ro_uncorrect_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_TXC_RO_UNCORRECT_ERR); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_txc_err_evnts: " @@ -428,7 +426,7 @@ nxge_txc_handle_port_errors(p_nxge_t nxgep, uint32_t err_status) } if (err_status & TXC_INT_STAT_REORDER_ERR) { statsp->reorder_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_TXC_REORDER_ERR); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_txc_err_evnts: " @@ -460,7 +458,7 @@ nxge_txc_handle_port_errors(p_nxge_t nxgep, uint32_t err_status) } if (err_status & TXC_INT_STAT_SF_CORR_ERR) { statsp->sf_correct_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_TXC_SF_CORRECT_ERR); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_txc_err_evnts: " @@ -468,7 +466,7 @@ nxge_txc_handle_port_errors(p_nxge_t nxgep, uint32_t err_status) } if (err_status & TXC_INT_STAT_SF_UNCORR_ERR) { statsp->sf_uncorrect_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_TXC_SF_UNCORRECT_ERR); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_txc_err_evnts: " diff --git a/usr/src/uts/common/io/nxge/nxge_zcp.c b/usr/src/uts/common/io/nxge/nxge_zcp.c index a56efd7ea8..179ff57b38 100644 --- a/usr/src/uts/common/io/nxge/nxge_zcp.c +++ b/usr/src/uts/common/io/nxge/nxge_zcp.c @@ -127,7 +127,7 @@ nxge_zcp_handle_sys_errors(p_nxge_t nxgep) if (istatus & ICFG_ZCP_RRFIFO_UNDERRUN) { statsp->rrfifo_underrun++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_ZCP_RRFIFO_UNDERRUN); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_zcp_err_evnts: rrfifo_underrun")); @@ -135,7 +135,7 @@ nxge_zcp_handle_sys_errors(p_nxge_t nxgep) if (istatus & ICFG_ZCP_RRFIFO_OVERRUN) { statsp->rrfifo_overrun++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_ZCP_RRFIFO_OVERRUN); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_zcp_err_evnts: buf_rrfifo_overrun")); @@ -143,7 +143,7 @@ nxge_zcp_handle_sys_errors(p_nxge_t nxgep) if (istatus & ICFG_ZCP_RSPFIFO_UNCORR_ERR) { statsp->rspfifo_uncorr_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_ZCP_RSPFIFO_UNCORR_ERR); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_zcp_err_evnts: rspfifo_uncorr_err")); @@ -151,7 +151,7 @@ nxge_zcp_handle_sys_errors(p_nxge_t nxgep) if (istatus & ICFG_ZCP_BUFFER_OVERFLOW) { statsp->buffer_overflow++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_ZCP_BUFFER_OVERFLOW); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_zcp_err_evnts: buffer_overflow")); @@ -160,7 +160,7 @@ nxge_zcp_handle_sys_errors(p_nxge_t nxgep) if (istatus & ICFG_ZCP_STAT_TBL_PERR) { statsp->stat_tbl_perr++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_ZCP_STAT_TBL_PERR); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_zcp_err_evnts: stat_tbl_perr")); @@ -168,7 +168,7 @@ nxge_zcp_handle_sys_errors(p_nxge_t nxgep) if (istatus & ICFG_ZCP_DYN_TBL_PERR) { statsp->dyn_tbl_perr++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_ZCP_DYN_TBL_PERR); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_zcp_err_evnts: dyn_tbl_perr")); @@ -176,7 +176,7 @@ nxge_zcp_handle_sys_errors(p_nxge_t nxgep) if (istatus & ICFG_ZCP_BUF_TBL_PERR) { statsp->buf_tbl_perr++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_ZCP_BUF_TBL_PERR); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_zcp_err_evnts: buf_tbl_perr")); @@ -184,7 +184,7 @@ nxge_zcp_handle_sys_errors(p_nxge_t nxgep) if (istatus & ICFG_ZCP_TT_PROGRAM_ERR) { statsp->tt_program_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_ZCP_TT_PROGRAM_ERR); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_zcp_err_evnts: tt_program_err")); @@ -192,7 +192,7 @@ nxge_zcp_handle_sys_errors(p_nxge_t nxgep) if (istatus & ICFG_ZCP_RSP_TT_INDEX_ERR) { statsp->rsp_tt_index_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_ZCP_RSP_TT_INDEX_ERR); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_zcp_err_evnts: rsp_tt_index_err")); @@ -200,7 +200,7 @@ nxge_zcp_handle_sys_errors(p_nxge_t nxgep) if (istatus & ICFG_ZCP_SLV_TT_INDEX_ERR) { statsp->slv_tt_index_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_ZCP_SLV_TT_INDEX_ERR); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_zcp_err_evnts: slv_tt_index_err")); @@ -208,7 +208,7 @@ nxge_zcp_handle_sys_errors(p_nxge_t nxgep) if (istatus & ICFG_ZCP_TT_INDEX_ERR) { statsp->zcp_tt_index_err++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_ZCP_TT_INDEX_ERR); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_zcp_err_evnts: tt_index_err")); @@ -226,7 +226,7 @@ nxge_zcp_handle_sys_errors(p_nxge_t nxgep) if (ue_ecc_valid) { statsp->cfifo_ecc++; - NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, + NXGE_FM_REPORT_ERROR(nxgep, portn, 0, NXGE_FM_EREPORT_ZCP_CFIFO_ECC); NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_zcp_err_evnts: port%d buf_cfifo_ecc", |