diff options
| author | Andriy Gapon <avg@FreeBSD.org> | 2021-05-07 07:17:57 +0000 |
|---|---|---|
| committer | Andriy Gapon <avg@FreeBSD.org> | 2021-05-07 07:17:57 +0000 |
| commit | 8afecefd57c5ac95200f43227cd00f265154acee (patch) | |
| tree | f51631159590442d07311c7e116cfb0ac8f52ef4 | |
| parent | 1ed5f62d61accf8c7a4d45e2e701a0179ff2fe1b (diff) | |
| -rw-r--r-- | sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c index 968de9d14e7b..702308e26a1d 100644 --- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c @@ -2406,7 +2406,8 @@ storvsc_io_done(struct hv_storvsc_request *reqp) else ccb->csio.resid = ccb->csio.dxfer_len; - if (reqp->sense_info_len != 0) { + if ((vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID) != 0 && + reqp->sense_info_len != 0) { csio->sense_resid = csio->sense_len - reqp->sense_info_len; ccb->ccb_h.status |= CAM_AUTOSNS_VALID; } |
