Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*

*** 1989,1999 **** } sbp->pkt_flags |= PACKET_IN_CHIPQ; mutex_exit(&sbp->mtx); ! atomic_add_32(&hba->io_active, 1); sbp->xrip->flag |= EMLXS_XRI_PENDING_IO; } /* Free the local iocb if there is no sbp tracking it */ --- 1989,1999 ---- } sbp->pkt_flags |= PACKET_IN_CHIPQ; mutex_exit(&sbp->mtx); ! atomic_inc_32(&hba->io_active); sbp->xrip->flag |= EMLXS_XRI_PENDING_IO; } /* Free the local iocb if there is no sbp tracking it */
*** 3867,3877 **** EMLXS_FCT_IOCB_COMPLETE); } #endif /* FCT_IO_TRACE */ #endif /* SFCT_SUPPORT */ ! atomic_add_32(&hba->io_active, -1); /* Copy entry to sbp's iocbq */ iocbq = &sbp->iocbq; emlxs_CQE_to_IOCB(hba, &cqe, sbp); --- 3867,3877 ---- EMLXS_FCT_IOCB_COMPLETE); } #endif /* FCT_IO_TRACE */ #endif /* SFCT_SUPPORT */ ! atomic_dec_32(&hba->io_active); /* Copy entry to sbp's iocbq */ iocbq = &sbp->iocbq; emlxs_CQE_to_IOCB(hba, &cqe, sbp);
*** 3961,3971 **** /* 1 to 1 mapping between CQ and channel */ cp = cq->channelp; mutex_enter(&EMLXS_FCTAB_LOCK); sbp = hba->fc_table[request_tag]; ! atomic_add_32(&hba->io_active, -1); if (sbp == STALE_PACKET) { cp->hbaCmplCmd_sbp++; mutex_exit(&EMLXS_FCTAB_LOCK); EMLXS_MSGF(EMLXS_CONTEXT, &emlxs_sli_detail_msg, --- 3961,3971 ---- /* 1 to 1 mapping between CQ and channel */ cp = cq->channelp; mutex_enter(&EMLXS_FCTAB_LOCK); sbp = hba->fc_table[request_tag]; ! atomic_dec_32(&hba->io_active); if (sbp == STALE_PACKET) { cp->hbaCmplCmd_sbp++; mutex_exit(&EMLXS_FCTAB_LOCK); EMLXS_MSGF(EMLXS_CONTEXT, &emlxs_sli_detail_msg,