diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-08-02 23:56:35 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-08-02 23:56:35 +0000 |
commit | 17891bfd7a4ee237964e72e6f65d64ce769ae73c (patch) | |
tree | 51e32c350bc6f5229432be1790a5fb0bc1fefb8b /sys/dev/ic | |
parent | 46d34b50b55ae115a98b42de0edd8b0ad39fa538 (diff) |
apparently reading idb sometimes produces better results if prepend
w/ a read from the next register (hell knows what's in it).
this whole driver work is done w/ help of genua.de and
also a card donated earlier.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/ciss.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index bd7f2a4ba19..bc0fc98d647 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciss.c,v 1.2 2005/08/01 23:55:22 mickey Exp $ */ +/* $OpenBSD: ciss.c,v 1.3 2005/08/02 23:56:34 mickey Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -167,6 +167,8 @@ ciss_attach(struct ciss_softc *sc) bus_space_barrier(sc->iot, sc->ioh, CISS_IDB, 4, BUS_SPACE_BARRIER_WRITE); for (i = 1000000; i--; DELAY(1)) { + /* XXX maybe IDB is really 64bit? - hp dl380 needs this */ + (void)bus_space_read_4(sc->iot, sc->ioh, CISS_IDB + 4); if (!(bus_space_read_4(sc->iot, sc->ioh, CISS_IDB) & CISS_IDB_CFG)) break; bus_space_barrier(sc->iot, sc->ioh, CISS_IDB, 4, @@ -189,7 +191,7 @@ ciss_attach(struct ciss_softc *sc) /* i'm ready for you and i hope you're ready for me */ for (i = 30000; i--; DELAY(1000)) { if (bus_space_read_4(sc->iot, sc->cfg_ioh, sc->cfgoff + - offsetof(struct ciss_config, amethod)) & CISS_METH_SIMPL) + offsetof(struct ciss_config, amethod)) & CISS_METH_READY) break; bus_space_barrier(sc->iot, sc->cfg_ioh, sc->cfgoff + offsetof(struct ciss_config, amethod), 4, @@ -619,7 +621,6 @@ ciss_inq(struct ciss_softc *sc, struct ciss_inquiry *inq) struct ciss_ccb *ccb; struct ciss_cmd *cmd; - inq = sc->scratch; ccb = ciss_get_ccb(sc); ccb->ccb_len = sizeof(*inq); ccb->ccb_data = inq; |