Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. int
  2. mptsas_restart_ioc(mptsas_t *mpt)
  3. {
  4. int rval = DDI_SUCCESS;
  5. mptsas_target_t *ptgt = NULL;
  6.  
  7. ASSERT(mutex_owned(&mpt->m_mutex));
  8.  
  9. /*
  10. * Wait until all the allocated sense data buffers for DMA are freed.
  11. */
  12. while (mpt->m_extreq_sense_refcount > 0)
  13. cv_wait(&mpt->m_extreq_sense_refcount_cv, &mpt->m_mutex);
  14.  
  15. /*
  16. * Set a flag telling I/O path that we're processing a reset. This is
  17. * needed because after the reset is complete, the hash table still
  18. * needs to be rebuilt. If I/Os are started before the hash table is
  19. * rebuilt, I/O errors will occur. This flag allows I/Os to be marked
  20. * so that they can be retried.
  21. */
  22. mpt->m_in_reset = TRUE;
  23.  
  24. /*
  25. * Set all throttles to HOLD
  26. */
  27. for (ptgt = refhash_first(mpt->m_targets); ptgt != NULL;
  28. ptgt = refhash_next(mpt->m_targets, ptgt)) {
  29. mptsas_set_throttle(mpt, ptgt, HOLD_THROTTLE);
  30. }
  31.  
  32. /*
  33. * Disable interrupts
  34. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement