linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvidia nforce 1.0-261 nvnet for kernel 2.5
@ 2003-07-26 22:09 Andrew de Quincey
  2003-07-27  4:50 ` Rahul Karnik
  2003-07-27  4:56 ` Rahul Karnik
  0 siblings, 2 replies; 24+ messages in thread
From: Andrew de Quincey @ 2003-07-26 22:09 UTC (permalink / raw)
  To: lkml; +Cc: Laurens

Small patch for the latest nvidia nforce 1.0-261 nvnet drivers with kernel 2.5.

--- CUT HERE ---
diff -Naurb nforce-1.0-0261-2.4/nvnet/Makefile nforce-1.0-0261-2.5/nvnet/Makefile
--- nforce-1.0-0261-2.4/nvnet/Makefile	2003-05-06 20:39:38.000000000 +0100
+++ nforce-1.0-0261-2.5/nvnet/Makefile	2003-07-26 22:53:27.000000000 +0100
@@ -21,7 +21,7 @@
 #
 # Target
 #
-TARGET = $(MODULE_NAME).o
+TARGET = $(MODULE_NAME).ko
 
 #
 # Networking library
@@ -76,7 +76,8 @@
 CFLAGS = -c -Wall -DLINUX -DMODULE -DEXPORT_SYMTAB -D__KERNEL__ -O \
 	-Wstrict-prototypes -DCONFIG_PM  -fno-strict-aliasing \
         -mpreferred-stack-boundary=2 -march=i686 $(ALIGN) \
-        -DMODULE -I$(SYSINCLUDE) $(ARCHDEFS)
+        -DMODULE -I$(SYSINCLUDE) $(ARCHDEFS) \
+        -I$(KERNSRC)/include/asm/mach-default -DKBUILD_MODNAME=nvnet
 
 #
 # Kernel version
@@ -103,10 +104,17 @@
 
 all: $(TARGET) 
 
-$(TARGET): $(SRC) $(NVNETLIB) $(MCPINCLUDE)
+nvnet.o: $(SRC)
 	$(CC) $(CFLAGS) $(SRC)
-	ld -r -o $(TEMP) $(OBJ) $(NVNETLIB)
-	$(OBJCOPY) --strip-symbol="gcc2_compiled." $(TEMP)
+
+nvnet.mod.c: nvnet.o
+	$(KERNSRC)/scripts/modpost nvnet.o
+
+nvnet.mod.o: nvnet.mod.c
+	$(CC) $(CFLAGS) nvnet.mod.c
+
+$(TARGET): nvnet.o nvnet.mod.o $(NVNETLIB)
+	ld -r -o $(TEMP) nvnet.o nvnet.mod.o $(NVNETLIB)
 	cp $(TEMP) $(TARGET)
 	rm $(TEMP)
 
@@ -139,4 +147,4 @@
 # Delete generated files
 #
 clean:
-	rm -f $(TARGET)
+	rm -f $(TARGET) nvnet.o *.mod.c *.mod.o
diff -Naurb nforce-1.0-0261-2.4/nvnet/nvnet.c nforce-1.0-0261-2.5/nvnet/nvnet.c
--- nforce-1.0-0261-2.4/nvnet/nvnet.c	2003-05-06 20:39:38.000000000 +0100
+++ nforce-1.0-0261-2.5/nvnet/nvnet.c	2003-07-26 23:03:55.000000000 +0100
@@ -26,6 +26,10 @@
 char *common_hdO_version_string = HDO_VERSION_STRING;
 char *common_hdP_version_string = HDP_VERSION_STRING;
 
+// fix for common symbol exported by nvnetlib.o
+char* aPhyAddrAndId[256] = {};
+
+
 /*
  * Driver information
  */ 
@@ -753,7 +757,7 @@
 }
 
 
-static void nvnet_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
+static irqreturn_t nvnet_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
 {
     struct net_device *dev;
     struct nvnet_private *priv;
@@ -765,7 +769,7 @@
                  irq, dev_instance, regs);
 
     if(!dev)
-        return;
+        return IRQ_NONE;
 
     if(priv->hwapi->pfnQueryInterrupt(priv->hwapi->pADCX)) 
     {   
@@ -776,6 +780,7 @@
 
     PRINTK(DEBUG_INTR, "nvnet_interrupt -  Out\n");
 
+    return IRQ_HANDLED;
 }
 
 static int nvnet_close(struct net_device *dev)
@@ -1245,7 +1250,7 @@
  */
 static void __devexit nvnet_remove(struct pci_dev *pdev)
 {
-    struct net_device *dev = pdev->driver_data;
+    struct net_device *dev = pci_get_drvdata(pdev);
     struct nvnet_private *priv = dev->priv;
     int i;
 
diff -Naurb nforce-1.0-0261-2.4/nvnet/nvnet.h nforce-1.0-0261-2.5/nvnet/nvnet.h
--- nforce-1.0-0261-2.4/nvnet/nvnet.h	2003-05-06 20:39:38.000000000 +0100
+++ nforce-1.0-0261-2.5/nvnet/nvnet.h	2003-07-26 22:55:49.000000000 +0100
@@ -42,7 +42,6 @@
 #include <asm/io.h>
 #include <asm/bitops.h>
 #include <asm/uaccess.h>
-#include <asm/irq.h>            /* For NR_IRQS only. */
 #include <linux/spinlock.h>
 #include <linux/proc_fs.h>
 
@@ -104,7 +103,7 @@
 static struct net_device_stats *nvnet_stats(struct net_device *dev);
 static int nvnet_config(struct net_device *dev, struct ifmap *map);
 static int nvnet_init(struct net_device *dev);
-static void nvnet_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
+static irqreturn_t nvnet_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
 static void nvnet_multicast(struct net_device *dev);
 
 typedef enum {fail, pass} result; /* Boolean pass/fail results */
--- CUT HERE ---


^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: [PATCH] nvidia nforce 1.0-261 nvnet for kernel 2.5
@ 2003-07-29  8:44 Eric
  0 siblings, 0 replies; 24+ messages in thread
From: Eric @ 2003-07-29  8:44 UTC (permalink / raw)
  To: linux-kernel

from various hardware source the NVNET hardware is probably this:

MCP integrated NVIDIA^R MAC + Realtek^R 8201BL PHY

The specs on asus and epox refer to using  the nvnet on the some fo 
their boards, in the detailed specs you get the above detail

Hope it helps
I could be persuaded to do some testing if required



^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2003-07-29  8:43 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-26 22:09 [PATCH] nvidia nforce 1.0-261 nvnet for kernel 2.5 Andrew de Quincey
2003-07-27  4:50 ` Rahul Karnik
2003-07-27  4:56 ` Rahul Karnik
2003-07-27  2:26   ` Marcelo Penna Guerra
2003-07-27  5:59     ` Rahul Karnik
2003-07-27  9:16       ` Laurens
2003-07-27 10:37         ` Rahul Karnik
2003-07-27 11:19       ` Andrew de Quincey
2003-07-27 11:22       ` Andrew de Quincey
2003-07-27 11:48         ` Rahul Karnik
2003-07-27 11:46           ` Andrew de Quincey
2003-07-27 12:02           ` Andrew de Quincey
2003-07-27 13:36             ` Rahul Karnik
2003-07-27 14:01             ` Rahul Karnik
2003-07-27 14:14               ` Andrew de Quincey
2003-07-27 14:44                 ` Rahul Karnik
2003-07-27 15:46                   ` Alan Cox
2003-07-27 16:28                     ` Rahul Karnik
2003-07-27 19:51                       ` Laurens
2003-07-28  1:09             ` Jeff Garzik
2003-07-27 23:11               ` Marcelo Penna Guerra
2003-07-28  8:53                 ` Andrew de Quincey
2003-07-27  5:53   ` Brian Jackson
2003-07-29  8:44 Eric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).