Print this page
First attempt at pulling 4310 fix from Andy Giles tree

@@ -1194,21 +1194,19 @@
          * clear the TM slot before returning
          */
         slots->m_slot[MPTSAS_TM_SLOT(mpt)] = NULL;
 
         /*
-         * If we lost our task management command
-         * we need to reset the ioc
+         * If we lost our task management command we need to reset the ioc
+         * but we can't do it here as it's most likely we were called from
+         * the taskq that mptsas_restart_ioc()->mptsas_flush_hba() needs to
+         * wait for. So set a flag for mptsas_watch().
          */
         if (rval == FALSE) {
                 mptsas_log(mpt, CE_WARN, "mptsas_ioc_task_management failed "
-                    "try to reset ioc to recovery!");
-                mpt->m_softstate &= ~MPTSAS_SS_MSG_UNIT_RESET;
-                if (mptsas_restart_ioc(mpt)) {
-                        mptsas_log(mpt, CE_WARN, "mptsas_restart_ioc failed");
-                        rval = FAILED;
-                }
+                    "schedule reset in watch!");
+                mpt->m_softstate |= MPTSAS_SS_RESET_INWATCH;
         }
 
         return (rval);
 }