Print this page
4233 mptsas topo change buffer overflow
*** 869,880 ****
MPTSAS_VIRTUAL_PORT);
mptsas_log(mpt, CE_WARN, "mptsas virtual port "
"prop update failed");
return (DDI_FAILURE);
}
! mptsas_smhba_set_phy_props(mpt,
! iport, dip, numphys, &attached_devhdl);
mutex_enter(&mpt->m_mutex);
page_address = (MPI2_SAS_DEVICE_PGAD_FORM_HANDLE &
MPI2_SAS_DEVICE_PGAD_FORM_MASK) | (uint32_t)attached_devhdl;
rval = mptsas_get_sas_device_page0(mpt, page_address, &dev_hdl,
--- 869,880 ----
MPTSAS_VIRTUAL_PORT);
mptsas_log(mpt, CE_WARN, "mptsas virtual port "
"prop update failed");
return (DDI_FAILURE);
}
! mptsas_smhba_set_all_phy_props(mpt, dip, numphys, phy_mask,
! &attached_devhdl);
mutex_enter(&mpt->m_mutex);
page_address = (MPI2_SAS_DEVICE_PGAD_FORM_HANDLE &
MPI2_SAS_DEVICE_PGAD_FORM_MASK) | (uint32_t)attached_devhdl;
rval = mptsas_get_sas_device_page0(mpt, page_address, &dev_hdl,
*** 5951,5963 ****
mptsas_log(mpt, CE_WARN, "mptsas phy"
" update failed");
return;
}
mutex_exit(&mpt->m_mutex);
! mptsas_smhba_set_phy_props(mpt,
! ddi_get_name_addr(parent), parent,
! 1, &attached_devhdl);
if (ddi_prop_update_int(DDI_DEV_T_NONE, parent,
MPTSAS_VIRTUAL_PORT, 0) !=
DDI_PROP_SUCCESS) {
(void) ddi_prop_remove(DDI_DEV_T_NONE,
parent, MPTSAS_VIRTUAL_PORT);
--- 5951,5968 ----
mptsas_log(mpt, CE_WARN, "mptsas phy"
" update failed");
return;
}
mutex_exit(&mpt->m_mutex);
!
! /*
! * topo_node->un.physport is really the PHY#
! * for direct attached devices
! */
! mptsas_smhba_set_one_phy_props(mpt, parent,
! topo_node->un.physport, &attached_devhdl);
!
if (ddi_prop_update_int(DDI_DEV_T_NONE, parent,
MPTSAS_VIRTUAL_PORT, 0) !=
DDI_PROP_SUCCESS) {
(void) ddi_prop_remove(DDI_DEV_T_NONE,
parent, MPTSAS_VIRTUAL_PORT);
*** 14897,14908 ****
"failed");
goto smp_create_done;
}
mutex_exit(&mpt->m_mutex);
! mptsas_smhba_set_phy_props(mpt, iport, pdip,
! numphys, &attached_devhdl);
if (ddi_prop_update_int(DDI_DEV_T_NONE, pdip,
MPTSAS_NUM_PHYS, numphys) !=
DDI_PROP_SUCCESS) {
(void) ddi_prop_remove(DDI_DEV_T_NONE, pdip,
--- 14902,14913 ----
"failed");
goto smp_create_done;
}
mutex_exit(&mpt->m_mutex);
! mptsas_smhba_set_all_phy_props(mpt, pdip, numphys, phy_mask,
! &attached_devhdl);
if (ddi_prop_update_int(DDI_DEV_T_NONE, pdip,
MPTSAS_NUM_PHYS, numphys) !=
DDI_PROP_SUCCESS) {
(void) ddi_prop_remove(DDI_DEV_T_NONE, pdip,