1186 "reply data for TM request");
1187 break;
1188 }
1189 }
1190 mutex_enter(&mpt->m_mutex);
1191 }
1192
1193 /*
1194 * clear the TM slot before returning
1195 */
1196 slots->m_slot[MPTSAS_TM_SLOT(mpt)] = NULL;
1197
1198 /*
1199 * If we lost our task management command
1200 * we need to reset the ioc
1201 */
1202 if (rval == FALSE) {
1203 mptsas_log(mpt, CE_WARN, "mptsas_ioc_task_management failed "
1204 "try to reset ioc to recovery!");
1205 mpt->m_softstate &= ~MPTSAS_SS_MSG_UNIT_RESET;
1206 if (mptsas_restart_ioc(mpt)) {
1207 mptsas_log(mpt, CE_WARN, "mptsas_restart_ioc failed");
1208 rval = FAILED;
1209 }
1210 }
1211
1212 return (rval);
1213 }
1214
1215 /*
1216 * Complete firmware download frame for v2.0 cards.
1217 */
1218 static void
1219 mptsas_uflash2(pMpi2FWDownloadRequest fwdownload,
1220 ddi_acc_handle_t acc_hdl, uint32_t size, uint8_t type,
1221 ddi_dma_cookie_t flsh_cookie)
1222 {
1223 pMpi2FWDownloadTCSGE_t tcsge;
1224 pMpi2SGESimple64_t sge;
1225 uint32_t flagslength;
1226
1227 ddi_put8(acc_hdl, &fwdownload->Function,
1228 MPI2_FUNCTION_FW_DOWNLOAD);
1229 ddi_put8(acc_hdl, &fwdownload->ImageType, type);
|
1186 "reply data for TM request");
1187 break;
1188 }
1189 }
1190 mutex_enter(&mpt->m_mutex);
1191 }
1192
1193 /*
1194 * clear the TM slot before returning
1195 */
1196 slots->m_slot[MPTSAS_TM_SLOT(mpt)] = NULL;
1197
1198 /*
1199 * If we lost our task management command
1200 * we need to reset the ioc
1201 */
1202 if (rval == FALSE) {
1203 mptsas_log(mpt, CE_WARN, "mptsas_ioc_task_management failed "
1204 "try to reset ioc to recovery!");
1205 mpt->m_softstate &= ~MPTSAS_SS_MSG_UNIT_RESET;
1206 /* Let's try this instead of the old codepath commented below... */
1207 ddi_taskq_dispatch(mpt->m_reset_taskq, mptsas_handle_restart_ioc, (void *)mpt, DDI_SLEEP);
1208 mptsas_log(mpt,CE_WARN,"mptsas_restart_ioc dispatch attempted");
1209 rval = FAILED;
1210 /* if (mptsas_restart_ioc(mpt)) {
1211 mptsas_log(mpt, CE_WARN, "mptsas_restart_ioc failed");
1212 rval = FAILED;
1213 }
1214 */
1215 }
1216
1217 return (rval);
1218 }
1219
1220 /*
1221 * Complete firmware download frame for v2.0 cards.
1222 */
1223 static void
1224 mptsas_uflash2(pMpi2FWDownloadRequest fwdownload,
1225 ddi_acc_handle_t acc_hdl, uint32_t size, uint8_t type,
1226 ddi_dma_cookie_t flsh_cookie)
1227 {
1228 pMpi2FWDownloadTCSGE_t tcsge;
1229 pMpi2SGESimple64_t sge;
1230 uint32_t flagslength;
1231
1232 ddi_put8(acc_hdl, &fwdownload->Function,
1233 MPI2_FUNCTION_FW_DOWNLOAD);
1234 ddi_put8(acc_hdl, &fwdownload->ImageType, type);
|