the subject pretty much says it all. this is the least intrusive
version of the change i could come up with.
io on multiple volumes is scheduled better, and the ioctl paths
become more reliable with this change.
tests? ok?
Index: mfi.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/mfi.c,v
retrieving revision 1.113
diff -u -p -r1.113 mfi.c
--- mfi.c 24 Sep 2010 01:30:05 -0000 1.113
+++ mfi.c 29 Dec 2010 09:49:27 -0000
@@ -63,8 +63,8 @@ struct scsi_adapter mfi_switch = {
mfi_scsi_cmd, mfiminphys, 0, 0, mfi_scsi_ioctl
};
-struct mfi_ccb *mfi_get_ccb(struct mfi_softc *);
-void mfi_put_ccb(struct mfi_ccb *);
+void * mfi_get_ccb(void *);
+void mfi_put_ccb(void *, void *);
int mfi_init_ccb(struct mfi_softc *);
struct mfi_mem *mfi_allocmem(struct mfi_softc *, size_t);
@@ -85,6 +85,8 @@ int mfi_scsi_io(struct mfi_ccb *, struc
void mfi_scsi_xs_done(struct mfi_ccb *);
int mfi_mgmt(struct mfi_softc *, uint32_t, uint32_t, uint32_t,
void *, uint8_t *);
+int mfi_do_mgmt(struct mfi_softc *, struct mfi_ccb * , uint32_t,
+ uint32_t, uint32_t, void *, uint8_t *);
void mfi_mgmt_done(struct mfi_ccb *);
#if NBIO > 0
@@ -146,9 +148,10 @@ static const struct mfi_iop_ops mfi_iop_
#define mfi_my_intr(_s) ((_s)->sc_iop->mio_intr(_s))
#define mfi_post(_s, _c) ((_s)->sc_iop->mio_post((_s), (_c)))
-struct mfi_ccb *
-mfi_get_ccb(struct mfi_softc *sc)
+void *
+mfi_get_ccb(void *cookie)
{
+ struct mfi_softc *sc = cookie;
struct mfi_ccb *ccb;
mtx_enter(&sc->sc_ccb_mtx);
@@ -165,9 +168,10 @@ mfi_get_ccb(struct mfi_softc *sc)
}
void
-mfi_put_ccb(struct mfi_ccb *ccb)
+mfi_put_ccb(void *cookie, void *io)
{
- struct mfi_softc *sc = ccb->ccb_sc;
+ struct mfi_softc *sc = cookie;
+ struct mfi_ccb *ccb = io;
struct mfi_frame_header *hdr = &ccb->ccb_frame->mfr_header;
DNPRINTF(MFI_D_CCB, "%s: mfi_put_ccb: %p\n", DEVNAME(sc), ccb);
@@ -239,7 +243,7 @@ mfi_init_ccb(struct ...