summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.co.uk>2021-09-17 08:54:13 +0000
committerAndy Fiddaman <omnios@citrus-it.co.uk>2021-12-09 21:49:56 +0000
commit9ca05893faec45ccbe9cfa6b59b1a79960d9f7a7 (patch)
treeca40c4bc396dce4e43febe3783ba35f15632fee5 /usr/src
parent3cac7b0d73edf3f2674ad0f64d1fff3d2e59ae8c (diff)
downloadillumos-gate-9ca05893faec45ccbe9cfa6b59b1a79960d9f7a7.tar.gz
5060 Assertion failure in iprb during watchdog reset
Reviewed by: Yuri Pankov <ypankov@tintri.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/iprb/iprb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr/src/uts/common/io/iprb/iprb.c b/usr/src/uts/common/io/iprb/iprb.c
index 0dfcce6e12..15022a5f45 100644
--- a/usr/src/uts/common/io/iprb/iprb.c
+++ b/usr/src/uts/common/io/iprb/iprb.c
@@ -11,6 +11,7 @@
/*
* Copyright 2014 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
*/
/*
@@ -787,10 +788,9 @@ iprb_cmd_submit(iprb_t *ip, uint16_t cmd)
iprb_dma_t *
iprb_cmd_next(iprb_t *ip)
{
- if (ip->cmd_count == NUM_TX) {
+ if (ip->cmd_count >= NUM_TX) {
return (NULL);
}
- ASSERT(ip->cmd_count < NUM_TX);
return (&ip->cmds[ip->cmd_head]);
}
@@ -960,6 +960,7 @@ iprb_start(iprb_t *ip)
/* Reset pointers */
ip->cmd_head = ip->cmd_tail = 0;
ip->cmd_last = NUM_TX - 1;
+ ip->cmd_count = 0;
if (iprb_cmd_ready(ip) != DDI_SUCCESS)
return (DDI_FAILURE);
@@ -975,7 +976,7 @@ iprb_start(iprb_t *ip)
/* Send a NOP. This will be the first command seen by the device. */
cb = iprb_cmd_next(ip);
- ASSERT(cb);
+ VERIFY3P(cb, !=, NULL);
if (iprb_cmd_submit(ip, CB_CMD_NOP) != DDI_SUCCESS)
return (DDI_FAILURE);