]> git.pld-linux.org Git - packages/kernel.git/blame - linux-2.4.20-net-padding-fix.patch
- added description of djurban's branch
[packages/kernel.git] / linux-2.4.20-net-padding-fix.patch
CommitLineData
10679586 1 # fix for CAN-2003-0001 fix (1.1063.1.51, from 2.4.23-pre3)
2--- linux-2.4.22/drivers/net/3c527.c 2003-06-13 14:51:34.000000000 +0000
3+++ linux-2.4.23-pre3/drivers/net/3c527.c 2003-09-03 20:36:51.000000000 +0000
4@@ -1083,15 +1083,16 @@
5 /* NP is the buffer we will be loading */
6 np=lp->tx_ring[lp->tx_ring_head].p;
7
8- /* We will need this to flush the buffer out */
9- lp->tx_ring[lp->tx_ring_head].skb=skb;
10-
11 if(skb->len < ETH_ZLEN)
12 {
13 skb = skb_padto(skb, ETH_ZLEN);
14 if(skb == NULL)
15 goto out;
16 }
17+
18+ /* We will need this to flush the buffer out */
19+ lp->tx_ring[lp->tx_ring_head].skb=skb;
20+
21 np->length = (skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len;
22
23 np->data = virt_to_bus(skb->data);
24--- linux-2.4.22/drivers/net/eth16i.c 2003-06-13 14:51:34.000000000 +0000
25+++ linux-2.4.23-pre3/drivers/net/eth16i.c 2003-09-03 20:35:21.000000000 +0000
26@@ -1057,7 +1057,7 @@
27 int ioaddr = dev->base_addr;
28 int status = 0;
29 ushort length = skb->len;
30- unsigned char *buf = skb->data;
31+ unsigned char *buf;
32 unsigned long flags;
33
34 if(length < ETH_ZLEN)
35@@ -1067,6 +1067,7 @@
36 return 0;
37 length = ETH_ZLEN;
38 }
39+ buf = skb->data;
40
41 netif_stop_queue(dev);
42
43--- linux-2.4.22/drivers/net/seeq8005.c 2003-06-13 14:51:35.000000000 +0000
44+++ linux-2.4.23-pre3/drivers/net/seeq8005.c 2003-09-03 20:37:36.000000000 +0000
45@@ -379,7 +379,7 @@
46 {
47 struct net_local *lp = (struct net_local *)dev->priv;
48 short length = skb->len;
49- unsigned char *buf = skb->data;
50+ unsigned char *buf;
51
52 if(length < ETH_ZLEN)
53 {
54@@ -388,6 +388,8 @@
55 return 0;
56 length = ETH_ZLEN;
57 }
58+ buf = skb->data;
59+
60 /* Block a timer-based transmit from overlapping */
61 netif_stop_queue(dev);
62
63--- linux-2.4.22/drivers/net/yellowfin.c 2003-06-13 14:51:35.000000000 +0000
64+++ linux-2.4.23-pre3/drivers/net/yellowfin.c 2003-09-03 20:35:43.000000000 +0000
65@@ -867,8 +867,6 @@
66 /* Calculate the next Tx descriptor entry. */
67 entry = yp->cur_tx % TX_RING_SIZE;
68
69- yp->tx_skbuff[entry] = skb;
70-
71 if (gx_fix) { /* Note: only works for paddable protocols e.g. IP. */
72 int cacheline_end = ((unsigned long)skb->data + skb->len) % 32;
73 /* Fix GX chipset errata. */
74@@ -885,6 +883,8 @@
75 return 0;
76 }
77 }
78+ yp->tx_skbuff[entry] = skb;
79+
80 #ifdef NO_TXSTATS
81 yp->tx_ring[entry].addr = cpu_to_le32(pci_map_single(yp->pci_dev,
82 skb->data, len, PCI_DMA_TODEVICE));
This page took 0.853437 seconds and 4 git commands to generate.