summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2017-07-12 13:44:54 +0000
committermikeb <mikeb@openbsd.org>2017-07-12 13:44:54 +0000
commit1ff8e5e7e591a0933c304b7f4719a631448cbed2 (patch)
treeebcd8f895486dbafe859c454f950b004422a19bc
parentIntroduce two quirks to prevent attaching ATA and ATAPI devices (diff)
downloadwireguard-openbsd-1ff8e5e7e591a0933c304b7f4719a631448cbed2.tar.xz
wireguard-openbsd-1ff8e5e7e591a0933c304b7f4719a631448cbed2.zip
Prefer paravirtualized interface for IDE disks as well
-rw-r--r--sys/dev/pv/hvs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pv/hvs.c b/sys/dev/pv/hvs.c
index 48b7a59a574..d8435912d09 100644
--- a/sys/dev/pv/hvs.c
+++ b/sys/dev/pv/hvs.c
@@ -254,7 +254,7 @@ hvs_match(struct device *parent, void *match, void *aux)
{
struct hv_attach_args *aa = aux;
- if (/* strcmp("ide", aa->aa_ident) && */
+ if (strcmp("ide", aa->aa_ident) &&
strcmp("scsi", aa->aa_ident))
return (0);
@@ -267,6 +267,7 @@ hvs_attach(struct device *parent, struct device *self, void *aux)
struct hv_attach_args *aa = aux;
struct hvs_softc *sc = (struct hvs_softc *)self;
struct scsibus_attach_args saa;
+ extern int pciide_skip_ata;
sc->sc_hvsc = (struct hv_softc *)parent;
sc->sc_chan = aa->aa_chan;
@@ -318,6 +319,9 @@ hvs_attach(struct device *parent, struct device *self, void *aux)
memset(&saa, 0, sizeof(saa));
saa.saa_sc_link = &sc->sc_link;
sc->sc_scsibus = config_found(self, &saa, scsiprint);
+
+ if (sc->sc_scsibus)
+ pciide_skip_ata = 1;
}
void