Page MenuHomeFreeBSD

storvsc: fix auto-sense reporting
ClosedPublic

Authored by avg on May 5 2021, 2:14 PM.

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

avg requested review of this revision.May 5 2021, 2:14 PM

The cam part of this looks good. Don't know if that's the right bit to test, but it sure sounds like it

This revision is now accepted and ready to land.May 5 2021, 2:41 PM

Thanks for fixing this.

This revision was automatically updated to reflect the committed changes.