[PATCH] 2.5.8-pre3 synclink.c

Paul Fulghum (paulkf@microgate.com)
10 Apr 2002 16:03:30 -0500


patch against 2.5.8-pre3 to update virt_to_bus functions and
remove version depedent #ifdef statements

--- linux-2.5.8-pre3/drivers/char/synclink.c Wed Apr 10 15:35:55 2002
+++ linux-2.5.8-pre3-mg/drivers/char/synclink.c Wed Apr 10 15:43:18 2002
@@ -1,7 +1,7 @@
/*
* linux/drivers/char/synclink.c
*
- * $Id: synclink.c,v 3.12 2001/07/18 19:14:21 paulkf Exp $
+ * $Id: synclink.c,v 4.2 2002/04/10 20:45:13 paulkf Exp $
*
* Device driver for Microgate SyncLink ISA and PCI
* high speed multiprotocol serial adapters.
@@ -60,8 +60,6 @@
# define BREAKPOINT() { }
#endif

-#error Please convert me to Documentation/DMA-mapping.txt
-
#define MAX_ISA_DEVICES 10
#define MAX_PCI_DEVICES 10
#define MAX_TOTAL_DEVICES 20
@@ -109,12 +107,8 @@
#endif

#ifdef CONFIG_SYNCLINK_SYNCPPP
-#if LINUX_VERSION_CODE < VERSION(2,4,3)
-#include "../net/wan/syncppp.h"
-#else
#include <net/syncppp.h>
#endif
-#endif

#define GET_USER(error,value,addr) error = get_user(value,addr)
#define COPY_FROM_USER(error,dest,src,size) error = copy_from_user(dest,src,size) ? -EFAULT : 0
@@ -923,7 +917,7 @@
MODULE_PARM(txholdbufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i");

static char *driver_name = "SyncLink serial driver";
-static char *driver_version = "$Revision: 3.12 $";
+static char *driver_version = "$Revision: 4.2 $";

static int synclink_init_one (struct pci_dev *dev,
const struct pci_device_id *ent);
@@ -3985,7 +3979,7 @@
if ( info->buffer_list == NULL )
return -ENOMEM;

- info->buffer_list_phys = virt_to_bus(info->buffer_list);
+ info->buffer_list_phys = isa_virt_to_bus(info->buffer_list);
}

/* We got the memory for the buffer entry lists. */
@@ -4096,7 +4090,7 @@
kmalloc(DMABUFFERSIZE, GFP_KERNEL | GFP_DMA);
if ( BufferList[i].virt_addr == NULL )
return -ENOMEM;
- phys_addr = virt_to_bus(BufferList[i].virt_addr);
+ phys_addr = isa_virt_to_bus(BufferList[i].virt_addr);
}
BufferList[i].phys_addr = phys_addr;
}
@@ -7990,10 +7984,6 @@
d->get_stats = mgsl_net_stats;
d->tx_timeout = mgsl_sppp_tx_timeout;
d->watchdog_timeo = 10*HZ;
-
-#if LINUX_VERSION_CODE < VERSION(2,4,4)
- dev_init_buffers(d);
-#endif

if (register_netdev(d) == -1) {
printk(KERN_WARNING "%s: register_netdev failed.\n", d->name);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/