Mercurial > illumos > illumos-gate
changeset 13000:28d31e0a7784
6972351 assertion failed: wp != NULL, file: pmcs_scsa.c
author | Srikanth Suravajhala <srikanth.suravajhala@oracle.com> |
---|---|
date | Mon, 02 Aug 2010 12:39:37 -0700 |
parents | 9e5c3f16523e |
children | 1e6b26d10a55 |
files | usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_scsa.c |
diffstat | 1 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_scsa.c Mon Aug 02 12:21:53 2010 -0700 +++ b/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_scsa.c Mon Aug 02 12:39:37 2010 -0700 @@ -1633,11 +1633,8 @@ pwrk->xp = xp; pwrk->arg = sp; + pwrk->timer = 0; sp->cmd_tag = pwrk->htag; - pwrk->timer = US2WT(CMD2PKT(sp)->pkt_time * 1000000); - if (pwrk->timer == 0) { - pwrk->timer = US2WT(1000000); - } pwrk->dtype = xp->dtype; @@ -1975,6 +1972,12 @@ STAILQ_INSERT_TAIL(&xp->aq, sp, cmd_next); mutex_exit(&xp->aqlock); INC_IQ_ENTRY(pwp, iq); + mutex_enter(&pwrk->lock); + pwrk->timer = US2WT(CMD2PKT(sp)->pkt_time * 1000000); + if (pwrk->timer == 0) { + pwrk->timer = US2WT(1000000); + } + mutex_exit(&pwrk->lock); /* * If we just submitted the last command queued from device state @@ -2587,6 +2590,12 @@ pmcs_print_entry(pwp, PMCS_PRT_DEBUG3, "SATA INI Message", ptr); #endif INC_IQ_ENTRY(pwp, iq); + mutex_enter(&pwrk->lock); + pwrk->timer = US2WT(CMD2PKT(sp)->pkt_time * 1000000); + if (pwrk->timer == 0) { + pwrk->timer = US2WT(1000000); + } + mutex_exit(&pwrk->lock); return (PMCS_WQ_RUN_SUCCESS); }