I've been trying to get a 2.6 kernel working on this machine...the packaged 2.6 test 2 is almost there, but for one annoying problem. I have an nforce2 motherboard, so I need the nvnet module from the nforce driver pack to get my onboard network to work. This doesn't compile under 2.6; however, I found an unofficial patch for it which seems to work for others. The patch is attached (it applies cleanly to the 0261 version of the nforce driver package). It won't work on the packaged Mandrake kernel, however, because it expects to use a program called modpost, in /lib/modules/2.6.0-0.test2.2mdk/build/scripts/ . There is no executable of that name in that directory, but I can see the relevant source files, modpost.c and modpost.h. I assume therefore that building this utility is an option during kernel compilation which the 2.6 packager has set to no...could it please be built for the next 2.6? Thanks a lot. -- adamw
diff -Naur nvnet/Makefile nvnet-2.5/Makefile --- nvnet/Makefile 2003-05-06 16:39:38.000000000 -0300 +++ nvnet-2.5/Makefile 2003-07-10 23:51:29.000000000 -0300 @@ -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) + -DKBUILD_BASENAME=nvnet -DKBUILD_MODNAME=nvnet -fno-common \ + -DMODULE -I$(SYSINCLUDE) -I$(SYSINCLUDE)/asm/mach-default $(ARCHDEFS) # # 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 -Naur nvnet/nvnet.c nvnet-2.5/nvnet.c --- nvnet/nvnet.c 2003-05-06 16:39:38.000000000 -0300 +++ nvnet-2.5/nvnet.c 2003-07-15 20:26:52.000000000 -0300 @@ -26,6 +26,9 @@ 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 +756,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 +768,7 @@ irq, dev_instance, regs); if(!dev) - return; + return IRQ_NONE; if(priv->hwapi->pfnQueryInterrupt(priv->hwapi->pADCX)) { @@ -776,6 +779,8 @@ PRINTK(DEBUG_INTR, "nvnet_interrupt - Out\n"); + return IRQ_HANDLED; + } static int nvnet_close(struct net_device *dev) @@ -1127,6 +1132,7 @@ priv->pdev = pdev; SET_MODULE_OWNER(dev); + SET_NETDEV_DEV(dev, &pdev->dev); priv->regs = (char *)memptr; pci_set_master(pdev); @@ -1245,7 +1251,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 -Naur nvnet/nvnet.h nvnet-2.5/nvnet.h --- nvnet/nvnet.h 2003-05-06 16:39:38.000000000 -0300 +++ nvnet-2.5/nvnet.h 2003-06-14 12:36:47.000000000 -0300 @@ -104,7 +104,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 */