[kernel/f14/master] One more velocity fix.
Dave Jones
davej at fedoraproject.org
Thu Sep 2 01:46:01 UTC 2010
commit 705539efb54181dbec9105a98fdc8595b0286ddc
Author: Dave Jones <davej at redhat.com>
Date: Wed Sep 1 21:45:56 2010 -0400
One more velocity fix.
kernel.spec | 5 ++++-
linux-2.6-via-velocity-dma-fix.patch | 14 ++++++++------
2 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index d1a81f1..26a664d 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -48,7 +48,7 @@ Summary: The Linux kernel
# reset this by hand to 1 (or to 0 and then use rpmdev-bumpspec).
# scripts/rebase.sh should be made to do that for you, actually.
#
-%global baserelease 15
+%global baserelease 16
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@@ -1896,6 +1896,9 @@ fi
# and build.
%changelog
+* Wed Sep 01 2010 Dave Jones <davej at redhat.com> 2.6.35.4-16
+- Another VIA Velocity fix. This time in ifdown path.
+
* Wed Sep 01 2010 Dave Jones <davej at redhat.com> 2.6.35.4-15
- Improved version of the VIA Velocity DMA fix.
diff --git a/linux-2.6-via-velocity-dma-fix.patch b/linux-2.6-via-velocity-dma-fix.patch
index 3708484..d110646 100644
--- a/linux-2.6-via-velocity-dma-fix.patch
+++ b/linux-2.6-via-velocity-dma-fix.patch
@@ -33,10 +33,10 @@ Reported-by: Dave Jones <davej at redhat.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
-index fd69095..4167e1f 100644
+index fd69095..258c368 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
-@@ -1705,28 +1705,21 @@ err_free_dma_rings_0:
+@@ -1705,28 +1705,24 @@ err_free_dma_rings_0:
* recycle it, if not then unmap the buffer.
*/
static void velocity_free_tx_buf(struct velocity_info *vptr,
@@ -51,7 +51,9 @@ index fd69095..4167e1f 100644
- */
- if (tdinfo->skb_dma) {
- int i;
--
++ if (unlikely(!tdinfo->skb))
++ return;
+
- for (i = 0; i < tdinfo->nskb_dma; i++) {
- size_t pktlen = max_t(size_t, skb->len, ETH_ZLEN);
+ pci_unmap_single(vptr->pdev, tdinfo->skb_dma[0],
@@ -74,7 +76,7 @@ index fd69095..4167e1f 100644
dev_kfree_skb_irq(skb);
tdinfo->skb = NULL;
}
-@@ -1739,22 +1732,8 @@ static void velocity_free_td_ring_entry(struct velocity_info *vptr,
+@@ -1739,22 +1735,8 @@ static void velocity_free_td_ring_entry(struct velocity_info *vptr,
int q, int n)
{
struct velocity_td_info *td_info = &(vptr->tx.infos[q][n]);
@@ -98,7 +100,7 @@ index fd69095..4167e1f 100644
}
/**
-@@ -1925,7 +1904,7 @@ static int velocity_tx_srv(struct velocity_info *vptr)
+@@ -1925,7 +1907,7 @@ static int velocity_tx_srv(struct velocity_info *vptr)
stats->tx_packets++;
stats->tx_bytes += tdinfo->skb->len;
}
@@ -107,7 +109,7 @@ index fd69095..4167e1f 100644
vptr->tx.used[qnum]--;
}
vptr->tx.tail[qnum] = idx;
-@@ -2534,9 +2513,7 @@ static netdev_tx_t velocity_xmit(struct sk_buff *skb,
+@@ -2534,9 +2516,7 @@ static netdev_tx_t velocity_xmit(struct sk_buff *skb,
return NETDEV_TX_OK;
}
More information about the scm-commits
mailing list