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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas.c
          +++ new/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas.c
↓ open down ↓ 9846 lines elided ↑ open up ↑
9847 9847                  if ((doorbell & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_FAULT) {
9848 9848                          doorbell &= MPI2_DOORBELL_DATA_MASK;
9849 9849                          mptsas_log(mpt, CE_WARN, "MPT Firmware Fault, "
9850 9850                              "code: %04x", doorbell);
9851 9851                          mpt->m_softstate &= ~MPTSAS_SS_MSG_UNIT_RESET;
9852 9852                          if ((mptsas_restart_ioc(mpt)) == DDI_FAILURE) {
9853 9853                                  mptsas_log(mpt, CE_WARN, "Reset failed"
9854 9854                                      "after fault was detected");
9855 9855                          }
9856 9856                  }
     9857 +                
     9858 +                /*
     9859 +                 * If we set the "please reset me" flag, then reset.
     9860 +                 */
     9861 +                if (mpt->m_softstate & MPTSAS_SS_RESET_INWATCH) {
     9862 +                        doorbell = ddi_get32(mpt->m_datap,
     9863 +                            &mpt->m_reg->Doorbell);
     9864 +                        mptsas_log(mpt, CE_WARN, "MPT Forced Reset, "
     9865 +                            "doorbell: %04x", doorbell);
     9866 +                        mpt->m_softstate &= ~MPTSAS_SS_MSG_UNIT_RESET;
     9867 +                        if (mpt->m_softstate & MPTSAS_SS_MUR_INWATCH)
     9868 +                                mpt->m_softstate |= MPTSAS_SS_MSG_UNIT_RESET;
     9869 +                        mpt->m_softstate &= ~(MPTSAS_SS_RESET_INWATCH|
     9870 +                            MPTSAS_SS_MUR_INWATCH);
     9871 +                        if ((mptsas_restart_ioc(mpt)) == DDI_FAILURE) {
     9872 +                                mptsas_log(mpt, CE_WARN, "Reset failed"
     9873 +                                    "after fault was detected");
     9874 +                        }
     9875 +                }
     9876 +                
9857 9877  
9858 9878                  /*
9859 9879                   * For now, always call mptsas_watchsubr.
9860 9880                   */
9861 9881                  mptsas_watchsubr(mpt);
9862 9882  
9863 9883                  if (mpt->m_options & MPTSAS_OPT_PM) {
9864 9884                          mpt->m_busy = 0;
9865 9885                          (void) pm_idle_component(mpt->m_dip, 0);
9866 9886                  }
↓ open down ↓ 6652 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX