From 28f90e8e8ca34f4eb2d75746f0ff62d33f030655 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 2 Feb 2017 08:24:22 +0100 Subject: [PATCH] hyperv: let there be IDE disks Adapted from: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212721 PR: https://forum.opnsense.org/index.php?topic=4405.0 (cherry picked from commit bdf347ea9dad982578353b923b4cabd385cc80d4) --- sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c | 7 ++++++- 1 file changed, 6 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 b79e10c1db7..9eeeea5ecb1 100644 --- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c @@ -2031,7 +2031,12 @@ storvsc_io_done(struct hv_storvsc_request *reqp) * If there are errors, for example, invalid LUN, * host will inform VM through SRB status. */ - ccb->ccb_h.status |= CAM_SEL_TIMEOUT; + if (storvsc_get_storage_type(sc->hs_dev->device) == + DRIVER_STORVSC) { + ccb->ccb_h.status |= CAM_SEL_TIMEOUT; + } else { + ccb->ccb_h.status |= CAM_DEV_NOT_THERE; + } } else { ccb->ccb_h.status |= CAM_REQ_CMP; }