mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
crypto: hisilicon/hpre - adds the max shaper type rate
The HPRE driver support configure each function's QoS in the Host for Kunpeng930. The HPRE driver needs to configure the maximum shaper type rate. Signed-off-by: Kai Ye <yekai13@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
3d2a429271
commit
c02f5302e4
@ -92,6 +92,7 @@
|
||||
#define HPRE_QM_PM_FLR BIT(11)
|
||||
#define HPRE_QM_SRIOV_FLR BIT(12)
|
||||
|
||||
#define HPRE_SHAPER_TYPE_RATE 128
|
||||
#define HPRE_VIA_MSI_DSM 1
|
||||
#define HPRE_SQE_MASK_OFFSET 8
|
||||
#define HPRE_SQE_MASK_LEN 24
|
||||
@ -947,6 +948,7 @@ static int hpre_pf_probe_init(struct hpre *hpre)
|
||||
|
||||
static int hpre_probe_init(struct hpre *hpre)
|
||||
{
|
||||
u32 type_rate = HPRE_SHAPER_TYPE_RATE;
|
||||
struct hisi_qm *qm = &hpre->qm;
|
||||
int ret;
|
||||
|
||||
@ -954,6 +956,11 @@ static int hpre_probe_init(struct hpre *hpre)
|
||||
ret = hpre_pf_probe_init(hpre);
|
||||
if (ret)
|
||||
return ret;
|
||||
/* Enable shaper type 0 */
|
||||
if (qm->ver >= QM_HW_V3) {
|
||||
type_rate |= QM_SHAPER_ENABLE;
|
||||
qm->type_rate = type_rate;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user