1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Fix args for contigmalloc, cosmetics.

This commit is contained in:
Søren Schmidt 2002-08-18 12:20:33 +00:00
parent e3ffd6e93f
commit 1652b7bde4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=102058
3 changed files with 87 additions and 84 deletions

View File

@ -154,12 +154,12 @@ iop_intr(void *data)
struct i2o_single_reply *reply;
u_int32_t mfa;
if ((mfa = sc->reg->oqueue) == 0xffffffff) {
if ((mfa = sc->reg->oqueue) == 0xffffffff) {
printf("pstiop: no mfa on interrupt ?\n");
/* we might get more than one finished request pr interrupt */
while (1) {
if ((mfa = sc->reg->oqueue) == 0xffffffff)
if ((mfa = sc->reg->oqueue) == 0xffffffff)
return;
}
}
reply = (struct i2o_single_reply *)(sc->obase + (mfa - sc->phys_obase));
/* if this is a event register reply, shout! */
@ -179,6 +179,7 @@ iop_intr(void *data)
/* reply->initiator_context points to the service routine */
((void (*)(struct iop_softc *, u_int32_t, struct i2o_single_reply *))
(reply->initiator_context))(sc, mfa, reply);
}
}
int
@ -186,7 +187,7 @@ iop_reset(struct iop_softc *sc)
{
struct i2o_exec_iop_reset_message *msg;
int mfa, timeout = 5000;
u_int32_t reply = 0;
volatile u_int32_t reply = 0;
mfa = iop_get_mfa(sc);
msg = (struct i2o_exec_iop_reset_message *)(sc->ibase + mfa);
@ -209,8 +210,8 @@ iop_reset(struct iop_softc *sc)
timeout = 10000;
while ((mfa = sc->reg->iqueue) == 0xffffffff && --timeout)
DELAY(1000);
iop_free_mfa(sc, mfa);
iop_free_mfa(sc, mfa);
return reply;
}
@ -219,12 +220,13 @@ iop_init_outqueue(struct iop_softc *sc)
{
struct i2o_exec_init_outqueue_message *msg;
int i, mfa, timeout = 5000;
u_int32_t reply = 0;
volatile u_int32_t reply = 0;
if (!(sc->obase = contigmalloc(I2O_IOP_OUTBOUND_FRAME_COUNT *
I2O_IOP_OUTBOUND_FRAME_SIZE,
M_PSTIOP, M_NOWAIT,
0, 0xFFFFFFFF, sizeof(u_int32_t), 0))) {
0x00010000, 0xFFFFFFFF,
sizeof(u_int32_t), 0))) {
printf("pstiop: contigmalloc of outqueue buffers failed!\n");
return 0;
}
@ -279,7 +281,7 @@ iop_get_lct(struct iop_softc *sc)
#define ALLOCSIZE (PAGE_SIZE + (256 * sizeof(struct i2o_lct_entry)))
if (!(reply = contigmalloc(ALLOCSIZE, M_PSTIOP, M_NOWAIT | M_ZERO,
0, 0xFFFFFFFF, sizeof(u_int32_t), 0)))
0x00010000, 0xFFFFFFFF, sizeof(u_int32_t), 0)))
return 0;
mfa = iop_get_mfa(sc);
@ -323,11 +325,11 @@ iop_get_util_params(struct iop_softc *sc, int target, int operation, int group)
int mfa;
if (!(param = contigmalloc(PAGE_SIZE, M_PSTIOP, M_NOWAIT | M_ZERO,
0, 0xFFFFFFFF, sizeof(u_int32_t), 0)))
0x00010000, 0xFFFFFFFF, sizeof(u_int32_t), 0)))
return NULL;
if (!(reply = contigmalloc(PAGE_SIZE, M_PSTIOP, M_NOWAIT | M_ZERO,
0, 0xFFFFFFFF, sizeof(u_int32_t), 0)))
0x00010000, 0xFFFFFFFF, sizeof(u_int32_t), 0)))
return NULL;
mfa = iop_get_mfa(sc);

View File

@ -132,6 +132,7 @@ struct i2o_basic_message {
u_int32_t initiator_address:12;
u_int32_t function:8;
u_int32_t initiator_context;
u_int32_t transaction_context;
} __attribute__((packed));
/* basic reply layout */

View File

@ -254,7 +254,7 @@ pst_start(struct pst_softc *psc)
request->timeout_handle.callout = NULL;
else
request->timeout_handle =
timeout((timeout_t*)pst_timeout, request, 20 * hz);
timeout((timeout_t*)pst_timeout, request, 10 * hz);
bioq_remove(&psc->queue, bp);
devstat_start_transaction(&psc->stats);
if (pst_rw(request)) {