Commit 00d412d2 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/jgarzik/net-drivers-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents dda0d60c 1357129c
......@@ -269,7 +269,7 @@ static void set_ioapic_affinity (unsigned int irq, unsigned long mask)
# include <linux/slab.h> /* kmalloc() */
# include <linux/timer.h> /* time_after() */
# if CONFIG_BALANCED_IRQ_DEBUG
# ifdef CONFIG_BALANCED_IRQ_DEBUG
# define TDprintk(x...) do { printk("<%ld:%s:%d>: ", jiffies, __FILE__, __LINE__); printk(x); } while (0)
# define Dprintk(x...) do { TDprintk(x); } while (0)
# else
......
......@@ -47,7 +47,7 @@
/*
* core module and version information
*/
#define RNG_VERSION "0.9.0"
#define RNG_VERSION "1.0.0"
#define RNG_MODULE_NAME "hw_random"
#define RNG_DRIVER_NAME RNG_MODULE_NAME " hardware driver " RNG_VERSION
#define PFX RNG_MODULE_NAME ": "
......@@ -499,7 +499,7 @@ static ssize_t rng_dev_read (struct file *filp, char *buf, size_t size,
spin_unlock (&rng_lock);
while (have_data > 0) {
while (have_data && size) {
if (put_user((u8)data, buf++)) {
ret = ret ? : -EFAULT;
break;
......
......@@ -115,15 +115,15 @@
**==========================================================
*/
#define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s))
#include <linux/version.h>
#include <linux/module.h>
#include <asm/dma.h>
#include <asm/io.h>
#include <asm/system.h>
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,17)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,17)
#include <linux/spinlock.h>
#elif LINUX_VERSION_CODE >= LinuxVersionCode(2,1,93)
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
#include <asm/spinlock.h>
#endif
#include <linux/delay.h>
......@@ -140,10 +140,9 @@
#include <linux/timer.h>
#include <linux/stat.h>
#include <linux/version.h>
#include <linux/blk.h>
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,35)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,35)
#include <linux/init.h>
#endif
......@@ -154,7 +153,7 @@
#define __initdata
#endif
#if LINUX_VERSION_CODE <= LinuxVersionCode(2,1,92)
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,1,92)
#include <linux/bios32.h>
#endif
......@@ -205,7 +204,7 @@ typedef u_long vm_offset_t;
** Donnot compile integrity checking code for Linux-2.3.0
** and above since SCSI data structures are not ready yet.
*/
/* #if LINUX_VERSION_CODE < LinuxVersionCode(2,3,0) */
/* #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) */
#if 0
#define SCSI_NCR_INTEGRITY_CHECKING
#endif
......@@ -1049,7 +1048,7 @@ struct ncb {
/* when lcb is not allocated. */
Scsi_Cmnd *done_list; /* Commands waiting for done() */
/* callback to be invoked. */
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,93)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
spinlock_t smp_lock; /* Lock for SMP threading */
#endif
......@@ -3816,7 +3815,7 @@ ncr_attach (Scsi_Host_Template *tpnt, int unit, ncr_device *device)
instance->max_id = np->maxwide ? 16 : 8;
instance->max_lun = SCSI_NCR_MAX_LUN;
#ifndef SCSI_NCR_IOMAPPED
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,29)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
instance->base = (unsigned long) np->reg;
#else
instance->base = (char *) np->reg;
......@@ -3901,7 +3900,7 @@ ncr_attach (Scsi_Host_Template *tpnt, int unit, ncr_device *device)
if (request_irq(device->slot.irq, ncr53c8xx_intr,
((driver_setup.irqm & 0x10) ? 0 : SA_SHIRQ) |
#if LINUX_VERSION_CODE < LinuxVersionCode(2,2,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)
((driver_setup.irqm & 0x20) ? 0 : SA_INTERRUPT),
#else
0,
......@@ -9335,7 +9334,7 @@ printk("ncr53c8xx_proc_info: hostno=%d, func=%d\n", hostno, func);
**
**==========================================================
*/
#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,27)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,27)
static struct proc_dir_entry proc_scsi_ncr53c8xx = {
PROC_SCSI_NCR53C8XX, 9, NAME53C8XX,
S_IFDIR | S_IRUGO | S_IXUGO, 2
......@@ -9350,7 +9349,7 @@ static struct proc_dir_entry proc_scsi_ncr53c8xx = {
*/
#ifdef MODULE
char *ncr53c8xx = 0; /* command line passed by insmod */
# if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,30)
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,30)
MODULE_PARM(ncr53c8xx, "s");
# endif
#endif
......@@ -9360,7 +9359,7 @@ int __init ncr53c8xx_setup(char *str)
return sym53c8xx__setup(str);
}
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,13)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13)
#ifndef MODULE
__setup("ncr53c8xx=", ncr53c8xx_setup);
#endif
......@@ -9469,7 +9468,7 @@ int __init ncr53c8xx_detect(Scsi_Host_Template *tpnt)
** Initialize driver general stuff.
*/
#ifdef SCSI_NCR_PROC_INFO_SUPPORT
#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,27)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,27)
tpnt->proc_dir = &proc_scsi_ncr53c8xx;
#else
tpnt->proc_name = NAME53C8XX;
......@@ -9502,10 +9501,10 @@ const char *ncr53c8xx_info (struct Scsi_Host *host)
*/
MODULE_LICENSE("GPL");
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
static
#endif
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) || defined(MODULE)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) || defined(MODULE)
#ifdef ENABLE_SCSI_ZALON
Scsi_Host_Template driver_template = {
.proc_name = "zalon720",
......
......@@ -99,16 +99,16 @@
**==========================================================
*/
#define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s))
#include <linux/version.h>
#include <linux/module.h>
#include <asm/dma.h>
#include <asm/io.h>
#include <asm/system.h>
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,17)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,17)
#include <linux/spinlock.h>
#elif LINUX_VERSION_CODE >= LinuxVersionCode(2,1,93)
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
#include <asm/spinlock.h>
#endif
#include <linux/delay.h>
......@@ -123,10 +123,9 @@
#include <linux/timer.h>
#include <linux/stat.h>
#include <linux/version.h>
#include <linux/blk.h>
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,35)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,35)
#include <linux/init.h>
#endif
......@@ -137,7 +136,7 @@
#define __initdata
#endif
#if LINUX_VERSION_CODE <= LinuxVersionCode(2,1,92)
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,1,92)
#include <linux/bios32.h>
#endif
......@@ -170,7 +169,7 @@ typedef u64 u_int64;
** Donnot compile integrity checking code for Linux-2.3.0
** and above since SCSI data structures are not ready yet.
*/
/* #if LINUX_VERSION_CODE < LinuxVersionCode(2,3,0) */
/* #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) */
#if 0
#define SCSI_NCR_INTEGRITY_CHECKING
#endif
......@@ -183,7 +182,7 @@ typedef u64 u_int64;
** despite the fact that the PCI specifications are looking
** so smart and simple! ;-)
*/
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,47)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,47)
#define SCSI_NCR_DYNAMIC_DMA_MAPPING
#endif
......@@ -439,7 +438,7 @@ static inline struct xpt_quehead *xpt_remque_tail(struct xpt_quehead *head)
** code.
*/
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,2,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
typedef struct pci_dev *pcidev_t;
#define PCIDEV_NULL (0)
......@@ -454,7 +453,7 @@ pci_get_base_cookie(struct pci_dev *pdev, int index)
{
u_long base;
#if LINUX_VERSION_CODE > LinuxVersionCode(2,3,12)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,12)
base = pdev->resource[index].start;
#else
base = pdev->base_address[index];
......@@ -574,13 +573,13 @@ pci_get_base_cookie(struct pci_dev *pdev, int offset)
return base;
}
#endif /* LINUX_VERSION_CODE >= LinuxVersionCode(2,2,0) */
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) */
/* Does not make sense in earlier kernels */
#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
#define pci_enable_device(pdev) (0)
#endif
#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,4)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,4)
#define scsi_set_pci_device(inst, pdev) (0)
#endif
......@@ -630,7 +629,7 @@ static int ncr_debug = SCSI_NCR_DEBUG_FLAGS;
** wished (e.g.: threaded by controller).
*/
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,93)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
spinlock_t sym53c8xx_lock = SPIN_LOCK_UNLOCKED;
#define NCR_LOCK_DRIVER(flags) spin_lock_irqsave(&sym53c8xx_lock, flags)
......@@ -670,7 +669,7 @@ spinlock_t sym53c8xx_lock = SPIN_LOCK_UNLOCKED;
** architecture.
*/
#if LINUX_VERSION_CODE < LinuxVersionCode(2,1,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0)
#define ioremap vremap
#define iounmap vfree
#endif
......@@ -713,7 +712,7 @@ static void __init unmap_pci_mem(u_long vaddr, u_long size)
** inaccurate on Pentium processors.
*/
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,105)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,105)
#define UDELAY udelay
#define MDELAY mdelay
#else
......@@ -735,7 +734,7 @@ static void MDELAY(long ms) { while (ms--) UDELAY(1000); }
** real bus astraction, btw).
*/
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
#define __GetFreePages(flags, order) __get_free_pages(flags, order)
#else
#define __GetFreePages(flags, order) __get_free_pages(flags, order, 0)
......@@ -1282,7 +1281,7 @@ static __inline__ int scsi_data_direction(Scsi_Cmnd *cmd)
/*
** /proc directory entry and proc_info function
*/
#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,27)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,27)
static struct proc_dir_entry proc_scsi_sym53c8xx = {
PROC_SCSI_SYM53C8XX, 9, NAME53C8XX,
S_IFDIR | S_IRUGO | S_IXUGO, 2
......@@ -1307,7 +1306,7 @@ static struct ncr_driver_setup
driver_safe_setup __initdata = SCSI_NCR_DRIVER_SAFE_SETUP;
# ifdef MODULE
char *sym53c8xx = 0; /* command line passed by insmod */
# if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,30)
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,30)
MODULE_PARM(sym53c8xx, "s");
# endif
# endif
......@@ -2026,7 +2025,7 @@ struct ncb {
/* when lcb is not allocated. */
Scsi_Cmnd *done_list; /* Commands waiting for done() */
/* callback to be invoked. */
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,93)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
spinlock_t smp_lock; /* Lock for SMP threading */
#endif
......@@ -5843,7 +5842,7 @@ ncr_attach (Scsi_Host_Template *tpnt, int unit, ncr_device *device)
((driver_setup.irqm & 0x20) ? 0 : SA_INTERRUPT),
#else
((driver_setup.irqm & 0x10) ? 0 : SA_SHIRQ) |
#if LINUX_VERSION_CODE < LinuxVersionCode(2,2,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)
((driver_setup.irqm & 0x20) ? 0 : SA_INTERRUPT),
#else
0,
......@@ -5907,7 +5906,7 @@ ncr_attach (Scsi_Host_Template *tpnt, int unit, ncr_device *device)
instance->max_id = np->maxwide ? 16 : 8;
instance->max_lun = MAX_LUN;
#ifndef SCSI_NCR_IOMAPPED
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,29)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
instance->base = (unsigned long) np->reg;
#else
instance->base = (char *) np->reg;
......@@ -7406,7 +7405,7 @@ void ncr_complete (ncb_p np, ccb_p cp)
}
}
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,99)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,99)
/*
** Move residual byte count to user structure.
*/
......@@ -12774,7 +12773,7 @@ int __init sym53c8xx_setup(char *str)
return 1;
}
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,13)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13)
#ifndef MODULE
__setup("sym53c8xx=", sym53c8xx_setup);
#endif
......@@ -12915,7 +12914,7 @@ int __init sym53c8xx_detect(Scsi_Host_Template *tpnt)
** Initialize driver general stuff.
*/
#ifdef SCSI_NCR_PROC_INFO_SUPPORT
#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,27)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,27)
tpnt->proc_dir = &proc_scsi_sym53c8xx;
#else
tpnt->proc_name = NAME53C8XX;
......@@ -13244,7 +13243,7 @@ sym53c8xx_pci_init(Scsi_Host_Template *tpnt, pcidev_t pdev, ncr_device *device)
pci_write_config_word(pdev, PCI_COMMAND, command);
}
#if LINUX_VERSION_CODE < LinuxVersionCode(2,2,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)
if ( is_prep ) {
if (io_port >= 0x10000000) {
printk(NAME53C8XX ": reallocating io_port (Wacky IBM)");
......@@ -13270,7 +13269,7 @@ sym53c8xx_pci_init(Scsi_Host_Template *tpnt, pcidev_t pdev, ncr_device *device)
#if defined(__i386__) && !defined(MODULE)
if (!cache_line_size) {
#if LINUX_VERSION_CODE < LinuxVersionCode(2,1,75)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,75)
extern char x86;
switch(x86) {
#else
......@@ -14719,10 +14718,10 @@ sym_read_Tekram_nvram (ncr_slot *np, u_short device_id, Tekram_nvram *nvram)
MODULE_LICENSE("GPL");
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
static
#endif
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) || defined(MODULE)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) || defined(MODULE)
Scsi_Host_Template driver_template = SYM53C8XX;
#include "scsi_module.c"
#endif
......@@ -49,7 +49,7 @@ extern void free_irq(unsigned int, void *);
/*
* Temporary defines for UP kernels, until all code gets fixed.
*/
#if !CONFIG_SMP
#ifndef CONFIG_SMP
# define cli() local_irq_disable()
# define sti() local_irq_enable()
# define save_flags(x) local_save_flags(x)
......
......@@ -166,6 +166,7 @@ static __inline__ int DQUOT_OFF(struct super_block *sb)
*/
#define sb_dquot_ops (NULL)
#define sb_quotactl_ops (NULL)
#define sync_dquots_dev(dev,type) (NULL)
#define DQUOT_INIT(inode) do { } while(0)
#define DQUOT_DROP(inode) do { } while(0)
#define DQUOT_ALLOC_INODE(inode) (0)
......
......@@ -467,7 +467,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
#define PF_KSWAPD 0x00040000 /* I am kswapd */
#define PF_SWAPOFF 0x00080000 /* I am in swapoff */
#if CONFIG_SMP
#ifdef CONFIG_SMP
extern void set_cpus_allowed(task_t *p, unsigned long new_mask);
#else
# define set_cpus_allowed(p, new_mask) do { } while (0)
......
......@@ -65,7 +65,7 @@ extern void add_timer_on(struct timer_list *timer, int cpu);
extern int del_timer(struct timer_list * timer);
extern int mod_timer(struct timer_list *timer, unsigned long expires);
#if CONFIG_SMP
#ifdef CONFIG_SMP
extern int del_timer_sync(struct timer_list * timer);
#else
# define del_timer_sync(t) del_timer(t)
......
......@@ -206,7 +206,7 @@
#include <asm/io.h>
#include <asm/dma.h>
#if defined CONFIG_ALPHA_NAUTILUS || CONFIG_ALPHA_GENERIC
#if defined(CONFIG_ALPHA_NAUTILUS) || defined(CONFIG_ALPHA_GENERIC)
#include <asm/hwrpb.h>
#endif
......@@ -4284,7 +4284,7 @@ static int __init trident_probe(struct pci_dev *pci_dev, const struct pci_device
if(card->revision == ALI_5451_V02)
ali_close_multi_channels();
/* edited by HMSEO for GT sound */
#if defined CONFIG_ALPHA_NAUTILUS || CONFIG_ALPHA_GENERIC
#if defined(CONFIG_ALPHA_NAUTILUS) || defined(CONFIG_ALPHA_GENERIC)
{
u16 ac97_data;
extern struct hwrpb_struct *hwrpb;
......
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