# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 28e55fad651f64136d608387765c18ed94b0a0a4
# Parent 5b1ed5b394513cf79f07cece754d2de3b710430a
Update netfront for grant table interface changes.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
diff -r 5b1ed5b39451 -r 28e55fad651f
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Tue Aug 23
13:11:31 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Tue Aug 23
13:18:45 2005
@@ -102,12 +102,12 @@
#endif
#ifdef CONFIG_XEN_NETDEV_GRANT_TX
-static grant_ref_t gref_tx_head, gref_tx_terminal;
+static grant_ref_t gref_tx_head;
static grant_ref_t grant_tx_ref[NETIF_TX_RING_SIZE + 1];
#endif
#ifdef CONFIG_XEN_NETDEV_GRANT_RX
-static grant_ref_t gref_rx_head, gref_rx_terminal;
+static grant_ref_t gref_rx_head;
static grant_ref_t grant_rx_ref[NETIF_RX_RING_SIZE + 1];
#endif
@@ -441,8 +441,8 @@
np->rx->ring[MASK_NETIF_RX_IDX(req_prod + i)].req.id = id;
#ifdef CONFIG_XEN_NETDEV_GRANT_RX
- if (unlikely((ref = gnttab_claim_grant_reference(&gref_rx_head,
- gref_rx_terminal)) < 0)) {
+ ref = gnttab_claim_grant_reference(&gref_rx_head);
+ if (unlikely(ref < 0)) {
printk(KERN_ALERT "#### netfront can't claim rx reference\n");
BUG();
}
@@ -537,8 +537,8 @@
tx->id = id;
#ifdef CONFIG_XEN_NETDEV_GRANT_TX
- if (unlikely((ref = gnttab_claim_grant_reference(&gref_tx_head,
- gref_tx_terminal)) < 0)) {
+ ref = gnttab_claim_grant_reference(&gref_tx_head);
+ if (unlikely(ref < 0)) {
printk(KERN_ALERT "#### netfront can't claim tx grant reference\n");
BUG();
}
@@ -929,8 +929,7 @@
msg->handle = np->handle;
msg->tx_shmem_frame = virt_to_mfn(np->tx);
#ifdef CONFIG_XEN_NETDEV_GRANT_TX
- msg->tx_shmem_ref = (u32)gnttab_claim_grant_reference(&gref_tx_head,
- gref_tx_terminal);
+ msg->tx_shmem_ref = (u32)gnttab_claim_grant_reference(&gref_tx_head);
if(msg->tx_shmem_ref < 0) {
printk(KERN_ALERT "#### netfront can't claim tx_shmem reference\n");
BUG();
@@ -941,8 +940,7 @@
msg->rx_shmem_frame = virt_to_mfn(np->rx);
#ifdef CONFIG_XEN_NETDEV_GRANT_RX
- msg->rx_shmem_ref = (u32)gnttab_claim_grant_reference(&gref_rx_head,
- gref_rx_terminal);
+ msg->rx_shmem_ref = (u32)gnttab_claim_grant_reference(&gref_rx_head);
if(msg->rx_shmem_ref < 0) {
printk(KERN_ALERT "#### netfront can't claim rx_shmem reference\n");
BUG();
@@ -1420,7 +1418,7 @@
#ifdef CONFIG_XEN_NETDEV_GRANT_TX
/* A grant for every ring slot, plus one for the ring itself */
if (gnttab_alloc_grant_references(NETIF_TX_RING_SIZE + 1,
- &gref_tx_head, &gref_tx_terminal) < 0) {
+ &gref_tx_head) < 0) {
printk(KERN_ALERT "#### netfront can't alloc tx grant refs\n");
return 1;
}
@@ -1429,7 +1427,7 @@
#ifdef CONFIG_XEN_NETDEV_GRANT_RX
/* A grant for every ring slot, plus one for the ring itself */
if (gnttab_alloc_grant_references(NETIF_RX_RING_SIZE + 1,
- &gref_rx_head, &gref_rx_terminal) < 0) {
+ &gref_rx_head) < 0) {
printk(KERN_ALERT "#### netfront can't alloc rx grant refs\n");
return 1;
}
@@ -1457,10 +1455,10 @@
static void netif_exit(void)
{
#ifdef CONFIG_XEN_NETDEV_GRANT_TX
- gnttab_free_grant_references(gref_tx_head, gref_tx_terminal);
+ gnttab_free_grant_references(gref_tx_head);
#endif
#ifdef CONFIG_XEN_NETDEV_GRANT_RX
- gnttab_free_grant_references(gref_rx_head, gref_rx_terminal);
+ gnttab_free_grant_references(gref_rx_head);
#endif
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|