Lines Matching defs:qs
1624 struct qat_session *qs = NULL;
1633 qs = qcy->qcy_sessions[CRYPTO_SESID2LID(crp->crp_sid)];
1634 mutex_spin_enter(&qs->qs_session_mtx);
1635 KASSERT(qs->qs_status & QAT_SESSION_STATUS_ACTIVE);
1636 qs->qs_inflight++;
1637 mutex_spin_exit(&qs->qs_session_mtx);
1648 desc = &qs->qs_dec_desc;
1659 desc = &qs->qs_enc_desc;
1701 qsbc->qsbc_session = qs;
1704 qcy->qcy_sc->sc_hw.qhw_crypto_setup_req_params(qcb, qs, desc, qsc,
1720 mutex_spin_enter(&qs->qs_session_mtx);
1721 qs->qs_inflight--;
1722 qat_crypto_check_free_session(qcy, qs);
1834 struct qat_session *qs;
1841 qs = qdm->qdm_dma_vaddr;
1842 qs->qs_lid = i;
1843 qs->qs_dec_desc.qcd_desc_paddr = qdm->qdm_dma_seg.ds_addr;
1844 qs->qs_dec_desc.qcd_hash_state_paddr =
1845 qs->qs_dec_desc.qcd_desc_paddr +
1847 qs->qs_enc_desc.qcd_desc_paddr = qdm->qdm_dma_seg.ds_addr +
1849 qs->qs_enc_desc.qcd_hash_state_paddr =
1850 qs->qs_enc_desc.qcd_desc_paddr +
1853 mutex_init(&qs->qs_session_mtx, MUTEX_DEFAULT, IPL_NET);
1855 qcy->qcy_sessions[i] = qs;
1856 qcy->qcy_session_free[i] = qs;
1874 struct qat_session *qs = NULL;
1886 qs = qcy->qcy_session_free[--qcy->qcy_session_free_count];
1891 qs->qs_status = QAT_SESSION_STATUS_ACTIVE;
1892 qs->qs_inflight = 0;
1893 *lid = qs->qs_lid;
1926 qs->qs_dec_desc.qcd_slices[0] = FW_SLICE_AUTH;
1927 qs->qs_dec_desc.qcd_slices[1] = FW_SLICE_CIPHER;
1928 qs->qs_dec_desc.qcd_cipher_dir = HW_CIPHER_DECRYPT;
1929 qs->qs_dec_desc.qcd_cmd_id = FW_LA_CMD_HASH_CIPHER;
1931 qs->qs_enc_desc.qcd_slices[0] = FW_SLICE_CIPHER;
1932 qs->qs_enc_desc.qcd_slices[1] = FW_SLICE_AUTH;
1933 qs->qs_enc_desc.qcd_cipher_dir = HW_CIPHER_ENCRYPT;
1934 qs->qs_enc_desc.qcd_cmd_id = FW_LA_CMD_CIPHER_HASH;
1937 qs->qs_dec_desc.qcd_slices[0] = FW_SLICE_CIPHER;
1938 qs->qs_dec_desc.qcd_cipher_dir = HW_CIPHER_DECRYPT;
1939 qs->qs_dec_desc.qcd_cmd_id = FW_LA_CMD_CIPHER;
1941 qs->qs_enc_desc.qcd_slices[0] = FW_SLICE_CIPHER;
1942 qs->qs_enc_desc.qcd_cipher_dir = HW_CIPHER_ENCRYPT;
1943 qs->qs_enc_desc.qcd_cmd_id = FW_LA_CMD_CIPHER;
1946 qs->qs_dec_desc.qcd_slices[0] = FW_SLICE_AUTH;
1947 qs->qs_dec_desc.qcd_cmd_id = FW_LA_CMD_AUTH;
1949 qs->qs_enc_desc.qcd_slices[0] = FW_SLICE_AUTH;
1950 qs->qs_enc_desc.qcd_cmd_id = FW_LA_CMD_AUTH;
1955 qs->qs_dec_desc.qcd_slices[slice] = FW_SLICE_DRAM_WR;
1956 qs->qs_enc_desc.qcd_slices[slice] = FW_SLICE_DRAM_WR;
1958 qcy->qcy_sc->sc_hw.qhw_crypto_setup_desc(qcy, qs, &qs->qs_dec_desc, crie, cria);
1959 qcy->qcy_sc->sc_hw.qhw_crypto_setup_desc(qcy, qs, &qs->qs_enc_desc, crie, cria);
1963 if (qs != NULL) {
1964 mutex_spin_enter(&qs->qs_session_mtx);
1965 qat_crypto_free_session0(qcy, qs);
1982 qat_crypto_free_session0(struct qat_crypto *qcy, struct qat_session *qs)
1985 qat_crypto_clean_desc(&qs->qs_dec_desc);
1986 qat_crypto_clean_desc(&qs->qs_enc_desc);
1987 qs->qs_status &= ~QAT_SESSION_STATUS_ACTIVE;
1989 mutex_spin_exit(&qs->qs_session_mtx);
1993 qcy->qcy_session_free[qcy->qcy_session_free_count++] = qs;
2000 qat_crypto_check_free_session(struct qat_crypto *qcy, struct qat_session *qs)
2003 if ((qs->qs_status & QAT_SESSION_STATUS_FREEING) &&
2004 qs->qs_inflight == 0) {
2005 qat_crypto_free_session0(qcy, qs);
2007 mutex_spin_exit(&qs->qs_session_mtx);
2015 struct qat_session *qs;
2017 qs = qcy->qcy_sessions[CRYPTO_SESID2LID(sid)];
2019 mutex_spin_enter(&qs->qs_session_mtx);
2021 if (qs->qs_inflight > 0) {
2022 qs->qs_status |= QAT_SESSION_STATUS_FREEING;
2023 mutex_spin_exit(&qs->qs_session_mtx);
2027 qat_crypto_free_session0(qcy, qs);
2068 struct qat_session *qs;
2077 qs = qsbc->qsbc_session;
2089 mutex_spin_enter(&qs->qs_session_mtx);
2090 KASSERT(qs->qs_status & QAT_SESSION_STATUS_ACTIVE);
2091 qs->qs_inflight--;
2092 qat_crypto_check_free_session(qcy, qs);