diff options
Diffstat (limited to 'sys/dev/pv/vioscsi.c')
-rw-r--r-- | sys/dev/pv/vioscsi.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/dev/pv/vioscsi.c b/sys/dev/pv/vioscsi.c index 20802c8bc7a..a9246eb2317 100644 --- a/sys/dev/pv/vioscsi.c +++ b/sys/dev/pv/vioscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vioscsi.c,v 1.31 2023/04/27 13:52:58 krw Exp $ */ +/* $OpenBSD: vioscsi.c,v 1.32 2023/05/29 08:13:35 sf Exp $ */ /* * Copyright (c) 2013 Google Inc. * @@ -166,6 +166,7 @@ vioscsi_attach(struct device *parent, struct device *self, void *aux) saa.saa_quirks = saa.saa_flags = 0; saa.saa_wwpn = saa.saa_wwnn = 0; + virtio_set_status(vsc, VIRTIO_CONFIG_DEVICE_STATUS_DRIVER_OK); config_found(self, &saa, scsiprint); return; @@ -296,6 +297,7 @@ vioscsi_req_done(struct vioscsi_softc *sc, struct virtio_softc *vsc, struct scsi_xfer *xs = vr->vr_xs; DPRINTF("vioscsi_req_done: enter vr: %p xs: %p\n", vr, xs); + int isread = !!(xs->flags & SCSI_DATA_IN); bus_dmamap_sync(vsc->sc_dmat, vr->vr_control, offsetof(struct vioscsi_req, vr_req), sizeof(struct virtio_scsi_req_hdr), @@ -304,18 +306,6 @@ vioscsi_req_done(struct vioscsi_softc *sc, struct virtio_softc *vsc, offsetof(struct vioscsi_req, vr_res), sizeof(struct virtio_scsi_res_hdr), BUS_DMASYNC_POSTREAD); - - /* - * XXX Should be impossible but somehow happens on Oracle Cloud and - * particular QEMU configurations. - * - * Stop the crashing while investigation into - * the apparent queuing/dequeuing issue proceeds. - */ - if (xs == NULL) - return; - - int isread = !!(xs->flags & SCSI_DATA_IN); if (xs->flags & (SCSI_DATA_IN | SCSI_DATA_OUT)) { bus_dmamap_sync(vsc->sc_dmat, vr->vr_data, 0, xs->datalen, isread ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); |