]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 302541,302605
authorsephe <sephe@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 15 Jul 2016 02:29:10 +0000 (02:29 +0000)
committersephe <sephe@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 15 Jul 2016 02:29:10 +0000 (02:29 +0000)
commitc8497b9eadf471abb07aad8d1e4192552f62cda6
tree9c66cb5e43dc5dfdd374f8bcadcd4f0e42e25099
parent345cabe8b0e113832d48537acb69ab63dafe55f1
MFC 302541,302605

302541
    hyperv/stor: Fix the INQUIRY checks

    Don't check the area that the host has not filled.

    PR:         https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209443
    PR:         https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210425
    Submitted by:       Hongjiang Zhang <honzhan microsoft com>
    Reviewed by:        sephe, Dexuan Cui <decui microsoft com>
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D6955

302605
    hyperv/stor: Save the response status and xfer length properly.

    The current command response handling discards status and xfer
    length unconditionally, so that all of the commands would be
    considered successful, even if errors happened.  When errors
    really happens, this causes all kinds of wiredness, since the
    buffer will not be filled on the host side and sense data will
    be ignored.

    Most of the time, errors do not happen, however, error does
    happen for the request sent immediately after the disk resizing.
    Discarding the SCSI status (SCSI_STATUS_CHECK_COND) and sense
    data (capacity changes) prevents the disk resizing from working
    properly.

    This commit saves the response status and xfer length properly
    for later use.

    Submitted by:       Dexuan Cui <decui microsoft com>
    Noticed by: sephe
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D7181

git-svn-id: svn://svn.freebsd.org/base/stable/10@302863 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c