mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
net: hns3: fix the TX/RX ring.queue_index in hns3_ring_get_cfg
[ Upstream commit66b447301a] The interface hns3_ring_get_cfg only update TX ring queue_index, but do not update RX ring queue_index. This patch fixes it. Fixes:76ad4f0(net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC) Signed-off-by: Lipeng <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
aeb01451f9
commit
9409e1c775
@@ -2488,16 +2488,16 @@ static int hns3_ring_get_cfg(struct hnae3_queue *q, struct hns3_nic_priv *priv,
|
||||
|
||||
if (ring_type == HNAE3_RING_TYPE_TX) {
|
||||
ring_data[q->tqp_index].ring = ring;
|
||||
ring_data[q->tqp_index].queue_index = q->tqp_index;
|
||||
ring->io_base = (u8 __iomem *)q->io_base + HNS3_TX_REG_OFFSET;
|
||||
} else {
|
||||
ring_data[q->tqp_index + queue_num].ring = ring;
|
||||
ring_data[q->tqp_index + queue_num].queue_index = q->tqp_index;
|
||||
ring->io_base = q->io_base;
|
||||
}
|
||||
|
||||
hnae_set_bit(ring->flag, HNAE3_RING_TYPE_B, ring_type);
|
||||
|
||||
ring_data[q->tqp_index].queue_index = q->tqp_index;
|
||||
|
||||
ring->tqp = q;
|
||||
ring->desc = NULL;
|
||||
ring->desc_cb = NULL;
|
||||
|
||||
Reference in New Issue
Block a user