diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-06-16 05:36:47 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-06-16 05:36:47 +0000 |
commit | 5cea5eca15fe46f4bab0e4dda217c299dfaaaec7 (patch) | |
tree | f6800db2b1bab694b09560db1dd86557e46bd8c3 /sys/dev/ic/mpi.c | |
parent | 3041ce04daa2195926b48a18c5b2c5dd81427f4c (diff) |
vmware emulates mpi, but it does a half arsed job of it. half the fields
we read off the hardware and use to configure the driver with are set to
zero, so things dont really work like we want them to.
one of these fields is the pci subsystem id which is something we can fetch
really early in the attach process. so if the subsys is 0 then we go on and
fix up some of the values we get off the "hardware". now we can attach
disks on vmware.
"sneaky" and ok marco@ tested by and ok brad@
Diffstat (limited to 'sys/dev/ic/mpi.c')
-rw-r--r-- | sys/dev/ic/mpi.c | 8 |
1 files changed, 6 insertions, 2 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 |