mirror of
https://github.com/corundum/corundum.git
synced 2025-01-30 08:32:52 +08:00
Unconditionally deactivate rings
This commit is contained in:
parent
292d805450
commit
eeedc179fb
@ -99,7 +99,6 @@ void mqnic_destroy_cq_ring(struct mqnic_cq_ring **ring_ptr)
|
||||
struct mqnic_cq_ring *ring = *ring_ptr;
|
||||
*ring_ptr = NULL;
|
||||
|
||||
if (ring->active)
|
||||
mqnic_deactivate_cq_ring(ring);
|
||||
|
||||
dma_free_coherent(ring->priv->dev, ring->buf_size, ring->buf, ring->buf_dma_addr);
|
||||
@ -108,7 +107,6 @@ void mqnic_destroy_cq_ring(struct mqnic_cq_ring **ring_ptr)
|
||||
|
||||
int mqnic_activate_cq_ring(struct mqnic_cq_ring *ring, int eq_index)
|
||||
{
|
||||
if (ring->active)
|
||||
mqnic_deactivate_cq_ring(ring);
|
||||
|
||||
ring->eq_index = eq_index;
|
||||
|
@ -114,7 +114,6 @@ void mqnic_destroy_eq_ring(struct mqnic_eq_ring **ring_ptr)
|
||||
struct device *dev = ring->priv->dev;
|
||||
*ring_ptr = NULL;
|
||||
|
||||
if (ring->active)
|
||||
mqnic_deactivate_eq_ring(ring);
|
||||
|
||||
dma_free_coherent(dev, ring->buf_size, ring->buf, ring->buf_dma_addr);
|
||||
@ -125,7 +124,6 @@ int mqnic_activate_eq_ring(struct mqnic_eq_ring *ring, int int_index)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (ring->active)
|
||||
mqnic_deactivate_eq_ring(ring);
|
||||
|
||||
if (int_index < 0 || int_index >= ring->priv->mdev->irq_count)
|
||||
|
@ -115,7 +115,6 @@ void mqnic_destroy_rx_ring(struct mqnic_ring **ring_ptr)
|
||||
struct mqnic_ring *ring = *ring_ptr;
|
||||
*ring_ptr = NULL;
|
||||
|
||||
if (ring->active)
|
||||
mqnic_deactivate_rx_ring(ring);
|
||||
|
||||
mqnic_free_rx_buf(ring);
|
||||
@ -128,7 +127,6 @@ void mqnic_destroy_rx_ring(struct mqnic_ring **ring_ptr)
|
||||
|
||||
int mqnic_activate_rx_ring(struct mqnic_ring *ring, int cpl_index)
|
||||
{
|
||||
if (ring->active)
|
||||
mqnic_deactivate_rx_ring(ring);
|
||||
|
||||
// deactivate queue
|
||||
|
@ -117,7 +117,6 @@ void mqnic_destroy_tx_ring(struct mqnic_ring **ring_ptr)
|
||||
struct mqnic_ring *ring = *ring_ptr;
|
||||
*ring_ptr = NULL;
|
||||
|
||||
if (ring->active)
|
||||
mqnic_deactivate_tx_ring(ring);
|
||||
|
||||
mqnic_free_tx_buf(ring);
|
||||
@ -130,7 +129,6 @@ void mqnic_destroy_tx_ring(struct mqnic_ring **ring_ptr)
|
||||
|
||||
int mqnic_activate_tx_ring(struct mqnic_ring *ring, int cpl_index)
|
||||
{
|
||||
if (ring->active)
|
||||
mqnic_deactivate_tx_ring(ring);
|
||||
|
||||
// deactivate queue
|
||||
|
Loading…
x
Reference in New Issue
Block a user