Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int
- mptsas_restart_ioc(mptsas_t *mpt)
- {
- int rval = DDI_SUCCESS;
- mptsas_target_t *ptgt = NULL;
- ASSERT(mutex_owned(&mpt->m_mutex));
- /*
- * Wait until all the allocated sense data buffers for DMA are freed.
- */
- while (mpt->m_extreq_sense_refcount > 0)
- cv_wait(&mpt->m_extreq_sense_refcount_cv, &mpt->m_mutex);
- /*
- * Set a flag telling I/O path that we're processing a reset. This is
- * needed because after the reset is complete, the hash table still
- * needs to be rebuilt. If I/Os are started before the hash table is
- * rebuilt, I/O errors will occur. This flag allows I/Os to be marked
- * so that they can be retried.
- */
- mpt->m_in_reset = TRUE;
- /*
- * Set all throttles to HOLD
- */
- for (ptgt = refhash_first(mpt->m_targets); ptgt != NULL;
- ptgt = refhash_next(mpt->m_targets, ptgt)) {
- mptsas_set_throttle(mpt, ptgt, HOLD_THROTTLE);
- }
- /*
- * Disable interrupts
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement