Mercurial > illumos > illumos-gate
changeset 10571:6d0b902a4da8
6860483 St detaches when it shouldn't
6865002 st debug binary panics if cable is pulled during I/O
author | rn150214@v4u-2900a-blr03 |
---|---|
date | Thu, 17 Sep 2009 12:49:27 +0530 |
parents | c21442694040 |
children | e1b76e0de5ea |
files | usr/src/uts/common/io/scsi/targets/st.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/scsi/targets/st.c Wed Sep 16 22:11:59 2009 -0700 +++ b/usr/src/uts/common/io/scsi/targets/st.c Thu Sep 17 12:49:27 2009 +0530 @@ -1313,8 +1313,8 @@ (un->un_pos.blkno != 0)) || /* Or within first file */ ((un->un_pos.pmode == logical) && (un->un_pos.lgclblkno > 0))) && - ((un->un_state != ST_STATE_CLOSED) && - (un->un_laststate != ST_STATE_CLOSING)))) { + ((un->un_state == ST_STATE_CLOSED) && + (un->un_laststate == ST_STATE_CLOSING)))) { ST_DEBUG(ST_DEVINFO, st_label, SCSI_DEBUG, "cannot detach: pmode=%d fileno=0x%x, blkno=0x%x" @@ -17015,6 +17015,12 @@ case CMD_TRAN_ERR: action = QUE_COMMAND; break; + case CMD_DEV_GONE: + if (un->un_multipath) + action = PATH_FAILED; + else + action = COMMAND_DONE_ERROR; + break; default: ST_DEBUG(ST_DEVINFO, st_label, CE_PANIC, "pkt_reason not handled yet %s",