diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-04-11 11:39:43 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-04-11 11:39:43 +0000 |
commit | e4f70ac1007dda1e42e5f5a7f307834cb429824c (patch) | |
tree | 0894ebda3bb08d662c0a4f634185b86685f412ef /usr/src | |
parent | 26dd5a91c086ec5f65eaaa39f0651013e22d28e9 (diff) | |
parent | 21cce053c53f8dd4d7cf62745effd4c46fbb143c (diff) | |
download | illumos-joyent-e4f70ac1007dda1e42e5f5a7f307834cb429824c.tar.gz |
[illumos-gate merge]
commit 21cce053c53f8dd4d7cf62745effd4c46fbb143c
10638 sd: NULL pointer errors
commit b37cc459553d18521fb935664dd7deb03b07c6a7
10628 nxge: NULL pointer errors
Conflicts:
usr/src/uts/common/io/scsi/targets/sd.c
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 | ||||
-rw-r--r-- | usr/src/uts/common/io/scsi/targets/sd.c | 96 |
11 files changed, 117 insertions, 123 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", diff --git a/usr/src/uts/common/io/scsi/targets/sd.c b/usr/src/uts/common/io/scsi/targets/sd.c index 3d6deb02b1..8b4f5f2010 100644 --- a/usr/src/uts/common/io/scsi/targets/sd.c +++ b/usr/src/uts/common/io/scsi/targets/sd.c @@ -1762,7 +1762,7 @@ static struct cb_ops sd_cb_ops = { 0, /* streamtab */ D_64BIT | D_MP | D_NEW | D_HOTPLUG, /* Driver compatibility flags */ CB_REV, /* cb_rev */ - sdaread, /* async I/O read entry point */ + sdaread, /* async I/O read entry point */ sdawrite /* async I/O write entry point */ }; @@ -2809,7 +2809,7 @@ sdprobe(dev_info_t *devi) * Function: sdinfo * * Description: This is the driver getinfo(9e) entry point function. - * Given the device number, return the devinfo pointer from + * Given the device number, return the devinfo pointer from * the scsi_device structure or the instance number * associated with the dev_t. * @@ -3098,11 +3098,11 @@ sd_scsi_target_lun_fini(void) * Function: sd_scsi_get_target_lun_count * * Description: This routine will check in the attached lun chain to see - * how many luns are attached on the required SCSI controller - * and target. Currently, some capabilities like tagged queue + * how many luns are attached on the required SCSI controller + * and target. Currently, some capabilities like tagged queue * are supported per target based by HBA. So all luns in a * target have the same capabilities. Based on this assumption, - * sd should only set these capabilities once per target. This + * sd should only set these capabilities once per target. This * function is called when sd needs to decide how many luns * already attached on a target. * @@ -3113,7 +3113,7 @@ sd_scsi_target_lun_fini(void) * Return Code: The number of luns attached on the required target and * controller. * -1 if target ID is not in parallel SCSI scope or the given - * dip is not in the chain. + * dip is not in the chain. * * Context: Kernel thread context */ @@ -3214,7 +3214,7 @@ sd_spin_up_unit(sd_ssc_t *ssc) size_t resid = 0; int has_conflict = FALSE; uchar_t *bufaddr; - int status; + int status; struct sd_lun *un; ASSERT(ssc != NULL); @@ -3834,7 +3834,7 @@ sd_read_unit_properties(struct sd_lun *un) * * If version = SD_CONF_VERSION_1 we have the following syntax: * - * <data-property-name>:=<version>,<flags>,<prop0>,<prop1>,.....<propN> + * <data-property-name>:=<version>,<flags>,<prop0>,<prop1>,.....<propN> * * where the prop0 value will be used to set prop0 if bit0 set in the * flags, prop1 if bit1 set, etc. and N = SD_CONF_MAX_ITEMS -1 @@ -4711,7 +4711,7 @@ sd_chk_vers1_data(struct sd_lun *un, int flags, int *prop_list, * retrieved from the driver configuration file or static * configuration table. Version 1 properties have the format: * - * <data-property-name>:=<version>,<flags>,<prop0>,<prop1>,.....<propN> + * <data-property-name>:=<version>,<flags>,<prop0>,<prop1>,.....<propN> * * where the prop0 value will be used to set prop0 if bit0 * is set in the flags @@ -5022,7 +5022,7 @@ sd_get_physical_geometry(struct sd_lun *un, cmlb_geom_t *pgeom_p, uchar_t *p3bufp; uchar_t *p4bufp; int cdbsize; - int ret = EIO; + int ret = EIO; sd_ssc_t *ssc; int status; @@ -5941,7 +5941,7 @@ sd_check_vpd_page_support(sd_ssc_t *ssc) uchar_t page_length = 0xff; /* Use max possible length */ uchar_t evpd = 0x01; /* Set the EVPD bit */ uchar_t page_code = 0x00; /* Supported VPD Pages */ - int rval = 0; + int rval = 0; int counter; struct sd_lun *un; @@ -6605,8 +6605,8 @@ sd_ddi_resume(dev_info_t *devi) * Function: sd_pm_state_change * * Description: Change the driver power state. - * Someone else is required to actually change the driver - * power level. + * Someone else is required to actually change the driver + * power level. * * Arguments: un - driver soft state (unit) structure * level - the power level that is changed to @@ -9336,7 +9336,7 @@ static void sd_set_errstats(struct sd_lun *un) { struct sd_errstats *stp; - char *sn; + char *sn; ASSERT(un != NULL); ASSERT(un->un_errstats != NULL); @@ -9776,14 +9776,14 @@ sd_cache_control(sd_ssc_t *ssc, int rcd_flag, int wce_flag) * NOTE: If ioctl is added to disable write cache, this sequence should * be followed so that no locking is required for accesses to * un->un_f_write_cache_enabled: - * do mode select to clear wce - * do synchronize cache to flush cache - * set un->un_f_write_cache_enabled = FALSE + * do mode select to clear wce + * do synchronize cache to flush cache + * set un->un_f_write_cache_enabled = FALSE * * Conversely, an ioctl to enable the write cache should be done * in this order: - * set un->un_f_write_cache_enabled = TRUE - * do mode select to set wce + * set un->un_f_write_cache_enabled = TRUE + * do mode select to set wce */ static int @@ -10646,7 +10646,7 @@ sdclose(dev_t dev, int flag, int otyp, cred_t *cred_p) cp = &un->un_ocmap.chkd[0]; while (cp < &un->un_ocmap.chkd[OCSIZE]) { - if (*cp != NULL) { + if (*cp != '\0') { break; } cp++; @@ -12323,7 +12323,7 @@ sd_ssc_print(sd_ssc_t *ssc, int sd_severity) { struct uscsi_cmd *ucmdp; struct scsi_device *devp; - dev_info_t *devinfo; + dev_info_t *devinfo; uchar_t *sensep; int senlen; union scsi_cdb *cdbp; @@ -14177,7 +14177,7 @@ sd_setup_rw_pkt(struct sd_lun *un, * Function: sd_setup_next_rw_pkt * * Description: Setup packet for partial DMA transfers, except for the - * initial transfer. sd_setup_rw_pkt should be used for + * initial transfer. sd_setup_rw_pkt should be used for * the initial transfer. * * Context: Kernel thread and may be called from interrupt context. @@ -16558,16 +16558,16 @@ sd_mark_rqs_busy(struct sd_lun *un, struct buf *bp) sense_xp->xb_pktp->pkt_path_instance = ((SD_GET_XBUF(bp))->xb_pktp)->pkt_path_instance; - sense_xp->xb_retry_count = 0; + sense_xp->xb_retry_count = 0; sense_xp->xb_victim_retry_count = 0; - sense_xp->xb_ua_retry_count = 0; - sense_xp->xb_nr_retry_count = 0; + sense_xp->xb_ua_retry_count = 0; + sense_xp->xb_nr_retry_count = 0; sense_xp->xb_dma_resid = 0; /* Clean up the fields for auto-request sense */ sense_xp->xb_sense_status = 0; - sense_xp->xb_sense_state = 0; - sense_xp->xb_sense_resid = 0; + sense_xp->xb_sense_state = 0; + sense_xp->xb_sense_resid = 0; bzero(sense_xp->xb_sense_data, sizeof (sense_xp->xb_sense_data)); SD_TRACE(SD_LOG_IO_CORE, un, "sd_mark_rqs_busy: exit\n"); @@ -18750,7 +18750,7 @@ sd_sense_key_illegal_request(struct sd_lun *un, struct buf *bp, */ static void -sd_sense_key_unit_attention(struct sd_lun *un, uint8_t *sense_datap, +sd_sense_key_unit_attention(struct sd_lun *un, uint8_t *sense_datap, struct buf *bp, struct sd_xbuf *xp, struct scsi_pkt *pktp) { /* @@ -23043,7 +23043,8 @@ skip_ready_valid: case MHIOCGRP_INKEYS: SD_TRACE(SD_LOG_IOCTL, un, "MHIOCGRP_INKEYS\n"); - if (((err = drv_priv(cred_p)) != EPERM) && arg != NULL) { + if (((err = drv_priv(cred_p)) != EPERM) && + arg != (intptr_t)NULL) { if (un->un_reservation_type == SD_SCSI2_RESERVATION) { err = ENOTSUP; } else { @@ -23055,7 +23056,8 @@ skip_ready_valid: case MHIOCGRP_INRESV: SD_TRACE(SD_LOG_IOCTL, un, "MHIOCGRP_INRESV\n"); - if (((err = drv_priv(cred_p)) != EPERM) && arg != NULL) { + if (((err = drv_priv(cred_p)) != EPERM) && + arg != (intptr_t)NULL) { if (un->un_reservation_type == SD_SCSI2_RESERVATION) { err = ENOTSUP; } else { @@ -23069,7 +23071,7 @@ skip_ready_valid: if ((err = drv_priv(cred_p)) != EPERM) { if (un->un_reservation_type == SD_SCSI2_RESERVATION) { err = ENOTSUP; - } else if (arg != NULL) { + } else if (arg != (intptr_t)NULL) { mhioc_register_t reg; if (ddi_copyin((void *)arg, ®, sizeof (mhioc_register_t), flag) != 0) { @@ -23091,7 +23093,7 @@ skip_ready_valid: if ((err = drv_priv(cred_p)) != EPERM) { if (un->un_reservation_type == SD_SCSI2_RESERVATION) { err = ENOTSUP; - } else if (arg != NULL) { + } else if (arg != (intptr_t)NULL) { mhioc_register_t reg; if (ddi_copyin((void *)arg, ®, sizeof (mhioc_register_t), flag) != 0) { @@ -23113,7 +23115,7 @@ skip_ready_valid: if ((err = drv_priv(cred_p)) != EPERM) { if (un->un_reservation_type == SD_SCSI2_RESERVATION) { err = ENOTSUP; - } else if (arg != NULL) { + } else if (arg != (intptr_t)NULL) { mhioc_resv_desc_t resv_desc; if (ddi_copyin((void *)arg, &resv_desc, sizeof (mhioc_resv_desc_t), flag) != 0) { @@ -23135,7 +23137,7 @@ skip_ready_valid: if ((err = drv_priv(cred_p)) != EPERM) { if (un->un_reservation_type == SD_SCSI2_RESERVATION) { err = ENOTSUP; - } else if (arg != NULL) { + } else if (arg != (intptr_t)NULL) { mhioc_preemptandabort_t preempt_abort; if (ddi_copyin((void *)arg, &preempt_abort, sizeof (mhioc_preemptandabort_t), @@ -23158,7 +23160,7 @@ skip_ready_valid: if ((err = drv_priv(cred_p)) != EPERM) { if (un->un_reservation_type == SD_SCSI2_RESERVATION) { err = ENOTSUP; - } else if (arg != NULL) { + } else if (arg != (intptr_t)NULL) { mhioc_registerandignorekey_t r_and_i; if (ddi_copyin((void *)arg, (void *)&r_and_i, sizeof (mhioc_registerandignorekey_t), @@ -24733,7 +24735,7 @@ done: * * Return Code: -1 - on error (log sense is optional and may not be supported). * 0 - log page not found. - * 1 - log page found. + * 1 - log page found. */ static int @@ -25413,7 +25415,7 @@ sd_mhd_watch_cb(caddr_t arg, struct scsi_watch_result *resultp) uint8_t *sensep; struct scsi_pkt *pkt; uchar_t actual_sense_length; - dev_t dev = (dev_t)arg; + dev_t dev = (dev_t)arg; ASSERT(resultp != NULL); statusp = resultp->statusp; @@ -26754,9 +26756,9 @@ sd_send_polled_RQS(struct sd_lun *un) * If the request sense buffer (and packet) is not in use, * let's set the un_sense_isbusy and send our packet */ - un->un_sense_isbusy = 1; - rqs_pktp->pkt_resid = 0; - rqs_pktp->pkt_reason = 0; + un->un_sense_isbusy = 1; + rqs_pktp->pkt_resid = 0; + rqs_pktp->pkt_reason = 0; rqs_pktp->pkt_flags |= FLAG_NOINTR; bzero(rqs_bp->b_un.b_addr, SENSE_LENGTH); @@ -26799,7 +26801,7 @@ sd_send_polled_RQS(struct sd_lun *un) * Specifically this routine cures not ready, coming ready * transition for power up and reset of sonoma's. This can take * up to 45 seconds for power-on and 20 seconds for reset of a - * sonoma lun. + * sonoma lun. * * Arguments: scsi_pkt - The scsi_pkt being sent to a device * @@ -27011,7 +27013,7 @@ sd_persistent_reservation_in_read_keys(struct sd_lun *un, mhioc_inkeys_t *ptr; mhioc_key_list_t li; uchar_t *data_bufp = NULL; - int data_len = 0; + int data_len = 0; int rval = 0; size_t copysz = 0; sd_ssc_t *ssc; @@ -27171,9 +27173,9 @@ sd_persistent_reservation_in_read_resv(struct sd_lun *un, mhioc_inresvs_t *ptr; sd_readresv_desc_t *readresv_ptr; mhioc_resv_desc_list_t resvlist; - mhioc_resv_desc_t resvdesc; + mhioc_resv_desc_t resvdesc; uchar_t *data_bufp = NULL; - int data_len; + int data_len; int rval = 0; int i; size_t copysz = 0; @@ -28432,7 +28434,7 @@ sr_read_tocentry(dev_t dev, caddr_t data, int flag) * Function: sr_read_tochdr() * * Description: This routine is the driver entry point for handling CD-ROM - * ioctl requests to read the Table of Contents (TOC) header + * ioctl requests to read the Table of Contents (TOC) header * (CDROMREADTOHDR). The TOC header consists of the disk starting * and ending track numbers * @@ -29711,7 +29713,7 @@ sr_read_sony_session_offset(dev_t dev, caddr_t data, int flag) * Function: sd_wm_cache_constructor() * * Description: Cache Constructor for the wmap cache for the read/modify/write - * devices. + * devices. * * Arguments: wm - A pointer to the sd_w_map to be initialized. * un - sd_lun structure for the device. @@ -29735,7 +29737,7 @@ sd_wm_cache_constructor(void *wm, void *un, int flags) * Function: sd_wm_cache_destructor() * * Description: Cache destructor for the wmap cache for the read/modify/write - * devices. + * devices. * * Arguments: wm - A pointer to the sd_w_map to be initialized. * un - sd_lun structure for the device. |