From fa8c981396ab6224bb2cd2aae12d2906dbaccfb8 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Tue, 20 Sep 2016 08:52:45 +0000 Subject: [PATCH] hyperv/storvsc: Fix SRB length setting. This fixes disk discovery issue on WS2008R2 Hyper-V, which plagued us since 10.2-release. Reported by: many MFC after: 3 days Sponsored by: Microsoft --- sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c index 530a2d909ca..e1b2fdf9f3d 100644 --- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c @@ -705,7 +705,8 @@ hv_storvsc_io_request(struct storvsc_softc *sc, vstor_packet->flags |= REQUEST_COMPLETION_FLAG; - vstor_packet->u.vm_srb.length = VSTOR_PKT_SIZE; + vstor_packet->u.vm_srb.length = + sizeof(struct vmscsi_req) - vmscsi_size_delta; vstor_packet->u.vm_srb.sense_info_len = sense_buffer_size;