[Prism54-devel] [patch 0/6] [prism54 svn trunk] various fixes for prism54 svn

Bob Beers bob.beers at gmail.com
Mon May 16 21:03:34 UTC 2005


On 5/16/05, Maximilian Engelhardt <maxi at daemonizer.de> wrote:

> You can downloading daily svn snapshots at
> http://prism54.org/pub/linux/snapshot/tars/
> 
> simply download the latest version and apply the patches.
> 
> Maxi

Thanks, Maxi!  I knew they were there somewhere.

Unfortunately, the patches won't apply (for me) to today's
 snapshot.  Patches 1-4 I could apply by hand.  But patch 5
 really has me stumped.  I didn't try patch 6 since you
 said to apply them in order.  Which snapshot did you create
 the patches against?  How did you create those patch
 files?  I like:

 bash# patch -burpN orig/ current/ > description.patch

For example here's a version of JB's first patch which _does_ apply
for me to unaltered source, prism54-svn=20050516:

<code>
diff -burpN prism54-svn=20050516-orig/ksrc/islpci_mgt.c
prism54-svn=20050516/ksrc/islpci_mgt.c
--- prism54-svn=20050516-orig/ksrc/islpci_mgt.c	2005-03-09
20:38:25.000000000 -0500
+++ prism54-svn=20050516/ksrc/islpci_mgt.c	2005-05-16 14:03:04.000000000 -0400
@@ -128,7 +128,8 @@ islpci_mgmt_rx_fill(struct net_device *n
 		isl38xx_fragment *frag = &cb->rx_data_mgmt[index];
 
 		if (buf->skb == NULL) {
-			buf->skb = alloc_skb(MGMT_FRAME_SIZE+2, GFP_ATOMIC);
+		        buf->skb = dev_alloc_skb(MGMT_FRAME_SIZE+2);
+		        /* fixme : should do some realignment work */
 			if (!buf->skb) {
 				printk(KERN_WARNING
 				       "Error allocating management frame.\n");
@@ -136,9 +137,10 @@ islpci_mgmt_rx_fill(struct net_device *n
 			}
 			buf->size = MGMT_FRAME_SIZE;
 			buf->mem = buf->skb->data;
+			buf->pci_addr = 0;
 		}
 		if (buf->pci_addr == 0) {
-			buf->pci_addr = pci_map_single(priv->pdev, buf->skb,
+			buf->pci_addr = pci_map_single(priv->pdev, buf->skb->data,
 						       MGMT_FRAME_SIZE,
 						       PCI_DMA_FROMDEVICE);
 			if (!buf->pci_addr) {
@@ -345,11 +347,13 @@ islpci_mgt_receive(struct net_device *nd
 		}
 
 		/* Ensure the results of device DMA are visible to the CPU. */
+                /* frag_len not being the whole buffer, we need to
+                 * synchronize the whole buffer */
 		pci_dma_sync_single(priv->pdev, buf->pci_addr,
-				frag_len, PCI_DMA_FROMDEVICE);
+				MGMT_FRAME_SIZE, PCI_DMA_FROMDEVICE);
 
 		/* Perform endianess conversion for PIMFOR header in-place. */
-		header = pimfor_decode_header(buf->skb, frag_len);
+		header = pimfor_decode_header(buf->skb->data, frag_len);
 		if (!header) {
 			printk(KERN_WARNING "%s: no PIMFOR header found\n",
 			       ndev->name);
</code>
(The only difference being the numbers in the hunk headers.)


output of issuing the patch command is:
bbeers at alakazam:~/download/prism54/prism54-svn=20050516/ksrc$ patch
-p2 --verbose < ../../bb-jbn1.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -burpN prism54-svn=20050516-orig/ksrc/islpci_mgt.c
prism54-svn=20050516/ksrc/islpci_mgt.c
|--- prism54-svn=20050516-orig/ksrc/islpci_mgt.c        2005-03-09
20:38:25.000000000 -0500
|+++ prism54-svn=20050516/ksrc/islpci_mgt.c     2005-05-16
14:03:04.000000000 -0400
--------------------------
Patching file islpci_mgt.c using Plan A...
Hunk #1 succeeded at 128.
Hunk #2 succeeded at 137.
Hunk #3 succeeded at 347.
done




For now I'll try the latest snapshot and report any progress,
 then I'll try to apply JB's patches to an older snapshot if
 you think it is worthwhile.


More information about the Prism54-devel mailing list