RDMA/hns: Remove redundant member doorbell_qpn of struct hns_roce_qp
authorWenpeng Liang <liangwenpeng@huawei.com>
Mon, 29 Aug 2022 10:50:21 +0000 (18:50 +0800)
committerLeon Romanovsky <leonro@nvidia.com>
Tue, 30 Aug 2022 09:14:23 +0000 (12:14 +0300)
The value of doorbell_qpn is always equal to qpn on current hardware
versions. So remove it.

Link: https://lore.kernel.org/r/20220829105021.1427804-5-liangwenpeng@huawei.com
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_qp.c

index 1bcecc5589fa8724979a45435fd57ed3e5ba010f..6fb6080d2506a9cdb20674e2f8b791614554a8a2 100644 (file)
@@ -599,7 +599,6 @@ struct hns_roce_qp {
        struct hns_roce_db      rdb;
        struct hns_roce_db      sdb;
        unsigned long           en_flags;
-       u32                     doorbell_qpn;
        enum ib_sig_type        sq_signal_bits;
        struct hns_roce_wq      sq;
 
index fa78b141dff27a96df6cea558851fd497ef945ba..437d5dd4e648f61e887fbfaee4a4ae95fa454045 100644 (file)
@@ -637,7 +637,7 @@ static inline void update_sq_db(struct hns_roce_dev *hr_dev,
        } else {
                struct hns_roce_v2_db sq_db = {};
 
-               hr_reg_write(&sq_db, DB_TAG, qp->doorbell_qpn);
+               hr_reg_write(&sq_db, DB_TAG, qp->qpn);
                hr_reg_write(&sq_db, DB_CMD, HNS_ROCE_V2_SQ_DB);
                hr_reg_write(&sq_db, DB_PI, qp->sq.head);
                hr_reg_write(&sq_db, DB_SL, qp->sl);
index 48d3616a6d71d134069f8ee345b4287d02f86c2a..52ba194d7ae3126ff37965dd02180da0198c2d9d 100644 (file)
@@ -218,7 +218,6 @@ static int alloc_qpn(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp)
 
        if (hr_qp->ibqp.qp_type == IB_QPT_GSI) {
                num = 1;
-               hr_qp->doorbell_qpn = 1;
        } else {
                mutex_lock(&qp_table->bank_mutex);
                bankid = get_least_load_bankid_for_qp(qp_table->bank);
@@ -234,8 +233,6 @@ static int alloc_qpn(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp)
 
                qp_table->bank[bankid].inuse++;
                mutex_unlock(&qp_table->bank_mutex);
-
-               hr_qp->doorbell_qpn = (u32)num;
        }
 
        hr_qp->qpn = num;