Thread (6 messages) 6 messages, 4 authors, 2005-07-31

Re: [PATCH] forcedeth: Additional ethtool support

From: Francois Romieu <romieu@fr.zoreil.com>
Date: 2005-07-10 17:28:33

Hi Manfred,

Manfred Spraul [off-list ref] :
[...]
quoted hunk ↗ jump to hunk
--- 2.6/drivers/net/forcedeth.c	2005-07-10 12:38:53.000000000 +0200
+++ build-2.6/drivers/net/forcedeth.c	2005-07-10 12:51:12.000000000 +0200
[...]
+static void nv_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *buf)
+{
+	struct fe_priv *np = get_nvpriv(dev);
+	u8 __iomem *base = get_hwbase(dev);
+	u32 *rbuf = (u32 *)buf;
Unneeded cast from void *
+	int i;
+
+	regs->version = FORCEDETH_REGS_VER;
+	spin_lock_irq(&np->lock);
+	for (i=0;i<FORCEDETH_REGS_SIZE/sizeof(u32);i++)
+		rbuf[i] = readl(base + i*sizeof(u32));
memcpy_fromio ?

[...]
quoted hunk ↗ jump to hunk
@@ -2092,16 +2141,11 @@
 	}
 
 	/* handle different descriptor versions */
-	if (pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_1 ||
-			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_2 ||
-			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_3 ||    
-			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_12 ||
-			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_13) {
-		np->desc_ver = DESC_VER_1;
- 		np->pkt_limit = NV_PKTLIMIT_1;
-	} else {
+	np->desc_ver = DESC_VER_1;
+ 	np->pkt_limit = NV_PKTLIMIT_1;
   ^^
(nit) a space hides before the tab.
+	if (id->driver_data & DEV_HAS_LARGEDESC) {
 		np->desc_ver = DESC_VER_2;
- 		np->pkt_limit = NV_PKTLIMIT_1;
+ 		np->pkt_limit = NV_PKTLIMIT_2;
   ^^
(nit) a space hides before the tab.

--
Ueimor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help