[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20070614024359.8016.qmail@science.horizon.com>
Date: 13 Jun 2007 22:43:59 -0400
From: linux@...izon.com
To: plr@...aard.com
Cc: linux@...izon.com, netdev@...r.kernel.org
Subject: Re: IC Plus Corp IC Plus IP1000
The following hacks to bring it up to date got the vendor-supplied
driver working for me. This is just fixing the things the compiler
complained about; there may be other issues, but they don't seem to
interfere with basic funtionality.
diff --git a/Makefile b/Makefile
index c91b384..31e4172 100644
--- a/Makefile
+++ b/Makefile
@@ -77,10 +77,10 @@ ifeq ($(kernelFlag26),kernel26x)
EXTRA_CFLAGS+=$(MAPPING_MODE)
all:
- $(MAKE) -C $(KernelBuildDir) SUBDIRS=$(PWD) modules
+ $(MAKE) -C $(KernelBuildDir) M=$(PWD)
install:
- install -m 644 -c ipg.$(kernelExtension) $(kernelMisc)
+ $(MAKE) -C $(KernelBuildDir) M=$(PWD) modules_install
ipg-objs:=$(OBJS)
obj-m+=$(TARGET)
diff --git a/ipg.h b/ipg.h
index 2d184d4..cefe5c8 100644
--- a/ipg.h
+++ b/ipg.h
@@ -98,8 +98,8 @@
*/
-#include <linux/config.h>
#include <linux/version.h>
+#include <linux/utsrelease.h>
#include <linux/module.h>
#if ((LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)) && defined(MODVERSIONS))
diff --git a/ipg_main.c b/ipg_main.c
index c39ff4a..3a0dfd4 100644
--- a/ipg_main.c
+++ b/ipg_main.c
@@ -172,9 +172,11 @@ int ipg_io_config(IPG_DEVICE_TYPE *ipg_ethernet_device);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
void ipg_interrupt_handler(int ipg_irq, void *device_instance,
struct pt_regs *regs);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
static irqreturn_t ipg_interrupt_handler(int ipg_irq, void *device_instance,
struct pt_regs *regs);
+#else
+static irqreturn_t ipg_interrupt_handler(int ipg_irq, void *device_instance);
#endif
void ipg_nic_txcleanup(IPG_DEVICE_TYPE *ipg_ethernet_device);
@@ -1425,9 +1427,11 @@ int ipg_io_config(IPG_DEVICE_TYPE *ipg_ethernet_device)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
void ipg_interrupt_handler(int ipg_irq, void *device_instance,
struct pt_regs *regs)
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
static irqreturn_t ipg_interrupt_handler(int ipg_irq, void *device_instance,
struct pt_regs *regs)
+#else
+static irqreturn_t ipg_interrupt_handler(int ipg_irq, void *device_instance)
#endif
{
int error;
@@ -1957,7 +1961,7 @@ int ipg_nic_open(IPG_DEVICE_TYPE *ipg_ethernet_device)
*/
if ((error = request_irq(sp->ipg_pci_device->irq,
&ipg_interrupt_handler,
- SA_SHIRQ,
+ IRQF_SHARED,
ipg_ethernet_device->name,
ipg_ethernet_device)) < 0)
{
@@ -4041,7 +4045,10 @@ int init_module(void)
#endif
IPG_DEBUG_MSG("init_module\n");
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
+ return pci_register_driver(&ipg_pci_driver);
+#elif LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
return pci_module_init(&ipg_pci_driver);
#else
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists