HomeFreeBSD

storvsc: fix auto-sense reporting

Description

storvsc: fix auto-sense reporting

I saw a situation where the driver set CAM_AUTOSNS_VALID on a failed ccb
even though SRB_STATUS_AUTOSENSE_VALID was not set in the status.
The actual sense data remained all zeros.
The problem seems to be that create_storvsc_request() always sets
hv_storvsc_request::sense_info_len, so checking for sense_info_len != 0
is not enough to determine if any auto-sense data is actually available.

Reviewed by: whu, imp
MFC after: 2 weeks
Sponsored by: CyberSecure
Differential Revision: https://reviews.freebsd.org/D30124

Details

Provenance
avgAuthored on May 7 2021, 7:17 AM
Reviewer
whu
Differential Revision
D30124: storvsc: fix auto-sense reporting
Parents
rG1ed5f62d61ac: Add chr/blk devices support.
Branches
Unknown
Tags
Unknown