summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/mpi.c8
-rw-r--r--sys/dev/ic/mpivar.h5
-rw-r--r--sys/dev/pci/mpi_pci.c6
3 files changed, 15 insertions, 4 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c
index a9a8982a97c..6eb2203fc5f 100644
--- a/sys/dev/ic/mpi.c
+++ b/sys/dev/ic/mpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpi.c,v 1.43 2006/06/15 07:35:44 marco Exp $ */
+/* $OpenBSD: mpi.c,v 1.44 2006/06/16 05:36:46 dlg Exp $ */
/*
* Copyright (c) 2005, 2006 David Gwynne <dlg@openbsd.org>
@@ -1583,9 +1583,13 @@ mpi_iocfacts(struct mpi_softc *sc)
letoh32(ifp.host_page_buffer_sge.sg_lo_addr));
sc->sc_maxcmds = letoh16(ifp.global_credits);
- sc->sc_buswidth = (ifp.max_devices == 0) ? 256 : ifp.max_devices;
sc->sc_maxchdepth = ifp.max_chain_depth;
sc->sc_ioc_number = ifp.ioc_number;
+ if (sc->sc_flags & MPI_F_VMWARE)
+ sc->sc_buswidth = 16;
+ else
+ sc->sc_buswidth =
+ (ifp.max_devices == 0) ? 256 : ifp.max_devices;
/*
* you can fit sg elements on the end of the io cmd if they fit in the
diff --git a/sys/dev/ic/mpivar.h b/sys/dev/ic/mpivar.h
index ce797a9ecb3..96e0df6e6f4 100644
--- a/sys/dev/ic/mpivar.h
+++ b/sys/dev/ic/mpivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpivar.h,v 1.14 2006/06/15 07:35:44 marco Exp $ */
+/* $OpenBSD: mpivar.h,v 1.15 2006/06/16 05:36:46 dlg Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -94,6 +94,9 @@ struct mpi_softc {
struct device sc_dev;
struct scsi_link sc_link;
+ int sc_flags;
+#define MPI_F_VMWARE (1<<0)
+
bus_space_tag_t sc_iot;
bus_space_handle_t sc_ioh;
bus_size_t sc_ios;
diff --git a/sys/dev/pci/mpi_pci.c b/sys/dev/pci/mpi_pci.c
index 3521d24f916..3955a7ffc0d 100644
--- a/sys/dev/pci/mpi_pci.c
+++ b/sys/dev/pci/mpi_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpi_pci.c,v 1.7 2006/06/14 08:26:31 dlg Exp $ */
+/* $OpenBSD: mpi_pci.c,v 1.8 2006/06/16 05:36:46 dlg Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -136,6 +136,10 @@ mpi_pci_attach(struct device *parent, struct device *self, void *aux)
}
printf(": %s", intrstr);
+ /* vmware doesn't fill in the pci subsystem register */
+ if (pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG) == 0x0)
+ sc->sc_flags |= MPI_F_VMWARE;
+
if (mpi_attach(sc) != 0) {
/* error printed by mpi_attach */
goto deintr;