if (set) {
val |= BIT_ULL(4);
mcs_reg_write(mcs, MCSX_MIL_GLOBAL, val);
/* Poll till mcsx_mil_ip_gbl_status.mcs_ip_stats_ready value is 1 */ while (!(mcs_reg_read(mcs, MCSX_MIL_IP_GBL_STATUS) & BIT_ULL(0))) { if (time_after(jiffies, timeout)) {
dev_err(mcs->dev, "MCS set force clk enable failed\n"); break;
}
}
} else {
val &= ~BIT_ULL(4);
mcs_reg_write(mcs, MCSX_MIL_GLOBAL, val);
}
return 0;
}
/* TX SA interrupt is raised only if autorekey is enabled. * MCS_CPM_TX_SLAVE_SA_MAP_MEM_0X[sc].tx_sa_active bit gets toggled if * one of two SAs mapped to SC gets expired. If tx_sa_active=0 implies * SA in SA_index1 got expired else SA in SA_index0 got expired.
*/ void cnf10kb_mcs_tx_pn_thresh_reached_handler(struct mcs *mcs)
{ struct mcs_intr_event event; struct rsrc_bmap *sc_bmap; unsignedlong rekey_ena;
u64 val, sa_status; int sc;
for_each_set_bit(sc, sc_bmap->bmap, mcs->hw->sc_entries) { /* Auto rekey is enable */ if (!test_bit(sc, &rekey_ena)) continue;
sa_status = mcs_reg_read(mcs, MCSX_CPM_TX_SLAVE_TX_SA_ACTIVEX(sc)); /* Check if tx_sa_active status had changed */ if (sa_status == mcs->tx_sa_active[sc]) continue;
/* SA_index0 is expired */
val = mcs_reg_read(mcs, MCSX_CPM_TX_SLAVE_SA_MAP_MEM_0X(sc)); if (sa_status)
event.sa_id = val & 0x7F; else
event.sa_id = (val >> 7) & 0x7F;
for_each_set_bit(sc, sc_bmap->bmap, mcs->hw->sc_entries) {
val = mcs_reg_read(mcs, MCSX_CPM_TX_SLAVE_SA_MAP_MEM_0X(sc));
if (mcs->tx_sa_active[sc]) /* SA_index1 was used and got expired */
event.sa_id = (val >> 7) & 0x7F; else /* SA_index0 was used and got expired */
event.sa_id = val & 0x7F;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.