rpms/kernel/FC-4 linux-2.6.12-net-b44.patch, NONE, 1.1 kernel-2.6.spec, 1.1369, 1.1370

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Jun 7 19:21:04 UTC 2005


Author: davej

Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv11209

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6.12-net-b44.patch 
Log Message:
Drop recent b44 changes which broke some setups.



linux-2.6.12-net-b44.patch:
 b44.c |   38 ++++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 16 deletions(-)

--- NEW FILE linux-2.6.12-net-b44.patch ---
--- linux-2.6.11/drivers/net/b44.c	2005-06-01 01:48:10.000000000 -0400
+++ linux-2.6.11/drivers/net/b44.c	2005-06-01 01:10:06.000000000 -0400
@@ -908,6 +908,7 @@ static void b44_tx_timeout(struct net_de
 static int b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct b44 *bp = netdev_priv(dev);
+	struct sk_buff *bounce_skb;
 	dma_addr_t mapping;
 	u32 len, entry, ctrl;
 
@@ -923,15 +924,31 @@ static int b44_start_xmit(struct sk_buff
 		return 1;
 	}
 
-	entry = bp->tx_prod;
 	mapping = pci_map_single(bp->pdev, skb->data, len, PCI_DMA_TODEVICE);
 	if(mapping+len > B44_DMA_MASK) {
 		/* Chip can't handle DMA to/from >1GB, use bounce buffer */
-		pci_unmap_single(bp->pdev, mapping, len,PCI_DMA_TODEVICE);
-		memcpy(bp->tx_bufs+entry*TX_PKT_BUF_SZ,skb->data,skb->len);
-		mapping = pci_map_single(bp->pdev, bp->tx_bufs+entry*TX_PKT_BUF_SZ, len, PCI_DMA_TODEVICE);
+		pci_unmap_single(bp->pdev, mapping, len, PCI_DMA_TODEVICE);
+
+		bounce_skb = __dev_alloc_skb(TX_PKT_BUF_SZ,
+					     GFP_ATOMIC|GFP_DMA);
+		if (!bounce_skb)
+			return NETDEV_TX_BUSY;
+
+		mapping = pci_map_single(bp->pdev, bounce_skb->data,
+					 len, PCI_DMA_TODEVICE);
+		if(mapping+len > B44_DMA_MASK) {
+			pci_unmap_single(bp->pdev, mapping,
+					 len, PCI_DMA_TODEVICE);
+			dev_kfree_skb_any(bounce_skb);
+			return NETDEV_TX_BUSY;
+		}
+
+		memcpy(skb_put(bounce_skb, len), skb->data, skb->len);
+		dev_kfree_skb_any(skb);
+		skb = bounce_skb;
 	}
 
+	entry = bp->tx_prod;
 	bp->tx_buffers[entry].skb = skb;
 	pci_unmap_addr_set(&bp->tx_buffers[entry], mapping, mapping);
 
@@ -1078,11 +1095,6 @@ static void b44_free_consistent(struct b
 				    bp->tx_ring, bp->tx_ring_dma);
 		bp->tx_ring = NULL;
 	}
-	if (bp->tx_bufs) {
-		pci_free_consistent(bp->pdev, B44_TX_RING_SIZE * TX_PKT_BUF_SZ,
-				    bp->tx_bufs, bp->tx_bufs_dma);
-		bp->tx_bufs = NULL;
-	}
 }
 
 /*
@@ -1105,12 +1117,6 @@ static int b44_alloc_consistent(struct b
 		goto out_err;
 	memset(bp->tx_buffers, 0, size);
 
-	size = B44_TX_RING_SIZE * TX_PKT_BUF_SZ;
-	bp->tx_bufs = pci_alloc_consistent(bp->pdev, size, &bp->tx_bufs_dma);
-	if (!bp->tx_bufs)
-		goto out_err;
-	memset(bp->tx_bufs, 0, size);
-
 	size = DMA_TABLE_BYTES;
 	bp->rx_ring = pci_alloc_consistent(bp->pdev, size, &bp->rx_ring_dma);
 	if (!bp->rx_ring)
@@ -1904,7 +1910,7 @@ static void __devexit b44_remove_one(str
 	}
 }
 
-static int b44_suspend(struct pci_dev *pdev, u32 state)
+static int b44_suspend(struct pci_dev *pdev, pm_message_t state)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct b44 *bp = netdev_priv(dev);


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1369
retrieving revision 1.1370
diff -u -r1.1369 -r1.1370
--- kernel-2.6.spec	1 Jun 2005 05:13:54 -0000	1.1369
+++ kernel-2.6.spec	7 Jun 2005 19:21:02 -0000	1.1370
@@ -309,6 +309,7 @@
 Patch1302: linux-2.6.12-net-e1000-update.patch
 Patch1303: linux-2.6.12-net-tulip-double-spinunlock.patch
 Patch1304: linux-2.6.12-net-atm-lanai-nodev-rmmod.patch
+Patch1305: linux-2.6.12-net-b44.patch
 
 # USB bits
 Patch1400: linux-2.6.12-usb-old_scheme_first.patch
@@ -728,6 +729,8 @@
 %patch1303 -p1
 # Fix rmmod lanai
 %patch1304 -p1
+# b44 update looks broken, back it out for now.
+%patch1305 -p1 -R
 
 # USB Bits.
 # Enable both old and new style USB initialisation.
@@ -1267,6 +1270,9 @@
 %endif
 
 %changelog
+* Tue Jun  7 2005 Dave Jones <davej at redhat.com>
+- Drop recent b44 changes which broke some setups.
+
 * Wed Jun  1 2005 Dave Jones <davej at redhat.com>
 - Fix up ALI IDE regression. (#157175)
 




More information about the fedora-cvs-commits mailing list