aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-03-20 18:51:09 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-20 18:51:09 -0400
commit0fa74a4be48e0f810d3dc6ddbc9d6ac7e86cbee8 (patch)
treeccfee93ede4e36d6d355e00e485d3d1c0fec0bdd /drivers/net/xen-netback
parent6626af692692b52c8f9e20ad8201a3255e5ab25b (diff)
parent4de930efc23b92ddf88ce91c405ee645fe6e27ea (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/emulex/benet/be_main.c net/core/sysctl_net_core.c net/ipv4/inet_diag.c The be_main.c conflict resolution was really tricky. The conflict hunks generated by GIT were very unhelpful, to say the least. It split functions in half and moved them around, when the real actual conflict only existed solely inside of one function, that being be_map_pci_bars(). So instead, to resolve this, I checked out be_main.c from the top of net-next, then I applied the be_main.c changes from 'net' since the last time I merged. And this worked beautifully. The inet_diag.c and sysctl_net_core.c conflicts were simple overlapping changes, and were easily to resolve. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback')
-rw-r--r--drivers/net/xen-netback/netback.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 2c25e8e1a91e..b8c471813f4c 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -96,6 +96,7 @@ static void xenvif_idx_release(struct xenvif_queue *queue, u16 pending_idx,
96static void make_tx_response(struct xenvif_queue *queue, 96static void make_tx_response(struct xenvif_queue *queue,
97 struct xen_netif_tx_request *txp, 97 struct xen_netif_tx_request *txp,
98 s8 st); 98 s8 st);
99static void push_tx_responses(struct xenvif_queue *queue);
99 100
100static inline int tx_work_todo(struct xenvif_queue *queue); 101static inline int tx_work_todo(struct xenvif_queue *queue);
101 102
@@ -655,15 +656,10 @@ static void xenvif_tx_err(struct xenvif_queue *queue,
655 unsigned long flags; 656 unsigned long flags;
656 657
657 do { 658 do {
658 int notify;
659
660 spin_lock_irqsave(&queue->response_lock, flags); 659 spin_lock_irqsave(&queue->response_lock, flags);
661 make_tx_response(queue, txp, XEN_NETIF_RSP_ERROR); 660 make_tx_response(queue, txp, XEN_NETIF_RSP_ERROR);
662 RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&queue->tx, notify); 661 push_tx_responses(queue);
663 spin_unlock_irqrestore(&queue->response_lock, flags); 662 spin_unlock_irqrestore(&queue->response_lock, flags);
664 if (notify)
665 notify_remote_via_irq(queue->tx_irq);
666
667 if (cons == end) 663 if (cons == end)
668 break; 664 break;
669 txp = RING_GET_REQUEST(&queue->tx, cons++); 665 txp = RING_GET_REQUEST(&queue->tx, cons++);
@@ -1655,7 +1651,6 @@ static void xenvif_idx_release(struct xenvif_queue *queue, u16 pending_idx,
1655{ 1651{
1656 struct pending_tx_info *pending_tx_info; 1652 struct pending_tx_info *pending_tx_info;
1657 pending_ring_idx_t index; 1653 pending_ring_idx_t index;
1658 int notify;
1659 unsigned long flags; 1654 unsigned long flags;
1660 1655
1661 pending_tx_info = &queue->pending_tx_info[pending_idx]; 1656 pending_tx_info = &queue->pending_tx_info[pending_idx];
@@ -1671,12 +1666,9 @@ static void xenvif_idx_release(struct xenvif_queue *queue, u16 pending_idx,
1671 index = pending_index(queue->pending_prod++); 1666 index = pending_index(queue->pending_prod++);
1672 queue->pending_ring[index] = pending_idx; 1667 queue->pending_ring[index] = pending_idx;
1673 1668
1674 RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&queue->tx, notify); 1669 push_tx_responses(queue);
1675 1670
1676 spin_unlock_irqrestore(&queue->response_lock, flags); 1671 spin_unlock_irqrestore(&queue->response_lock, flags);
1677
1678 if (notify)
1679 notify_remote_via_irq(queue->tx_irq);
1680} 1672}
1681 1673
1682 1674
@@ -1697,6 +1689,15 @@ static void make_tx_response(struct xenvif_queue *queue,
1697 queue->tx.rsp_prod_pvt = ++i; 1689 queue->tx.rsp_prod_pvt = ++i;
1698} 1690}
1699 1691
1692static void push_tx_responses(struct xenvif_queue *queue)
1693{
1694 int notify;
1695
1696 RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&queue->tx, notify);
1697 if (notify)
1698 notify_remote_via_irq(queue->tx_irq);
1699}
1700
1700static struct xen_netif_rx_response *make_rx_response(struct xenvif_queue *queue, 1701static struct xen_netif_rx_response *make_rx_response(struct xenvif_queue *queue,
1701 u16 id, 1702 u16 id,
1702 s8 st, 1703 s8 st,