Commit a8a7cf5b authored by Paul Fulghum's avatar Paul Fulghum Committed by Linus Torvalds

[PATCH] 2.5.8 synclink.c

patch to update virt_to_bus functions and remove version depedent #ifdef
statements
parent 52e36bc2
/* /*
* linux/drivers/char/synclink.c * 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 * Device driver for Microgate SyncLink ISA and PCI
* high speed multiprotocol serial adapters. * high speed multiprotocol serial adapters.
...@@ -60,8 +60,6 @@ ...@@ -60,8 +60,6 @@
# define BREAKPOINT() { } # define BREAKPOINT() { }
#endif #endif
#error Please convert me to Documentation/DMA-mapping.txt
#define MAX_ISA_DEVICES 10 #define MAX_ISA_DEVICES 10
#define MAX_PCI_DEVICES 10 #define MAX_PCI_DEVICES 10
#define MAX_TOTAL_DEVICES 20 #define MAX_TOTAL_DEVICES 20
...@@ -109,12 +107,8 @@ ...@@ -109,12 +107,8 @@
#endif #endif
#ifdef CONFIG_SYNCLINK_SYNCPPP #ifdef CONFIG_SYNCLINK_SYNCPPP
#if LINUX_VERSION_CODE < VERSION(2,4,3)
#include "../net/wan/syncppp.h"
#else
#include <net/syncppp.h> #include <net/syncppp.h>
#endif #endif
#endif
#define GET_USER(error,value,addr) error = get_user(value,addr) #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 #define COPY_FROM_USER(error,dest,src,size) error = copy_from_user(dest,src,size) ? -EFAULT : 0
...@@ -923,7 +917,7 @@ MODULE_PARM(txdmabufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i"); ...@@ -923,7 +917,7 @@ MODULE_PARM(txdmabufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i");
MODULE_PARM(txholdbufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i"); MODULE_PARM(txholdbufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i");
static char *driver_name = "SyncLink serial driver"; 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, static int synclink_init_one (struct pci_dev *dev,
const struct pci_device_id *ent); const struct pci_device_id *ent);
...@@ -3985,7 +3979,7 @@ int mgsl_alloc_buffer_list_memory( struct mgsl_struct *info ) ...@@ -3985,7 +3979,7 @@ int mgsl_alloc_buffer_list_memory( struct mgsl_struct *info )
if ( info->buffer_list == NULL ) if ( info->buffer_list == NULL )
return -ENOMEM; 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. */ /* We got the memory for the buffer entry lists. */
...@@ -4096,7 +4090,7 @@ int mgsl_alloc_frame_memory(struct mgsl_struct *info,DMABUFFERENTRY *BufferList, ...@@ -4096,7 +4090,7 @@ int mgsl_alloc_frame_memory(struct mgsl_struct *info,DMABUFFERENTRY *BufferList,
kmalloc(DMABUFFERSIZE, GFP_KERNEL | GFP_DMA); kmalloc(DMABUFFERSIZE, GFP_KERNEL | GFP_DMA);
if ( BufferList[i].virt_addr == NULL ) if ( BufferList[i].virt_addr == NULL )
return -ENOMEM; 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; BufferList[i].phys_addr = phys_addr;
} }
...@@ -7991,10 +7985,6 @@ void mgsl_sppp_init(struct mgsl_struct *info) ...@@ -7991,10 +7985,6 @@ void mgsl_sppp_init(struct mgsl_struct *info)
d->tx_timeout = mgsl_sppp_tx_timeout; d->tx_timeout = mgsl_sppp_tx_timeout;
d->watchdog_timeo = 10*HZ; d->watchdog_timeo = 10*HZ;
#if LINUX_VERSION_CODE < VERSION(2,4,4)
dev_init_buffers(d);
#endif
if (register_netdev(d) == -1) { if (register_netdev(d) == -1) {
printk(KERN_WARNING "%s: register_netdev failed.\n", d->name); printk(KERN_WARNING "%s: register_netdev failed.\n", d->name);
sppp_detach(info->netdev); sppp_detach(info->netdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment