diff options
author | Govindarajulu Varadarajan <_govind@gmx.com> | 2014-12-24 13:29:36 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-31 21:08:45 +0300 |
commit | 5e32066d0085af3c53834323c90b7c69a8f788f6 (patch) | |
tree | 376acdfa427eb59f247d7cdb452ee26c53215181 /drivers/net/ethernet/cisco/enic/vnic_wq.c | |
parent | 5164172f3350b631f869a9b856d8e0956015609e (diff) | |
download | linux-5e32066d0085af3c53834323c90b7c69a8f788f6.tar.xz |
enic: make vnic_wq_buf doubly linked
This patch makes vnic_wq_buf doubly liked list. This is needed for dma_mapping
error check, in case some frag's dma map fails, we need to move back and remove
previously queued buffers.
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cisco/enic/vnic_wq.c')
-rw-r--r-- | drivers/net/ethernet/cisco/enic/vnic_wq.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cisco/enic/vnic_wq.c b/drivers/net/ethernet/cisco/enic/vnic_wq.c index 3e6b8d54dafc..b5a1c937fad2 100644 --- a/drivers/net/ethernet/cisco/enic/vnic_wq.c +++ b/drivers/net/ethernet/cisco/enic/vnic_wq.c @@ -47,11 +47,14 @@ static int vnic_wq_alloc_bufs(struct vnic_wq *wq) wq->ring.desc_size * buf->index; if (buf->index + 1 == count) { buf->next = wq->bufs[0]; + buf->next->prev = buf; break; } else if (j + 1 == VNIC_WQ_BUF_BLK_ENTRIES(count)) { buf->next = wq->bufs[i + 1]; + buf->next->prev = buf; } else { buf->next = buf + 1; + buf->next->prev = buf; buf++; } } |