Changeset View
Changeset View
Standalone View
Standalone View
mpr/mpr.c
Context not available. | |||||
mpr_intr_locked(void *data) | mpr_intr_locked(void *data) | ||||
{ | { | ||||
MPI2_REPLY_DESCRIPTORS_UNION *desc; | MPI2_REPLY_DESCRIPTORS_UNION *desc; | ||||
MPI2_DIAG_RELEASE_REPLY *rel_rep; | |||||
mpr_fw_diagnostic_buffer_t *pBuffer; | |||||
struct mpr_softc *sc; | struct mpr_softc *sc; | ||||
uint64_t tdesc; | |||||
struct mpr_command *cm = NULL; | struct mpr_command *cm = NULL; | ||||
uint8_t flags; | uint8_t flags; | ||||
u_int pq; | u_int pq; | ||||
MPI2_DIAG_RELEASE_REPLY *rel_rep; | |||||
mpr_fw_diagnostic_buffer_t *pBuffer; | |||||
sc = (struct mpr_softc *)data; | sc = (struct mpr_softc *)data; | ||||
Context not available. | |||||
for ( ;; ) { | for ( ;; ) { | ||||
cm = NULL; | cm = NULL; | ||||
desc = &sc->post_queue[sc->replypostindex]; | desc = &sc->post_queue[sc->replypostindex]; | ||||
/* | |||||
* Copy and clear out the descriptor so that any reentry will | |||||
* immediately know that this descriptor has already been | |||||
* looked at. There is unfortunate casting magic because the | |||||
* MPI API doesn't have a cardinal 64bit type. | |||||
*/ | |||||
tdesc = 0xffffffffffffffff; | |||||
tdesc = atomic_swap_64((uint64_t *)desc, tdesc); | |||||
desc = (MPI2_REPLY_DESCRIPTORS_UNION *)&tdesc; | |||||
flags = desc->Default.ReplyFlags & | flags = desc->Default.ReplyFlags & | ||||
MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK; | MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK; | ||||
if ((flags == MPI2_RPY_DESCRIPT_FLAGS_UNUSED) || | if ((flags == MPI2_RPY_DESCRIPT_FLAGS_UNUSED) || | ||||
Context not available. | |||||
cm = &sc->commands[ | cm = &sc->commands[ | ||||
le16toh(desc->AddressReply.SMID)]; | le16toh(desc->AddressReply.SMID)]; | ||||
KASSERT(cm->cm_state == MPR_CM_STATE_INQUEUE, | KASSERT(cm->cm_state == MPR_CM_STATE_INQUEUE, | ||||
("command not inqueue\n")); | ("command SMID %d not inqueue\n", | ||||
desc->AddressReply.SMID)); | |||||
cm->cm_state = MPR_CM_STATE_BUSY; | cm->cm_state = MPR_CM_STATE_BUSY; | ||||
cm->cm_reply = reply; | cm->cm_reply = reply; | ||||
cm->cm_reply_data = | cm->cm_reply_data = | ||||
Context not available. | |||||
mpr_display_reply_info(sc,cm->cm_reply); | mpr_display_reply_info(sc,cm->cm_reply); | ||||
mpr_complete_command(sc, cm); | mpr_complete_command(sc, cm); | ||||
} | } | ||||
desc->Words.Low = 0xffffffff; | |||||
desc->Words.High = 0xffffffff; | |||||
} | } | ||||
if (pq != sc->replypostindex) { | if (pq != sc->replypostindex) { | ||||
Context not available. |