Skip to contentSkip to conversation

Problems with a PCI SMC2802W

DISCUSSION Luis R. Rodriguez 4 participants 5 messages Mar 10, 2005 – Mar 16, 2005 6 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#6 lore raw
In reply to a message not in the archive
Quoted 73 lines · Chris Wedgwood
Quoted 2 lines · Adam K Kirchhoff

Unfortunately, the latest svn checkout doesn't want to compile for me on 2.6.11:

I have these diffs. Forward to the list if you like since it never accepts email from me (grr)

Index: ksrc/islpci_eth.c
===================================================================

islpci_eth.c +3 -1
@@ -90,7 +90,9 @@
 	struct sk_buff *newskb;
 	int newskb_offset;
 	unsigned long flags;
+#ifdef CONFIG_PRISM54_WDS
 	unsigned char wds_mac[6];
+#endif
 	u32 curr_frag;
 	int err = 0;
 
@@ -362,9 +364,9 @@
 	struct sk_buff *skb;
 	u16 size;
 	u32 index, offset;
-	unsigned char *src;
 	int discard = 0;
 #ifdef CONFIG_PRISM54_WDS
+	unsigned char *src;
 	struct wds_priv *wdsp = priv->wdsp;
 	struct net_device *wds_dev = NULL;
 	struct wds_net_local *wds_lp;

Index: ksrc/islpci_hotplug.c
===================================================================

islpci_hotplug.c +2 -2
@@ -277,7 +277,7 @@
 	printk(KERN_NOTICE "%s: got suspend request (state %d)\n",
 	       ndev->name, state);
 
-	pci_save_state(pdev, priv->pci_state);
+	pci_save_state(pdev);
 
 	/* tell the device not to trigger interrupts for now... */
 	isl38xx_disable_interrupts(priv->device_base);
@@ -303,7 +303,7 @@
 
 	printk(KERN_NOTICE "%s: got resume request\n", ndev->name);
 
-	pci_restore_state(pdev, priv->pci_state);
+	pci_restore_state(pdev);
 
 	/* alright let's go into the PREBOOT state */
 	islpci_reset(priv, 1);

Index: ksrc/islpci_dev.h
===================================================================

islpci_dev.h +0 -1
@@ -112,7 +112,6 @@
 
 	/* PCI bus allocation & configuration members */
 	struct pci_dev *pdev;	/* PCI structure information */
-	u32 pci_state[16];	/* used for suspend/resume */
 	char firmware[33];
 
 	void __iomem *device_base;	/* ioremapped device base address */

Index: ksrc/islpci_mgt.c
===================================================================

islpci_mgt.c line 351

Quoted 8 lines
islpci_mgt.c +1 -1
@@ -345,7 +345,7 @@
 		}
 
 		/* Ensure the results of device DMA are visible to the CPU. */
-		pci_dma_sync_single(priv->pdev, buf->pci_addr,
+		pci_dma_sync_single_for_cpu(priv->pdev, buf->pci_addr,
 				frag_len, PCI_DMA_FROMDEVICE);
 
 		/* Perform endianess conversion for PIMFOR header in-place. */

Thanks, but the pci_[restore|save]_state changes requires testing/backporting to 2.4. Same goes for pci_dma_sync_single_for_cpu(). We can macro this but ugh, it's just so horrible.

Margit, where are you?

Jeff, what's better a prismcompat24.h edit or a check for LINUX_VERSION_CODE here?

Luis

Signature · 1 line
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E

_______________________________________________
Prism54-devel mailing list
[email protected]
http://prism54.org/mailman/listinfo/prism54-devel

#7 lore raw

Jeff/netdev,

If no comment is given on how we should deal with pci_dma_sync_single/pci_dma_sync_single_for_cpu for 2.4 I'm just going to put in a nasty ifdef there. Comemnts?

Luis

Quoted 27 lines · Luis R. Rodriguez

islpci_mgt.c line 351

Quoted 13 lines

Index: ksrc/islpci_mgt.c
===================================================================

islpci_mgt.c +1 -1
@@ -345,7 +345,7 @@
 		}
 
 		/* Ensure the results of device DMA are visible to the CPU. */
-		pci_dma_sync_single(priv->pdev, buf->pci_addr,
+		pci_dma_sync_single_for_cpu(priv->pdev, buf->pci_addr,
 				frag_len, PCI_DMA_FROMDEVICE);
 
 		/* Perform endianess conversion for PIMFOR header in-place. */

Thanks, but the pci_[restore|save]_state changes requires testing/backporting to 2.4. Same goes for pci_dma_sync_single_for_cpu(). We can macro this but ugh, it's just so horrible.

Margit, where are you?

Jeff, what's better a prismcompat24.h edit or a check for LINUX_VERSION_CODE here?

Luis

Signature · 1 line
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E
Signature · 1 line
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E

_______________________________________________
Prism54-devel mailing list
[email protected]
http://prism54.org/mailman/listinfo/prism54-devel

#8 lore raw
Quoted 5 lines · Luis R. Rodriguez

Jeff/netdev,

If no comment is given on how we should deal with pci_dma_sync_single/pci_dma_sync_single_for_cpu for 2.4 I'm just going to put in a nasty ifdef there. Comemnts?

For 2.4, why not define pci_dma_sync_single_for_{device,cpu} as equivalent to pci_dma_sync_single?

Jeff

#9 lore raw
In reply to Luis R. Rodriguez
Quoted 3 lines · Luis R. Rodriguez

If no comment is given on how we should deal with pci_dma_sync_single/pci_dma_sync_single_for_cpu for 2.4 I'm just going to put in a nasty ifdef there. Comemnts?

How about just put:

#ifndef pci_dma_sync_single_for_cpu
#define pci_dma_sync_single_for_cpu pci_dma_sync_single #endif

In one of the prism headers?

#10 lore raw
In reply to Luis R. Rodriguez

Luis R. Rodriguez <[email protected]> :
[...]

Quoted 3 lines

If no comment is given on how we should deal with pci_dma_sync_single/pci_dma_sync_single_for_cpu for 2.4 I'm just going to put in a nasty ifdef there. Comemnts?

My out of tree 2.4.x driver for the 8169 exhibits a few differences with the 2.6.x driver for these kind of things. Over several months, it happened once that a 2.6.x patch hit this part of the code. Let's say an extra 5 minutes to merge in 2.4.x and no side effects as I had to actually look at the code (of course orthogonal patches helped).

Imho it is not a heavy maintenance/taste issue.

--
Ueimor