--- linux-2.5.68/arch/alpha/Kconfig 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/alpha/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -291,7 +291,7 @@ config PCI VESA. If you have PCI, say Y, otherwise N. The PCI-HOWTO, available from - , contains valuable + , contains valuable information about which PCI hardware does work under Linux and which doesn't. @@ -514,7 +514,7 @@ config SMP See also the , , , and the SMP-HOWTO available at - . + . If you don't know what to do here, say N. @@ -688,7 +688,7 @@ config BINFMT_ELF want to say Y here. Information about ELF is contained in the ELF HOWTO available from - . + . If you find that after upgrading from Linux kernel 1.2 and saying Y here, you still can't run any ELF binaries (they just crash), then @@ -710,7 +710,7 @@ config BINFMT_MISC programs that need an interpreter to run like Java, Python or Emacs-Lisp. It's also useful if you often run DOS executables under the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from - ). Once you have + ). Once you have registered such a binary class with the kernel, you can start one of those programs simply by typing in its name at a shell prompt; Linux will automatically feed it to the correct interpreter. @@ -862,7 +862,7 @@ config CD_NO_IDESCSI ---help--- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y here, otherwise N. Read the CD-ROM-HOWTO, available from - . + . Note that the answer to this question doesn't directly affect the kernel: saying N will just cause the configurator to skip all @@ -912,7 +912,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/alpha/kernel/core_irongate.c 2003-02-24 13:08:45.000000000 -0800 +++ 25/arch/alpha/kernel/core_irongate.c 2003-04-21 00:31:39.000000000 -0700 @@ -14,6 +14,7 @@ #include #include #include +#include #include #include --- linux-2.5.68/arch/alpha/kernel/setup.c 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/alpha/kernel/setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -32,11 +32,7 @@ #include #include #include - -#ifdef CONFIG_BLK_DEV_INITRD -#include -#endif - +#include #ifdef CONFIG_MAGIC_SYSRQ #include #include --- linux-2.5.68/arch/alpha/mm/init.c 2003-01-16 18:22:43.000000000 -0800 +++ 25/arch/alpha/mm/init.c 2003-04-21 00:31:39.000000000 -0700 @@ -66,19 +66,9 @@ pgd_alloc(struct mm_struct *mm) pte_t * pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { - pte_t *pte; - long timeout = 10; - - retry: - pte = (pte_t *) __get_free_page(GFP_KERNEL); + pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (pte) clear_page(pte); - else if (--timeout >= 0) { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - goto retry; - } - return pte; } --- linux-2.5.68/arch/alpha/mm/numa.c 2003-02-24 13:08:45.000000000 -0800 +++ 25/arch/alpha/mm/numa.c 2003-04-21 00:31:39.000000000 -0700 @@ -12,9 +12,7 @@ #include #include #include -#ifdef CONFIG_BLK_DEV_INITRD -#include -#endif +#include #include #include --- linux-2.5.68/arch/arm/Kconfig 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/arm/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -445,7 +445,7 @@ config PCI VESA. If you have PCI, say Y, otherwise N. The PCI-HOWTO, available from - , contains valuable + , contains valuable information about which PCI hardware does work under Linux and which doesn't. @@ -459,7 +459,7 @@ config PCI_INTEGRATOR VESA. If you have PCI, say Y, otherwise N. The PCI-HOWTO, available from - , contains valuable + , contains valuable information about which PCI hardware does work under Linux and which doesn't. @@ -717,7 +717,7 @@ config BINFMT_ELF want to say Y here. Information about ELF is contained in the ELF HOWTO available from - . + . If you find that after upgrading from Linux kernel 1.2 and saying Y here, you still can't run any ELF binaries (they just crash), then @@ -739,7 +739,7 @@ config BINFMT_MISC programs that need an interpreter to run like Java, Python or Emacs-Lisp. It's also useful if you often run DOS executables under the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from - ). Once you have + ). Once you have registered such a binary class with the kernel, you can start one of those programs simply by typing in its name at a shell prompt; Linux will automatically feed it to the correct interpreter. @@ -770,7 +770,7 @@ config PM page on the WWW at and the Battery Powered Linux mini-HOWTO, available from - . + . Note that, even if you say N here, Linux on the x86 architecture will issue the hlt instruction if nothing is to be done, thereby @@ -809,7 +809,7 @@ config APM In order to use APM, you will need supporting software. For location and more information, read and the Battery Powered Linux mini-HOWTO, available from - . + . This driver does not spin down disk drives (see the hdparm(8) manpage ("man 8 hdparm") for that), and it doesn't turn off @@ -1063,7 +1063,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/arm/kernel/setup.c 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/arm/kernel/setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/arm/mach-clps711x/fortunet.c 2003-01-16 18:22:21.000000000 -0800 +++ 25/arch/arm/mach-clps711x/fortunet.c 2003-04-21 00:31:39.000000000 -0700 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include --- linux-2.5.68/arch/arm/mm/init.c 2003-01-16 18:21:38.000000000 -0800 +++ 25/arch/arm/mm/init.c 2003-04-21 00:31:39.000000000 -0700 @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include --- linux-2.5.68/arch/cris/drivers/Kconfig 2003-02-10 12:24:11.000000000 -0800 +++ 25/arch/cris/drivers/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -30,7 +30,7 @@ config NET_ETHERNET If your Linux machine will be connected to an Ethernet and you have an Ethernet network interface card (NIC) installed in your computer, say Y here and read the Ethernet-HOWTO, available from - . You will then also have + . You will then also have to say Y to the driver for your particular NIC. Note that the answer to this question won't directly affect the @@ -392,7 +392,7 @@ config PRINTER box (as opposed to using a serial printer; if the connector at the printer has 9 or 25 holes ["female"], then it's serial), say Y. Also read the Printing-HOWTO, available from - . + . It is possible to share one parallel port among several devices (e.g. printer and ZIP drive) and it is safe to compile the @@ -485,7 +485,7 @@ config BLK_DEV_IDE topics, is contained in . For detailed information about hard drives, consult the Disk-HOWTO and the Multi-Disk-HOWTO, available from - . + . To fine-tune ATA/IDE drive/interface parameters for improved performance, look for the hdparm package at --- linux-2.5.68/arch/cris/Kconfig 2003-03-17 14:56:00.000000000 -0800 +++ 25/arch/cris/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -40,7 +40,7 @@ config BINFMT_ELF want to say Y here. Information about ELF is contained in the ELF HOWTO available from - . + . If you find that after upgrading from Linux kernel 1.2 and saying Y here, you still can't run any ELF binaries (they just crash), then @@ -615,7 +615,7 @@ config CD_NO_IDESCSI ---help--- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y here, otherwise N. Read the CD-ROM-HOWTO, available from - . + . Note that the answer to this question doesn't directly affect the kernel: saying N will just cause the configurator to skip all @@ -667,7 +667,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/h8300/Kconfig 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/h8300/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -181,7 +181,7 @@ config NETDEVICES telephone line with a modem either via UUCP (UUCP is a protocol to forward mail and news between unix hosts over telephone lines; read the UUCP-HOWTO, available from - ) or dialing up a shell + ) or dialing up a shell account or a BBS, even using term (term is a program which gives you almost full Internet connectivity if you have a regular dial up shell account on some Internet connected Unix computer. Read @@ -201,7 +201,7 @@ config NETDEVICES Make sure to read the NET-3-HOWTO. Eventually, you will have to read Olaf Kirch's excellent and free book "Network Administrator's - Guide", to be found in . If + Guide", to be found in . If unsure, say Y. endmenu --- linux-2.5.68/arch/i386/Kconfig 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/i386/Kconfig 2003-04-21 02:44:48.000000000 -0700 @@ -409,7 +409,7 @@ config SMP See also the , , , and the SMP-HOWTO available at - . + . If you don't know what to do here, say N. @@ -790,7 +790,7 @@ config PM page on the WWW at and the Battery Powered Linux mini-HOWTO, available from - . + . Note that, even if you say N here, Linux on the x86 architecture will issue the hlt instruction if nothing is to be done, thereby @@ -847,7 +847,7 @@ config APM In order to use APM, you will need supporting software. For location and more information, read and the Battery Powered Linux mini-HOWTO, available from - . + . This driver does not spin down disk drives (see the hdparm(8) manpage ("man 8 hdparm") for that), and it doesn't turn off @@ -1000,7 +1000,7 @@ config PCI VESA. If you have PCI, say Y, otherwise N. The PCI-HOWTO, available from - , contains valuable + , contains valuable information about which PCI hardware does work under Linux and which doesn't. @@ -1203,7 +1203,7 @@ config BINFMT_ELF want to say Y here. Information about ELF is contained in the ELF HOWTO available from - . + . If you find that after upgrading from Linux kernel 1.2 and saying Y here, you still can't run any ELF binaries (they just crash), then @@ -1225,7 +1225,7 @@ config BINFMT_MISC programs that need an interpreter to run like Java, Python or Emacs-Lisp. It's also useful if you often run DOS executables under the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from - ). Once you have + ). Once you have registered such a binary class with the kernel, you can start one of those programs simply by typing in its name at a shell prompt; Linux will automatically feed it to the correct interpreter. @@ -1341,7 +1341,7 @@ config CD_NO_IDESCSI ---help--- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y here, otherwise N. Read the CD-ROM-HOWTO, available from - . + . Note that the answer to this question doesn't directly affect the kernel: saying N will just cause the configurator to skip all @@ -1412,7 +1412,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/i386/kernel/i8259.c 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/i386/kernel/i8259.c 2003-04-21 00:31:39.000000000 -0700 @@ -325,15 +325,16 @@ void init_8259A(int auto_eoi) * =PC9800NOTE= In NEC PC-9800, we use irq8 instead of irq13! */ -static void math_error_irq(int cpl, void *dev_id, struct pt_regs *regs) +static irqreturn_t math_error_irq(int cpl, void *dev_id, struct pt_regs *regs) { extern void math_error(void *); #ifndef CONFIG_X86_PC9800 outb(0,0xF0); #endif if (ignore_fpu_irq || !boot_cpu_data.hard_math) - return; + return IRQ_NONE; math_error((void *)regs->eip); + return IRQ_HANDLED; } /* --- linux-2.5.68/arch/i386/kernel/io_apic.c 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/i386/kernel/io_apic.c 2003-04-21 00:31:39.000000000 -0700 @@ -1117,7 +1117,7 @@ next: if (current_vector == SYSCALL_VECTOR) goto next; - if (current_vector > FIRST_SYSTEM_VECTOR) { + if (current_vector >= FIRST_SYSTEM_VECTOR) { offset = (offset + 1) & 7; current_vector = FIRST_DEVICE_VECTOR + offset; } --- linux-2.5.68/arch/i386/kernel/irq.c 2003-03-24 15:36:50.000000000 -0800 +++ 25/arch/i386/kernel/irq.c 2003-04-21 00:31:39.000000000 -0700 @@ -74,7 +74,8 @@ static void register_irq_proc (unsigned * Special irq handlers. */ -void no_action(int cpl, void *dev_id, struct pt_regs *regs) { } +irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs) +{ return IRQ_NONE; } /* * Generic no controller code @@ -205,18 +206,30 @@ inline void synchronize_irq(unsigned int int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action) { int status = 1; /* Force the "do bottom halves" bit */ + int retval = 0; if (!(action->flags & SA_INTERRUPT)) local_irq_enable(); do { status |= action->flags; - action->handler(irq, action->dev_id, regs); + retval |= action->handler(irq, action->dev_id, regs).val; action = action->next; } while (action); if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); local_irq_disable(); + if (retval != 1) { + static int count = 100; + while (count) { + count--; + printk(retval + ? "irq event %d: bogus retval mask %x\n" + : "irq %d: nobody cared!n", + irq, + retval); + } + } return status; } @@ -447,7 +460,7 @@ out: */ int request_irq(unsigned int irq, - void (*handler)(int, void *, struct pt_regs *), + irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long irqflags, const char * devname, void *dev_id) --- linux-2.5.68/arch/i386/kernel/setup.c 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/i386/kernel/setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -29,9 +29,7 @@ #include #include #include -#ifdef CONFIG_BLK_DEV_RAM -#include -#endif +#include #include #include #include --- linux-2.5.68/arch/i386/kernel/time.c 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/i386/kernel/time.c 2003-04-21 00:31:39.000000000 -0700 @@ -124,15 +124,28 @@ void do_settimeofday(struct timeval *tv) * made, and then undo it! */ tv->tv_usec -= timer->get_offset(); - tv->tv_usec -= (jiffies - wall_jiffies) * (1000000 / HZ); + tv->tv_usec -= (jiffies - wall_jiffies) * (USEC_PER_SEC / HZ); while (tv->tv_usec < 0) { - tv->tv_usec += 1000000; + tv->tv_usec += USEC_PER_SEC; tv->tv_sec--; } + tv->tv_usec *= NSEC_PER_USEC; + + wall_to_monotonic.tv_sec += xtime.tv_sec - tv->tv_sec; + wall_to_monotonic.tv_nsec += xtime.tv_nsec - tv->tv_usec; + + if (wall_to_monotonic.tv_nsec > NSEC_PER_SEC) { + wall_to_monotonic.tv_nsec -= NSEC_PER_SEC; + wall_to_monotonic.tv_sec++; + } + if (wall_to_monotonic.tv_nsec < 0) { + wall_to_monotonic.tv_nsec += NSEC_PER_SEC; + wall_to_monotonic.tv_sec--; + } xtime.tv_sec = tv->tv_sec; - xtime.tv_nsec = (tv->tv_usec * 1000); + xtime.tv_nsec = tv->tv_usec; time_adjust = 0; /* stop active adjtime() */ time_status |= STA_UNSYNC; time_maxerror = NTP_PHASE_LIMIT; @@ -228,46 +241,11 @@ static inline void do_timer_interrupt(in } /* - * Lost tick detection and compensation - */ -static inline void detect_lost_tick(void) -{ - /* read time since last interrupt */ - unsigned long delta = timer->get_offset(); - static unsigned long dbg_print; - - /* check if delta is greater then two ticks */ - if(delta >= 2*(1000000/HZ)){ - - /* - * only print debug info first 5 times - */ - /* - * AKPM: disable this for now; it's nice, but irritating. - */ - if (0 && dbg_print < 5) { - printk(KERN_WARNING "\nWarning! Detected %lu " - "micro-second gap between interrupts.\n", - delta); - printk(KERN_WARNING " Compensating for %lu lost " - "ticks.\n", - delta/(1000000/HZ)-1); - dump_stack(); - dbg_print++; - } - /* calculate number of missed ticks */ - delta = delta/(1000000/HZ)-1; - jiffies += delta; - } - -} - -/* * This is the same as the above, except we _also_ save the current * Time Stamp Counter value at the time of the timer interrupt, so that * we later on can estimate the time of day more exactly. */ -void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { /* * Here we are in the timer irq handler. We just have irqs locally @@ -278,13 +256,12 @@ void timer_interrupt(int irq, void *dev_ */ write_seqlock(&xtime_lock); - detect_lost_tick(); timer->mark_offset(); do_timer_interrupt(irq, NULL, regs); write_sequnlock(&xtime_lock); - + return IRQ_HANDLED; } /* not static: needed by APM */ @@ -322,7 +299,9 @@ void __init time_init(void) { xtime.tv_sec = get_cmos_time(); - xtime.tv_nsec = 0; + wall_to_monotonic.tv_sec = -xtime.tv_sec + INITIAL_JIFFIES / HZ; + xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); + wall_to_monotonic.tv_nsec = 0; timer = select_timer(); --- linux-2.5.68/arch/i386/kernel/timers/timer_cyclone.c 2003-04-07 13:06:52.000000000 -0700 +++ 25/arch/i386/kernel/timers/timer_cyclone.c 2003-04-21 00:31:39.000000000 -0700 @@ -18,6 +18,7 @@ #include extern spinlock_t i8253_lock; +extern unsigned long jiffies; extern unsigned long calibrate_tsc(void); /* Number of usecs that the last interrupt was delayed */ @@ -46,6 +47,8 @@ static rwlock_t monotonic_lock = RW_LOCK static void mark_offset_cyclone(void) { + unsigned long lost, delay; + unsigned long delta = last_cyclone_low; int count; unsigned long long this_offset, last_offset; @@ -62,6 +65,15 @@ static void mark_offset_cyclone(void) count |= inb(0x40) << 8; spin_unlock(&i8253_lock); + /* lost tick compensation */ + delta = last_cyclone_low - delta; + delta /=(CYCLONE_TIMER_FREQ/1000000); + delta += delay_at_last_interrupt; + lost = delta/(1000000/HZ); + delay = delta%(1000000/HZ); + if(lost >= 2) + jiffies += lost-1; + /* update the monotonic base value */ this_offset = ((unsigned long long)last_cyclone_high<<32)|last_cyclone_low; monotonic_base += (this_offset - last_offset) & CYCLONE_TIMER_MASK; @@ -70,6 +82,12 @@ static void mark_offset_cyclone(void) /* calculate delay_at_last_interrupt */ count = ((LATCH-1) - count) * TICK_SIZE; delay_at_last_interrupt = (count + LATCH/2) / LATCH; + + /* catch corner case where tick rollover + * occured between cyclone and pit reads + */ + if(abs(delay - delay_at_last_interrupt) > 900) + jiffies++; } static unsigned long get_offset_cyclone(void) --- linux-2.5.68/arch/i386/kernel/timers/timer_pit.c 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/i386/kernel/timers/timer_pit.c 2003-04-21 00:31:39.000000000 -0700 @@ -54,7 +54,7 @@ static void delay_pit(unsigned long loop } -/* This function must be called with interrupts disabled +/* This function must be called with xtime_lock held. * It was inspired by Steve McCanne's microtime-i386 for BSD. -- jrs * * However, the pc-audio speaker driver changes the divisor so that @@ -93,7 +93,7 @@ static unsigned long get_offset_pit(void static unsigned long jiffies_p = 0; /* - * cache volatile jiffies temporarily; we have IRQs turned off. + * cache volatile jiffies temporarily; we have xtime_lock. */ unsigned long jiffies_t; @@ -119,8 +119,6 @@ static unsigned long get_offset_pit(void count = LATCH - 1; } - spin_unlock_irqrestore(&i8253_lock, flags); - /* * avoiding timer inconsistencies (they are rare, but they happen)... * there are two kinds of problems that must be avoided here: @@ -130,7 +128,6 @@ static unsigned long get_offset_pit(void * (see c't 95/10 page 335 for Neptun bug.) */ - if( jiffies_t == jiffies_p ) { if( count > count_p ) { /* the nutcase */ @@ -141,6 +138,8 @@ static unsigned long get_offset_pit(void count_p = count; + spin_unlock_irqrestore(&i8253_lock, flags); + count = ((LATCH-1) - count) * TICK_SIZE; count = (count + LATCH/2) / LATCH; --- linux-2.5.68/arch/i386/kernel/timers/timer_tsc.c 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/i386/kernel/timers/timer_tsc.c 2003-04-21 00:31:39.000000000 -0700 @@ -21,6 +21,7 @@ int tsc_disable __initdata = 0; extern spinlock_t i8253_lock; +extern unsigned long jiffies; static int use_tsc; /* Number of usecs that the last interrupt was delayed */ @@ -117,6 +118,8 @@ static unsigned long long monotonic_cloc static void mark_offset_tsc(void) { + unsigned long lost,delay; + unsigned long delta = last_tsc_low; int count; int countmp; static int count1 = 0; @@ -161,6 +164,23 @@ static void mark_offset_tsc(void) } } + /* lost tick compensation */ + delta = last_tsc_low - delta; + { + register unsigned long eax, edx; + eax = delta; + __asm__("mull %2" + :"=a" (eax), "=d" (edx) + :"rm" (fast_gettimeoffset_quotient), + "0" (eax)); + delta = edx; + } + delta += delay_at_last_interrupt; + lost = delta/(1000000/HZ); + delay = delta%(1000000/HZ); + if(lost >= 2) + jiffies += lost-1; + /* update the monotonic base value */ this_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low; monotonic_base += cycles_2_ns(this_offset - last_offset); @@ -169,6 +189,12 @@ static void mark_offset_tsc(void) /* calculate delay_at_last_interrupt */ count = ((LATCH-1) - count) * TICK_SIZE; delay_at_last_interrupt = (count + LATCH/2) / LATCH; + + /* catch corner case where tick rollover + * occured between tsc and pit reads + */ + if(abs(delay - delay_at_last_interrupt) > 900) + jiffies++; } static void delay_tsc(unsigned long loops) --- linux-2.5.68/arch/i386/kernel/vm86.c 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/i386/kernel/vm86.c 2003-04-21 00:31:39.000000000 -0700 @@ -695,7 +695,8 @@ static int irqbits; | (1 << SIGUSR1) | (1 << SIGUSR2) | (1 << SIGIO) | (1 << SIGURG) \ | (1 << SIGUNUSED) ) -static void irq_handler(int intno, void *dev_id, struct pt_regs * regs) { +static irqreturn_t irq_handler(int intno, void *dev_id, struct pt_regs * regs) +{ int irq_bit; unsigned long flags; @@ -709,6 +710,7 @@ static void irq_handler(int intno, void /* else user will poll for IRQs */ out: spin_unlock_irqrestore(&irqbits_lock, flags); + return IRQ_NONE; } static inline void free_vm86_irq(int irqnumber) @@ -742,7 +744,10 @@ static inline int get_and_reset_irq(int bit = irqbits & (1 << irqnumber); irqbits &= ~bit; spin_unlock_irqrestore(&irqbits_lock, flags); - return bit; + if (!bit) + return 0; + enable_irq(irqnumber); + return 1; } --- linux-2.5.68/arch/i386/mm/discontig.c 2003-03-17 14:56:00.000000000 -0800 +++ 25/arch/i386/mm/discontig.c 2003-04-21 00:31:39.000000000 -0700 @@ -27,9 +27,7 @@ #include #include #include -#ifdef CONFIG_BLK_DEV_RAM -#include -#endif +#include #include #include --- linux-2.5.68/arch/i386/mm/hugetlbpage.c 2003-03-04 20:02:35.000000000 -0800 +++ 25/arch/i386/mm/hugetlbpage.c 2003-04-21 00:31:39.000000000 -0700 @@ -129,37 +129,45 @@ nomem: int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, struct page **pages, struct vm_area_struct **vmas, - unsigned long *st, int *length, int i) + unsigned long *position, int *length, int i) { - pte_t *ptep, pte; - unsigned long start = *st; - unsigned long pstart; - int len = *length; - struct page *page; + unsigned long vpfn, vaddr = *position; + int remainder = *length; + + WARN_ON(!is_vm_hugetlb_page(vma)); - do { - pstart = start; - ptep = huge_pte_offset(mm, start); - pte = *ptep; + vpfn = vaddr/PAGE_SIZE; + while (vaddr < vma->vm_end && remainder) { -back1: - page = pte_page(pte); if (pages) { - page += ((start & ~HPAGE_MASK) >> PAGE_SHIFT); + pte_t *pte; + struct page *page; + + pte = huge_pte_offset(mm, vaddr); + + /* hugetlb should be locked, and hence, prefaulted */ + WARN_ON(!pte || pte_none(*pte)); + + page = &pte_page(*pte)[vpfn % (HPAGE_SIZE/PAGE_SIZE)]; + + WARN_ON(!PageCompound(page)); + get_page(page); pages[i] = page; } + if (vmas) vmas[i] = vma; - i++; - len--; - start += PAGE_SIZE; - if (((start & HPAGE_MASK) == pstart) && len && - (start < vma->vm_end)) - goto back1; - } while (len && start < vma->vm_end); - *length = len; - *st = start; + + vaddr += PAGE_SIZE; + ++vpfn; + --remainder; + ++i; + } + + *length = remainder; + *position = vaddr; + return i; } @@ -474,9 +482,7 @@ int hugetlb_report_meminfo(char *buf) int is_hugepage_mem_enough(size_t size) { - if (size > (htlbpagemem << HPAGE_SHIFT)) - return 0; - return 1; + return (size + ~HPAGE_MASK)/HPAGE_SIZE <= htlbpagemem; } /* --- linux-2.5.68/arch/i386/mm/pgtable.c 2003-03-17 14:56:01.000000000 -0800 +++ 25/arch/i386/mm/pgtable.c 2003-04-21 00:31:39.000000000 -0700 @@ -131,39 +131,23 @@ void __set_fixmap (enum fixed_addresses pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { - int count = 0; - pte_t *pte; - - do { - pte = (pte_t *) __get_free_page(GFP_KERNEL); - if (pte) - clear_page(pte); - else { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - } - } while (!pte && (count++ < 10)); + pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); + if (pte) + clear_page(pte); return pte; } struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) { - int count = 0; struct page *pte; - - do { + #if CONFIG_HIGHPTE - pte = alloc_pages(GFP_KERNEL | __GFP_HIGHMEM, 0); + pte = alloc_pages(GFP_KERNEL|__GFP_HIGHMEM|__GFP_REPEAT, 0); #else - pte = alloc_pages(GFP_KERNEL, 0); + pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0); #endif - if (pte) - clear_highpage(pte); - else { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - } - } while (!pte && (count++ < 10)); + if (pte) + clear_highpage(pte); return pte; } --- linux-2.5.68/arch/i386/pci/irq.c 2003-03-17 14:56:01.000000000 -0800 +++ 25/arch/i386/pci/irq.c 2003-04-21 00:31:39.000000000 -0700 @@ -560,8 +560,9 @@ static struct irq_info *pirq_get_info(st return NULL; } -static void pcibios_test_irq_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t pcibios_test_irq_handler(int irq, void *dev_id, struct pt_regs *regs) { + return IRQ_NONE; } static int pcibios_lookup_irq(struct pci_dev *dev, int assign) --- linux-2.5.68/arch/ia64/ia32/sys_ia32.c 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/ia64/ia32/sys_ia32.c 2003-04-21 00:31:39.000000000 -0700 @@ -3040,7 +3040,6 @@ struct nfsctl_arg32 { #define ca32_svc u.u32_svc #define ca32_client u.u32_client #define ca32_export u.u32_export -#define ca32_authd u.u32_authd #define ca32_debug u.u32_debug }; --- linux-2.5.68/arch/ia64/Kconfig 2003-04-19 20:45:17.000000000 -0700 +++ 25/arch/ia64/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -280,7 +280,7 @@ config PM page on the WWW at and the Battery Powered Linux mini-HOWTO, available from - . + . Note that, even if you say N here, Linux on the x86 architecture will issue the hlt instruction if nothing is to be done, thereby @@ -425,7 +425,7 @@ config SMP See also the , , and the SMP-HOWTO available at - . + . If you don't know what to do here, say N. @@ -497,7 +497,7 @@ config BINFMT_ELF systems. Saying Y here will enable your kernel to run ELF binaries. Information about ELF is contained in the ELF HOWTO available from - . + . config BINFMT_MISC tristate "Kernel support for MISC binaries" @@ -535,7 +535,7 @@ config PCI VESA. If you have PCI, say Y, otherwise N. The PCI-HOWTO, available from - , contains valuable + , contains valuable information about which PCI hardware does work under Linux and which doesn't. @@ -684,7 +684,7 @@ config CD_NO_IDESCSI ---help--- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y here, otherwise N. Read the CD-ROM-HOWTO, available from - . + . Note that the answer to this question doesn't directly affect the kernel: saying N will just cause the configurator to skip all @@ -762,7 +762,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/ia64/kernel/setup.c 2003-03-17 14:56:01.000000000 -0800 +++ 25/arch/ia64/kernel/setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -42,10 +43,6 @@ #include #include -#ifdef CONFIG_BLK_DEV_RAM -# include -#endif - #if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE) # error "struct cpuinfo_ia64 too big!" #endif --- linux-2.5.68/arch/m68k/Kconfig 2003-03-24 15:36:50.000000000 -0800 +++ 25/arch/m68k/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -65,7 +65,7 @@ config PCMCIA To use your PC-cards, you will need supporting software from David Hinds' pcmcia-cs package (see the file for location). Please also read the PCMCIA-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -106,7 +106,7 @@ config PCI VESA. If you have PCI, say Y, otherwise N. The PCI-HOWTO, available from - , contains valuable + , contains valuable information about which PCI hardware does work under Linux and which doesn't. @@ -413,7 +413,7 @@ config BINFMT_ELF want to say Y here. Information about ELF is contained in the ELF HOWTO available from - . + . If you find that after upgrading from Linux kernel 1.2 and saying Y here, you still can't run any ELF binaries (they just crash), then @@ -435,7 +435,7 @@ config BINFMT_MISC programs that need an interpreter to run like Java, Python or Emacs-Lisp. It's also useful if you often run DOS executables under the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from - ). Once you have + ). Once you have registered such a binary class with the kernel, you can start one of those programs simply by typing in its name at a shell prompt; Linux will automatically feed it to the correct interpreter. @@ -592,7 +592,7 @@ config PRINTER box (as opposed to using a serial printer; if the connector at the printer has 9 or 25 holes ["female"], then it's serial), say Y. Also read the Printing-HOWTO, available from - . + . It is possible to share one parallel port among several devices (e.g. printer and ZIP drive) and it is safe to compile the @@ -741,7 +741,7 @@ config BLK_DEV_SD If you want to use a SCSI hard disk or the SCSI or parallel port version of the IOMEGA ZIP drive under Linux, say Y and read the SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from - . This is NOT for SCSI + . This is NOT for SCSI CD-ROMs. This driver is also available as a module ( = code which can be @@ -776,7 +776,7 @@ config CHR_DEV_ST ---help--- If you want to use a SCSI tape drive under Linux, say Y and read the SCSI-HOWTO, available from - , and + , and in the kernel source. This is NOT for SCSI CD-ROMs. @@ -809,7 +809,7 @@ config BLK_DEV_SR ---help--- If you want to use a SCSI CD-ROM under Linux, say Y and read the SCSI-HOWTO and the CD-ROM-HOWTO at - . Also make sure to say Y + . Also make sure to say Y or M to "ISO 9660 CD-ROM file system support" later. This driver is also available as a module ( = code which can be @@ -1084,7 +1084,7 @@ config MAC_SCSI This is the NCR 5380 SCSI controller included on most of the 68030 based Macintoshes. If you have one of these say Y and read the SCSI-HOWTO, available from - . + . config SCSI_MAC_ESP tristate "Macintosh NCR53c9[46] SCSI" @@ -1093,7 +1093,7 @@ config SCSI_MAC_ESP This is the NCR 53c9x SCSI controller found on most of the 68040 based Macintoshes. If you have one of these say Y and read the SCSI-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1201,7 +1201,7 @@ config SERIAL_MANY_PORTS Say Y here if you have dumb serial boards other than the four standard COM 1/2/3/4 ports. This may happen if you have an AST FourPort, Accent Async, Boca (read the Boca mini-HOWTO, available - from ), or other custom + from ), or other custom serial port hardware which acts similar to standard serial port hardware. If you only use the standard COM 1/2/3/4 ports, you can say N here to save some memory. You can also say Y if you have an --- linux-2.5.68/arch/m68k/kernel/setup.c 2003-01-16 18:22:44.000000000 -0800 +++ 25/arch/m68k/kernel/setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -41,10 +42,6 @@ extern void sun_serial_setup(void); #endif -#ifdef CONFIG_BLK_DEV_INITRD -#include -#endif - unsigned long m68k_machtype; unsigned long m68k_cputype; unsigned long m68k_fputype; --- linux-2.5.68/arch/m68knommu/Kconfig 2003-03-17 14:56:01.000000000 -0800 +++ 25/arch/m68knommu/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -563,7 +563,7 @@ config CD_NO_IDESCSI ---help--- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y here, otherwise N. Read the CD-ROM-HOWTO, available from - . + . Note that the answer to this question doesn't directly affect the kernel: saying N will just cause the configurator to skip all @@ -635,7 +635,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/mips64/Kconfig 2003-03-24 15:36:50.000000000 -0800 +++ 25/arch/mips64/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -113,7 +113,7 @@ config SMP See also the , , , and the SMP-HOWTO available at - . + . If you don't know what to do here, say N. @@ -145,7 +145,7 @@ config PCI VESA. If you have PCI, say Y, otherwise N. The PCI-HOWTO, available from - , contains valuable + , contains valuable information about which PCI hardware does work under Linux and which doesn't. @@ -350,7 +350,7 @@ config BINFMT_ELF want to say Y here. Information about ELF is contained in the ELF HOWTO available from - . + . If you find that after upgrading from Linux kernel 1.2 and saying Y here, you still can't run any ELF binaries (they just crash), then @@ -392,7 +392,7 @@ config BINFMT_MISC programs that need an interpreter to run like Java, Python or Emacs-Lisp. It's also useful if you often run DOS executables under the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from - ). Once you have + ). Once you have registered such a binary class with the kernel, you can start one of those programs simply by typing in its name at a shell prompt; Linux will automatically feed it to the correct interpreter. @@ -520,7 +520,7 @@ config CD_NO_IDESCSI ---help--- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y here, otherwise N. Read the CD-ROM-HOWTO, available from - . + . Note that the answer to this question doesn't directly affect the kernel: saying N will just cause the configurator to skip all @@ -594,7 +594,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/mips64/mm/init.c 2003-01-16 18:22:23.000000000 -0800 +++ 25/arch/mips64/mm/init.c 2003-04-21 00:31:39.000000000 -0700 @@ -21,9 +21,7 @@ #include #include #include -#ifdef CONFIG_BLK_DEV_INITRD -#include -#endif +#include #include #include --- linux-2.5.68/arch/mips/gt64120/momenco_ocelot/setup.c 2003-01-16 18:22:13.000000000 -0800 +++ 25/arch/mips/gt64120/momenco_ocelot/setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -60,7 +60,7 @@ #include #include #include -#include +#include #include #include "ocelot_pld.h" --- linux-2.5.68/arch/mips/Kconfig 2003-03-17 14:56:01.000000000 -0800 +++ 25/arch/mips/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -35,7 +35,7 @@ config SMP See also the , , , and the SMP-HOWTO available at - . + . If you don't know what to do here, say N. @@ -363,7 +363,7 @@ config PCI VESA. If you have PCI, say Y, otherwise N. The PCI-HOWTO, available from - , contains valuable + , contains valuable information about which PCI hardware does work under Linux and which doesn't. @@ -740,7 +740,7 @@ config BINFMT_ELF want to say Y here. Information about ELF is contained in the ELF HOWTO available from - . + . If you find that after upgrading from Linux kernel 1.2 and saying Y here, you still can't run any ELF binaries (they just crash), then @@ -762,7 +762,7 @@ config BINFMT_MISC programs that need an interpreter to run like Java, Python or Emacs-Lisp. It's also useful if you often run DOS executables under the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from - ). Once you have + ). Once you have registered such a binary class with the kernel, you can start one of those programs simply by typing in its name at a shell prompt; Linux will automatically feed it to the correct interpreter. @@ -931,7 +931,7 @@ config CD_NO_IDESCSI ---help--- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y here, otherwise N. Read the CD-ROM-HOWTO, available from - . + . Note that the answer to this question doesn't directly affect the kernel: saying N will just cause the configurator to skip all @@ -1083,7 +1083,7 @@ config PSMOUSE Although PS/2 mice are not technically bus mice, they are explained in detail in the Busmouse-HOWTO, available from - . + . When using a PS/2 mouse, you can get problems if you want to use the mouse both on the Linux console and under X. Using the "-R" option @@ -1102,7 +1102,7 @@ config MOUSE MouseSystem or Microsoft mouse (made by Logitech) that plugs into a COM port (rectangular with 9 or 25 pins). These people say N here. If you have something else, read the Busmouse-HOWTO, available from - . This HOWTO contains + . This HOWTO contains information about all non-serial mice, not just bus mice. If you have a laptop, you either have to check the documentation or @@ -1139,7 +1139,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/mips/kernel/setup.c 2003-03-04 20:02:36.000000000 -0800 +++ 25/arch/mips/kernel/setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/parisc/Kconfig 2003-03-17 14:56:01.000000000 -0800 +++ 25/arch/parisc/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -136,7 +136,7 @@ config SMP See also the , , and the SMP-HOWTO available at - . + . If you don't know what to do here, say N. @@ -184,7 +184,7 @@ config BINFMT_ELF want to say Y here. Information about ELF is contained in the ELF HOWTO available from - . + . If you find that after upgrading from Linux kernel 1.2 and saying Y here, you still can't run any ELF binaries (they just crash), then @@ -206,7 +206,7 @@ config BINFMT_MISC programs that need an interpreter to run like Java, Python or Emacs-Lisp. It's also useful if you often run DOS executables under the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from - ). Once you have + ). Once you have registered such a binary class with the kernel, you can start one of those programs simply by typing in its name at a shell prompt; Linux will automatically feed it to the correct interpreter. @@ -309,7 +309,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/parisc/kernel/setup.c 2003-01-16 18:22:46.000000000 -0800 +++ 25/arch/parisc/kernel/setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -29,7 +29,7 @@ #include #include -#include /* for initrd_start and initrd_end */ +#include #include #include #include --- linux-2.5.68/arch/parisc/kernel/sys_parisc32.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/arch/parisc/kernel/sys_parisc32.c 2003-04-21 00:31:39.000000000 -0700 @@ -1131,7 +1131,7 @@ asmlinkage long sys32_msgrcv(int msqid, struct nfsctl_export32 { char ex_client[NFSCLNT_IDMAX+1]; char ex_path[NFS_MAXPATHLEN+1]; - __kernel_dev_t ex_dev; + __kernel_old_dev_t ex_dev; compat_ino_t ex_ino; int ex_flags; __kernel_uid_t ex_anon_uid; --- linux-2.5.68/arch/parisc/mm/init.c 2003-03-04 20:02:36.000000000 -0800 +++ 25/arch/parisc/mm/init.c 2003-04-21 00:31:39.000000000 -0700 @@ -15,7 +15,7 @@ #include #include #include /* for hppa_dma_ops and pcxl_dma_ops */ -#include /* for initrd_start and initrd_end */ +#include #include #include --- linux-2.5.68/arch/ppc64/Kconfig 2003-03-17 14:56:01.000000000 -0800 +++ 25/arch/ppc64/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -195,7 +195,7 @@ config BINFMT_MISC programs that need an interpreter to run like Java, Python or Emacs-Lisp. It's also useful if you often run DOS executables under the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from - ). Once you have + ). Once you have registered such a binary class with the kernel, you can start one of those programs simply by typing in its name at a shell prompt; Linux will automatically feed it to the correct interpreter. @@ -387,7 +387,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/ppc64/kernel/chrp_setup.c 2003-04-07 13:06:53.000000000 -0700 +++ 25/arch/ppc64/kernel/chrp_setup.c 2003-04-21 02:44:47.000000000 -0700 @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc64/kernel/iSeries_setup.c 2003-04-07 13:06:53.000000000 -0700 +++ 25/arch/ppc64/kernel/iSeries_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include --- linux-2.5.68/arch/ppc64/kernel/setup.c 2003-01-16 18:22:08.000000000 -0800 +++ 25/arch/ppc64/kernel/setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc64/kernel/sys_ppc32.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/arch/ppc64/kernel/sys_ppc32.c 2003-04-21 02:44:47.000000000 -0700 @@ -910,7 +910,6 @@ struct nfsctl_arg32 { #define ca32_export u.u32_export #define ca32_getfd u.u32_getfd #define ca32_getfs u.u32_getfs -#define ca32_authd u.u32_authd }; union nfsctl_res32 { --- linux-2.5.68/arch/ppc/Kconfig 2003-04-07 13:06:53.000000000 -0700 +++ 25/arch/ppc/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -808,7 +808,7 @@ config BINFMT_MISC programs that need an interpreter to run like Java, Python or Emacs-Lisp. It's also useful if you often run DOS executables under the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from - ). Once you have + ). Once you have registered such a binary class with the kernel, you can start one of those programs simply by typing in its name at a shell prompt; Linux will automatically feed it to the correct interpreter. @@ -1444,7 +1444,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/ppc/kernel/setup.c 2003-02-17 16:21:14.000000000 -0800 +++ 25/arch/ppc/kernel/setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/mm/init.c 2003-03-17 14:56:01.000000000 -0800 +++ 25/arch/ppc/mm/init.c 2003-04-21 00:31:39.000000000 -0700 @@ -28,9 +28,7 @@ #include #include #include -#ifdef CONFIG_BLK_DEV_INITRD -#include /* for initrd_* */ -#endif +#include #include #include --- linux-2.5.68/arch/ppc/mm/pgtable.c 2003-01-16 18:21:42.000000000 -0800 +++ 25/arch/ppc/mm/pgtable.c 2003-04-21 00:31:39.000000000 -0700 @@ -76,15 +76,11 @@ pte_t *pte_alloc_one_kernel(struct mm_st extern void *early_get_page(void); int timeout = 0; - if (mem_init_done) { - while ((pte = (pte_t *) __get_free_page(GFP_KERNEL)) == NULL - && ++timeout < 10) { - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ); - } - } else - pte = (pte_t *) early_get_page(); - if (pte != NULL) + if (mem_init_done) + pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); + else + pte = (pte_t *)early_get_page(); + if (pte) clear_page(pte); return pte; } @@ -92,20 +88,16 @@ pte_t *pte_alloc_one_kernel(struct mm_st struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) { struct page *pte; - int timeout = 0; + #ifdef CONFIG_HIGHPTE - int flags = GFP_KERNEL | __GFP_HIGHMEM; + int flags = GFP_KERNEL | __GFP_HIGHMEM | __GFP_REPEAT; #else - int flags = GFP_KERNEL; + int flags = GFP_KERNEL | __GFP_REPEAT; #endif - while ((pte = alloc_pages(flags, 0)) == NULL) { - if (++timeout >= 10) - return NULL; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ); - } - clear_highpage(pte); + pte = alloc_pages(flags, 0); + if (pte) + clear_highpage(pte); return pte; } --- linux-2.5.68/arch/ppc/platforms/4xx/oak_setup.c 2003-01-16 18:22:29.000000000 -0800 +++ 25/arch/ppc/platforms/4xx/oak_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include --- linux-2.5.68/arch/ppc/platforms/adir_setup.c 2003-01-16 18:22:00.000000000 -0800 +++ 25/arch/ppc/platforms/adir_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/apus_setup.c 2003-01-16 18:22:18.000000000 -0800 +++ 25/arch/ppc/platforms/apus_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include /* Needs INITSERIAL call in head.S! */ --- linux-2.5.68/arch/ppc/platforms/ev64260_setup.c 2003-02-17 16:21:14.000000000 -0800 +++ 25/arch/ppc/platforms/ev64260_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/gemini_setup.c 2003-01-16 18:22:13.000000000 -0800 +++ 25/arch/ppc/platforms/gemini_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/k2_setup.c 2003-03-24 15:36:50.000000000 -0800 +++ 25/arch/ppc/platforms/k2_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/lopec_setup.c 2003-03-24 15:36:50.000000000 -0800 +++ 25/arch/ppc/platforms/lopec_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include --- linux-2.5.68/arch/ppc/platforms/mcpn765_setup.c 2003-03-24 15:36:50.000000000 -0800 +++ 25/arch/ppc/platforms/mcpn765_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/menf1_setup.c 2003-03-24 15:36:50.000000000 -0800 +++ 25/arch/ppc/platforms/menf1_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/mvme5100_setup.c 2003-02-17 16:21:14.000000000 -0800 +++ 25/arch/ppc/platforms/mvme5100_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/pal4_setup.c 2003-02-17 16:21:14.000000000 -0800 +++ 25/arch/ppc/platforms/pal4_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/pcore_setup.c 2003-02-17 16:21:14.000000000 -0800 +++ 25/arch/ppc/platforms/pcore_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/pmac_setup.c 2003-04-07 13:06:53.000000000 -0700 +++ 25/arch/ppc/platforms/pmac_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/powerpmc250.c 2003-02-17 16:21:14.000000000 -0800 +++ 25/arch/ppc/platforms/powerpmc250.c 2003-04-21 00:31:39.000000000 -0700 @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/pplus_setup.c 2003-03-24 15:36:50.000000000 -0800 +++ 25/arch/ppc/platforms/pplus_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/prep_setup.c 2003-03-24 15:36:50.000000000 -0800 +++ 25/arch/ppc/platforms/prep_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/prpmc750_setup.c 2003-02-17 16:21:14.000000000 -0800 +++ 25/arch/ppc/platforms/prpmc750_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/prpmc800_setup.c 2003-02-17 16:21:14.000000000 -0800 +++ 25/arch/ppc/platforms/prpmc800_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/sandpoint_setup.c 2003-03-24 15:36:50.000000000 -0800 +++ 25/arch/ppc/platforms/sandpoint_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -64,7 +64,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/spruce_setup.c 2003-04-07 13:06:53.000000000 -0700 +++ 25/arch/ppc/platforms/spruce_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/platforms/zx4500_setup.c 2003-02-17 16:21:14.000000000 -0800 +++ 25/arch/ppc/platforms/zx4500_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/syslib/m8260_setup.c 2003-03-24 15:36:50.000000000 -0800 +++ 25/arch/ppc/syslib/m8260_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/syslib/m8xx_setup.c 2003-01-16 18:22:04.000000000 -0800 +++ 25/arch/ppc/syslib/m8xx_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/ppc/syslib/ppc4xx_setup.c 2003-03-24 15:36:50.000000000 -0800 +++ 25/arch/ppc/syslib/ppc4xx_setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/s390/Kconfig 2003-04-19 20:45:18.000000000 -0700 +++ 25/arch/s390/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -60,7 +60,7 @@ config SMP See also the , and the SMP-HOWTO available at - . + . Even if you don't know what to do here, say Y. @@ -226,7 +226,7 @@ config BINFMT_ELF want to say Y here. Information about ELF is contained in the ELF HOWTO available from - . + . If you find that after upgrading from Linux kernel 1.2 and saying Y here, you still can't run any ELF binaries (they just crash), then @@ -248,7 +248,7 @@ config BINFMT_MISC programs that need an interpreter to run like Java, Python or Emacs-Lisp. It's also useful if you often run DOS executables under the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from - ). Once you have + ). Once you have registered such a binary class with the kernel, you can start one of those programs simply by typing in its name at a shell prompt; Linux will automatically feed it to the correct interpreter. --- linux-2.5.68/arch/s390/kernel/setup.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/arch/s390/kernel/setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -29,9 +29,7 @@ #include #include #include -#ifdef CONFIG_BLK_DEV_RAM -#include -#endif +#include #include #include #include --- linux-2.5.68/arch/sh/Kconfig 2003-03-17 14:56:01.000000000 -0800 +++ 25/arch/sh/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -483,7 +483,7 @@ config PCI VESA. If you have PCI, say Y, otherwise N. The PCI-HOWTO, available from - , contains valuable + , contains valuable information about which PCI hardware does work under Linux and which doesn't. @@ -608,7 +608,7 @@ config BINFMT_ELF want to say Y here. Information about ELF is contained in the ELF HOWTO available from - . + . If you find that after upgrading from Linux kernel 1.2 and saying Y here, you still can't run any ELF binaries (they just crash), then @@ -630,7 +630,7 @@ config BINFMT_MISC programs that need an interpreter to run like Java, Python or Emacs-Lisp. It's also useful if you often run DOS executables under the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from - ). Once you have + ). Once you have registered such a binary class with the kernel, you can start one of those programs simply by typing in its name at a shell prompt; Linux will automatically feed it to the correct interpreter. @@ -748,7 +748,7 @@ config CD_NO_IDESCSI ---help--- If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y here, otherwise N. Read the CD-ROM-HOWTO, available from - . + . Note that the answer to this question doesn't directly affect the kernel: saying N will just cause the configurator to skip all @@ -980,7 +980,7 @@ config PRINTER box (as opposed to using a serial printer; if the connector at the printer has 9 or 25 holes ["female"], then it's serial), say Y. Also read the Printing-HOWTO, available from - . + . It is possible to share one parallel port among several devices (e.g. printer and ZIP drive) and it is safe to compile the @@ -1049,7 +1049,7 @@ config PSMOUSE Although PS/2 mice are not technically bus mice, they are explained in detail in the Busmouse-HOWTO, available from - . + . When using a PS/2 mouse, you can get problems if you want to use the mouse both on the Linux console and under X. Using the "-R" option @@ -1157,7 +1157,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/sh/kernel/setup.c 2003-01-16 18:22:21.000000000 -0800 +++ 25/arch/sh/kernel/setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -25,9 +25,7 @@ #include #include #include -#ifdef CONFIG_BLK_DEV_RAM -#include -#endif +#include #include #include #include --- linux-2.5.68/arch/sparc64/Kconfig 2003-04-07 13:06:53.000000000 -0700 +++ 25/arch/sparc64/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -114,7 +114,7 @@ config SMP See also the , , , and the SMP-HOWTO available at - . + . If you don't know what to do here, say N. @@ -281,7 +281,7 @@ config PCMCIA To use your PC-cards, you will need supporting software from David Hinds' pcmcia-cs package (see the file for location). Please also read the PCMCIA-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -314,7 +314,7 @@ config PCI VESA. If you have PCI, say Y, otherwise N. The PCI-HOWTO, available from - , contains valuable + , contains valuable information about which PCI hardware does work under Linux and which doesn't. @@ -426,7 +426,7 @@ config BINFMT_ELF want to say Y here. Information about ELF is contained in the ELF HOWTO available from - . + . If you find that after upgrading from Linux kernel 1.2 and saying Y here, you still can't run any ELF binaries (they just crash), then @@ -448,7 +448,7 @@ config BINFMT_MISC programs that need an interpreter to run like Java, Python or Emacs-Lisp. It's also useful if you often run DOS executables under the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from - ). Once you have + ). Once you have registered such a binary class with the kernel, you can start one of those programs simply by typing in its name at a shell prompt; Linux will automatically feed it to the correct interpreter. @@ -496,7 +496,7 @@ config PRINTER box (as opposed to using a serial printer; if the connector at the printer has 9 or 25 holes ["female"], then it's serial), say Y. Also read the Printing-HOWTO, available from - . + . It is possible to share one parallel port among several devices (e.g. printer and ZIP drive) and it is safe to compile the @@ -804,7 +804,7 @@ config BLK_DEV_SD If you want to use a SCSI hard disk or the SCSI or parallel port version of the IOMEGA ZIP drive under Linux, say Y and read the SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from - . This is NOT for SCSI + . This is NOT for SCSI CD-ROMs. This driver is also available as a module ( = code which can be @@ -839,7 +839,7 @@ config CHR_DEV_ST ---help--- If you want to use a SCSI tape drive under Linux, say Y and read the SCSI-HOWTO, available from - , and + , and in the kernel source. This is NOT for SCSI CD-ROMs. @@ -861,7 +861,7 @@ config CHR_DEV_OSST tape drives (ADR-x0) that supports the standard SCSI-2 commands for tapes (QIC-157) and can be driven by the standard driver st. For more information, you may have a look at the SCSI-HOWTO - and + and in the kernel source. More info on the OnStream driver may be found on @@ -880,7 +880,7 @@ config BLK_DEV_SR ---help--- If you want to use a SCSI CD-ROM under Linux, say Y and read the SCSI-HOWTO and the CD-ROM-HOWTO at - . Also make sure to say Y + . Also make sure to say Y or M to "ISO 9660 CD-ROM file system support" later. This driver is also available as a module ( = code which can be @@ -1060,7 +1060,7 @@ config SCSI_AIC7XXX_OLD configuration options. You should read at a minimum before contacting the maintainer with any questions. The SCSI-HOWTO, - available from , can also + available from , can also be of great help. If you want to compile this driver as a module ( = code which can be @@ -1406,7 +1406,7 @@ config SCSI_QLOGIC_ISP Please read the file . You should also read the SCSI-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1586,7 +1586,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/sparc64/kernel/sys_sparc32.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/arch/sparc64/kernel/sys_sparc32.c 2003-04-21 00:31:39.000000000 -0700 @@ -2133,7 +2133,6 @@ struct nfsctl_arg32 { #define ca32_export u.u32_export #define ca32_getfd u.u32_getfd #define ca32_getfs u.u32_getfs -#define ca32_authd u.u32_authd }; union nfsctl_res32 { --- linux-2.5.68/arch/sparc64/mm/init.c 2003-01-16 18:22:01.000000000 -0800 +++ 25/arch/sparc64/mm/init.c 2003-04-21 00:31:39.000000000 -0700 @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include --- linux-2.5.68/arch/sparc/Kconfig 2003-03-17 14:56:01.000000000 -0800 +++ 25/arch/sparc/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -106,7 +106,7 @@ config SMP See also the , , , and the SMP-HOWTO available at - . + . If you don't know what to do here, say N. @@ -160,7 +160,7 @@ config PCMCIA To use your PC-cards, you will need supporting software from David Hinds' pcmcia-cs package (see the file for location). Please also read the PCMCIA-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -314,7 +314,7 @@ config BINFMT_ELF want to say Y here. Information about ELF is contained in the ELF HOWTO available from - . + . If you find that after upgrading from Linux kernel 1.2 and saying Y here, you still can't run any ELF binaries (they just crash), then @@ -336,7 +336,7 @@ config BINFMT_MISC programs that need an interpreter to run like Java, Python or Emacs-Lisp. It's also useful if you often run DOS executables under the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from - ). Once you have + ). Once you have registered such a binary class with the kernel, you can start one of those programs simply by typing in its name at a shell prompt; Linux will automatically feed it to the correct interpreter. @@ -372,7 +372,7 @@ config PRINTER box (as opposed to using a serial printer; if the connector at the printer has 9 or 25 holes ["female"], then it's serial), say Y. Also read the Printing-HOWTO, available from - . + . It is possible to share one parallel port among several devices (e.g. printer and ZIP drive) and it is safe to compile the @@ -636,7 +636,7 @@ config BLK_DEV_SD If you want to use a SCSI hard disk or the SCSI or parallel port version of the IOMEGA ZIP drive under Linux, say Y and read the SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from - . This is NOT for SCSI + . This is NOT for SCSI CD-ROMs. This driver is also available as a module ( = code which can be @@ -671,7 +671,7 @@ config CHR_DEV_ST ---help--- If you want to use a SCSI tape drive under Linux, say Y and read the SCSI-HOWTO, available from - , and + , and in the kernel source. This is NOT for SCSI CD-ROMs. @@ -693,7 +693,7 @@ config CHR_DEV_OSST tape drives (ADR-x0) that supports the standard SCSI-2 commands for tapes (QIC-157) and can be driven by the standard driver st. For more information, you may have a look at the SCSI-HOWTO - and + and in the kernel source. More info on the OnStream driver may be found on @@ -712,7 +712,7 @@ config BLK_DEV_SR ---help--- If you want to use a SCSI CD-ROM under Linux, say Y and read the SCSI-HOWTO and the CD-ROM-HOWTO at - . Also make sure to say Y + . Also make sure to say Y or M to "ISO 9660 CD-ROM file system support" later. This driver is also available as a module ( = code which can be @@ -925,7 +925,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/sparc/mm/init.c 2003-02-14 17:34:56.000000000 -0800 +++ 25/arch/sparc/mm/init.c 2003-04-21 00:31:39.000000000 -0700 @@ -18,9 +18,7 @@ #include #include #include -#ifdef CONFIG_BLK_DEV_INITRD -#include -#endif +#include #include #include #include --- linux-2.5.68/arch/sparc/mm/sun4c.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/arch/sparc/mm/sun4c.c 2003-04-21 00:31:39.000000000 -0700 @@ -1901,7 +1901,7 @@ static pte_t *sun4c_pte_alloc_one_kernel if ((pte = sun4c_pte_alloc_one_fast(mm, address)) != NULL) return pte; - pte = (pte_t *)__get_free_page(GFP_KERNEL); + pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (pte) memset(pte, 0, PAGE_SIZE); return pte; @@ -2194,7 +2194,7 @@ void __init ld_mmu_sun4c(void) BTFIXUPSET_CALL(pte_alloc_one_kernel, sun4c_pte_alloc_one_kernel, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(pte_alloc_one, sun4c_pte_alloc_one, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(free_pmd_fast, sun4c_free_pmd_fast, BTFIXUPCALL_NOP); - BTFIXUPSET_CALL(pmd_alloc_one, sun4c_pmd_alloc_one, BTFIXUPCALL_RETO0); + BTFIXUPSET_CALL(pmd_alloc_one, sun4c_lpmd_alloc_one, BTFIXUPCALL_RETO0); BTFIXUPSET_CALL(free_pgd_fast, sun4c_free_pgd_fast, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(get_pgd_fast, sun4c_get_pgd_fast, BTFIXUPCALL_NORM); --- linux-2.5.68/arch/um/drivers/ubd_kern.c 2003-03-24 15:36:50.000000000 -0800 +++ 25/arch/um/drivers/ubd_kern.c 2003-04-21 00:31:39.000000000 -0700 @@ -106,8 +106,6 @@ struct ubd { __u64 size; struct openflags boot_openflags; struct openflags openflags; - devfs_handle_t real; - devfs_handle_t fake; struct cow cow; }; @@ -127,8 +125,6 @@ struct ubd { .size = -1, \ .boot_openflags = OPEN_FLAGS, \ .openflags = OPEN_FLAGS, \ - .real = NULL, \ - .fake = NULL, \ .cow = DEFAULT_COW, \ } @@ -484,41 +480,30 @@ static int ubd_open_dev(struct ubd *dev) return(err); } -static int ubd_new_disk(int major, u64 size, char *name, int unit, - struct gendisk **disk_out, devfs_handle_t dir_handle, - devfs_handle_t *handle_out) +static int ubd_new_disk(int major, u64 size, int unit, + struct gendisk **disk_out) + { - char devfs_name[sizeof("ubd/nnnnnn\0")]; struct gendisk *disk; - int minor = unit << UBD_SHIFT; disk = alloc_disk(1 << UBD_SHIFT); - if(disk == NULL) - return(-ENOMEM); + if (!disk) + return -ENOMEM; disk->major = major; - disk->first_minor = minor; + disk->first_minor = unit << UBD_SHIFT; disk->fops = &ubd_blops; set_capacity(disk, size / 512); - /* needs to be ubd -> /dev/ubd/discX/disc */ sprintf(disk->disk_name, "ubd"); - *disk_out = disk; + sprintf(disk->devfs_name, "ubd/disc%d", unit); - /* /dev/ubd/N style names */ - sprintf(devfs_name, "ubd/%d", unit); - *handle_out = devfs_register(NULL, devfs_name, - 0, major, minor, - S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP | - S_IWGRP, &ubd_blops, NULL); disk->private_data = &ubd_dev[unit]; disk->queue = &ubd_queue; add_disk(disk); - return(0); -} -/* Initialized in an initcall, and unchanged thereafter */ -devfs_handle_t ubd_dir_handle; -devfs_handle_t ubd_fake_dir_handle; + *disk_out = disk; + return 0; +} static int ubd_add(int n) { @@ -538,15 +523,13 @@ static int ubd_add(int n) if(err) return(err); - err = ubd_new_disk(MAJOR_NR, dev->size, "ubd", n, &ubd_gendisk[n], - ubd_dir_handle, &dev->real); + err = ubd_new_disk(MAJOR_NR, dev->size, n, &ubd_gendisk[n]); if(err) return(err); if(fake_major) - ubd_new_disk(fake_major, dev->size, "ubd%d", n, - &fake_gendisk[n], ubd_fake_dir_handle, - &dev->fake); + ubd_new_disk(fake_major, dev->size, n, + &fake_gendisk[n]); /* perhaps this should also be under the "if (fake_major)" above */ /* using the fake_disk->disk_name and also the fakehd_set name */ @@ -645,15 +628,11 @@ static int ubd_remove(char *str) del_gendisk(ubd_gendisk[n]); put_disk(ubd_gendisk[n]); ubd_gendisk[n] = NULL; - if(dev->real != NULL) - devfs_unregister(dev->real); if(fake_gendisk[n] != NULL){ del_gendisk(fake_gendisk[n]); put_disk(fake_gendisk[n]); fake_gendisk[n] = NULL; - if(dev->fake != NULL) - devfs_unregister(dev->fake); } *dev = ((struct ubd) DEFAULT_UBD); @@ -682,7 +661,7 @@ int ubd_init(void) { int i; - ubd_dir_handle = devfs_mk_dir("ubd"); + devfs_mk_dir("ubd"); if (register_blkdev(MAJOR_NR, "ubd")) return -1; @@ -693,7 +672,7 @@ int ubd_init(void) char name[sizeof("ubd_nnn\0")]; snprintf(name, sizeof(name), "ubd_%d", fake_major); - ubd_fake_dir_handle = devfs_mk_dir(name); + devfs_mk_dir(name); if (register_blkdev(fake_major, "ubd")) return -1; } --- linux-2.5.68/arch/um/kernel/initrd_kern.c 2003-01-16 18:21:34.000000000 -0800 +++ 25/arch/um/kernel/initrd_kern.c 2003-04-21 00:31:39.000000000 -0700 @@ -5,7 +5,7 @@ #include "linux/init.h" #include "linux/bootmem.h" -#include "linux/blk.h" +#include "linux/initrd.h" #include "asm/types.h" #include "user_util.h" #include "kern_util.h" --- linux-2.5.68/arch/um/kernel/mem.c 2003-03-17 14:56:01.000000000 -0800 +++ 25/arch/um/kernel/mem.c 2003-04-21 00:31:39.000000000 -0700 @@ -810,35 +810,21 @@ void pgd_free(pgd_t *pgd) pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { - int count = 0; pte_t *pte; - do { - pte = (pte_t *) __get_free_page(GFP_KERNEL); - if (pte) - clear_page(pte); - else { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - } - } while (!pte && (count++ < 10)); + pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); + if (pte) + clear_page(pte); return pte; } struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) { - int count = 0; struct page *pte; - do { - pte = alloc_pages(GFP_KERNEL, 0); - if (pte) - clear_highpage(pte); - else { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - } - } while (!pte && (count++ < 10)); + pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0); + if (pte) + clear_highpage(pte); return pte; } --- linux-2.5.68/arch/v850/Kconfig 2003-04-19 20:45:18.000000000 -0700 +++ 25/arch/v850/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -341,7 +341,7 @@ config SOUND interrupt and DMA channel), because you will be asked for it. You want to read the Sound-HOWTO, available from - . General information about + . General information about the modular sound system is contained in the files . The file contains some slightly --- linux-2.5.68/arch/x86_64/ia32/sys_ia32.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/arch/x86_64/ia32/sys_ia32.c 2003-04-21 00:31:39.000000000 -0700 @@ -1708,7 +1708,6 @@ struct nfsctl_arg32 { #define ca32_export u.u32_export #define ca32_getfd u.u32_getfd #define ca32_getfs u.u32_getfs -#define ca32_authd u.u32_authd }; union nfsctl_res32 { --- linux-2.5.68/arch/x86_64/kernel/setup.c 2003-04-07 13:06:53.000000000 -0700 +++ 25/arch/x86_64/kernel/setup.c 2003-04-21 00:31:39.000000000 -0700 @@ -28,9 +28,7 @@ #include #include #include -#ifdef CONFIG_BLK_DEV_RAM -#include -#endif +#include #include #include #include --- linux-2.5.68/drivers/acpi/osl.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/acpi/osl.c 2003-04-21 00:31:39.000000000 -0700 @@ -234,10 +234,12 @@ acpi_os_table_override (struct acpi_tabl return AE_OK; } -static void +static irqreturn_t acpi_irq(int irq, void *dev_id, struct pt_regs *regs) { (*acpi_irq_handler)(acpi_irq_context); + /* FIXME!! We really should check that the irq was really ours! */ + return IRQ_HANDLED; } acpi_status --- linux-2.5.68/drivers/block/cciss.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/block/cciss.c 2003-04-21 00:31:43.000000000 -0700 @@ -599,9 +599,12 @@ static int cciss_ioctl(struct inode *ino luninfo.num_opens = drv->usage_count; luninfo.num_parts = 0; /* count partitions 1 to 15 with sizes > 0 */ - for(i=1; i part[i].nr_sects != 0) - luninfo.num_parts++; + for(i=1; i part[i]) + continue; + if (disk->part[i]->nr_sects != 0) + luninfo.num_parts++; + } if (copy_to_user((void *) arg, &luninfo, sizeof(LogvolInfo_struct))) return -EFAULT; @@ -1962,7 +1965,7 @@ startio: start_io(h); } -static void do_cciss_intr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t do_cciss_intr(int irq, void *dev_id, struct pt_regs *regs) { ctlr_info_t *h = dev_id; CommandList_struct *c; @@ -1972,7 +1975,7 @@ static void do_cciss_intr(int irq, void /* Is this interrupt for us? */ if ( h->access.intr_pending(h) == 0) - return; + return IRQ_NONE; /* * If there are completed commands in the completion queue, @@ -2020,6 +2023,7 @@ static void do_cciss_intr(int irq, void */ spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); blk_start_queue(&h->queue); + return IRQ_HANDLED; } /* * We cannot read the structure directly, for portablity we must use --- linux-2.5.68/drivers/block/cpqarray.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/block/cpqarray.c 2003-04-21 00:31:43.000000000 -0700 @@ -144,7 +144,7 @@ static inline cmdlist_t *removeQ(cmdlist static inline void complete_buffers(struct bio *bio, int ok); static inline void complete_command(cmdlist_t *cmd, int timeout); -static void do_ida_intr(int irq, void *dev_id, struct pt_regs * regs); +static irqreturn_t do_ida_intr(int irq, void *dev_id, struct pt_regs * regs); static void ida_timer(unsigned long tdata); static int ida_revalidate(struct gendisk *disk); static int revalidate_allvol(kdev_t dev); @@ -929,7 +929,7 @@ static inline void complete_command(cmdl * Find the command on the completion queue, remove it, tell the OS and * try to queue up more IO */ -static void do_ida_intr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t do_ida_intr(int irq, void *dev_id, struct pt_regs *regs) { ctlr_info_t *h = dev_id; cmdlist_t *c; @@ -940,7 +940,7 @@ static void do_ida_intr(int irq, void *d istat = h->access.intr_pending(h); /* Is this interrupt for us? */ if (istat == 0) - return; + return IRQ_NONE; /* * If there are completed commands in the completion queue, @@ -991,6 +991,7 @@ static void do_ida_intr(int irq, void *d */ do_ida_request(&h->queue); spin_unlock_irqrestore(IDA_LOCK(h->ctlr), flags); + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/block/DAC960.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/block/DAC960.c 2003-04-21 00:31:43.000000000 -0700 @@ -1069,6 +1069,7 @@ static boolean DAC960_V1_EnableMemoryMai if (pci_set_dma_mask(Controller->PCIDevice, DAC690_V1_PciDmaMask)) return DAC960_Failure(Controller, "DMA mask out of range"); + Controller->BounceBufferLimit = DAC690_V1_PciDmaMask; if ((hw_type == DAC960_PD_Controller) || (hw_type == DAC960_P_Controller)) { CommandMailboxesSize = 0; @@ -1271,6 +1272,7 @@ static boolean DAC960_V2_EnableMemoryMai if (pci_set_dma_mask(Controller->PCIDevice, DAC690_V2_PciDmaMask)) return DAC960_Failure(Controller, "DMA mask out of range"); + Controller->BounceBufferLimit = DAC690_V2_PciDmaMask; /* This is a temporary dma mapping, used only in the scope of this function */ CommandMailbox = @@ -2386,6 +2388,7 @@ static boolean DAC960_RegisterBlockDevic */ RequestQueue = &Controller->RequestQueue; blk_init_queue(RequestQueue, DAC960_RequestFunction, &Controller->queue_lock); + blk_queue_bounce_limit(RequestQueue, Controller->BounceBufferLimit); RequestQueue->queuedata = Controller; blk_queue_max_hw_segments(RequestQueue, Controller->DriverScatterGatherLimit); @@ -2583,7 +2586,7 @@ DAC960_DetectController(PCI_Device_T *PC const struct pci_device_id *entry) { struct DAC960_privdata *privdata = (struct DAC960_privdata *)entry->driver_data; - void (*InterruptHandler)(int, void *, Registers_T *) = privdata->InterruptHandler; + irqreturn_t (*InterruptHandler)(int, void *, Registers_T *) = privdata->InterruptHandler; unsigned int MemoryWindowSize = privdata->MemoryWindowSize; DAC960_Controller_T *Controller = NULL; unsigned char DeviceFunction = PCI_Device->devfn; @@ -5109,7 +5112,7 @@ static void DAC960_V2_ProcessCompletedCo Controllers. */ -static void DAC960_BA_InterruptHandler(int IRQ_Channel, +static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel, void *DeviceIdentifier, Registers_T *InterruptRegisters) { @@ -5117,6 +5120,7 @@ static void DAC960_BA_InterruptHandler(i void *ControllerBaseAddress = Controller->BaseAddress; DAC960_V2_StatusMailbox_T *NextStatusMailbox; ProcessorFlags_T ProcessorFlags; + /* Acquire exclusive access to Controller. */ @@ -5151,6 +5155,7 @@ static void DAC960_BA_InterruptHandler(i Release exclusive access to Controller. */ DAC960_ReleaseControllerLockIH(Controller, &ProcessorFlags); + return IRQ_HANDLED; } @@ -5159,7 +5164,7 @@ static void DAC960_BA_InterruptHandler(i Controllers. */ -static void DAC960_LP_InterruptHandler(int IRQ_Channel, +static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel, void *DeviceIdentifier, Registers_T *InterruptRegisters) { @@ -5201,6 +5206,7 @@ static void DAC960_LP_InterruptHandler(i Release exclusive access to Controller. */ DAC960_ReleaseControllerLockIH(Controller, &ProcessorFlags); + return IRQ_HANDLED; } @@ -5209,7 +5215,7 @@ static void DAC960_LP_InterruptHandler(i Controllers. */ -static void DAC960_LA_InterruptHandler(int IRQ_Channel, +static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel, void *DeviceIdentifier, Registers_T *InterruptRegisters) { @@ -5247,6 +5253,7 @@ static void DAC960_LA_InterruptHandler(i Release exclusive access to Controller. */ DAC960_ReleaseControllerLockIH(Controller, &ProcessorFlags); + return IRQ_HANDLED; } @@ -5255,7 +5262,7 @@ static void DAC960_LA_InterruptHandler(i Controllers. */ -static void DAC960_PG_InterruptHandler(int IRQ_Channel, +static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel, void *DeviceIdentifier, Registers_T *InterruptRegisters) { @@ -5293,6 +5300,7 @@ static void DAC960_PG_InterruptHandler(i Release exclusive access to Controller. */ DAC960_ReleaseControllerLockIH(Controller, &ProcessorFlags); + return IRQ_HANDLED; } @@ -5301,7 +5309,7 @@ static void DAC960_PG_InterruptHandler(i Controllers. */ -static void DAC960_PD_InterruptHandler(int IRQ_Channel, +static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel, void *DeviceIdentifier, Registers_T *InterruptRegisters) { @@ -5335,6 +5343,7 @@ static void DAC960_PD_InterruptHandler(i Release exclusive access to Controller. */ DAC960_ReleaseControllerLockIH(Controller, &ProcessorFlags); + return IRQ_HANDLED; } @@ -5347,7 +5356,7 @@ static void DAC960_PD_InterruptHandler(i an arbitrary buffer. */ -static void DAC960_P_InterruptHandler(int IRQ_Channel, +static irqreturn_t DAC960_P_InterruptHandler(int IRQ_Channel, void *DeviceIdentifier, Registers_T *InterruptRegisters) { @@ -5416,6 +5425,7 @@ static void DAC960_P_InterruptHandler(in Release exclusive access to Controller. */ DAC960_ReleaseControllerLockIH(Controller, &ProcessorFlags); + return IRQ_HANDLED; } --- linux-2.5.68/drivers/block/DAC960.h 2003-02-10 12:24:14.000000000 -0800 +++ 25/drivers/block/DAC960.h 2003-04-21 00:31:43.000000000 -0700 @@ -62,11 +62,6 @@ /* Define the pci dma mask supported by DAC960 V1 and V2 Firmware Controlers - - For now set the V2 mask to only 32 bits. The controller IS capable - of doing 64 bit dma. But I have yet to find out whether this needs to - be explicitely enabled in the controller, or of the controller adapts - automatically. */ #define DAC690_V1_PciDmaMask 0xffffffff @@ -2234,7 +2229,7 @@ typedef wait_queue_head_t WaitQueue_T; struct DAC960_privdata { DAC960_HardwareType_T HardwareType; DAC960_FirmwareType_T FirmwareType; - void (*InterruptHandler)(int, void *, Registers_T *); + irqreturn_t (*InterruptHandler)(int, void *, Registers_T *); unsigned int MemoryWindowSize; }; @@ -2370,6 +2365,7 @@ typedef struct DAC960_Controller unsigned short ControllerScatterGatherLimit; unsigned short DriverScatterGatherLimit; unsigned int ControllerUsageCount; + u64 BounceBufferLimit; unsigned int CombinedStatusBufferLength; unsigned int InitialStatusLength; unsigned int CurrentStatusLength; @@ -4237,12 +4233,12 @@ static void DAC960_FinalizeController(DA static void DAC960_V1_QueueReadWriteCommand(DAC960_Command_T *); static void DAC960_V2_QueueReadWriteCommand(DAC960_Command_T *); static void DAC960_RequestFunction(RequestQueue_T *); -static void DAC960_BA_InterruptHandler(int, void *, Registers_T *); -static void DAC960_LP_InterruptHandler(int, void *, Registers_T *); -static void DAC960_LA_InterruptHandler(int, void *, Registers_T *); -static void DAC960_PG_InterruptHandler(int, void *, Registers_T *); -static void DAC960_PD_InterruptHandler(int, void *, Registers_T *); -static void DAC960_P_InterruptHandler(int, void *, Registers_T *); +static irqreturn_t DAC960_BA_InterruptHandler(int, void *, Registers_T *); +static irqreturn_t DAC960_LP_InterruptHandler(int, void *, Registers_T *); +static irqreturn_t DAC960_LA_InterruptHandler(int, void *, Registers_T *); +static irqreturn_t DAC960_PG_InterruptHandler(int, void *, Registers_T *); +static irqreturn_t DAC960_PD_InterruptHandler(int, void *, Registers_T *); +static irqreturn_t DAC960_P_InterruptHandler(int, void *, Registers_T *); static void DAC960_V1_QueueMonitoringCommand(DAC960_Command_T *); static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *); static void DAC960_MonitoringTimerFunction(unsigned long); --- linux-2.5.68/drivers/block/floppy98.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/block/floppy98.c 2003-04-21 00:31:39.000000000 -0700 @@ -2318,10 +2318,9 @@ static struct cont_t format_cont={ bad_flp_intr, generic_done }; -static int do_format(kdev_t device, struct format_descr *tmp_format_req) +static int do_format(int drive, struct format_descr *tmp_format_req) { int ret; - int drive=DRIVE(device); LOCK_FDC(drive,1); set_floppy(drive); @@ -2348,7 +2347,7 @@ static int do_format(kdev_t device, stru * ============================= */ -static inline void end_request(struct request *req, int uptodate) +static void floppy_end_request(struct request *req, int uptodate) { if (end_that_request_first(req, uptodate, current_count_sectors)) return; @@ -2389,7 +2388,7 @@ static void request_done(int uptodate) /* unlock chained buffers */ spin_lock_irqsave(q->queue_lock, flags); - end_request(req, 1); + floppy_end_request(req, 1); spin_unlock_irqrestore(q->queue_lock, flags); } else { if (rq_data_dir(req) == WRITE) { @@ -2403,7 +2402,7 @@ static void request_done(int uptodate) DRWE->last_error_generation = DRS->generation; } spin_lock_irqsave(q->queue_lock, flags); - end_request(req, 0); + floppy_end_request(req, 0); spin_unlock_irqrestore(q->queue_lock, flags); } } @@ -3635,7 +3634,7 @@ static int fd_ioctl(struct inode *inode, case FDFMTTRK: if (UDRS->fd_ref != 1) return -EBUSY; - return do_format(device, &inparam.f); + return do_format(drive, &inparam.f); case FDFMTEND: case FDFLUSH: LOCK_FDC(drive,1); @@ -4084,21 +4083,19 @@ static int *table_sup[] = static void __init register_devfs_entries (int drive) { - int base_minor, i; + int base_minor = (drive < 4) ? drive : (124 + drive); - base_minor = (drive < 4) ? drive : (124 + drive); - if (UDP->cmos < NUMBER(default_drive_params)) { - i = 0; - do { - char name[16]; - - sprintf(name, "floppy/%d%s", drive, table[table_sup[UDP->cmos][i]]); - devfs_register(NULL, name, DEVFS_FL_DEFAULT, FLOPPY_MAJOR, - base_minor + (table_sup[UDP->cmos][i] << 2), - S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP |S_IWGRP, - &floppy_fops, NULL); - } while (table_sup[UDP->cmos][i++]); - } + if (UDP->cmos < NUMBER(default_drive_params)) { + int i = 0; + do { + int minor = base_minor + (table_sup[UDP->cmos][i] << 2); + + devfs_mk_bdev(MKDEV(FLOPPY_MAJOR, minor), + S_IFBLK|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP, + "floppy/%d%s", + drive, table[table_sup[UDP->cmos][i]]); + } while (table_sup[UDP->cmos][i++]); + } } /* --- linux-2.5.68/drivers/block/floppy.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/block/floppy.c 2003-04-21 00:31:39.000000000 -0700 @@ -217,7 +217,7 @@ static int use_virtual_dma; static spinlock_t floppy_lock = SPIN_LOCK_UNLOCKED; static unsigned short virtual_dma_port=0x3f0; -void floppy_interrupt(int irq, void *dev_id, struct pt_regs * regs); +irqreturn_t floppy_interrupt(int irq, void *dev_id, struct pt_regs * regs); static int set_dor(int fdc, char mask, char data); static void register_devfs_entries (int drive) __init; @@ -1743,7 +1743,7 @@ static void print_result(char *message, } /* interrupt handler. Note that this can be called externally on the Sparc */ -void floppy_interrupt(int irq, void *dev_id, struct pt_regs * regs) +irqreturn_t floppy_interrupt(int irq, void *dev_id, struct pt_regs * regs) { void (*handler)(void) = do_floppy; int do_print; @@ -1764,7 +1764,7 @@ void floppy_interrupt(int irq, void *dev printk("floppy interrupt on bizarre fdc %d\n",fdc); printk("handler=%p\n", handler); is_alive("bizarre fdc"); - return; + return IRQ_NONE; } FDCS->reset = 0; @@ -1797,6 +1797,9 @@ void floppy_interrupt(int irq, void *dev } else FDCS->reset = 1; is_alive("normal interrupt end"); + + /* FIXME! Was it really for us? */ + return IRQ_HANDLED; } static void recalibrate_floppy(void) @@ -2263,10 +2266,9 @@ static struct cont_t format_cont={ bad_flp_intr, generic_done }; -static int do_format(kdev_t device, struct format_descr *tmp_format_req) +static int do_format(int drive, struct format_descr *tmp_format_req) { int ret; - int drive=DRIVE(device); LOCK_FDC(drive,1); set_floppy(drive); @@ -2293,7 +2295,7 @@ static int do_format(kdev_t device, stru * ============================= */ -static inline void end_request(struct request *req, int uptodate) +static void floppy_end_request(struct request *req, int uptodate) { if (end_that_request_first(req, uptodate, current_count_sectors)) return; @@ -2334,7 +2336,7 @@ static void request_done(int uptodate) /* unlock chained buffers */ spin_lock_irqsave(q->queue_lock, flags); - end_request(req, 1); + floppy_end_request(req, 1); spin_unlock_irqrestore(q->queue_lock, flags); } else { if (rq_data_dir(req) == WRITE) { @@ -2348,7 +2350,7 @@ static void request_done(int uptodate) DRWE->last_error_generation = DRS->generation; } spin_lock_irqsave(q->queue_lock, flags); - end_request(req, 0); + floppy_end_request(req, 0); spin_unlock_irqrestore(q->queue_lock, flags); } } @@ -3556,7 +3558,7 @@ static int fd_ioctl(struct inode *inode, case FDFMTTRK: if (UDRS->fd_ref != 1) return -EBUSY; - return do_format(device, &inparam.f); + return do_format(drive, &inparam.f); case FDFMTEND: case FDFLUSH: LOCK_FDC(drive,1); @@ -3965,21 +3967,19 @@ static int *table_sup[] = static void __init register_devfs_entries (int drive) { - int base_minor, i; + int base_minor = (drive < 4) ? drive : (124 + drive); - base_minor = (drive < 4) ? drive : (124 + drive); - if (UDP->cmos < NUMBER(default_drive_params)) { - i = 0; - do { - char name[16]; + if (UDP->cmos < NUMBER(default_drive_params)) { + int i = 0; + do { + int minor = base_minor + (table_sup[UDP->cmos][i] << 2); - sprintf(name, "floppy/%d%s", drive, table[table_sup[UDP->cmos][i]]); - devfs_register(NULL, name, DEVFS_FL_DEFAULT, FLOPPY_MAJOR, - base_minor + (table_sup[UDP->cmos][i] << 2), - S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP |S_IWGRP, - &floppy_fops, NULL); - } while (table_sup[UDP->cmos][i++]); - } + devfs_mk_bdev(MKDEV(FLOPPY_MAJOR, minor), + S_IFBLK|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP, + "floppy/%d%s", + drive, table[table_sup[UDP->cmos][i]]); + } while (table_sup[UDP->cmos][i++]); + } } /* --- linux-2.5.68/drivers/block/genhd.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/block/genhd.c 2003-04-21 00:31:39.000000000 -0700 @@ -365,11 +365,13 @@ static int show_partition(struct seq_fil (unsigned long long)get_capacity(sgp) >> 1, disk_name(sgp, 0, buf)); for (n = 0; n < sgp->minors - 1; n++) { - if (sgp->part[n].nr_sects == 0) + if (!sgp->part[n]) + continue; + if (sgp->part[n]->nr_sects == 0) continue; seq_printf(part, "%4d %4d %10llu %s\n", sgp->major, n + 1 + sgp->first_minor, - (unsigned long long)sgp->part[n].nr_sects >> 1 , + (unsigned long long)sgp->part[n]->nr_sects >> 1 , disk_name(sgp, n + 1, buf)); } @@ -542,6 +544,92 @@ static struct kset_hotplug_ops block_hot static decl_subsys(block, &ktype_block, &block_hotplug_ops); +/* + * aggregate disk stat collector. Uses the same stats that the sysfs + * entries do, above, but makes them available through one seq_file. + * Watching a few disks may be efficient through sysfs, but watching + * all of them will be more efficient through this interface. + * + * The output looks suspiciously like /proc/partitions with a bunch of + * extra fields. + */ + +/* iterator */ +static void *diskstats_start(struct seq_file *part, loff_t *pos) +{ + loff_t k = *pos; + struct list_head *p; + + down_read(&block_subsys.rwsem); + list_for_each(p, &block_subsys.kset.list) + if (!k--) + return list_entry(p, struct gendisk, kobj.entry); + return NULL; +} + +static void *diskstats_next(struct seq_file *part, void *v, loff_t *pos) +{ + struct list_head *p = ((struct gendisk *)v)->kobj.entry.next; + ++*pos; + return p==&block_subsys.kset.list ? NULL : + list_entry(p, struct gendisk, kobj.entry); +} + +static void diskstats_stop(struct seq_file *part, void *v) +{ + up_read(&block_subsys.rwsem); +} + +static int diskstats_show(struct seq_file *s, void *v) +{ + struct gendisk *gp = v; + char buf[64]; + int n = 0; + + /* + if (&sgp->kobj.entry == block_subsys.kset.list.next) + seq_puts(s, "major minor name" + " rio rmerge rsect ruse wio wmerge " + "wsect wuse running use aveq" + "\n\n"); + */ + + disk_round_stats(gp); + seq_printf(s, "%4d %4d %s %u %u %llu %u %u %u %llu %u %u %u %u\n", + gp->major, n + gp->first_minor, disk_name(gp, n, buf), + disk_stat_read(gp, reads), disk_stat_read(gp, read_merges), + (unsigned long long)disk_stat_read(gp, read_sectors), + jiffies_to_msec(disk_stat_read(gp, read_ticks)), + disk_stat_read(gp, writes), disk_stat_read(gp, write_merges), + (unsigned long long)disk_stat_read(gp, write_sectors), + jiffies_to_msec(disk_stat_read(gp, write_ticks)), + disk_stat_read(gp, in_flight), + jiffies_to_msec(disk_stat_read(gp, io_ticks)), + jiffies_to_msec(disk_stat_read(gp, time_in_queue))); + + /* now show all non-0 size partitions of it */ + for (n = 0; n < gp->minors - 1; n++) { + struct hd_struct *hd = gp->part[n]; + + if (hd && hd->nr_sects) + seq_printf(s, "%4d %4d %s %u %u %u %u\n", + gp->major, n + gp->first_minor + 1, + disk_name(gp, n + 1, buf), + hd->reads, hd->read_sectors, + hd->writes, hd->write_sectors); + } + + return 0; +} + +struct seq_operations diskstats_op = { + start: diskstats_start, + next: diskstats_next, + stop: diskstats_stop, + show: diskstats_show +}; + + struct gendisk *alloc_disk(int minors) { struct gendisk *disk = kmalloc(sizeof(struct gendisk), GFP_KERNEL); @@ -552,7 +640,7 @@ struct gendisk *alloc_disk(int minors) return NULL; } if (minors > 1) { - int size = (minors - 1) * sizeof(struct hd_struct); + int size = (minors - 1) * sizeof(struct hd_struct *); disk->part = kmalloc(size, GFP_KERNEL); if (!disk->part) { kfree(disk); @@ -604,8 +692,8 @@ void set_device_ro(struct block_device * struct gendisk *disk = bdev->bd_disk; if (bdev->bd_contains != bdev) { int part = bdev->bd_dev - MKDEV(disk->major, disk->first_minor); - struct hd_struct *p = &disk->part[part-1]; - p->policy = flag; + struct hd_struct *p = disk->part[part-1]; + if (p) p->policy = flag; } else disk->policy = flag; } @@ -615,7 +703,7 @@ void set_disk_ro(struct gendisk *disk, i int i; disk->policy = flag; for (i = 0; i < disk->minors - 1; i++) - disk->part[i].policy = flag; + if (disk->part[i]) disk->part[i]->policy = flag; } int bdev_read_only(struct block_device *bdev) @@ -626,8 +714,9 @@ int bdev_read_only(struct block_device * disk = bdev->bd_disk; if (bdev->bd_contains != bdev) { int part = bdev->bd_dev - MKDEV(disk->major, disk->first_minor); - struct hd_struct *p = &disk->part[part-1]; - return p->policy; + struct hd_struct *p = disk->part[part-1]; + if (p) return p->policy; + return 0; } else return disk->policy; } --- linux-2.5.68/drivers/block/ioctl.c 2003-01-16 18:21:37.000000000 -0800 +++ 25/drivers/block/ioctl.c 2003-04-21 00:31:39.000000000 -0700 @@ -41,11 +41,14 @@ static int blkpg_ioctl(struct block_devi return -EINVAL; } /* partition number in use? */ - if (disk->part[part - 1].nr_sects != 0) + if (disk->part[part - 1]) return -EBUSY; /* overlap? */ for (i = 0; i < disk->minors - 1; i++) { - struct hd_struct *s = &disk->part[i]; + struct hd_struct *s = disk->part[i]; + + if (!s) + continue; if (!(start+length <= s->start_sect || start >= s->start_sect + s->nr_sects)) return -EBUSY; @@ -54,7 +57,9 @@ static int blkpg_ioctl(struct block_devi add_partition(disk, part, start, length); return 0; case BLKPG_DEL_PARTITION: - if (disk->part[part - 1].nr_sects == 0) + if (!disk->part[part-1]) + return -ENXIO; + if (disk->part[part - 1]->nr_sects == 0) return -ENXIO; /* partition in use? Incomplete check for now. */ bdevp = bdget(MKDEV(disk->major, disk->first_minor) + part); --- linux-2.5.68/drivers/block/ll_rw_blk.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/block/ll_rw_blk.c 2003-04-21 02:44:42.000000000 -0700 @@ -1078,10 +1078,14 @@ void blk_stop_queue(request_queue_t *q) * blk_run_queue - run a single device queue * @q The queue to run */ -void __blk_run_queue(request_queue_t *q) +void blk_run_queue(struct request_queue *q) { + unsigned long flags; + + spin_lock_irqsave(q->queue_lock, flags); blk_remove_plug(q); q->request_fn(q); + spin_unlock_irqrestore(q->queue_lock, flags); } /** @@ -1841,7 +1845,7 @@ static inline void blk_partition_remap(s if (bdev == bdev->bd_contains) return; - p = &disk->part[bdev->bd_dev-MKDEV(disk->major,disk->first_minor)-1]; + p = disk->part[bdev->bd_dev-MKDEV(disk->major,disk->first_minor)-1]; switch (bio->bi_rw) { case READ: p->read_sectors += bio_sectors(bio); @@ -2267,5 +2271,5 @@ EXPORT_SYMBOL(blk_queue_invalidate_tags) EXPORT_SYMBOL(blk_start_queue); EXPORT_SYMBOL(blk_stop_queue); EXPORT_SYMBOL(__blk_stop_queue); -EXPORT_SYMBOL(__blk_run_queue); +EXPORT_SYMBOL(blk_run_queue); EXPORT_SYMBOL(blk_run_queues); --- linux-2.5.68/drivers/block/loop.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/block/loop.c 2003-04-21 00:31:39.000000000 -0700 @@ -1143,7 +1143,6 @@ int __init loop_init(void) } for (i = 0; i < max_loop; i++) { - char name[16]; struct loop_device *lo = &loop_dev[i]; struct gendisk *disk = disks[i]; memset(lo, 0, sizeof(*lo)); @@ -1156,14 +1155,10 @@ int __init loop_init(void) disk->first_minor = i; disk->fops = &lo_fops; sprintf(disk->disk_name, "loop%d", i); + sprintf(disk->devfs_name, "loop/%d", i); disk->private_data = lo; disk->queue = &lo->lo_queue; add_disk(disk); - sprintf(name, "loop/%d", i); - devfs_register(NULL, name, DEVFS_FL_DEFAULT, - disk->major, disk->first_minor, - S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP, - disk->fops, NULL); } printk(KERN_INFO "loop: loaded (max %d devices)\n", max_loop); return 0; @@ -1184,7 +1179,6 @@ void loop_exit(void) for (i = 0; i < max_loop; i++) { del_gendisk(disks[i]); put_disk(disks[i]); - devfs_remove("loop/%d", i); } devfs_remove("loop"); if (unregister_blkdev(LOOP_MAJOR, "loop")) --- linux-2.5.68/drivers/block/nbd.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/block/nbd.c 2003-04-21 00:31:39.000000000 -0700 @@ -568,7 +568,6 @@ static int __init nbd_init(void) devfs_mk_dir("nbd"); for (i = 0; i < MAX_NBD; i++) { struct gendisk *disk = nbd_dev[i].disk; - char name[16]; nbd_dev[i].refcnt = 0; nbd_dev[i].file = NULL; nbd_dev[i].magic = LO_MAGIC; @@ -585,13 +584,9 @@ static int __init nbd_init(void) disk->private_data = &nbd_dev[i]; disk->queue = &nbd_queue; sprintf(disk->disk_name, "nbd%d", i); + sprintf(disk->devfs_name, "nbd/%d", i); set_capacity(disk, 0x3ffffe); add_disk(disk); - sprintf(name, "nbd/%d", i); - devfs_register(NULL, name, DEVFS_FL_DEFAULT, - disk->major, disk->first_minor, - S_IFBLK | S_IRUSR | S_IWUSR, - disk->fops, NULL); } return 0; @@ -607,7 +602,6 @@ static void __exit nbd_cleanup(void) for (i = 0; i < MAX_NBD; i++) { del_gendisk(nbd_dev[i].disk); put_disk(nbd_dev[i].disk); - devfs_remove("nbd/%d", i); } devfs_remove("nbd"); blk_cleanup_queue(&nbd_queue); --- linux-2.5.68/drivers/block/rd.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/block/rd.c 2003-04-21 00:31:39.000000000 -0700 @@ -50,9 +50,13 @@ #include #include #include +#include +#include +#include +#include #include /* for invalidate_bdev() */ #include -#include +#include #include #include @@ -370,11 +374,9 @@ static void __exit rd_cleanup (void) } del_gendisk(rd_disks[i]); put_disk(rd_disks[i]); - devfs_remove("rd/%d", i); } #ifdef CONFIG_BLK_DEV_INITRD put_disk(initrd_disk); - devfs_remove("rd/initrd"); #endif devfs_remove("rd"); unregister_blkdev(RAMDISK_MAJOR, "ramdisk" ); @@ -402,7 +404,9 @@ static int __init rd_init (void) initrd_disk->first_minor = INITRD_MINOR; initrd_disk->fops = &rd_bd_op; sprintf(initrd_disk->disk_name, "initrd"); + sprintf(initrd_disk->devfs_name, "rd/initrd"); #endif + for (i = 0; i < NUM_RAMDISKS; i++) { rd_disks[i] = alloc_disk(1); if (!rd_disks[i]) @@ -420,30 +424,22 @@ static int __init rd_init (void) for (i = 0; i < NUM_RAMDISKS; i++) { struct gendisk *disk = rd_disks[i]; - char name[16]; + /* rd_size is given in kB */ disk->major = RAMDISK_MAJOR; disk->first_minor = i; disk->fops = &rd_bd_op; disk->queue = &rd_queue; sprintf(disk->disk_name, "ram%d", i); + sprintf(disk->devfs_name, "rd/%d", i); set_capacity(disk, rd_size * 2); - sprintf(name, "rd/%d", i); - devfs_register(NULL, name, DEVFS_FL_DEFAULT, - disk->major, disk->first_minor, - S_IFBLK | S_IRUSR | S_IWUSR, - disk->fops, NULL); - } - - for (i = 0; i < NUM_RAMDISKS; i++) add_disk(rd_disks[i]); + } #ifdef CONFIG_BLK_DEV_INITRD /* We ought to separate initrd operations here */ set_capacity(initrd_disk, (initrd_end-initrd_start+511)>>9); add_disk(initrd_disk); - devfs_register(NULL, "rd/initrd", DEVFS_FL_DEFAULT, RAMDISK_MAJOR, - INITRD_MINOR, S_IFBLK | S_IRUSR, &rd_bd_op, NULL); #endif /* rd_size is given in kB */ --- linux-2.5.68/drivers/block/swim3.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/block/swim3.c 2003-04-21 00:31:39.000000000 -0700 @@ -971,15 +971,13 @@ static struct block_device_operations fl .revalidate_disk= floppy_revalidate, }; -static devfs_handle_t floppy_devfs_handle; - int swim3_init(void) { struct device_node *swim; int err = -ENOMEM; int i; - floppy_devfs_handle = devfs_mk_dir("floppy"); + devfs_mk_dir("floppy"); swim = find_devices("floppy"); while (swim && (floppy_count < MAX_FLOPPIES)) @@ -1017,6 +1015,7 @@ int swim3_init(void) disk->private_data = &floppy_states[i]; disk->queue = &swim3_queue; sprintf(disk->disk_name, "fd%d", i); + sprintf(disk->devfs_name, "floppy/%d", i); set_capacity(disk, 2880); add_disk(disk); } @@ -1033,8 +1032,6 @@ static int swim3_add_device(struct devic { struct device_node *mediabay; struct floppy_state *fs = &floppy_states[floppy_count]; - char floppy_name[16]; - devfs_handle_t floppy_handle; if (swim->n_addrs < 2) { @@ -1096,12 +1093,6 @@ static int swim3_add_device(struct devic printk(KERN_INFO "fd%d: SWIM3 floppy controller %s\n", floppy_count, mediabay ? "in media bay" : ""); - sprintf(floppy_name, "floppy/%d", floppy_count); - floppy_handle = devfs_register(NULL, floppy_name, - DEVFS_FL_DEFAULT, FLOPPY_MAJOR, floppy_count, - S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP |S_IWGRP, - &floppy_fops, NULL); - floppy_count++; return 0; --- linux-2.5.68/drivers/cdrom/aztcd.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/cdrom/aztcd.c 2003-04-21 00:31:39.000000000 -0700 @@ -180,7 +180,6 @@ #include #include #include -#include #include @@ -1922,12 +1921,9 @@ static int __init aztcd_init(void) azt_disk->first_minor = 0; azt_disk->fops = &azt_fops; sprintf(azt_disk->disk_name, "aztcd"); + sprintf(azt_disk->devfs_name, "aztcd"); azt_disk->queue = &azt_queue; add_disk(azt_disk); - devfs_register(NULL, "aztcd", DEVFS_FL_DEFAULT, - azt_disk->major, azt_disk->first_minor, - S_IFBLK | S_IRUGO | S_IWUGO, azt_disk->fops, NULL); - azt_invalidate_buffers(); aztPresent = 1; aztCloseDoor(); @@ -1946,7 +1942,6 @@ err_out: static void __exit aztcd_exit(void) { - devfs_remove("aztcd"); del_gendisk(azt_disk); put_disk(azt_disk); if ((unregister_blkdev(MAJOR_NR, "aztcd") == -EINVAL)) { --- linux-2.5.68/drivers/cdrom/gscd.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/cdrom/gscd.c 2003-04-21 00:31:39.000000000 -0700 @@ -63,7 +63,6 @@ #include #include #include -#include #include #include @@ -883,7 +882,6 @@ static void __exit gscd_exit(void) { CLEAR_TIMER; - devfs_remove("gscd"); del_gendisk(gscd_disk); put_disk(gscd_disk); if ((unregister_blkdev(MAJOR_NR, "gscd") == -EINVAL)) { @@ -958,15 +956,13 @@ static int __init gscd_init(void) gscd_disk->first_minor = 0; gscd_disk->fops = &gscd_fops; sprintf(gscd_disk->disk_name, "gscd"); + sprintf(gscd_disk->devfs_name, "gscd"); if (register_blkdev(MAJOR_NR, "gscd")) { ret = -EIO; goto err_out2; } - devfs_register(NULL, "gscd", DEVFS_FL_DEFAULT, MAJOR_NR, 0, - S_IFBLK | S_IRUGO | S_IWUGO, &gscd_fops, NULL); - blk_init_queue(&gscd_queue, do_gscd_request, &gscd_lock); disk_state = 0; --- linux-2.5.68/drivers/cdrom/optcd.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/cdrom/optcd.c 2003-04-21 00:31:39.000000000 -0700 @@ -71,7 +71,6 @@ #include #include #include -#include #include #include @@ -2033,6 +2032,8 @@ static int __init optcd_init(void) optcd_disk->first_minor = 0; optcd_disk->fops = &opt_fops; sprintf(optcd_disk->disk_name, "optcd"); + sprintf(optcd_disk->devfs_name, "optcd"); + if (!request_region(optcd_port, 4, "optcd")) { printk(KERN_ERR "optcd: conflict, I/O port 0x%x already used\n", optcd_port); @@ -2065,8 +2066,8 @@ static int __init optcd_init(void) put_disk(optcd_disk); return -EIO; } - devfs_register (NULL, "optcd", DEVFS_FL_DEFAULT, MAJOR_NR, 0, - S_IFBLK | S_IRUGO | S_IWUGO, &opt_fops, NULL); + + blk_init_queue(&opt_queue, do_optcd_request, &optcd_lock); blk_queue_hardsect_size(&opt_queue, 2048); optcd_disk->queue = &opt_queue; @@ -2079,7 +2080,6 @@ static int __init optcd_init(void) static void __exit optcd_exit(void) { - devfs_remove("optcd"); del_gendisk(optcd_disk); put_disk(optcd_disk); if (unregister_blkdev(MAJOR_NR, "optcd") == -EINVAL) { --- linux-2.5.68/drivers/cdrom/sjcd.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/cdrom/sjcd.c 2003-04-21 00:31:39.000000000 -0700 @@ -70,7 +70,6 @@ #include #include #include -#include #include #include @@ -1692,6 +1691,7 @@ static int __init sjcd_init(void) sjcd_disk->first_minor = 0, sjcd_disk->fops = &sjcd_fops, sprintf(sjcd_disk->disk_name, "sjcd"); + sprintf(sjcd_disk->devfs_name, "sjcd"); if (check_region(sjcd_base, 4)) { printk @@ -1778,8 +1778,6 @@ static int __init sjcd_init(void) } printk(KERN_INFO "SJCD: Status: port=0x%x.\n", sjcd_base); - devfs_register(NULL, "sjcd", DEVFS_FL_DEFAULT, MAJOR_NR, 0, - S_IFBLK | S_IRUGO | S_IWUGO, &sjcd_fops, NULL); sjcd_disk->queue = &sjcd_queue; add_disk(sjcd_disk); @@ -1798,7 +1796,6 @@ out1: static void __exit sjcd_exit(void) { - devfs_remove("sjcd"); del_gendisk(sjcd_disk); put_disk(sjcd_disk); release_region(sjcd_base, 4); --- linux-2.5.68/drivers/cdrom/sonycd535.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/cdrom/sonycd535.c 2003-04-21 00:31:39.000000000 -0700 @@ -125,7 +125,6 @@ #include #include #include -#include #define REALLY_SLOW_IO #include @@ -1579,6 +1578,7 @@ static int __init sony535_init(void) cdu_disk->first_minor = 0; cdu_disk->fops = &cdu_fops; sprintf(cdu_disk->disk_name, "cdu"); + sprintf(cdu_disk->devfs_name, "cdu535"); if (!request_region(sony535_cd_base_io, 4, CDU535_HANDLE)) { printk(KERN_WARNING"sonycd535: Unable to request region 0x%x\n", @@ -1587,10 +1587,6 @@ static int __init sony535_init(void) } cdu_disk->queue = &sonycd535_queue; add_disk(cdu_disk); - devfs_register (NULL, CDU535_HANDLE, DEVFS_FL_DEFAULT, - cdu_disk->major, cdu_disk->first_minor, - S_IFBLK | S_IRUGO | S_IWUGO, - cdu_disk->fops, NULL); return 0; out7: @@ -1666,7 +1662,6 @@ sony535_exit(void) kfree(sony_buffer); kfree(last_sony_subcode); kfree(sony_toc); - devfs_remove(CDU535_HANDLE); del_gendisk(cdu_disk); put_disk(cdu_disk); blk_cleanup_queue(&sonycd535_queue); --- linux-2.5.68/drivers/char/applicom.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/char/applicom.c 2003-04-21 00:54:32.000000000 -0700 @@ -108,7 +108,7 @@ static ssize_t ac_read (struct file *, c static ssize_t ac_write (struct file *, const char *, size_t, loff_t *); static int ac_ioctl(struct inode *, struct file *, unsigned int, unsigned long); -static void ac_interrupt(int, void *, struct pt_regs *); +static irqreturn_t ac_interrupt(int, void *, struct pt_regs *); static struct file_operations ac_fops = { .owner = THIS_MODULE, @@ -606,11 +606,12 @@ static ssize_t ac_read (struct file *fil } } -static void ac_interrupt(int vec, void *dev_instance, struct pt_regs *regs) +static irqreturn_t ac_interrupt(int vec, void *dev_instance, struct pt_regs *regs) { unsigned int i; unsigned int FlagInt; unsigned int LoopCount; + int handled = 0; // printk("Applicom interrupt on IRQ %d occurred\n", vec); @@ -632,6 +633,7 @@ static void ac_interrupt(int vec, void * continue; } + handled = 1; FlagInt = 1; writeb(0, apbs[i].RamIO + RAM_IT_TO_PC); @@ -675,6 +677,7 @@ static void ac_interrupt(int vec, void * else LoopCount++; } while(LoopCount < 2); + return IRQ_RETVAL(handled); } --- linux-2.5.68/drivers/char/drm/drmP.h 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/char/drm/drmP.h 2003-04-21 00:31:39.000000000 -0700 @@ -837,7 +837,7 @@ extern int DRM(control)( struc unsigned int cmd, unsigned long arg ); extern int DRM(irq_install)( drm_device_t *dev, int irq ); extern int DRM(irq_uninstall)( drm_device_t *dev ); -extern void DRM(dma_service)( int irq, void *device, +extern irqreturn_t DRM(dma_service)( int irq, void *device, struct pt_regs *regs ); extern void DRM(driver_irq_preinstall)( drm_device_t *dev ); extern void DRM(driver_irq_postinstall)( drm_device_t *dev ); --- linux-2.5.68/drivers/char/drm/i830_dma.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/char/drm/i830_dma.c 2003-04-21 00:31:39.000000000 -0700 @@ -52,14 +52,6 @@ #define up_write up #endif -#ifndef LockPage -#define LockPage(page) set_bit(PG_locked, &(page)->flags) -#endif -#ifndef UnlockPage -#define UnlockPage(page) unlock_page(page) -#endif - - static inline void i830_print_status_page(drm_device_t *dev) { drm_device_dma_t *dma = dev->dma; @@ -176,10 +168,10 @@ static int i830_map_buffer(drm_buf_t *bu buf->bus_address); dev_priv->mmap_buffer = NULL; filp->f_op = old_fops; - if ((unsigned long)buf_priv->virtual > -1024UL) { + if (IS_ERR(buf_priv->virtual)) { /* Real error */ DRM_ERROR("mmap error\n"); - retcode = (signed int)buf_priv->virtual; + retcode = PTR_ERR(buf_priv->virtual); buf_priv->virtual = 0; } up_write( ¤t->mm->mmap_sem ); @@ -454,7 +446,7 @@ static int i830_dma_initialize(drm_devic memset((void *) dev_priv->hw_status_page, 0, PAGE_SIZE); DRM_DEBUG("hw status page @ %lx\n", dev_priv->hw_status_page); - I830_WRITE(0x02080, virt_to_bus((void *)dev_priv->hw_status_page)); + I830_WRITE(0x02080, dev_priv->dma_status_page); DRM_DEBUG("Enabled hardware status page\n"); /* Now we need to init our freelist */ --- linux-2.5.68/drivers/char/drm/mga_irq.c 2003-01-16 18:21:33.000000000 -0800 +++ 25/drivers/char/drm/mga_irq.c 2003-04-21 00:57:06.000000000 -0700 @@ -36,7 +36,7 @@ #include "mga_drm.h" #include "mga_drv.h" -void mga_dma_service( DRM_IRQ_ARGS ) +irqreturn_t mga_dma_service( DRM_IRQ_ARGS ) { drm_device_t *dev = (drm_device_t *) arg; drm_mga_private_t *dev_priv = @@ -51,7 +51,9 @@ void mga_dma_service( DRM_IRQ_ARGS ) atomic_inc(&dev->vbl_received); DRM_WAKEUP(&dev->vbl_queue); DRM(vbl_send_signals)( dev ); + return IRQ_HANDLED; } + return IRQ_NONE; } int mga_vblank_wait(drm_device_t *dev, unsigned int *sequence) --- linux-2.5.68/drivers/char/drm/r128_irq.c 2003-01-16 18:23:01.000000000 -0800 +++ 25/drivers/char/drm/r128_irq.c 2003-04-21 00:58:08.000000000 -0700 @@ -36,7 +36,7 @@ #include "r128_drm.h" #include "r128_drv.h" -void r128_dma_service( DRM_IRQ_ARGS ) +irqreturn_t r128_dma_service( DRM_IRQ_ARGS ) { drm_device_t *dev = (drm_device_t *) arg; drm_r128_private_t *dev_priv = @@ -51,7 +51,9 @@ void r128_dma_service( DRM_IRQ_ARGS ) atomic_inc(&dev->vbl_received); DRM_WAKEUP(&dev->vbl_queue); DRM(vbl_send_signals)( dev ); + return IRQ_HANDLED; } + return IRQ_NONE; } int DRM(vblank_wait)(drm_device_t *dev, unsigned int *sequence) --- linux-2.5.68/drivers/char/drm/radeon_irq.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/char/drm/radeon_irq.c 2003-04-21 00:31:39.000000000 -0700 @@ -54,7 +54,7 @@ * tied to dma at all, this is just a hangover from dri prehistory. */ -void DRM(dma_service)( DRM_IRQ_ARGS ) +irqreturn_t DRM(dma_service)( DRM_IRQ_ARGS ) { drm_device_t *dev = (drm_device_t *) arg; drm_radeon_private_t *dev_priv = @@ -67,7 +67,7 @@ void DRM(dma_service)( DRM_IRQ_ARGS ) stat = RADEON_READ(RADEON_GEN_INT_STATUS) & (RADEON_SW_INT_TEST | RADEON_CRTC_VBLANK_STAT); if (!stat) - return; + return IRQ_NONE; /* SW interrupt */ if (stat & RADEON_SW_INT_TEST) { @@ -83,6 +83,7 @@ void DRM(dma_service)( DRM_IRQ_ARGS ) /* Acknowledge interrupts we handle */ RADEON_WRITE(RADEON_GEN_INT_STATUS, stat); + return IRQ_HANDLED; } static __inline__ void radeon_acknowledge_irqs(drm_radeon_private_t *dev_priv) --- linux-2.5.68/drivers/char/ftape/lowlevel/fdc-io.c 2003-02-10 12:24:14.000000000 -0800 +++ 25/drivers/char/ftape/lowlevel/fdc-io.c 2003-04-21 00:55:07.000000000 -0700 @@ -1298,18 +1298,21 @@ static int fdc_config(void) TRACE_EXIT 0; } -static void ftape_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t ftape_interrupt(int irq, void *dev_id, struct pt_regs *regs) { void (*handler) (void) = *fdc.hook; + int handled = 0; TRACE_FUN(ft_t_any); *fdc.hook = NULL; if (handler) { + handled = 1; handler(); } else { TRACE(ft_t_bug, "Unexpected ftape interrupt"); } TRACE_EXIT; + return IRQ_RETVAL(handled); } int fdc_grab_irq_and_dma(void) --- linux-2.5.68/drivers/char/ipmi/ipmi_devintf.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/char/ipmi/ipmi_devintf.c 2003-04-21 00:31:39.000000000 -0700 @@ -437,10 +437,7 @@ static struct file_operations ipmi_fops static int ipmi_major = 0; MODULE_PARM(ipmi_major, "i"); -static devfs_handle_t devfs_handle; - #define MAX_DEVICES 10 -static devfs_handle_t handles[MAX_DEVICES]; static void ipmi_new_smi(int if_num) { @@ -451,10 +448,9 @@ static void ipmi_new_smi(int if_num) snprintf(name, sizeof(name), "ipmidev/%d", if_num); - handles[if_num] = devfs_register(NULL, name, DEVFS_FL_NONE, - ipmi_major, if_num, - S_IFCHR | S_IRUSR | S_IWUSR, - &ipmi_fops, NULL); + devfs_register(NULL, name, 0, ipmi_major, if_num, + S_IFCHR | S_IRUSR | S_IWUSR, + &ipmi_fops, NULL); } static void ipmi_smi_gone(int if_num) @@ -462,7 +458,7 @@ static void ipmi_smi_gone(int if_num) if (if_num > MAX_DEVICES) return; - devfs_unregister(handles[if_num]); + devfs_remove("ipmidev/%d", if_num); } static struct ipmi_smi_watcher smi_watcher = @@ -488,7 +484,7 @@ static __init int init_ipmi_devintf(void ipmi_major = rv; } - devfs_handle = devfs_mk_dir(DEVICE_NAME); + devfs_mk_dir(DEVICE_NAME); rv = ipmi_smi_watcher_register(&smi_watcher); if (rv) { @@ -507,7 +503,7 @@ module_init(init_ipmi_devintf); static __exit void cleanup_ipmi(void) { ipmi_smi_watcher_unregister(&smi_watcher); - devfs_unregister(devfs_handle); + devfs_remove(DEVICE_NAME); unregister_chrdev(ipmi_major, DEVICE_NAME); } module_exit(cleanup_ipmi); --- linux-2.5.68/drivers/char/ipmi/ipmi_kcs_intf.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/char/ipmi/ipmi_kcs_intf.c 2003-04-21 00:44:13.000000000 -0700 @@ -629,6 +629,7 @@ static void request_events(void *send_in atomic_set(&kcs_info->req_events, 1); } +#if 0 static int new_user(void *send_info) { if (!try_module_get(THIS_MODULE)) @@ -640,6 +641,7 @@ static void user_left(void *send_info) { module_put(THIS_MODULE); } +#endif static int initialized = 0; @@ -740,7 +742,7 @@ static void kcs_timeout(unsigned long da spin_unlock_irqrestore(&(kcs_info->kcs_lock), flags); } -static void kcs_irq_handler(int irq, void *data, struct pt_regs *regs) +static irqreturn_t kcs_irq_handler(int irq, void *data, struct pt_regs *regs) { struct kcs_info *kcs_info = (struct kcs_info *) data; unsigned long flags; @@ -759,6 +761,7 @@ static void kcs_irq_handler(int irq, voi kcs_event_handler(kcs_info, 0); out: spin_unlock_irqrestore(&(kcs_info->kcs_lock), flags); + return IRQ_HANDLED; } static struct ipmi_smi_handlers handlers = --- linux-2.5.68/drivers/char/ipmi/ipmi_msghandler.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/char/ipmi/ipmi_msghandler.c 2003-04-21 00:31:46.000000000 -0700 @@ -174,7 +174,7 @@ struct ipmi_smi int ipmi_register_all_cmd_rcvr(ipmi_user_t user) { - int flags; + unsigned long flags; int rv = -EBUSY; write_lock_irqsave(&(user->intf->users_lock), flags); @@ -193,7 +193,7 @@ ipmi_register_all_cmd_rcvr(ipmi_user_t u int ipmi_unregister_all_cmd_rcvr(ipmi_user_t user) { - int flags; + unsigned long flags; int rv = -EINVAL; write_lock_irqsave(&(user->intf->users_lock), flags); @@ -1023,7 +1023,7 @@ int ipmi_register_smi(struct ipmi_smi_ha int rv; ipmi_smi_t new_intf; struct list_head *entry; - unsigned int flags; + unsigned long flags; /* Make sure the driver is actually initialized, this handles @@ -1148,7 +1148,7 @@ int ipmi_unregister_smi(ipmi_smi_t intf) int rv = -ENODEV; int i; struct list_head *entry; - unsigned int flags; + unsigned long flags; down_write(&interfaces_sem); if (list_empty(&(intf->users))) --- linux-2.5.68/drivers/char/Kconfig 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/char/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -487,7 +487,7 @@ config PRINTER box (as opposed to using a serial printer; if the connector at the printer has 9 or 25 holes ["female"], then it's serial), say Y. Also read the Printing-HOWTO, available from - . + . It is possible to share one parallel port among several devices (e.g. printer and ZIP drive) and it is safe to compile the --- linux-2.5.68/drivers/char/keyboard.c 2003-02-14 17:34:57.000000000 -0800 +++ 25/drivers/char/keyboard.c 2003-04-21 02:44:49.000000000 -0700 @@ -601,7 +601,7 @@ static void k_spec(struct vc_data *vc, u return; if ((kbd->kbdmode == VC_RAW || kbd->kbdmode == VC_MEDIUMRAW) && - value != K_SAK) + value != KVAL(K_SAK)) return; /* SAK is allowed even in raw mode */ fn_handler[value](vc, regs); } --- linux-2.5.68/drivers/char/misc.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/char/misc.c 2003-04-21 00:31:39.000000000 -0700 @@ -167,7 +167,6 @@ static struct file_operations misc_fops int misc_register(struct miscdevice * misc) { struct miscdevice *c; - char buf[256]; if (misc->next || misc->prev) return -EBUSY; @@ -197,14 +196,21 @@ int misc_register(struct miscdevice * mi misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7); - /* yuck, yet another stupid special-casing. We should rather - add ->devfs_name to avoid this mess. */ - snprintf(buf, sizeof(buf), strchr(misc->name, '/') ? - "%s" : "misc/%s", misc->name); - misc->devfs_handle = devfs_register(NULL, buf, 0, - MISC_MAJOR, misc->minor, - S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP, - misc->fops, NULL); + /* + * please use it if you want to do fancy things with your + * name... + */ + if (misc->devfs_name[0] == '\0') { + /* yuck, yet another stupid special-casing. + whos actually using this? Please switch over + to ->devfs_name ASAP */ + snprintf(misc->devfs_name, sizeof(misc->devfs_name), + strchr(misc->name, '/') ? + "%s" : "misc/%s", misc->name); + } + + devfs_register(NULL, misc->devfs_name, 0, MISC_MAJOR, misc->minor, + S_IFCHR|S_IRUSR|S_IWUSR|S_IRGRP, misc->fops, NULL); /* * Add it to the front, so that later devices can "override" @@ -238,7 +244,7 @@ int misc_deregister(struct miscdevice * misc->next->prev = misc->prev; misc->next = NULL; misc->prev = NULL; - devfs_unregister (misc->devfs_handle); + devfs_remove(misc->devfs_name); if (i < DYNAMIC_MINORS && i>0) { misc_minors[i>>3] &= ~(1 << (misc->minor & 7)); } --- linux-2.5.68/drivers/char/mwave/tp3780i.c 2003-01-16 18:21:39.000000000 -0800 +++ 25/drivers/char/mwave/tp3780i.c 2003-04-21 00:55:57.000000000 -0700 @@ -96,13 +96,14 @@ static void EnableSRAM(THINKPAD_BD_DATA } -static void UartInterrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t UartInterrupt(int irq, void *dev_id, struct pt_regs *regs) { PRINTK_3(TRACE_TP3780I, "tp3780i::UartInterrupt entry irq %x dev_id %x\n", irq, (int) dev_id); + return IRQ_HANDLED; } -static void DspInterrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t DspInterrupt(int irq, void *dev_id, struct pt_regs *regs) { pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd; DSP_3780I_CONFIG_SETTINGS *pSettings = &pDrvData->rBDData.rDspSettings; @@ -150,6 +151,7 @@ static void DspInterrupt(int irq, void * "tp3780i::DspInterrupt, return false from dsp3780i_GetIPCSource\n"); } PRINTK_1(TRACE_TP3780I, "tp3780i::DspInterrupt exit\n"); + return IRQ_HANDLED; } --- linux-2.5.68/drivers/char/rtc.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/char/rtc.c 2003-04-21 00:31:45.000000000 -0700 @@ -180,7 +180,7 @@ static const unsigned char days_in_mo[] * (See ./arch/XXXX/kernel/time.c for the set_rtc_mmss() function.) */ -static void rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs) { /* * Can be an alarm interrupt, update complete interrupt, @@ -207,6 +207,7 @@ static void rtc_interrupt(int irq, void wake_up_interruptible(&rtc_wait); kill_fasync (&rtc_async_queue, SIGIO, POLL_IN); + return IRQ_HANDLED; } #endif --- linux-2.5.68/drivers/char/sonypi.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/char/sonypi.c 2003-04-21 00:53:24.000000000 -0700 @@ -305,7 +305,7 @@ static void sonypi_setbluetoothpower(u8 } /* Interrupt handler: some event is available */ -void sonypi_irq(int irq, void *dev_id, struct pt_regs *regs) { +static irqreturn_t sonypi_irq(int irq, void *dev_id, struct pt_regs *regs) { u8 v1, v2, event = 0; int i, j; @@ -334,7 +334,7 @@ void sonypi_irq(int irq, void *dev_id, s if (verbose) printk(KERN_WARNING "sonypi: unknown event port1=0x%02x,port2=0x%02x\n",v1,v2); - return; + return IRQ_NONE; found: #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) @@ -354,6 +354,7 @@ found: } #endif /* CONFIG_INPUT || CONFIG_INPUT_MODULE */ sonypi_pushq(event); + return IRQ_HANDLED; } /* External camera command (exported to the motion eye v4l driver) */ --- linux-2.5.68/drivers/char/watchdog/eurotechwdt.c 2003-01-16 18:21:39.000000000 -0800 +++ 25/drivers/char/watchdog/eurotechwdt.c 2003-04-21 00:47:19.000000000 -0700 @@ -187,7 +187,7 @@ static void eurwdt_activate_timer(void) * Kernel methods. */ -void eurwdt_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t eurwdt_interrupt(int irq, void *dev_id, struct pt_regs *regs) { printk(KERN_CRIT "timeout WDT timeout\n"); @@ -197,6 +197,7 @@ void eurwdt_interrupt(int irq, void *dev printk(KERN_CRIT "Initiating system reboot.\n"); machine_restart(NULL); #endif + return IRQ_HANDLED; } --- linux-2.5.68/drivers/char/watchdog/wdt.c 2003-03-04 20:02:36.000000000 -0800 +++ 25/drivers/char/watchdog/wdt.c 2003-04-21 00:46:56.000000000 -0700 @@ -178,7 +178,7 @@ static int wdt_status(void) * a failure condition occurring. */ -void wdt_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t wdt_interrupt(int irq, void *dev_id, struct pt_regs *regs) { /* * Read the status register see what is up and @@ -210,7 +210,8 @@ void wdt_interrupt(int irq, void *dev_id #endif #else printk(KERN_CRIT "Reset in 5ms.\n"); -#endif +#endif + return IRQ_HANDLED; } --- linux-2.5.68/drivers/char/watchdog/wdt_pci.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/char/watchdog/wdt_pci.c 2003-04-21 00:45:41.000000000 -0700 @@ -161,7 +161,7 @@ static int wdtpci_status(void) * a failure condition occurring. */ -static void wdtpci_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t wdtpci_interrupt(int irq, void *dev_id, struct pt_regs *regs) { /* * Read the status register see what is up and @@ -193,7 +193,8 @@ static void wdtpci_interrupt(int irq, vo #endif #else printk(KERN_CRIT "Reset in 5ms.\n"); -#endif +#endif + return IRQ_HANDLED; } --- linux-2.5.68/drivers/hotplug/cpci_hotplug_core.c 2003-02-14 17:34:57.000000000 -0800 +++ 25/drivers/hotplug/cpci_hotplug_core.c 2003-04-21 02:45:05.000000000 -0700 @@ -446,7 +446,7 @@ cpci_find_slot(struct pci_bus *bus, unsi } /* This is the interrupt mode interrupt handler */ -void +irqreturn_t cpci_hp_intr(int irq, void *data, struct pt_regs *regs) { dbg("entered cpci_hp_intr"); @@ -455,7 +455,7 @@ cpci_hp_intr(int irq, void *data, struct if((controller->irq_flags & SA_SHIRQ) && !controller->ops->check_irq(controller->dev_id)) { dbg("exited cpci_hp_intr, not our interrupt"); - return; + return IRQ_NONE; } /* Disable ENUM interrupt */ @@ -465,6 +465,7 @@ cpci_hp_intr(int irq, void *data, struct dbg("Signal event_semaphore"); up(&event_semaphore); dbg("exited cpci_hp_intr"); + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/hotplug/cpqphp_core.c 2003-03-04 20:02:36.000000000 -0800 +++ 25/drivers/hotplug/cpqphp_core.c 2003-04-21 02:45:05.000000000 -0700 @@ -1148,8 +1148,7 @@ static int cpqhpc_probe(struct pci_dev * /* set up the interrupt */ dbg("HPC interrupt = %d \n", ctrl->interrupt); - if (request_irq(ctrl->interrupt, - (void (*)(int, void *, struct pt_regs *)) &cpqhp_ctrl_intr, + if (request_irq(ctrl->interrupt, cpqhp_ctrl_intr, SA_SHIRQ, MY_NAME, ctrl)) { err("Can't get irq %d for the hotplug pci controller\n", ctrl->interrupt); rc = -ENODEV; --- linux-2.5.68/drivers/hotplug/cpqphp_ctrl.c 2003-02-14 17:34:57.000000000 -0800 +++ 25/drivers/hotplug/cpqphp_ctrl.c 2003-04-21 02:45:05.000000000 -0700 @@ -916,8 +916,9 @@ int cpqhp_resource_sort_and_combine(stru } -void cpqhp_ctrl_intr(int IRQ, struct controller * ctrl, struct pt_regs *regs) +irqreturn_t cpqhp_ctrl_intr(int IRQ, void *data, struct pt_regs *regs) { + struct controller *ctrl = data; u8 schedule_flag = 0; u16 misc; u32 Diff; @@ -929,7 +930,7 @@ void cpqhp_ctrl_intr(int IRQ, struct con // Check to see if it was our interrupt //********************************* if (!(misc & 0x000C)) { - return; + return IRQ_NONE; } if (misc & 0x0004) { @@ -974,7 +975,7 @@ void cpqhp_ctrl_intr(int IRQ, struct con up(&event_semaphore); dbg("Signal event_semaphore\n"); } - + return IRQ_HANDLED; } --- linux-2.5.68/drivers/hotplug/cpqphp.h 2003-03-04 20:02:36.000000000 -0800 +++ 25/drivers/hotplug/cpqphp.h 2003-04-21 02:45:05.000000000 -0700 @@ -29,6 +29,7 @@ #define _CPQPHP_H #include "pci_hotplug.h" +#include #include /* for read? and write? functions */ @@ -408,7 +409,7 @@ extern void cpqhp_create_ctrl_files (st /* controller functions */ extern void cpqhp_pushbutton_thread (unsigned long event_pointer); -extern void cpqhp_ctrl_intr (int IRQ, struct controller *ctrl_input, struct pt_regs *regs); +extern irqreturn_t cpqhp_ctrl_intr (int IRQ, void *data, struct pt_regs *regs); extern int cpqhp_find_available_resources (struct controller *ctrl, void *rom_start); extern int cpqhp_event_start_thread (void); extern void cpqhp_event_stop_thread (void); --- linux-2.5.68/drivers/i2c/i2c-elektor.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/i2c/i2c-elektor.c 2003-04-21 00:41:28.000000000 -0700 @@ -132,9 +132,10 @@ static void pcf_isa_waitforpin(void) { } -static void pcf_isa_handler(int this_irq, void *dev_id, struct pt_regs *regs) { +static irqreturn_t pcf_isa_handler(int this_irq, void *dev_id, struct pt_regs *regs) { pcf_pending = 1; wake_up_interruptible(&pcf_wait); + return IRQ_HANDLED; } --- linux-2.5.68/drivers/ide/ide-cd.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/ide/ide-cd.c 2003-04-21 00:31:39.000000000 -0700 @@ -3366,7 +3366,8 @@ static int ide_cdrom_attach (ide_drive_t DRIVER(drive)->busy++; g->minors = 1; g->minor_shift = 0; - strcpy(g->devfs_name, drive->devfs_name); + snprintf(g->devfs_name, sizeof(g->devfs_name), + "%s/cd", drive->devfs_name); g->driverfs_dev = &drive->gendev; g->flags = GENHD_FL_CD; if (ide_cdrom_setup(drive)) { --- linux-2.5.68/drivers/ide/ide-io.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/ide/ide-io.c 2003-04-21 00:31:39.000000000 -0700 @@ -1112,7 +1112,7 @@ static void unexpected_intr (int irq, id * on the hwgroup and the process begins again. */ -void ide_intr (int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t ide_intr (int irq, void *dev_id, struct pt_regs *regs) { unsigned long flags; ide_hwgroup_t *hwgroup = (ide_hwgroup_t *)dev_id; @@ -1126,7 +1126,7 @@ void ide_intr (int irq, void *dev_id, st if (!ide_ack_intr(hwif)) { spin_unlock_irqrestore(&ide_lock, flags); - return; + return IRQ_NONE; } if ((handler = hwgroup->handler) == NULL || @@ -1165,7 +1165,7 @@ void ide_intr (int irq, void *dev_id, st #endif /* CONFIG_BLK_DEV_IDEPCI */ } spin_unlock_irqrestore(&ide_lock, flags); - return; + return IRQ_HANDLED; } drive = hwgroup->drive; if (!drive) { @@ -1176,7 +1176,7 @@ void ide_intr (int irq, void *dev_id, st * [Note - this can occur if the drive is hot unplugged] */ spin_unlock_irqrestore(&ide_lock, flags); - return; + return IRQ_HANDLED; } if (!drive_is_ready(drive)) { /* @@ -1187,7 +1187,7 @@ void ide_intr (int irq, void *dev_id, st * enough advance overhead that the latter isn't a problem. */ spin_unlock_irqrestore(&ide_lock, flags); - return; + return IRQ_HANDLED; } if (!hwgroup->busy) { hwgroup->busy = 1; /* paranoia */ @@ -1222,6 +1222,7 @@ void ide_intr (int irq, void *dev_id, st } } spin_unlock_irqrestore(&ide_lock, flags); + return IRQ_HANDLED; } EXPORT_SYMBOL(ide_intr); --- linux-2.5.68/drivers/ide/Kconfig 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/ide/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -22,7 +22,7 @@ config BLK_DEV_IDE topics, is contained in . For detailed information about hard drives, consult the Disk-HOWTO and the Multi-Disk-HOWTO, available from - . + . To fine-tune ATA/IDE drive/interface parameters for improved performance, look for the hdparm package at @@ -1017,7 +1017,7 @@ config BLK_DEV_HD_ONLY If you are unsure, then just choose the Enhanced IDE/MFM/RLL driver instead of this one. For more detailed information, read the Disk-HOWTO, available from - . + . config IDEDMA_AUTO bool --- linux-2.5.68/drivers/ide/legacy/hd98.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/ide/legacy/hd98.c 2003-04-21 00:31:39.000000000 -0700 @@ -655,11 +655,8 @@ static int hd_ioctl(struct inode * inode unsigned int cmd, unsigned long arg) { struct hd_geometry *loc = (struct hd_geometry *) arg; - int dev; + int dev = DEVICE_NR(inode->i_rdev); - if ((!inode) || kdev_none(inode->i_rdev)) - return -EINVAL; - dev = DEVICE_NR(inode->i_rdev); if (dev >= NR_HD) return -EINVAL; switch (cmd) { --- linux-2.5.68/drivers/ieee1394/ohci1394.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/ieee1394/ohci1394.c 2003-04-21 02:45:04.000000000 -0700 @@ -2214,7 +2214,7 @@ static void ohci_schedule_iso_tasklets(s } -static void ohci_irq_handler(int irq, void *dev_id, +static irqreturn_t ohci_irq_handler(int irq, void *dev_id, struct pt_regs *regs_are_unused) { quadlet_t event, node_id; @@ -2231,7 +2231,8 @@ static void ohci_irq_handler(int irq, vo reg_write(ohci, OHCI1394_IntEventClear, event & ~OHCI1394_busReset); spin_unlock_irqrestore(&ohci->event_lock, flags); - if (!event) return; + if (!event) + return IRQ_HANDLED; DBGMSG(ohci->id, "IntEvent: %08x", event); @@ -2462,7 +2463,7 @@ selfid_not_valid: PRINT(KERN_ERR, ohci->id, "Unhandled interrupt(s) 0x%08x", event); - return; + return IRQ_HANDLED; } /* Put the buffer back into the dma context */ --- linux-2.5.68/drivers/input/evdev.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/input/evdev.c 2003-04-21 00:31:39.000000000 -0700 @@ -27,7 +27,6 @@ struct evdev{ char name[16]; struct input_handle handle; wait_queue_head_t wait; - devfs_handle_t devfs; struct list_head list; }; @@ -76,6 +75,13 @@ static int evdev_flush(struct file * fil return input_flush_device(&list->evdev->handle, file); } +static void evdev_free(struct evdev *evdev) +{ + devfs_remove("input/event%d", evdev->minor); + evdev_table[evdev->minor] = NULL; + kfree(evdev); +} + static int evdev_release(struct inode * inode, struct file * file) { struct evdev_list *list = file->private_data; @@ -84,17 +90,13 @@ static int evdev_release(struct inode * list_del(&list->node); if (!--list->evdev->open) { - if (list->evdev->exist) { + if (list->evdev->exist) input_close_device(&list->evdev->handle); - } else { - input_unregister_minor(list->evdev->devfs); - evdev_table[list->evdev->minor] = NULL; - kfree(list->evdev); - } + else + evdev_free(list->evdev); } kfree(list); - return 0; } @@ -397,7 +399,7 @@ static struct input_handle *evdev_connec sprintf(evdev->name, "event%d", minor); evdev_table[minor] = evdev; - evdev->devfs = input_register_minor("input/event%d", minor, EVDEV_MINOR_BASE); + input_register_minor("input/event%d", minor, EVDEV_MINOR_BASE); return &evdev->handle; } @@ -411,11 +413,8 @@ static void evdev_disconnect(struct inpu if (evdev->open) { input_close_device(handle); wake_up_interruptible(&evdev->wait); - } else { - input_unregister_minor(evdev->devfs); - evdev_table[evdev->minor] = NULL; - kfree(evdev); - } + } else + evdev_free(evdev); } static struct input_device_id evdev_ids[] = { --- linux-2.5.68/drivers/input/input.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/input/input.c 2003-04-21 00:31:39.000000000 -0700 @@ -32,7 +32,6 @@ EXPORT_SYMBOL(input_unregister_device); EXPORT_SYMBOL(input_register_handler); EXPORT_SYMBOL(input_unregister_handler); EXPORT_SYMBOL(input_register_minor); -EXPORT_SYMBOL(input_unregister_minor); EXPORT_SYMBOL(input_open_device); EXPORT_SYMBOL(input_close_device); EXPORT_SYMBOL(input_accept_process); @@ -47,7 +46,6 @@ static LIST_HEAD(input_dev_list); static LIST_HEAD(input_handler_list); static struct input_handler *input_table[8]; -static devfs_handle_t input_devfs_handle; #ifdef CONFIG_PROC_FS static struct proc_dir_entry *proc_bus_input_dir; @@ -542,20 +540,13 @@ static struct file_operations input_fops .open = input_open_file, }; -devfs_handle_t input_register_minor(char *name, int minor, int minor_base) +void input_register_minor(char *name, int minor, int minor_base) { char devfs_name[16]; - sprintf(devfs_name, name, minor); - - return devfs_register(NULL, devfs_name, 0, - INPUT_MAJOR, minor + minor_base, - S_IFCHR|S_IRUGO|S_IWUSR, - &input_fops, NULL); -} -void input_unregister_minor(devfs_handle_t handle) -{ - devfs_unregister(handle); + sprintf(devfs_name, name, minor); + devfs_register(NULL, devfs_name, 0, INPUT_MAJOR, minor_base + minor, + S_IFCHR|S_IRUGO|S_IWUSR, &input_fops, NULL); } #ifdef CONFIG_PROC_FS @@ -699,8 +690,7 @@ static int __init input_init(void) return -EBUSY; } - input_devfs_handle = devfs_mk_dir("input"); - + devfs_mk_dir("input"); return 0; } @@ -711,7 +701,7 @@ static void __exit input_exit(void) remove_proc_entry("handlers", proc_bus_input_dir); remove_proc_entry("input", proc_bus); #endif - devfs_unregister(input_devfs_handle); + devfs_remove("input"); if (unregister_chrdev(INPUT_MAJOR, "input")) printk(KERN_ERR "input: can't unregister char major %d", INPUT_MAJOR); devclass_unregister(&input_devclass); --- linux-2.5.68/drivers/input/joydev.c 2003-02-14 17:34:57.000000000 -0800 +++ 25/drivers/input/joydev.c 2003-04-21 00:31:39.000000000 -0700 @@ -45,7 +45,6 @@ struct joydev { char name[16]; struct input_handle handle; wait_queue_head_t wait; - devfs_handle_t devfs; struct list_head list; struct js_corr corr[ABS_MAX]; struct JS_DATA_SAVE_TYPE glue; @@ -141,6 +140,13 @@ static int joydev_fasync(int fd, struct return retval < 0 ? retval : 0; } +static void joydev_free(struct joydev *joydev) +{ + devfs_remove("js%d", joydev->minor); + joydev_table[joydev->minor] = NULL; + kfree(joydev); +} + static int joydev_release(struct inode * inode, struct file * file) { struct joydev_list *list = file->private_data; @@ -150,17 +156,13 @@ static int joydev_release(struct inode * list_del(&list->node); if (!--list->joydev->open) { - if (list->joydev->exist) { + if (list->joydev->exist) input_close_device(&list->joydev->handle); - } else { - input_unregister_minor(list->joydev->devfs); - joydev_table[list->joydev->minor] = NULL; - kfree(list->joydev); - } + else + joydev_free(list->joydev); } kfree(list); - return 0; } @@ -442,7 +444,7 @@ static struct input_handle *joydev_conne } joydev_table[minor] = joydev; - joydev->devfs = input_register_minor("js%d", minor, JOYDEV_MINOR_BASE); + input_register_minor("js%d", minor, JOYDEV_MINOR_BASE); return &joydev->handle; } @@ -453,13 +455,10 @@ static void joydev_disconnect(struct inp joydev->exist = 0; - if (joydev->open) { + if (joydev->open) input_close_device(handle); - } else { - input_unregister_minor(joydev->devfs); - joydev_table[joydev->minor] = NULL; - kfree(joydev); - } + else + joydev_free(joydev); } static struct input_device_id joydev_ids[] = { --- linux-2.5.68/drivers/input/joystick/iforce/iforce-serio.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/joystick/iforce/iforce-serio.c 2003-04-21 04:18:18.000000000 -0700 @@ -78,40 +78,38 @@ static void iforce_serio_write_wakeup(st iforce_serial_xmit((struct iforce *)serio->private); } -static void iforce_serio_irq(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +static irqreturn_t iforce_serio_irq(struct serio *serio, + unsigned char data, unsigned int flags, struct pt_regs *regs) { struct iforce* iforce = serio->private; if (!iforce->pkt) { - if (data != 0x2b) { - return; - } - iforce->pkt = 1; - return; + if (data == 0x2b) + iforce->pkt = 1; + goto out; } if (!iforce->id) { - if (data > 3 && data != 0xff) { + if (data > 3 && data != 0xff) iforce->pkt = 0; - return; - } - iforce->id = data; - return; + else + iforce->id = data; + goto out; } if (!iforce->len) { if (data > IFORCE_MAX_LENGTH) { iforce->pkt = 0; iforce->id = 0; - return; + } else { + iforce->len = data; } - iforce->len = data; - return; + goto out; } if (iforce->idx < iforce->len) { iforce->csum += iforce->data[iforce->idx++] = data; - return; + goto out; } if (iforce->idx == iforce->len) { @@ -122,6 +120,8 @@ static void iforce_serio_irq(struct seri iforce->idx = 0; iforce->csum = 0; } +out: + return IRQ_HANDLED; } static void iforce_serio_connect(struct serio *serio, struct serio_dev *dev) --- linux-2.5.68/drivers/input/joystick/magellan.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/joystick/magellan.c 2003-04-21 04:15:10.000000000 -0700 @@ -113,7 +113,8 @@ static void magellan_process_packet(stru input_sync(dev); } -static void magellan_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +static irqreturn_t magellan_interrupt(struct serio *serio, + unsigned char data, unsigned int flags, struct pt_regs *regs) { struct magellan* magellan = serio->private; @@ -123,7 +124,8 @@ static void magellan_interrupt(struct se } else { if (magellan->idx < MAGELLAN_MAX_LENGTH) magellan->data[magellan->idx++] = data; - } + } + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/input/joystick/spaceball.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/joystick/spaceball.c 2003-04-21 04:15:52.000000000 -0700 @@ -149,7 +149,8 @@ static void spaceball_process_packet(str * can occur in the axis values. */ -static void spaceball_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +static irqreturn_t spaceball_interrupt(struct serio *serio, + unsigned char data, unsigned int flags, struct pt_regs *regs) { struct spaceball *spaceball = serio->private; @@ -158,11 +159,11 @@ static void spaceball_interrupt(struct s spaceball_process_packet(spaceball, regs); spaceball->idx = 0; spaceball->escape = 0; - return; + break; case '^': if (!spaceball->escape) { spaceball->escape = 1; - return; + break; } spaceball->escape = 0; case 'M': @@ -177,8 +178,9 @@ static void spaceball_interrupt(struct s spaceball->escape = 0; if (spaceball->idx < SPACEBALL_MAX_LENGTH) spaceball->data[spaceball->idx++] = data; - return; + break; } + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/input/joystick/spaceorb.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/joystick/spaceorb.c 2003-04-21 04:16:10.000000000 -0700 @@ -130,7 +130,8 @@ static void spaceorb_process_packet(stru input_sync(dev); } -static void spaceorb_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +static irqreturn_t spaceorb_interrupt(struct serio *serio, + unsigned char data, unsigned int flags, struct pt_regs *regs) { struct spaceorb* spaceorb = serio->private; @@ -140,6 +141,7 @@ static void spaceorb_interrupt(struct se } if (spaceorb->idx < SPACEORB_MAX_LENGTH) spaceorb->data[spaceorb->idx++] = data & 0x7f; + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/input/joystick/stinger.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/joystick/stinger.c 2003-04-21 04:14:00.000000000 -0700 @@ -98,7 +98,8 @@ static void stinger_process_packet(struc * packet processing routine. */ -static void stinger_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +static irqreturn_t stinger_interrupt(struct serio *serio, + unsigned char data, unsigned int flags, struct pt_regs *regs) { struct stinger* stinger = serio->private; @@ -112,7 +113,7 @@ static void stinger_interrupt(struct ser stinger->idx = 0; } - return; + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/input/joystick/warrior.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/joystick/warrior.c 2003-04-21 04:13:41.000000000 -0700 @@ -99,7 +99,8 @@ static void warrior_process_packet(struc * packet processing routine. */ -static void warrior_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +static irqreturn_t warrior_interrupt(struct serio *serio, + unsigned char data, unsigned int flags, struct pt_regs *regs) { struct warrior* warrior = serio->private; @@ -117,6 +118,7 @@ static void warrior_interrupt(struct ser warrior->idx = 0; warrior->len = 0; } + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/input/keyboard/atkbd.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/keyboard/atkbd.c 2003-04-21 04:17:32.000000000 -0700 @@ -132,7 +132,8 @@ struct atkbd { * the keyboard into events. */ -static void atkbd_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, + unsigned int flags, struct pt_regs *regs) { struct atkbd *atkbd = serio->private; int code = data; @@ -145,7 +146,7 @@ static void atkbd_interrupt(struct serio printk("atkbd.c: frame/parity error: %02x\n", flags); serio_write(serio, ATKBD_CMD_RESEND); atkbd->resend = 1; - return; + goto out; } if (!flags) @@ -154,34 +155,35 @@ static void atkbd_interrupt(struct serio switch (code) { case ATKBD_RET_ACK: atkbd->ack = 1; - return; + goto out; case ATKBD_RET_NAK: atkbd->ack = -1; - return; + goto out; } if (atkbd->cmdcnt) { atkbd->cmdbuf[--atkbd->cmdcnt] = code; - return; + goto out; } switch (atkbd->keycode[code]) { case ATKBD_KEY_BAT: serio_rescan(atkbd->serio); - return; + goto out; case ATKBD_KEY_EMUL0: atkbd->emul = 1; - return; + goto out; case ATKBD_KEY_EMUL1: atkbd->emul = 2; - return; + goto out; case ATKBD_KEY_RELEASE: atkbd->release = 1; - return; + goto out; } if (atkbd->emul) { - if (--atkbd->emul) return; + if (--atkbd->emul) + goto out; code |= 0x100; } @@ -197,8 +199,10 @@ static void atkbd_interrupt(struct serio input_report_key(&atkbd->dev, atkbd->keycode[code], !atkbd->release); input_sync(&atkbd->dev); } - + atkbd->release = 0; +out: + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/input/keyboard/newtonkbd.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/keyboard/newtonkbd.c 2003-04-21 04:13:24.000000000 -0700 @@ -62,7 +62,8 @@ struct nkbd { char phys[32]; }; -void nkbd_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +irqreturn_t nkbd_interrupt(struct serio *serio, + unsigned char data, unsigned int flags, struct pt_regs *regs) { struct nkbd *nkbd = serio->private; @@ -75,6 +76,7 @@ void nkbd_interrupt(struct serio *serio, else if (data == 0xe7) /* end of init sequence */ printk(KERN_INFO "input: %s on %s\n", nkbd_name, serio->phys); + return IRQ_HANDLED; } --- linux-2.5.68/drivers/input/keyboard/sunkbd.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/keyboard/sunkbd.c 2003-04-21 04:14:52.000000000 -0700 @@ -89,18 +89,19 @@ struct sunkbd { * is received. */ -static void sunkbd_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +static irqreturn_t sunkbd_interrupt(struct serio *serio, + unsigned char data, unsigned int flags, struct pt_regs *regs) { struct sunkbd* sunkbd = serio->private; if (sunkbd->reset <= -1) { /* If cp[i] is 0xff, sunkbd->reset will stay -1. */ sunkbd->reset = data; /* The keyboard sends 0xff 0xff 0xID on powerup */ - return; + goto out; } if (sunkbd->layout == -1) { sunkbd->layout = data; - return; + goto out; } switch (data) { @@ -108,14 +109,14 @@ static void sunkbd_interrupt(struct seri case SUNKBD_RET_RESET: schedule_work(&sunkbd->tq); sunkbd->reset = -1; - return; + break; case SUNKBD_RET_LAYOUT: sunkbd->layout = -1; - return; + break; case SUNKBD_RET_ALLUP: /* All keys released */ - return; + break; default: if (sunkbd->keycode[data & SUNKBD_KEY]) { @@ -127,6 +128,8 @@ static void sunkbd_interrupt(struct seri data & SUNKBD_KEY, data & SUNKBD_RELEASE ? "released" : "pressed"); } } +out: + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/input/keyboard/xtkbd.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/keyboard/xtkbd.c 2003-04-21 04:13:02.000000000 -0700 @@ -63,14 +63,15 @@ struct xtkbd { char phys[32]; }; -void xtkbd_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +irqreturn_t xtkbd_interrupt(struct serio *serio, + unsigned char data, unsigned int flags, struct pt_regs *regs) { struct xtkbd *xtkbd = serio->private; switch (data) { case XTKBD_EMUL0: case XTKBD_EMUL1: - return; + break; default: if (xtkbd->keycode[data & XTKBD_KEY]) { @@ -81,7 +82,8 @@ void xtkbd_interrupt(struct serio *serio printk(KERN_WARNING "xtkbd.c: Unknown key (scancode %#x) %s.\n", data & XTKBD_KEY, data & XTKBD_RELEASE ? "released" : "pressed"); } - } + } + return IRQ_HANDLED; } void xtkbd_connect(struct serio *serio, struct serio_dev *dev) --- linux-2.5.68/drivers/input/mousedev.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/input/mousedev.c 2003-04-21 00:31:39.000000000 -0700 @@ -46,7 +46,6 @@ struct mousedev { wait_queue_head_t wait; struct list_head list; struct input_handle handle; - devfs_handle_t devfs; }; struct mousedev_list { @@ -171,45 +170,52 @@ static int mousedev_fasync(int fd, struc return retval < 0 ? retval : 0; } +static void mousedev_free(struct mousedev *mousedev) +{ + devfs_remove("input/mouse%d", mousedev->minor); + mousedev_table[mousedev->minor] = NULL; + kfree(mousedev); +} + +static int mixdev_release(void) +{ + struct input_handle *handle; + + list_for_each_entry(handle, &mousedev_handler.h_list, h_node) { + struct mousedev *mousedev = handle->private; + + if (!mousedev->open) { + if (mousedev->exist) + input_close_device(&mousedev->handle); + else + mousedev_free(mousedev); + } + } + + return 0; +} + static int mousedev_release(struct inode * inode, struct file * file) { struct mousedev_list *list = file->private_data; - struct input_handle *handle; - struct mousedev *mousedev; mousedev_fasync(-1, file, 0); list_del(&list->node); if (!--list->mousedev->open) { - if (list->mousedev->minor == MOUSEDEV_MIX) { - list_for_each_entry(handle, &mousedev_handler.h_list, h_node) { - mousedev = handle->private; - if (!mousedev->open) { - if (mousedev->exist) { - input_close_device(&mousedev->handle); - } else { - input_unregister_minor(mousedev->devfs); - mousedev_table[mousedev->minor] = NULL; - kfree(mousedev); - } - } - } - } else { - if (!mousedev_mix.open) { - if (list->mousedev->exist) { - input_close_device(&list->mousedev->handle); - } else { - input_unregister_minor(list->mousedev->devfs); - mousedev_table[list->mousedev->minor] = NULL; - kfree(list->mousedev); - } - } + if (list->mousedev->minor == MOUSEDEV_MIX) + return mixdev_release(); + + if (!mousedev_mix.open) { + if (list->mousedev->exist) + input_close_device(&list->mousedev->handle); + else + mousedev_free(list->mousedev); } } kfree(list); - return 0; } @@ -425,7 +431,7 @@ static struct input_handle *mousedev_con input_open_device(&mousedev->handle); mousedev_table[minor] = mousedev; - mousedev->devfs = input_register_minor("input/mouse%d", minor, MOUSEDEV_MINOR_BASE); + input_register_minor("input/mouse%d", minor, MOUSEDEV_MINOR_BASE); return &mousedev->handle; } @@ -441,9 +447,7 @@ static void mousedev_disconnect(struct i } else { if (mousedev_mix.open) input_close_device(handle); - input_unregister_minor(mousedev->devfs); - mousedev_table[mousedev->minor] = NULL; - kfree(mousedev); + mousedev_free(mousedev); } } @@ -507,7 +511,7 @@ static int __init mousedev_init(void) mousedev_table[MOUSEDEV_MIX] = &mousedev_mix; mousedev_mix.exist = 1; mousedev_mix.minor = MOUSEDEV_MIX; - mousedev_mix.devfs = input_register_minor("input/mice", MOUSEDEV_MIX, MOUSEDEV_MINOR_BASE); + input_register_minor("input/mice", MOUSEDEV_MIX, MOUSEDEV_MINOR_BASE); #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX if (!(mousedev_mix.misc = !misc_register(&psaux_mouse))) @@ -525,7 +529,7 @@ static void __exit mousedev_exit(void) if (mousedev_mix.misc) misc_deregister(&psaux_mouse); #endif - input_unregister_minor(mousedev_mix.devfs); + devfs_remove("input/mice"); input_unregister_handler(&mousedev_handler); interface_unregister(&mousedev_intf); } --- linux-2.5.68/drivers/input/mouse/inport.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/mouse/inport.c 2003-04-21 04:04:38.000000000 -0700 @@ -85,7 +85,7 @@ MODULE_PARM(inport_irq, "i"); static int inport_irq = INPORT_IRQ; static int inport_used = 0; -static void inport_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t inport_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int inport_open(struct input_dev *dev) { @@ -124,7 +124,7 @@ static struct input_dev inport_dev = { }, }; -static void inport_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t inport_interrupt(int irq, void *dev_id, struct pt_regs *regs) { unsigned char buttons; @@ -150,6 +150,7 @@ static void inport_interrupt(int irq, vo outb(INPORT_MODE_IRQ | INPORT_MODE_BASE, INPORT_DATA_PORT); input_sync(&inport_dev); + return IRQ_HANDLED; } #ifndef MODULE --- linux-2.5.68/drivers/input/mouse/logibm.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/mouse/logibm.c 2003-04-21 04:05:02.000000000 -0700 @@ -75,7 +75,7 @@ MODULE_PARM(logibm_irq, "i"); static int logibm_irq = LOGIBM_IRQ; static int logibm_used = 0; -static void logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int logibm_open(struct input_dev *dev) { @@ -114,7 +114,7 @@ static struct input_dev logibm_dev = { }, }; -static void logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs) { char dx, dy; unsigned char buttons; @@ -139,6 +139,7 @@ static void logibm_interrupt(int irq, vo input_sync(&logibm_dev); outb(LOGIBM_ENABLE_IRQ, LOGIBM_CONTROL_PORT); + return IRQ_HANDLED; } #ifndef MODULE --- linux-2.5.68/drivers/input/mouse/pc110pad.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/mouse/pc110pad.c 2003-04-21 04:05:31.000000000 -0700 @@ -60,7 +60,7 @@ static int pc110pad_used; static char *pc110pad_name = "IBM PC110 TouchPad"; static char *pc110pad_phys = "isa15e0/input0"; -static void pc110pad_interrupt(int irq, void *ptr, struct pt_regs *regs) +static irqreturn_t pc110pad_interrupt(int irq, void *ptr, struct pt_regs *regs) { int value = inb_p(pc110pad_io); int handshake = inb_p(pc110pad_io + 2); @@ -83,6 +83,7 @@ static void pc110pad_interrupt(int irq, input_sync(&pc110pad_dev); pc110pad_count = 0; + return IRQ_HANDLED; } static void pc110pad_close(struct input_dev *dev) --- linux-2.5.68/drivers/input/mouse/psmouse.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/input/mouse/psmouse.c 2003-04-21 04:12:09.000000000 -0700 @@ -167,7 +167,8 @@ static void psmouse_process_packet(struc * packets or passing them to the command routine as command output. */ -static void psmouse_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +static irqreturn_t psmouse_interrupt(struct serio *serio, + unsigned char data, unsigned int flags, struct pt_regs *regs) { struct psmouse *psmouse = serio->private; @@ -186,12 +187,12 @@ static void psmouse_interrupt(struct ser break; } psmouse->acking = 0; - return; + goto out; } if (psmouse->cmdcnt) { psmouse->cmdbuf[--psmouse->cmdcnt] = data; - return; + goto out; } if (psmouse->pktcnt && time_after(jiffies, psmouse->last + HZ/2)) { @@ -205,13 +206,15 @@ static void psmouse_interrupt(struct ser if (psmouse->pktcnt == 3 + (psmouse->type >= PSMOUSE_GENPS)) { psmouse_process_packet(psmouse, regs); psmouse->pktcnt = 0; - return; + goto out; } if (psmouse->pktcnt == 1 && psmouse->packet[0] == PSMOUSE_RET_BAT) { serio_rescan(serio); - return; - } + goto out; + } +out: + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/input/mouse/sermouse.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/mouse/sermouse.c 2003-04-21 04:12:31.000000000 -0700 @@ -204,7 +204,8 @@ static void sermouse_process_ms(struct s * packets or passing them to the command routine as command output. */ -static void sermouse_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +static irqreturn_t sermouse_interrupt(struct serio *serio, + unsigned char data, unsigned int flags, struct pt_regs *regs) { struct sermouse *sermouse = serio->private; @@ -215,6 +216,7 @@ static void sermouse_interrupt(struct se sermouse_process_ms(sermouse, data, regs); else sermouse_process_msc(sermouse, data, regs); + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/input/serio/ct82c710.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/serio/ct82c710.c 2003-04-21 04:04:07.000000000 -0700 @@ -64,7 +64,7 @@ static char ct82c710_phys[16]; static int ct82c710_data; static int ct82c710_status; -static void ct82c710_interrupt(int cpl, void *dev_id, struct pt_regs * regs); +static irqreturn_t ct82c710_interrupt(int cpl, void *dev_id, struct pt_regs * regs); /* * Wait for device to send output char and flush any input char. @@ -154,9 +154,9 @@ static struct serio ct82c710_port = * is waiting in the 82C710. */ -static void ct82c710_interrupt(int cpl, void *dev_id, struct pt_regs * regs) +static irqreturn_t ct82c710_interrupt(int cpl, void *dev_id, struct pt_regs * regs) { - serio_interrupt(&ct82c710_port, inb(ct82c710_data), 0, regs); + return serio_interrupt(&ct82c710_port, inb(ct82c710_data), 0, regs); } /* --- linux-2.5.68/drivers/input/serio/i8042.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/input/serio/i8042.c 2003-04-21 00:31:39.000000000 -0700 @@ -74,7 +74,7 @@ static unsigned char i8042_unxlate_table 19, 25, 57, 81, 83, 92, 95, 98, 99,100,101,103,104,106,109,110 }; -static void i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs); /* * The i8042_wait_read() and i8042_wait_write functions wait for the i8042 to @@ -332,7 +332,7 @@ static char i8042_mux_phys[4][32]; * to the upper layers. */ -static void i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs) { unsigned long flags; unsigned char str, data; @@ -415,6 +415,8 @@ static void i8042_interrupt(int irq, voi serio_interrupt(&i8042_kbd_port, data, dfl, regs); } + /* FIXME - was it really ours? */ + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/input/serio/serio.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/serio/serio.c 2003-04-21 04:04:03.000000000 -0700 @@ -135,13 +135,20 @@ void serio_rescan(struct serio *serio) wake_up(&serio_wait); } -void serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) -{ - if (serio->dev && serio->dev->interrupt) - serio->dev->interrupt(serio, data, flags, regs); - else - if (!flags) +irqreturn_t serio_interrupt(struct serio *serio, + unsigned char data, unsigned int flags, struct pt_regs *regs) +{ + irqreturn_t ret = IRQ_NONE; + + if (serio->dev && serio->dev->interrupt) { + ret = serio->dev->interrupt(serio, data, flags, regs); + } else { + if (!flags) { serio_rescan(serio); + ret = IRQ_HANDLED; + } + } + return ret; } void serio_register_port(struct serio *serio) --- linux-2.5.68/drivers/input/touchscreen/gunze.c 2003-02-14 17:35:05.000000000 -0800 +++ 25/drivers/input/touchscreen/gunze.c 2003-04-21 04:11:22.000000000 -0700 @@ -78,7 +78,8 @@ static void gunze_process_packet(struct input_sync(dev); } -static void gunze_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +static irqreturn_t gunze_interrupt(struct serio *serio, + unsigned char data, unsigned int flags, struct pt_regs *regs) { struct gunze* gunze = serio->private; @@ -88,7 +89,8 @@ static void gunze_interrupt(struct serio } else { if (gunze->idx < GUNZE_MAX_LENGTH) gunze->data[gunze->idx++] = data; - } + } + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/input/tsdev.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/input/tsdev.c 2003-04-21 00:31:39.000000000 -0700 @@ -57,7 +57,6 @@ struct tsdev { wait_queue_head_t wait; struct list_head list; struct input_handle handle; - devfs_handle_t devfs; }; /* From Compaq's Touch Screen Specification version 0.2 (draft) */ @@ -115,6 +114,13 @@ static int tsdev_open(struct inode *inod return 0; } +static void tsdev_free(struct tsdev *tsdev) +{ + devfs_remove("input/ts%d", tsdev->minor); + tsdev_table[tsdev->minor] = NULL; + kfree(tsdev); +} + static int tsdev_release(struct inode *inode, struct file *file) { struct tsdev_list *list = file->private_data; @@ -123,13 +129,10 @@ static int tsdev_release(struct inode *i list_del(&list->node); if (!--list->tsdev->open) { - if (list->tsdev->exist) { + if (list->tsdev->exist) input_close_device(&list->tsdev->handle); - } else { - input_unregister_minor(list->tsdev->devfs); - tsdev_table[list->tsdev->minor] = NULL; - kfree(list->tsdev); - } + else + tsdev_free(list->tsdev); } kfree(list); return 0; @@ -325,8 +328,7 @@ static struct input_handle *tsdev_connec tsdev->handle.private = tsdev; tsdev_table[minor] = tsdev; - tsdev->devfs = - input_register_minor("input/ts%d", minor, TSDEV_MINOR_BASE); + input_register_minor("input/ts%d", minor, TSDEV_MINOR_BASE); return &tsdev->handle; @@ -341,11 +343,8 @@ static void tsdev_disconnect(struct inpu if (tsdev->open) { input_close_device(handle); wake_up_interruptible(&tsdev->wait); - } else { - input_unregister_minor(tsdev->devfs); - tsdev_table[tsdev->minor] = NULL; - kfree(tsdev); - } + } else + tsdev_free(tsdev); } static struct input_device_id tsdev_ids[] = { --- linux-2.5.68/drivers/isdn/act2000/act2000_isa.c 2003-01-16 18:22:04.000000000 -0800 +++ 25/drivers/isdn/act2000/act2000_isa.c 2003-04-21 03:58:37.000000000 -0700 @@ -69,7 +69,7 @@ act2000_isa_detect(unsigned short portba return ret; } -static void +static irqreturn_t act2000_isa_interrupt(int irq, void *dev_id, struct pt_regs *regs) { act2000_card *card = irq2card_map[irq]; @@ -78,7 +78,7 @@ act2000_isa_interrupt(int irq, void *dev if (!card) { printk(KERN_WARNING "act2000: Spurious interrupt!\n"); - return; + return IRQ_NONE; } istatus = (inb(ISA_PORT_ISR) & 0x07); if (istatus & ISA_ISR_OUT) { @@ -95,6 +95,7 @@ act2000_isa_interrupt(int irq, void *dev } if (istatus) printk(KERN_DEBUG "act2000: ?IRQ %d %02x\n", irq, istatus); + return IRQ_HANDLED; } static void --- linux-2.5.68/drivers/isdn/eicon/eicon.h 2003-02-10 12:24:14.000000000 -0800 +++ 25/drivers/isdn/eicon/eicon.h 2003-04-21 03:58:37.000000000 -0700 @@ -14,6 +14,8 @@ #ifndef eicon_h #define eicon_h +#include + #define EICON_IOCTL_SETMMIO 0 #define EICON_IOCTL_GETMMIO 1 #define EICON_IOCTL_SETIRQ 2 @@ -364,7 +366,7 @@ extern __inline__ void eicon_schedule_ac extern int eicon_addcard(int, int, int, char *, int); extern void eicon_io_transmit(eicon_card *card); -extern void eicon_irq(int irq, void *dev_id, struct pt_regs *regs); +extern irqreturn_t eicon_irq(int irq, void *dev_id, struct pt_regs *regs); extern void eicon_io_rcv_dispatch(eicon_card *ccard); extern void eicon_io_ack_dispatch(eicon_card *ccard); #ifdef CONFIG_MCA --- linux-2.5.68/drivers/isdn/eicon/eicon_idi.c 2003-03-04 20:02:36.000000000 -0800 +++ 25/drivers/isdn/eicon/eicon_idi.c 2003-04-21 03:58:37.000000000 -0700 @@ -3097,7 +3097,7 @@ eicon_idi_manage(eicon_card *card, eicon { int l = 0; int ret = 0; - int timeout; + unsigned long timeout; int i; struct sk_buff *skb; struct sk_buff *skb2; --- linux-2.5.68/drivers/isdn/eicon/eicon_io.c 2003-01-16 18:21:48.000000000 -0800 +++ 25/drivers/isdn/eicon/eicon_io.c 2003-04-21 03:58:37.000000000 -0700 @@ -501,7 +501,7 @@ eicon_io_transmit(eicon_card *ccard) { /* * IRQ handler */ -void +irqreturn_t eicon_irq(int irq, void *dev_id, struct pt_regs *regs) { eicon_card *ccard = (eicon_card *)dev_id; eicon_isa_card *isa_card; @@ -521,7 +521,7 @@ eicon_irq(int irq, void *dev_id, struct if (!ccard) { eicon_log(ccard, 1, "eicon_irq: spurious interrupt %d\n", irq); - return; + return IRQ_NONE; } if (ccard->type == EICON_CTYPE_QUADRO) { @@ -554,7 +554,7 @@ eicon_irq(int irq, void *dev_id, struct break; default: eicon_log(ccard, 1, "eicon_irq: unsupported card-type!\n"); - return; + return IRQ_NONE; } if (*irqprobe) { @@ -577,7 +577,7 @@ eicon_irq(int irq, void *dev_id, struct (*irqprobe)++; break; } - return; + return IRQ_HANDLED; } switch(ccard->type) { @@ -588,7 +588,7 @@ eicon_irq(int irq, void *dev_id, struct case EICON_CTYPE_S2M: if (!(readb(isa_card->intack))) { /* card did not interrupt */ eicon_log(ccard, 1, "eicon: IRQ: card reports no interrupt!\n"); - return; + return IRQ_NONE; } break; } @@ -744,6 +744,6 @@ eicon_irq(int irq, void *dev_id, struct break; } - return; + return IRQ_HANDLED; } #endif --- linux-2.5.68/drivers/isdn/eicon/linio.c 2003-01-16 18:21:48.000000000 -0800 +++ 25/drivers/isdn/eicon/linio.c 2003-04-21 03:58:37.000000000 -0700 @@ -36,7 +36,7 @@ ux_diva_card_t card_pool[MAX_CARDS]; void UxPause(long int ms) { - int timeout = jiffies + ((ms * HZ) / 1000); + unsigned long timeout = jiffies + ((ms * HZ) / 1000); while (time_before(jiffies, timeout)); } @@ -577,7 +577,7 @@ void UxCardIoOutBuffer(ux_diva_card_t *c return; } -void Divasintr(int arg, void *unused, struct pt_regs *unused_regs) +irqreturn_t Divasintr(int arg, void *unused, struct pt_regs *unused_regs) { int i; card_t *card = NULL; @@ -602,7 +602,7 @@ void Divasintr(int arg, void *unused, s } } - return; + return IRQ_HANDLED; } @@ -680,7 +680,7 @@ long UxCardLock(ux_diva_card_t *card) return flags; } -void UxCardUnlock(ux_diva_card_t *card, long ipl) +void UxCardUnlock(ux_diva_card_t *card, unsigned long ipl) { spin_unlock_irqrestore(&diva_lock, ipl); } --- linux-2.5.68/drivers/isdn/eicon/uxio.h 2003-01-16 18:21:38.000000000 -0800 +++ 25/drivers/isdn/eicon/uxio.h 2003-04-21 03:58:37.000000000 -0700 @@ -59,7 +59,7 @@ void UxCardHandleFree(ux_diva_card_t *ca */ long UxCardLock(ux_diva_card_t *card); -void UxCardUnlock(ux_diva_card_t *card, long ipl); +void UxCardUnlock(ux_diva_card_t *card, unsigned long ipl); /* * Set the mapping address for PCI cards --- linux-2.5.68/drivers/isdn/hardware/avm/avmcard.h 2003-01-16 18:22:43.000000000 -0800 +++ 25/drivers/isdn/hardware/avm/avmcard.h 2003-04-21 03:58:37.000000000 -0700 @@ -12,6 +12,7 @@ #include #include +#include #define AVMB1_PORTLEN 0x1f #define AVM_MAXVERSION 8 @@ -555,7 +556,7 @@ void b1_register_appl(struct capi_ctr *c void b1_release_appl(struct capi_ctr *ctrl, u16 appl); u16 b1_send_message(struct capi_ctr *ctrl, struct sk_buff *skb); void b1_parse_version(avmctrl_info *card); -void b1_interrupt(int interrupt, void *devptr, struct pt_regs *regs); +irqreturn_t b1_interrupt(int interrupt, void *devptr, struct pt_regs *regs); int b1ctl_read_proc(char *page, char **start, off_t off, int count, int *eof, struct capi_ctr *ctrl); @@ -568,7 +569,7 @@ void avmcard_dma_free(avmcard_dmainfo *) int b1pciv4_detect(avmcard *card); int t1pci_detect(avmcard *card); void b1dma_reset(avmcard *card); -void b1dma_interrupt(int interrupt, void *devptr, struct pt_regs *regs); +irqreturn_t b1dma_interrupt(int interrupt, void *devptr, struct pt_regs *regs); int b1dma_load_firmware(struct capi_ctr *ctrl, capiloaddata *data); void b1dma_reset_ctr(struct capi_ctr *ctrl); --- linux-2.5.68/drivers/isdn/hardware/avm/b1.c 2003-01-16 18:22:42.000000000 -0800 +++ 25/drivers/isdn/hardware/avm/b1.c 2003-04-21 03:58:37.000000000 -0700 @@ -491,7 +491,7 @@ void b1_parse_version(avmctrl_info *cinf /* ------------------------------------------------------------- */ -void b1_interrupt(int interrupt, void *devptr, struct pt_regs *regs) +irqreturn_t b1_interrupt(int interrupt, void *devptr, struct pt_regs *regs) { avmcard *card = devptr; avmctrl_info *cinfo = &card->ctrlinfo[0]; @@ -506,7 +506,7 @@ void b1_interrupt(int interrupt, void *d unsigned WindowSize; if (!b1_rx_full(card->port)) - return; + return IRQ_NONE; b1cmd = b1_get_byte(card->port); @@ -619,12 +619,13 @@ void b1_interrupt(int interrupt, void *d case 0xff: printk(KERN_ERR "%s: card removed ?\n", card->name); - return; + return IRQ_NONE; default: printk(KERN_ERR "%s: b1_interrupt: 0x%x ???\n", card->name, b1cmd); - return; + return IRQ_HANDLED; } + return IRQ_HANDLED; } /* ------------------------------------------------------------- */ --- linux-2.5.68/drivers/isdn/hardware/avm/b1dma.c 2003-01-16 18:22:23.000000000 -0800 +++ 25/drivers/isdn/hardware/avm/b1dma.c 2003-04-21 03:58:37.000000000 -0700 @@ -618,11 +618,12 @@ static void b1dma_handle_interrupt(avmca spin_unlock(&card->lock); } -void b1dma_interrupt(int interrupt, void *devptr, struct pt_regs *regs) +irqreturn_t b1dma_interrupt(int interrupt, void *devptr, struct pt_regs *regs) { avmcard *card = devptr; b1dma_handle_interrupt(card); + return IRQ_HANDLED; } /* ------------------------------------------------------------- */ --- linux-2.5.68/drivers/isdn/hardware/avm/c4.c 2003-01-16 18:22:16.000000000 -0800 +++ 25/drivers/isdn/hardware/avm/c4.c 2003-04-21 03:58:37.000000000 -0700 @@ -659,7 +659,7 @@ static void c4_handle_rx(avmcard *card) /* ------------------------------------------------------------- */ -static void c4_handle_interrupt(avmcard *card) +static irqreturn_t c4_handle_interrupt(avmcard *card) { u32 status = c4inmeml(card->mbase+DOORBELL); @@ -667,7 +667,7 @@ static void c4_handle_interrupt(avmcard int i; c4outmeml(card->mbase+PCI_OUT_INT_MASK, 0x0c); if (card->nlogcontr == 0) - return; + return IRQ_HANDLED; printk(KERN_ERR "%s: unexpected reset\n", card->name); for (i=0; i < card->nr_controllers; i++) { avmctrl_info *cinfo = &card->ctrlinfo[i]; @@ -676,12 +676,12 @@ static void c4_handle_interrupt(avmcard capi_ctr_reseted(&cinfo->capi_ctrl); } card->nlogcontr = 0; - return; + return IRQ_HANDLED; } status &= (DBELL_UP_HOST | DBELL_DOWN_HOST); if (!status) - return; + return IRQ_HANDLED; c4outmeml(card->mbase+DOORBELL, status); if ((status & DBELL_UP_HOST) != 0) { @@ -702,13 +702,14 @@ static void c4_handle_interrupt(avmcard c4_dispatch_tx(card); } } + return IRQ_HANDLED; } -static void c4_interrupt(int interrupt, void *devptr, struct pt_regs *regs) +static irqreturn_t c4_interrupt(int interrupt, void *devptr, struct pt_regs *regs) { avmcard *card = devptr; - c4_handle_interrupt(card); + return c4_handle_interrupt(card); } /* ------------------------------------------------------------- */ --- linux-2.5.68/drivers/isdn/hardware/avm/t1isa.c 2003-01-16 18:22:18.000000000 -0800 +++ 25/drivers/isdn/hardware/avm/t1isa.c 2003-04-21 03:58:37.000000000 -0700 @@ -124,7 +124,7 @@ static int t1_detectandinit(unsigned int return 0; } -static void t1isa_interrupt(int interrupt, void *devptr, struct pt_regs *regs) +static irqreturn_t t1isa_interrupt(int interrupt, void *devptr, struct pt_regs *regs) { avmcard *card = devptr; avmctrl_info *cinfo = &card->ctrlinfo[0]; @@ -252,13 +252,14 @@ static void t1isa_interrupt(int interrup case 0xff: printk(KERN_ERR "%s: card reseted ?\n", card->name); - return; + return IRQ_HANDLED; default: printk(KERN_ERR "%s: b1_interrupt: 0x%x ???\n", card->name, b1cmd); - return; + return IRQ_NONE; } } + return IRQ_HANDLED; } /* ------------------------------------------------------------- */ --- linux-2.5.68/drivers/isdn/hisax/avm_a1.c 2003-03-17 14:56:01.000000000 -0800 +++ 25/drivers/isdn/hisax/avm_a1.c 2003-04-21 03:58:37.000000000 -0700 @@ -113,14 +113,16 @@ static struct bc_hw_ops hscx_ops = { .write_fifo = hscx_write_fifo, }; -static void +static irqreturn_t avm_a1_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; u8 val, sval; + int handled = 0; spin_lock(&cs->lock); while (((sval = bytein(cs->hw.avm.cfg_reg)) & 0xf) != 0x7) { + handled = 1; if (!(sval & AVM_A1_STAT_TIMER)) { byteout(cs->hw.avm.cfg_reg, 0x1E); sval = bytein(cs->hw.avm.cfg_reg); @@ -144,6 +146,7 @@ avm_a1_interrupt(int intno, void *dev_id hscx_write(cs, 0, HSCX_MASK, 0x0); hscx_write(cs, 1, HSCX_MASK, 0x0); spin_unlock(&cs->lock); + return IRQ_RETVAL(handled); } static void --- linux-2.5.68/drivers/isdn/hisax/avm_a1p.c 2003-03-17 14:56:01.000000000 -0800 +++ 25/drivers/isdn/hisax/avm_a1p.c 2003-04-21 03:58:37.000000000 -0700 @@ -159,7 +159,7 @@ static struct bc_hw_ops hscx_ops = { .write_fifo = hscx_write_fifo, }; -static void +static irqreturn_t avm_a1p_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -187,6 +187,7 @@ avm_a1p_interrupt(int intno, void *dev_i hscx_write(cs, 0, HSCX_MASK, 0x0); hscx_write(cs, 1, HSCX_MASK, 0x0); spin_unlock(&cs->lock); + return IRQ_HANDLED; } static void --- linux-2.5.68/drivers/isdn/hisax/bkm_a4t.c 2003-03-17 14:56:01.000000000 -0800 +++ 25/drivers/isdn/hisax/bkm_a4t.c 2003-04-21 03:58:37.000000000 -0700 @@ -137,18 +137,20 @@ static struct bc_hw_ops jade_ops = { .write_fifo = jade_write_fifo, }; -static void +static irqreturn_t bkm_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; u8 val = 0; I20_REGISTER_FILE *pI20_Regs; + int handled = 0; spin_lock(&cs->lock); pI20_Regs = (I20_REGISTER_FILE *) (cs->hw.ax.base); /* ISDN interrupt pending? */ if (pI20_Regs->i20IntStatus & intISDN) { + handled = 1; /* Reset the ISDN interrupt */ pI20_Regs->i20IntStatus = intISDN; /* Disable ISDN interrupt */ @@ -172,6 +174,7 @@ bkm_interrupt(int intno, void *dev_id, s pI20_Regs->i20IntCtrl |= intISDN; } spin_unlock(&cs->lock); + return IRQ_RETVAL(handled); } static void --- linux-2.5.68/drivers/isdn/hisax/diva.c 2003-03-17 14:56:01.000000000 -0800 +++ 25/drivers/isdn/hisax/diva.c 2003-04-21 03:58:37.000000000 -0700 @@ -319,7 +319,7 @@ static struct bc_hw_ops ipacx_bc_ops = { .read_fifo = ipacx_bc_read_fifo, }; -static void +static irqreturn_t diva_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -331,9 +331,10 @@ diva_interrupt(int intno, void *dev_id, } if (!cnt) printk(KERN_WARNING "Diva: IRQ LOOP\n"); + return IRQ_HANDLED; } -static void +static irqreturn_t diva_ipac_pci_irq(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -341,22 +342,24 @@ diva_ipac_pci_irq(int intno, void *dev_i val = readb(cs->hw.diva.pci_cfg); if (!(val & PITA_INT0_STATUS)) - return; /* other shared IRQ */ + return IRQ_NONE; /* other shared IRQ */ writeb(PITA_INT0_STATUS, cs->hw.diva.pci_cfg); /* Reset pending INT0 */ - ipac_irq(intno, dev_id, regs); + return ipac_irq(intno, dev_id, regs); } -static void +static irqreturn_t diva_ipacx_pci_irq(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; u8 val; val = readb(cs->hw.diva.pci_cfg); - if (!(val &PITA_INT0_STATUS)) return; // other shared IRQ + if (!(val &PITA_INT0_STATUS)) + return IRQ_NONE; // other shared IRQ interrupt_ipacx(cs); // handler for chip writeb(PITA_INT0_STATUS, cs->hw.diva.pci_cfg); // Reset PLX interrupt + return IRQ_HANDLED; } static void --- linux-2.5.68/drivers/isdn/hisax/elsa.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/elsa.c 2003-04-21 03:58:37.000000000 -0700 @@ -307,7 +307,7 @@ TimerRun(struct IsdnCardState *cs) return (v & ELSA_TIMER_RUN); } -static void +static irqreturn_t elsa_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -317,7 +317,7 @@ elsa_interrupt(int intno, void *dev_id, /* The card tends to generate interrupts while being removed causing us to just crash the kernel. bad. */ printk(KERN_WARNING "Elsa: card not available!\n"); - return; + return IRQ_NONE; } #if ARCOFI_USE if (cs->hw.elsa.MFlag) { @@ -351,9 +351,10 @@ elsa_interrupt(int intno, void *dev_id, #endif if (cs->hw.elsa.trig) byteout(cs->hw.elsa.trig, 0x00); + return IRQ_HANDLED; } -static void +static irqreturn_t elsa_interrupt_ipac(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -361,13 +362,13 @@ elsa_interrupt_ipac(int intno, void *dev if (!cs) { printk(KERN_WARNING "Elsa: Spurious interrupt!\n"); - return; + return IRQ_NONE; } if (cs->subtyp == ELSA_QS1000PCI || cs->subtyp == ELSA_QS3000PCI) { val = bytein(cs->hw.elsa.cfg + 0x4c); /* PCI IRQ */ if (!test_bit(FLG_BUGGY_PLX9050, &cs->HW_Flags) && !(val & ELSA_PCI_IRQ_MASK)) - return; + return IRQ_NONE; } #if ARCOFI_USE if (cs->hw.elsa.MFlag) { @@ -380,7 +381,7 @@ elsa_interrupt_ipac(int intno, void *dev } } #endif - ipac_irq(intno, dev_id, regs); + return ipac_irq(intno, dev_id, regs); } static void --- linux-2.5.68/drivers/isdn/hisax/enternow_pci.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/enternow_pci.c 2003-04-21 03:58:37.000000000 -0700 @@ -208,7 +208,7 @@ enpci_reset(struct IsdnCardState *cs) return 0; } -static void +static irqreturn_t enpci_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -253,6 +253,7 @@ enpci_interrupt(int intno, void *dev_id, write_tiger(cs); } spin_unlock(&cs->lock); + return IRQ_HANDLED; } static struct card_ops enpci_ops = { --- linux-2.5.68/drivers/isdn/hisax/hfc_pci.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/hfc_pci.c 2003-04-21 03:58:37.000000000 -0700 @@ -869,7 +869,7 @@ receive_emsg(struct IsdnCardState *cs) /*********************/ /* Interrupt handler */ /*********************/ -static void +static irqreturn_t hfcpci_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -880,17 +880,17 @@ hfcpci_interrupt(int intno, void *dev_id if (!cs) { printk(KERN_WARNING "HFC-PCI: Spurious interrupt!\n"); - return; + return IRQ_NONE; } if (!(cs->hw.hfcpci.int_m2 & 0x08)) - return; /* not initialised */ + return IRQ_NONE; /* not initialised */ if (HFCPCI_ANYINT & (stat = Read_hfc(cs, HFCPCI_STATUS))) { val = Read_hfc(cs, HFCPCI_INT_S1); if (cs->debug & L1_DEB_ISAC) debugl1(cs, "HFC-PCI: stat(%02x) s1(%02x)", stat, val); } else - return; + return IRQ_NONE; if (cs->debug & L1_DEB_ISAC) debugl1(cs, "HFC-PCI irq %x", val); @@ -964,6 +964,7 @@ hfcpci_interrupt(int intno, void *dev_id } else val = 0; } + return IRQ_HANDLED; } /********************************************************************/ --- linux-2.5.68/drivers/isdn/hisax/hfcscard.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/hfcscard.c 2003-04-21 03:58:37.000000000 -0700 @@ -32,7 +32,7 @@ hfcs_write_reg(struct IsdnCardState *cs, cs->bc_hw_ops->write_reg(cs, data, reg, val); } -static void +static irqreturn_t hfcs_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -40,7 +40,7 @@ hfcs_interrupt(int intno, void *dev_id, if (!cs) { printk(KERN_WARNING "HFCS: Spurious interrupt!\n"); - return; + return IRQ_NONE; } if ((HFCD_ANYINT | HFCD_BUSY_NBUSY) & (stat = hfcs_read_reg(cs, HFCD_DATA, HFCD_STAT))) { @@ -52,6 +52,7 @@ hfcs_interrupt(int intno, void *dev_id, if (cs->debug & L1_DEB_ISAC) debugl1(cs, "HFCS: irq_no_irq stat(%02x)", stat); } + return IRQ_HANDLED; } static void --- linux-2.5.68/drivers/isdn/hisax/hfc_sx.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/isdn/hisax/hfc_sx.c 2003-04-21 03:58:37.000000000 -0700 @@ -661,7 +661,7 @@ receive_emsg(struct IsdnCardState *cs) /*********************/ /* Interrupt handler */ /*********************/ -static void +static irqreturn_t hfcsx_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -672,17 +672,17 @@ hfcsx_interrupt(int intno, void *dev_id, if (!cs) { printk(KERN_WARNING "HFC-SX: Spurious interrupt!\n"); - return; + return IRQ_NONE; } if (!(cs->hw.hfcsx.int_m2 & 0x08)) - return; /* not initialised */ + return IRQ_NONE; /* not initialised */ if (HFCSX_ANYINT & (stat = Read_hfc(cs, HFCSX_STATUS))) { val = Read_hfc(cs, HFCSX_INT_S1); if (cs->debug & L1_DEB_ISAC) debugl1(cs, "HFC-SX: stat(%02x) s1(%02x)", stat, val); } else - return; + return IRQ_NONE; if (cs->debug & L1_DEB_ISAC) debugl1(cs, "HFC-SX irq %x", val); @@ -756,6 +756,7 @@ hfcsx_interrupt(int intno, void *dev_id, } else val = 0; } + return IRQ_HANDLED; } /********************************************************************/ --- linux-2.5.68/drivers/isdn/hisax/hisax_fcclassic.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/hisax_fcclassic.c 2003-04-21 03:58:37.000000000 -0700 @@ -120,7 +120,7 @@ fcclassic_write_hscx_fifo(struct hscx *h // ---------------------------------------------------------------------- -static void +static irqreturn_t fcclassic_irq(int intno, void *dev, struct pt_regs *regs) { struct fritz_adapter *adapter = dev; @@ -139,6 +139,7 @@ fcclassic_irq(int intno, void *dev, stru isac_irq(&adapter->isac); } } + return IRQ_HANDLED; } // ---------------------------------------------------------------------- --- linux-2.5.68/drivers/isdn/hisax/hisax_fcpcipnp.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/isdn/hisax/hisax_fcpcipnp.c 2003-04-21 03:58:37.000000000 -0700 @@ -629,7 +629,7 @@ static void fritz_b_l2l1(struct hisax_if // ---------------------------------------------------------------------- -static void fcpci2_irq(int intno, void *dev, struct pt_regs *regs) +static irqreturn_t fcpci2_irq(int intno, void *dev, struct pt_regs *regs) { struct fritz_adapter *adapter = dev; unsigned char val; @@ -637,16 +637,17 @@ static void fcpci2_irq(int intno, void * val = inb(adapter->io + AVM_STATUS0); if (!(val & AVM_STATUS0_IRQ_MASK)) /* hopefully a shared IRQ reqest */ - return; + return IRQ_NONE; DBG(2, "STATUS0 %#x", val); if (val & AVM_STATUS0_IRQ_ISAC) isacsx_irq(&adapter->isac); if (val & AVM_STATUS0_IRQ_HDLC) hdlc_irq(adapter); + return IRQ_HANDLED; } -static void fcpci_irq(int intno, void *dev, struct pt_regs *regs) +static irqreturn_t fcpci_irq(int intno, void *dev, struct pt_regs *regs) { struct fritz_adapter *adapter = dev; unsigned char sval; @@ -654,13 +655,14 @@ static void fcpci_irq(int intno, void *d sval = inb(adapter->io + 2); if ((sval & AVM_STATUS0_IRQ_MASK) == AVM_STATUS0_IRQ_MASK) /* possibly a shared IRQ reqest */ - return; + return IRQ_NONE; DBG(2, "sval %#x", sval); if (!(sval & AVM_STATUS0_IRQ_ISAC)) isac_irq(&adapter->isac); if (!(sval & AVM_STATUS0_IRQ_HDLC)) hdlc_irq(adapter); + return IRQ_HANDLED; } // ---------------------------------------------------------------------- --- linux-2.5.68/drivers/isdn/hisax/hisax.h 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/hisax.h 2003-04-21 03:58:37.000000000 -0700 @@ -28,6 +28,7 @@ #include #include #include +#include #define ERROR_STATISTIC @@ -886,7 +887,7 @@ struct card_ops { void (*release) (struct IsdnCardState *); void (*aux_ind) (struct IsdnCardState *, void *); void (*led_handler)(struct IsdnCardState *); - void (*irq_func) (int, void *, struct pt_regs *); + irqreturn_t (*irq_func) (int, void *, struct pt_regs *); }; /* Card specific drivers provide methods to access the --- linux-2.5.68/drivers/isdn/hisax/hisax_hfcpci.c 2003-01-16 18:22:00.000000000 -0800 +++ 25/drivers/isdn/hisax/hisax_hfcpci.c 2003-04-21 03:58:37.000000000 -0700 @@ -1321,7 +1321,7 @@ hfcpci_timer_irq(struct hfcpci_adapter * // ---------------------------------------------------------------------- // IRQ handler -static void +static irqreturn_t hfcpci_irq(int intno, void *dev, struct pt_regs *regs) { struct hfcpci_adapter *adapter = dev; @@ -1329,11 +1329,11 @@ hfcpci_irq(int intno, void *dev, struct u8 val, stat; if (!(adapter->int_m2 & 0x08)) - return; /* not initialised */ // XX + return IRQ_NONE; /* not initialised */ // XX stat = hfcpci_readb(adapter, HFCPCI_STATUS); if (!(stat & HFCPCI_ANYINT)) - return; + return IRQ_NONE; spin_lock(&adapter->hw_lock); while (loop-- > 0) { @@ -1369,6 +1369,7 @@ hfcpci_irq(int intno, void *dev, struct hfcpci_timer_irq(adapter); } spin_unlock(&adapter->hw_lock); + return IRQ_HANDLED; } // ---------------------------------------------------------------------- --- linux-2.5.68/drivers/isdn/hisax/hscx.h 2003-01-16 18:22:21.000000000 -0800 +++ 25/drivers/isdn/hisax/hscx.h 2003-04-21 03:58:37.000000000 -0700 @@ -10,6 +10,8 @@ * */ +#include + /* All Registers original Siemens Spec */ #define HSCX_ISTA 0x20 @@ -37,7 +39,7 @@ extern void modehscx(struct BCState *bcs, int mode, int bc); extern void inithscxisac(struct IsdnCardState *cs); extern void hscx_int_main(struct IsdnCardState *cs, u8 val); -extern void hscxisac_irq(int intno, void *dev_id, struct pt_regs *regs); +extern irqreturn_t hscxisac_irq(int intno, void *dev_id, struct pt_regs *regs); extern int hscxisac_setup(struct IsdnCardState *cs, struct dc_hw_ops *isac_ops, struct bc_hw_ops *hscx_ops); --- linux-2.5.68/drivers/isdn/hisax/hscx_irq.c 2003-01-16 18:22:50.000000000 -0800 +++ 25/drivers/isdn/hisax/hscx_irq.c 2003-04-21 03:58:37.000000000 -0700 @@ -185,7 +185,7 @@ isac_write(struct IsdnCardState *cs, u8 cs->dc_hw_ops->write_reg(cs, addr, val); } -void +irqreturn_t hscxisac_irq(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -221,5 +221,6 @@ hscxisac_irq(int intno, void *dev_id, st hscx_write(&cs->bcs[0], HSCX_MASK, 0x0); hscx_write(&cs->bcs[1], HSCX_MASK, 0x0); spin_unlock(&cs->lock); + return IRQ_HANDLED; } --- linux-2.5.68/drivers/isdn/hisax/ipac.c 2003-01-16 18:21:37.000000000 -0800 +++ 25/drivers/isdn/hisax/ipac.c 2003-04-21 03:58:37.000000000 -0700 @@ -47,7 +47,7 @@ ipac_init(struct IsdnCardState *cs) inithscxisac(cs); } -void +irqreturn_t ipac_irq(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -90,6 +90,7 @@ Start_IPAC: ipac_write(cs, IPAC_MASK, 0xFF); ipac_write(cs, IPAC_MASK, 0xC0); spin_unlock(&cs->lock); + return IRQ_HANDLED; } int @@ -102,4 +103,5 @@ ipac_setup(struct IsdnCardState *cs, str cs->bc_hw_ops = ipac_bc_ops; val = ipac_read(cs, IPAC_ID); printk(KERN_INFO "HiSax: IPAC version %#x\n", val); + return 0; } --- linux-2.5.68/drivers/isdn/hisax/ipac.h 2003-01-16 18:22:44.000000000 -0800 +++ 25/drivers/isdn/hisax/ipac.h 2003-04-21 03:58:37.000000000 -0700 @@ -10,6 +10,8 @@ * */ +#include + /* All Registers original Siemens Spec */ #define IPAC_CONF 0xC0 @@ -29,7 +31,7 @@ #define IPAC_TIMR2 0xCC void ipac_init(struct IsdnCardState *cs); -void ipac_irq(int intno, void *dev_id, struct pt_regs *regs); +irqreturn_t ipac_irq(int intno, void *dev_id, struct pt_regs *regs); int ipac_setup(struct IsdnCardState *cs, struct dc_hw_ops *ipac_dc_ops, struct bc_hw_ops *ipac_bc_ops); --- linux-2.5.68/drivers/isdn/hisax/niccy.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/niccy.c 2003-04-21 03:58:37.000000000 -0700 @@ -151,7 +151,7 @@ static struct bc_hw_ops hscx_ops = { .write_fifo = hscx_write_fifo, }; -static void +static irqreturn_t niccy_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -160,10 +160,10 @@ niccy_interrupt(int intno, void *dev_id, int ival; ival = inl(cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG); if (!(ival & PCI_IRQ_ASSERT)) /* IRQ not for us (shared) */ - return; + return IRQ_NONE; outl(ival, cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG); } - hscxisac_irq(intno, dev_id, regs); + return hscxisac_irq(intno, dev_id, regs); } void --- linux-2.5.68/drivers/isdn/hisax/nj_s.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/nj_s.c 2003-04-21 03:58:37.000000000 -0700 @@ -17,7 +17,7 @@ const char *NETjet_S_revision = "$Revision: 2.7.6.6 $"; -static void +static irqreturn_t nj_s_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -70,6 +70,7 @@ nj_s_interrupt(int intno, void *dev_id, } */ spin_unlock(&cs->lock); + return IRQ_HANDLED; } static int --- linux-2.5.68/drivers/isdn/hisax/nj_u.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/nj_u.c 2003-04-21 03:58:37.000000000 -0700 @@ -17,7 +17,7 @@ const char *NETjet_U_revision = "$Revision: 2.8.6.6 $"; -static void +static irqreturn_t nj_u_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -70,6 +70,7 @@ nj_u_interrupt(int intno, void *dev_id, } */ spin_unlock(&cs->lock); + return IRQ_HANDLED; } static int --- linux-2.5.68/drivers/isdn/hisax/saphir.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/saphir.c 2003-04-21 03:58:37.000000000 -0700 @@ -132,13 +132,15 @@ static struct bc_hw_ops hscx_ops = { .write_fifo = hscx_write_fifo, }; -static void +static irqreturn_t saphir_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; + irqreturn_t ret; - hscxisac_irq(intno, dev_id, regs); + ret = hscxisac_irq(intno, dev_id, regs); mod_timer(&cs->hw.saphir.timer, jiffies+1*HZ); + return ret; } static void --- linux-2.5.68/drivers/isdn/hisax/sedlbauer.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/sedlbauer.c 2003-04-21 03:58:37.000000000 -0700 @@ -283,7 +283,7 @@ static struct bc_hw_ops isar_ops = { .write_reg = isar_write, }; -static void +static irqreturn_t sedlbauer_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -292,12 +292,12 @@ sedlbauer_interrupt(int intno, void *dev /* The card tends to generate interrupts while being removed causing us to just crash the kernel. bad. */ printk(KERN_WARNING "Sedlbauer: card not available!\n"); - return; + return IRQ_NONE; } - hscxisac_irq(intno, dev_id, regs); + return hscxisac_irq(intno, dev_id, regs); } -static void +static irqreturn_t sedlbauer_isar_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -334,6 +334,7 @@ sedlbauer_isar_interrupt(int intno, void isac_write(cs, ISAC_MASK, 0x0); isar_write(cs, 0, ISAR_IRQBIT, ISAR_IRQMSK); spin_unlock(&cs->lock); + return IRQ_HANDLED; } static int --- linux-2.5.68/drivers/isdn/hisax/sportster.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/sportster.c 2003-04-21 03:58:37.000000000 -0700 @@ -111,13 +111,14 @@ static struct bc_hw_ops hscx_ops = { .write_fifo = hscx_write_fifo, }; -static void +static irqreturn_t sportster_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; hscxisac_irq(intno, dev_id, regs); bytein(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ +1); + return IRQ_HANDLED; } static void --- linux-2.5.68/drivers/isdn/hisax/teleint.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/teleint.c 2003-04-21 03:58:37.000000000 -0700 @@ -178,7 +178,7 @@ static struct bc_hw_ops hfc_ops = { .write_reg = WriteHFC, }; -static void +static irqreturn_t teleint_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -198,6 +198,7 @@ teleint_interrupt(int intno, void *dev_i writereg(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, ISAC_MASK, 0xFF); writereg(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, ISAC_MASK, 0x0); spin_unlock(&cs->lock); + return IRQ_HANDLED; } static void --- linux-2.5.68/drivers/isdn/hisax/telespci.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/telespci.c 2003-04-21 03:58:37.000000000 -0700 @@ -199,7 +199,7 @@ static struct bc_hw_ops hscx_ops = { .write_fifo = hscx_write_fifo, }; -static void +static irqreturn_t telespci_interrupt(int intno, void *dev_id, struct pt_regs *regs) { #define MAXCOUNT 20 @@ -223,6 +223,7 @@ telespci_interrupt(int intno, void *dev_ hscx_write(cs, 0, HSCX_MASK, 0x0); hscx_write(cs, 1, HSCX_MASK, 0x0); spin_unlock(&cs->lock); + return IRQ_HANDLED; } static struct card_ops telespci_ops = { --- linux-2.5.68/drivers/isdn/hisax/w6692.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/isdn/hisax/w6692.c 2003-04-21 03:58:37.000000000 -0700 @@ -287,7 +287,7 @@ W6692B_interrupt(struct IsdnCardState *c } } -static void +static irqreturn_t w6692_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; @@ -395,6 +395,7 @@ w6692_interrupt(int intno, void *dev_id, w6692_write_reg(cs, W_IMASK, 0xff); } spin_unlock(&cs->lock); + return IRQ_HANDLED; } static void --- linux-2.5.68/drivers/isdn/hysdn/boardergo.c 2003-01-16 18:22:14.000000000 -0800 +++ 25/drivers/isdn/hysdn/boardergo.c 2003-04-21 03:58:37.000000000 -0700 @@ -32,7 +32,7 @@ /***************************************************/ /* The cards interrupt handler. Called from system */ /***************************************************/ -static void +static irqreturn_t ergo_interrupt(int intno, void *dev_id, struct pt_regs *regs) { hysdn_card *card = dev_id; /* parameter from irq */ @@ -41,16 +41,16 @@ ergo_interrupt(int intno, void *dev_id, uchar volatile b; if (!card) - return; /* error -> spurious interrupt */ + return IRQ_NONE; /* error -> spurious interrupt */ if (!card->irq_enabled) - return; /* other device interrupting or irq switched off */ + return IRQ_NONE; /* other device interrupting or irq switched off */ save_flags(flags); cli(); /* no further irqs allowed */ if (!(bytein(card->iobase + PCI9050_INTR_REG) & PCI9050_INTR_REG_STAT1)) { restore_flags(flags); /* restore old state */ - return; /* no interrupt requested by E1 */ + return IRQ_NONE; /* no interrupt requested by E1 */ } /* clear any pending ints on the board */ dpr = card->dpram; @@ -62,6 +62,7 @@ ergo_interrupt(int intno, void *dev_id, if (!card->hw_lock) schedule_work(&card->irq_queue); restore_flags(flags); + return IRQ_HANDLED; } /* ergo_interrupt */ /******************************************************************************/ --- linux-2.5.68/drivers/isdn/pcbit/layer2.c 2003-01-16 18:22:26.000000000 -0800 +++ 25/drivers/isdn/pcbit/layer2.c 2003-04-21 03:58:37.000000000 -0700 @@ -524,7 +524,7 @@ pcbit_firmware_bug(struct pcbit_dev *dev } } -void +irqreturn_t pcbit_irq_handler(int interrupt, void *devptr, struct pt_regs *regs) { struct pcbit_dev *dev; @@ -536,11 +536,11 @@ pcbit_irq_handler(int interrupt, void *d if (!dev) { printk(KERN_WARNING "pcbit_irq_handler: wrong device\n"); - return; + return IRQ_NONE; } if (dev->interrupt) { printk(KERN_DEBUG "pcbit: reentering interrupt hander\n"); - return; + return IRQ_HANDLED; } dev->interrupt = 1; @@ -549,7 +549,7 @@ pcbit_irq_handler(int interrupt, void *d if (dev->l2_state == L2_STARTING || dev->l2_state == L2_ERROR) { pcbit_l2_active_conf(dev, info); dev->interrupt = 0; - return; + return IRQ_HANDLED; } if (info & 0x40U) { /* E bit set */ #ifdef DEBUG @@ -557,11 +557,11 @@ pcbit_irq_handler(int interrupt, void *d #endif pcbit_l2_error(dev); dev->interrupt = 0; - return; + return IRQ_HANDLED; } if (dev->l2_state != L2_RUNNING && dev->l2_state != L2_LOADING) { dev->interrupt = 0; - return; + return IRQ_HANDLED; } ack_seq = (info >> 3) & 0x07U; read_seq = (info & 0x07U); @@ -582,6 +582,7 @@ pcbit_irq_handler(int interrupt, void *d info |= dev->send_seq; writeb(info, dev->sh_mem + BANK4); + return IRQ_HANDLED; } --- linux-2.5.68/drivers/isdn/pcbit/layer2.h 2003-01-16 18:21:39.000000000 -0800 +++ 25/drivers/isdn/pcbit/layer2.h 2003-04-21 03:58:37.000000000 -0700 @@ -17,6 +17,8 @@ #ifndef LAYER2_H #define LAYER2_H +#include + #include #define BANK1 0x0000U /* PC -> Board */ @@ -122,7 +124,7 @@ struct frame_buf { extern int pcbit_l2_write(struct pcbit_dev * dev, ulong msg, ushort refnum, struct sk_buff *skb, unsigned short hdr_len); -extern void pcbit_irq_handler(int interrupt, void *, struct pt_regs *regs); +extern irqreturn_t pcbit_irq_handler(int interrupt, void *, struct pt_regs *regs); extern struct pcbit_dev * dev_pcbit[MAX_PCBIT_CARDS]; --- linux-2.5.68/drivers/isdn/sc/init.c 2003-01-16 18:22:24.000000000 -0800 +++ 25/drivers/isdn/sc/init.c 2003-04-21 03:58:37.000000000 -0700 @@ -36,7 +36,7 @@ static int do_reset = 0; static int sup_irq[] = { 11, 10, 9, 5, 12, 14, 7, 3, 4, 6 }; #define MAX_IRQS 10 -extern void interrupt_handler(int, void *, struct pt_regs *); +extern irqreturn_t interrupt_handler(int, void *, struct pt_regs *); extern int sndpkt(int, int, int, struct sk_buff *); extern int command(isdn_ctrl *); extern int indicate_status(int, int, ulong, char*); --- linux-2.5.68/drivers/isdn/sc/interrupt.c 2003-01-16 18:22:22.000000000 -0800 +++ 25/drivers/isdn/sc/interrupt.c 2003-04-21 03:58:37.000000000 -0700 @@ -19,6 +19,7 @@ #include "hardware.h" #include "message.h" #include "card.h" +#include extern int indicate_status(int, int, ulong, char *); extern void check_phystat(unsigned long); @@ -44,7 +45,8 @@ int get_card_from_irq(int irq) /* * */ -void interrupt_handler(int interrupt, void * cardptr, struct pt_regs *regs ) { +irqreturn_t interrupt_handler(int interrupt, void *cardptr, struct pt_regs *regs) +{ RspMessage rcvmsg; int channel; @@ -54,7 +56,7 @@ void interrupt_handler(int interrupt, vo if(!IS_VALID_CARD(card)) { pr_debug("Invalid param: %d is not a valid card id\n", card); - return; + return IRQ_NONE; } pr_debug("%s: Entered Interrupt handler\n", adapter[card]->devicename); @@ -242,4 +244,5 @@ void interrupt_handler(int interrupt, vo } /* while */ pr_debug("%s: Exiting Interrupt Handler\n", adapter[card]->devicename); + return IRQ_HANDLED; } --- linux-2.5.68/drivers/isdn/tpam/tpam_commands.c 2003-03-04 20:02:36.000000000 -0800 +++ 25/drivers/isdn/tpam/tpam_commands.c 2003-04-21 03:58:37.000000000 -0700 @@ -173,7 +173,8 @@ static int tpam_command_ioctl_dspsave(tp * Return: 0 if OK, <0 on errors. */ static int tpam_command_ioctl_dsprun(tpam_card *card) { - u32 signature = 0, timeout, i; + u32 signature = 0, i; + unsigned long timeout; isdn_ctrl ctrl; struct sk_buff *skb; --- linux-2.5.68/drivers/isdn/tpam/tpam.h 2003-01-16 18:21:41.000000000 -0800 +++ 25/drivers/isdn/tpam/tpam.h 2003-04-21 03:58:37.000000000 -0700 @@ -17,6 +17,7 @@ #include #include #include +#include /* Maximum number of channels for this board */ #define TPAM_NBCHANNEL 30 @@ -197,7 +198,7 @@ extern int parse_U3DataInd(struct sk_buf /* Function prototypes from tpam_queues.c */ extern void tpam_enqueue(tpam_card *, struct sk_buff *); extern void tpam_enqueue_data(tpam_channel *, struct sk_buff *); -extern void tpam_irq(int, void *, struct pt_regs *); +extern irqreturn_t tpam_irq(int, void *, struct pt_regs *); extern void tpam_recv_tq(tpam_card *); extern void tpam_send_tq(tpam_card *); --- linux-2.5.68/drivers/isdn/tpam/tpam_queues.c 2003-01-16 18:21:36.000000000 -0800 +++ 25/drivers/isdn/tpam/tpam_queues.c 2003-04-21 03:58:37.000000000 -0700 @@ -74,7 +74,8 @@ void tpam_enqueue_data(tpam_channel *cha * dev_id: the registered board to the irq * regs: not used. */ -void tpam_irq(int irq, void *dev_id, struct pt_regs *regs) { +irqreturn_t tpam_irq(int irq, void *dev_id, struct pt_regs *regs) +{ tpam_card *card = (tpam_card *)dev_id; u32 ackupload, uploadptr; u32 waiting_too_long; @@ -115,7 +116,7 @@ void tpam_irq(int irq, void *dev_id, str printk(KERN_ERR "TurboPAM(tpam_irq): " "alloc_skb failed\n"); spin_unlock(&card->lock); - return; + return IRQ_HANDLED; } /* build the skb_header */ @@ -147,7 +148,7 @@ void tpam_irq(int irq, void *dev_id, str spin_unlock(&card->lock); printk(KERN_ERR "TurboPAM(tpam_irq): " "waiting too long...\n"); - return; + return IRQ_HANDLED; } } while (hpic & 0x00000002); @@ -169,7 +170,7 @@ void tpam_irq(int irq, void *dev_id, str skb_queue_tail(&card->recvq, skb); schedule_work(&card->recv_tq); } - return; + return IRQ_HANDLED; } else { /* it is a ack from the board */ @@ -185,10 +186,8 @@ void tpam_irq(int irq, void *dev_id, str /* schedule the send queue for execution */ schedule_work(&card->send_tq); - return; } - - /* not reached */ + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/md/dm.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/md/dm.c 2003-04-21 00:31:39.000000000 -0700 @@ -15,7 +15,7 @@ #include static const char *_name = DM_NAME; -#define MAX_DEVICES (1 << KDEV_MINOR_BITS) +#define MAX_DEVICES 1024 static int major = 0; static int _major = 0; --- linux-2.5.68/drivers/md/dm-ioctl.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/md/dm-ioctl.c 2003-04-21 00:31:39.000000000 -0700 @@ -14,6 +14,7 @@ #include #include #include +#include #include @@ -174,16 +175,10 @@ static void free_cell(struct hash_cell * static int register_with_devfs(struct hash_cell *hc) { struct gendisk *disk = dm_disk(hc->md); - char *name = kmalloc(DM_NAME_LEN + strlen(DM_DIR) + 1, GFP_KERNEL); - if (!name) { - return -ENOMEM; - } - sprintf(name, DM_DIR "/%s", hc->name); - devfs_register(NULL, name, 0, disk->major, disk->first_minor, + devfs_mk_bdev(MKDEV(disk->major, disk->first_minor), S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP, - &dm_blk_dops, NULL); - kfree(name); + DM_DIR "/%s", hc->name); return 0; } --- linux-2.5.68/drivers/md/Kconfig 2003-02-10 12:24:14.000000000 -0800 +++ 25/drivers/md/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -25,7 +25,7 @@ config BLK_DEV_MD More information about Software RAID on Linux is contained in the Software RAID mini-HOWTO, available from - . There you will also learn + . There you will also learn where to get the supporting user space utilities raidtools. If unsure, say N. @@ -57,7 +57,7 @@ config MD_RAID0 Information about Software RAID on Linux is contained in the Software-RAID mini-HOWTO, available from - . There you will also + . There you will also learn where to get the supporting user space utilities raidtools. If you want to compile this as a module ( = code which can be @@ -81,7 +81,7 @@ config MD_RAID1 Information about Software RAID on Linux is contained in the Software-RAID mini-HOWTO, available from - . There you will also + . There you will also learn where to get the supporting user space utilities raidtools. If you want to use such a RAID-1 set, say Y. This code is also @@ -106,7 +106,7 @@ config MD_RAID5 Information about Software RAID on Linux is contained in the Software-RAID mini-HOWTO, available from - . There you will also + . There you will also learn where to get the supporting user space utilities raidtools. If you want to use such a RAID-4/RAID-5 set, say Y. This code is --- linux-2.5.68/drivers/md/md.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/md/md.c 2003-04-21 00:31:39.000000000 -0700 @@ -3486,11 +3486,11 @@ int __init md_init(void) devfs_mk_dir("md"); blk_register_region(MKDEV(MAJOR_NR, 0), MAX_MD_DEVS, THIS_MODULE, md_probe, NULL, NULL); + for (minor=0; minor < MAX_MD_DEVS; ++minor) { - char name[16]; - sprintf(name, "md/%d", minor); - devfs_register(NULL, name, DEVFS_FL_DEFAULT, MAJOR_NR, minor, - S_IFBLK | S_IRUSR | S_IWUSR, &md_fops, NULL); + devfs_mk_bdev(MKDEV(MAJOR_NR, minor), + S_IFBLK|S_IRUSR|S_IWUSR, + "md/%d", minor); } register_reboot_notifier(&md_notifier); --- linux-2.5.68/drivers/md/raid1.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/md/raid1.c 2003-04-21 00:31:39.000000000 -0700 @@ -258,7 +258,7 @@ static inline void update_head_pos(int d r1_bio->sector + (r1_bio->master_bio->bi_size >> 9); } -static int end_request(struct bio *bio, unsigned int bytes_done, int error) +static int raid1_end_request(struct bio *bio, unsigned int bytes_done, int error) { int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private); @@ -496,7 +496,7 @@ static int make_request(request_queue_t read_bio->bi_sector = r1_bio->sector + mirror->rdev->data_offset; read_bio->bi_bdev = mirror->rdev->bdev; - read_bio->bi_end_io = end_request; + read_bio->bi_end_io = raid1_end_request; read_bio->bi_rw = r1_bio->cmd; read_bio->bi_private = r1_bio; @@ -531,7 +531,7 @@ static int make_request(request_queue_t mbio->bi_sector = r1_bio->sector + conf->mirrors[i].rdev->data_offset; mbio->bi_bdev = conf->mirrors[i].rdev->bdev; - mbio->bi_end_io = end_request; + mbio->bi_end_io = raid1_end_request; mbio->bi_rw = r1_bio->cmd; mbio->bi_private = r1_bio; @@ -551,11 +551,11 @@ static int make_request(request_queue_t /* * We have to be a bit careful about the semaphore above, thats * why we start the requests separately. Since generic_make_request() - * can sleep, this is the safer solution. Imagine, end_request + * can sleep, this is the safer solution. Imagine, raid1_end_request * decreasing the semaphore before we could have set it up ... * We could play tricks with the semaphore (presetting it and * correcting at the end if sum_bios is not 'n' but we have to - * do end_request by hand if all requests finish until we had a + * do raid1_end_request by hand if all requests finish until we had a * chance to set up the semaphore correctly ... lots of races). */ --- linux-2.5.68/drivers/media/common/saa7146_core.c 2003-04-19 20:45:18.000000000 -0700 +++ 25/drivers/media/common/saa7146_core.c 2003-04-21 02:45:03.000000000 -0700 @@ -192,7 +192,7 @@ void saa7146_setgpio(struct saa7146_dev /********************************************************************************/ /* interrupt handler */ -static void interrupt_hw(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t interrupt_hw(int irq, void *dev_id, struct pt_regs *regs) { struct saa7146_dev *dev = (struct saa7146_dev*)dev_id; u32 isr = 0; @@ -203,7 +203,7 @@ static void interrupt_hw(int irq, void * /* is this our interrupt? */ if ( 0 == isr ) { /* nope, some other device */ - return; + return IRQ_NONE; } saa7146_write(dev, ISR, isr); @@ -254,6 +254,7 @@ static void interrupt_hw(int irq, void * ERR(("disabling interrupt source(s)!\n")); IER_DISABLE(dev,isr); } + return IRQ_HANDLED; } /*********************************************************************************/ --- linux-2.5.68/drivers/media/dvb/dvb-core/dvbdev.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/media/dvb/dvb-core/dvbdev.c 2003-04-21 00:31:39.000000000 -0700 @@ -45,7 +45,6 @@ static int dvbdev_debug = 0; #define dprintk if (dvbdev_debug) printk -static devfs_handle_t dvb_devfs_handle; static LIST_HEAD(dvb_adapter_list); static DECLARE_MUTEX(dvbdev_register_lock); @@ -221,10 +220,8 @@ int dvb_register_device(struct dvb_adapt list_add_tail (&dvbdev->list_head, &adap->device_list); sprintf(name, "dvb/adapter%d%s%d", adap->num, dnames[type], id); - dvbdev->devfs_handle = devfs_register(NULL, name, 0, DVB_MAJOR, - nums2minor(adap->num, type, id), - S_IFCHR | S_IRUSR | S_IWUSR, - dvbdev->fops, dvbdev); + devfs_register(NULL, name, 0, DVB_MAJOR, nums2minor(adap->num, type, id), + S_IFCHR | S_IRUSR | S_IWUSR, dvbdev->fops, dvbdev); dprintk("DVB: register adapter%d/%s @ minor: %i (0x%02x)\n", adap->num, name, nums2minor(adap->num, type, id), @@ -236,12 +233,12 @@ int dvb_register_device(struct dvb_adapt void dvb_unregister_device(struct dvb_device *dvbdev) { - if (!dvbdev) - return; - - devfs_unregister(dvbdev->devfs_handle); - list_del (&dvbdev->list_head); - kfree (dvbdev); + if (dvbdev) { + devfs_remove("dvb/adapter%d%s%d", dvbdev->adapter->num, + dnames[dvbdev->type], dvbdev->id); + list_del(&dvbdev->list_head); + kfree(dvbdev); + } } @@ -289,11 +286,12 @@ int dvb_register_adapter(struct dvb_adap INIT_LIST_HEAD (&adap->device_list); /* fixme: is this correct? */ + /* No */ try_module_get(THIS_MODULE); printk ("DVB: registering new adapter (%s).\n", name); - adap->devfs_handle = devfs_mk_dir("dvb/adapter%d", num); + devfs_mk_dir("dvb/adapter%d", num); adap->num = num; adap->name = name; @@ -307,13 +305,14 @@ int dvb_register_adapter(struct dvb_adap int dvb_unregister_adapter(struct dvb_adapter *adap) { - devfs_unregister (adap->devfs_handle); if (down_interruptible (&dvbdev_register_lock)) return -ERESTARTSYS; + devfs_remove("dvb/adapter%d", adap->num); list_del (&adap->list_head); up (&dvbdev_register_lock); kfree (adap); /* fixme: is this correct? */ + /* No. */ module_put(THIS_MODULE); return 0; } @@ -322,7 +321,7 @@ int dvb_unregister_adapter(struct dvb_ad static int __init init_dvbdev(void) { - dvb_devfs_handle = devfs_mk_dir ("dvb"); + devfs_mk_dir("dvb"); #ifndef CONFIG_DVB_DEVFS_ONLY if(register_chrdev(DVB_MAJOR,"DVB", &dvb_device_fops)) { printk("video_dev: unable to get major %d\n", DVB_MAJOR); @@ -339,7 +338,7 @@ void __exit exit_dvbdev(void) #ifndef CONFIG_DVB_DEVFS_ONLY unregister_chrdev(DVB_MAJOR, "DVB"); #endif - devfs_unregister(dvb_devfs_handle); + devfs_remove("dvb"); } module_init(init_dvbdev); --- linux-2.5.68/drivers/media/dvb/dvb-core/dvbdev.h 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/media/dvb/dvb-core/dvbdev.h 2003-04-21 00:31:39.000000000 -0700 @@ -45,7 +45,6 @@ struct dvb_adapter { int num; - devfs_handle_t devfs_handle; struct list_head list_head; struct list_head device_list; const char *name; @@ -55,7 +54,6 @@ struct dvb_adapter { struct dvb_device { struct list_head list_head; struct file_operations *fops; - devfs_handle_t devfs_handle; struct dvb_adapter *adapter; int type; u32 id; --- linux-2.5.68/drivers/media/video/stradis.c 2003-02-10 12:24:14.000000000 -0800 +++ 25/drivers/media/video/stradis.c 2003-04-21 02:45:03.000000000 -0700 @@ -442,11 +442,12 @@ static void send_osd_data(struct saa7146 } } -static void saa7146_irq(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t saa7146_irq(int irq, void *dev_id, struct pt_regs *regs) { struct saa7146 *saa = (struct saa7146 *) dev_id; u32 stat, astat; int count; + int handled = 0; count = 0; while (1) { @@ -454,7 +455,8 @@ static void saa7146_irq(int irq, void *d stat = saaread(SAA7146_ISR); astat = stat & saaread(SAA7146_IER); if (!astat) - return; + break; + handled = 1; saawrite(astat, SAA7146_ISR); if (astat & SAA7146_PSR_DEBI_S) { do_irq_send_data(saa); @@ -611,6 +613,7 @@ static void saa7146_irq(int irq, void *d "stradis%d: IRQ loop cleared\n", saa->nr); } } + return IRQ_RETVAL(handled); } static int ibm_send_command(struct saa7146 *saa, --- linux-2.5.68/drivers/media/video/videodev.c 2003-01-16 18:21:39.000000000 -0800 +++ 25/drivers/media/video/videodev.c 2003-04-21 00:31:39.000000000 -0700 @@ -375,7 +375,6 @@ int video_register_device(struct video_d int base; int end; char *name_base; - char name[16]; switch(type) { @@ -426,19 +425,19 @@ int video_register_device(struct video_d vfd->minor=i; up(&videodev_lock); - sprintf (name, "v4l/%s%d", name_base, i - base); - vfd->devfs_handle = - devfs_register (NULL, name, DEVFS_FL_DEFAULT, - VIDEO_MAJOR, vfd->minor, - S_IFCHR | S_IRUSR | S_IWUSR, - &video_fops, - NULL); + sprintf(vfd->devfs_name, "v4l/%s%d", name_base, i - base); + devfs_register(NULL, vfd->devfs_name, 0, VIDEO_MAJOR, vfd->minor, + S_IFCHR | S_IRUSR | S_IWUSR, &video_fops, NULL); init_MUTEX(&vfd->lock); #ifdef CONFIG_VIDEO_PROC_FS - sprintf (name, "%s%d", name_base, i - base); - videodev_proc_create_dev (vfd, name); +{ + char name[16]; + sprintf(name, "%s%d", name_base, i - base); + videodev_proc_create_dev(vfd, name); +} #endif + return 0; } @@ -460,7 +459,7 @@ void video_unregister_device(struct vide videodev_proc_destroy_dev (vfd); #endif - devfs_unregister (vfd->devfs_handle); + devfs_remove(vfd->devfs_name); video_device[vfd->minor]=NULL; up(&videodev_lock); } --- linux-2.5.68/drivers/mtd/mtdblock.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/mtd/mtdblock.c 2003-04-21 00:31:39.000000000 -0700 @@ -528,25 +528,20 @@ static void mtd_notify_add(struct mtd_in if (!mtd || mtd->type == MTD_ABSENT) return; -#ifdef CONFIG_DEVFS_FS - sprintf(name, DEVICE_NAME"/%d", mtd->index); - devfs_register(NULL, name, DEVFS_FL_DEFAULT, - MTD_BLOCK_MAJOR, mtd->index, - S_IFBLK | S_IRUGO | S_IWUGO, - &mtd_fops, NULL); -#endif - disk = alloc_disk(1); if (disk) { disk->major = MAJOR_NR; disk->first_minor = mtd->index; disk->fops = &mtd_fops; + sprintf(disk->disk_name, "mtdblock%d", mtd->index); + sprintf(disk->devfs_name, "mtdblock/%d", mtd->index); mtddisk[mtd->index] = disk; set_capacity(disk, mtd->size / 512); disk->private_data = &mtdblks[mtd->index]; disk->queue = &mtd_queue; + add_disk(disk); } } @@ -556,8 +551,6 @@ static void mtd_notify_remove(struct mtd if (!mtd || mtd->type == MTD_ABSENT) return; - devfs_remove(DEVICE_NAME"/%d", mtd->index); - if (mtddisk[mtd->index]) { del_gendisk(mtddisk[mtd->index]); put_disk(mtddisk[mtd->index]); --- linux-2.5.68/drivers/net/3c501.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/net/3c501.c 2003-04-21 00:31:42.000000000 -0700 @@ -510,7 +510,7 @@ static int el_start_xmit(struct sk_buff * TCP window. */ -static void el_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t el_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct net_local *lp; @@ -558,7 +558,7 @@ static void el_interrupt(int irq, void * } lp->loading=2; /* Force a reload */ spin_unlock(&lp->lock); - return; + goto out; } if (el_debug > 6) @@ -606,7 +606,7 @@ static void el_interrupt(int irq, void * outb(AX_XMIT, AX_CMD); lp->stats.collisions++; spin_unlock(&lp->lock); - return; + goto out; } else { @@ -675,7 +675,8 @@ static void el_interrupt(int irq, void * inb(RX_STATUS); /* Be certain that interrupts are cleared. */ inb(TX_STATUS); spin_unlock(&lp->lock); - return; +out: + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/3c501.h 2003-01-16 18:22:02.000000000 -0800 +++ 25/drivers/net/3c501.h 2003-04-21 00:31:42.000000000 -0700 @@ -8,7 +8,7 @@ static int el1_probe1(struct net_device static int el_open(struct net_device *dev); static void el_timeout(struct net_device *dev); static int el_start_xmit(struct sk_buff *skb, struct net_device *dev); -static void el_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t el_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void el_receive(struct net_device *dev); static void el_reset(struct net_device *dev); static int el1_close(struct net_device *dev); --- linux-2.5.68/drivers/net/3c505.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/3c505.c 2003-04-21 00:31:42.000000000 -0700 @@ -662,7 +662,7 @@ static void receive_packet(struct net_de * ******************************************************/ -static void elp_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr) +static irqreturn_t elp_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr) { int len; int dlen; @@ -855,6 +855,7 @@ static void elp_interrupt(int irq, void * indicate no longer in interrupt routine */ spin_unlock(&adapter->lock); + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/3c507.c 2003-01-16 18:22:28.000000000 -0800 +++ 25/drivers/net/3c507.c 2003-04-21 00:31:42.000000000 -0700 @@ -516,7 +516,7 @@ static int el16_send_packet (struct sk_b /* The typical workload of the driver: Handle the network interface interrupts. */ -static void el16_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t el16_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct net_local *lp; @@ -526,7 +526,7 @@ static void el16_interrupt(int irq, void if (dev == NULL) { printk ("net_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } ioaddr = dev->base_addr; @@ -616,6 +616,7 @@ static void el16_interrupt(int irq, void /* Enable the 82586's interrupt input. */ outb(0x84, ioaddr + MISC_CTRL); spin_unlock(&lp->lock); + return IRQ_HANDLED; } static int el16_close(struct net_device *dev) --- linux-2.5.68/drivers/net/3c509.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/net/3c509.c 2003-04-21 00:31:42.000000000 -0700 @@ -192,7 +192,7 @@ static ushort id_read_eeprom(int index); static ushort read_eeprom(int ioaddr, int index); static int el3_open(struct net_device *dev); static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev); -static void el3_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t el3_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void update_stats(struct net_device *dev); static struct net_device_stats *el3_get_stats(struct net_device *dev); static int el3_rx(struct net_device *dev); @@ -882,7 +882,7 @@ el3_start_xmit(struct sk_buff *skb, stru } /* The EL3 interrupt handler. */ -static void +static irqreturn_t el3_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; @@ -892,7 +892,7 @@ el3_interrupt(int irq, void *dev_id, str if (dev == NULL) { printk ("el3_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } lp = (struct el3_private *)dev->priv; @@ -967,7 +967,7 @@ el3_interrupt(int irq, void *dev_id, str inw(ioaddr + EL3_STATUS)); } spin_unlock(&lp->lock); - return; + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/3c515.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/3c515.c 2003-04-21 00:31:42.000000000 -0700 @@ -1,4 +1,3 @@ - /* Written 1997-1998 by Donald Becker. @@ -387,7 +386,7 @@ static int corkscrew_start_xmit(struct s static int corkscrew_rx(struct net_device *dev); static void corkscrew_timeout(struct net_device *dev); static int boomerang_rx(struct net_device *dev); -static void corkscrew_interrupt(int irq, void *dev_id, +static irqreturn_t corkscrew_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int corkscrew_close(struct net_device *dev); static void update_stats(int addr, struct net_device *dev); @@ -1150,7 +1149,7 @@ static int corkscrew_start_xmit(struct s /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void corkscrew_interrupt(int irq, void *dev_id, +static irqreturn_t corkscrew_interrupt(int irq, void *dev_id, struct pt_regs *regs) { /* Use the now-standard shared IRQ implementation. */ @@ -1289,6 +1288,7 @@ static void corkscrew_interrupt(int irq, if (corkscrew_debug > 4) printk("%s: exiting interrupt, status %4.4x.\n", dev->name, status); + return IRQ_HANDLED; } static int corkscrew_rx(struct net_device *dev) --- linux-2.5.68/drivers/net/3c523.c 2003-01-16 18:22:09.000000000 -0800 +++ 25/drivers/net/3c523.c 2003-04-21 00:31:42.000000000 -0700 @@ -179,7 +179,7 @@ sizeof(nop_cmd) = 8; dev->name,__LINE__); \ elmc_id_reset586(); } } } -static void elmc_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr); +static irqreturn_t elmc_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr); static int elmc_open(struct net_device *dev); static int elmc_close(struct net_device *dev); static int elmc_send_packet(struct sk_buff *, struct net_device *); @@ -876,7 +876,8 @@ static void *alloc_rfa(struct net_device * Interrupt Handler ... */ -static void elmc_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr) +static irqreturn_t +elmc_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr) { struct net_device *dev = (struct net_device *) dev_id; unsigned short stat; @@ -884,7 +885,7 @@ static void elmc_interrupt(int irq, void if (dev == NULL) { printk(KERN_ERR "elmc-interrupt: irq %d for unknown device.\n", (int) -(((struct pt_regs *) reg_ptr)->orig_eax + 2)); - return; + return IRQ_NONE; } else if (!netif_running(dev)) { /* The 3c523 has this habit of generating interrupts during the reset. I'm not sure if the ni52 has this same problem, but it's @@ -893,10 +894,10 @@ static void elmc_interrupt(int irq, void might have missed a few. */ elmc_id_attn586(); /* ack inter. and disable any more */ - return; + return IRQ_HANDLED; } else if (!(ELMC_CTRL_INT & inb(dev->base_addr + ELMC_CTRL))) { /* wasn't this device */ - return; + return IRQ_NONE; } /* reading ELMC_CTRL also clears the INT bit. */ @@ -943,6 +944,7 @@ static void elmc_interrupt(int irq, void break; } } + return IRQ_HANDLED; } /******************************************************* --- linux-2.5.68/drivers/net/3c527.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/3c527.c 2003-04-21 00:31:42.000000000 -0700 @@ -213,7 +213,7 @@ static int mc32_command(struct net_ static int mc32_open(struct net_device *dev); static void mc32_timeout(struct net_device *dev); static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev); -static void mc32_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t mc32_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int mc32_close(struct net_device *dev); static struct net_device_stats *mc32_get_stats(struct net_device *dev); static void mc32_set_multicast_list(struct net_device *dev); @@ -1347,7 +1347,7 @@ static void mc32_tx_ring(struct net_devi * */ -static void mc32_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t mc32_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; struct mc32_local *lp; @@ -1357,7 +1357,7 @@ static void mc32_interrupt(int irq, void if (dev == NULL) { printk(KERN_WARNING "%s: irq %d for unknown device.\n", cardname, irq); - return; + return IRQ_NONE; } ioaddr = dev->base_addr; @@ -1461,7 +1461,7 @@ static void mc32_interrupt(int irq, void if(rx_event) mc32_rx_ring(dev); - return; + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/3c59x.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/3c59x.c 2003-04-21 00:31:42.000000000 -0700 @@ -885,8 +885,8 @@ static int vortex_start_xmit(struct sk_b static int boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev); static int vortex_rx(struct net_device *dev); static int boomerang_rx(struct net_device *dev); -static void vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs); -static void boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int vortex_close(struct net_device *dev); static void dump_tx_ring(struct net_device *dev); static void update_stats(long ioaddr, struct net_device *dev); @@ -2208,14 +2208,16 @@ boomerang_start_xmit(struct sk_buff *skb * full_bus_master_tx == 0 && full_bus_master_rx == 0 */ -static void vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t +vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct vortex_private *vp = (struct vortex_private *)dev->priv; long ioaddr; int status; int work_done = max_interrupt_work; - + int handled = 0; + ioaddr = dev->base_addr; spin_lock(&vp->lock); @@ -2226,6 +2228,7 @@ static void vortex_interrupt(int irq, vo if ((status & IntLatch) == 0) goto handler_exit; /* No interrupt: shared IRQs cause this */ + handled = 1; if (status & IntReq) { status |= vp->deferred; @@ -2302,6 +2305,7 @@ static void vortex_interrupt(int irq, vo dev->name, status); handler_exit: spin_unlock(&vp->lock); + return IRQ_RETVAL(handled); } /* @@ -2309,13 +2313,15 @@ handler_exit: * full_bus_master_tx == 1 && full_bus_master_rx == 1 */ -static void boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t +boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct vortex_private *vp = (struct vortex_private *)dev->priv; long ioaddr; int status; int work_done = max_interrupt_work; + int handled; ioaddr = dev->base_addr; @@ -2330,14 +2336,18 @@ static void boomerang_interrupt(int irq, if (vortex_debug > 6) printk(KERN_DEBUG "boomerang_interrupt. status=0x%4x\n", status); - if ((status & IntLatch) == 0) + if ((status & IntLatch) == 0) { + handled = 0; goto handler_exit; /* No interrupt: shared IRQs can cause this */ + } if (status == 0xffff) { /* h/w no longer present (hotplug)? */ if (vortex_debug > 1) printk(KERN_DEBUG "boomerang_interrupt(1): status = 0xffff\n"); + handled = 0; goto handler_exit; } + handled = 1; if (status & IntReq) { status |= vp->deferred; @@ -2432,6 +2442,7 @@ static void boomerang_interrupt(int irq, dev->name, status); handler_exit: spin_unlock(&vp->lock); + return IRQ_RETVAL(handled); } static int vortex_rx(struct net_device *dev) --- linux-2.5.68/drivers/net/68360enet.c 2003-01-16 18:21:42.000000000 -0800 +++ 25/drivers/net/68360enet.c 2003-04-21 00:31:42.000000000 -0700 @@ -147,8 +147,7 @@ struct scc_enet_private { static int scc_enet_open(struct net_device *dev); static int scc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev); static int scc_enet_rx(struct net_device *dev); -/* static void scc_enet_interrupt(void *dev_id); */ -static void scc_enet_interrupt(int vec, void *dev_id, struct pt_regs *fp); +static irqreturn_t scc_enet_interrupt(int vec, void *dev_id, struct pt_regs *fp); static int scc_enet_close(struct net_device *dev); /* static struct net_device_stats *scc_enet_get_stats(struct net_device *dev); */ static struct net_device_stats *scc_enet_get_stats(struct net_device *dev); @@ -316,8 +315,7 @@ scc_enet_timeout(struct net_device *dev) /* The interrupt handler. * This is called from the CPM handler, not the MPC core interrupt. */ -/* static void scc_enet_interrupt(void *dev_id) */ -static void scc_enet_interrupt(int vec, void *dev_id, struct pt_regs *fp) +static irqreturn_t scc_enet_interrupt(int vec, void *dev_id, struct pt_regs *fp) { struct net_device *dev = (struct net_device *)dev_id; volatile struct scc_enet_private *cep; @@ -454,7 +452,7 @@ static void scc_enet_interrupt(int vec, printk("CPM ENET: BSY can't happen.\n"); } - return; + return IRQ_HANDLED; } /* During a receive, the cur_rx points to the current incoming buffer. --- linux-2.5.68/drivers/net/7990.c 2003-01-16 18:22:25.000000000 -0800 +++ 25/drivers/net/7990.c 2003-04-21 00:31:42.000000000 -0700 @@ -397,7 +397,8 @@ static int lance_tx (struct net_device * return 0; } -static void lance_interrupt (int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t +lance_interrupt (int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; struct lance_private *lp = (struct lance_private *)dev->priv; @@ -413,7 +414,7 @@ static void lance_interrupt (int irq, vo if (!(csr0 & LE_C0_INTR)) { /* Check if any interrupt has */ spin_lock (&lp->devlock); - return; /* been generated by the Lance. */ + return IRQ_NONE; /* been generated by the Lance. */ } /* Acknowledge all the interrupt sources ASAP */ @@ -451,6 +452,7 @@ static void lance_interrupt (int irq, vo WRITERDP(LE_C0_BABL|LE_C0_CERR|LE_C0_MISS|LE_C0_MERR|LE_C0_IDON|LE_C0_INEA); spin_unlock (&lp->devlock); + return IRQ_HANDLED; } int lance_open (struct net_device *dev) --- linux-2.5.68/drivers/net/8139cp.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/8139cp.c 2003-04-21 00:31:42.000000000 -0700 @@ -658,7 +658,8 @@ rx_next: cp->rx_tail = rx_tail; } -static void cp_interrupt (int irq, void *dev_instance, struct pt_regs *regs) +static irqreturn_t +cp_interrupt (int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = dev_instance; struct cp_private *cp = dev->priv; @@ -666,7 +667,7 @@ static void cp_interrupt (int irq, void status = cpr16(IntrStatus); if (!status || (status == 0xFFFF)) - return; + return IRQ_NONE; if (netif_msg_intr(cp)) printk(KERN_DEBUG "%s: intr, status %04x cmd %02x cpcmd %04x\n", @@ -693,6 +694,7 @@ static void cp_interrupt (int irq, void } spin_unlock(&cp->lock); + return IRQ_HANDLED; } static void cp_tx (struct cp_private *cp) --- linux-2.5.68/drivers/net/8139too.c 2003-02-17 16:21:15.000000000 -0800 +++ 25/drivers/net/8139too.c 2003-04-21 00:31:42.000000000 -0700 @@ -615,7 +615,7 @@ static void rtl8139_tx_timeout (struct n static void rtl8139_init_ring (struct net_device *dev); static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev); -static void rtl8139_interrupt (int irq, void *dev_instance, +static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance, struct pt_regs *regs); static int rtl8139_close (struct net_device *dev); static int netdev_ioctl (struct net_device *dev, struct ifreq *rq, int cmd); @@ -2029,7 +2029,7 @@ static void rtl8139_weird_interrupt (str /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void rtl8139_interrupt (int irq, void *dev_instance, +static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_instance; @@ -2038,6 +2038,7 @@ static void rtl8139_interrupt (int irq, void *ioaddr = tp->mmio_addr; int ackstat, status; int link_changed = 0; /* avoid bogus "uninit" warning */ + int handled = 0; spin_lock (&tp->lock); @@ -2053,6 +2054,8 @@ static void rtl8139_interrupt (int irq, RxFIFOOver | TxErr | TxOK | RxErr | RxOK)) == 0) break; + handled = 1; + /* Acknowledge all of the current interrupt sources ASAP, but an first get an additional status bit from CSCR. */ if (status & RxUnderrun) @@ -2097,6 +2100,7 @@ static void rtl8139_interrupt (int irq, DPRINTK ("%s: exiting interrupt, intr_status=%#4.4x.\n", dev->name, RTL_R16 (IntrStatus)); + return IRQ_RETVAL(handled); } --- linux-2.5.68/drivers/net/82596.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/net/82596.c 2003-04-21 00:31:42.000000000 -0700 @@ -357,7 +357,7 @@ static char init_setup[] = static int i596_open(struct net_device *dev); static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev); -static void i596_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int i596_close(struct net_device *dev); static struct net_device_stats *i596_get_stats(struct net_device *dev); static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd); @@ -1247,24 +1247,25 @@ int __init i82596_probe(struct net_devic return 0; } -static void i596_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct i596_private *lp; short ioaddr; unsigned short status, ack_cmd = 0; + int handled = 0; #ifdef ENABLE_BVME6000_NET if (MACH_IS_BVME6000) { if (*(char *) BVME_LOCAL_IRQ_STAT & BVME_ETHERR) { i596_error(irq, dev_id, regs); - return; + return IRQ_HANDLED; } } #endif if (dev == NULL) { printk(KERN_ERR "i596_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } ioaddr = dev->base_addr; @@ -1283,6 +1284,7 @@ static void i596_interrupt(int irq, void if ((status & 0x8000) || (status & 0x2000)) { struct i596_cmd *ptr; + handled = 1; if ((status & 0x8000)) DEB(DEB_INTS,printk(KERN_DEBUG "%s: i596 interrupt completed command.\n", dev->name)); if ((status & 0x2000)) @@ -1405,7 +1407,7 @@ static void i596_interrupt(int irq, void DEB(DEB_INTS,printk(KERN_DEBUG "%s: exiting interrupt.\n", dev->name)); spin_unlock (&lp->lock); - return; + return IRQ_RETVAL(handled); } static int i596_close(struct net_device *dev) --- linux-2.5.68/drivers/net/8390.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/8390.c 2003-04-21 00:31:42.000000000 -0700 @@ -421,7 +421,7 @@ static int ei_start_xmit(struct sk_buff * needed. */ -void ei_interrupt(int irq, void *dev_id, struct pt_regs * regs) +irqreturn_t ei_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; long e8390_base; @@ -431,7 +431,7 @@ void ei_interrupt(int irq, void *dev_id, if (dev == NULL) { printk ("net_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } e8390_base = dev->base_addr; @@ -454,7 +454,7 @@ void ei_interrupt(int irq, void *dev_id, inb_p(e8390_base + EN0_IMR)); #endif spin_unlock(&ei_local->page_lock); - return; + return IRQ_NONE; } /* Change to page 0 and read the intr status reg. */ @@ -520,7 +520,7 @@ void ei_interrupt(int irq, void *dev_id, } } spin_unlock(&ei_local->page_lock); - return; + return IRQ_HANDLED; } /** --- linux-2.5.68/drivers/net/8390.h 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/net/8390.h 2003-04-21 00:31:42.000000000 -0700 @@ -43,7 +43,7 @@ extern int ethdev_init(struct net_device extern void NS8390_init(struct net_device *dev, int startp); extern int ei_open(struct net_device *dev); extern int ei_close(struct net_device *dev); -extern void ei_interrupt(int irq, void *dev_id, struct pt_regs *regs); +extern irqreturn_t ei_interrupt(int irq, void *dev_id, struct pt_regs *regs); /* You have one of these per-board */ struct ei_device { --- linux-2.5.68/drivers/net/a2065.c 2003-01-16 18:22:17.000000000 -0800 +++ 25/drivers/net/a2065.c 2003-04-21 00:31:42.000000000 -0700 @@ -429,7 +429,8 @@ static int lance_tx (struct net_device * return 0; } -static void lance_interrupt (int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t +lance_interrupt (int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev; struct lance_private *lp; @@ -445,7 +446,7 @@ static void lance_interrupt (int irq, vo csr0 = ll->rdp; if (!(csr0 & LE_C0_INTR)) /* Check if any interrupt has */ - return; /* been generated by the Lance. */ + return IRQ_NONE; /* been generated by the Lance. */ /* Acknowledge all the interrupt sources ASAP */ ll->rdp = csr0 & ~(LE_C0_INEA|LE_C0_TDMD|LE_C0_STOP|LE_C0_STRT| @@ -479,7 +480,7 @@ static void lance_interrupt (int irq, vo ll->rap = LE_CSR0; ll->rdp = LE_C0_BABL|LE_C0_CERR|LE_C0_MISS|LE_C0_MERR| LE_C0_IDON|LE_C0_INEA; - + return IRQ_HANDLED; } struct net_device *last_dev = 0; --- linux-2.5.68/drivers/net/acenic.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/acenic.c 2003-04-21 00:31:42.000000000 -0700 @@ -2426,7 +2426,7 @@ static inline void ace_tx_int(struct net } -static void ace_interrupt(int irq, void *dev_id, struct pt_regs *ptregs) +static irqreturn_t ace_interrupt(int irq, void *dev_id, struct pt_regs *ptregs) { struct ace_private *ap; struct ace_regs *regs; @@ -2444,7 +2444,7 @@ static void ace_interrupt(int irq, void * spending any time in here. */ if (!(readl(®s->HostCtrl) & IN_INT)) - return; + return IRQ_NONE; /* * ACK intr now. Otherwise we will lose updates to rx_ret_prd, @@ -2550,6 +2550,7 @@ static void ace_interrupt(int irq, void tasklet_schedule(&ap->ace_tasklet); } } + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/acenic.h 2003-01-16 18:22:08.000000000 -0800 +++ 25/drivers/net/acenic.h 2003-04-21 00:31:42.000000000 -0700 @@ -781,7 +781,7 @@ static int ace_init(struct net_device *d static void ace_load_std_rx_ring(struct ace_private *ap, int nr_bufs); static void ace_load_mini_rx_ring(struct ace_private *ap, int nr_bufs); static void ace_load_jumbo_rx_ring(struct ace_private *ap, int nr_bufs); -static void ace_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t ace_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int ace_load_firmware(struct net_device *dev); static int ace_open(struct net_device *dev); static int ace_start_xmit(struct sk_buff *skb, struct net_device *dev); --- linux-2.5.68/drivers/net/am79c961a.c 2003-02-24 13:08:46.000000000 -0800 +++ 25/drivers/net/am79c961a.c 2003-04-21 00:31:42.000000000 -0700 @@ -40,7 +40,8 @@ #include "am79c961a.h" -static void am79c961_interrupt (int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t +am79c961_interrupt (int irq, void *dev_id, struct pt_regs *regs); static unsigned int net_debug = NET_DEBUG; @@ -557,22 +558,30 @@ am79c961_tx(struct net_device *dev, stru netif_wake_queue(dev); } -static void +static irqreturn_t am79c961_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; struct dev_priv *priv = (struct dev_priv *)dev->priv; u_int status; + int handled = 0; status = read_rreg(dev->base_addr, CSR0); write_rreg(dev->base_addr, CSR0, status & (CSR0_TINT|CSR0_RINT|CSR0_MISS|CSR0_IENA)); - if (status & CSR0_RINT) + if (status & CSR0_RINT) { + handled = 1; am79c961_rx(dev, priv); - if (status & CSR0_TINT) + } + if (status & CSR0_TINT) { + handled = 1; am79c961_tx(dev, priv); - if (status & CSR0_MISS) + } + if (status & CSR0_MISS) { + handled = 1; priv->stats.rx_dropped ++; + } + return IRQ_RETVAL(handled); } /* --- linux-2.5.68/drivers/net/amd8111e.c 2003-02-14 17:35:06.000000000 -0800 +++ 25/drivers/net/amd8111e.c 2003-04-21 00:31:42.000000000 -0700 @@ -780,16 +780,18 @@ static struct net_device_stats *amd8111e /* This is device interrupt function. It handles transmit, receive and link change interrupts. */ -static void amd8111e_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t +amd8111e_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device * dev = (struct net_device *) dev_id; struct amd8111e_priv *lp = dev->priv; void * mmio = lp->mmio; unsigned int intr0; + int handled = 0; if(dev == NULL) - return; + return IRQ_NONE; spin_lock (&lp->lock); /* disabling interrupt */ @@ -802,7 +804,8 @@ static void amd8111e_interrupt(int irq, if (!(intr0 & INTR)) goto err_no_interrupt; - + + handled = 1; /* Current driver processes 3 interrupts : RINT,TINT,LCINT */ writel(intr0, mmio + INT0); @@ -823,7 +826,7 @@ static void amd8111e_interrupt(int irq, err_no_interrupt: writel( VAL0 | INTREN,mmio + CMD0); spin_unlock(&lp->lock); - return; + return IRQ_RETVAL(handled); } /* --- linux-2.5.68/drivers/net/apne.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/net/apne.c 2003-04-21 00:31:42.000000000 -0700 @@ -85,7 +85,7 @@ static void apne_block_input(struct net_ struct sk_buff *skb, int ring_offset); static void apne_block_output(struct net_device *dev, const int count, const unsigned char *buf, const int start_page); -static void apne_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t apne_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int init_pcmcia(void); @@ -511,18 +511,18 @@ apne_block_output(struct net_device *dev return; } -static void apne_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t apne_interrupt(int irq, void *dev_id, struct pt_regs *regs) { unsigned char pcmcia_intreq; if (!(gayle.inten & GAYLE_IRQ_IRQ)) - return; + return IRQ_NONE; pcmcia_intreq = pcmcia_get_intreq(); if (!(pcmcia_intreq & GAYLE_IRQ_IRQ)) { pcmcia_ack_int(pcmcia_intreq); - return; + return IQ_NONE; } if (ei_debug > 3) printk("pcmcia intreq = %x\n", pcmcia_intreq); @@ -530,6 +530,7 @@ static void apne_interrupt(int irq, void ei_interrupt(irq, dev_id, regs); pcmcia_ack_int(pcmcia_get_intreq()); pcmcia_enable_irq(); + return IRQ_HANDLED; } #ifdef MODULE --- linux-2.5.68/drivers/net/appletalk/cops.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/appletalk/cops.c 2003-04-21 00:31:42.000000000 -0700 @@ -194,7 +194,7 @@ static void cops_reset (struct net_devic static void cops_load (struct net_device *dev); static int cops_nodeid (struct net_device *dev, int nodeid); -static void cops_interrupt (int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t cops_interrupt (int irq, void *dev_id, struct pt_regs *regs); static void cops_poll (unsigned long ltdev); static void cops_timeout(struct net_device *dev); static void cops_rx (struct net_device *dev); @@ -710,7 +710,7 @@ static void cops_poll(unsigned long ltde * The typical workload of the driver: * Handle the network interface interrupts. */ -static void cops_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t cops_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; struct cops_local *lp; @@ -742,7 +742,7 @@ static void cops_interrupt(int irq, void } while((++boguscount < 20) && (status&(TANG_RX_READY|TANG_TX_READY))); } - return; + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/net/appletalk/ltpc.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/appletalk/ltpc.c 2003-04-21 00:31:42.000000000 -0700 @@ -789,13 +789,14 @@ static int sendup_buffer (struct net_dev /* the handler for the board interrupt */ -static void ltpc_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr) +static irqreturn_t +ltpc_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr) { struct net_device *dev = dev_id; if (dev==NULL) { printk("ltpc_interrupt: unknown device.\n"); - return; + return IRQ_NONE; } inb_p(dev->base_addr+6); /* disable further interrupts from board */ @@ -804,7 +805,7 @@ static void ltpc_interrupt(int irq, void /* idle re-enables interrupts from board */ - return; + return IRQ_HANDLED; } /*** --- linux-2.5.68/drivers/net/arcnet/arcnet.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/arcnet/arcnet.c 2003-04-21 00:31:42.000000000 -0700 @@ -701,7 +701,7 @@ static void arcnet_timeout(struct net_de * interrupts. Establish which device needs attention, and call the correct * chipset interrupt handler. */ -void arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct arcnet_local *lp; @@ -726,7 +726,7 @@ void arcnet_interrupt(int irq, void *dev ACOMMAND(CFLAGScmd | RESETclear); AINTMASK(0); spin_unlock(&arcnet_lock); - return; + return IRQ_HANDLED; } BUGMSG(D_DURING, "in arcnet_inthandler (status=%Xh, intmask=%Xh)\n", @@ -894,6 +894,7 @@ void arcnet_interrupt(int irq, void *dev AINTMASK(lp->intmask); spin_unlock(&arcnet_lock); + return IRQ_RETVAL(didsomething); } --- linux-2.5.68/drivers/net/arcnet/Kconfig 2003-02-10 12:24:14.000000000 -0800 +++ 25/drivers/net/arcnet/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -18,7 +18,7 @@ config ARCNET support" below. You might also want to have a look at the Ethernet-HOWTO, available - from (even though ARCnet + from (even though ARCnet is not really Ethernet). This driver is also available as a module ( = code which can be --- linux-2.5.68/drivers/net/ariadne.c 2003-01-16 18:22:22.000000000 -0800 +++ 25/drivers/net/ariadne.c 2003-04-21 00:31:42.000000000 -0700 @@ -127,7 +127,7 @@ static int ariadne_start_xmit(struct sk_ static void ariadne_tx_timeout(struct net_device *dev); static int ariadne_rx(struct net_device *dev); static void ariadne_reset(struct net_device *dev); -static void ariadne_interrupt(int irq, void *data, struct pt_regs *fp); +static irqreturn_t ariadne_interrupt(int irq, void *data, struct pt_regs *fp); static int ariadne_close(struct net_device *dev); static struct net_device_stats *ariadne_get_stats(struct net_device *dev); #ifdef HAVE_MULTICAST @@ -406,22 +406,23 @@ static inline void ariadne_reset(struct } -static void ariadne_interrupt(int irq, void *data, struct pt_regs *fp) +static irqreturn_t ariadne_interrupt(int irq, void *data, struct pt_regs *fp) { struct net_device *dev = (struct net_device *)data; volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr; struct ariadne_private *priv; int csr0, boguscnt; + int handled = 0; if (dev == NULL) { printk("ariadne_interrupt(): irq for unknown device.\n"); - return; + return IRQ_NONE; } lance->RAP = CSR0; /* PCnet-ISA Controller Status */ if (!(lance->RDP & INTR)) /* Check if any interrupt has been */ - return; /* generated by the board. */ + return IRQ_NONE; /* generated by the board. */ priv = (struct ariadne_private *)dev->priv; @@ -471,12 +472,15 @@ static void ariadne_interrupt(int irq, v } #endif - if (csr0 & RINT) /* Rx interrupt */ + if (csr0 & RINT) { /* Rx interrupt */ + handled = 1; ariadne_rx(dev); + } if (csr0 & TINT) { /* Tx-done interrupt */ int dirty_tx = priv->dirty_tx; + handled = 1; while (dirty_tx < priv->cur_tx) { int entry = dirty_tx % TX_RING_SIZE; int status = lowb(priv->tx_ring[entry]->TMD1); @@ -532,11 +536,16 @@ static void ariadne_interrupt(int irq, v } /* Log misc errors. */ - if (csr0 & BABL) + if (csr0 & BABL) { + handled = 1; priv->stats.tx_errors++; /* Tx babble. */ - if (csr0 & MISS) + } + if (csr0 & MISS) { + handled = 1; priv->stats.rx_errors++; /* Missed a Rx frame. */ + } if (csr0 & MERR) { + handled = 1; printk("%s: Bus master arbitration failure, status %4.4x.\n", dev->name, csr0); /* Restart the chip. */ @@ -553,7 +562,7 @@ static void ariadne_interrupt(int irq, v printk("%s: exiting interrupt, csr%d=%#4.4x.\n", dev->name, lance->RAP, lance->RDP); #endif - return; + return IRQ_RETVAL(handled); } --- linux-2.5.68/drivers/net/at1700.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/net/at1700.c 2003-04-21 00:31:42.000000000 -0700 @@ -202,7 +202,7 @@ static int at1700_probe1(struct net_devi static int read_eeprom(long ioaddr, int location); static int net_open(struct net_device *dev); static int net_send_packet(struct sk_buff *skb, struct net_device *dev); -static void net_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void net_rx(struct net_device *dev); static int net_close(struct net_device *dev); static struct net_device_stats *net_get_stats(struct net_device *dev); @@ -696,16 +696,17 @@ static int net_send_packet (struct sk_bu /* The typical workload of the driver: Handle the network interface interrupts. */ -static void +static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct net_local *lp; int ioaddr, status; + int handled = 0; if (dev == NULL) { printk ("at1700_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } ioaddr = dev->base_addr; @@ -726,6 +727,7 @@ net_interrupt(int irq, void *dev_id, str Tx interrupt. Thus we flag on rx_started, so that we prevent the interrupt routine (net_interrupt) to dive into net_rx again. */ + handled = 1; lp->rx_started = 1; outb(0x00, ioaddr + RX_INTR); /* Disable RX intr. */ net_rx(dev); @@ -733,6 +735,7 @@ net_interrupt(int irq, void *dev_id, str lp->rx_started = 0; } if (status & 0x00ff) { + handled = 1; if (status & 0x02) { /* More than 16 collisions occurred */ if (net_debug > 4) @@ -760,7 +763,7 @@ net_interrupt(int irq, void *dev_id, str } spin_unlock (&lp->lock); - return; + return IRQ_RETVAL(handled); } /* We have a good packet(s), get it/them out of the buffers. */ --- linux-2.5.68/drivers/net/atarilance.c 2003-01-16 18:21:45.000000000 -0800 +++ 25/drivers/net/atarilance.c 2003-04-21 00:31:42.000000000 -0700 @@ -344,7 +344,7 @@ static unsigned long lance_probe1( struc static int lance_open( struct net_device *dev ); static void lance_init_ring( struct net_device *dev ); static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ); -static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp ); +static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp ); static int lance_rx( struct net_device *dev ); static int lance_close( struct net_device *dev ); static struct net_device_stats *lance_get_stats( struct net_device *dev ); @@ -860,16 +860,17 @@ static int lance_start_xmit( struct sk_b /* The LANCE interrupt handler. */ -static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp) +static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp) { struct net_device *dev = dev_id; struct lance_private *lp; struct lance_ioreg *IO; int csr0, boguscnt = 10; + int handled = 0; if (dev == NULL) { DPRINTK( 1, ( "lance_interrupt(): interrupt for unknown device.\n" )); - return; + return IRQ_NONE; } lp = (struct lance_private *)dev->priv; @@ -880,6 +881,7 @@ static void lance_interrupt( int irq, vo while( ((csr0 = DREG) & (CSR0_ERR | CSR0_TINT | CSR0_RINT)) && --boguscnt >= 0) { + handled = 1; /* Acknowledge all of the current interrupt sources ASAP. */ DREG = csr0 & ~(CSR0_INIT | CSR0_STRT | CSR0_STOP | CSR0_TDMD | CSR0_INEA); @@ -966,6 +968,7 @@ static void lance_interrupt( int irq, vo dev->name, DREG )); spin_unlock (&lp->devlock); + return IRQ_RETVAL(handled); } --- linux-2.5.68/drivers/net/atp.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/atp.c 2003-04-21 00:31:42.000000000 -0700 @@ -203,7 +203,7 @@ static void hardware_init(struct net_dev static void write_packet(long ioaddr, int length, unsigned char *packet, int pad, int mode); static void trigger_send(long ioaddr, int length); static int atp_send_packet(struct sk_buff *skb, struct net_device *dev); -static void atp_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t atp_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void net_rx(struct net_device *dev); static void read_block(long ioaddr, int length, unsigned char *buffer, int data_mode); static int net_close(struct net_device *dev); @@ -596,17 +596,19 @@ static int atp_send_packet(struct sk_buf /* The typical workload of the driver: Handle the network interface interrupts. */ -static void atp_interrupt(int irq, void *dev_instance, struct pt_regs * regs) +static irqreturn_t +atp_interrupt(int irq, void *dev_instance, struct pt_regs * regs) { struct net_device *dev = (struct net_device *)dev_instance; struct net_local *lp; long ioaddr; static int num_tx_since_rx; int boguscount = max_interrupt_work; + int handled = 0; if (dev == NULL) { printk(KERN_ERR "ATP_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } ioaddr = dev->base_addr; lp = (struct net_local *)dev->priv; @@ -626,6 +628,7 @@ static void atp_interrupt(int irq, void if (net_debug > 5) printk("loop status %02x..", status); if (status & (ISR_RxOK<<3)) { + handled = 1; write_reg(ioaddr, ISR, ISR_RxOK); /* Clear the Rx interrupt. */ do { int read_status = read_nibble(ioaddr, CMR1); @@ -648,6 +651,7 @@ static void atp_interrupt(int irq, void break; } while (--boguscount > 0); } else if (status & ((ISR_TxErr + ISR_TxOK)<<3)) { + handled = 1; if (net_debug > 6) printk("handling Tx done.."); /* Clear the Tx interrupt. We should check for too many failures and reinitialize the adapter. */ @@ -712,7 +716,7 @@ static void atp_interrupt(int irq, void spin_unlock(&lp->lock); if (net_debug > 5) printk("exiting interrupt.\n"); - return; + return IRQ_RETVAL(handled); } #ifdef TIMED_CHECKER --- linux-2.5.68/drivers/net/au1000_eth.c 2003-02-24 13:08:46.000000000 -0800 +++ 25/drivers/net/au1000_eth.c 2003-04-21 00:31:42.000000000 -0700 @@ -73,7 +73,7 @@ static int au1000_open(struct net_device static int au1000_close(struct net_device *); static int au1000_tx(struct sk_buff *, struct net_device *); static int au1000_rx(struct net_device *); -static void au1000_interrupt(int, void *, struct pt_regs *); +static irqreturn_t au1000_interrupt(int, void *, struct pt_regs *); static void au1000_tx_timeout(struct net_device *); static int au1000_set_config(struct net_device *dev, struct ifmap *map); static void set_rx_mode(struct net_device *); @@ -1236,16 +1236,17 @@ static int au1000_rx(struct net_device * /* * Au1000 interrupt service routine. */ -void au1000_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t au1000_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; if (dev == NULL) { printk(KERN_ERR "%s: isr: null dev ptr\n", dev->name); - return; + return IRQ_NONE; } au1000_tx_ack(dev); au1000_rx(dev); + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/b44.c 2003-01-16 18:22:04.000000000 -0800 +++ 25/drivers/net/b44.c 2003-04-21 00:31:42.000000000 -0700 @@ -799,12 +799,13 @@ static int b44_poll(struct net_device *n return (done ? 0 : 1); } -static void b44_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t b44_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct b44 *bp = dev->priv; unsigned long flags; u32 istat, imask; + int handled = 0; spin_lock_irqsave(&bp->lock, flags); @@ -816,6 +817,7 @@ static void b44_interrupt(int irq, void */ istat &= imask; if (istat) { + handled = 1; if (netif_rx_schedule_prep(dev)) { /* NOTE: These writes are posted by the readback of * the ISTAT register below. @@ -832,6 +834,7 @@ static void b44_interrupt(int irq, void br32(B44_ISTAT); } spin_unlock_irqrestore(&bp->lock, flags); + return IRQ_RETVAL(handled); } static void b44_tx_timeout(struct net_device *dev) --- linux-2.5.68/drivers/net/bagetlance.c 2003-01-16 18:21:35.000000000 -0800 +++ 25/drivers/net/bagetlance.c 2003-04-21 00:31:42.000000000 -0700 @@ -330,7 +330,7 @@ static int lance_probe1( struct net_devi static int lance_open( struct net_device *dev ); static void lance_init_ring( struct net_device *dev ); static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ); -static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp ); +static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp ); static int lance_rx( struct net_device *dev ); static int lance_close( struct net_device *dev ); static struct net_device_stats *lance_get_stats( struct net_device *dev ); @@ -965,16 +965,17 @@ static int lance_start_xmit( struct sk_b /* The LANCE interrupt handler. */ -static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp) +static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp) { struct net_device *dev = dev_id; struct lance_private *lp; struct lance_ioreg *IO; int csr0, boguscnt = 10; + int handled = 0; if (dev == NULL) { DPRINTK( 1, ( "lance_interrupt(): interrupt for unknown device.\n" )); - return; + return IRQ_NONE; } lp = (struct lance_private *)dev->priv; @@ -992,6 +993,7 @@ static void lance_interrupt( int irq, vo while( ((csr0 = DREG) & (CSR0_ERR | CSR0_TINT | CSR0_RINT)) && --boguscnt >= 0) { + handled = 1; /* Acknowledge all of the current interrupt sources ASAP. */ DREG = csr0 & ~(CSR0_INIT | CSR0_STRT | CSR0_STOP | CSR0_TDMD | CSR0_INEA); @@ -1083,7 +1085,7 @@ static void lance_interrupt( int irq, vo DPRINTK( 2, ( "%s: exiting interrupt, csr0=%#04x.\n", dev->name, DREG )); dev->interrupt = 0; - return; + return IRQ_RETVAL(handled); } --- linux-2.5.68/drivers/net/bmac.c 2003-02-14 17:35:06.000000000 -0800 +++ 25/drivers/net/bmac.c 2003-04-21 00:31:42.000000000 -0700 @@ -159,9 +159,9 @@ static void bmac_init_chip(struct net_de static void bmac_init_registers(struct net_device *dev); static void bmac_enable_and_reset_chip(struct net_device *dev); static int bmac_set_address(struct net_device *dev, void *addr); -static void bmac_misc_intr(int irq, void *dev_id, struct pt_regs *regs); -static void bmac_txdma_intr(int irq, void *dev_id, struct pt_regs *regs); -static void bmac_rxdma_intr(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t bmac_misc_intr(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t bmac_txdma_intr(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t bmac_rxdma_intr(int irq, void *dev_id, struct pt_regs *regs); static void bmac_set_timeout(struct net_device *dev); static void bmac_tx_timeout(unsigned long data); static int bmac_proc_info ( char *buffer, char **start, off_t offset, int length); @@ -703,7 +703,7 @@ static int bmac_transmit_packet(struct s static int rxintcount; -static void bmac_rxdma_intr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t bmac_rxdma_intr(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct bmac_data *bp = (struct bmac_data *) dev->priv; @@ -776,11 +776,12 @@ static void bmac_rxdma_intr(int irq, voi if (rxintcount < 10) { XXDEBUG(("bmac_rxdma_intr done\n")); } + return IRQ_HANDLED; } static int txintcount; -static void bmac_txdma_intr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t bmac_txdma_intr(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct bmac_data *bp = (struct bmac_data *) dev->priv; @@ -831,6 +832,7 @@ static void bmac_txdma_intr(int irq, voi } bmac_start(dev); + return IRQ_HANDLED; } static struct net_device_stats *bmac_stats(struct net_device *dev) @@ -1096,7 +1098,7 @@ static void bmac_set_multicast(struct ne static int miscintcount; -static void bmac_misc_intr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t bmac_misc_intr(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct bmac_data *bp = (struct bmac_data *)dev->priv; @@ -1117,6 +1119,7 @@ static void bmac_misc_intr(int irq, void if (status & TxErrorMask) bp->stats.tx_errors++; if (status & TxUnderrun) bp->stats.tx_fifo_errors++; if (status & TxNormalCollExp) bp->stats.collisions++; + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/net/cs89x0.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/cs89x0.c 2003-04-21 00:31:42.000000000 -0700 @@ -218,7 +218,7 @@ extern int cs89x0_probe(struct net_devic static int cs89x0_probe1(struct net_device *dev, int ioaddr); static int net_open(struct net_device *dev); static int net_send_packet(struct sk_buff *skb, struct net_device *dev); -static void net_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void set_multicast_list(struct net_device *dev); static void net_timeout(struct net_device *dev); static void net_rx(struct net_device *dev); @@ -1401,12 +1401,13 @@ static int net_send_packet(struct sk_buf /* The typical workload of the driver: Handle the network interface interrupts. */ -static void net_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; struct net_local *lp; int ioaddr, status; - + int handled = 0; + ioaddr = dev->base_addr; lp = (struct net_local *)dev->priv; @@ -1419,6 +1420,7 @@ static void net_interrupt(int irq, void vista, baby! */ while ((status = readword(dev, ISQ_PORT))) { if (net_debug > 4)printk("%s: event=%04x\n", dev->name, status); + handled = 1; switch(status & ISQ_EVENT_MASK) { case ISQ_RECEIVER_EVENT: /* Got a packet(s). */ @@ -1485,6 +1487,7 @@ static void net_interrupt(int irq, void break; } } + return IRQ_RETVAL(handled); } static void --- linux-2.5.68/drivers/net/de600.c 2003-01-16 18:22:50.000000000 -0800 +++ 25/drivers/net/de600.c 2003-04-21 00:31:42.000000000 -0700 @@ -258,7 +258,7 @@ static int de600_start_xmit(struct sk_bu * Handle the network interface interrupts. */ -static void de600_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t de600_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; u8 irq_status; @@ -268,7 +268,7 @@ static void de600_interrupt(int irq, voi /* This might just as well be deleted now, no crummy drivers present :-) */ if ((dev == NULL) || (DE600_IRQ != irq)) { printk(KERN_ERR "%s: bogus interrupt %d\n", dev?dev->name:"DE-600", irq); - return; + return IRQ_NONE; } spin_lock(&de600_lock); @@ -303,7 +303,7 @@ static void de600_interrupt(int irq, voi if (retrig) trigger_interrupt(dev); spin_unlock(&de600_lock); - return; + return IRQ_HANDLED; } static int de600_tx_intr(struct net_device *dev, int irq_status) --- linux-2.5.68/drivers/net/de620.c 2003-01-16 18:22:13.000000000 -0800 +++ 25/drivers/net/de620.c 2003-04-21 00:31:42.000000000 -0700 @@ -221,7 +221,7 @@ static void de620_set_multicast_list(str static int de620_start_xmit(struct sk_buff *, struct net_device *); /* Dispatch from interrupts. */ -static void de620_interrupt(int, void *, struct pt_regs *); +static irqreturn_t de620_interrupt(int, void *, struct pt_regs *); static int de620_rx_intr(struct net_device *); /* Initialization */ @@ -591,7 +591,8 @@ static int de620_start_xmit(struct sk_bu * Handle the network interface interrupts. * */ -static void de620_interrupt(int irq_in, void *dev_id, struct pt_regs *regs) +static irqreturn_t +de620_interrupt(int irq_in, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; byte irq_status; @@ -617,6 +618,7 @@ static void de620_interrupt(int irq_in, netif_wake_queue(dev); spin_unlock(&de620_lock); + return IRQ_HANDLED; } /************************************** --- linux-2.5.68/drivers/net/declance.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/declance.c 2003-04-21 00:31:42.000000000 -0700 @@ -709,7 +709,8 @@ out: spin_unlock(&lp->lock); } -static void lance_interrupt(const int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t +lance_interrupt(const int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct lance_private *lp = (struct lance_private *) dev->priv; @@ -763,6 +764,7 @@ static void lance_interrupt(const int ir writereg(&ll->rdp, LE_C0_INEA); writereg(&ll->rdp, LE_C0_INEA); + return IRQ_HANDLED; } struct net_device *last_dev = 0; --- linux-2.5.68/drivers/net/defxx.c 2003-01-16 18:21:33.000000000 -0800 +++ 25/drivers/net/defxx.c 2003-04-21 00:31:42.000000000 -0700 @@ -251,7 +251,7 @@ static int dfx_close(struct net_device static void dfx_int_pr_halt_id(DFX_board_t *bp); static void dfx_int_type_0_process(DFX_board_t *bp); static void dfx_int_common(struct net_device *dev); -static void dfx_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t dfx_interrupt(int irq, void *dev_id, struct pt_regs *regs); static struct net_device_stats *dfx_ctl_get_stats(struct net_device *dev); static void dfx_ctl_set_multicast_list(struct net_device *dev); @@ -1217,7 +1217,7 @@ static int dfx_open(struct net_device *d /* Register IRQ - support shared interrupts by passing device ptr */ - ret = request_irq(dev->irq, (void *)dfx_interrupt, SA_SHIRQ, dev->name, dev); + ret = request_irq(dev->irq, dfx_interrupt, SA_SHIRQ, dev->name, dev); if (ret) { printk(KERN_ERR "%s: Requested IRQ %d is busy\n", dev->name, dev->irq); return ret; @@ -1704,7 +1704,7 @@ static void dfx_int_common(struct net_de * Interrupts are disabled, then reenabled at the adapter. */ -static void dfx_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dfx_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; DFX_board_t *bp; /* private board structure pointer */ @@ -1756,7 +1756,8 @@ static void dfx_interrupt(int irq, void } spin_unlock(&bp->lock); - } + return IRQ_HANDLED; +} /* --- linux-2.5.68/drivers/net/depca.c 2003-02-14 17:35:06.000000000 -0800 +++ 25/drivers/net/depca.c 2003-04-21 00:31:42.000000000 -0700 @@ -430,7 +430,7 @@ struct depca_private { */ static int depca_open(struct net_device *dev); static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev); -static void depca_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t depca_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int depca_close(struct net_device *dev); static int depca_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static void depca_tx_timeout(struct net_device *dev); @@ -894,7 +894,7 @@ static int depca_start_xmit(struct sk_bu /* ** The DEPCA interrupt handler. */ -static void depca_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t depca_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct depca_private *lp; @@ -903,7 +903,7 @@ static void depca_interrupt(int irq, voi if (dev == NULL) { printk("depca_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } lp = (struct depca_private *) dev->priv; @@ -938,6 +938,7 @@ static void depca_interrupt(int irq, voi outb(nicsr, DEPCA_NICSR); spin_unlock(&lp->lock); + return IRQ_HANDLED; } /* Called with lp->lock held */ --- linux-2.5.68/drivers/net/dgrs.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/net/dgrs.c 2003-04-21 00:31:42.000000000 -0700 @@ -888,7 +888,7 @@ static int dgrs_ioctl(struct net_device * dev, priv will always refer to the 0th device in Multi-NIC mode. */ -static void dgrs_intr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dgrs_intr(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev0 = (struct net_device *) dev_id; DGRS_PRIV *priv0 = (DGRS_PRIV *) dev0->priv; @@ -971,6 +971,7 @@ static void dgrs_intr(int irq, void *dev ack_intr: if (priv0->plxreg) OUTL(dev0->base_addr + PLX_LCL2PCI_DOORBELL, 1); + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/net/dl2k.c 2003-01-16 18:22:04.000000000 -0800 +++ 25/drivers/net/dl2k.c 2003-04-21 00:31:42.000000000 -0700 @@ -98,7 +98,7 @@ static void rio_timer (unsigned long dat static void rio_tx_timeout (struct net_device *dev); static void alloc_list (struct net_device *dev); static int start_xmit (struct sk_buff *skb, struct net_device *dev); -static void rio_interrupt (int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t rio_interrupt (int irq, void *dev_instance, struct pt_regs *regs); static void rio_free_tx (struct net_device *dev, int irq); static void tx_error (struct net_device *dev, int tx_status); static int receive_packet (struct net_device *dev); @@ -699,7 +699,7 @@ start_xmit (struct sk_buff *skb, struct return 0; } -static void +static irqreturn_t rio_interrupt (int irq, void *dev_instance, struct pt_regs *rgs) { struct net_device *dev = dev_instance; @@ -707,6 +707,7 @@ rio_interrupt (int irq, void *dev_instan unsigned int_status; long ioaddr; int cnt = max_intrloop; + int handled = 0; ioaddr = dev->base_addr; np = dev->priv; @@ -716,6 +717,7 @@ rio_interrupt (int irq, void *dev_instan int_status &= DEFAULT_INTR; if (int_status == 0 || --cnt < 0) break; + handled = 1; /* Processing received packets */ if (int_status & RxDMAComplete) receive_packet (dev); @@ -736,6 +738,7 @@ rio_interrupt (int irq, void *dev_instan } if (np->cur_tx != np->old_tx) writel (100, ioaddr + CountDown); + return IRQ_RETVAL(handled); } static void --- linux-2.5.68/drivers/net/e1000/e1000_main.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/e1000/e1000_main.c 2003-04-21 00:31:42.000000000 -0700 @@ -154,7 +154,7 @@ static int e1000_set_mac(struct net_devi static void e1000_update_stats(struct e1000_adapter *adapter); static inline void e1000_irq_disable(struct e1000_adapter *adapter); static inline void e1000_irq_enable(struct e1000_adapter *adapter); -static void e1000_intr(int irq, void *data, struct pt_regs *regs); +static irqreturn_t e1000_intr(int irq, void *data, struct pt_regs *regs); #ifdef CONFIG_E1000_NAPI static int e1000_clean(struct net_device *netdev, int *budget); static boolean_t e1000_clean_rx_irq(struct e1000_adapter *adapter, @@ -1981,7 +1981,7 @@ e1000_irq_enable(struct e1000_adapter *a * @pt_regs: CPU registers structure **/ -static void +static irqreturn_t e1000_intr(int irq, void *data, struct pt_regs *regs) { struct net_device *netdev = data; @@ -1992,7 +1992,7 @@ e1000_intr(int irq, void *data, struct p #endif if(!icr) - return; /* Not our interrupt */ + return IRQ_NOEN; /* Not our interrupt */ if(icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) { adapter->hw.get_link_status = 1; @@ -2016,6 +2016,7 @@ e1000_intr(int irq, void *data, struct p !e1000_clean_tx_irq(adapter)) break; #endif + return IRQ_HANDLED; } #ifdef CONFIG_E1000_NAPI --- linux-2.5.68/drivers/net/e100/e100_main.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/e100/e100_main.c 2003-04-21 00:31:39.000000000 -0700 @@ -190,7 +190,7 @@ static unsigned char e100_init(struct e1 static int e100_set_mac(struct net_device *, void *); struct net_device_stats *e100_get_stats(struct net_device *); -static void e100intr(int, void *, struct pt_regs *); +static irqreturn_t e100intr(int, void *, struct pt_regs *); static void e100_print_brd_conf(struct e100_private *); static void e100_set_multi(struct net_device *); void e100_set_speed_duplex(struct e100_private *); @@ -1837,7 +1837,7 @@ e100_manage_adaptive_ifs(struct e100_pri * the RX & TX queues & starts the RU if it has stopped due * to no resources. */ -void +irqreturn_t e100intr(int irq, void *dev_inst, struct pt_regs *regs) { struct net_device *dev; @@ -1850,7 +1850,7 @@ e100intr(int irq, void *dev_inst, struct intr_status = readw(&bdp->scb->scb_status); /* If not my interrupt, just return */ if (!(intr_status & SCB_STATUS_ACK_MASK) || (intr_status == 0xffff)) { - return; + return IRQ_NONE; } /* disable and ack intr */ @@ -1859,7 +1859,7 @@ e100intr(int irq, void *dev_inst, struct /* the device is closed, don't continue or else bad things may happen. */ if (!netif_running(dev)) { e100_set_intr_mask(bdp); - return; + return IRQ_NONE; } /* SWI intr (triggered by watchdog) is signal to allocate new skb buffers */ @@ -1877,6 +1877,7 @@ e100intr(int irq, void *dev_inst, struct e100_tx_srv(bdp); e100_set_intr_mask(bdp); + return IRQ_HANDLED; } /** --- linux-2.5.68/drivers/net/eepro100.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/net/eepro100.c 2003-04-21 00:31:42.000000000 -0700 @@ -541,7 +541,7 @@ static int speedo_start_xmit(struct sk_b static void speedo_refill_rx_buffers(struct net_device *dev, int force); static int speedo_rx(struct net_device *dev); static void speedo_tx_buffer_gc(struct net_device *dev); -static void speedo_interrupt(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t speedo_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static int speedo_close(struct net_device *dev); static struct net_device_stats *speedo_get_stats(struct net_device *dev); static int speedo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); @@ -1560,12 +1560,13 @@ static void speedo_tx_buffer_gc(struct n /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void speedo_interrupt(int irq, void *dev_instance, struct pt_regs *regs) +static irqreturn_t speedo_interrupt(int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_instance; struct speedo_private *sp; long ioaddr, boguscnt = max_interrupt_work; unsigned short status; + int handled = 0; ioaddr = dev->base_addr; sp = (struct speedo_private *)dev->priv; @@ -1576,7 +1577,7 @@ static void speedo_interrupt(int irq, vo printk(KERN_ERR"%s: SMP simultaneous entry of an interrupt handler.\n", dev->name); sp->in_interrupt = 0; /* Avoid halting machine. */ - return; + return IRQ_NONE; } #endif @@ -1594,6 +1595,7 @@ static void speedo_interrupt(int irq, vo if ((status & 0xfc00) == 0) break; + handled = 1; if ((status & 0x5000) || /* Packet received, or Rx error. */ (sp->rx_ring_state&(RrNoMem|RrPostponed)) == RrPostponed) @@ -1654,7 +1656,7 @@ static void speedo_interrupt(int irq, vo dev->name, inw(ioaddr + SCBStatus)); clear_bit(0, (void*)&sp->in_interrupt); - return; + return IRQ_RETVAL(handled); } static inline struct RxFD *speedo_rx_alloc(struct net_device *dev, int entry) --- linux-2.5.68/drivers/net/eepro.c 2003-01-16 18:22:26.000000000 -0800 +++ 25/drivers/net/eepro.c 2003-04-21 00:31:42.000000000 -0700 @@ -307,7 +307,7 @@ extern int eepro_probe(struct net_device static int eepro_probe1(struct net_device *dev, short ioaddr); static int eepro_open(struct net_device *dev); static int eepro_send_packet(struct sk_buff *skb, struct net_device *dev); -static void eepro_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t eepro_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void eepro_rx(struct net_device *dev); static void eepro_transmit_interrupt(struct net_device *dev); static int eepro_close(struct net_device *dev); @@ -1178,17 +1178,18 @@ static int eepro_send_packet(struct sk_b /* The typical workload of the driver: Handle the network interface interrupts. */ -static void +static irqreturn_t eepro_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = (struct net_device *)dev_id; /* (struct net_device *)(irq2dev_map[irq]);*/ struct eepro_local *lp; int ioaddr, status, boguscount = 20; + int handled = 0; if (dev == NULL) { printk (KERN_ERR "eepro_interrupt(): irq %d for unknown device.\\n", irq); - return; + return IRQ_NONE; } lp = (struct eepro_local *)dev->priv; @@ -1202,6 +1203,7 @@ eepro_interrupt(int irq, void *dev_id, s while (((status = inb(ioaddr + STATUS_REG)) & (RX_INT|TX_INT)) && (boguscount--)) { + handled = 1; if (status & RX_INT) { if (net_debug > 4) printk(KERN_DEBUG "%s: packet received interrupt.\n", dev->name); @@ -1233,7 +1235,7 @@ eepro_interrupt(int irq, void *dev_id, s printk(KERN_DEBUG "%s: exiting eepro_interrupt routine.\n", dev->name); spin_unlock(&lp->lock); - return; + return IRQ_RETVAL(handled); } static int eepro_close(struct net_device *dev) --- linux-2.5.68/drivers/net/eexpress.c 2003-02-14 17:35:06.000000000 -0800 +++ 25/drivers/net/eexpress.c 2003-04-21 00:31:42.000000000 -0700 @@ -252,7 +252,7 @@ static void eexp_timeout(struct net_devi static struct net_device_stats *eexp_stats(struct net_device *dev); static int eexp_xmit(struct sk_buff *buf, struct net_device *dev); -static void eexp_irq(int irq, void *dev_addr, struct pt_regs *regs); +static irqreturn_t eexp_irq(int irq, void *dev_addr, struct pt_regs *regs); static void eexp_set_multicast(struct net_device *dev); /* @@ -761,7 +761,7 @@ static void eexp_cmd_clear(struct net_de } } -static void eexp_irq(int irq, void *dev_info, struct pt_regs *regs) +static irqreturn_t eexp_irq(int irq, void *dev_info, struct pt_regs *regs) { struct net_device *dev = dev_info; struct net_local *lp; @@ -772,7 +772,7 @@ static void eexp_irq(int irq, void *dev_ { printk(KERN_WARNING "eexpress: irq %d for unknown device\n", irq); - return; + return IRQ_NONE; } lp = (struct net_local *)dev->priv; @@ -860,7 +860,7 @@ static void eexp_irq(int irq, void *dev_ outw(old_write_ptr, ioaddr+WRITE_PTR); spin_unlock(&lp->lock); - return; + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/net/epic100.c 2003-01-16 18:22:07.000000000 -0800 +++ 25/drivers/net/epic100.c 2003-04-21 00:31:42.000000000 -0700 @@ -360,7 +360,7 @@ static void epic_tx_timeout(struct net_d static void epic_init_ring(struct net_device *dev); static int epic_start_xmit(struct sk_buff *skb, struct net_device *dev); static int epic_rx(struct net_device *dev); -static void epic_interrupt(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t epic_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static int epic_close(struct net_device *dev); static struct net_device_stats *epic_get_stats(struct net_device *dev); @@ -1028,12 +1028,13 @@ static int epic_start_xmit(struct sk_buf /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void epic_interrupt(int irq, void *dev_instance, struct pt_regs *regs) +static irqreturn_t epic_interrupt(int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = dev_instance; struct epic_private *ep = dev->priv; long ioaddr = dev->base_addr; int status, boguscnt = max_interrupt_work; + int handled = 0; do { status = inl(ioaddr + INTSTAT); @@ -1048,6 +1049,8 @@ static void epic_interrupt(int irq, void if ((status & IntrSummary) == 0) break; + handled = 1; + if (status & (RxDone | RxStarted | RxEarlyWarn | RxOverflow)) epic_rx(dev); @@ -1156,7 +1159,7 @@ static void epic_interrupt(int irq, void printk(KERN_DEBUG "%s: exiting interrupt, intr_status=%#4.4x.\n", dev->name, status); - return; + return IRQ_RETVAL(handled); } static int epic_rx(struct net_device *dev) --- linux-2.5.68/drivers/net/eth16i.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/net/eth16i.c 2003-04-21 00:31:42.000000000 -0700 @@ -412,7 +412,7 @@ static int eth16i_close(struct net_d static int eth16i_tx(struct sk_buff *skb, struct net_device *dev); static void eth16i_rx(struct net_device *dev); static void eth16i_timeout(struct net_device *dev); -static void eth16i_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t eth16i_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void eth16i_reset(struct net_device *dev); static void eth16i_timeout(struct net_device *dev); static void eth16i_skip_packet(struct net_device *dev); @@ -1219,11 +1219,12 @@ static void eth16i_rx(struct net_device } /* while */ } -static void eth16i_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t eth16i_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct eth16i_local *lp; int ioaddr = 0, status; + int handled = 0; ioaddr = dev->base_addr; lp = (struct eth16i_local *)dev->priv; @@ -1237,6 +1238,9 @@ static void eth16i_interrupt(int irq, vo status = inw(ioaddr + TX_STATUS_REG); /* Get the status */ outw(status, ioaddr + TX_STATUS_REG); /* Clear status bits */ + if (status) + handled = 1; + if(eth16i_debug > 3) printk(KERN_DEBUG "%s: Interrupt with status %04x.\n", dev->name, status); @@ -1314,7 +1318,7 @@ static void eth16i_interrupt(int irq, vo spin_unlock(&lp->lock); - return; + return IRQ_RETVAL(handled); } static void eth16i_skip_packet(struct net_device *dev) --- linux-2.5.68/drivers/net/ewrk3.c 2003-01-16 18:22:52.000000000 -0800 +++ 25/drivers/net/ewrk3.c 2003-04-21 00:31:42.000000000 -0700 @@ -300,7 +300,7 @@ struct ewrk3_private { */ static int ewrk3_open(struct net_device *dev); static int ewrk3_queue_pkt(struct sk_buff *skb, struct net_device *dev); -static void ewrk3_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t ewrk3_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int ewrk3_close(struct net_device *dev); static struct net_device_stats *ewrk3_get_stats(struct net_device *dev); static void set_multicast_list(struct net_device *dev); @@ -896,7 +896,7 @@ err_out: /* ** The EWRK3 interrupt handler. */ -static void ewrk3_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t ewrk3_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct ewrk3_private *lp; @@ -945,6 +945,7 @@ static void ewrk3_interrupt(int irq, voi outb(cr, EWRK3_CR); ENABLE_IRQs; spin_unlock(&lp->hw_lock); + return IRQ_HANDLED; } /* Called with lp->hw_lock held */ --- linux-2.5.68/drivers/net/fc/iph5526.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/fc/iph5526.c 2003-04-21 00:31:42.000000000 -0700 @@ -134,7 +134,7 @@ clone_list[] __initdata = { {0,} }; -static void tachyon_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t tachyon_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void tachyon_interrupt_handler(int irq, void* dev_id, struct pt_regs* regs); static int initialize_register_pointers(struct fc_info *fi); @@ -623,7 +623,7 @@ u_int bus_addr, bus_indx_addr, i; } -static void tachyon_interrupt(int irq, void* dev_id, struct pt_regs* regs) +static irqreturn_t tachyon_interrupt(int irq, void* dev_id, struct pt_regs* regs) { struct Scsi_Host *host = dev_id; struct iph5526_hostdata *hostdata = (struct iph5526_hostdata *)host->hostdata; @@ -632,6 +632,7 @@ u_long flags; spin_lock_irqsave(&fi->fc_lock, flags); tachyon_interrupt_handler(irq, dev_id, regs); spin_unlock_irqrestore(&fi->fc_lock, flags); + return IRQ_HANDLED; } static void tachyon_interrupt_handler(int irq, void* dev_id, struct pt_regs* regs) --- linux-2.5.68/drivers/net/fealnx.c 2003-02-10 12:24:14.000000000 -0800 +++ 25/drivers/net/fealnx.c 2003-04-21 00:31:42.000000000 -0700 @@ -438,7 +438,7 @@ static void netdev_timer(unsigned long d static void tx_timeout(struct net_device *dev); static void init_ring(struct net_device *dev); static int start_tx(struct sk_buff *skb, struct net_device *dev); -static void intr_handler(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *regs); static int netdev_rx(struct net_device *dev); static void set_rx_mode(struct net_device *dev); static struct net_device_stats *get_stats(struct net_device *dev); @@ -1412,12 +1412,13 @@ void reset_rx_descriptors(struct net_dev /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void intr_handler(int irq, void *dev_instance, struct pt_regs *rgs) +static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs) { struct net_device *dev = (struct net_device *) dev_instance; struct netdev_private *np = dev->priv; long ioaddr, boguscnt = max_interrupt_work; unsigned int num_tx = 0; + int handled = 0; writel(0, dev->base_addr + IMR); @@ -1437,6 +1438,8 @@ static void intr_handler(int irq, void * if (!(intr_status & np->imrvalue)) break; + handled = 1; + // 90/1/16 delete, // // if (intr_status & FBE) @@ -1559,7 +1562,7 @@ static void intr_handler(int irq, void * writel(np->imrvalue, ioaddr + IMR); - return; + return IRQ_RETVAL(handled); } --- linux-2.5.68/drivers/net/fec.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/fec.c 2003-04-21 00:31:42.000000000 -0700 @@ -188,7 +188,7 @@ struct fec_enet_private { static int fec_enet_open(struct net_device *dev); static int fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev); static void fec_enet_mii(struct net_device *dev); -static void fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs); +static irqreturn_t fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs); static void fec_enet_tx(struct net_device *dev); static void fec_enet_rx(struct net_device *dev); static int fec_enet_close(struct net_device *dev); @@ -393,12 +393,13 @@ fec_timeout(struct net_device *dev) /* The interrupt handler. * This is called from the MPC core interrupt. */ -static void +static irqreturn_t fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; volatile fec_t *fecp; uint int_events; + int handled = 0; fecp = (volatile fec_t*)dev->base_addr; @@ -413,20 +414,27 @@ fec_enet_interrupt(int irq, void * dev_i /* Handle receive event in its own function. */ - if (int_events & FEC_ENET_RXF) + if (int_events & FEC_ENET_RXF) { + handled = 1; fec_enet_rx(dev); + } /* Transmit OK, or non-fatal error. Update the buffer descriptors. FEC handles all errors, we just discover them as part of the transmit process. */ - if (int_events & FEC_ENET_TXF) + if (int_events & FEC_ENET_TXF) { + handled = 1; fec_enet_tx(dev); + } - if (int_events & FEC_ENET_MII) + if (int_events & FEC_ENET_MII) { + handled = 1; fec_enet_mii(dev); + } } + return IRQ_RETVAL(handled); } --- linux-2.5.68/drivers/net/fmv18x.c 2003-01-16 18:21:38.000000000 -0800 +++ 25/drivers/net/fmv18x.c 2003-04-21 00:31:42.000000000 -0700 @@ -114,7 +114,7 @@ extern int fmv18x_probe(struct net_devic static int fmv18x_probe1(struct net_device *dev, short ioaddr); static int net_open(struct net_device *dev); static int net_send_packet(struct sk_buff *skb, struct net_device *dev); -static void net_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void net_rx(struct net_device *dev); static void net_timeout(struct net_device *dev); static int net_close(struct net_device *dev); @@ -423,7 +423,7 @@ static int net_send_packet(struct sk_buf /* The typical workload of the driver: Handle the network interface interrupts. */ -static void +static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; @@ -476,7 +476,7 @@ net_interrupt(int irq, void *dev_id, str spin_unlock(&lp->lock); } } - return; + return IRQ_RETVAL(status); } /* We have a good packet(s), get it/them out of the buffers. */ --- linux-2.5.68/drivers/net/gt96100eth.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/net/gt96100eth.c 2003-04-21 00:31:42.000000000 -0700 @@ -108,7 +108,7 @@ static int gt96100_open(struct net_devic static int gt96100_close(struct net_device *dev); static int gt96100_tx(struct sk_buff *skb, struct net_device *dev); static int gt96100_rx(struct net_device *dev, u32 status); -static void gt96100_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t gt96100_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void gt96100_tx_timeout(struct net_device *dev); static void gt96100_set_rx_mode(struct net_device *dev); static struct net_device_stats* gt96100_get_stats(struct net_device *dev); @@ -1392,16 +1392,17 @@ gt96100_tx_complete(struct net_device *d } -static void +static irqreturn_t gt96100_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; struct gt96100_private *gp = (struct gt96100_private *)dev->priv; u32 status; - + int handled = 0; + if (dev == NULL) { err("%s: null dev ptr\n", __FUNCTION__); - return; + return IRQ_NONE; } dbg(3, "%s: entry, icr=%x\n", __FUNCTION__, @@ -1420,7 +1421,9 @@ gt96100_interrupt(int irq, void *dev_id, if ((status & icrEtherIntSum) == 0 && !(status & (icrTxBufferLow|icrTxBufferHigh|icrRxBuffer))) break; - + + handled = 1; + if (status & icrMIIPhySTC) { u32 psr = GT96100ETH_READ(gp, GT96100_ETH_PORT_STATUS); if (gp->last_psr != psr) { @@ -1487,6 +1490,7 @@ gt96100_interrupt(int irq, void *dev_id, GT96100ETH_READ(gp, GT96100_ETH_INT_CAUSE)); spin_unlock(&gp->lock); + return IRQ_RETVAL(handled); } --- linux-2.5.68/drivers/net/hamachi.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/hamachi.c 2003-04-21 00:31:42.000000000 -0700 @@ -558,7 +558,7 @@ static void hamachi_timer(unsigned long static void hamachi_tx_timeout(struct net_device *dev); static void hamachi_init_ring(struct net_device *dev); static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev); -static void hamachi_interrupt(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t hamachi_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static inline int hamachi_rx(struct net_device *dev); static inline int hamachi_tx(struct net_device *dev); static void hamachi_error(struct net_device *dev, int intr_status); @@ -1367,16 +1367,17 @@ static int hamachi_start_xmit(struct sk_ /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void hamachi_interrupt(int irq, void *dev_instance, struct pt_regs *rgs) +static irqreturn_t hamachi_interrupt(int irq, void *dev_instance, struct pt_regs *rgs) { struct net_device *dev = dev_instance; struct hamachi_private *hmp; long ioaddr, boguscnt = max_interrupt_work; + int handled = 0; #ifndef final_version /* Can never occur. */ if (dev == NULL) { printk (KERN_ERR "hamachi_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } #endif @@ -1394,6 +1395,8 @@ static void hamachi_interrupt(int irq, v if (intr_status == 0) break; + handled = 1; + if (intr_status & IntrRxDone) hamachi_rx(dev); @@ -1466,6 +1469,7 @@ static void hamachi_interrupt(int irq, v #endif spin_unlock(&hmp->lock); + return IRQ_RETVAL(handled); } /* This routine is logically part of the interrupt handler, but separated --- linux-2.5.68/drivers/net/hamradio/baycom_ser_fdx.c 2003-01-16 18:22:17.000000000 -0800 +++ 25/drivers/net/hamradio/baycom_ser_fdx.c 2003-04-21 00:31:42.000000000 -0700 @@ -279,7 +279,7 @@ static __inline__ void ser12_rx(struct n /* --------------------------------------------------------------------- */ -static void ser12_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t ser12_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; struct baycom_state *bc = (struct baycom_state *)dev->priv; @@ -288,10 +288,10 @@ static void ser12_interrupt(int irq, voi unsigned int txcount = 0; if (!bc || bc->hdrv.magic != HDLCDRV_MAGIC) - return; + return IRQ_NONE; /* fast way out for shared irq */ if ((iir = inb(IIR(dev->base_addr))) & 1) - return; + return IRQ_NONE; /* get current time */ do_gettimeofday(&tv); msr = inb(MSR(dev->base_addr)); @@ -362,6 +362,7 @@ static void ser12_interrupt(int irq, voi hdlcdrv_transmitter(dev, &bc->hdrv); hdlcdrv_receiver(dev, &bc->hdrv); local_irq_disable(); + return IRQ_HANDLED; } /* --------------------------------------------------------------------- */ --- linux-2.5.68/drivers/net/hamradio/baycom_ser_hdx.c 2003-01-16 18:21:36.000000000 -0800 +++ 25/drivers/net/hamradio/baycom_ser_hdx.c 2003-04-21 00:31:42.000000000 -0700 @@ -373,17 +373,17 @@ static inline void ser12_rx(struct net_d /* --------------------------------------------------------------------- */ -static void ser12_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t ser12_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; struct baycom_state *bc = (struct baycom_state *)dev->priv; unsigned char iir; if (!dev || !bc || bc->hdrv.magic != HDLCDRV_MAGIC) - return; + return IRQ_NONE; /* fast way out */ if ((iir = inb(IIR(dev->base_addr))) & 1) - return; + return IRQ_NONE; baycom_int_freq(bc); do { switch (iir & 6) { @@ -423,6 +423,7 @@ static void ser12_interrupt(int irq, voi hdlcdrv_transmitter(dev, &bc->hdrv); hdlcdrv_receiver(dev, &bc->hdrv); local_irq_disable(); + return IRQ_HANDLED; } /* --------------------------------------------------------------------- */ --- linux-2.5.68/drivers/net/hamradio/dmascc.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/net/hamradio/dmascc.c 2003-04-21 02:45:04.000000000 -0700 @@ -266,7 +266,7 @@ static int scc_send_packet(struct sk_buf static struct net_device_stats *scc_get_stats(struct net_device *dev); static int scc_set_mac_address(struct net_device *dev, void *sa); -static void scc_isr(int irq, void *dev_id, struct pt_regs * regs); +static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs); static inline void z8530_isr(struct scc_info *info); static void rx_isr(struct scc_priv *priv); static void special_condition(struct scc_priv *priv, int rc); @@ -674,7 +674,7 @@ static int read_scc(struct scc_priv *pri if (reg) outb_p(reg, priv->scc_cmd); return inb_p(priv->scc_cmd); default: - spin_lock_irqsave(&priv->register_lock, flags); + spin_lock_irqsave(priv->register_lock, flags); outb_p(0, priv->card_base + PI_DREQ_MASK); if (reg) outb_p(reg, priv->scc_cmd); rc = inb_p(priv->scc_cmd); @@ -949,7 +949,7 @@ static int scc_set_mac_address(struct ne } -static void scc_isr(int irq, void *dev_id, struct pt_regs * regs) { +static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs) { struct scc_info *info = dev_id; spin_lock(info->priv[0].register_lock); @@ -981,6 +981,7 @@ static void scc_isr(int irq, void *dev_i } } else z8530_isr(info); spin_unlock(info->priv[0].register_lock); + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/hamradio/Kconfig 2003-02-10 12:24:14.000000000 -0800 +++ 25/drivers/net/hamradio/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -60,7 +60,7 @@ config DMASCC Currently, this driver supports Ottawa PI/PI2, Paccomm/Gracilis PackeTwin, and S5SCC/DMA boards. They are detected automatically. If you have one of these cards, say Y here and read the AX25-HOWTO, - available from . + available from . This driver can operate multiple boards simultaneously. If you compile it as a module (by saying M instead of Y), it will be called @@ -88,7 +88,7 @@ config SCC in order to communicate with other computers. If you want to use this, read and the AX25-HOWTO, available from - . Also make sure to say Y + . Also make sure to say Y to "Amateur Radio AX.25 Level 2" support. If you want to compile this as a module ( = code which can be --- linux-2.5.68/drivers/net/hamradio/scc.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/hamradio/scc.c 2003-04-21 00:31:42.000000000 -0700 @@ -199,7 +199,7 @@ static void z8530_init(void); static void init_channel(struct scc_channel *scc); static void scc_key_trx (struct scc_channel *scc, char tx); -static void scc_isr(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs *regs); static void scc_init_timer(struct scc_channel *scc); static int scc_net_setup(struct scc_channel *scc, unsigned char *name, int addev); @@ -625,7 +625,7 @@ static void scc_isr_dispatch(struct scc_ #define SCC_IRQTIMEOUT 30000 -static void scc_isr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs *regs) { unsigned char vector; struct scc_channel *scc; @@ -653,7 +653,7 @@ static void scc_isr(int irq, void *dev_i if (k == SCC_IRQTIMEOUT) printk(KERN_WARNING "z8530drv: endless loop in scc_isr()?\n"); - return; + return IRQ_HANDLED; } /* Find the SCC generating the interrupt by polling all attached SCCs @@ -701,6 +701,7 @@ static void scc_isr(int irq, void *dev_i } else ctrl++; } + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/hamradio/yam.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/hamradio/yam.c 2003-04-21 00:31:42.000000000 -0700 @@ -714,7 +714,7 @@ static void yam_tx_byte(struct net_devic * ISR routine ************************************************************************************/ -static void yam_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t yam_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev; struct yam_port *yp; @@ -758,6 +758,7 @@ static void yam_interrupt(int irq, void } } } + return IRQ_HANDLED; } static int yam_net_get_info(char *buffer, char **start, off_t offset, int length) --- linux-2.5.68/drivers/net/hp100.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/hp100.c 2003-04-21 00:31:42.000000000 -0700 @@ -320,7 +320,7 @@ static void hp100_misc_interrupt(struct static void hp100_update_stats(struct net_device *dev); static void hp100_clear_stats(struct hp100_private *lp, int ioaddr); static void hp100_set_multicast_list(struct net_device *dev); -static void hp100_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t hp100_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void hp100_start_interface(struct net_device *dev); static void hp100_stop_interface(struct net_device *dev); static void hp100_load_eeprom(struct net_device *dev, u_short ioaddr); @@ -2271,7 +2271,7 @@ static void hp100_set_multicast_list(str * hardware interrupt handling */ -static void hp100_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t hp100_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct hp100_private *lp = (struct hp100_private *) dev->priv; @@ -2280,7 +2280,7 @@ static void hp100_interrupt(int irq, voi u_int val; if (dev == NULL) - return; + return IRQ_NONE; ioaddr = dev->base_addr; spin_lock(&lp->lock); @@ -2302,7 +2302,7 @@ static void hp100_interrupt(int irq, voi if (val == 0) { /* might be a shared interrupt */ spin_unlock(&lp->lock); hp100_ints_on(); - return; + return IRQ_NONE; } /* We're only interested in those interrupts we really enabled. */ /* val &= hp100_inw( IRQ_MASK ); */ @@ -2394,6 +2394,7 @@ static void hp100_interrupt(int irq, voi spin_unlock(&lp->lock); hp100_ints_on(); + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/net/ibmlana.c 2003-01-16 18:21:44.000000000 -0800 +++ 25/drivers/net/ibmlana.c 2003-04-21 00:31:42.000000000 -0700 @@ -701,14 +701,14 @@ static void irqtxerr_handler(struct net_ /* general interrupt entry */ -static void irq_handler(int irq, void *device, struct pt_regs *regs) +static irqreturn_t irq_handler(int irq, void *device, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) device; u16 ival; /* in case we're not meant... */ if (!(inb(dev->base_addr + BCMREG) & BCMREG_IPEND)) - return; + return IRQ_NONE; /* loop through the interrupt bits until everything is clear */ while (1) { @@ -732,6 +732,7 @@ static void irq_handler(int irq, void *d } break; } + return IRQ_HANDLED; } /* ------------------------------------------------------------------------ --- linux-2.5.68/drivers/net/ioc3-eth.c 2003-01-16 18:21:38.000000000 -0800 +++ 25/drivers/net/ioc3-eth.c 2003-04-21 00:31:42.000000000 -0700 @@ -681,7 +681,7 @@ ioc3_error(struct ioc3_private *ip, u32 /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void ioc3_interrupt(int irq, void *_dev, struct pt_regs *regs) +static irqreturn_t ioc3_interrupt(int irq, void *_dev, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)_dev; struct ioc3_private *ip = dev->priv; @@ -707,6 +707,7 @@ static void ioc3_interrupt(int irq, void eisr = ioc3->eisr & enabled; } + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/net/irda/ali-ircc.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/irda/ali-ircc.c 2003-04-21 00:31:42.000000000 -0700 @@ -95,7 +95,7 @@ static int ali_ircc_net_close(struct ne static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static int ali_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data); static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud); -static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void ali_ircc_suspend(struct ali_ircc_cb *self); static void ali_ircc_wakeup(struct ali_ircc_cb *self); static struct net_device_stats *ali_ircc_net_get_stats(struct net_device *dev); @@ -632,7 +632,7 @@ static int ali_ircc_read_dongle_id (int * An interrupt from the chip has arrived. Time to do some work * */ -static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct ali_ircc_cb *self; @@ -641,7 +641,7 @@ static void ali_ircc_interrupt(int irq, if (!dev) { WARNING("%s: irq %d for unknown device.\n", driver_name, irq); - return; + return IRQ_NONE; } self = (struct ali_ircc_cb *) dev->priv; @@ -657,6 +657,7 @@ static void ali_ircc_interrupt(int irq, spin_unlock(&self->lock); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__); + return IRQ_HANDLED; } /* * Function ali_ircc_fir_interrupt(irq, struct ali_ircc_cb *self, regs) --- linux-2.5.68/drivers/net/irda/donauboe.c 2003-01-16 18:22:05.000000000 -0800 +++ 25/drivers/net/irda/donauboe.c 2003-04-21 02:55:03.000000000 -0700 @@ -745,20 +745,20 @@ STATIC int toshoboe_invalid_dev(int irq) return 1; } -STATIC void +STATIC irqreturn_t toshoboe_probeinterrupt (int irq, void *dev_id, struct pt_regs *regs) { struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id; __u8 irqstat; if (self == NULL && toshoboe_invalid_dev(irq)) - return; + return IRQ_NONE; irqstat = INB (OBOE_ISR); /* was it us */ if (!(irqstat & OBOE_INT_MASK)) - return; + return IRQ_NONE; /* Ack all the interrupts */ OUTB (irqstat, OBOE_ISR); @@ -791,6 +791,7 @@ toshoboe_probeinterrupt (int irq, void * if (irqstat & OBOE_INT_SIP) { self->int_sip++; PROBE_DEBUG("I"); } + return IRQ_HANDLED; } STATIC int @@ -1193,7 +1194,7 @@ dumpbufs(skb->data,skb->len,'>'); } /*interrupt handler */ -STATIC void +STATIC irqreturn_t toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs) { struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id; @@ -1201,13 +1202,13 @@ toshoboe_interrupt (int irq, void *dev_i struct sk_buff *skb = NULL; if (self == NULL && toshoboe_invalid_dev(irq)) - return; + return IRQ_NONE; irqstat = INB (OBOE_ISR); /* was it us */ if (!(irqstat & OBOE_INT_MASK)) - return; + return IRQ_NONE; /* Ack all the interrupts */ OUTB (irqstat, OBOE_ISR); @@ -1381,6 +1382,7 @@ dumpbufs(self->rx_bufs[self->rxs],len,'< IRDA_DEBUG (1, "%s.sip:%x(%x)%x\n", __FUNCTION__ ,self->int_sip,irqstat,self->txpending); } + return IRQ_HANDLED; } STATIC int --- linux-2.5.68/drivers/net/irda/irport.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/irda/irport.c 2003-04-21 02:53:21.000000000 -0700 @@ -720,17 +720,18 @@ static void irport_receive(struct irport * * Interrupt handler */ -void irport_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t irport_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct irport_cb *self; int boguscount = 0; int iobase; int iir, lsr; + int handled = 0; if (!dev) { WARNING("%s() irq %d for unknown device.\n", __FUNCTION__, irq); - return; + return IRQ_NONE; } self = (struct irport_cb *) dev->priv; @@ -740,6 +741,8 @@ void irport_interrupt(int irq, void *dev iir = inb(iobase+UART_IIR) & UART_IIR_ID; while (iir) { + handled = 1; + /* Clear interrupt */ lsr = inb(iobase+UART_LSR); @@ -771,6 +774,7 @@ void irport_interrupt(int irq, void *dev iir = inb(iobase + UART_IIR) & UART_IIR_ID; } spin_unlock(&self->lock); + return IRQ_RETVAL(handled); } static int irport_net_init(struct net_device *dev) --- linux-2.5.68/drivers/net/irda/nsc-ircc.c 2003-01-16 18:21:33.000000000 -0800 +++ 25/drivers/net/irda/nsc-ircc.c 2003-04-21 00:31:42.000000000 -0700 @@ -131,7 +131,7 @@ static int nsc_ircc_hard_xmit_fir(struc static int nsc_ircc_pio_write(int iobase, __u8 *buf, int len, int fifo_size); static void nsc_ircc_dma_xmit(struct nsc_ircc_cb *self, int iobase); static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 baud); -static void nsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t nsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int nsc_ircc_is_receiving(struct nsc_ircc_cb *self); static int nsc_ircc_read_dongle_id (int iobase); static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id); @@ -1781,7 +1781,7 @@ static void nsc_ircc_fir_interrupt(struc * An interrupt from the chip has arrived. Time to do some work * */ -static void nsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t nsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct nsc_ircc_cb *self; @@ -1790,7 +1790,7 @@ static void nsc_ircc_interrupt(int irq, if (!dev) { WARNING("%s: irq %d for unknown device.\n", driver_name, irq); - return; + return IRQ_NONE; } self = (struct nsc_ircc_cb *) dev->priv; @@ -1818,6 +1818,7 @@ static void nsc_ircc_interrupt(int irq, outb(bsr, iobase+BSR); /* Restore bank register */ spin_unlock(&self->lock); + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/net/irda/sa1100_ir.c 2003-01-16 18:22:02.000000000 -0800 +++ 25/drivers/net/irda/sa1100_ir.c 2003-04-21 00:31:42.000000000 -0700 @@ -636,13 +636,14 @@ static void sa1100_irda_fir_irq(struct n sa1100_irda_rx_dma_start(si); } -static void sa1100_irda_irq(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t sa1100_irda_irq(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; if (IS_FIR(((struct sa1100_irda *)dev->priv))) sa1100_irda_fir_irq(dev); else sa1100_irda_hpsir_irq(dev); + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/net/irda/smc-ircc.c 2003-02-14 17:35:06.000000000 -0800 +++ 25/drivers/net/irda/smc-ircc.c 2003-04-21 02:56:25.000000000 -0700 @@ -86,7 +86,7 @@ static void ircc_dma_receive_complete(st static int ircc_hard_xmit(struct sk_buff *skb, struct net_device *dev); static void ircc_dma_xmit(struct ircc_cb *self, int iobase, int bofs); static void ircc_change_speed(void *priv, u32 speed); -static void ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int ircc_net_open(struct net_device *dev); static int ircc_net_close(struct net_device *dev); static int ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data); @@ -979,7 +979,7 @@ static void ircc_dma_receive_complete(st * An interrupt from the chip has arrived. Time to do some work * */ -static void ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct irport_cb *irport; @@ -989,18 +989,18 @@ static void ircc_interrupt(int irq, void if (dev == NULL) { printk(KERN_WARNING "%s: irq %d for unknown device.\n", driver_name, irq); - return; + return IRQ_NONE; } irport = (struct irport_cb *) dev->priv; - ASSERT(irport != NULL, return;); + ASSERT(irport != NULL, return IRQ_NONE;); self = (struct ircc_cb *) irport->priv; - ASSERT(self != NULL, return;); + ASSERT(self != NULL, return IRQ_NONE;); /* Check if we should use the SIR interrupt handler */ if (self->io->speed < 576000) { /* Will spinlock itself - Jean II */ irport_interrupt(irq, dev_id, regs); - return; + return IRQ_HANDLED; } iobase = self->io->fir_base; @@ -1028,6 +1028,7 @@ static void ircc_interrupt(int irq, void outb(IRCC_IER_ACTIVE_FRAME|IRCC_IER_EOM, iobase+IRCC_IER); spin_unlock(&self->irport->lock); + return IRQ_HANDLED; } #if 0 /* unused */ --- linux-2.5.68/drivers/net/irda/toshoboe.c 2003-01-16 18:21:34.000000000 -0800 +++ 25/drivers/net/irda/toshoboe.c 2003-04-21 00:31:42.000000000 -0700 @@ -349,7 +349,7 @@ toshoboe_hard_xmit (struct sk_buff *skb, } /*interrupt handler */ -static void +static irqreturn_t toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs) { struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id; @@ -360,7 +360,7 @@ toshoboe_interrupt (int irq, void *dev_i { printk (KERN_WARNING "%s: irq %d for unknown device.\n", driver_name, irq); - return; + return IRQ_NONE; } IRDA_DEBUG (4, "%s()\n", __FUNCTION__ ); @@ -369,7 +369,7 @@ toshoboe_interrupt (int irq, void *dev_i /* woz it us */ if (!(irqstat & 0xf8)) - return; + return IRQ_NONE; outb_p (irqstat, OBOE_ISR); /*Acknologede it */ @@ -457,7 +457,7 @@ toshoboe_interrupt (int irq, void *dev_i } - + return IRQ_HANDLED; } static int --- linux-2.5.68/drivers/net/irda/vlsi_ir.c 2003-02-24 13:08:46.000000000 -0800 +++ 25/drivers/net/irda/vlsi_ir.c 2003-04-21 00:31:42.000000000 -0700 @@ -1570,7 +1570,7 @@ static int vlsi_ioctl(struct net_device /********************************************************/ -static void vlsi_interrupt(int irq, void *dev_instance, struct pt_regs *regs) +static irqreturn_t vlsi_interrupt(int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *ndev = dev_instance; vlsi_irda_dev_t *idev = ndev->priv; @@ -1579,6 +1579,7 @@ static void vlsi_interrupt(int irq, void int boguscount = 32; unsigned got_act; unsigned long flags; + int handled = 0; got_act = 0; iobase = ndev->base_addr; @@ -1592,6 +1593,8 @@ static void vlsi_interrupt(int irq, void if (!(irintr&=IRINTR_INT_MASK)) /* not our INT - probably shared */ break; + handled = 1; + if (irintr&IRINTR_RPKTINT) vlsi_rx_interrupt(ndev); @@ -1610,7 +1613,7 @@ static void vlsi_interrupt(int irq, void if (boguscount <= 0) printk(KERN_WARNING "%s: too much work in interrupt!\n", __FUNCTION__); - + return IRQ_RETVAL(handled); } /********************************************************/ --- linux-2.5.68/drivers/net/irda/w83977af_ir.c 2003-01-16 18:22:02.000000000 -0800 +++ 25/drivers/net/irda/w83977af_ir.c 2003-04-21 00:31:42.000000000 -0700 @@ -97,7 +97,7 @@ static int w83977af_hard_xmit(struct sk static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size); static void w83977af_dma_write(struct w83977af_ir *self, int iobase); static void w83977af_change_speed(struct w83977af_ir *self, __u32 speed); -static void w83977af_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t w83977af_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int w83977af_is_receiving(struct w83977af_ir *self); static int w83977af_net_init(struct net_device *dev); @@ -1118,7 +1118,7 @@ static __u8 w83977af_fir_interrupt(struc * An interrupt from the chip has arrived. Time to do some work * */ -static void w83977af_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t w83977af_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct w83977af_ir *self; @@ -1128,7 +1128,7 @@ static void w83977af_interrupt(int irq, if (!dev) { printk(KERN_WARNING "%s: irq %d for unknown device.\n", driver_name, irq); - return; + return IRQ_NONE; } self = (struct w83977af_ir *) dev->priv; @@ -1153,7 +1153,7 @@ static void w83977af_interrupt(int irq, outb(icr, iobase+ICR); /* Restore (new) interrupts */ outb(set, iobase+SSR); /* Restore bank register */ - + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/net/isa-skeleton.c 2003-01-16 18:22:49.000000000 -0800 +++ 25/drivers/net/isa-skeleton.c 2003-04-21 00:31:42.000000000 -0700 @@ -109,7 +109,7 @@ extern int netcard_probe(struct net_devi static int netcard_probe1(struct net_device *dev, int ioaddr); static int net_open(struct net_device *dev); static int net_send_packet(struct sk_buff *skb, struct net_device *dev); -static void net_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void net_rx(struct net_device *dev); static int net_close(struct net_device *dev); static struct net_device_stats *net_get_stats(struct net_device *dev); @@ -470,17 +470,22 @@ void net_tx(struct net_device *dev) * The typical workload of the driver: * Handle the network interface interrupts. */ -static void net_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; struct net_local *np; int ioaddr, status; + int handled = 0; ioaddr = dev->base_addr; np = (struct net_local *)dev->priv; status = inw(ioaddr + 0); + if (status == 0) + goto out; + handled = 1; + if (status & RX_INTR) { /* Got a packet(s). */ net_rx(dev); @@ -497,6 +502,8 @@ static void net_interrupt(int irq, void /* Increment the appropriate 'localstats' field. */ np->stats.tx_window_errors++; } +out: + return IRQ_RETVAL(handled); } /* We have a good packet(s), get it/them out of the buffers. */ --- linux-2.5.68/drivers/net/Kconfig 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/net/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -12,7 +12,7 @@ config NETDEVICES telephone line with a modem either via UUCP (UUCP is a protocol to forward mail and news between unix hosts over telephone lines; read the UUCP-HOWTO, available from - ) or dialing up a shell + ) or dialing up a shell account or a BBS, even using term (term is a program which gives you almost full Internet connectivity if you have a regular dial up shell account on some Internet connected Unix computer. Read @@ -32,7 +32,7 @@ config NETDEVICES Make sure to read the NET-3-HOWTO. Eventually, you will have to read Olaf Kirch's excellent and free book "Network Administrator's - Guide", to be found in . If + Guide", to be found in . If unsure, say Y. if NETDEVICES @@ -51,7 +51,7 @@ config DUMMY thing often comes in handy, the default is Y. It won't enlarge your kernel either. What a deal. Read about it in the Network Administrator's Guide, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -98,7 +98,7 @@ config EQUALIZER Say Y if you want this and read . You may also want to read section 6.2 of the NET-3-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -206,7 +206,7 @@ config NET_ETHERNET If your Linux machine will be connected to an Ethernet and you have an Ethernet network interface card (NIC) installed in your computer, say Y here and read the Ethernet-HOWTO, available from - . You will then also have + . You will then also have to say Y to the driver for your particular NIC. Note that the answer to this question won't directly affect the @@ -357,7 +357,7 @@ config MAC8390 If you want to include a driver to support Nubus or LC-PDS Ethernet cards using an NS8390 chipset or its equivalent, say Y and read the Ethernet-HOWTO, available from - . + . config MAC89x0 tristate "Macintosh CS89x0 based ethernet cards" @@ -366,7 +366,7 @@ config MAC89x0 Support for CS89x0 chipset based Ethernet cards. If you have a Nubus or LC-PDS network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -382,7 +382,7 @@ config MACSONIC the onboard Ethernet in many Quadras as well as some LC-PDS, a few Nubus and all known Comm Slot Ethernet cards. If you have one of these say Y and read the Ethernet-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -397,7 +397,7 @@ config MACMACE Support for the onboard AMD 79C940 MACE Ethernet controller used in the 660AV and 840AV Macintosh. If you have one of these Macintoshes say Y and read the Ethernet-HOWTO, available from - . + . config MVME147_NET tristate "MVME147 (Lance) Ethernet support" @@ -516,7 +516,7 @@ config SGI_IOC3_ETH help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . config STNIC tristate "National DP83902AV support" @@ -595,7 +595,7 @@ config NET_VENDOR_3COM help If you have a network (Ethernet) card belonging to this class, say Y and read the Ethernet-HOWTO, available from - . + . Note that the answer to this question doesn't directly affect the kernel: saying N will just cause the configurator to skip all @@ -608,7 +608,7 @@ config EL1 ---help--- If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . Also, consider buying a + . Also, consider buying a new card, since the 3c501 is slow, broken, and obsolete: you will have problems. Some people suggest to ping ("man ping") a nearby machine every minute ("man cron") when using this card. @@ -625,7 +625,7 @@ config EL2 help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -640,7 +640,7 @@ config ELPLUS Information about this network (Ethernet) card can be found in . If you have a card of this type, say Y and read the Ethernet-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -654,7 +654,7 @@ config EL16 help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -668,7 +668,7 @@ config EL3 ---help--- If you have a network (Ethernet) card belonging to the 3Com EtherLinkIII series, say Y and read the Ethernet-HOWTO, available - from . + from . If your card is not working you may need to use the DOS setup disk to disable Plug & Play mode, and to select the default @@ -686,7 +686,7 @@ config 3C515 help If you have a 3Com ISA EtherLink XL "Corkscrew" 3c515 Fast Ethernet network card, say Y and read the Ethernet-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -700,7 +700,7 @@ config ELMC help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -714,7 +714,7 @@ config ELMC_II help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -736,7 +736,7 @@ config VORTEX "Hurricane" (3c555/3cSOHO) PCI If you have such a card, say Y and read the Ethernet-HOWTO, - available from . More + available from . More specific information is in and in the comments at the beginning of . @@ -758,7 +758,7 @@ config TYPHOON If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -772,7 +772,7 @@ config LANCE help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . Some LinkSys cards are + . Some LinkSys cards are of this type. If you want to compile this driver as a module ( = code which can be @@ -786,7 +786,7 @@ config NET_VENDOR_SMC help If you have a network (Ethernet) card belonging to this class, say Y and read the Ethernet-HOWTO, available from - . + . Note that the answer to this question doesn't directly affect the kernel: saying N will just cause the configurator to skip all @@ -799,7 +799,7 @@ config WD80x3 help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -813,7 +813,7 @@ config ULTRAMCA help If you have a network (Ethernet) card of this type and are running an MCA based system (PS/2), say Y and read the Ethernet-HOWTO, - available from . + available from . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -827,7 +827,7 @@ config ULTRA ---help--- If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . Important: There have been many reports that, with some motherboards mixing an SMC Ultra and an Adaptec AHA154x SCSI card (or compatible, @@ -848,7 +848,7 @@ config ULTRA32 help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -865,7 +865,7 @@ config SMC9194 another SMC9192/9194 based chipset. Say Y if you want it compiled into the kernel, and read the file and the Ethernet-HOWTO, - available from . + available from . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -879,7 +879,7 @@ config NET_VENDOR_RACAL help If you have a network (Ethernet) card belonging to this class, such as the NI5010, NI5210 or NI6210, say Y and read the Ethernet-HOWTO, - available from . + available from . Note that the answer to this question doesn't directly affect the kernel: saying N will just cause the configurator to skip all @@ -892,7 +892,7 @@ config NI5010 ---help--- If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . Note that this is still + . Note that this is still experimental code. This driver is also available as a module ( = code which can be @@ -907,7 +907,7 @@ config NI52 help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -921,7 +921,7 @@ config NI65 help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -937,7 +937,7 @@ config AT1700 ---help--- If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -952,7 +952,7 @@ config DEPCA ---help--- If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - as well as + as well as . If you want to compile this as a module ( = code which can be @@ -968,7 +968,7 @@ config HP100 help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -984,7 +984,7 @@ config NET_ISA bus system (that's the way the cards talks to the other components of your computer) is ISA (as opposed to EISA, VLB or PCI), say Y. Make sure you know the name of your card. Read the Ethernet-HOWTO, - available from . + available from . If unsure, say Y. @@ -999,7 +999,7 @@ config E2100 help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1015,7 +1015,7 @@ config EWRK3 cards. If this is for you, say Y and read in the kernel source as well as the Ethernet-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -1029,7 +1029,7 @@ config EEXPRESS ---help--- If you have an EtherExpress16 network (Ethernet) card, say Y and read the Ethernet-HOWTO, available from - . Note that the Intel + . Note that the Intel EtherExpress16 card used to be regarded as a very poor choice because the driver was very unreliable. We now have a new driver that should do better. @@ -1048,7 +1048,7 @@ config EEXPRESS_PRO driver supports intel i82595{FX,TX} based boards. Note however that the EtherExpress PRO/100 Ethernet card has its own separate driver. Please read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1062,7 +1062,7 @@ config FMV18X ---help--- If you have a Fujitsu FMV-181/182/183/184 network (Ethernet) card, say Y and read the Ethernet-HOWTO, available from - . + . If you use an FMV-183 or FMV-184 and it is not working, you may need to disable Plug & Play mode of the card. @@ -1079,7 +1079,7 @@ config HPLAN_PLUS help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1093,7 +1093,7 @@ config HPLAN help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1115,7 +1115,7 @@ config ETH16I help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1129,7 +1129,7 @@ config NE2000 ---help--- If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . Many Ethernet cards + . Many Ethernet cards without a specific driver are compatible with NE2000. If you have a PCI NE2000 card however, say N here and Y to "PCI @@ -1152,7 +1152,7 @@ config ZNET (Ethernet) card, and this is the Linux driver for it. Note that the IBM Thinkpad 300 is compatible with the Z-Note and is also supported by this driver. Read the Ethernet-HOWTO, available from - . + . config SEEQ8005 tristate "SEEQ8005 support (EXPERIMENTAL)" @@ -1160,7 +1160,7 @@ config SEEQ8005 help This is a driver for the SEEQ 8005 network (Ethernet) card. If this is for you, read the Ethernet-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -1174,7 +1174,7 @@ config SK_G16 help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . config NET_CBUS bool "NEC PC-9800 C-bus cards" @@ -1248,7 +1248,7 @@ config NE2_MCA help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1278,7 +1278,7 @@ config NET_PCI help This is another class of network cards which attach directly to the bus. If you have one of those, say Y and read the Ethernet-HOWTO, - available from . + available from . Note that the answer to this question doesn't directly affect the kernel: saying N will just cause the configurator to skip all @@ -1292,7 +1292,7 @@ config PCNET32 help If you have a PCnet32 or PCnetPCI based network (Ethernet) card, answer Y here and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1306,7 +1306,7 @@ config AMD8111_ETH help If you have an AMD 8111-based PCI lance ethernet card, answer Y here and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1346,7 +1346,7 @@ config AC3200 help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1360,7 +1360,7 @@ config APRICOT help If you have a network (Ethernet) controller of this type, say Y and read the Ethernet-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -1374,7 +1374,7 @@ config B44 help If you have a network (Ethernet) controller of this type, say Y and read the Ethernet-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -1389,7 +1389,7 @@ config CS89x0 Support for CS89x0 chipset based Ethernet cards. If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - as well as + as well as . If you want to compile this as a module ( = code which can be @@ -1406,7 +1406,7 @@ config DGRS PCI/EISA Ethernet switch cards. These include the SE-4 and the SE-6 models. If you have a network card of this type, say Y and read the Ethernet-HOWTO, available from - . More specific + . More specific information is contained in . This driver is also available as a module ( = code which can be @@ -1421,7 +1421,7 @@ config EEPRO100 help If you have an Intel EtherExpress PRO/100 PCI network (Ethernet) card, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1523,7 +1523,7 @@ config LNE390 help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1557,7 +1557,7 @@ config NE2K_PCI with ISA NE2000 cards (they have their own driver, "NE2000/NE1000 support" below). If you have a PCI NE2000 network (Ethernet) card, say Y and read the Ethernet-HOWTO, available from - . + . This driver also works for the following NE2000 clone cards: RealTek RTL-8029 Winbond 89C940 Compex RL2000 KTI ET32P2 @@ -1576,7 +1576,7 @@ config NE3210 ---help--- If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . Note that this driver + . Note that this driver will NOT WORK for NE3200 cards as they are completely different. This driver is also available as a module ( = code which can be @@ -1591,7 +1591,7 @@ config ES3210 help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1606,7 +1606,7 @@ config 8139CP This is a driver for the Fast Ethernet PCI network cards based on the RTL8139C+ chips. If you have one of those, say Y and read the Ethernet-HOWTO, available from - . + . If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -1621,7 +1621,7 @@ config 8139TOO the RTL8139 chips. If you have one of those, say Y and read as well as the Ethernet-HOWTO, available from - . + . If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -1675,7 +1675,7 @@ config SIS900 the SiS 900 and SiS 7016 chips. The SiS 900 core is also embedded in SiS 630 and SiS 540 chipsets. If you have one of those, say Y and read the Ethernet-HOWTO, available at - . Please read + . Please read and comments at the beginning of for more information. @@ -1721,7 +1721,7 @@ config TLAN If you have a PCI Ethernet network card based on the ThunderLAN chip which is supported by this driver, say Y and read the Ethernet-HOWTO, available from - . + . Devices currently supported by this driver are Compaq Netelligent, Compaq NetFlex and Olicom cards. Please read the file @@ -1777,7 +1777,7 @@ config NET_POCKET Cute little network (Ethernet) devices which attach to the parallel port ("pocket adapters"), commonly used with laptops. If you have one of those, say Y and read the Ethernet-HOWTO, available from - . + . If you want to plug a network (or some other) card into the PCMCIA (or PC-card) slot of your laptop instead (PCMCIA is the standard for @@ -1799,7 +1799,7 @@ config ATP ---help--- This is a network (Ethernet) device which attaches to your parallel port. Read as well as the Ethernet-HOWTO, - available from , if you + available from , if you want to use this. If you intend to use this driver, you should have said N to the "Parallel printer support", because the two drivers don't like each other. @@ -1816,7 +1816,7 @@ config DE600 This is a network (Ethernet) device which attaches to your parallel port. Read as well as the Ethernet-HOWTO, available from - , if you want to use + , if you want to use this. It is possible to have several devices share a single parallel port and it is safe to compile the corresponding drivers into the kernel. @@ -1834,7 +1834,7 @@ config DE620 This is a network (Ethernet) device which attaches to your parallel port. Read as well as the Ethernet-HOWTO, available from - , if you want to use + , if you want to use this. It is possible to have several devices share a single parallel port and it is safe to compile the corresponding drivers into the kernel. @@ -2010,7 +2010,7 @@ config HAMACHI help If you have a Gigabit Ethernet card of this type, say Y and read the Ethernet-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -2201,7 +2201,7 @@ config PLIP If you want to use PLIP, say Y and read the PLIP mini-HOWTO as well as the NET-3-HOWTO, both available from - . Note that the PLIP + . Note that the PLIP protocol has been changed and this PLIP driver won't work together with the PLIP support in Linux versions 1.0.x. This option enlarges your kernel by about 8 KB. @@ -2225,7 +2225,7 @@ config PPP To use PPP, you need an additional program called pppd as described in the PPP-HOWTO, available at - . Make sure that you have + . Make sure that you have the version of pppd recommended in . The PPP option enlarges your kernel by about 16 KB. @@ -2377,7 +2377,7 @@ config SLIP allows you to use SLIP over a regular dial up shell connection. If you plan to use SLiRP, make sure to say Y to CSLIP, below. The NET-3-HOWTO, available from - , explains how to + , explains how to configure SLIP. Note that you don't need this option if you just want to run term (term is a program which gives you almost full Internet connectivity if you have a regular dial up shell account on @@ -2403,7 +2403,7 @@ config SLIP_COMPRESSED ) which allows you to use SLIP over a regular dial up shell connection, you definitely want to say Y here. The NET-3-HOWTO, available from - , explains how to configure + , explains how to configure CSLIP. This won't enlarge your kernel. config SLIP_SMART --- linux-2.5.68/drivers/net/lance.c 2003-01-16 18:21:38.000000000 -0800 +++ 25/drivers/net/lance.c 2003-04-21 00:31:42.000000000 -0700 @@ -278,7 +278,7 @@ static int lance_open_fail(struct net_de static void lance_init_ring(struct net_device *dev, int mode); static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev); static int lance_rx(struct net_device *dev); -static void lance_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t lance_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int lance_close(struct net_device *dev); static struct net_device_stats *lance_get_stats(struct net_device *dev); static void set_multicast_list(struct net_device *dev); @@ -945,7 +945,7 @@ out: } /* The LANCE interrupt handler. */ -static void +static irqreturn_t lance_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; @@ -955,7 +955,7 @@ lance_interrupt(int irq, void *dev_id, s if (dev == NULL) { printk ("lance_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } ioaddr = dev->base_addr; @@ -1066,6 +1066,7 @@ lance_interrupt(int irq, void *dev_id, s inw(dev->base_addr + LANCE_DATA)); spin_unlock (&lp->devlock); + return IRQ_HANDLED; } static int --- linux-2.5.68/drivers/net/lasi_82596.c 2003-02-24 13:08:46.000000000 -0800 +++ 25/drivers/net/lasi_82596.c 2003-04-21 00:31:42.000000000 -0700 @@ -405,7 +405,7 @@ static char init_setup[] = static int i596_open(struct net_device *dev); static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev); -static void i596_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int i596_close(struct net_device *dev); static struct net_device_stats *i596_get_stats(struct net_device *dev); static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd); @@ -1244,7 +1244,7 @@ static int __devinit i82596_probe(struct } -static void i596_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct i596_private *lp; @@ -1252,7 +1252,7 @@ static void i596_interrupt(int irq, void if (dev == NULL) { printk("i596_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } lp = (struct i596_private *) dev->priv; @@ -1270,7 +1270,7 @@ static void i596_interrupt(int irq, void if (!ack_cmd) { DEB(DEB_ERRORS, printk("%s: interrupt with no events\n", dev->name)); spin_unlock (&lp->lock); - return; + return IRQ_NONE; } if ((status & 0x8000) || (status & 0x2000)) { @@ -1396,7 +1396,7 @@ static void i596_interrupt(int irq, void DEB(DEB_INTS,printk("%s: exiting interrupt.\n", dev->name)); spin_unlock (&lp->lock); - return; + return IRQ_HANDLED; } static int i596_close(struct net_device *dev) --- linux-2.5.68/drivers/net/lp486e.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/lp486e.c 2003-04-21 00:31:42.000000000 -0700 @@ -377,7 +377,7 @@ static char init_setup[14] = { static int i596_open(struct net_device *dev); static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev); -static void i596_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int i596_close(struct net_device *dev); static struct net_device_stats *i596_get_stats(struct net_device *dev); static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd); @@ -1160,7 +1160,7 @@ i596_handle_CU_completion(struct net_dev spin_unlock_irqrestore(&lp->cmd_lock, flags); } -static void +static irqreturn_t i596_interrupt (int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_instance; struct i596_private *lp; @@ -1229,7 +1229,7 @@ i596_interrupt (int irq, void *dev_insta CA(); out: - return; + return IRQ_HANDLED; } static int i596_close(struct net_device *dev) { --- linux-2.5.68/drivers/net/mac89x0.c 2003-01-16 18:22:13.000000000 -0800 +++ 25/drivers/net/mac89x0.c 2003-04-21 00:31:42.000000000 -0700 @@ -129,7 +129,7 @@ extern void reset_chip(struct net_device #endif static int net_open(struct net_device *dev); static int net_send_packet(struct sk_buff *skb, struct net_device *dev); -static void net_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void set_multicast_list(struct net_device *dev); static void net_rx(struct net_device *dev); static int net_close(struct net_device *dev); @@ -424,7 +424,7 @@ net_send_packet(struct sk_buff *skb, str /* The typical workload of the driver: Handle the network interface interrupts. */ -static void net_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; struct net_local *lp; @@ -432,7 +432,7 @@ static void net_interrupt(int irq, void if (dev == NULL) { printk ("net_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } if (dev->interrupt) printk("%s: Re-entering the interrupt handler.\n", dev->name); @@ -491,7 +491,7 @@ static void net_interrupt(int irq, void } } dev->interrupt = 0; - return; + return IRQ_HANDLED; } /* We have a good packet(s), get it/them out of the buffers. */ --- linux-2.5.68/drivers/net/mace.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/net/mace.c 2003-04-21 00:31:42.000000000 -0700 @@ -86,7 +86,7 @@ static struct net_device_stats *mace_sta static void mace_set_multicast(struct net_device *dev); static void mace_reset(struct net_device *dev); static int mace_set_address(struct net_device *dev, void *addr); -static void mace_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t mace_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void mace_txdma_intr(int irq, void *dev_id, struct pt_regs *regs); static void mace_rxdma_intr(int irq, void *dev_id, struct pt_regs *regs); static void mace_set_timeout(struct net_device *dev); @@ -622,7 +622,7 @@ static void mace_handle_misc_intrs(struc printk(KERN_DEBUG "mace: jabbering transceiver\n"); } -static void mace_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t mace_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct mace_data *mp = (struct mace_data *) dev->priv; @@ -765,6 +765,7 @@ static void mace_interrupt(int irq, void mace_set_timeout(dev); } spin_unlock_irqrestore(&mp->lock, flags); + return IRQ_HANDLED; } static void mace_tx_timeout(unsigned long data) --- linux-2.5.68/drivers/net/macmace.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/macmace.c 2003-04-21 00:31:42.000000000 -0700 @@ -77,7 +77,7 @@ static int mace_xmit_start(struct sk_buf static struct net_device_stats *mace_stats(struct net_device *dev); static void mace_set_multicast(struct net_device *dev); static int mace_set_address(struct net_device *dev, void *addr); -static void mace_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t mace_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void mace_dma_intr(int irq, void *dev_id, struct pt_regs *regs); static void mace_tx_timeout(struct net_device *dev); @@ -561,7 +561,7 @@ static void mace_recv_interrupt(struct n * Process the chip interrupt */ -static void mace_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t mace_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct mace_data *mp = (struct mace_data *) dev->priv; @@ -577,6 +577,7 @@ static void mace_interrupt(int irq, void if (ir & RCVINT) { mace_recv_interrupt(dev); } + return IRQ_HANDLED; } static void mace_tx_timeout(struct net_device *dev) --- linux-2.5.68/drivers/net/myri_sbus.c 2003-01-16 18:21:38.000000000 -0800 +++ 25/drivers/net/myri_sbus.c 2003-04-21 00:31:42.000000000 -0700 @@ -533,7 +533,7 @@ static void myri_rx(struct myri_eth *mp, } } -static void myri_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t myri_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct myri_eth *mp = (struct myri_eth *) dev->priv; @@ -541,6 +541,7 @@ static void myri_interrupt(int irq, void struct myri_channel *chan = &mp->shmem->channel; unsigned long flags; u32 status; + int handled = 0; spin_lock_irqsave(&mp->irq_lock, flags); @@ -549,6 +550,7 @@ static void myri_interrupt(int irq, void if (status & ISTAT_HOST) { u32 softstate; + handled = 1; DIRQ(("IRQ_DISAB ")); myri_disable_irq(lregs, mp->cregs); softstate = sbus_readl(&chan->state); @@ -567,6 +569,7 @@ static void myri_interrupt(int irq, void DIRQ(("\n")); spin_unlock_irqrestore(&mp->irq_lock, flags); + return IRQ_RETVAL(handled); } static int myri_open(struct net_device *dev) --- linux-2.5.68/drivers/net/natsemi.c 2003-02-24 13:08:46.000000000 -0800 +++ 25/drivers/net/natsemi.c 2003-04-21 00:31:42.000000000 -0700 @@ -696,7 +696,7 @@ static void free_ring(struct net_device static void reinit_ring(struct net_device *dev); static void init_registers(struct net_device *dev); static int start_tx(struct sk_buff *skb, struct net_device *dev); -static void intr_handler(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *regs); static void netdev_error(struct net_device *dev, int intr_status); static void netdev_rx(struct net_device *dev); static void netdev_tx_done(struct net_device *dev); @@ -1680,7 +1680,7 @@ static void netdev_tx_done(struct net_de /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void intr_handler(int irq, void *dev_instance, struct pt_regs *rgs) +static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs) { struct net_device *dev = dev_instance; struct netdev_private *np = dev->priv; @@ -1688,7 +1688,7 @@ static void intr_handler(int irq, void * int boguscnt = max_interrupt_work; if (np->hands_off) - return; + return IRQ_NONE; do { /* Reading automatically acknowledges all int sources. */ u32 intr_status = readl(ioaddr + IntrStatus); @@ -1731,6 +1731,7 @@ static void intr_handler(int irq, void * if (netif_msg_intr(np)) printk(KERN_DEBUG "%s: exiting interrupt.\n", dev->name); + return IRQ_HANDLED; } /* This routine is logically part of the interrupt handler, but separated --- linux-2.5.68/drivers/net/ni5010.c 2003-01-16 18:22:06.000000000 -0800 +++ 25/drivers/net/ni5010.c 2003-04-21 00:31:42.000000000 -0700 @@ -104,7 +104,7 @@ extern int ni5010_probe(struct net_devi static int ni5010_probe1(struct net_device *dev, int ioaddr); static int ni5010_open(struct net_device *dev); static int ni5010_send_packet(struct sk_buff *skb, struct net_device *dev); -static void ni5010_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t ni5010_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void ni5010_rx(struct net_device *dev); static void ni5010_timeout(struct net_device *dev); static int ni5010_close(struct net_device *dev); @@ -451,7 +451,7 @@ static int ni5010_send_packet(struct sk_ * The typical workload of the driver: * Handle the network interface interrupts. */ -static void ni5010_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t ni5010_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct ni5010_local *lp; @@ -479,7 +479,7 @@ static void ni5010_interrupt(int irq, v if (!xmit_was_error) reset_receiver(dev); - return; + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/ni52.c 2003-01-16 18:22:18.000000000 -0800 +++ 25/drivers/net/ni52.c 2003-04-21 00:31:42.000000000 -0700 @@ -193,7 +193,7 @@ sizeof(nop_cmd) = 8; #define NI52_ADDR2 0x01 static int ni52_probe1(struct net_device *dev,int ioaddr); -static void ni52_interrupt(int irq,void *dev_id,struct pt_regs *reg_ptr); +static irqreturn_t ni52_interrupt(int irq,void *dev_id,struct pt_regs *reg_ptr); static int ni52_open(struct net_device *dev); static int ni52_close(struct net_device *dev); static int ni52_send_packet(struct sk_buff *,struct net_device *); @@ -821,7 +821,7 @@ static void *alloc_rfa(struct net_device * Interrupt Handler ... */ -static void ni52_interrupt(int irq,void *dev_id,struct pt_regs *reg_ptr) +static irqreturn_t ni52_interrupt(int irq,void *dev_id,struct pt_regs *reg_ptr) { struct net_device *dev = dev_id; unsigned short stat; @@ -830,7 +830,7 @@ static void ni52_interrupt(int irq,void if (!dev) { printk ("ni5210-interrupt: irq %d for unknown device.\n",irq); - return; + return IRQ_NONE; } p = (struct priv *) dev->priv; @@ -889,6 +889,7 @@ static void ni52_interrupt(int irq,void if(debuglevel > 1) printk("i"); + return IRQ_HANDLED; } /******************************************************* --- linux-2.5.68/drivers/net/ni65.c 2003-01-16 18:21:48.000000000 -0800 +++ 25/drivers/net/ni65.c 2003-04-21 00:31:42.000000000 -0700 @@ -248,7 +248,7 @@ struct priv }; static int ni65_probe1(struct net_device *dev,int); -static void ni65_interrupt(int irq, void * dev_id, struct pt_regs *regs); +static irqreturn_t ni65_interrupt(int irq, void * dev_id, struct pt_regs *regs); static void ni65_recv_intr(struct net_device *dev,int); static void ni65_xmit_intr(struct net_device *dev,int); static int ni65_open(struct net_device *dev); @@ -839,7 +839,7 @@ static int ni65_lance_reinit(struct net_ /* * interrupt handler */ -static void ni65_interrupt(int irq, void * dev_id, struct pt_regs * regs) +static irqreturn_t ni65_interrupt(int irq, void * dev_id, struct pt_regs * regs) { int csr0 = 0; struct net_device *dev = dev_id; @@ -940,7 +940,7 @@ static void ni65_interrupt(int irq, void else writedatareg(CSR0_INEA); - return; + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/net/ns83820.c 2003-02-14 17:35:06.000000000 -0800 +++ 25/drivers/net/ns83820.c 2003-04-21 00:31:42.000000000 -0700 @@ -1234,7 +1234,7 @@ static void ns83820_mib_isr(struct ns838 } static void ns83820_do_isr(struct ns83820 *dev, u32 isr); -static void ns83820_irq(int foo, void *data, struct pt_regs *regs) +static irqreturn_t ns83820_irq(int foo, void *data, struct pt_regs *regs) { struct ns83820 *dev = data; u32 isr; @@ -1245,6 +1245,7 @@ static void ns83820_irq(int foo, void *d isr = readl(dev->base + ISR); dprintk("irq: %08x\n", isr); ns83820_do_isr(dev, isr); + return IRQ_HANDLED; } static void ns83820_do_isr(struct ns83820 *dev, u32 isr) --- linux-2.5.68/drivers/net/pci-skeleton.c 2003-01-16 18:21:35.000000000 -0800 +++ 25/drivers/net/pci-skeleton.c 2003-04-21 00:31:42.000000000 -0700 @@ -505,7 +505,7 @@ static void netdrv_tx_timeout (struct ne static void netdrv_init_ring (struct net_device *dev); static int netdrv_start_xmit (struct sk_buff *skb, struct net_device *dev); -static void netdrv_interrupt (int irq, void *dev_instance, +static irqreturn_t netdrv_interrupt (int irq, void *dev_instance, struct pt_regs *regs); static int netdrv_close (struct net_device *dev); static int netdrv_ioctl (struct net_device *dev, struct ifreq *rq, int cmd); @@ -1665,7 +1665,7 @@ static void netdrv_weird_interrupt (stru /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void netdrv_interrupt (int irq, void *dev_instance, +static irqreturn_t netdrv_interrupt (int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_instance; @@ -1673,6 +1673,7 @@ static void netdrv_interrupt (int irq, v int boguscnt = max_interrupt_work; void *ioaddr = tp->mmio_addr; int status = 0, link_changed = 0; /* avoid bogus "uninit" warning */ + int handled = 0; spin_lock (&tp->lock); @@ -1683,6 +1684,7 @@ static void netdrv_interrupt (int irq, v if (status == 0xFFFF) break; + handled = 1; /* Acknowledge all of the current interrupt sources ASAP */ NETDRV_W16_F (IntrStatus, status); @@ -1724,6 +1726,7 @@ static void netdrv_interrupt (int irq, v DPRINTK ("%s: exiting interrupt, intr_status=%#4.4x.\n", dev->name, NETDRV_R16 (IntrStatus)); + return IRQ_RETVAL(handled); } --- linux-2.5.68/drivers/net/pcmcia/3c574_cs.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/pcmcia/3c574_cs.c 2003-04-21 00:31:39.000000000 -0700 @@ -940,11 +940,9 @@ static int el3_start_xmit(struct sk_buff outw(SetTxThreshold + (1536>>2), ioaddr + EL3_CMD); } - dev_kfree_skb (skb); pop_tx_status(dev); - - spin_unlock(&lp->window_lock); - + spin_unlock_irqrestore(&lp->window_lock, flags); + dev_kfree_skb(skb); return 0; } --- linux-2.5.68/drivers/net/pcmcia/axnet_cs.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/pcmcia/axnet_cs.c 2003-04-21 00:31:42.000000000 -0700 @@ -98,7 +98,7 @@ static int axnet_event(event_t event, in static int axnet_open(struct net_device *dev); static int axnet_close(struct net_device *dev); static int axnet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); -static void ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs); static void ei_watchdog(u_long arg); static void axnet_reset_8390(struct net_device *dev); @@ -122,7 +122,7 @@ static int axdev_init(struct net_device static void AX88190_init(struct net_device *dev, int startp); static int ax_open(struct net_device *dev); static int ax_close(struct net_device *dev); -static void ax_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t ax_interrupt(int irq, void *dev_id, struct pt_regs *regs); /*====================================================================*/ @@ -757,11 +757,11 @@ static void axnet_reset_8390(struct net_ /*====================================================================*/ -static void ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs) { axnet_dev_t *info = dev_id; info->stale = 0; - ax_interrupt(irq, dev_id, regs); + return ax_interrupt(irq, dev_id, regs); } static void ei_watchdog(u_long arg) @@ -1345,17 +1345,18 @@ static int ei_start_xmit(struct sk_buff * needed. */ -static void ax_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t ax_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; long e8390_base; int interrupts, nr_serviced = 0, i; struct ei_device *ei_local; - + int handled = 0; + if (dev == NULL) { printk ("net_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } e8390_base = dev->base_addr; @@ -1378,7 +1379,7 @@ static void ax_interrupt(int irq, void * inb_p(e8390_base + EN0_IMR)); #endif spin_unlock(&ei_local->page_lock); - return; + return IRQ_NONE; } if (ei_debug > 3) @@ -1399,6 +1400,8 @@ static void ax_interrupt(int irq, void * interrupts = 0; break; } + handled = 1; + /* AX88190 bug fix. */ outb_p(interrupts, e8390_base + EN0_ISR); for (i = 0; i < 10; i++) { @@ -1430,6 +1433,7 @@ static void ax_interrupt(int irq, void * if (interrupts && ei_debug) { + handled = 1; if (nr_serviced >= MAX_SERVICE) { /* 0xFF is valid for a card removal */ @@ -1448,7 +1452,7 @@ static void ax_interrupt(int irq, void * outb_p(ENISR_ALL, e8390_base + EN0_IMR); spin_unlock(&ei_local->page_lock); - return; + return IRQ_RETVAL(handled); } /** --- linux-2.5.68/drivers/net/pcmcia/Kconfig 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/pcmcia/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -17,7 +17,7 @@ config NET_PCMCIA To use your PC-cards, you will need supporting software from David Hinds' pcmcia-cs package (see the file for location). You also want to check out the PCMCIA-HOWTO, - available from . + available from . If unsure, say N. --- linux-2.5.68/drivers/net/pcmcia/pcnet_cs.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/net/pcmcia/pcnet_cs.c 2003-04-21 00:31:39.000000000 -0700 @@ -117,7 +117,7 @@ static int pcnet_open(struct net_device static int pcnet_close(struct net_device *dev); static int ei_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static int do_ioctl_light(struct net_device *dev, struct ifreq *rq, int cmd); -static void ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs); static void ei_watchdog(u_long arg); static void pcnet_reset_8390(struct net_device *dev); static int set_config(struct net_device *dev, struct ifmap *map); @@ -1121,11 +1121,13 @@ static int set_config(struct net_device /*====================================================================*/ -static void ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs) { pcnet_dev_t *info = dev_id; info->stale = 0; ei_interrupt(irq, dev_id, regs); + /* FIXME! Was it really ours? */ + return IRQ_HANDLED; } static void ei_watchdog(u_long arg) --- linux-2.5.68/drivers/net/pcnet32.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/net/pcnet32.c 2003-04-21 00:31:42.000000000 -0700 @@ -331,7 +331,7 @@ static int pcnet32_init_ring(struct net static int pcnet32_start_xmit(struct sk_buff *, struct net_device *); static int pcnet32_rx(struct net_device *); static void pcnet32_tx_timeout (struct net_device *dev); -static void pcnet32_interrupt(int, void *, struct pt_regs *); +static irqreturn_t pcnet32_interrupt(int, void *, struct pt_regs *); static int pcnet32_close(struct net_device *); static struct net_device_stats *pcnet32_get_stats(struct net_device *); static void pcnet32_set_multicast_list(struct net_device *); @@ -1148,7 +1148,7 @@ pcnet32_start_xmit(struct sk_buff *skb, } /* The PCNET32 interrupt handler. */ -static void +static irqreturn_t pcnet32_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; @@ -1161,7 +1161,7 @@ pcnet32_interrupt(int irq, void *dev_id, if (!dev) { printk (KERN_DEBUG "%s(): irq %d for unknown device\n", __FUNCTION__, irq); - return; + return IRQ_NONE; } ioaddr = dev->base_addr; @@ -1293,6 +1293,7 @@ pcnet32_interrupt(int irq, void *dev_id, dev->name, lp->a.read_csr (ioaddr, 0)); spin_unlock(&lp->lock); + return IRQ_HANDLED; } static int --- linux-2.5.68/drivers/net/r8169.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/net/r8169.c 2003-04-21 00:31:42.000000000 -0700 @@ -295,7 +295,7 @@ MODULE_PARM(media, "1-" __MODULE_STRING( static int rtl8169_open(struct net_device *dev); static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev); -static void rtl8169_interrupt(int irq, void *dev_instance, +static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static void rtl8169_init_ring(struct net_device *dev); static void rtl8169_hw_start(struct net_device *dev); @@ -958,7 +958,7 @@ rtl8169_rx_interrupt(struct net_device * } /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void +static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_instance; @@ -966,6 +966,7 @@ rtl8169_interrupt(int irq, void *dev_ins int boguscnt = max_interrupt_work; void *ioaddr = tp->mmio_addr; int status = 0; + int handled = 0; do { status = RTL_R16(IntrStatus); @@ -974,6 +975,7 @@ rtl8169_interrupt(int irq, void *dev_ins if (status == 0xFFFF) break; + handled = 1; /* if (status & RxUnderrun) link_changed = RTL_R16 (CSCR) & CSCR_LinkChangeBit; @@ -1006,6 +1008,7 @@ rtl8169_interrupt(int irq, void *dev_ins /* Clear all interrupt sources. */ RTL_W16(IntrStatus, 0xffff); } + return IRQ_RETVAL(handled); } static int --- linux-2.5.68/drivers/net/rcpci45.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/rcpci45.c 2003-04-21 00:31:42.000000000 -0700 @@ -101,7 +101,7 @@ static void rc_timer (unsigned long); static int RCopen (struct net_device *); static int RC_xmit_packet (struct sk_buff *, struct net_device *); -static void RCinterrupt (int, void *, struct pt_regs *); +static irqreturn_t RCinterrupt (int, void *, struct pt_regs *); static int RCclose (struct net_device *dev); static struct net_device_stats *RCget_stats (struct net_device *); static int RCioctl (struct net_device *, struct ifreq *, int); @@ -621,7 +621,7 @@ RCrecv_callback (U32 Status, * RCProcI2OMsgQ(), which in turn process the message and * calls one of our callback functions. */ -static void +static irqreturn_t RCinterrupt (int irq, void *dev_id, struct pt_regs *regs) { @@ -635,6 +635,7 @@ RCinterrupt (int irq, void *dev_id, stru dev->name); RCProcI2OMsgQ (dev); + return IRQ_HANDLED; } #define REBOOT_REINIT_RETRY_LIMIT 4 --- linux-2.5.68/drivers/net/rrunner.c 2003-02-17 16:21:15.000000000 -0800 +++ 25/drivers/net/rrunner.c 2003-04-21 00:31:42.000000000 -0700 @@ -1045,7 +1045,7 @@ static void rx_int(struct net_device *de } -static void rr_interrupt(int irq, void *dev_id, struct pt_regs *ptregs) +static irqreturn_t rr_interrupt(int irq, void *dev_id, struct pt_regs *ptregs) { struct rr_private *rrpriv; struct rr_regs *regs; @@ -1056,7 +1056,7 @@ static void rr_interrupt(int irq, void * regs = rrpriv->regs; if (!(readl(®s->HostCtrl) & RR_INT)) - return; + return IRQ_NONE; spin_lock(&rrpriv->lock); @@ -1127,6 +1127,7 @@ static void rr_interrupt(int irq, void * wmb(); spin_unlock(&rrpriv->lock); + return IRQ_HANDLED; } static void rr_timer(unsigned long data) --- linux-2.5.68/drivers/net/saa9730.c 2003-01-16 18:22:16.000000000 -0800 +++ 25/drivers/net/saa9730.c 2003-04-21 00:31:42.000000000 -0700 @@ -745,7 +745,7 @@ static int lan_saa9730_rx(struct net_dev return 0; } -static void lan_saa9730_interrupt(const int irq, void *dev_id, +static irqreturn_t lan_saa9730_interrupt(const int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; @@ -773,7 +773,7 @@ static void lan_saa9730_interrupt(const /* Enable the EVM LAN interrupt. */ evm_saa9730_unblock_lan_int(lp); - return; + return IRQ_HANDLED; } static int lan_saa9730_open_fail(struct net_device *dev) --- linux-2.5.68/drivers/net/sb1000.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/sb1000.c 2003-04-21 00:31:42.000000000 -0700 @@ -84,7 +84,7 @@ extern int sb1000_probe(struct net_devic static int sb1000_open(struct net_device *dev); static int sb1000_dev_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd); static int sb1000_start_xmit(struct sk_buff *skb, struct net_device *dev); -static void sb1000_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t sb1000_interrupt(int irq, void *dev_id, struct pt_regs *regs); static struct net_device_stats *sb1000_stats(struct net_device *dev); static int sb1000_close(struct net_device *dev); @@ -1112,7 +1112,7 @@ sb1000_start_xmit(struct sk_buff *skb, s } /* SB1000 interrupt handler. */ -static void sb1000_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t sb1000_interrupt(int irq, void *dev_id, struct pt_regs *regs) { char *name; unsigned char st; @@ -1127,7 +1127,7 @@ static void sb1000_interrupt(int irq, vo if (dev == NULL) { printk(KERN_ERR "sb1000_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } ioaddr[0] = dev->base_addr; @@ -1169,7 +1169,7 @@ static void sb1000_interrupt(int irq, vo lp->rx_error_count = 0; } - return; + return IRQ_HANDLED; } static struct net_device_stats *sb1000_stats(struct net_device *dev) --- linux-2.5.68/drivers/net/sb1250-mac.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/sb1250-mac.c 2003-04-21 00:31:42.000000000 -0700 @@ -281,7 +281,7 @@ static sbmac_state_t sbmac_set_channel_s static void sbmac_promiscuous_mode(struct sbmac_softc *sc,int onoff); /*static void sbmac_init_and_start(struct sbmac_softc *sc);*/ static uint64_t sbmac_addr2reg(unsigned char *ptr); -static void sbmac_intr(int irq,void *dev_instance,struct pt_regs *rgs); +static irqreturn_t sbmac_intr(int irq,void *dev_instance,struct pt_regs *rgs); static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev); static void sbmac_setmulti(struct sbmac_softc *sc); static int sbmac_init(struct net_device *dev); @@ -1891,7 +1891,8 @@ static void sbmac_intr(int irq,void *dev struct net_device *dev = (struct net_device *) dev_instance; struct sbmac_softc *sc = (struct sbmac_softc *) (dev->priv); uint64_t isr; - + int handled = 0; + for (;;) { /* @@ -1900,8 +1901,9 @@ static void sbmac_intr(int irq,void *dev isr = SBMAC_READCSR(sc->sbm_isr); - if (isr == 0) break; - + if (isr == 0) + break; + handled = 1; /* * Transmits on channel 0 */ @@ -1918,7 +1920,7 @@ static void sbmac_intr(int irq,void *dev sbdma_rx_process(sc,&(sc->sbm_rxdma)); } } - + return IRQ_RETVAL(handled); } --- linux-2.5.68/drivers/net/seeq8005.c 2003-01-16 18:22:27.000000000 -0800 +++ 25/drivers/net/seeq8005.c 2003-04-21 00:31:42.000000000 -0700 @@ -84,7 +84,7 @@ static int seeq8005_probe1(struct net_de static int seeq8005_open(struct net_device *dev); static void seeq8005_timeout(struct net_device *dev); static int seeq8005_send_packet(struct sk_buff *skb, struct net_device *dev); -static void seeq8005_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t seeq8005_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void seeq8005_rx(struct net_device *dev); static int seeq8005_close(struct net_device *dev); static struct net_device_stats *seeq8005_get_stats(struct net_device *dev); @@ -400,11 +400,12 @@ static int seeq8005_send_packet(struct s /* The typical workload of the driver: Handle the network interface interrupts. */ -static void seeq8005_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t seeq8005_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; struct net_local *lp; int ioaddr, status, boguscount = 0; + int handled = 0; ioaddr = dev->base_addr; lp = (struct net_local *)dev->priv; @@ -416,17 +417,20 @@ static void seeq8005_interrupt(int irq, } if (status & SEEQSTAT_WINDOW_INT) { + handled = 1; outw( SEEQCMD_WINDOW_INT_ACK | (status & SEEQCMD_INT_MASK), SEEQ_CMD); if (net_debug) { printk("%s: window int!\n",dev->name); } } if (status & SEEQSTAT_TX_INT) { + handled = 1; outw( SEEQCMD_TX_INT_ACK | (status & SEEQCMD_INT_MASK), SEEQ_CMD); lp->stats.tx_packets++; netif_wake_queue(dev); /* Inform upper layers. */ } if (status & SEEQSTAT_RX_INT) { + handled = 1; /* Got a packet(s). */ seeq8005_rx(dev); } @@ -436,6 +440,7 @@ static void seeq8005_interrupt(int irq, if(net_debug>2) { printk("%s: eoi\n",dev->name); } + return IRQ_RETVAL(handled); } /* We have a good packet(s), get it/them out of the buffers. */ --- linux-2.5.68/drivers/net/sgiseeq.c 2003-02-10 12:24:14.000000000 -0800 +++ 25/drivers/net/sgiseeq.c 2003-04-21 00:31:42.000000000 -0700 @@ -416,7 +416,7 @@ static inline void sgiseeq_tx(struct net } } -static void sgiseeq_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t sgiseeq_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct sgiseeq_private *sp = (struct sgiseeq_private *) dev->priv; @@ -436,6 +436,7 @@ static void sgiseeq_interrupt(int irq, v if ((TX_BUFFS_AVAIL(sp) > 0) && netif_queue_stopped(dev)) { netif_wake_queue(dev); } + return IRQ_HANDLED; } static int sgiseeq_open(struct net_device *dev) --- linux-2.5.68/drivers/net/sis900.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/net/sis900.c 2003-04-21 00:31:42.000000000 -0700 @@ -195,7 +195,7 @@ static void sis900_init_rx_ring(struct n static int sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev); static int sis900_rx(struct net_device *net_dev); static void sis900_finish_xmit (struct net_device *net_dev); -static void sis900_interrupt(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t sis900_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static int sis900_close(struct net_device *net_dev); static int mii_ioctl(struct net_device *net_dev, struct ifreq *rq, int cmd); static struct net_device_stats *sis900_get_stats(struct net_device *net_dev); @@ -1534,13 +1534,14 @@ sis900_start_xmit(struct sk_buff *skb, s * and cleans up after the Tx thread */ -static void sis900_interrupt(int irq, void *dev_instance, struct pt_regs *regs) +static irqreturn_t sis900_interrupt(int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *net_dev = dev_instance; struct sis900_private *sis_priv = net_dev->priv; int boguscnt = max_interrupt_work; long ioaddr = net_dev->base_addr; u32 status; + int handled = 0; spin_lock (&sis_priv->lock); @@ -1551,6 +1552,8 @@ static void sis900_interrupt(int irq, vo /* nothing intresting happened */ break; + handled = 1; + /* why dow't we break after Tx/Rx case ?? keyword: full-duplex */ if (status & (RxORN | RxERR | RxOK)) /* Rx interrupt */ @@ -1580,7 +1583,7 @@ static void sis900_interrupt(int irq, vo net_dev->name, inl(ioaddr + isr)); spin_unlock (&sis_priv->lock); - return; + return IRQ_RETVAL(handled); } /** --- linux-2.5.68/drivers/net/sk98lin/skge.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/sk98lin/skge.c 2003-04-21 00:31:42.000000000 -0700 @@ -322,7 +322,7 @@ static void BoardInitMem(SK_AC *pAC); static void SetupRing(SK_AC*, void*, uintptr_t, RXD**, RXD**, RXD**, int*, SK_BOOL); -static void SkGeIsr(int irq, void *dev_id, struct pt_regs *ptregs); +static irqreturn_t SkGeIsr(int irq, void *dev_id, struct pt_regs *ptregs); static void SkGeIsrOnePort(int irq, void *dev_id, struct pt_regs *ptregs); static int SkGeOpen(struct net_device *dev); static int SkGeClose(struct net_device *dev); @@ -1236,7 +1236,7 @@ int PortIndex) /* index of the port for * Returns: N/A * */ -static void SkGeIsr(int irq, void *dev_id, struct pt_regs *ptregs) +static irqreturn_t SkGeIsr(int irq, void *dev_id, struct pt_regs *ptregs) { struct net_device *dev = (struct net_device *)dev_id; @@ -1252,7 +1252,7 @@ SK_U32 IntSrc; /* interrupts source re */ SK_IN32(pAC->IoBase, B0_SP_ISRC, &IntSrc); if (IntSrc == 0) { - return; + return IRQ_NONE; } while (((IntSrc & IRQ_MASK) & ~SPECIAL_IRQS) != 0) { @@ -1380,7 +1380,7 @@ SK_U32 IntSrc; /* interrupts source re /* IRQ is processed - Enable IRQs again*/ SK_OUT32(pAC->IoBase, B0_IMSK, IRQ_MASK); - return; + return IRQ_HANDLED; } /* SkGeIsr */ --- linux-2.5.68/drivers/net/skfp/skfddi.c 2003-02-10 12:24:14.000000000 -0800 +++ 25/drivers/net/skfp/skfddi.c 2003-04-21 00:31:42.000000000 -0700 @@ -118,7 +118,7 @@ static void link_modules(struct net_devi static int skfp_driver_init(struct net_device *dev); static int skfp_open(struct net_device *dev); static int skfp_close(struct net_device *dev); -static void skfp_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t skfp_interrupt(int irq, void *dev_id, struct pt_regs *regs); static struct net_device_stats *skfp_ctl_get_stats(struct net_device *dev); static void skfp_ctl_set_multicast_list(struct net_device *dev); static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev); @@ -896,7 +896,7 @@ static int skfp_close(struct net_device * Interrupts are disabled, then reenabled at the adapter. */ -void skfp_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t skfp_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct s_smc *smc; /* private board structure pointer */ @@ -905,7 +905,7 @@ void skfp_interrupt(int irq, void *dev_i if (dev == NULL) { printk("%s: irq %d for unknown device\n", dev->name, irq); - return; + return IRQ_NONE; } smc = (struct s_smc *) dev->priv; @@ -913,12 +913,12 @@ void skfp_interrupt(int irq, void *dev_i // IRQs enabled or disabled ? if (inpd(ADDR(B0_IMSK)) == 0) { // IRQs are disabled: must be shared interrupt - return; + return IRQ_NONE; } // Note: At this point, IRQs are enabled. if ((inpd(ISR_A) & smc->hw.is_imask) == 0) { // IRQ? // Adapter did not issue an IRQ: must be shared interrupt - return; + return IRQ_NONE; } CLI_FBI(); // Disable IRQs from our adapter. spin_lock(&bp->DriverLock); @@ -933,7 +933,7 @@ void skfp_interrupt(int irq, void *dev_i spin_unlock(&bp->DriverLock); STI_FBI(); // Enable IRQs from our adapter. - return; + return IRQ_HANDLED; } // skfp_interrupt --- linux-2.5.68/drivers/net/sk_g16.c 2003-01-16 18:23:01.000000000 -0800 +++ 25/drivers/net/sk_g16.c 2003-04-21 00:31:42.000000000 -0700 @@ -478,7 +478,7 @@ static int SK_probe(struct net_device static void SK_timeout(struct net_device *dev); static int SK_open(struct net_device *dev); static int SK_send_packet(struct sk_buff *skb, struct net_device *dev); -static void SK_interrupt(int irq, void *dev_id, struct pt_regs * regs); +static irqreturn_t SK_interrupt(int irq, void *dev_id, struct pt_regs * regs); static void SK_rxintr(struct net_device *dev); static void SK_txintr(struct net_device *dev); static int SK_close(struct net_device *dev); @@ -1337,7 +1337,7 @@ static int SK_send_packet(struct sk_buff * YY/MM/DD uid Description -*/ -static void SK_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t SK_interrupt(int irq, void *dev_id, struct pt_regs * regs) { int csr0; struct net_device *dev = dev_id; @@ -1386,6 +1386,7 @@ static void SK_interrupt(int irq, void * SK_write_reg(CSR0, CSR0_INEA); /* Enable Interrupts */ spin_unlock (&SK_lock); + return IRQ_HANDLED; } /* End of SK_interrupt() */ --- linux-2.5.68/drivers/net/sk_mca.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/net/sk_mca.c 2003-04-21 00:31:42.000000000 -0700 @@ -754,7 +754,7 @@ static u16 irqtx_handler(struct SKMCA_NE /* general interrupt entry */ -static void irq_handler(int irq, void *device, struct pt_regs *regs) +static irqreturn_t irq_handler(int irq, void *device, struct pt_regs *regs) { struct SKMCA_NETDEV *dev = (struct SKMCA_NETDEV *) device; u16 csr0val; @@ -766,7 +766,7 @@ static void irq_handler(int irq, void *d /* in case we're not meant... */ if ((csr0val & CSR0_INTR) == 0) - return; + return IRQ_NONE; #if (LINUX_VERSION_CODE >= 0x02032a) #if 0 @@ -805,6 +805,7 @@ static void irq_handler(int irq, void *d #else dev->interrupt = 0; #endif + return IRQ_HANDLED; } /* ------------------------------------------------------------------------ --- linux-2.5.68/drivers/net/smc9194.c 2003-01-16 18:22:28.000000000 -0800 +++ 25/drivers/net/smc9194.c 2003-04-21 00:31:42.000000000 -0700 @@ -234,7 +234,7 @@ static void smc_set_multicast_list(struc /* . Handles the actual interrupt */ -static void smc_interrupt(int irq, void *, struct pt_regs *regs); +static irqreturn_t smc_interrupt(int irq, void *, struct pt_regs *regs); /* . This is a separate procedure to handle the receipt of a packet, to . leave the interrupt code looking slightly cleaner @@ -1133,7 +1133,7 @@ static void smc_timeout(struct net_devic . ---------------------------------------------------------------------*/ -static void smc_interrupt(int irq, void * dev_id, struct pt_regs * regs) +static irqreturn_t smc_interrupt(int irq, void * dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; int ioaddr = dev->base_addr; @@ -1146,7 +1146,7 @@ static void smc_interrupt(int irq, void /* state registers */ word saved_bank; word saved_pointer; - + int handled = 0; PRINTK3((CARDNAME": SMC interrupt started \n")); @@ -1171,6 +1171,8 @@ static void smc_interrupt(int irq, void if (!status ) break; + handled = 1; + PRINTK3((KERN_WARNING CARDNAME ": Handling interrupt status %x \n", status )); @@ -1242,7 +1244,7 @@ static void smc_interrupt(int irq, void SMC_SELECT_BANK( saved_bank ); PRINTK3((CARDNAME ": Interrupt done\n")); - return; + return IRQ_RETVAL(handled); } /*------------------------------------------------------------- --- linux-2.5.68/drivers/net/sonic.c 2003-01-16 18:22:46.000000000 -0800 +++ 25/drivers/net/sonic.c 2003-04-21 00:31:42.000000000 -0700 @@ -170,7 +170,7 @@ static int sonic_send_packet(struct sk_b * The typical workload of the driver: * Handle the network interface interrupts. */ -static void sonic_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t sonic_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; unsigned int base_addr = dev->base_addr; @@ -179,7 +179,7 @@ static void sonic_interrupt(int irq, voi if (dev == NULL) { printk("sonic_interrupt: irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } lp = (struct sonic_local *) dev->priv; @@ -286,6 +286,7 @@ static void sonic_interrupt(int irq, voi * clear interrupt bits and return */ SONIC_WRITE(SONIC_ISR, status); + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/net/sonic.h 2003-01-16 18:21:34.000000000 -0800 +++ 25/drivers/net/sonic.h 2003-04-21 00:31:42.000000000 -0700 @@ -469,7 +469,7 @@ struct sonic_local { static int sonic_open(struct net_device *dev); static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev); -static void sonic_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t sonic_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void sonic_rx(struct net_device *dev); static int sonic_close(struct net_device *dev); static struct net_device_stats *sonic_get_stats(struct net_device *dev); --- linux-2.5.68/drivers/net/starfire.c 2003-02-14 17:35:06.000000000 -0800 +++ 25/drivers/net/starfire.c 2003-04-21 00:31:42.000000000 -0700 @@ -789,7 +789,7 @@ static void check_duplex(struct net_devi static void tx_timeout(struct net_device *dev); static void init_ring(struct net_device *dev); static int start_tx(struct sk_buff *skb, struct net_device *dev); -static void intr_handler(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *regs); static void netdev_error(struct net_device *dev, int intr_status); static int __netdev_rx(struct net_device *dev, int *quota); static void refill_rx_ring(struct net_device *dev); @@ -1491,7 +1491,7 @@ static int start_tx(struct sk_buff *skb, /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void intr_handler(int irq, void *dev_instance, struct pt_regs *rgs) +static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs) { struct net_device *dev = dev_instance; struct netdev_private *np; @@ -1499,6 +1499,7 @@ static void intr_handler(int irq, void * int boguscnt = max_interrupt_work; int consumer; int tx_status; + int handled = 0; ioaddr = dev->base_addr; np = dev->priv; @@ -1513,6 +1514,8 @@ static void intr_handler(int irq, void * if (intr_status == 0 || intr_status == (u32) -1) break; + handled = 1; + if (intr_status & (IntrRxDone | IntrRxEmpty)) netdev_rx(dev, ioaddr); @@ -1591,6 +1594,7 @@ static void intr_handler(int irq, void * if (debug > 4) printk(KERN_DEBUG "%s: exiting interrupt, status=%#8.8x.\n", dev->name, (int) readl(ioaddr + IntrStatus)); + return IRQ_RETVAL(handled); } --- linux-2.5.68/drivers/net/stnic.c 2003-01-16 18:22:23.000000000 -0800 +++ 25/drivers/net/stnic.c 2003-04-21 00:31:42.000000000 -0700 @@ -306,9 +306,9 @@ stnic_init (struct net_device *dev) } /* Hardware interrupt handler. */ -extern void ei_interrupt (int irq, void *dev_id, struct pt_regs *regs); +extern irqreturn_t ei_interrupt (int irq, void *dev_id, struct pt_regs *regs); -void +irqreturn_t do_stnic_intr (int irq, void *dev_id, struct pt_regs *regs) { ei_interrupt (0, stnic_dev, regs); --- linux-2.5.68/drivers/net/sun3_82586.c 2003-01-16 18:22:14.000000000 -0800 +++ 25/drivers/net/sun3_82586.c 2003-04-21 00:31:42.000000000 -0700 @@ -119,7 +119,7 @@ sizeof(nop_cmd) = 8; DELAY_16(); DELAY_16(); } } static int sun3_82586_probe1(struct net_device *dev,int ioaddr); -static void sun3_82586_interrupt(int irq,void *dev_id,struct pt_regs *reg_ptr); +static irqreturn_t sun3_82586_interrupt(int irq,void *dev_id,struct pt_regs *reg_ptr); static int sun3_82586_open(struct net_device *dev); static int sun3_82586_close(struct net_device *dev); static int sun3_82586_send_packet(struct sk_buff *,struct net_device *); @@ -665,7 +665,7 @@ static void *alloc_rfa(struct net_device * Interrupt Handler ... */ -static void sun3_82586_interrupt(int irq,void *dev_id,struct pt_regs *reg_ptr) +static irqreturn_t sun3_82586_interrupt(int irq,void *dev_id,struct pt_regs *reg_ptr) { struct net_device *dev = dev_id; unsigned short stat; @@ -674,7 +674,7 @@ static void sun3_82586_interrupt(int irq if (!dev) { printk ("sun3_82586-interrupt: irq %d for unknown device.\n",irq); - return; + return IRQ_NONE; } p = (struct priv *) dev->priv; @@ -733,6 +733,7 @@ static void sun3_82586_interrupt(int irq if(debuglevel > 1) printk("i"); + return IRQ_HANDLED; } /******************************************************* --- linux-2.5.68/drivers/net/sun3lance.c 2003-01-16 18:22:40.000000000 -0800 +++ 25/drivers/net/sun3lance.c 2003-04-21 00:31:42.000000000 -0700 @@ -238,7 +238,7 @@ static int lance_probe( struct net_devic static int lance_open( struct net_device *dev ); static void lance_init_ring( struct net_device *dev ); static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ); -static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp ); +static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp ); static int lance_rx( struct net_device *dev ); static int lance_close( struct net_device *dev ); static struct net_device_stats *lance_get_stats( struct net_device *dev ); @@ -620,7 +620,7 @@ static int lance_start_xmit( struct sk_b /* The LANCE interrupt handler. */ -static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp) +static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp) { struct net_device *dev = dev_id; struct lance_private *lp = dev->priv; @@ -629,7 +629,7 @@ static void lance_interrupt( int irq, vo if (dev == NULL) { DPRINTK( 1, ( "lance_interrupt(): invalid dev_id\n" )); - return; + return IRQ_NONE; } if (in_interrupt) @@ -743,7 +743,7 @@ static void lance_interrupt( int irq, vo DPRINTK( 2, ( "%s: exiting interrupt, csr0=%#04x.\n", dev->name, DREG )); in_interrupt = 0; - return; + return IRQ_HANDLED; } /* get packet, toss into skbuff */ --- linux-2.5.68/drivers/net/sunbmac.c 2003-02-14 17:35:06.000000000 -0800 +++ 25/drivers/net/sunbmac.c 2003-04-21 00:31:42.000000000 -0700 @@ -874,10 +874,11 @@ static void bigmac_rx(struct bigmac *bp) printk(KERN_NOTICE "%s: Memory squeeze, deferring packet.\n", bp->dev->name); } -static void bigmac_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t bigmac_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct bigmac *bp = (struct bigmac *) dev_id; u32 qec_status, bmac_status; + int handled = 0; DIRQ(("bigmac_interrupt: ")); @@ -887,14 +888,21 @@ static void bigmac_interrupt(int irq, vo DIRQ(("qec_status=%08x bmac_status=%08x\n", qec_status, bmac_status)); if ((qec_status & (GLOB_STAT_ER | GLOB_STAT_BM)) || - (bmac_status & CREG_STAT_ERRORS)) + (bmac_status & CREG_STAT_ERRORS)) { + handled = 1; bigmac_is_medium_rare(bp, qec_status, bmac_status); + } - if (bmac_status & CREG_STAT_TXIRQ) + if (bmac_status & CREG_STAT_TXIRQ) { + handled = 1; bigmac_tx(bp); + } - if (bmac_status & CREG_STAT_RXIRQ) + if (bmac_status & CREG_STAT_RXIRQ) { + handled = 1; bigmac_rx(bp); + } + return IRQ_RETVAL(handled); } static int bigmac_open(struct net_device *dev) --- linux-2.5.68/drivers/net/sundance.c 2003-01-16 18:22:18.000000000 -0800 +++ 25/drivers/net/sundance.c 2003-04-21 00:31:42.000000000 -0700 @@ -495,7 +495,7 @@ static void tx_timeout(struct net_device static void init_ring(struct net_device *dev); static int start_tx(struct sk_buff *skb, struct net_device *dev); static int reset_tx (struct net_device *dev); -static void intr_handler(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *regs); static void rx_poll(unsigned long data); static void tx_poll(unsigned long data); static void refill_rx (struct net_device *dev); @@ -1152,7 +1152,7 @@ reset_tx (struct net_device *dev) /* The interrupt handler cleans up after the Tx thread, and schedule a Rx thread work */ -static void intr_handler(int irq, void *dev_instance, struct pt_regs *rgs) +static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs) { struct net_device *dev = (struct net_device *)dev_instance; struct netdev_private *np; @@ -1161,6 +1161,7 @@ static void intr_handler(int irq, void * int hw_frame_id; int tx_cnt; int tx_status; + int handled = 0; ioaddr = dev->base_addr; np = dev->priv; @@ -1176,6 +1177,8 @@ static void intr_handler(int irq, void * if (!(intr_status & DEFAULT_INTR)) break; + handled = 1; + if (intr_status & (IntrRxDMADone)) { writew(DEFAULT_INTR & ~(IntrRxDone|IntrRxDMADone), ioaddr + IntrEnable); @@ -1284,7 +1287,7 @@ static void intr_handler(int irq, void * printk(KERN_DEBUG "%s: exiting interrupt, status=%#4.4x.\n", dev->name, readw(ioaddr + IntrStatus)); writel(5000, ioaddr + DownCounter); - + return IRQ_RETVAL(handled); } static void rx_poll(unsigned long data) --- linux-2.5.68/drivers/net/sungem.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/sungem.c 2003-04-21 00:31:42.000000000 -0700 @@ -773,7 +773,7 @@ static void gem_rx(struct gem *gp) gp->dev->name); } -static void gem_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t gem_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct gem *gp = dev->priv; @@ -792,6 +792,7 @@ static void gem_interrupt(int irq, void out: spin_unlock(&gp->lock); + return IRQ_HANDLED; } static void gem_tx_timeout(struct net_device *dev) --- linux-2.5.68/drivers/net/sunhme.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/sunhme.c 2003-04-21 00:31:42.000000000 -0700 @@ -2101,7 +2101,7 @@ static void happy_meal_rx(struct happy_m RXD((">")); } -static void happy_meal_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t happy_meal_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct happy_meal *hp = dev->priv; @@ -2135,6 +2135,7 @@ static void happy_meal_interrupt(int irq HMD(("done\n")); out: spin_unlock(&hp->happy_lock); + return IRQ_HANDLED; } #ifdef CONFIG_SBUS --- linux-2.5.68/drivers/net/sunlance.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/sunlance.c 2003-04-21 00:31:42.000000000 -0700 @@ -812,7 +812,7 @@ out: spin_unlock(&lp->lock); } -static void lance_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t lance_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; struct lance_private *lp = (struct lance_private *)dev->priv; @@ -871,6 +871,7 @@ static void lance_interrupt(int irq, voi } sbus_writew(LE_C0_INEA, lp->lregs + RDP); + return IRQ_HANDLED; } /* Build a fake network packet and send it to ourselves. */ --- linux-2.5.68/drivers/net/sunqe.c 2003-02-14 17:35:06.000000000 -0800 +++ 25/drivers/net/sunqe.c 2003-04-21 00:31:42.000000000 -0700 @@ -456,7 +456,7 @@ static void qe_tx_reclaim(struct sunqe * * so we just run through each qe and check to see who is signaling * and thus needs to be serviced. */ -static void qec_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t qec_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct sunqec *qecp = (struct sunqec *) dev_id; u32 qec_status; @@ -495,6 +495,7 @@ static void qec_interrupt(int irq, void qec_status >>= 4; channel++; } + return IRQ_HANDLED; } static int qe_open(struct net_device *dev) --- linux-2.5.68/drivers/net/tc35815.c 2003-02-24 13:08:46.000000000 -0800 +++ 25/drivers/net/tc35815.c 2003-04-21 00:31:42.000000000 -0700 @@ -451,7 +451,7 @@ static int __init tc35815_probe1(struct static int tc35815_open(struct net_device *dev); static int tc35815_send_packet(struct sk_buff *skb, struct net_device *dev); static void tc35815_tx_timeout(struct net_device *dev); -static void tc35815_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t tc35815_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void tc35815_rx(struct net_device *dev); static void tc35815_txdone(struct net_device *dev); static int tc35815_close(struct net_device *dev); @@ -1036,16 +1036,17 @@ static void tc35815_fatal_error_interrup * The typical workload of the driver: * Handle the network interface interrupts. */ -static void tc35815_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t tc35815_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; struct tc35815_regs *tr; struct tc35815_local *lp; int status, boguscount = 0; + int handled = 0; if (dev == NULL) { printk(KERN_WARNING "%s: irq %d for unknown device.\n", cardname, irq); - return; + return IRQ_NONE; } tr = (struct tc35815_regs*)dev->base_addr; @@ -1055,6 +1056,7 @@ static void tc35815_interrupt(int irq, v status = tc_readl(&tr->Int_Src); if (status == 0) break; + handled = 1; tc_writel(status, &tr->Int_Src); /* write to clear */ /* Fatal errors... */ @@ -1097,7 +1099,7 @@ static void tc35815_interrupt(int irq, v } } while (++boguscount < 20) ; - return; + return IRQ_RETVAL(handled); } /* We have a good packet(s), get it/them out of the buffers. */ --- linux-2.5.68/drivers/net/tg3.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/tg3.c 2003-04-21 00:31:42.000000000 -0700 @@ -2148,16 +2148,19 @@ static inline unsigned int tg3_has_work( return work_exists; } -static void tg3_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t tg3_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct tg3 *tp = dev->priv; struct tg3_hw_status *sblk = tp->hw_status; unsigned long flags; + int handled = 0; spin_lock_irqsave(&tp->lock, flags); if (sblk->status & SD_STATUS_UPDATED) { + handled = 1; + /* * writing any value to intr-mbox-0 clears PCI INTA# and * chip-internal interrupt pending events. @@ -2187,6 +2190,7 @@ static void tg3_interrupt(int irq, void } spin_unlock_irqrestore(&tp->lock, flags); + return IRQ_RETVAL(handled); } static void tg3_init_rings(struct tg3 *); --- linux-2.5.68/drivers/net/tlan.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/tlan.c 2003-04-21 00:31:42.000000000 -0700 @@ -288,7 +288,7 @@ static void TLan_Eisa_Cleanup( void ); static int TLan_Init( struct net_device * ); static int TLan_Open( struct net_device *dev ); static int TLan_StartTx( struct sk_buff *, struct net_device *); -static void TLan_HandleInterrupt( int, void *, struct pt_regs *); +static irqreturn_t TLan_HandleInterrupt( int, void *, struct pt_regs *); static int TLan_Close( struct net_device *); static struct net_device_stats *TLan_GetStats( struct net_device *); static void TLan_SetMulticastList( struct net_device *); @@ -1106,7 +1106,7 @@ static int TLan_StartTx( struct sk_buff * **************************************************************/ -static void TLan_HandleInterrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t TLan_HandleInterrupt(int irq, void *dev_id, struct pt_regs *regs) { u32 ack; struct net_device *dev; @@ -1133,7 +1133,7 @@ static void TLan_HandleInterrupt(int irq } spin_unlock(&priv->lock); - + return IRQ_HANDLED; } /* TLan_HandleInterrupts */ --- linux-2.5.68/drivers/net/tokenring/3c359.c 2003-01-16 18:22:55.000000000 -0800 +++ 25/drivers/net/tokenring/3c359.c 2003-04-21 00:31:42.000000000 -0700 @@ -131,7 +131,7 @@ static int xl_xmit(struct sk_buff *skb, static void xl_dn_comp(struct net_device *dev); static int xl_close(struct net_device *dev); static void xl_set_rx_mode(struct net_device *dev); -static void xl_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t xl_interrupt(int irq, void *dev_id, struct pt_regs *regs); static struct net_device_stats * xl_get_stats(struct net_device *dev); static int xl_set_mac_address(struct net_device *dev, void *addr) ; static void xl_arb_cmd(struct net_device *dev); @@ -1027,7 +1027,7 @@ static void xl_freemem(struct net_device return ; } -static void xl_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t xl_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; struct xl_private *xl_priv =(struct xl_private *)dev->priv; @@ -1036,13 +1036,13 @@ static void xl_interrupt(int irq, void * if (!dev) { printk(KERN_WARNING "Device structure dead, aaahhhh !\n") ; - return ; + return IRQ_NONE; } intstatus = readw(xl_mmio + MMIO_INTSTATUS) ; if (!(intstatus & 1)) /* We didn't generate the interrupt */ - return ; + return IRQ_NONE; spin_lock(&xl_priv->xl_lock) ; @@ -1074,7 +1074,7 @@ static void xl_interrupt(int irq, void * xl_reset(dev) ; writel(ACK_INTERRUPT | LATCH_ACK, xl_mmio + MMIO_COMMAND) ; spin_unlock(&xl_priv->xl_lock) ; - return ; + return IRQ_HANDLED; } /* Host Error */ if (intstatus & SRBRINT ) { /* Srbc interrupt */ @@ -1134,7 +1134,7 @@ static void xl_interrupt(int irq, void * xl_reset(dev) ; writel(ACK_INTERRUPT | LATCH_ACK, xl_mmio + MMIO_COMMAND) ; spin_unlock(&xl_priv->xl_lock) ; - return ; + return IRQ_HANDLED; } } else { printk(KERN_WARNING "%s: Received Unknown interrupt : %04x \n", dev->name, intstatus) ; @@ -1147,7 +1147,8 @@ static void xl_interrupt(int irq, void * writel( SETINDENABLE | INT_MASK, xl_mmio + MMIO_COMMAND) ; writel( SETINTENABLE | INT_MASK, xl_mmio + MMIO_COMMAND) ; - spin_unlock(&xl_priv->xl_lock) ; + spin_unlock(&xl_priv->xl_lock) ; + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/net/tokenring/ibmtr.c 2003-01-16 18:22:21.000000000 -0800 +++ 25/drivers/net/tokenring/ibmtr.c 2003-04-21 00:31:42.000000000 -0700 @@ -198,7 +198,7 @@ static void open_sap(unsigned char type static void tok_set_multicast_list(struct net_device *dev); static int tok_send_packet(struct sk_buff *skb, struct net_device *dev); static int tok_close(struct net_device *dev); -void tok_interrupt(int irq, void *dev_id, struct pt_regs *regs); +irqreturn_t tok_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void initial_tok_int(struct net_device *dev); static void tr_tx(struct net_device *dev); static void tr_rx(struct net_device *dev); @@ -1165,7 +1165,7 @@ void dir_open_adapter (struct net_device /******************************************************************************/ -void tok_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t tok_interrupt(int irq, void *dev_id, struct pt_regs *regs) { unsigned char status; /* unsigned char status_even ; */ @@ -1181,7 +1181,7 @@ void tok_interrupt(int irq, void *dev_id #endif ti = (struct tok_info *) dev->priv; if (ti->sram_virt & 1) - return; /* PCMCIA card extraction flag */ + return IRQ_NONE; /* PCMCIA card extraction flag */ spin_lock(&(ti->lock)); #ifdef ENABLE_PAGING save_srpr = readb(ti->mmio + ACA_OFFSET + ACA_RW + SRPR_EVEN); @@ -1201,7 +1201,7 @@ void tok_interrupt(int irq, void *dev_id writeb(save_srpr, ti->mmio + ACA_OFFSET + ACA_RW + SRPR_EVEN); #endif spin_unlock(&(ti->lock)); - return; + return IRQ_HANDLED; } /* Begin interrupt handler HERE inline to avoid the extra levels of logic and call depth for the original solution. */ @@ -1240,7 +1240,7 @@ void tok_interrupt(int irq, void *dev_id outb(0, dev->base_addr + ADAPTRESET); ibmtr_reset_timer(&(ti->tr_timer), dev);/*BMS try to reopen*/ spin_unlock(&(ti->lock)); - return; + return IRQ_HANDLED; } if (readb(ti->mmio + ACA_OFFSET + ACA_RW + ISRP_EVEN) & (TCR_INT | ERR_INT | ACCESS_INT)) { @@ -1255,7 +1255,7 @@ void tok_interrupt(int irq, void *dev_id writeb(save_srpr, ti->mmio + ACA_OFFSET + ACA_RW + SRPR_EVEN); #endif spin_unlock(&(ti->lock)); - return; + return IRQ_HANDLED; } if (status & SRB_RESP_INT) { /* SRB response */ SET_PAGE(ti->srb_page); @@ -1486,6 +1486,7 @@ void tok_interrupt(int irq, void *dev_id #endif writeb(INT_ENABLE, ti->mmio + ACA_OFFSET + ACA_SET + ISRP_EVEN); spin_unlock(&(ti->lock)); + return IRQ_HANDLED; } /*tok_interrupt */ /*****************************************************************************/ --- linux-2.5.68/drivers/net/tokenring/Kconfig 2003-02-24 13:08:46.000000000 -0800 +++ 25/drivers/net/tokenring/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -16,7 +16,7 @@ config TR connected to such a Token Ring network and want to use your Token Ring card under Linux, say Y here and to the driver for your particular card below and read the Token-Ring mini-HOWTO, available - from . Most people can + from . Most people can say N here. config IBMTR @@ -25,7 +25,7 @@ config IBMTR ---help--- This is support for all IBM Token Ring cards that don't use DMA. If you have such a beast, say Y and read the Token-Ring mini-HOWTO, - available from . + available from . Warning: this driver will almost definitely fail if more than one active Token Ring card is present. @@ -44,7 +44,7 @@ config IBMOL Wake On Lan, and PCI 100/16/4 adapters. If you have such an adapter, say Y and read the Token-Ring - mini-HOWTO, available from . + mini-HOWTO, available from . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -62,7 +62,7 @@ config IBMLS This is support for IBM Lanstreamer PCI Token Ring Cards. If you have such an adapter, say Y and read the Token-Ring - mini-HOWTO, available from . + mini-HOWTO, available from . This driver is also available as a modules ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -78,7 +78,7 @@ config 3C359 should use the tms380 driver instead. If you have such an adapter, say Y and read the Token-Ring - mini-HOWTO, available from . + mini-HOWTO, available from . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -104,7 +104,7 @@ config TMS380TR If you have such an adapter and would like to use it, say Y and read the Token-Ring mini-HOWTO, available from - . + . Also read the file or check . @@ -194,7 +194,7 @@ config SMCTR If you have such an adapter and would like to use it, say Y or M and read the Token-Ring mini-HOWTO, available from - and the file + and the file . This driver is also available as a module ( = code which can be --- linux-2.5.68/drivers/net/tokenring/lanstreamer.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/tokenring/lanstreamer.c 2003-04-21 00:31:42.000000000 -0700 @@ -201,7 +201,7 @@ static int streamer_open(struct net_devi static int streamer_xmit(struct sk_buff *skb, struct net_device *dev); static int streamer_close(struct net_device *dev); static void streamer_set_rx_mode(struct net_device *dev); -static void streamer_interrupt(int irq, void *dev_id, +static irqreturn_t streamer_interrupt(int irq, void *dev_id, struct pt_regs *regs); static struct net_device_stats *streamer_get_stats(struct net_device *dev); static int streamer_set_mac_address(struct net_device *dev, void *addr); @@ -1021,7 +1021,7 @@ static void streamer_rx(struct net_devic } /* end for all completed rx descriptors */ } -static void streamer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t streamer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct streamer_private *streamer_priv = @@ -1142,6 +1142,7 @@ static void streamer_interrupt(int irq, } /* while() */ spin_unlock(&streamer_priv->streamer_lock) ; + return IRQ_HANDLED; } static int streamer_xmit(struct sk_buff *skb, struct net_device *dev) --- linux-2.5.68/drivers/net/tokenring/madgemc.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/tokenring/madgemc.c 2003-04-21 00:31:42.000000000 -0700 @@ -77,7 +77,7 @@ static void madgemc_setregpage(struct ne static void madgemc_setsifsel(struct net_device *dev, int val); static void madgemc_setint(struct net_device *dev, int val); -static void madgemc_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t madgemc_interrupt(int irq, void *dev_id, struct pt_regs *regs); /* * These work around paging, however they don't guarentee you're on the @@ -457,14 +457,14 @@ int __init madgemc_probe(void) * exhausted all contiguous interrupts. * */ -static void madgemc_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t madgemc_interrupt(int irq, void *dev_id, struct pt_regs *regs) { int pending,reg1; struct net_device *dev; if (!dev_id) { printk("madgemc_interrupt: was not passed a dev_id!\n"); - return; + return IRQ_NONE; } dev = (struct net_device *)dev_id; @@ -472,7 +472,7 @@ static void madgemc_interrupt(int irq, v /* Make sure its really us. -- the Madge way */ pending = inb(dev->base_addr + MC_CONTROL_REG0); if (!(pending & MC_CONTROL_REG0_SINTR)) - return; /* not our interrupt */ + return IRQ_NONE; /* not our interrupt */ /* * Since we're level-triggered, we may miss the rising edge @@ -496,10 +496,10 @@ static void madgemc_interrupt(int irq, v pending = SIFREADW(SIFSTS); /* restart - the SIF way */ } else - return; + return IRQ_HANDLED; } while (1); - return; /* not reachable */ + return IRQ_HANDLED; /* not reachable */ } /* --- linux-2.5.68/drivers/net/tokenring/olympic.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/tokenring/olympic.c 2003-04-21 00:31:42.000000000 -0700 @@ -185,7 +185,7 @@ static int olympic_xmit(struct sk_buff * static int olympic_close(struct net_device *dev); static void olympic_set_rx_mode(struct net_device *dev); static void olympic_freemem(struct net_device *dev) ; -static void olympic_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t olympic_interrupt(int irq, void *dev_id, struct pt_regs *regs); static struct net_device_stats * olympic_get_stats(struct net_device *dev); static int olympic_set_mac_address(struct net_device *dev, void *addr) ; static void olympic_arb_cmd(struct net_device *dev); @@ -910,7 +910,7 @@ static void olympic_freemem(struct net_d return ; } -static void olympic_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t olympic_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev= (struct net_device *)dev_id; struct olympic_private *olympic_priv=(struct olympic_private *)dev->priv; @@ -925,7 +925,7 @@ static void olympic_interrupt(int irq, v */ sisr=readl(olympic_mmio+SISR) ; if (!(sisr & SISR_MI)) /* Interrupt isn't for us */ - return ; + return IRQ_NONE; sisr=readl(olympic_mmio+SISR_RR) ; /* Read & Reset sisr */ spin_lock(&olympic_priv->olympic_lock); @@ -937,7 +937,7 @@ static void olympic_interrupt(int irq, v free_irq(dev->irq, dev) ; dev->stop = NULL ; spin_unlock(&olympic_priv->olympic_lock) ; - return ; + return IRQ_NONE; } if (sisr & (SISR_SRB_REPLY | SISR_TX1_EOF | SISR_RX_STATUS | SISR_ADAPTER_CHECK | @@ -954,7 +954,7 @@ static void olympic_interrupt(int irq, v free_irq(dev->irq, dev) ; dev->stop = NULL ; spin_unlock(&olympic_priv->olympic_lock) ; - return ; + return IRQ_HANDLED; } /* SISR_ERR */ if(sisr & SISR_SRB_REPLY) { @@ -999,7 +999,7 @@ static void olympic_interrupt(int irq, v free_irq(dev->irq, dev) ; dev->stop = NULL ; spin_unlock(&olympic_priv->olympic_lock) ; - return ; + return IRQ_HANDLED; } /* SISR_ADAPTER_CHECK */ if (sisr & SISR_ASB_FREE) { @@ -1032,6 +1032,7 @@ static void olympic_interrupt(int irq, v writel(SISR_MI,olympic_mmio+SISR_MASK_SUM); spin_unlock(&olympic_priv->olympic_lock) ; + return IRQ_HANDLED; } static int olympic_xmit(struct sk_buff *skb, struct net_device *dev) --- linux-2.5.68/drivers/net/tokenring/smctr.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/tokenring/smctr.c 2003-04-21 00:31:42.000000000 -0700 @@ -151,7 +151,7 @@ static int smctr_init_shared_memory(stru static int smctr_init_tx_bdbs(struct net_device *dev); static int smctr_init_tx_fcbs(struct net_device *dev); static int smctr_internal_self_test(struct net_device *dev); -static void smctr_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t smctr_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int smctr_issue_enable_int_cmd(struct net_device *dev, __u16 interrupt_enable_mask); static int smctr_issue_int_ack(struct net_device *dev, __u16 iack_code, @@ -2002,7 +2002,7 @@ static int smctr_internal_self_test(stru /* * The typical workload of the driver: Handle the network interface interrupts. */ -static void smctr_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t smctr_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct net_local *tp; @@ -2015,7 +2015,7 @@ static void smctr_interrupt(int irq, voi if(dev == NULL) { printk(KERN_CRIT "%s: irq %d for unknown device.\n", dev->name, irq); - return; + return IRQ_NONE; } ioaddr = dev->base_addr; @@ -2023,7 +2023,7 @@ static void smctr_interrupt(int irq, voi if(tp->status == NOT_INITIALIZED) - return; + return IRQ_NONE; spin_lock(&tp->lock); @@ -2047,7 +2047,7 @@ static void smctr_interrupt(int irq, voi { smctr_disable_16bit(dev); spin_unlock(&tp->lock); - return; + return IRQ_HANDLED; } err = HARDWARE_FAILED; @@ -2486,7 +2486,7 @@ static void smctr_interrupt(int irq, voi smctr_enable_bic_int(dev); spin_unlock(&tp->lock); - return; + return IRQ_HANDLED; } static int smctr_issue_enable_int_cmd(struct net_device *dev, --- linux-2.5.68/drivers/net/tulip/de2104x.c 2003-01-16 18:22:29.000000000 -0800 +++ 25/drivers/net/tulip/de2104x.c 2003-04-21 00:31:42.000000000 -0700 @@ -492,7 +492,7 @@ rx_next: de->rx_tail = rx_tail; } -static void de_interrupt (int irq, void *dev_instance, struct pt_regs *regs) +static irqreturn_t de_interrupt (int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = dev_instance; struct de_private *de = dev->priv; @@ -500,7 +500,7 @@ static void de_interrupt (int irq, void status = dr32(MacStatus); if ((!(status & (IntrOK|IntrErr))) || (status == 0xFFFF)) - return; + return IRQ_NONE; if (netif_msg_intr(de)) printk(KERN_DEBUG "%s: intr, status %08x mode %08x desc %u/%u/%u\n", @@ -532,6 +532,7 @@ static void de_interrupt (int irq, void printk(KERN_ERR "%s: PCI bus error, status=%08x, PCI status=%04x\n", dev->name, status, pci_status); } + return IRQ_HANDLED; } static void de_tx (struct de_private *de) --- linux-2.5.68/drivers/net/tulip/de4x5.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/net/tulip/de4x5.c 2003-04-21 00:31:42.000000000 -0700 @@ -909,7 +909,7 @@ static struct { */ static int de4x5_open(struct net_device *dev); static int de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev); -static void de4x5_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t de4x5_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int de4x5_close(struct net_device *dev); static struct net_device_stats *de4x5_get_stats(struct net_device *dev); static void de4x5_local_stats(struct net_device *dev, char *buf, int pkt_len); @@ -1617,7 +1617,7 @@ de4x5_queue_pkt(struct sk_buff *skb, str ** is high and descriptor status bits cannot be set before the associated ** interrupt is asserted and this routine entered. */ -static void +static irqreturn_t de4x5_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; @@ -1627,7 +1627,7 @@ de4x5_interrupt(int irq, void *dev_id, s if (dev == NULL) { printk ("de4x5_interrupt(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } lp = (struct de4x5_private *)dev->priv; spin_lock(&lp->lock); @@ -1665,7 +1665,7 @@ de4x5_interrupt(int irq, void *dev_id, s printk("%s: Fatal bus error occurred, sts=%#8x, device stopped.\n", dev->name, sts); spin_unlock(&lp->lock); - return; + return IRQ_HANDLED; } } @@ -1681,7 +1681,7 @@ de4x5_interrupt(int irq, void *dev_id, s ENABLE_IRQs; spin_unlock(&lp->lock); - return; + return IRQ_HANDLED; } static int --- linux-2.5.68/drivers/net/tulip/dmfe.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/net/tulip/dmfe.c 2003-04-21 00:31:42.000000000 -0700 @@ -298,7 +298,7 @@ static struct net_device_stats * dmfe_ge static void dmfe_set_filter_mode(struct DEVICE *); static int dmfe_do_ioctl(struct DEVICE *, struct ifreq *, int); static u16 read_srom_word(long ,int); -static void dmfe_interrupt(int , void *, struct pt_regs *); +static irqreturn_t dmfe_interrupt(int , void *, struct pt_regs *); static void dmfe_descriptor_init(struct dmfe_board_info *, unsigned long); static void allocate_rx_buffer(struct dmfe_board_info *); static void update_cr6(u32, unsigned long); @@ -668,13 +668,13 @@ static int dmfe_start_xmit(struct sk_buf if ( db->tx_queue_cnt < TX_FREE_DESC_CNT ) netif_wake_queue(dev); - /* free this SKB */ - dev_kfree_skb(skb); - /* Restore CR7 to enable interrupt */ spin_unlock_irqrestore(&db->lock, flags); outl(db->cr7_data, dev->base_addr + DCR7); + /* free this SKB */ + dev_kfree_skb(skb); + return 0; } @@ -726,7 +726,7 @@ static int dmfe_stop(struct DEVICE *dev) * receive the packet to upper layer, free the transmitted packet */ -static void dmfe_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dmfe_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct DEVICE *dev = dev_id; struct dmfe_board_info *db = (struct dmfe_board_info *) dev->priv; @@ -737,7 +737,7 @@ static void dmfe_interrupt(int irq, void if (!dev) { DMFE_DBUG(1, "dmfe_interrupt() without DEVICE arg", 0); - return; + return IRQ_NONE; } spin_lock_irqsave(&db->lock, flags); @@ -747,7 +747,7 @@ static void dmfe_interrupt(int irq, void outl(db->cr5_data, ioaddr + DCR5); if ( !(db->cr5_data & 0xc1) ) { spin_unlock_irqrestore(&db->lock, flags); - return; + return IRQ_HANDLED; } /* Disable all interrupt in CR7 to solve the interrupt edge problem */ @@ -760,7 +760,7 @@ static void dmfe_interrupt(int irq, void db->reset_fatal++; db->wait_reset = 1; /* Need to RESET */ spin_unlock_irqrestore(&db->lock, flags); - return; + return IRQ_HANDLED; } /* Received the coming packet */ @@ -786,6 +786,7 @@ static void dmfe_interrupt(int irq, void outl(db->cr7_data, ioaddr + DCR7); spin_unlock_irqrestore(&db->lock, flags); + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/tulip/Kconfig 2003-02-10 12:24:14.000000000 -0800 +++ 25/drivers/net/tulip/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -21,7 +21,7 @@ config DE2104X (smc9332dst), you can also try the driver for "Generic DECchip" cards, above. However, most people with a network card of this type will say Y here.) Do read the Ethernet-HOWTO, available from - . More specific + . More specific information is contained in . @@ -42,7 +42,7 @@ config TULIP (smc9332dst), you can also try the driver for "Generic DECchip" cards, above. However, most people with a network card of this type will say Y here.) Do read the Ethernet-HOWTO, available from - . More specific + . More specific information is contained in . @@ -80,7 +80,7 @@ config DE4X5 These include the DE425, DE434, DE435, DE450 and DE500 models. If you have a network card of this type, say Y and read the Ethernet-HOWTO, available from - . More specific + . More specific information is contained in . --- linux-2.5.68/drivers/net/tulip/winbond-840.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/net/tulip/winbond-840.c 2003-04-21 00:31:42.000000000 -0700 @@ -385,7 +385,7 @@ static void tx_timeout(struct net_device static int alloc_ringdesc(struct net_device *dev); static void free_ringdesc(struct netdev_private *np); static int start_tx(struct sk_buff *skb, struct net_device *dev); -static void intr_handler(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *regs); static void netdev_error(struct net_device *dev, int intr_status); static int netdev_rx(struct net_device *dev); static u32 __set_rx_mode(struct net_device *dev); @@ -1165,15 +1165,16 @@ static void netdev_tx_done(struct net_de /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void intr_handler(int irq, void *dev_instance, struct pt_regs *rgs) +static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs) { struct net_device *dev = (struct net_device *)dev_instance; struct netdev_private *np = dev->priv; long ioaddr = dev->base_addr; int work_limit = max_interrupt_work; + int handled = 0; if (!netif_device_present(dev)) - return; + return IRQ_NONE; do { u32 intr_status = readl(ioaddr + IntrStatus); @@ -1187,6 +1188,8 @@ static void intr_handler(int irq, void * if ((intr_status & (NormalIntr|AbnormalIntr)) == 0) break; + handled = 1; + if (intr_status & (IntrRxDone | RxNoBuf)) netdev_rx(dev); if (intr_status & RxNoBuf) @@ -1222,6 +1225,7 @@ static void intr_handler(int irq, void * if (debug > 3) printk(KERN_DEBUG "%s: exiting interrupt, status=%#4.4x.\n", dev->name, (int)readl(ioaddr + IntrStatus)); + return IRQ_RETVAL(handled); } /* This routine is logically part of the interrupt handler, but separated --- linux-2.5.68/drivers/net/tulip/xircom_cb.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/tulip/xircom_cb.c 2003-04-21 00:31:42.000000000 -0700 @@ -111,7 +111,7 @@ struct xircom_private { /* Function prototypes */ static int xircom_probe(struct pci_dev *pdev, const struct pci_device_id *id); static void xircom_remove(struct pci_dev *pdev); -static void xircom_interrupt(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t xircom_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev); static int xircom_open(struct net_device *dev); static int xircom_close(struct net_device *dev); @@ -344,7 +344,7 @@ static void __devexit xircom_remove(stru leave("xircom_remove"); } -static void xircom_interrupt(int irq, void *dev_instance, struct pt_regs *regs) +static irqreturn_t xircom_interrupt(int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_instance; struct xircom_private *card = (struct xircom_private *) dev->priv; @@ -388,6 +388,7 @@ static void xircom_interrupt(int irq, vo spin_unlock(&card->lock); leave("xircom_interrupt"); + return IRQ_HANDLED; } static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev) --- linux-2.5.68/drivers/net/tulip/xircom_tulip_cb.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/tulip/xircom_tulip_cb.c 2003-04-21 00:31:42.000000000 -0700 @@ -340,7 +340,7 @@ static void xircom_tx_timeout(struct net static void xircom_init_ring(struct net_device *dev); static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev); static int xircom_rx(struct net_device *dev); -static void xircom_interrupt(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t xircom_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static int xircom_close(struct net_device *dev); static struct net_device_stats *xircom_get_stats(struct net_device *dev); static int xircom_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); @@ -1054,12 +1054,13 @@ static void check_duplex(struct net_devi /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void xircom_interrupt(int irq, void *dev_instance, struct pt_regs *regs) +static irqreturn_t xircom_interrupt(int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = dev_instance; struct xircom_private *tp = dev->priv; long ioaddr = dev->base_addr; int csr5, work_budget = max_interrupt_work; + int handled = 0; spin_lock (&tp->lock); @@ -1078,6 +1079,8 @@ static void xircom_interrupt(int irq, vo if ((csr5 & (NormalIntr|AbnormalIntr)) == 0) break; + handled = 1; + if (csr5 & (RxIntr | RxNoBuf)) work_budget -= xircom_rx(dev); @@ -1185,6 +1188,7 @@ static void xircom_interrupt(int irq, vo dev->name, inl(ioaddr + CSR5)); spin_unlock (&tp->lock); + return IRQ_RETVAL(handled); } --- linux-2.5.68/drivers/net/typhoon.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/typhoon.c 2003-04-21 00:31:42.000000000 -0700 @@ -1790,7 +1790,7 @@ typhoon_poll(struct net_device *dev, int return (done ? 0 : 1); } -static void +static irqreturn_t typhoon_interrupt(int irq, void *dev_instance, struct pt_regs *rgs) { struct net_device *dev = (struct net_device *) dev_instance; @@ -1799,7 +1799,7 @@ typhoon_interrupt(int irq, void *dev_ins intr_status = readl(ioaddr + TYPHOON_REG_INTR_STATUS); if(!intr_status) - return; + return IRQ_NONE; writel(intr_status, ioaddr + TYPHOON_REG_INTR_STATUS); @@ -1811,6 +1811,7 @@ typhoon_interrupt(int irq, void *dev_ins printk(KERN_ERR "%s: Error, poll already scheduled\n", dev->name); } + return IRQ_HANDLED; } static void --- linux-2.5.68/drivers/net/via-rhine.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/via-rhine.c 2003-04-21 00:31:42.000000000 -0700 @@ -530,7 +530,7 @@ static void via_rhine_check_duplex(struc static void via_rhine_timer(unsigned long data); static void via_rhine_tx_timeout(struct net_device *dev); static int via_rhine_start_tx(struct sk_buff *skb, struct net_device *dev); -static void via_rhine_interrupt(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t via_rhine_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static void via_rhine_tx(struct net_device *dev); static void via_rhine_rx(struct net_device *dev); static void via_rhine_error(struct net_device *dev, int intr_status); @@ -1330,16 +1330,19 @@ static int via_rhine_start_tx(struct sk_ /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void via_rhine_interrupt(int irq, void *dev_instance, struct pt_regs *rgs) +static irqreturn_t via_rhine_interrupt(int irq, void *dev_instance, struct pt_regs *rgs) { struct net_device *dev = dev_instance; long ioaddr; u32 intr_status; int boguscnt = max_interrupt_work; + int handled = 0; ioaddr = dev->base_addr; while ((intr_status = get_intr_status(dev))) { + handled = 1; + /* Acknowledge all of the current interrupt sources ASAP. */ if (intr_status & IntrTxDescRace) writeb(0x08, ioaddr + IntrStatus2); @@ -1385,6 +1388,7 @@ static void via_rhine_interrupt(int irq, if (debug > 3) printk(KERN_DEBUG "%s: exiting interrupt, status=%8.8x.\n", dev->name, readw(ioaddr + IntrStatus)); + return IRQ_RETVAL(handled); } /* This routine is logically part of the interrupt handler, but isolated --- linux-2.5.68/drivers/net/wan/comx-hw-comx.c 2003-02-14 17:35:06.000000000 -0800 +++ 25/drivers/net/wan/comx-hw-comx.c 2003-04-21 00:31:42.000000000 -0700 @@ -96,7 +96,7 @@ extern struct comx_hardware hicomx_hw; extern struct comx_hardware comx_hw; extern struct comx_hardware cmx_hw; -static void COMX_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t COMX_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void COMX_board_on(struct net_device *dev) { @@ -335,7 +335,7 @@ static inline char comx_line_change(stru -static void COMX_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t COMX_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct comx_channel *ch = dev->priv; @@ -348,7 +348,7 @@ static void COMX_interrupt(int irq, void if (dev == NULL) { printk(KERN_ERR "COMX_interrupt: irq %d for unknown device\n", irq); - return; + return IRQ_NONE; } jiffs = jiffies; @@ -445,6 +445,7 @@ static void COMX_interrupt(int irq, void } ch->HW_release_board(dev, interrupted); + return IRQ_HANDLED; } static int COMX_open(struct net_device *dev) --- linux-2.5.68/drivers/net/wan/comx-hw-mixcom.c 2003-02-14 17:35:06.000000000 -0800 +++ 25/drivers/net/wan/comx-hw-mixcom.c 2003-04-21 00:31:42.000000000 -0700 @@ -412,7 +412,7 @@ static inline void mixcom_extended_inter } -static void MIXCOM_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t MIXCOM_interrupt(int irq, void *dev_id, struct pt_regs *regs) { unsigned long flags; struct net_device *dev = (struct net_device *)dev_id; @@ -422,7 +422,7 @@ static void MIXCOM_interrupt(int irq, vo if (dev==NULL) { printk(KERN_ERR "comx_interrupt: irq %d for unknown device\n",irq); - return; + return IRQ_NONE; } ch = dev->priv; @@ -480,7 +480,7 @@ static void MIXCOM_interrupt(int irq, vo } restore_flags(flags); - return; + return IRQ_HANDLED; } static int MIXCOM_open(struct net_device *dev) --- linux-2.5.68/drivers/net/wan/comx-hw-munich.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/net/wan/comx-hw-munich.c 2003-04-21 00:31:42.000000000 -0700 @@ -1029,7 +1029,7 @@ static int MUNICH_send_packet(struct net * Called by the Linux kernel. * BEWARE! The interrupts are enabled on the call! */ -static void MUNICH_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t MUNICH_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct sk_buff *skb; int length; @@ -1386,7 +1386,7 @@ static void MUNICH_interrupt(int irq, vo board->stat_pri_races_missed++; if (race_stat & STAT_PTI) board->stat_pti_races_missed++; - return; + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/net/wan/cosa.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/net/wan/cosa.c 2003-04-21 00:31:42.000000000 -0700 @@ -343,7 +343,7 @@ static void put_driver_status(struct cos static void put_driver_status_nolock(struct cosa_data *cosa); /* Interrupt handling */ -static void cosa_interrupt(int irq, void *cosa, struct pt_regs *regs); +static irqreturn_t cosa_interrupt(int irq, void *cosa, struct pt_regs *regs); /* I/O ops debugging */ #ifdef DEBUG_IO @@ -1983,7 +1983,7 @@ out: spin_unlock_irqrestore(&cosa->lock, flags); } -static void cosa_interrupt(int irq, void *cosa_, struct pt_regs *regs) +static irqreturn_t cosa_interrupt(int irq, void *cosa_, struct pt_regs *regs) { unsigned status; int count = 0; @@ -2023,6 +2023,7 @@ again: else printk(KERN_INFO "%s: returning from IRQ\n", cosa->name); #endif + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/wan/cycx_main.c 2003-01-16 18:22:09.000000000 -0800 +++ 25/drivers/net/wan/cycx_main.c 2003-04-21 00:31:42.000000000 -0700 @@ -75,7 +75,7 @@ static int shutdown (wan_device_t *wande static int ioctl (wan_device_t *wandev, unsigned cmd, unsigned long arg); /* Miscellaneous functions */ -static void cycx_isr (int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t cycx_isr (int irq, void *dev_id, struct pt_regs *regs); /* Global Data * Note: All data must be explicitly initialized!!! @@ -316,7 +316,7 @@ static int ioctl (wan_device_t *wandev, * o acknowledge Cyclom 2X hardware interrupt. * o call protocol-specific interrupt service routine, if any. */ -static void cycx_isr (int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t cycx_isr (int irq, void *dev_id, struct pt_regs *regs) { cycx_t *card = (cycx_t *)dev_id; @@ -331,7 +331,8 @@ static void cycx_isr (int irq, void *dev if (card->isr) card->isr(card); -out: return; + return IRQ_HANDLED; +out: return IRQ_NONE; } /* --- linux-2.5.68/drivers/net/wan/dscc4.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/net/wan/dscc4.c 2003-04-21 00:31:42.000000000 -0700 @@ -337,7 +337,7 @@ static int dscc4_init_ring(struct net_de static void dscc4_release_ring(struct dscc4_dev_priv *); static void dscc4_timer(unsigned long); static void dscc4_tx_timeout(struct net_device *); -static void dscc4_irq(int irq, void *dev_id, struct pt_regs *ptregs); +static irqreturn_t dscc4_irq(int irq, void *dev_id, struct pt_regs *ptregs); static int dscc4_hdlc_attach(hdlc_device *, unsigned short, unsigned short); static int dscc4_set_iface(struct dscc4_dev_priv *, struct net_device *); static inline int dscc4_set_quartz(struct dscc4_dev_priv *, int); @@ -1315,7 +1315,7 @@ static int dscc4_set_iface(struct dscc4_ return ret; } -static void dscc4_irq(int irq, void *token, struct pt_regs *ptregs) +static irqreturn_t dscc4_irq(int irq, void *token, struct pt_regs *ptregs) { struct dscc4_dev_priv *root = token; struct dscc4_pci_priv *priv; @@ -1366,6 +1366,7 @@ static void dscc4_irq(int irq, void *tok } out: spin_unlock_irqrestore(&priv->lock, flags); + return IRQ_HANDLED; } static inline void dscc4_tx_irq(struct dscc4_pci_priv *ppriv, --- linux-2.5.68/drivers/net/wan/farsync.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/net/wan/farsync.c 2003-04-21 00:31:42.000000000 -0700 @@ -614,7 +614,7 @@ fst_tx_config ( struct fst_port_info *po /* Control signal change interrupt event */ -static void +static irqreturn_t fst_intr_ctlchg ( struct fst_card_info *card, struct fst_port_info *port ) { int signals; @@ -637,6 +637,7 @@ fst_intr_ctlchg ( struct fst_card_info * netif_carrier_off ( port_to_dev ( port )); } } + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/wan/lmc/lmc_main.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/wan/lmc/lmc_main.c 2003-04-21 00:31:42.000000000 -0700 @@ -117,7 +117,7 @@ static int lmc_rx (struct net_device *de static int lmc_open(struct net_device *dev); static int lmc_close(struct net_device *dev); static struct net_device_stats *lmc_get_stats(struct net_device *dev); -static void lmc_interrupt(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t lmc_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static int lmc_set_config(struct net_device *dev, struct ifmap *map); static void lmc_initcsrs(lmc_softc_t * const sc, lmc_csrptr_t csr_base, size_t csr_size); static void lmc_softreset(lmc_softc_t * const); @@ -1388,7 +1388,7 @@ static int lmc_ifdown (struct net_device /* Interrupt handling routine. This will take an incoming packet, or clean * up after a trasmit. */ -static void lmc_interrupt (int irq, void *dev_instance, struct pt_regs *regs) /*fold00*/ +static irqreturn_t lmc_interrupt (int irq, void *dev_instance, struct pt_regs *regs) /*fold00*/ { struct net_device *dev = (struct net_device *) dev_instance; lmc_softc_t *sc; @@ -1398,6 +1398,7 @@ static void lmc_interrupt (int irq, void unsigned int badtx; u32 firstcsr; int max_work = LMC_RXDESCS; + int handled = 0; lmc_trace(dev, "lmc_interrupt in"); @@ -1421,6 +1422,8 @@ static void lmc_interrupt (int irq, void /* always go through this loop at least once */ while (csr & sc->lmc_intrmask) { + handled = 1; + /* * Clear interrupt bits, we handle all case below */ @@ -1580,6 +1583,7 @@ lmc_int_fail_out: spin_unlock(&sc->lmc_lock); lmc_trace(dev, "lmc_interrupt out"); + return IRQ_RETVAL(handled); } static int lmc_start_xmit (struct sk_buff *skb, struct net_device *dev) /*fold00*/ --- linux-2.5.68/drivers/net/wan/pc300_drv.c 2003-01-16 18:22:44.000000000 -0800 +++ 25/drivers/net/wan/pc300_drv.c 2003-04-21 00:31:42.000000000 -0700 @@ -285,7 +285,7 @@ static void rx_dma_buf_pt_init(pc300_t * static void rx_dma_buf_init(pc300_t *, int); static void tx_dma_buf_check(pc300_t *, int); static void rx_dma_buf_check(pc300_t *, int); -static void cpc_intr(int, void *, struct pt_regs *); +static irqreturn_t cpc_intr(int, void *, struct pt_regs *); static struct net_device_stats *cpc_get_stats(struct net_device *); static int clock_rate_calc(uclong, uclong, int *); static uclong detect_ram(pc300_t *); @@ -2366,7 +2366,7 @@ static void falc_intr(pc300_t * card) } } -static void cpc_intr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t cpc_intr(int irq, void *dev_id, struct pt_regs *regs) { pc300_t *card; volatile ucchar plx_status; @@ -2375,14 +2375,14 @@ static void cpc_intr(int irq, void *dev_ #ifdef PC300_DEBUG_INTR printk("cpc_intr: spurious intr %d\n", irq); #endif - return; /* spurious intr */ + return IRQ_NONE; /* spurious intr */ } if (card->hw.rambase == 0) { #ifdef PC300_DEBUG_INTR printk("cpc_intr: spurious intr2 %d\n", irq); #endif - return; /* spurious intr */ + return IRQ_NONE; /* spurious intr */ } switch (card->hw.type) { @@ -2403,6 +2403,7 @@ static void cpc_intr(int irq, void *dev_ } break; } + return IRQ_HANDLED; } void cpc_sca_status(pc300_t * card, int ch) --- linux-2.5.68/drivers/net/wan/sbni.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/wan/sbni.c 2003-04-21 00:31:42.000000000 -0700 @@ -119,7 +119,7 @@ static int sbni_ioctl( struct net_devic static struct net_device_stats *sbni_get_stats( struct net_device * ); static void set_multicast_list( struct net_device * ); -static void sbni_interrupt( int, void *, struct pt_regs * ); +static irqreturn_t sbni_interrupt( int, void *, struct pt_regs * ); static void handle_channel( struct net_device * ); static int recv_frame( struct net_device * ); static void send_frame( struct net_device * ); @@ -469,7 +469,7 @@ sbni_start_xmit( struct sk_buff *skb, * this board to be "master". */ -static void +static irqreturn_t sbni_interrupt( int irq, void *dev_id, struct pt_regs *regs ) { struct net_device *dev = (struct net_device *) dev_id; @@ -494,6 +494,7 @@ sbni_interrupt( int irq, void *dev_id if( nl->second ) spin_unlock( &((struct net_local *)nl->second->priv)->lock ); spin_unlock( &nl->lock ); + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/wan/sdla.c 2003-01-16 18:23:00.000000000 -0800 +++ 25/drivers/net/wan/sdla.c 2003-04-21 00:31:42.000000000 -0700 @@ -856,7 +856,7 @@ static void sdla_receive(struct net_devi restore_flags(flags); } -static void sdla_isr(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t sdla_isr(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev; struct frad_local *flp; @@ -867,7 +867,7 @@ static void sdla_isr(int irq, void *dev_ if (dev == NULL) { printk(KERN_WARNING "sdla_isr(): irq %d for unknown device.\n", irq); - return; + return IRQ_NONE; } flp = dev->priv; @@ -875,7 +875,7 @@ static void sdla_isr(int irq, void *dev_ if (!flp->initialized) { printk(KERN_WARNING "%s: irq %d for uninitialized device.\n", dev->name, irq); - return; + return IRQ_NONE; } byte = sdla_byte(dev, flp->type == SDLA_S508 ? SDLA_508_IRQ_INTERFACE : SDLA_502_IRQ_INTERFACE); @@ -910,6 +910,7 @@ static void sdla_isr(int irq, void *dev_ /* this clears the byte, informing the Z80 we're done */ byte = 0; sdla_write(dev, flp->type == SDLA_S508 ? SDLA_508_IRQ_INTERFACE : SDLA_502_IRQ_INTERFACE, &byte, sizeof(byte)); + return IRQ_HANDLED; } static void sdla_poll(unsigned long device) --- linux-2.5.68/drivers/net/wan/sdlamain.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/net/wan/sdlamain.c 2003-04-21 00:31:42.000000000 -0700 @@ -193,7 +193,7 @@ static int ioctl_dump (sdla_t* card, sdl static int ioctl_exec (sdla_t* card, sdla_exec_t* u_exec, int); /* Miscellaneous functions */ -STATIC void sdla_isr (int irq, void* dev_id, struct pt_regs *regs); +STATIC irqreturn_t sdla_isr (int irq, void* dev_id, struct pt_regs *regs); static void release_hw (sdla_t *card); static void run_wanpipe_tq (unsigned long); @@ -1034,9 +1034,10 @@ static int ioctl_exec (sdla_t* card, sdl * o acknowledge SDLA hardware interrupt. * o call protocol-specific interrupt service routine, if any. */ -STATIC void sdla_isr (int irq, void* dev_id, struct pt_regs *regs) +STATIC irqreturn_t sdla_isr (int irq, void* dev_id, struct pt_regs *regs) { #define card ((sdla_t*)dev_id) + int handled = 0; if(card->hw.type == SDLA_S514) { /* handle interrrupt on S514 */ u32 int_status; @@ -1051,7 +1052,7 @@ STATIC void sdla_isr (int irq, void* dev /* check if the interrupt is for this device */ if(!((unsigned char)int_status & (IRQ_CPU_A | IRQ_CPU_B))) - return; + return IRQ_HANDLED; /* if the IRQ is for both CPUs on the same adapter, */ /* then alter the interrupt status so as to handle */ @@ -1083,7 +1084,7 @@ STATIC void sdla_isr (int irq, void* dev /* exit if the interrupt is for another CPU on the */ /* same IRQ */ if(!card_found_for_IRQ) - return; + return IRQ_HANDLED; if (!card || (card->wandev.state == WAN_UNCONFIGURED && !card->configured)){ @@ -1093,7 +1094,7 @@ STATIC void sdla_isr (int irq, void* dev printk(KERN_INFO "IRQ for unconfigured adapter\n"); S514_intack(&card->hw, int_status); - return; + return IRQ_HANDLED; } if (card->in_isr) { @@ -1101,7 +1102,7 @@ STATIC void sdla_isr (int irq, void* dev "%s: interrupt re-entrancy on IRQ %d\n", card->devname, card->wandev.irq); S514_intack(&card->hw, int_status); - return; + return IRQ_HANDLED; } spin_lock(&card->wandev.lock); @@ -1121,20 +1122,20 @@ STATIC void sdla_isr (int irq, void* dev /* handle a maximum of two interrupts (one for each */ /* CPU on the adapter) before returning */ if((++ IRQ_count) == 2) - return; + return IRQ_HANDLED; } } else { /* handle interrupt on S508 adapter */ if (!card || ((card->wandev.state == WAN_UNCONFIGURED) && !card->configured)) - return; + return IRQ_HANDLED; if (card->in_isr) { printk(KERN_INFO "%s: interrupt re-entrancy on IRQ %d!\n", card->devname, card->wandev.irq); - return; + return IRQ_HANDLED; } spin_lock(&card->wandev.lock); @@ -1152,7 +1153,7 @@ STATIC void sdla_isr (int irq, void* dev spin_unlock(&card->wandev.lock); } - + return IRQ_HANDLED; #undef card } --- linux-2.5.68/drivers/net/wireless/airo.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/net/wireless/airo.c 2003-04-21 00:31:42.000000000 -0700 @@ -947,7 +947,7 @@ static u16 transmit_allocate(struct airo static int transmit_802_3_packet(struct airo_info*, int len, char *pPacket); static int transmit_802_11_packet(struct airo_info*, int len, char *pPacket); -static void airo_interrupt( int irq, void* dev_id, struct pt_regs +static irqreturn_t airo_interrupt( int irq, void* dev_id, struct pt_regs *regs); static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); #ifdef WIRELESS_EXT @@ -1837,20 +1837,23 @@ static void airo_read_mic(struct airo_in } } -static void airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) { +static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; u16 status; u16 fid; struct airo_info *apriv = dev->priv; u16 savedInterrupts = 0; + int handled = 0; if (!netif_device_present(dev)) - return; + return IRQ_NONE; for (;;) { status = IN4500( apriv, EVSTAT ); if ( !(status & STATUS_INTS) || status == 0xffff ) break; + handled = 1; + if ( status & EV_AWAKE ) { OUT4500( apriv, EVACK, EV_AWAKE ); OUT4500( apriv, EVACK, EV_AWAKE ); @@ -2133,7 +2136,7 @@ static void airo_interrupt ( int irq, vo OUT4500( apriv, EVINTEN, savedInterrupts ); /* done.. */ - return; + return IRQ_RETVAL(handled); } /* --- linux-2.5.68/drivers/net/wireless/arlan.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/wireless/arlan.c 2003-04-21 00:31:42.000000000 -0700 @@ -113,7 +113,7 @@ static int arlans_found; static int arlan_probe_here(struct net_device *dev, int ioaddr); static int arlan_open(struct net_device *dev); static int arlan_tx(struct sk_buff *skb, struct net_device *dev); -static void arlan_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t arlan_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int arlan_close(struct net_device *dev); static struct net_device_stats * arlan_statistics (struct net_device *dev); @@ -1840,7 +1840,7 @@ end_int_process: return; } -static void arlan_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t arlan_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct arlan_private *priv = (struct arlan_private *) dev->priv; @@ -1859,7 +1859,7 @@ static void arlan_interrupt(int irq, voi priv->irq_test_done = 1; ARLAN_DEBUG_EXIT("arlan_interrupt"); - return; + return IRQ_HANDLED; } --- linux-2.5.68/drivers/net/wireless/Kconfig 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/net/wireless/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -88,7 +88,7 @@ config WAVELAN If you want to use an ISA WaveLAN card under Linux, say Y and read the Ethernet-HOWTO, available from - . Some more specific + . Some more specific information is contained in and in the source code . @@ -240,7 +240,7 @@ config PCMCIA_HERMES To use your PC-cards, you will need supporting software from David Hinds' pcmcia-cs package (see the file for location). You also want to check out the PCMCIA-HOWTO, - available from . + available from . You will also very likely also need the Wireless Tools in order to configure your card and that /etc/pcmcia/wireless.opts works: @@ -266,7 +266,7 @@ config AIRO_CS To use your PC-cards, you will need supporting software from David Hinds' pcmcia-cs package (see the file for location). You also want to check out the PCMCIA-HOWTO, - available from . + available from . # yes, this works even when no drivers are selected config NET_WIRELESS --- linux-2.5.68/drivers/net/wireless/wavelan.c 2003-01-16 18:22:43.000000000 -0800 +++ 25/drivers/net/wireless/wavelan.c 2003-04-21 00:31:42.000000000 -0700 @@ -3858,7 +3858,7 @@ static int wv_check_ioaddr(unsigned long * This function is the interrupt handler for the WaveLAN card. This * routine will be called whenever: */ -static void wavelan_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t wavelan_interrupt(int irq, void *dev_id, struct pt_regs *regs) { device *dev; unsigned long ioaddr; @@ -3934,7 +3934,7 @@ static void wavelan_interrupt(int irq, v dev->name, hasr); #endif spin_unlock (&lp->spinlock); - return; + return IRQ_NONE; } /* Read interrupt data. */ @@ -4004,6 +4004,7 @@ static void wavelan_interrupt(int irq, v #ifdef DEBUG_INTERRUPT_TRACE printk(KERN_DEBUG "%s: <-wavelan_interrupt()\n", dev->name); #endif + return IRQ_HANDLED; } /*------------------------------------------------------------------*/ --- linux-2.5.68/drivers/net/yellowfin.c 2003-01-16 18:22:02.000000000 -0800 +++ 25/drivers/net/yellowfin.c 2003-04-21 00:31:42.000000000 -0700 @@ -406,7 +406,7 @@ static void yellowfin_timer(unsigned lon static void yellowfin_tx_timeout(struct net_device *dev); static void yellowfin_init_ring(struct net_device *dev); static int yellowfin_start_xmit(struct sk_buff *skb, struct net_device *dev); -static void yellowfin_interrupt(int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static int yellowfin_rx(struct net_device *dev); static void yellowfin_error(struct net_device *dev, int intr_status); static int yellowfin_close(struct net_device *dev); @@ -942,17 +942,18 @@ static int yellowfin_start_xmit(struct s /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ -static void yellowfin_interrupt(int irq, void *dev_instance, struct pt_regs *regs) +static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = dev_instance; struct yellowfin_private *yp; long ioaddr; int boguscnt = max_interrupt_work; + int handled = 0; #ifndef final_version /* Can never occur. */ if (dev == NULL) { printk (KERN_ERR "yellowfin_interrupt(): irq %d for unknown device.\n", irq); - return; + return IQ_NONE; } #endif @@ -971,6 +972,8 @@ static void yellowfin_interrupt(int irq, if (intr_status == 0) break; + handled = 1; + if (intr_status & (IntrRxDone | IntrEarlyRx)) { yellowfin_rx(dev); outl(0x10001000, ioaddr + RxCtrl); /* Wake Rx engine. */ @@ -1091,7 +1094,7 @@ static void yellowfin_interrupt(int irq, dev->name, inw(ioaddr + IntrStatus)); spin_unlock (&yp->lock); - return; + return IRQ_RETVAL(handled); } /* This routine is logically part of the interrupt handler, but separated --- linux-2.5.68/drivers/net/znet.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/net/znet.c 2003-04-21 00:31:42.000000000 -0700 @@ -159,7 +159,7 @@ struct netidblk { static int znet_open(struct net_device *dev); static int znet_send_packet(struct sk_buff *skb, struct net_device *dev); -static void znet_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t znet_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void znet_rx(struct net_device *dev); static int znet_close(struct net_device *dev); static struct net_device_stats *net_get_stats(struct net_device *dev); @@ -604,16 +604,17 @@ static int znet_send_packet(struct sk_bu } /* The ZNET interrupt handler. */ -static void znet_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t znet_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; struct znet_private *znet = dev->priv; int ioaddr; int boguscnt = 20; + int handled = 0; if (dev == NULL) { printk(KERN_WARNING "znet_interrupt(): IRQ %d for unknown device.\n", irq); - return; + return IRQ_NONE; } spin_lock (&znet->lock); @@ -637,6 +638,8 @@ static void znet_interrupt(int irq, void if ((status & SR0_INTERRUPT) == 0) break; + handled = 1; + if ((status & SR0_EVENT_MASK) == SR0_TRANSMIT_DONE || (status & SR0_EVENT_MASK) == SR0_RETRANSMIT_DONE || (status & SR0_EVENT_MASK) == SR0_TRANSMIT_NO_CRC_DONE) { @@ -682,7 +685,7 @@ static void znet_interrupt(int irq, void spin_unlock (&znet->lock); - return; + return IRQ_RETVAL(handled); } static void znet_rx(struct net_device *dev) --- linux-2.5.68/drivers/parport/parport_pc.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/parport/parport_pc.c 2003-04-21 00:31:39.000000000 -0700 @@ -262,9 +262,11 @@ static int clear_epp_timeout(struct parp * of these are in parport_pc.h. */ -static void parport_pc_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t parport_pc_interrupt(int irq, void *dev_id, struct pt_regs *regs) { parport_generic_irq(irq, (struct parport *) dev_id, regs); + /* FIXME! Was it really ours? */ + return IRQ_HANDLED; } void parport_pc_write_data(struct parport *p, unsigned char d) --- linux-2.5.68/drivers/parport/parport_serial.c 2003-01-16 18:22:43.000000000 -0800 +++ 25/drivers/parport/parport_serial.c 2003-04-21 02:45:04.000000000 -0700 @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -150,12 +151,12 @@ struct pci_board_no_ids { static int __devinit siig10x_init_fn(struct pci_dev *dev, struct pci_board_no_ids *board, int enable) { - return pci_siig10x_fn(dev, NULL, enable); + return pci_siig10x_fn(dev, enable); } static int __devinit siig20x_init_fn(struct pci_dev *dev, struct pci_board_no_ids *board, int enable) { - return pci_siig20x_fn(dev, NULL, enable); + return pci_siig20x_fn(dev, enable); } static struct pci_board_no_ids pci_boards[] __devinitdata = { --- linux-2.5.68/drivers/pci/bus.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/pci/bus.c 2003-04-21 00:31:39.000000000 -0700 @@ -75,7 +75,8 @@ pci_bus_alloc_resource(struct pci_bus *b * Add newly discovered PCI devices (which are on the bus->devices * list) to the global PCI device list, add the sysfs and procfs * entries. Where a bridge is found, add the discovered bus to - * the parents list of child buses, and recurse. + * the parents list of child buses, and recurse (breadth-first + * to be compatible with 2.4) * * Call hotplug for each new devices. */ @@ -98,6 +99,12 @@ void __devinit pci_bus_add_devices(struc #endif pci_create_sysfs_dev_files(dev); + } + + list_for_each_entry(dev, &bus->devices, bus_list) { + + BUG_ON(list_empty(&dev->global_list)); + /* * If there is an unattached subordinate bus, attach * it and then scan for unattached PCI devices. --- linux-2.5.68/drivers/pcmcia/i82092aa.h 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/pcmcia/i82092aa.h 2003-04-21 02:45:05.000000000 -0700 @@ -1,6 +1,8 @@ #ifndef _INCLUDE_GUARD_i82092aa_H_ #define _INCLUDE_GUARD_i82092aa_H_ +#include + /* $Id: i82092aa.h,v 1.1.1.1 2001/09/19 14:53:15 dwmw2 Exp $ */ /* Debuging defines */ @@ -21,7 +23,7 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *id); static void i82092aa_pci_remove(struct pci_dev *dev); static int card_present(int socketno); -static void i82092aa_interrupt(int irq, void *dev, struct pt_regs *regs); +static irqreturn_t i82092aa_interrupt(int irq, void *dev, struct pt_regs *regs); --- linux-2.5.68/drivers/pcmcia/i82092.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/pcmcia/i82092.c 2003-04-21 02:45:05.000000000 -0700 @@ -219,6 +219,7 @@ static unsigned char indirect_read(int s return val; } +#if 0 static unsigned short indirect_read16(int socket, unsigned short reg) { unsigned short int port; @@ -235,6 +236,7 @@ static unsigned short indirect_read16(in spin_unlock_irqrestore(&port_lock,flags); return tmp; } +#endif static void indirect_write(int socket, unsigned short reg, unsigned char value) { @@ -334,11 +336,12 @@ static void i82092aa_bh(void *dummy) static DECLARE_WORK(i82092aa_task, i82092aa_bh, NULL); -static void i82092aa_interrupt(int irq, void *dev, struct pt_regs *regs) +static irqreturn_t i82092aa_interrupt(int irq, void *dev, struct pt_regs *regs) { int i; int loopcount = 0; - + int handled = 0; + unsigned int events, active=0; /* enter("i82092aa_interrupt");*/ @@ -362,6 +365,7 @@ static void i82092aa_interrupt(int irq, if ((csc==0) || /* no events on this socket */ (sockets[i].handler==NULL)) /* no way to handle events */ continue; + handled = 1; events = 0; if (csc & I365_CSC_DETECT) { @@ -390,7 +394,7 @@ static void i82092aa_interrupt(int irq, break; } - + return IRQ_RETVAL(handled); /* leave("i82092aa_interrupt");*/ } --- linux-2.5.68/drivers/pcmcia/i82365.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/pcmcia/i82365.c 2003-04-21 02:45:05.000000000 -0700 @@ -78,7 +78,7 @@ static const char *version = #define DEBUG(n, args...) do { } while (0) #endif -static void i365_count_irq(int, void *, struct pt_regs *); +static irqreturn_t i365_count_irq(int, void *, struct pt_regs *); static inline int _check_irq(int irq, int flags) { if (request_irq(irq, i365_count_irq, flags, "x", i365_count_irq) != 0) @@ -535,11 +535,12 @@ static u_int __init set_bridge_opts(u_sh static volatile u_int irq_hits; static u_short irq_sock; -static void i365_count_irq(int irq, void *dev, struct pt_regs *regs) +static irqreturn_t i365_count_irq(int irq, void *dev, struct pt_regs *regs) { i365_get(irq_sock, I365_CSC); irq_hits++; DEBUG(2, "-> hit on irq %d\n", irq); + return IRQ_HANDLED; } static u_int __init test_irq(u_short sock, int irq) @@ -627,11 +628,6 @@ static int to_cycles(int ns) return ns/cycle_time; } -static int to_ns(int cycles) -{ - return cycle_time*cycles; -} - /*====================================================================*/ #ifdef CONFIG_ISA @@ -939,7 +935,7 @@ static DECLARE_WORK(pcic_task, pcic_bh, static unsigned long last_detect_jiffies; -static void pcic_interrupt(int irq, void *dev, +static irqreturn_t pcic_interrupt(int irq, void *dev, struct pt_regs *regs) { int i, j, csc; @@ -947,7 +943,8 @@ static void pcic_interrupt(int irq, void #ifdef CONFIG_ISA u_long flags = 0; #endif - + int handled = 0; + DEBUG(4, "i82365: pcic_interrupt(%d)\n", irq); for (j = 0; j < 20; j++) { @@ -956,6 +953,7 @@ static void pcic_interrupt(int irq, void if ((socket[i].cs_irq != irq) && (socket[i].cap.pci_irq != irq)) continue; + handled = 1; ISA_LOCK(i, flags); csc = i365_get(i, I365_CSC); if ((csc == 0) || (!socket[i].handler) || @@ -1002,6 +1000,7 @@ static void pcic_interrupt(int irq, void printk(KERN_NOTICE "i82365: infinite loop in interrupt handler\n"); DEBUG(4, "i82365: interrupt done\n"); + return IRQ_RETVAL(handled); } /* pcic_interrupt */ static void pcic_interrupt_wrapper(u_long data) --- linux-2.5.68/drivers/pcmcia/Kconfig 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/pcmcia/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -21,7 +21,7 @@ config PCMCIA To use your PC-cards, you will need supporting software from David Hinds' pcmcia-cs package (see the file for location). Please also read the PCMCIA-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). --- linux-2.5.68/drivers/pcmcia/rsrc_mgr.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/pcmcia/rsrc_mgr.c 2003-04-21 00:31:39.000000000 -0700 @@ -599,7 +599,7 @@ int find_mem_region(u_long *base, u_long #ifdef CONFIG_PCMCIA_PROBE -static void fake_irq(int i, void *d, struct pt_regs *r) { } +static irqreturn_t fake_irq(int i, void *d, struct pt_regs *r) { return IRQ_NONE; } static inline int check_irq(int irq) { if (request_irq(irq, fake_irq, 0, "bogus", NULL) != 0) --- linux-2.5.68/drivers/pcmcia/tcic.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/pcmcia/tcic.c 2003-04-21 02:45:05.000000000 -0700 @@ -111,7 +111,7 @@ MODULE_PARM(cycle_time, "i"); /*====================================================================*/ -static void tcic_interrupt(int irq, void *dev, struct pt_regs *regs); +static irqreturn_t tcic_interrupt(int irq, void *dev, struct pt_regs *regs); static void tcic_timer(u_long data); static struct pccard_operations tcic_operations; @@ -229,9 +229,10 @@ static int to_cycles(int ns) static volatile u_int irq_hits; -static void __init tcic_irq_count(int irq, void *dev, struct pt_regs *regs) +static irqreturn_t __init tcic_irq_count(int irq, void *dev, struct pt_regs *regs) { irq_hits++; + return IRQ_HANDLED; } static u_int __init try_irq(int irq) @@ -565,7 +566,7 @@ static void tcic_bh(void *dummy) static DECLARE_WORK(tcic_task, tcic_bh, NULL); -static void tcic_interrupt(int irq, void *dev, struct pt_regs *regs) +static irqreturn_t tcic_interrupt(int irq, void *dev, struct pt_regs *regs) { int i, quick = 0; u_char latch, sstat; @@ -575,7 +576,7 @@ static void tcic_interrupt(int irq, void if (active) { printk(KERN_NOTICE "tcic: reentered interrupt handler!\n"); - return; + return IRQ_NONE; } else active = 1; @@ -620,7 +621,7 @@ static void tcic_interrupt(int irq, void active = 0; DEBUG(2, "tcic: interrupt done\n"); - + return IRQ_HANDLED; } /* tcic_interrupt */ static void tcic_timer(u_long data) --- linux-2.5.68/drivers/pcmcia/yenta.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/pcmcia/yenta.c 2003-04-21 00:31:39.000000000 -0700 @@ -429,7 +429,7 @@ static void yenta_bh(void *data) socket->handler(socket->info, events); } -static void yenta_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t yenta_interrupt(int irq, void *dev_id, struct pt_regs *regs) { unsigned int events; pci_socket_t *socket = (pci_socket_t *) dev_id; @@ -440,7 +440,9 @@ static void yenta_interrupt(int irq, voi socket->events |= events; spin_unlock(&socket->event_lock); schedule_work(&socket->tq_task); + return IRQ_HANDLED; } + return IRQ_NONE; } static void yenta_interrupt_wrapper(unsigned long data) --- linux-2.5.68/drivers/pnp/resource.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/pnp/resource.c 2003-04-21 00:31:39.000000000 -0700 @@ -420,8 +420,9 @@ struct pnp_dev * pnp_check_irq_conflicts return NULL; } -static void pnp_test_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t pnp_test_handler(int irq, void *dev_id, struct pt_regs *regs) { + return IRQ_NONE; } int pnp_check_irq(struct pnp_dev * dev, int idx) --- linux-2.5.68/drivers/s390/block/dasd.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/s390/block/dasd.c 2003-04-21 00:31:39.000000000 -0700 @@ -141,38 +141,15 @@ dasd_free_device(struct dasd_device *dev static inline int dasd_state_new_to_known(struct dasd_device *device) { - umode_t devfs_perm; - kdev_t kdev; - char buf[20]; - - kdev = dasd_get_kdev(device); - if (kdev_none(kdev)) - return -ENODEV; - /* * As long as the device is not in state DASD_STATE_NEW we want to * keep the reference count > 0. */ dasd_get_device(device); -#ifdef CONFIG_DEVFS_FS - /* Add a proc directory and the dasd device entry to devfs. */ sprintf(device->gdp->devfs_name, "dasd/%04x", _ccw_device_get_device_number(device->cdev)); -#endif - - if (device->ro_flag) - devfs_perm = S_IFBLK | S_IRUSR; - else - devfs_perm = S_IFBLK | S_IRUSR | S_IWUSR; - snprintf(buf, sizeof(buf), "dasd/%04x/device", - _ccw_device_get_device_number(device->cdev)); - device->devfs_entry = devfs_register(NULL, buf, 0, - major(kdev), - minor(kdev) << DASD_PARTN_BITS, - devfs_perm, - &dasd_device_operations, NULL); device->state = DASD_STATE_KNOWN; return 0; } @@ -183,10 +160,6 @@ dasd_state_new_to_known(struct dasd_devi static inline void dasd_state_known_to_new(struct dasd_device * device) { - /* Remove device entry and devfs directory. */ - devfs_unregister(device->devfs_entry); - devfs_unregister(device->gdp->de); - /* Forget the discipline information. */ device->discipline = NULL; device->state = DASD_STATE_NEW; --- linux-2.5.68/drivers/s390/block/dasd_devmap.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/s390/block/dasd_devmap.c 2003-04-21 00:31:39.000000000 -0700 @@ -406,27 +406,6 @@ dasd_device_from_devindex(int devindex) } /* - * Return kdev for a dasd device. - */ -kdev_t -dasd_get_kdev(struct dasd_device *device) -{ - struct dasd_devmap *devmap; - int major, minor; - int devno; - - devno = _ccw_device_get_device_number(device->cdev); - devmap = dasd_devmap_from_devno(devno); - if (devmap == NULL) - return NODEV; - major = dasd_gendisk_index_major(devmap->devindex); - if (major < 0) - return NODEV; - minor = devmap->devindex % DASD_PER_MAJOR; - return mk_kdev(major, minor); -} - -/* * Create a dasd device structure for cdev. */ struct dasd_device * --- linux-2.5.68/drivers/s390/block/dasd_int.h 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/s390/block/dasd_int.h 2003-04-21 00:31:39.000000000 -0700 @@ -264,7 +264,6 @@ extern struct dasd_discipline dasd_diag_ struct dasd_device { /* Block device stuff. */ struct gendisk *gdp; - devfs_handle_t devfs_entry; request_queue_t *request_queue; spinlock_t request_queue_lock; unsigned long blocks; /* size of volume in blocks */ @@ -471,7 +470,6 @@ void dasd_devmap_exit(void); struct dasd_device *dasd_create_device(struct ccw_device *); void dasd_delete_device(struct dasd_device *); -kdev_t dasd_get_kdev(struct dasd_device *); struct dasd_device *dasd_device_from_devindex(int); int dasd_parse(void); --- linux-2.5.68/drivers/s390/block/xpram.c 2003-03-24 15:36:51.000000000 -0800 +++ 25/drivers/s390/block/xpram.c 2003-04-21 00:31:39.000000000 -0700 @@ -449,7 +449,6 @@ static int __init xpram_setup_blkdev(voi offset = 0; for (i = 0; i < xpram_devs; i++) { struct gendisk *disk = xpram_disks[i]; - char name[16]; xpram_devices[i].size = xpram_sizes[i] / 4; xpram_devices[i].offset = offset; @@ -460,13 +459,9 @@ static int __init xpram_setup_blkdev(voi disk->private_data = &xpram_devices[i]; disk->queue = &xpram_queue; sprintf(disk->disk_name, "slram%d", i); + sprintf(disk->disk_name, "slram/%d", i); set_capacity(disk, xpram_sizes[i] << 1); add_disk(disk); - sprintf(name, "slram/%d", i); - devfs_register(NULL, name, DEVFS_FL_DEFAULT, - disk->major, disk->first_minor, - S_IFBLK | S_IRUSR | S_IWUSR, - disk->fops, NULL); } return 0; @@ -485,7 +480,6 @@ static void __exit xpram_exit(void) for (i = 0; i < xpram_devs; i++) { del_gendisk(xpram_disks[i]); put_disk(xpram_disks[i]); - devfs_remove("slram/%d", i); } unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); devfs_remove("slram"); --- linux-2.5.68/drivers/s390/char/tubfs.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/s390/char/tubfs.c 2003-04-21 00:31:39.000000000 -0700 @@ -34,10 +34,6 @@ static struct file_operations fs3270_fop }; #ifdef CONFIG_DEVFS_FS -static devfs_handle_t fs3270_devfs_dir; -static devfs_handle_t fs3270_devfs_tub; -extern struct file_operations tty_fops; - void fs3270_devfs_register(tub_t *tubp) { char name[16]; @@ -48,7 +44,7 @@ void fs3270_devfs_register(tub_t *tubp) S_IFCHR | S_IRUSR | S_IWUSR, &fs3270_fops, NULL); sprintf(name, "tty%.4x", tubp->devno); tty_register_devfs_name(&tty3270_driver, 0, tubp->minor, - fs3270_devfs_dir, name); + NULL, name); } void fs3270_devfs_unregister(tub_t *tubp) @@ -72,13 +68,11 @@ fs3270_init(void) IBM_FS3270_MAJOR, rc); return -1; } -#ifdef CONFIG_DEVFS_FS - fs3270_devfs_dir = devfs_mk_dir("3270"); - fs3270_devfs_tub = devfs_register(NULL, "3270/tub", 0, + devfs_mk_dir("3270"); + devfs_register(NULL, "3270/tub", 0, IBM_FS3270_MAJOR, 0, S_IFCHR | S_IRUGO | S_IWUGO, &fs3270_fops, NULL); -#endif fs3270_major = IBM_FS3270_MAJOR; return 0; } @@ -90,10 +84,8 @@ void fs3270_fini(void) { if (fs3270_major != -1) { -#ifdef CONFIG_DEVFS_FS - devfs_unregister(fs3270_devfs_tub); - devfs_unregister(fs3270_devfs_dir); -#endif + devfs_remove("3270"); + devfs_remove("3270/tub"); unregister_chrdev(fs3270_major, "fs3270"); fs3270_major = -1; } --- linux-2.5.68/drivers/s390/char/tubio.h 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/s390/char/tubio.h 2003-04-21 00:31:39.000000000 -0700 @@ -338,7 +338,6 @@ extern int tty3270_proc_misc; extern enum tubwhat tty3270_proc_what; extern struct tty_driver tty3270_driver; #ifdef CONFIG_DEVFS_FS -extern devfs_handle_t fs3270_devfs_dir; extern void fs3270_devfs_register(tub_t *); extern void fs3270_devfs_unregister(tub_t *); #endif --- linux-2.5.68/drivers/scsi/aic7xxx/aic7xxx_osm.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/scsi/aic7xxx/aic7xxx_osm.c 2003-04-21 00:31:39.000000000 -0700 @@ -3863,7 +3863,7 @@ ahc_linux_run_device_queue(struct ahc_so /* * SCSI controller interrupt handler. */ -void +irqreturn_t ahc_linux_isr(int irq, void *dev_id, struct pt_regs * regs) { struct ahc_softc *ahc; @@ -3883,6 +3883,8 @@ ahc_linux_isr(int irq, void *dev_id, str ahc_schedule_completeq(ahc, acmd); } ahc_unlock(ahc, &flags); + /* FIXME! Was it really ours? */ + return IRQ_HANDLED; } void --- linux-2.5.68/drivers/scsi/aic7xxx/aic7xxx_osm.h 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/scsi/aic7xxx/aic7xxx_osm.h 2003-04-21 00:31:39.000000000 -0700 @@ -1224,7 +1224,7 @@ void ahc_platform_set_tags(struct ahc_so int ahc_platform_abort_scbs(struct ahc_softc *ahc, int target, char channel, int lun, u_int tag, role_t role, uint32_t status); -void ahc_linux_isr(int irq, void *dev_id, struct pt_regs * regs); +irqreturn_t ahc_linux_isr(int irq, void *dev_id, struct pt_regs * regs); void ahc_platform_flushwork(struct ahc_softc *ahc); int ahc_softc_comp(struct ahc_softc *, struct ahc_softc *); void ahc_done(struct ahc_softc*, struct scb*); --- linux-2.5.68/drivers/scsi/Kconfig 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/scsi/Kconfig 2003-04-21 02:44:44.000000000 -0700 @@ -8,7 +8,7 @@ config BLK_DEV_SD If you want to use a SCSI hard disk or the SCSI or parallel port version of the IOMEGA ZIP drive under Linux, say Y and read the SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from - . This is NOT for SCSI + . This is NOT for SCSI CD-ROMs. This driver is also available as a module ( = code which can be @@ -26,7 +26,7 @@ config CHR_DEV_ST ---help--- If you want to use a SCSI tape drive under Linux, say Y and read the SCSI-HOWTO, available from - , and + , and in the kernel source. This is NOT for SCSI CD-ROMs. @@ -48,7 +48,7 @@ config CHR_DEV_OSST tape drives (ADR-x0) that supports the standard SCSI-2 commands for tapes (QIC-157) and can be driven by the standard driver st. For more information, you may have a look at the SCSI-HOWTO - and + and in the kernel source. More info on the OnStream driver may be found on @@ -67,7 +67,7 @@ config BLK_DEV_SR ---help--- If you want to use a SCSI CD-ROM under Linux, say Y and read the SCSI-HOWTO and the CD-ROM-HOWTO at - . Also make sure to say Y + . Also make sure to say Y or M to "ISO 9660 CD-ROM file system support" later. This driver is also available as a module ( = code which can be @@ -238,7 +238,7 @@ config SCSI_AHA152X must be manually specified in this case. It is explained in section 3.3 of the SCSI-HOWTO, available from - . You might also want to + . You might also want to read the file . This driver is also available as a module ( = code which can be @@ -252,7 +252,7 @@ config SCSI_AHA1542 ---help--- This is support for a SCSI host adapter. It is explained in section 3.4 of the SCSI-HOWTO, available from - . Note that Trantor was + . Note that Trantor was purchased by Adaptec, and some former Trantor products are being sold under the Adaptec name. If it doesn't work out of the box, you may have to change some settings in . @@ -268,7 +268,7 @@ config SCSI_AHA1740 ---help--- This is support for a SCSI host adapter. It is explained in section 3.5 of the SCSI-HOWTO, available from - . If it doesn't work out + . If it doesn't work out of the box, you may have to change some settings in . @@ -316,7 +316,7 @@ config SCSI_AIC7XXX_OLD configuration options. You should read at a minimum before contacting the maintainer with any questions. The SCSI-HOWTO, - available from , can also + available from , can also be of great help. If you want to compile this driver as a module ( = code which can be @@ -377,7 +377,7 @@ config SCSI_AM53C974 This is support for the AM53/79C974 SCSI host adapters. Please read for details. Also, the SCSI-HOWTO, available from - , is for you. + , is for you. Note that there is another driver for AM53C974 based adapters: "Tekram DC390(T) and Am53/79C974 (PCscsi) SCSI support", above. You @@ -406,7 +406,7 @@ config SCSI_BUSLOGIC ---help--- This is support for BusLogic MultiMaster and FlashPoint SCSI Host Adapters. Consult the SCSI-HOWTO, available from - , and the files + , and the files and for more information. If this driver does not work correctly without modification, please contact @@ -451,7 +451,7 @@ config SCSI_DTC3280 help This is support for DTC 3180/3280 SCSI Host Adapters. Please read the SCSI-HOWTO, available from - , and the file + , and the file . This driver is also available as a module ( = code which can be @@ -470,7 +470,7 @@ config SCSI_EATA You want to read the start of and the SCSI-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -518,7 +518,7 @@ config SCSI_EATA_PIO host adapters could also use this driver but are discouraged from doing so, since this driver only supports hard disks and lacks numerous features. You might want to have a look at the SCSI-HOWTO, - available from . + available from . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -534,7 +534,7 @@ config SCSI_FUTURE_DOMAIN other adapters based on the Future Domain chipsets (Quantum ISA-200S, ISA-250MG; Adaptec AHA-2920A; and at least one IBM board). It is explained in section 3.7 of the SCSI-HOWTO, available from - . + . NOTE: Newer Adaptec AHA-2920C boards use the Adaptec AIC-7850 chip and should use the aic7xxx driver ("Adaptec AIC7xxx chipset SCSI @@ -589,7 +589,7 @@ config SCSI_GENERIC_NCR5380 generic 5380 support. It is explained in section 3.8 of the SCSI-HOWTO, available from - . If it doesn't work out + . If it doesn't work out of the box, you may have to change some settings in . @@ -605,7 +605,7 @@ config SCSI_GENERIC_NCR5380_MMIO This is a driver for the old NCR 53c80 series of SCSI controllers on boards using memory mapped I/O. It is explained in section 3.8 of the SCSI-HOWTO, available from - . If it doesn't work out + . If it doesn't work out of the box, you may have to change some settings in . @@ -719,7 +719,7 @@ config SCSI_INITIO help This is support for the Initio 91XXU(W) SCSI host adapter. Please read the SCSI-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -732,7 +732,7 @@ config SCSI_INIA100 help This is support for the Initio INI-A100U2W SCSI host adapter. Please read the SCSI-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -758,7 +758,7 @@ config SCSI_PPA For more information about this driver and how to use it you should read the file . You should also read the SCSI-HOWTO, which is available from - . If you use this driver, + . If you use this driver, you will still be able to use the parallel port for other tasks, such as a printer; it is safe to compile both drivers into the kernel. @@ -787,7 +787,7 @@ config SCSI_IMM For more information about this driver and how to use it you should read the file . You should also read the SCSI-HOWTO, which is available from - . If you use this driver, + . If you use this driver, you will still be able to use the parallel port for other tasks, such as a printer; it is safe to compile both drivers into the kernel. @@ -833,7 +833,7 @@ config SCSI_NCR53C406A This is support for the NCR53c406a SCSI host adapter. For user configurable parameters, check out in the kernel source. Also read the SCSI-HOWTO, available from - . + . If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), @@ -883,7 +883,7 @@ config SCSI_NCR53C7xx This is a driver for the 53c7 and 8xx NCR family of SCSI controllers, not to be confused with the NCR 5380 controllers. It is explained in section 3.8 of the SCSI-HOWTO, available from - . If it doesn't work out + . If it doesn't work out of the box, you may have to change some settings in . Please read for the available boot time @@ -1220,7 +1220,7 @@ config SCSI_PAS16 ---help--- This is support for a SCSI host adapter. It is explained in section 3.10 of the SCSI-HOWTO, available from - . If it doesn't work out + . If it doesn't work out of the box, you may have to change some settings in . @@ -1235,7 +1235,7 @@ config SCSI_PCI2000 help This is support for the PCI2000I EIDE interface card which acts as a SCSI host adapter. Please read the SCSI-HOWTO, available from - . + . This driver is also available as a module called pci2000 ( = code which can be inserted in and removed from the running kernel @@ -1248,7 +1248,7 @@ config SCSI_PCI2220I help This is support for the PCI2220i EIDE interface card which acts as a SCSI host adapter. Please read the SCSI-HOWTO, available from - . + . This driver is also available as a module called pci2220i ( = code which can be inserted in and removed from the running kernel @@ -1261,7 +1261,7 @@ config SCSI_PSI240I help This is support for the PSI240i EIDE interface card which acts as a SCSI host adapter. Please read the SCSI-HOWTO, available from - . + . This driver is also available as a module called psi240i ( = code which can be inserted in and removed from the running kernel @@ -1283,7 +1283,7 @@ config SCSI_QLOGIC_FAS Information about this driver is contained in . You should also read the SCSI-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1303,7 +1303,7 @@ config SCSI_QLOGIC_ISP Please read the file . You should also read the SCSI-HOWTO, available from - . + . This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1346,7 +1346,7 @@ config SCSI_SEAGATE ---help--- These are 8-bit SCSI controllers; the ST-01 is also supported by this driver. It is explained in section 3.9 of the SCSI-HOWTO, - available from . If it + available from . If it doesn't work out of the box, you may have to change some settings in . @@ -1433,7 +1433,7 @@ config SCSI_T128 ---help--- This is support for a SCSI host adapter. It is explained in section 3.11 of the SCSI-HOWTO, available from - . If it doesn't work out + . If it doesn't work out of the box, you may have to change some settings in . Note that Trantor was purchased by Adaptec, and some former Trantor products are being sold under the @@ -1453,7 +1453,7 @@ config SCSI_U14_34F information about this hardware. If the driver doesn't work out of the box, you may have to change some settings in . Read the SCSI-HOWTO, available from - . Note that there is also + . Note that there is also another driver for the same hardware: "UltraStor SCSI support", below. You should say Y to both only if you want 24F support as well. @@ -1502,7 +1502,7 @@ config SCSI_ULTRASTOR This is support for the UltraStor 14F, 24F and 34F SCSI-2 host adapter family. This driver is explained in section 3.12 of the SCSI-HOWTO, available from - . If it doesn't work out + . If it doesn't work out of the box, you may have to change some settings in . @@ -1520,7 +1520,7 @@ config SCSI_NSP32 help This is support for the Workbit NinjaSCSI-32Bi/UDE PCI/Cardbus SCSI host adapter. Please read the SCSI-HOWTO, available from - . + . If you want to compile this as a module ( = code which can be inserted in and removed from the running kernel whenever you want), --- linux-2.5.68/drivers/scsi/qla1280.c 2003-02-24 13:08:46.000000000 -0800 +++ 25/drivers/scsi/qla1280.c 2003-04-21 00:31:39.000000000 -0700 @@ -1736,11 +1736,12 @@ qla1280_biosparam(struct scsi_device *sd * qla1280_intr_handler * Handles the H/W interrupt **************************************************************************/ -void +irqreturn_t qla1280_intr_handler(int irq, void *dev_id, struct pt_regs *regs) { struct scsi_qla_host *ha; struct device_reg *reg; + int handled = 0; u16 data; ENTER_INTR ("qla1280_intr_handler"); @@ -1757,6 +1758,7 @@ qla1280_intr_handler(int irq, void *dev_ /* Check for pending interrupts. */ if (data & RISC_INT) { qla1280_isr(ha, &ha->done_q_first, &ha->done_q_last); + handled = 1; } else { /* spurious interrupts can happen legally */ dprintk(1, "scsi(%ld): Spurious interrupt - ignoring\n", @@ -1772,6 +1774,7 @@ qla1280_intr_handler(int irq, void *dev_ WRT_REG_WORD(®->ictrl, (ISP_EN_INT | ISP_EN_RISC)); LEAVE_INTR("qla1280_intr_handler"); + return IRQ_RETVAL(handled); } /************************************************************************** --- linux-2.5.68/drivers/scsi/qla1280.h 2003-01-16 18:22:57.000000000 -0800 +++ 25/drivers/scsi/qla1280.h 2003-04-21 00:31:39.000000000 -0700 @@ -1316,7 +1316,7 @@ int qla1280_reset(Scsi_Cmnd *, unsigned int qla1280_biosparam(struct scsi_device *, struct block_device *, sector_t, int[]); static int qla1280_slave_configure(Scsi_Device *); -void qla1280_intr_handler(int, void *, struct pt_regs *); +irqreturn_t qla1280_intr_handler(int, void *, struct pt_regs *); void qla1280_setup(char *s, int *dummy); /* --- linux-2.5.68/drivers/scsi/scsi_error.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/scsi/scsi_error.c 2003-04-21 00:31:39.000000000 -0700 @@ -1401,7 +1401,6 @@ static void scsi_eh_lock_door(struct scs static void scsi_restart_operations(struct Scsi_Host *shost) { struct scsi_device *sdev; - unsigned long flags; /* * If the door was locked, we need to insert a door lock request @@ -1430,11 +1429,8 @@ static void scsi_restart_operations(stru * now that error recovery is done, we will need to ensure that these * requests are started. */ - list_for_each_entry(sdev, &shost->my_devices, siblings) { - spin_lock_irqsave(sdev->request_queue->queue_lock, flags); - __blk_run_queue(sdev->request_queue); - spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags); - } + list_for_each_entry(sdev, &shost->my_devices, siblings) + blk_run_queue(sdev->request_queue); } /** --- linux-2.5.68/drivers/scsi/scsi_lib.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/scsi/scsi_lib.c 2003-04-21 00:31:39.000000000 -0700 @@ -328,7 +328,7 @@ void scsi_setup_cmd_retry(struct scsi_cm /* * Called for single_lun devices on IO completion. Clear starget_sdev_user, - * and call __blk_run_queue for all the scsi_devices on the target - + * and call blk_run_queue for all the scsi_devices on the target - * including current_sdev first. * * Called with *no* scsi locks held. @@ -336,7 +336,7 @@ void scsi_setup_cmd_retry(struct scsi_cm static void scsi_single_lun_run(struct scsi_device *current_sdev) { struct scsi_device *sdev; - unsigned long flags, flags2; + unsigned long flags; spin_lock_irqsave(current_sdev->host->host_lock, flags); WARN_ON(!current_sdev->sdev_target->starget_sdev_user); @@ -344,14 +344,12 @@ static void scsi_single_lun_run(struct s spin_unlock_irqrestore(current_sdev->host->host_lock, flags); /* - * Call __blk_run_queue for all LUNs on the target, starting with + * Call blk_run_queue for all LUNs on the target, starting with * current_sdev. We race with others (to set starget_sdev_user), * but in most cases, we will be first. Ideally, each LU on the * target would get some limited time or requests on the target. */ - spin_lock_irqsave(current_sdev->request_queue->queue_lock, flags2); - __blk_run_queue(current_sdev->request_queue); - spin_unlock_irqrestore(current_sdev->request_queue->queue_lock, flags2); + blk_run_queue(current_sdev->request_queue); spin_lock_irqsave(current_sdev->host->host_lock, flags); if (current_sdev->sdev_target->starget_sdev_user) { @@ -366,11 +364,8 @@ static void scsi_single_lun_run(struct s spin_unlock_irqrestore(current_sdev->host->host_lock, flags); list_for_each_entry(sdev, ¤t_sdev->same_target_siblings, - same_target_siblings) { - spin_lock_irqsave(sdev->request_queue->queue_lock, flags2); - __blk_run_queue(sdev->request_queue); - spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags2); - } + same_target_siblings) + blk_run_queue(sdev->request_queue); } /* @@ -452,7 +447,7 @@ void scsi_queue_next_request(request_que (shost->host_busy >= shost->can_queue))) { /* * As long as shost is accepting commands and we have - * starved queues, call __blk_run_queue. scsi_request_fn + * starved queues, call blk_run_queue. scsi_request_fn * drops the queue_lock and can add us back to the * starved_list. * @@ -465,9 +460,7 @@ void scsi_queue_next_request(request_que list_del_init(&sdev->starved_entry); spin_unlock_irqrestore(shost->host_lock, flags); - spin_lock_irqsave(sdev->request_queue->queue_lock, flags); - __blk_run_queue(sdev->request_queue); - spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags); + blk_run_queue(sdev->request_queue); spin_lock_irqsave(shost->host_lock, flags); if (unlikely(!list_empty(&sdev->starved_entry))) @@ -480,9 +473,7 @@ void scsi_queue_next_request(request_que } spin_unlock_irqrestore(shost->host_lock, flags); - spin_lock_irqsave(q->queue_lock, flags); - __blk_run_queue(q); - spin_unlock_irqrestore(q->queue_lock, flags); + blk_run_queue(q); } /* --- linux-2.5.68/drivers/scsi/scsi_scan.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/scsi/scsi_scan.c 2003-04-21 00:31:39.000000000 -0700 @@ -1733,7 +1733,6 @@ int scsi_remove_device(struct scsi_devic if (sdev->attached) return -EINVAL; - devfs_remove(sdev->devfs_name); scsi_device_unregister(sdev); scsi_free_sdev(sdev); --- linux-2.5.68/drivers/scsi/sr.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/scsi/sr.c 2003-04-21 00:31:39.000000000 -0700 @@ -569,7 +569,8 @@ static int sr_attach(struct scsi_device get_capabilities(cd); sr_vendor_init(cd); - strcpy(disk->devfs_name, sdev->devfs_name); + snprintf(disk->devfs_name, sizeof(disk->devfs_name), + "%s/cd", sdev->devfs_name); disk->driverfs_dev = &sdev->sdev_driverfs_dev; register_cdrom(&cd->cdi); set_capacity(disk, cd->capacity); --- linux-2.5.68/drivers/scsi/sym53c8xx_2/sym_glue.c 2003-03-04 20:02:37.000000000 -0800 +++ 25/drivers/scsi/sym53c8xx_2/sym_glue.c 2003-04-21 00:31:44.000000000 -0700 @@ -1009,7 +1009,7 @@ out: /* * Linux entry point of the interrupt handler. */ -static void sym53c8xx_intr(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t sym53c8xx_intr(int irq, void *dev_id, struct pt_regs * regs) { unsigned long flags; hcb_p np = (hcb_p) dev_id; @@ -1029,6 +1029,7 @@ static void sym53c8xx_intr(int irq, void SYM_UNLOCK_HCB(np, flags); if (DEBUG_FLAGS & DEBUG_TINY) printf_debug ("]\n"); + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/serial/8250.c 2003-03-17 14:56:02.000000000 -0800 +++ 25/drivers/serial/8250.c 2003-04-21 02:44:49.000000000 -0700 @@ -984,7 +984,7 @@ serial8250_handle_port(struct uart_8250_ * This means we need to loop through all ports. checking that they * don't have an interrupt pending. */ -static void serial8250_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t serial8250_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct irq_info *i = dev_id; struct list_head *l, *end = NULL; @@ -1024,6 +1024,8 @@ static void serial8250_interrupt(int irq spin_unlock(&i->lock); DEBUG_INTR("end.\n"); + /* FIXME! Was it really ours? */ + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/serial/8250_pci.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/serial/8250_pci.c 2003-04-21 02:45:04.000000000 -0700 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include --- linux-2.5.68/drivers/serial/core.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/serial/core.c 2003-04-21 00:31:39.000000000 -0700 @@ -782,8 +782,12 @@ uart_set_info(struct uart_state *state, /* * Claim and map the new regions */ - if (port->type != PORT_UNKNOWN) + if (port->type != PORT_UNKNOWN) { retval = port->ops->request_port(port); + } else { + /* Always success - Jean II */ + retval = 0; + } /* * If we fail to request resources for the --- linux-2.5.68/drivers/serial/Kconfig 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/serial/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -97,7 +97,7 @@ config SERIAL_8250_MANY_PORTS Say Y here if you have dumb serial boards other than the four standard COM 1/2/3/4 ports. This may happen if you have an AST FourPort, Accent Async, Boca (read the Boca mini-HOWTO, available - from ), or other custom + from ), or other custom serial port hardware which acts similar to standard serial port hardware. If you only use the standard COM 1/2/3/4 ports, you can say N here to save some memory. You can also say Y if you have an --- linux-2.5.68/drivers/usb/class/usblp.c 2003-03-24 15:36:52.000000000 -0800 +++ 25/drivers/usb/class/usblp.c 2003-04-21 00:31:39.000000000 -0700 @@ -130,7 +130,6 @@ MFG:HEWLETT-PACKARD;MDL:DESKJET 970C;CMD struct usblp { struct usb_device *dev; /* USB device */ - devfs_handle_t devfs; /* devfs device */ struct semaphore sem; /* locks this struct, especially "dev" */ char *writebuf; /* write transfer_buffer */ char *readbuf; /* read transfer_buffer */ @@ -163,7 +162,6 @@ static void usblp_dump(struct usblp *usb dbg("usblp=0x%p", usblp); dbg("dev=0x%p", usblp->dev); - dbg("devfs=0x%p", usblp->devfs); dbg("buf=0x%p", usblp->buf); dbg("readcount=%d", usblp->readcount); dbg("ifnum=%d", usblp->ifnum); @@ -382,7 +380,7 @@ out: static void usblp_cleanup (struct usblp *usblp) { - devfs_unregister (usblp->devfs); + devfs_remove ("usb/lp%d", usblp->minor); usb_deregister_dev (1, usblp->minor); info("usblp%d: removed", usblp->minor); @@ -908,8 +906,7 @@ static int usblp_probe(struct usb_interf /* If we have devfs, create with perms=660. */ sprintf(name, "usb/lp%d", usblp->minor); - usblp->devfs = devfs_register(NULL, name, - DEVFS_FL_DEFAULT, USB_MAJOR, + devfs_register(NULL, name, 0, USB_MAJOR, usblp->minor, S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP, &usblp_fops, NULL); --- linux-2.5.68/drivers/usb/class/usb-midi.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/usb/class/usb-midi.c 2003-04-21 02:45:04.000000000 -0700 @@ -820,7 +820,7 @@ static int usb_midi_open(struct inode *i struct list_head *devs, *mdevs; struct usb_midi_state *s; struct usb_mididev *m; - int flags; + unsigned long flags; int succeed = 0; #if 0 --- linux-2.5.68/drivers/usb/core/file.c 2003-03-24 15:36:52.000000000 -0800 +++ 25/drivers/usb/core/file.c 2003-04-21 00:31:39.000000000 -0700 @@ -28,8 +28,6 @@ #endif #include -static devfs_handle_t usb_devfs_handle; /* /dev/usb dir. */ - #define MAX_USB_MINORS 256 static struct file_operations *usb_minors[MAX_USB_MINORS]; static spinlock_t minor_lock = SPIN_LOCK_UNLOCKED; @@ -75,14 +73,13 @@ int usb_major_init(void) return -EBUSY; } - usb_devfs_handle = devfs_mk_dir("usb"); - + devfs_mk_dir("usb"); return 0; } void usb_major_cleanup(void) { - devfs_unregister(usb_devfs_handle); + devfs_remove("usb"); unregister_chrdev(USB_MAJOR, "usb"); } --- linux-2.5.68/drivers/usb/core/hcd.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/usb/core/hcd.c 2003-04-21 00:31:39.000000000 -0700 @@ -1436,17 +1436,18 @@ EXPORT_SYMBOL (usb_hcd_giveback_urb); * to handle interrupts. The PCI glue layer does so automatically; only * bus glue for non-PCI system busses will need to use this. */ -void usb_hcd_irq (int irq, void *__hcd, struct pt_regs * r) +irqreturn_t usb_hcd_irq (int irq, void *__hcd, struct pt_regs * r) { struct usb_hcd *hcd = __hcd; int start = hcd->state; if (unlikely (hcd->state == USB_STATE_HALT)) /* irq sharing? */ - return; + return IRQ_NONE; hcd->driver->irq (hcd, r); if (hcd->state != start && hcd->state == USB_STATE_HALT) usb_hc_died (hcd); + return IRQ_HANDLED; } EXPORT_SYMBOL (usb_hcd_irq); --- linux-2.5.68/drivers/usb/core/hcd.h 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/usb/core/hcd.h 2003-04-21 00:31:39.000000000 -0700 @@ -239,7 +239,7 @@ void hcd_buffer_free (struct usb_bus *bu /* generic bus glue, needed for host controllers that don't use PCI */ extern struct usb_operations usb_hcd_operations; -extern void usb_hcd_irq (int irq, void *__hcd, struct pt_regs *r); +extern irqreturn_t usb_hcd_irq (int irq, void *__hcd, struct pt_regs *r); extern void usb_hc_died (struct usb_hcd *hcd); /* -------------------------------------------------------------------------- */ --- linux-2.5.68/drivers/usb/image/scanner.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/usb/image/scanner.c 2003-04-21 00:31:39.000000000 -0700 @@ -397,6 +397,7 @@ */ +#include #include /* @@ -843,7 +844,7 @@ static void destroy_scanner (struct kobj kfree(scn->obuf); dbg("%s: De-allocating minor:%d", __FUNCTION__, scn->scn_minor); - devfs_unregister(scn->devfs); + devfs_remove("usb/scanner%d", scn->scn_minor - SCN_BASE_MNR); usb_deregister_dev(1, scn->scn_minor); usb_free_urb(scn->scn_irq); usb_put_dev(scn->scn_dev); @@ -1105,13 +1106,11 @@ probe_scanner(struct usb_interface *intf sprintf(name, "usb/scanner%d", scn->scn_minor - SCN_BASE_MNR); - scn->devfs = devfs_register(NULL, name, + devfs_register(NULL, name, DEVFS_FL_DEFAULT, USB_MAJOR, scn->scn_minor, S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, &usb_scanner_fops, NULL); - if (scn->devfs == NULL) - dbg("scanner%d: device node registration failed", scn_minor); info ("USB scanner device (0x%04x/0x%04x) now attached to %s", dev->descriptor.idVendor, dev->descriptor.idProduct, name); --- linux-2.5.68/drivers/usb/image/scanner.h 2003-03-24 15:36:52.000000000 -0800 +++ 25/drivers/usb/image/scanner.h 2003-04-21 00:31:39.000000000 -0700 @@ -40,7 +40,6 @@ #include #include #include -#include // #define DEBUG @@ -336,7 +335,6 @@ static DECLARE_MUTEX (scn_mutex); /* Ini struct scn_usb_data { struct usb_device *scn_dev; - devfs_handle_t devfs; /* devfs device */ struct urb *scn_irq; unsigned int ifnum; /* Interface number of the USB device */ int scn_minor; /* Scanner minor - used in disconnect() */ --- linux-2.5.68/drivers/usb/input/hiddev.c 2003-03-24 15:36:52.000000000 -0800 +++ 25/drivers/usb/input/hiddev.c 2003-04-21 00:31:39.000000000 -0700 @@ -50,7 +50,6 @@ struct hiddev { int open; int minor; wait_queue_head_t wait; - devfs_handle_t devfs; struct hid_device *hid; struct hiddev_list *list; }; @@ -66,7 +65,6 @@ struct hiddev_list { }; static struct hiddev *hiddev_table[HIDDEV_MINORS]; -static devfs_handle_t hiddev_devfs_handle; /* forward reference to make our lives easier */ extern struct usb_driver hiddev_driver; @@ -229,7 +227,7 @@ static int hiddev_fasync(int fd, struct */ static void hiddev_cleanup(struct hiddev *hiddev) { - devfs_unregister(hiddev->devfs); + devfs_remove("usb/hid/hiddev%d", hiddev->minor); usb_deregister_dev(1, hiddev->minor); hiddev_table[hiddev->minor] = NULL; kfree(hiddev); @@ -716,8 +714,8 @@ int hiddev_connect(struct hid_device *hi hiddev->exist = 1; sprintf(devfs_name, "usb/hid/hiddev%d", minor); - hiddev->devfs = devfs_register(NULL, devfs_name, - DEVFS_FL_DEFAULT, USB_MAJOR, minor + HIDDEV_MINOR_BASE, + devfs_register(NULL, devfs_name, 0, + USB_MAJOR, minor + HIDDEV_MINOR_BASE, S_IFCHR | S_IRUGO | S_IWUSR, &hiddev_fops, NULL); hid->minor = minor; hid->hiddev = hiddev; @@ -774,7 +772,7 @@ static /* const */ struct usb_driver hid int __init hiddev_init(void) { - hiddev_devfs_handle = devfs_mk_dir("usb/hid"); + devfs_mk_dir("usb/hid"); usb_register(&hiddev_driver); return 0; } --- linux-2.5.68/drivers/usb/misc/auerswald.c 2003-03-24 15:36:52.000000000 -0800 +++ 25/drivers/usb/misc/auerswald.c 2003-04-21 00:31:39.000000000 -0700 @@ -242,7 +242,6 @@ typedef struct struct semaphore mutex; /* protection in user context */ char name[20]; /* name of the /dev/usb entry */ unsigned int dtindex; /* index in the device table */ - devfs_handle_t devfs; /* devfs device node */ struct usb_device * usbdev; /* USB device handle */ int open_count; /* count the number of open character channels */ char dev_desc[AUSI_DLEN];/* for storing a textual description */ @@ -1972,7 +1971,7 @@ static int auerswald_probe (struct usb_i up (&dev_table_mutex); /* initialize the devfs node for this device and register it */ - cp->devfs = devfs_register(NULL, cp->name, 0, USB_MAJOR, + devfs_register(NULL, cp->name, 0, USB_MAJOR, AUER_MINOR_BASE + dtindex, S_IFCHR | S_IRUGO | S_IWUGO, &auerswald_fops, NULL); @@ -2092,7 +2091,7 @@ static void auerswald_disconnect (struct /* remove our devfs node */ /* Nobody can see this device any more */ - devfs_unregister (cp->devfs); + devfs_remove(cp->name); /* give back our USB minor number */ usb_deregister_dev (1, cp->dtindex); --- linux-2.5.68/drivers/usb/misc/brlvger.c 2003-03-24 15:36:52.000000000 -0800 +++ 25/drivers/usb/misc/brlvger.c 2003-04-21 00:31:39.000000000 -0700 @@ -156,7 +156,6 @@ struct brlvger_priv { struct usb_device *dev; /* USB device handle */ struct usb_endpoint_descriptor *in_interrupt; struct urb *intr_urb; - devfs_handle_t devfs; int subminor; /* which minor dev #? */ @@ -374,16 +373,11 @@ brlvger_probe (struct usb_interface *int dbg("Display length: %d", priv->plength); sprintf(devfs_name, "usb/brlvger%d", priv->subminor); - priv->devfs = devfs_register(NULL, devfs_name, + devfs_register(NULL, devfs_name, DEVFS_FL_DEFAULT, USB_MAJOR, BRLVGER_MINOR+priv->subminor, S_IFCHR |S_IRUSR|S_IWUSR |S_IRGRP|S_IWGRP, &brlvger_fops, NULL); - if (!priv->devfs) { -#ifdef CONFIG_DEVFS_FS - err("devfs node registration failed"); -#endif - } display_table[i] = priv; @@ -420,7 +414,7 @@ brlvger_disconnect(struct usb_interface if(priv){ info("Display %d disconnecting", priv->subminor); - devfs_unregister(priv->devfs); + devfs_remove("usb/brlvger%d", priv->subminor); usb_deregister_dev(1, priv->subminor); down(&disconnect_sem); --- linux-2.5.68/drivers/usb/misc/rio500.c 2003-03-24 15:36:52.000000000 -0800 +++ 25/drivers/usb/misc/rio500.c 2003-04-21 00:31:39.000000000 -0700 @@ -65,7 +65,6 @@ struct rio_usb_data { struct usb_device *rio_dev; /* init: probe_rio */ - devfs_handle_t devfs; /* devfs device */ unsigned int ifnum; /* Interface number of the USB device */ int isopen; /* nz if open */ int present; /* Device is present on the bus */ @@ -476,13 +475,11 @@ static int probe_rio(struct usb_interfac } dbg("probe_rio: ibuf address:%p", rio->ibuf); - rio->devfs = devfs_register(NULL, "usb/rio500", + devfs_register(NULL, "usb/rio500", DEVFS_FL_DEFAULT, USB_MAJOR, RIO_MINOR, S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP, &usb_rio_fops, NULL); - if (rio->devfs == NULL) - dbg("probe_rio: device node registration failed"); init_MUTEX(&(rio->lock)); @@ -496,7 +493,7 @@ static void disconnect_rio(struct usb_in usb_set_intfdata (intf, NULL); if (rio) { - devfs_unregister(rio->devfs); + devfs_remove("usb/rio500"); usb_deregister_dev(1, rio->minor); down(&(rio->lock)); --- linux-2.5.68/drivers/usb/net/kaweth.c 2003-02-24 13:08:46.000000000 -0800 +++ 25/drivers/usb/net/kaweth.c 2003-04-21 02:45:04.000000000 -0700 @@ -744,7 +744,7 @@ static int kaweth_start_xmit(struct sk_b } } - private_header = __skb_push(skb, 2); + private_header = (u16 *)__skb_push(skb, 2); *private_header = cpu_to_le16(skb->len-2); kaweth->tx_skb = skb; --- linux-2.5.68/drivers/usb/net/usbnet.c 2003-04-19 20:45:19.000000000 -0700 +++ 25/drivers/usb/net/usbnet.c 2003-04-21 02:45:04.000000000 -0700 @@ -314,8 +314,12 @@ MODULE_PARM_DESC (msg_level, "Initial me : (in_interrupt () ? "in_interrupt" : "can sleep")) #ifdef DEBUG -#define devdbg(usbnet, fmt, arg...) \ - printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net.name, ## arg) +#define devdbg(usbnet, fmt, arg...) \ + do { \ + printk(KERN_DEBUG "%s:", (usbnet)->net.name); \ + printk(fmt, ## arg); \ + printk("\n"); \ + } while (0) #else #define devdbg(usbnet, fmt, arg...) do {} while(0) #endif --- linux-2.5.68/drivers/usb/usb-skeleton.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/drivers/usb/usb-skeleton.c 2003-04-21 00:31:39.000000000 -0700 @@ -98,7 +98,6 @@ MODULE_DEVICE_TABLE (usb, skel_table); struct usb_skel { struct usb_device * udev; /* save off the usb device pointer */ struct usb_interface * interface; /* the interface for this device */ - devfs_handle_t devfs; /* devfs device node */ unsigned char minor; /* the starting minor number for this device */ unsigned char num_ports; /* the number of ports this device has */ char num_interrupt_in; /* number of interrupt in endpoints we have */ @@ -610,7 +609,7 @@ static int skel_probe(struct usb_interfa /* initialize the devfs node for this device and register it */ sprintf(name, "usb/skel%d", dev->minor); - dev->devfs = devfs_register(NULL, name, + devfs = devfs_register(NULL, name, DEVFS_FL_DEFAULT, USB_MAJOR, dev->minor, S_IFCHR | S_IRUSR | S_IWUSR | @@ -674,7 +673,7 @@ static void skel_disconnect(struct usb_i minor = dev->minor; /* remove our devfs node */ - devfs_unregister (dev->devfs); + devfs_remove("usb/skel%d", dev->minor); /* give back our dynamic minor */ usb_deregister_dev (1, minor); --- linux-2.5.68/drivers/video/amifb.c 2003-03-24 15:36:52.000000000 -0800 +++ 25/drivers/video/amifb.c 2003-04-21 02:45:03.000000000 -0700 @@ -1143,7 +1143,7 @@ static void amifb_deinit(void); */ static int flash_cursor(void); -static void amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp); +static irqreturn_t amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp); static u_long chipalloc(u_long size); static void chipfree(void); @@ -2504,7 +2504,7 @@ static int flash_cursor(void) * VBlank Display Interrupt */ -static void amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp) +static irqreturn_t amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp) { if (do_vmode_pan || do_vmode_full) ami_update_display(); @@ -2534,6 +2534,7 @@ static void amifb_interrupt(int irq, voi ami_reinit_copper(); do_vmode_full = 0; } + return IRQ_HANDLED; } /* --------------------------- Hardware routines --------------------------- */ --- linux-2.5.68/drivers/video/atafb.c 2003-01-16 18:21:39.000000000 -0800 +++ 25/drivers/video/atafb.c 2003-04-21 02:45:03.000000000 -0700 @@ -1522,7 +1522,7 @@ static void falcon_set_par( struct atafb } -static void falcon_vbl_switcher( int irq, void *dummy, struct pt_regs *fp ) +static irqreturn_t falcon_vbl_switcher( int irq, void *dummy, struct pt_regs *fp ) { struct falcon_hw *hw = &f_new_mode; @@ -1579,6 +1579,7 @@ static void falcon_vbl_switcher( int irq videl.xoffset = current_par.hw.falcon.xoffset; shifter_f030.off_next = current_par.hw.falcon.line_offset; } + return IRQ_HANDLED; } --- linux-2.5.68/drivers/video/aty/mach64_gx.c 2003-03-24 15:36:52.000000000 -0800 +++ 25/drivers/video/aty/mach64_gx.c 2003-04-21 00:31:39.000000000 -0700 @@ -119,7 +119,7 @@ static int aty_set_dac_514(const struct } static int aty_var_to_pll_514(const struct fb_info *info, u32 vclk_per, - u32 bpp, u32 width, union aty_pll *pll) + u8 bpp, union aty_pll *pll) { /* * FIXME: use real calculations instead of using fixed values from the old @@ -338,7 +338,7 @@ const struct aty_dac_ops aty_dac_att21c4 */ static int aty_var_to_pll_18818(const struct fb_info *info, u32 vclk_per, - u32 bpp, u32 width, union aty_pll *pll) + u8 bpp, union aty_pll *pll) { u32 MHz100; /* in 0.01 MHz */ u32 program_bits; @@ -494,7 +494,7 @@ const struct aty_pll_ops aty_pll_ati1881 */ static int aty_var_to_pll_1703(const struct fb_info *info, u32 vclk_per, - u32 bpp, u32 width, union aty_pll *pll) + u32 vclk_per, u8 bpp, union aty_pll *pll) { u32 mhz100; /* in 0.01 MHz */ u32 program_bits; @@ -610,7 +610,7 @@ const struct aty_pll_ops aty_pll_stg1703 */ static int aty_var_to_pll_8398(const struct fb_info *info, u32 vclk_per, - u32 bpp, u32 width, union aty_pll *pll) + u32 vclk_per, u8 bpp, union aty_pll *pll) { u32 tempA, tempB, fOut, longMHz100, diff, preDiff; @@ -734,7 +734,7 @@ const struct aty_pll_ops aty_pll_ch8398 */ static int aty_var_to_pll_408(const struct fb_info *info, u32 vclk_per, - u32 bpp, u32 width, union aty_pll *pll) + u8 bpp, union aty_pll *pll) { u32 mhz100; /* in 0.01 MHz */ u32 program_bits; --- linux-2.5.68/drivers/video/console/fbcon.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/drivers/video/console/fbcon.c 2003-04-21 02:45:03.000000000 -0700 @@ -138,7 +138,6 @@ static int fbcon_set_origin(struct vc_da #define DEFAULT_CURSOR_BLINK_RATE (20) static int vbl_cursor_cnt; -static int cursor_blink_rate; #define divides(a, b) ((!(a) || (b)%(a)) ? 0 : 1) @@ -185,7 +184,7 @@ static void fbcon_bmove_rec(struct vc_da */ static int vbl_detected; -static void fb_vbl_detect(int irq, void *dummy, struct pt_regs *fp) +static irqreturn_t fb_vbl_detect(int irq, void *dummy, struct pt_regs *fp) { vbl_detected++; } @@ -202,7 +201,9 @@ static void fb_flashcursor(void *private info->fbops->fb_cursor(info, &info->cursor); } -static void fb_vbl_handler(int irq, void *dev_id, struct pt_regs *fp) +#if (defined(__arm__) && defined(IRQ_VSYNCPULSE)) || defined(CONFIG_ATARI) || defined(CONFIG_MAC) +static int cursor_blink_rate; +static irqreturn_t fb_vbl_handler(int irq, void *dev_id, struct pt_regs *fp) { struct fb_info *info = dev_id; @@ -210,7 +211,9 @@ static void fb_vbl_handler(int irq, void schedule_work(&info->queue); vbl_cursor_cnt = cursor_blink_rate; } + return IRQ_HANDLED; } +#endif static void cursor_timer_handler(unsigned long dev_addr); @@ -527,8 +530,9 @@ static const char *fbcon_startup(void) struct fb_info *info; struct vc_data *vc; static int done = 0; - int irqres = 1; + int irqres; + irqres = 1; /* * If num_registered_fb is zero, this is a call for the dummy part. * The frame buffer devices weren't initialized yet. --- linux-2.5.68/drivers/video/fbmem.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/drivers/video/fbmem.c 2003-04-21 00:31:39.000000000 -0700 @@ -25,6 +25,7 @@ #include #include #include +#include #include #ifdef CONFIG_KMOD #include @@ -655,7 +656,7 @@ int fb_prepare_logo(struct fb_info *info } /* Return if no suitable logo was found */ - fb_logo.logo = find_logo(info->var.bits_per_pixel); + fb_logo.logo = fb_find_logo(info->var.bits_per_pixel); if (!fb_logo.logo || fb_logo.logo->height > info->var.yres) { fb_logo.logo = NULL; --- linux-2.5.68/drivers/video/logo/logo.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/drivers/video/logo/logo.c 2003-04-21 00:31:39.000000000 -0700 @@ -33,7 +33,7 @@ extern const struct linux_logo logo_supe extern const struct linux_logo logo_superh_clut224; -const struct linux_logo * __init find_logo(int depth) +const struct linux_logo *fb_find_logo(int depth) { const struct linux_logo *logo = 0; --- linux-2.5.68/drivers/video/pvr2fb.c 2003-03-04 20:02:38.000000000 -0800 +++ 25/drivers/video/pvr2fb.c 2003-04-21 02:45:03.000000000 -0700 @@ -246,7 +246,7 @@ static int pvr2_update_par(void); static void pvr2_update_display(void); static void pvr2_init_display(void); static void pvr2_do_blank(void); -static void pvr2fb_interrupt(int irq, void *dev_id, struct pt_regs *fp); +static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id, struct pt_regs *fp); static int pvr2_init_cable(void); static int pvr2_get_param(const struct pvr2_params *p, const char *s, int val, int size); @@ -939,7 +939,7 @@ static void pvr2_do_blank(void) is_blanked = do_blank > 0 ? do_blank : 0; } -static void pvr2fb_interrupt(int irq, void *dev_id, struct pt_regs *fp) +static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id, struct pt_regs *fp) { if (do_vmode_pan || do_vmode_full) pvr2_update_display(); @@ -958,6 +958,7 @@ static void pvr2fb_interrupt(int irq, vo if (do_vmode_full) { do_vmode_full = 0; } + return IRQ_HANDLED; } /* --- linux-2.5.68/drivers/video/sa1100fb.c 2003-03-17 14:56:03.000000000 -0800 +++ 25/drivers/video/sa1100fb.c 2003-04-21 02:45:03.000000000 -0700 @@ -1395,7 +1395,7 @@ static void sa1100fb_disable_controller( /* * sa1100fb_handle_irq: Handle 'LCD DONE' interrupts. */ -static void sa1100fb_handle_irq(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t sa1100fb_handle_irq(int irq, void *dev_id, struct pt_regs *regs) { struct sa1100fb_info *fbi = dev_id; unsigned int lcsr = LCSR; @@ -1406,6 +1406,7 @@ static void sa1100fb_handle_irq(int irq, } LCSR = lcsr; + return IRQ_HANDLED; } /* --- linux-2.5.68/fs/aio.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/fs/aio.c 2003-04-21 02:44:47.000000000 -0700 @@ -148,7 +148,7 @@ static int aio_setup_ring(struct kioctx dprintk("mmap address: 0x%08lx\n", info->mmap_base); info->nr_pages = get_user_pages(current, ctx->mm, - info->mmap_base, info->mmap_size, + info->mmap_base, nr_pages, 1, 0, info->ring_pages, NULL); up_write(&ctx->mm->mmap_sem); --- linux-2.5.68/fs/block_dev.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/fs/block_dev.c 2003-04-21 00:31:39.000000000 -0700 @@ -559,10 +559,10 @@ static int do_open(struct block_device * bdev->bd_contains = whole; down(&whole->bd_sem); whole->bd_part_count++; - p = disk->part + part - 1; + p = disk->part[part - 1]; bdev->bd_inode->i_data.backing_dev_info = whole->bd_inode->i_data.backing_dev_info; - if (!(disk->flags & GENHD_FL_UP) || !p->nr_sects) { + if (!(disk->flags & GENHD_FL_UP) || !p || !p->nr_sects) { whole->bd_part_count--; up(&whole->bd_sem); ret = -ENXIO; --- linux-2.5.68/fs/buffer.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/fs/buffer.c 2003-04-21 02:44:46.000000000 -0700 @@ -776,6 +776,85 @@ void mark_buffer_dirty_inode(struct buff EXPORT_SYMBOL(mark_buffer_dirty_inode); /* + * Add a page to the dirty page list. + * + * It is a sad fact of life that this function is called from several places + * deeply under spinlocking. It may not sleep. + * + * If the page has buffers, the uptodate buffers are set dirty, to preserve + * dirty-state coherency between the page and the buffers. It the page does + * not have buffers then when they are later attached they will all be set + * dirty. + * + * The buffers are dirtied before the page is dirtied. There's a small race + * window in which a writepage caller may see the page cleanness but not the + * buffer dirtiness. That's fine. If this code were to set the page dirty + * before the buffers, a concurrent writepage caller could clear the page dirty + * bit, see a bunch of clean buffers and we'd end up with dirty buffers/clean + * page on the dirty page list. + * + * There is also a small window where the page is dirty, and not on dirty_pages. + * Also a possibility that by the time the page is added to dirty_pages, it has + * been set clean. The page lists are somewhat approximate in this regard. + * It's better to have clean pages accidentally attached to dirty_pages than to + * leave dirty pages attached to clean_pages. + * + * We use private_lock to lock against try_to_free_buffers while using the + * page's buffer list. Also use this to protect against clean buffers being + * added to the page after it was set dirty. + * + * FIXME: may need to call ->reservepage here as well. That's rather up to the + * address_space though. + * + * For now, we treat swapper_space specially. It doesn't use the normal + * block a_ops. + */ +int __set_page_dirty_buffers(struct page *page) +{ + struct address_space * const mapping = page->mapping; + int ret = 0; + + if (mapping == NULL) { + SetPageDirty(page); + goto out; + } + + if (!PageUptodate(page)) + buffer_error(); + + spin_lock(&mapping->private_lock); + if (page_has_buffers(page)) { + struct buffer_head *head = page_buffers(page); + struct buffer_head *bh = head; + + do { + if (buffer_uptodate(bh)) + set_buffer_dirty(bh); + else + buffer_error(); + bh = bh->b_this_page; + } while (bh != head); + } + spin_unlock(&mapping->private_lock); + + if (!TestSetPageDirty(page)) { + spin_lock(&mapping->page_lock); + if (page->mapping) { /* Race with truncate? */ + if (!mapping->backing_dev_info->memory_backed) + inc_page_state(nr_dirty); + list_del(&page->list); + list_add(&page->list, &mapping->dirty_pages); + } + spin_unlock(&mapping->page_lock); + __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); + } + +out: + return ret; +} +EXPORT_SYMBOL(__set_page_dirty_buffers); + +/* * Write out and wait upon a list of buffers. * * We have conflicting pressures: we want to make sure that all @@ -916,7 +995,7 @@ try_again: head = NULL; offset = PAGE_SIZE; while ((offset -= size) >= 0) { - bh = alloc_buffer_head(); + bh = alloc_buffer_head(GFP_NOFS); if (!bh) goto no_grow; @@ -2267,7 +2346,7 @@ int nobh_prepare_write(struct page *page if (buffer_uptodate(&map_bh)) continue; /* reiserfs does this */ if (block_start < from || block_end > to) { - struct buffer_head *bh = alloc_buffer_head(); + struct buffer_head *bh = alloc_buffer_head(GFP_NOFS); if (!bh) { ret = -ENOMEM; @@ -2826,9 +2905,9 @@ static void recalc_bh_state(void) buffer_heads_over_limit = (tot > max_buffer_heads); } -struct buffer_head *alloc_buffer_head(void) +struct buffer_head *alloc_buffer_head(int gfp_flags) { - struct buffer_head *ret = kmem_cache_alloc(bh_cachep, GFP_NOFS); + struct buffer_head *ret = kmem_cache_alloc(bh_cachep, gfp_flags); if (ret) { preempt_disable(); __get_cpu_var(bh_accounting).nr++; --- linux-2.5.68/fs/dcache.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/fs/dcache.c 2003-04-21 00:31:39.000000000 -0700 @@ -155,12 +155,11 @@ repeat: if (d_unhashed(dentry)) goto kill_it; if (list_empty(&dentry->d_lru)) { - dentry->d_vfs_flags &= ~DCACHE_REFERENCED; + dentry->d_vfs_flags |= DCACHE_REFERENCED; list_add(&dentry->d_lru, &dentry_unused); dentry_stat.nr_unused++; } spin_unlock(&dentry->d_lock); - dentry->d_vfs_flags |= DCACHE_REFERENCED; spin_unlock(&dcache_lock); return; @@ -250,7 +249,6 @@ int d_invalidate(struct dentry * dentry) static inline struct dentry * __dget_locked(struct dentry *dentry) { atomic_inc(&dentry->d_count); - dentry->d_vfs_flags |= DCACHE_REFERENCED; if (atomic_read(&dentry->d_count) == 1) { dentry_stat.nr_unused--; list_del_init(&dentry->d_lru); @@ -379,17 +377,16 @@ static void prune_dcache(int count) dentry = list_entry(tmp, struct dentry, d_lru); spin_lock(&dentry->d_lock); + /* leave inuse dentries */ + if (atomic_read(&dentry->d_count)) { + spin_unlock(&dentry->d_lock); + continue; + } /* If the dentry was recently referenced, don't free it. */ if (dentry->d_vfs_flags & DCACHE_REFERENCED) { dentry->d_vfs_flags &= ~DCACHE_REFERENCED; - - /* don't add non zero d_count dentries - * back to d_lru list - */ - if (!atomic_read(&dentry->d_count)) { - list_add(&dentry->d_lru, &dentry_unused); - dentry_stat.nr_unused++; - } + list_add(&dentry->d_lru, &dentry_unused); + dentry_stat.nr_unused++; spin_unlock(&dentry->d_lock); continue; } @@ -538,13 +535,18 @@ resume: struct list_head *tmp = next; struct dentry *dentry = list_entry(tmp, struct dentry, d_child); next = tmp->next; - list_del_init(&dentry->d_lru); - /* don't add non zero d_count dentries - * back to d_lru list + if (!list_empty(&dentry->d_lru)) { + dentry_stat.nr_unused--; + list_del_init(&dentry->d_lru); + } + /* + * move only zero ref count dentries to the end + * of the unused list for prune_dcache */ if (!atomic_read(&dentry->d_count)) { list_add(&dentry->d_lru, dentry_unused.prev); + dentry_stat.nr_unused++; found++; } /* @@ -609,13 +611,18 @@ void shrink_dcache_anon(struct hlist_hea spin_lock(&dcache_lock); hlist_for_each(lp, head) { struct dentry *this = hlist_entry(lp, struct dentry, d_hash); - list_del(&this->d_lru); + if (!list_empty(&this->d_lru)) { + dentry_stat.nr_unused--; + list_del(&this->d_lru); + } - /* don't add non zero d_count dentries - * back to d_lru list + /* + * move only zero ref count dentries to the end + * of the unused list for prune_dcache */ if (!atomic_read(&this->d_count)) { list_add_tail(&this->d_lru, &dentry_unused); + dentry_stat.nr_unused++; found++; } } @@ -1017,7 +1024,6 @@ struct dentry * __d_lookup(struct dentry if (likely(move_count == dentry->d_move_count)) { if (!d_unhashed(dentry)) { atomic_inc(&dentry->d_count); - dentry->d_vfs_flags |= DCACHE_REFERENCED; found = dentry; } } --- linux-2.5.68/fs/devfs/base.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/fs/devfs/base.c 2003-04-21 00:31:39.000000000 -0700 @@ -763,7 +763,6 @@ struct directory_type struct bdev_type { - struct block_device_operations *ops; dev_t dev; }; @@ -1442,7 +1441,6 @@ static void devfsd_notify (struct devfs_ * this to whatever you like, and change it once the file is opened (the next * file opened will not see this change). * - * Returns a handle which may later be used in a call to devfs_unregister(). * On failure %NULL is returned. */ @@ -1457,6 +1455,8 @@ devfs_handle_t devfs_register (devfs_han /* we don't accept any flags anymore. prototype will change soon. */ WARN_ON(flags); + WARN_ON(dir); + WARN_ON(!S_ISCHR(mode)); if (name == NULL) { @@ -1491,7 +1491,6 @@ devfs_handle_t devfs_register (devfs_han } else if (S_ISBLK (mode)) { de->u.bdev.dev = dev; de->u.cdev.autogen = devnum != 0; - de->u.bdev.ops = ops; } else { PRINTK ("(%s): illegal mode: %x\n", name, mode); devfs_put (de); @@ -1517,6 +1516,52 @@ devfs_handle_t devfs_register (devfs_han } /* End Function devfs_register */ +int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) +{ + struct devfs_entry *dir = NULL, *de; + char buf[64]; + va_list args; + int error, n; + + if (!S_ISBLK(mode)) { + printk(KERN_WARNING "%s: invalide mode (%u) for %s\n", + __FUNCTION__, mode, buf); + return -EINVAL; + } + + va_start(args, fmt); + n = vsnprintf(buf, 64, fmt, args); + if (n >= 64 || !buf[0]) { + printk(KERN_WARNING "%s: invalid format string\n", + __FUNCTION__); + return -EINVAL; + } + + de = _devfs_prepare_leaf(&dir, buf, mode); + if (!de) { + printk(KERN_WARNING "%s: could not prepare leaf for %s\n", + __FUNCTION__, buf); + return -ENOMEM; /* could be more accurate... */ + } + + de->u.bdev.dev = dev; + + error = _devfs_append_entry(dir, de, NULL); + if (error) { + printk(KERN_WARNING "%s: could not append to parent for %s\n", + __FUNCTION__, buf); + goto out; + } + + devfsd_notify(de, DEVFSD_NOTIFY_REGISTERED); + out: + devfs_put(dir); + return error; +} + +EXPORT_SYMBOL(devfs_mk_bdev); + + /** * _devfs_unhook - Unhook a device entry from its parents list * @de: The entry to unhook. @@ -1578,24 +1623,6 @@ static void _devfs_unregister (struct de } } /* End Function _devfs_unregister */ - -/** - * devfs_unregister - Unregister a device entry. - * @de: A handle previously created by devfs_register() or returned from - * devfs_get_handle(). If this is %NULL the routine does nothing. - */ - -void devfs_unregister (devfs_handle_t de) -{ - VERIFY_ENTRY (de); - if ( (de == NULL) || (de->parent == NULL) ) return; - DPRINTK (DEBUG_UNREGISTER, "(%s): de: %p refcount: %d\n", - de->name, de, atomic_read (&de->refcount) ); - write_lock (&de->parent->u.dir.lock); - _devfs_unregister (de->parent, de); - devfs_put (de); -} /* End Function devfs_unregister */ - static int devfs_do_symlink (devfs_handle_t dir, const char *name, const char *link, devfs_handle_t *handle) { @@ -1678,7 +1705,6 @@ int devfs_mk_symlink(const char *from, c * Use of this function is optional. The devfs_register() function * will automatically create intermediate directories as needed. This function * is provided for efficiency reasons, as it provides a handle to a directory. - * Returns a handle which may later be used in a call to devfs_unregister(). * On failure %NULL is returned. */ @@ -1730,7 +1756,10 @@ void devfs_remove(const char *fmt, ...) n = vsnprintf(buf, 64, fmt, args); if (n < 64 && buf[0]) { devfs_handle_t de = _devfs_find_entry(NULL, buf, 0); - devfs_unregister(de); + + write_lock(&de->parent->u.dir.lock); + _devfs_unregister(de->parent, de); + devfs_put(de); devfs_put(de); } } @@ -1863,7 +1892,6 @@ __setup("devfs=", devfs_setup); EXPORT_SYMBOL(devfs_put); EXPORT_SYMBOL(devfs_register); -EXPORT_SYMBOL(devfs_unregister); EXPORT_SYMBOL(devfs_mk_symlink); EXPORT_SYMBOL(devfs_mk_dir); EXPORT_SYMBOL(devfs_remove); --- linux-2.5.68/fs/devfs/util.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/fs/devfs/util.c 2003-04-21 00:31:39.000000000 -0700 @@ -74,8 +74,6 @@ #include #include "internal.h" -#define PRINTK(format, args...) \ - {printk (KERN_ERR "%s" format, __FUNCTION__ , ## args);} int devfs_register_tape(const char *name) { @@ -256,161 +254,3 @@ void devfs_dealloc_devnum(umode_t mode, } up(&device_list_mutex); } - -struct unique_numspace -{ - spinlock_t init_lock; - unsigned char sem_initialised; - unsigned int num_free; /* Num free in bits */ - unsigned int length; /* Array length in bytes */ - unsigned long *bits; - struct semaphore semaphore; -}; - -#define UNIQUE_NUMBERSPACE_INITIALISER {SPIN_LOCK_UNLOCKED, 0, 0, 0, NULL} - - -/** - * devfs_alloc_unique_number - Allocate a unique (positive) number. - * @space: The number space to allocate from. - * - * Returns the allocated unique number, else a negative error code. - * This routine is thread safe and may block. - */ - -int devfs_alloc_unique_number (struct unique_numspace *space) -{ - int number; - unsigned int length; - - /* Get around stupid lack of semaphore initialiser */ - spin_lock (&space->init_lock); - if (!space->sem_initialised) - { - sema_init (&space->semaphore, 1); - space->sem_initialised = 1; - } - spin_unlock (&space->init_lock); - down (&space->semaphore); - if (space->num_free < 1) - { - void *bits; - - if (space->length < 16) length = 16; - else length = space->length << 1; - if ( ( bits = vmalloc (length) ) == NULL ) - { - up (&space->semaphore); - return -ENOMEM; - } - if (space->bits != NULL) - { - memcpy (bits, space->bits, space->length); - vfree (space->bits); - } - space->num_free = (length - space->length) << 3; - space->bits = bits; - memset (bits + space->length, 0, length - space->length); - space->length = length; - } - number = find_first_zero_bit (space->bits, space->length << 3); - --space->num_free; - __set_bit (number, space->bits); - up (&space->semaphore); - return number; -} /* End Function devfs_alloc_unique_number */ -EXPORT_SYMBOL(devfs_alloc_unique_number); - - -/** - * devfs_dealloc_unique_number - Deallocate a unique (positive) number. - * @space: The number space to deallocate from. - * @number: The number to deallocate. - * - * This routine is thread safe and may block. - */ - -void devfs_dealloc_unique_number (struct unique_numspace *space, int number) -{ - int was_set; - - if (number < 0) return; - down (&space->semaphore); - was_set = __test_and_clear_bit (number, space->bits); - if (was_set) ++space->num_free; - up (&space->semaphore); - if (!was_set) PRINTK ("(): number %d was already free\n", number); -} /* End Function devfs_dealloc_unique_number */ -EXPORT_SYMBOL(devfs_dealloc_unique_number); - -static struct unique_numspace disc_numspace = UNIQUE_NUMBERSPACE_INITIALISER; -static struct unique_numspace cdrom_numspace = UNIQUE_NUMBERSPACE_INITIALISER; - -void devfs_create_partitions(struct gendisk *disk) -{ - char dirname[64], diskname[64], symlink[16]; - - if (!disk->devfs_name) - sprintf(disk->devfs_name, "%s/disc%d", disk->disk_name, - disk->first_minor >> disk->minor_shift); - - devfs_mk_dir(disk->devfs_name); - disk->number = devfs_alloc_unique_number(&disc_numspace); - - sprintf(diskname, "%s/disc", disk->devfs_name); - devfs_register(NULL, diskname, 0, - disk->major, disk->first_minor, - S_IFBLK | S_IRUSR | S_IWUSR, - disk->fops, NULL); - - sprintf(symlink, "discs/disc%d", disk->number); - sprintf(dirname, "../%s", disk->devfs_name); - devfs_mk_symlink(symlink, dirname); - -} - -void devfs_create_cdrom(struct gendisk *disk) -{ - char dirname[64], cdname[64], symlink[16]; - - if (!disk->devfs_name) - strcat(disk->devfs_name, disk->disk_name); - - devfs_mk_dir(disk->devfs_name); - disk->number = devfs_alloc_unique_number(&cdrom_numspace); - - sprintf(cdname, "%s/cd", disk->devfs_name); - devfs_register(NULL, cdname, 0, - disk->major, disk->first_minor, - S_IFBLK | S_IRUGO | S_IWUGO, - disk->fops, NULL); - - sprintf(symlink, "cdroms/cdrom%d", disk->number); - sprintf(dirname, "../%s", disk->devfs_name); - devfs_mk_symlink(symlink, dirname); -} - -void devfs_register_partition(struct gendisk *dev, int part) -{ - char devname[64]; - - sprintf(devname, "%s/part%d", dev->devfs_name, part); - devfs_register(NULL, devname, 0, - dev->major, dev->first_minor + part, - S_IFBLK | S_IRUSR | S_IWUSR, - dev->fops, NULL); -} - -void devfs_remove_partitions(struct gendisk *disk) -{ - devfs_remove("discs/disc%d", disk->number); - devfs_remove(disk->devfs_name); - devfs_dealloc_unique_number(&disc_numspace, disk->number); -} - -void devfs_remove_cdrom(struct gendisk *disk) -{ - devfs_remove("cdroms/cdrom%d", disk->number); - devfs_remove(disk->devfs_name); - devfs_dealloc_unique_number(&cdrom_numspace, disk->number); -} --- linux-2.5.68/fs/dquot.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/fs/dquot.c 2003-04-21 00:31:39.000000000 -0700 @@ -345,50 +345,6 @@ restart: return 0; } -static struct super_block *get_super_to_sync(int type) -{ - struct list_head *head; - int cnt, dirty; - -restart: - spin_lock(&sb_lock); - list_for_each(head, &super_blocks) { - struct super_block *sb = list_entry(head, struct super_block, s_list); - - for (cnt = 0, dirty = 0; cnt < MAXQUOTAS; cnt++) - if ((type == cnt || type == -1) && sb_has_quota_enabled(sb, cnt) - && info_any_dquot_dirty(&sb_dqopt(sb)->info[cnt])) - dirty = 1; - if (!dirty) - continue; - sb->s_count++; - spin_unlock(&sb_lock); - down_read(&sb->s_umount); - if (!sb->s_root) { - drop_super(sb); - goto restart; - } - return sb; - } - spin_unlock(&sb_lock); - return NULL; -} - -void sync_dquots(struct super_block *sb, int type) -{ - if (sb) { - if (sb->s_qcop->quota_sync) - sb->s_qcop->quota_sync(sb, type); - } - else { - while ((sb = get_super_to_sync(type))) { - if (sb->s_qcop->quota_sync) - sb->s_qcop->quota_sync(sb, type); - drop_super(sb); - } - } -} - /* Free unused dquots from cache */ static void prune_dqcache(int count) { --- linux-2.5.68/fs/exportfs/expfs.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/fs/exportfs/expfs.c 2003-04-21 00:31:39.000000000 -0700 @@ -91,7 +91,6 @@ find_exported_dentry(struct super_block if (dentry != result && acceptable(context, dentry)) { dput(result); - dentry->d_vfs_flags |= DCACHE_REFERENCED; return dentry; } spin_lock(&dcache_lock); @@ -271,7 +270,6 @@ find_exported_dentry(struct super_block if (dentry != result && acceptable(context, dentry)) { dput(result); - dentry->d_vfs_flags |= DCACHE_REFERENCED; return dentry; } spin_lock(&dcache_lock); @@ -434,7 +432,6 @@ static struct dentry *export_iget(struct iput(inode); return ERR_PTR(-ENOMEM); } - result->d_vfs_flags |= DCACHE_REFERENCED; return result; } --- linux-2.5.68/fs/fat/inode.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/fs/fat/inode.c 2003-04-21 00:31:39.000000000 -0700 @@ -608,7 +608,6 @@ struct dentry *fat_get_dentry(struct sup return ERR_PTR(-ENOMEM); } result->d_op = sb->s_root->d_op; - result->d_vfs_flags |= DCACHE_REFERENCED; return result; } --- linux-2.5.68/fs/jbd/journal.c 2003-04-07 13:06:54.000000000 -0700 +++ 25/fs/jbd/journal.c 2003-04-21 00:31:39.000000000 -0700 @@ -457,14 +457,8 @@ int journal_write_metadata_buffer(transa /* * Right, time to make up the new buffer_head. */ - do { - new_bh = alloc_buffer_head(); - if (!new_bh) { - printk (KERN_NOTICE "%s: ENOMEM at alloc_buffer_head, " - "trying again.\n", __FUNCTION__); - yield(); - } - } while (!new_bh); + new_bh = alloc_buffer_head(GFP_NOFS|__GFP_NOFAIL); + /* keep subsequent assertions sane */ new_bh->b_state = 0; init_buffer(new_bh, NULL, NULL); @@ -1613,28 +1607,7 @@ void shrink_journal_memory(void) */ void * __jbd_kmalloc (const char *where, size_t size, int flags, int retry) { - void *p; - static unsigned long last_warning; - - while (1) { - p = kmalloc(size, flags); - if (p) - return p; - if (!retry) - return NULL; - /* Log every retry for debugging. Also log them to the - * syslog, but do rate-limiting on the non-debugging - * messages. */ - jbd_debug(1, "ENOMEM in %s, retrying.\n", where); - - if (time_after(jiffies, last_warning + 5*HZ)) { - printk(KERN_NOTICE - "ENOMEM in %s, retrying.\n", where); - last_warning = jiffies; - } - - yield(); - } + return kmalloc(size, flags | (retry ? __GFP_NOFAIL : 0)); } /* --- linux-2.5.68/fs/Kconfig 2003-03-24 15:36:52.000000000 -0800 +++ 25/fs/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -26,7 +26,7 @@ config EXT2_FS by about 44 KB. The Ext2fs-Undeletion mini-HOWTO, available from - , gives information about + , gives information about how to retrieve deleted files on ext2fs file systems. To change the behavior of ext2 file systems, you can use the tune2fs @@ -386,7 +386,7 @@ config QUOTA in order to use quota support (you can download sources from ). For further details, read the Quota mini-HOWTO, available from - . Probably the quota + . Probably the quota support is only useful for multi user systems. If unsure, say N. config QFMT_V1 @@ -469,7 +469,7 @@ config ISO9660_FS driver. If you have a CD-ROM drive and want to do more with it than just listen to audio CDs and watch its LEDs, say Y (and read and the CD-ROM-HOWTO, - available from ), thereby + available from ), thereby enlarging your kernel by about 27 KB; otherwise say N. If you want to compile this as a module ( = code which can be @@ -576,7 +576,7 @@ config MSDOS_FS they are compressed; to access compressed MSDOS partitions under Linux, you can either use the DOS emulator DOSEMU, described in the DOSEMU-HOWTO, available from - , or try dmsdosfs in + , or try dmsdosfs in . If you intend to use dosemu with a non-compressed MSDOS partition, say Y here) and MSDOS floppies. This means that file access becomes @@ -1233,7 +1233,7 @@ config NFS_FS programs nfsd and mountd (but does not need to have NFS file system support enabled in its kernel). NFS is explained in the Network Administrator's Guide, available from - , on its man page: "man + , on its man page: "man nfs", and in the NFS-HOWTO. A superior but less widely used alternative to NFS is provided by @@ -1298,7 +1298,7 @@ config NFSD as well. Please read the NFS-HOWTO, available from - . + . The NFS server is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -1398,7 +1398,7 @@ config SMB_FS works only if the Windows machines use TCP/IP as the underlying transport protocol, and not NetBEUI. For details, read and the SMB-HOWTO, - available from . + available from . Note: if you just want your box to act as an SMB *server* and make files and printing services available to Windows clients (which need @@ -1475,7 +1475,7 @@ config NCP_FS to mount NetWare file server volumes and to access them just like any other Unix directory. For details, please read the file in the kernel source and - the IPX-HOWTO from . + the IPX-HOWTO from . You do not have to say Y here if you want your Linux box to act as a file *server* for Novell NetWare clients. --- linux-2.5.68/fs/partitions/check.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/fs/partitions/check.c 2003-04-21 00:31:39.000000000 -0700 @@ -19,8 +19,10 @@ #include #include #include +#include #include "check.h" +#include "devfs.h" #include "acorn.h" #include "amiga.h" @@ -94,25 +96,24 @@ static int (*check_part[])(struct parsed char *disk_name(struct gendisk *hd, int part, char *buf) { - if (!part) { #ifdef CONFIG_DEVFS_FS - if (hd->devfs_name) - sprintf(buf, "%s/%s", hd->devfs_name, - (hd->flags & GENHD_FL_CD) ? "cd" : "disc"); - else -#endif - sprintf(buf, "%s", hd->disk_name); - } else { -#ifdef CONFIG_DEVFS_FS - if (hd->devfs_name) + if (hd->devfs_name[0] != '\0') { + if (part) sprintf(buf, "%s/part%d", hd->devfs_name, part); + else if (hd->minors != 1) + sprintf(buf, "%s/disc", hd->devfs_name); else -#endif - if (isdigit(hd->disk_name[strlen(hd->disk_name)-1])) - sprintf(buf, "%sp%d", hd->disk_name, part); - else - sprintf(buf, "%s%d", hd->disk_name, part); + sprintf(buf, "%s", hd->devfs_name); + return buf; } +#endif + + if (!part) + sprintf(buf, "%s", hd->disk_name); + else if (isdigit(hd->disk_name[strlen(hd->disk_name)-1])) + sprintf(buf, "%sp%d", hd->disk_name, part); + else + sprintf(buf, "%s%d", hd->disk_name, part); return buf; } @@ -128,7 +129,7 @@ check_partition(struct gendisk *hd, stru return NULL; #ifdef CONFIG_DEVFS_FS - if (hd->devfs_name) { + if (hd->devfs_name[0] != '\0') { printk(KERN_INFO " /dev/%s:", hd->devfs_name); sprintf(state->name, "p"); } @@ -182,7 +183,7 @@ static struct sysfs_ops part_sysfs_ops = static ssize_t part_dev_read(struct hd_struct * p, char *page) { struct gendisk *disk = container_of(p->kobj.parent,struct gendisk,kobj); - int part = p - disk->part + 1; + int part = p->partno; dev_t base = MKDEV(disk->major, disk->first_minor); return sprintf(page, "%04x\n", (unsigned)(base + part)); } @@ -234,7 +235,9 @@ struct kobj_type ktype_part = { void delete_partition(struct gendisk *disk, int part) { - struct hd_struct *p = disk->part + part - 1; + struct hd_struct *p = disk->part[part-1]; + if (!p) + return; if (!p->nr_sects) return; p->start_sect = 0; @@ -242,15 +245,28 @@ void delete_partition(struct gendisk *di p->reads = p->writes = p->read_sectors = p->write_sectors = 0; devfs_remove("%s/part%d", disk->devfs_name, part); kobject_unregister(&p->kobj); + disk->part[part-1] = NULL; + kfree(p); } void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len) { - struct hd_struct *p = disk->part + part - 1; + struct hd_struct *p; + p = kmalloc(sizeof(*p), GFP_KERNEL); + if (!p) + return; + + memset(p, 0, sizeof(*p)); p->start_sect = start; p->nr_sects = len; - devfs_register_partition(disk, part); + p->partno = part; + disk->part[part-1] = p; + + devfs_mk_bdev(MKDEV(disk->major, disk->first_minor + part), + S_IFBLK|S_IRUSR|S_IWUSR, + "%s/part%d", disk->devfs_name, part); + snprintf(p->kobj.name,KOBJ_NAME_LEN,"%s%d",disk->kobj.name,part); p->kobj.parent = &disk->kobj; p->kobj.ktype = &ktype_part; @@ -284,12 +300,12 @@ void register_disk(struct gendisk *disk) return; disk_sysfs_symlinks(disk); - if (disk->flags & GENHD_FL_CD) - devfs_create_cdrom(disk); - /* No minors to use for partitions */ - if (disk->minors == 1) + if (disk->minors == 1) { + if (disk->devfs_name[0] != '\0') + devfs_add_disk(disk); return; + } /* No such device (e.g., media were just removed) */ if (!get_capacity(disk)) @@ -299,7 +315,7 @@ void register_disk(struct gendisk *disk) if (blkdev_get(bdev, FMODE_READ, 0, BDEV_RAW) < 0) return; state = check_partition(disk, bdev); - devfs_create_partitions(disk); + devfs_add_partitioned(disk); if (state) { for (j = 1; j < state->limit; j++) { sector_t size = state->parts[j].size; @@ -392,10 +408,9 @@ void del_gendisk(struct gendisk *disk) unlink_gendisk(disk); disk_stat_set_all(disk, 0); disk->stamp = disk->stamp_idle = 0; - if (disk->flags & GENHD_FL_CD) - devfs_remove_cdrom(disk); - else - devfs_remove_partitions(disk); + + devfs_remove_disk(disk); + if (disk->driverfs_dev) { sysfs_remove_link(&disk->kobj, "device"); sysfs_remove_link(&disk->driverfs_dev->kobj, "block"); --- linux-2.5.68/fs/partitions/check.h 2003-01-16 18:22:02.000000000 -0800 +++ 25/fs/partitions/check.h 2003-04-21 00:31:39.000000000 -0700 @@ -29,3 +29,8 @@ put_partition(struct parsed_partitions * } extern int warn_no_part; + +extern void parse_bsd(struct parsed_partitions *state, + struct block_device *bdev, u32 offset, u32 size, + int origin, char *flavour, int max_partitions); + --- /dev/null 2002-08-30 16:31:37.000000000 -0700 +++ 25/fs/partitions/devfs.c 2003-04-21 00:31:39.000000000 -0700 @@ -0,0 +1,134 @@ +/* + * This tries to keep block devices away from devfs as much as possible. + */ +#include +#include +#include +#include +#include +#include + + +struct unique_numspace { + u32 num_free; /* Num free in bits */ + u32 length; /* Array length in bytes */ + unsigned long *bits; + struct semaphore mutex; +}; + +static DECLARE_MUTEX(numspace_mutex); + +static int expand_numspace(struct unique_numspace *s) +{ + u32 length; + void *bits; + + if (s->length < 16) + length = 16; + else + length = s->length << 1; + + bits = vmalloc(length); + if (!bits) + return -ENOMEM; + if (s->bits) { + memcpy(bits, s->bits, s->length); + vfree(s->bits); + } + + s->num_free = (length - s->length) << 3; + s->bits = bits; + memset(bits + s->length, 0, length - s->length); + s->length = length; + + return 0; +} + +static int alloc_unique_number(struct unique_numspace *s) +{ + int rval = 0; + + down(&numspace_mutex); + if (s->num_free < 1) + rval = expand_numspace(s); + if (!rval) { + rval = find_first_zero_bit(s->bits, s->length << 3); + --s->num_free; + __set_bit(rval, s->bits); + } + up(&numspace_mutex); + + return rval; +} + +static void dealloc_unique_number(struct unique_numspace *s, int number) +{ + int old_val; + + if (number >= 0) { + down(&numspace_mutex); + old_val = __test_and_clear_bit(number, s->bits); + if (old_val) + ++s->num_free; + up(&numspace_mutex); + } +} + +static struct unique_numspace disc_numspace; +static struct unique_numspace cdrom_numspace; + +void devfs_add_partitioned(struct gendisk *disk) +{ + char dirname[64], symlink[16]; + + if (disk->devfs_name[0] != '\0') + sprintf(disk->devfs_name, "%s/disc%d", disk->disk_name, + disk->first_minor >> disk->minor_shift); + + devfs_mk_dir(disk->devfs_name); + devfs_mk_bdev(MKDEV(disk->major, disk->first_minor), + S_IFBLK|S_IRUSR|S_IWUSR, + "%s/disc", disk->devfs_name); + + disk->number = alloc_unique_number(&disc_numspace); + + sprintf(symlink, "discs/disc%d", disk->number); + sprintf(dirname, "../%s", disk->devfs_name); + devfs_mk_symlink(symlink, dirname); + +} + +void devfs_add_disk(struct gendisk *disk) +{ + devfs_mk_bdev(MKDEV(disk->major, disk->first_minor), + (disk->flags & GENHD_FL_CD) ? + S_IFBLK|S_IRUGO|S_IWUGO : + S_IFBLK|S_IRUSR|S_IWUSR, + "%s", disk->devfs_name); + + if (disk->flags & GENHD_FL_CD) { + char dirname[64], symlink[16]; + + disk->number = alloc_unique_number(&cdrom_numspace); + + sprintf(symlink, "cdroms/cdrom%d", disk->number); + sprintf(dirname, "../%s", disk->devfs_name); + devfs_mk_symlink(symlink, dirname); + } +} + +void devfs_remove_disk(struct gendisk *disk) +{ + if (disk->minors != 1) { + devfs_remove("discs/disc%d", disk->number); + dealloc_unique_number(&disc_numspace, disk->number); + devfs_remove("%s/disc", disk->devfs_name); + } + if (disk->flags & GENHD_FL_CD) { + devfs_remove("cdroms/cdrom%d", disk->number); + dealloc_unique_number(&cdrom_numspace, disk->number); + } + devfs_remove(disk->devfs_name); +} + + --- /dev/null 2002-08-30 16:31:37.000000000 -0700 +++ 25/fs/partitions/devfs.h 2003-04-21 00:31:39.000000000 -0700 @@ -0,0 +1,10 @@ + +#ifdef CONFIG_DEVFS_FS +void devfs_add_disk(struct gendisk *dev); +void devfs_add_partitioned(struct gendisk *dev); +void devfs_remove_disk(struct gendisk *dev); +#else +# define devfs_add_disk(disk) do { } while (0) +# define devfs_add_partitioned(disk) do { } while (0) +# define devfs_remove_disk(disk) do { } while (0) +#endif --- linux-2.5.68/fs/partitions/Makefile 2003-03-24 15:36:53.000000000 -0800 +++ 25/fs/partitions/Makefile 2003-04-21 00:31:39.000000000 -0700 @@ -4,6 +4,7 @@ obj-y := check.o +obj-$(CONFIG_DEVFS_FS) += devfs.o obj-$(CONFIG_ACORN_PARTITION) += acorn.o obj-$(CONFIG_AMIGA_PARTITION) += amiga.o obj-$(CONFIG_ATARI_PARTITION) += atari.o --- linux-2.5.68/fs/partitions/msdos.c 2003-02-24 13:08:47.000000000 -0800 +++ 25/fs/partitions/msdos.c 2003-04-21 00:31:39.000000000 -0700 @@ -214,12 +214,12 @@ parse_solaris_x86(struct parsed_partitio #endif } -#ifdef CONFIG_BSD_DISKLABEL +#if defined(CONFIG_BSD_DISKLABEL) || defined(CONFIG_NEC98_PARTITION) /* * Create devices for BSD partitions listed in a disklabel, under a * dos-like partition. See parse_extended() for more information. */ -static void +void parse_bsd(struct parsed_partitions *state, struct block_device *bdev, u32 offset, u32 size, int origin, char *flavour, int max_partitions) --- linux-2.5.68/fs/partitions/nec98.c 2003-03-24 15:36:53.000000000 -0800 +++ 25/fs/partitions/nec98.c 2003-04-21 00:31:39.000000000 -0700 @@ -66,13 +66,6 @@ is_valid_nec98_partition_table(const str return valid; } -#ifdef CONFIG_BSD_DISKLABEL -extern void parse_bsd(struct parsed_partitions *state, - struct block_device *bdev, - u32 offset, u32 size, int origin, char *flavour, - int max_partitions); -#endif - int nec98_partition(struct parsed_partitions *state, struct block_device *bdev) { unsigned int nr; --- linux-2.5.68/fs/proc/proc_misc.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/fs/proc/proc_misc.c 2003-04-21 02:44:46.000000000 -0700 @@ -333,6 +333,18 @@ static struct file_operations proc_parti .release = seq_release, }; +extern struct seq_operations diskstats_op; +static int diskstats_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &diskstats_op); +} +static struct file_operations proc_diskstats_operations = { + open: diskstats_open, + read: seq_read, + llseek: seq_lseek, + release: seq_release, +}; + #ifdef CONFIG_MODULES extern struct seq_operations modules_op; static int modules_open(struct inode *inode, struct file *file) @@ -644,6 +656,7 @@ void __init proc_misc_init(void) create_seq_entry("slabinfo",S_IWUSR|S_IRUGO,&proc_slabinfo_operations); create_seq_entry("buddyinfo",S_IRUGO, &fragmentation_file_operations); create_seq_entry("vmstat",S_IRUGO, &proc_vmstat_file_operations); + create_seq_entry("diskstats", 0, &proc_diskstats_operations); #ifdef CONFIG_MODULES create_seq_entry("modules", 0, &proc_modules_operations); #endif --- linux-2.5.68/fs/quota.c 2003-04-07 13:06:55.000000000 -0700 +++ 25/fs/quota.c 2003-04-21 00:31:39.000000000 -0700 @@ -19,8 +19,10 @@ static int check_quotactl_valid(struct s { if (type >= MAXQUOTAS) return -EINVAL; + if (!sb && cmd != Q_SYNC) + return -ENODEV; /* Is operation supported? */ - if (!sb->s_qcop) + if (sb && !sb->s_qcop) return -ENOSYS; switch (cmd) { @@ -51,7 +53,7 @@ static int check_quotactl_valid(struct s return -ENOSYS; break; case Q_SYNC: - if (!sb->s_qcop->quota_sync) + if (sb && !sb->s_qcop->quota_sync) return -ENOSYS; break; case Q_XQUOTAON: @@ -102,6 +104,50 @@ static int check_quotactl_valid(struct s return security_quotactl (cmd, type, id, sb); } +static struct super_block *get_super_to_sync(int type) +{ + struct list_head *head; + int cnt, dirty; + +restart: + spin_lock(&sb_lock); + list_for_each(head, &super_blocks) { + struct super_block *sb = list_entry(head, struct super_block, s_list); + + for (cnt = 0, dirty = 0; cnt < MAXQUOTAS; cnt++) + if ((type == cnt || type == -1) && sb_has_quota_enabled(sb, cnt) + && info_any_dquot_dirty(&sb_dqopt(sb)->info[cnt])) + dirty = 1; + if (!dirty) + continue; + sb->s_count++; + spin_unlock(&sb_lock); + down_read(&sb->s_umount); + if (!sb->s_root) { + drop_super(sb); + goto restart; + } + return sb; + } + spin_unlock(&sb_lock); + return NULL; +} + +void sync_dquots(struct super_block *sb, int type) +{ + if (sb) { + if (sb->s_qcop->quota_sync) + sb->s_qcop->quota_sync(sb, type); + } + else { + while ((sb = get_super_to_sync(type))) { + if (sb->s_qcop->quota_sync) + sb->s_qcop->quota_sync(sb, type); + drop_super(sb); + } + } +} + /* Copy parameters and call proper function */ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, caddr_t addr) { @@ -167,7 +213,8 @@ static int do_quotactl(struct super_bloc return sb->s_qcop->set_dqblk(sb, type, id, &idq); } case Q_SYNC: - return sb->s_qcop->quota_sync(sb, type); + sync_dquots(sb, type); + return 0; case Q_XQUOTAON: case Q_XQUOTAOFF: @@ -222,27 +269,30 @@ asmlinkage long sys_quotactl(unsigned in struct super_block *sb = NULL; struct block_device *bdev; char *tmp; - int ret = -ENODEV; + int ret; cmds = cmd >> SUBCMDSHIFT; type = cmd & SUBCMDMASK; - tmp = getname(special); - if (IS_ERR(tmp)) - return PTR_ERR(tmp); - bdev = lookup_bdev(tmp); - putname(tmp); - if (IS_ERR(bdev)) - return PTR_ERR(bdev); - sb = get_super(bdev); - bdput(bdev); + if (cmds != Q_SYNC || special) { + tmp = getname(special); + if (IS_ERR(tmp)) + return PTR_ERR(tmp); + bdev = lookup_bdev(tmp); + putname(tmp); + if (IS_ERR(bdev)) + return PTR_ERR(bdev); + sb = get_super(bdev); + bdput(bdev); + if (!sb) + return -ENODEV; + } - if (sb) { - ret = check_quotactl_valid(sb, type, cmds, id); - if (ret >= 0) - ret = do_quotactl(sb, type, cmds, id, addr); + ret = check_quotactl_valid(sb, type, cmds, id); + if (ret >= 0) + ret = do_quotactl(sb, type, cmds, id, addr); + if (sb) drop_super(sb); - } return ret; } --- linux-2.5.68/fs/reiserfs/inode.c 2003-04-07 13:06:55.000000000 -0700 +++ 25/fs/reiserfs/inode.c 2003-04-21 02:44:46.000000000 -0700 @@ -1260,7 +1260,6 @@ struct dentry *reiserfs_get_dentry(struc iput(inode); return ERR_PTR(-ENOMEM); } - result->d_vfs_flags |= DCACHE_REFERENCED; return result; } --- linux-2.5.68/fs/smbfs/proc.c 2003-04-07 13:06:55.000000000 -0700 +++ 25/fs/smbfs/proc.c 2003-04-21 00:31:39.000000000 -0700 @@ -2085,7 +2085,6 @@ out: void smb_decode_unix_basic(struct smb_fattr *fattr, char *p) { /* FIXME: verify nls support. all is sent as utf8? */ - __u64 devmajor, devminor; fattr->f_unix = 1; fattr->f_mode = 0; @@ -2112,9 +2111,10 @@ void smb_decode_unix_basic(struct smb_fa fattr->f_mode |= smb_filetype_to_mode(WVAL(p, 56)); if (S_ISBLK(fattr->f_mode) || S_ISCHR(fattr->f_mode)) { - devmajor = LVAL(p, 60); - devminor = LVAL(p, 68); - fattr->f_rdev = ((devmajor & 0xFF) << 8) | (devminor & 0xFF); + __u64 major = LVAL(p, 60); + __u64 minor = LVAL(p, 68); + + fattr->f_rdev = MKDEV(major & 0xffffffff, minor & 0xffffffff); } fattr->f_mode |= LVAL(p, 84); } @@ -3008,7 +3008,7 @@ out: */ int smb_proc_setattr_unix(struct dentry *d, struct iattr *attr, - int major, int minor) + unsigned int major, unsigned int minor) { struct smb_sb_info *server = server_from_dentry(d); u64 nttime; --- linux-2.5.68/fs/smbfs/proto.h 2003-01-16 18:22:19.000000000 -0800 +++ 25/fs/smbfs/proto.h 2003-04-21 00:31:39.000000000 -0700 @@ -27,7 +27,7 @@ extern void smb_init_root_dirent(struct extern void smb_decode_unix_basic(struct smb_fattr *fattr, char *p); extern int smb_proc_getattr(struct dentry *dir, struct smb_fattr *fattr); extern int smb_proc_setattr(struct dentry *dir, struct smb_fattr *fattr); -extern int smb_proc_setattr_unix(struct dentry *d, struct iattr *attr, int major, int minor); +extern int smb_proc_setattr_unix(struct dentry *d, struct iattr *attr, unsigned int major, unsigned int minor); extern int smb_proc_settime(struct dentry *dentry, struct smb_fattr *fattr); extern int smb_proc_dskattr(struct super_block *sb, struct statfs *attr); extern int smb_proc_read_link(struct smb_sb_info *server, struct dentry *d, char *buffer, int len); --- linux-2.5.68/fs/xfs/linux/xfs_super.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/fs/xfs/linux/xfs_super.c 2003-04-21 00:31:39.000000000 -0700 @@ -741,7 +741,6 @@ linvfs_get_dentry( iput(inode); return ERR_PTR(-ENOMEM); } - result->d_vfs_flags |= DCACHE_REFERENCED; return result; } --- linux-2.5.68/fs/xfs/pagebuf/page_buf.c 2003-04-07 13:06:55.000000000 -0700 +++ 25/fs/xfs/pagebuf/page_buf.c 2003-04-21 00:31:39.000000000 -0700 @@ -554,7 +554,8 @@ mapit: } else if (flags & PBF_MAPPED) { if (as_list_len > 64) purge_addresses(); - pb->pb_addr = vmap(pb->pb_pages, page_count); + pb->pb_addr = vmap(pb->pb_pages, page_count, + VM_MAP, PAGE_KERNEL); if (pb->pb_addr == NULL) return -ENOMEM; pb->pb_addr += pb->pb_offset; --- linux-2.5.68/include/asm-alpha/pgalloc.h 2003-01-16 18:21:34.000000000 -0800 +++ 25/include/asm-alpha/pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -40,7 +40,7 @@ pgd_free(pgd_t *pgd) static inline pmd_t * pmd_alloc_one(struct mm_struct *mm, unsigned long address) { - pmd_t *ret = (pmd_t *)__get_free_page(GFP_KERNEL); + pmd_t *ret = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (ret) clear_page(ret); return ret; --- linux-2.5.68/include/asm-arm/proc-armv/pgalloc.h 2003-01-16 18:22:13.000000000 -0800 +++ 25/include/asm-arm/proc-armv/pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -27,17 +27,9 @@ static inline pte_t * pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr) { - int count = 0; pte_t *pte; - do { - pte = (pte_t *)__get_free_page(GFP_KERNEL); - if (!pte) { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - } - } while (!pte && (count++ < 10)); - + pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (pte) { clear_page(pte); clean_dcache_area(pte, sizeof(pte_t) * PTRS_PER_PTE); @@ -51,16 +43,8 @@ static inline struct page * pte_alloc_one(struct mm_struct *mm, unsigned long addr) { struct page *pte; - int count = 0; - - do { - pte = alloc_pages(GFP_KERNEL, 0); - if (!pte) { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - } - } while (!pte && (count++ < 10)); + pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0); if (pte) { void *page = page_address(pte); clear_page(page); --- linux-2.5.68/include/asm-cris/pgalloc.h 2003-01-16 18:22:40.000000000 -0800 +++ 25/include/asm-cris/pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -62,7 +62,7 @@ static inline pte_t *pte_alloc_one(struc { pte_t *pte; - pte = (pte_t *) __get_free_page(GFP_KERNEL); + pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (pte) clear_page(pte); return pte; --- linux-2.5.68/include/asm-i386/arch_hooks.h 2003-01-16 18:22:20.000000000 -0800 +++ 25/include/asm-i386/arch_hooks.h 2003-04-21 00:31:39.000000000 -0700 @@ -1,6 +1,8 @@ #ifndef _ASM_ARCH_HOOKS_H #define _ASM_ARCH_HOOKS_H +#include + /* * linux/include/asm/arch_hooks.h * @@ -12,7 +14,7 @@ extern void init_ISA_irqs(void); extern void apic_intr_init(void); extern void smp_intr_init(void); -extern void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); +extern irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); /* these are the defined hooks */ extern void intr_init_hook(void); --- linux-2.5.68/include/asm-i386/div64.h 2003-01-16 18:21:34.000000000 -0800 +++ 25/include/asm-i386/div64.h 2003-04-21 00:31:39.000000000 -0700 @@ -14,4 +14,22 @@ __mod; \ }) +/* + * (long)X = ((long long)divs) / (long)div + * (long)rem = ((long long)divs) % (long)div + * + * Warning, this will do an exception if X overflows. + */ +#define div_long_long_rem(a,b,c) div_ll_X_l_rem(a,b,c) + +extern inline long +div_ll_X_l_rem(long long divs, long div, long *rem) +{ + long dum2; + __asm__("divl %2":"=a"(dum2), "=d"(*rem) + : "rm"(div), "A"(divs)); + + return dum2; + +} #endif --- linux-2.5.68/include/asm-i386/floppy.h 2003-04-07 13:06:55.000000000 -0700 +++ 25/include/asm-i386/floppy.h 2003-04-21 00:31:39.000000000 -0700 @@ -51,7 +51,7 @@ static char *virtual_dma_addr; static int virtual_dma_mode; static int doing_pdma; -static void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) { register unsigned char st; @@ -63,10 +63,8 @@ static void floppy_hardint(int irq, void static int bytes=0; static int dma_wait=0; #endif - if(!doing_pdma) { - floppy_interrupt(irq, dev_id, regs); - return; - } + if (!doing_pdma) + return floppy_interrupt(irq, dev_id, regs); #ifdef TRACE_FLPY_INT if(!calls) @@ -130,7 +128,7 @@ static void floppy_hardint(int irq, void calls++; #endif if(st == 0x20) - return; + return IRQ_HANDLED; if(!(st & 0x20)) { virtual_dma_residue += virtual_dma_count; virtual_dma_count=0; @@ -143,12 +141,13 @@ static void floppy_hardint(int irq, void #endif doing_pdma = 0; floppy_interrupt(irq, dev_id, regs); - return; + return IRQ_HANDLED; } #ifdef TRACE_FLPY_INT if(!virtual_dma_count) dma_wait++; #endif + return IRQ_HANDLED; } static void fd_disable_dma(void) --- linux-2.5.68/include/asm-ia64/pgalloc.h 2003-01-16 18:21:35.000000000 -0800 +++ 25/include/asm-ia64/pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -93,7 +93,7 @@ pmd_alloc_one_fast (struct mm_struct *mm static inline pmd_t* pmd_alloc_one (struct mm_struct *mm, unsigned long addr) { - pmd_t *pmd = (pmd_t *) __get_free_page(GFP_KERNEL); + pmd_t *pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (likely(pmd != NULL)) clear_page(pmd); @@ -125,7 +125,7 @@ pmd_populate_kernel (struct mm_struct *m static inline struct page * pte_alloc_one (struct mm_struct *mm, unsigned long addr) { - struct page *pte = alloc_pages(GFP_KERNEL, 0); + struct page *pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0); if (likely(pte != NULL)) clear_page(page_address(pte)); @@ -135,7 +135,7 @@ pte_alloc_one (struct mm_struct *mm, uns static inline pte_t * pte_alloc_one_kernel (struct mm_struct *mm, unsigned long addr) { - pte_t *pte = (pte_t *) __get_free_page(GFP_KERNEL); + pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (likely(pte != NULL)) clear_page(pte); --- linux-2.5.68/include/asm-m68k/motorola_pgalloc.h 2003-01-16 18:23:01.000000000 -0800 +++ 25/include/asm-m68k/motorola_pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -11,7 +11,7 @@ static inline pte_t *pte_alloc_one_kerne { pte_t *pte; - pte = (pte_t *) __get_free_page(GFP_KERNEL); + pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (pte) { clear_page(pte); __flush_page_to_ram(pte); @@ -30,7 +30,7 @@ static inline void pte_free_kernel(pte_t static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) { - struct page *page = alloc_pages(GFP_KERNEL, 0); + struct page *page = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0); pte_t *pte; if(!page) --- linux-2.5.68/include/asm-m68k/sun3_pgalloc.h 2003-01-16 18:22:04.000000000 -0800 +++ 25/include/asm-m68k/sun3_pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -18,7 +18,7 @@ extern const char bad_pmd_string[]; -#define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); }) +#define lpmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); }) static inline void pte_free_kernel(pte_t * pte) @@ -39,7 +39,7 @@ static inline void __pte_free_tlb(struct static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { - unsigned long page = __get_free_page(GFP_KERNEL); + unsigned long page = __get_free_page(GFP_KERNEL|__GFP_REPEAT); if (!page) return NULL; @@ -51,7 +51,7 @@ static inline pte_t *pte_alloc_one_kerne static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) { - struct page *page = alloc_pages(GFP_KERNEL, 0); + struct page *page = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0); if (page == NULL) return NULL; --- linux-2.5.68/include/asm-mips64/pgalloc.h 2003-01-16 18:22:31.000000000 -0800 +++ 25/include/asm-mips64/pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -93,7 +93,7 @@ static inline pte_t *pte_alloc_one(struc { pte_t *pte; - pte = (pte_t *) __get_free_page(GFP_KERNEL); + pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (pte) clear_page(pte); return pte; @@ -141,7 +141,7 @@ static inline pmd_t *pmd_alloc_one(struc { pmd_t *pmd; - pmd = (pmd_t *) __get_free_pages(GFP_KERNEL, 1); + pmd = (pmd_t *)__get_free_pages(GFP_KERNEL|__GFP_REPEAT, 1); if (pmd) pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table); return pmd; --- linux-2.5.68/include/asm-mips/pgalloc.h 2003-01-16 18:22:14.000000000 -0800 +++ 25/include/asm-mips/pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -132,7 +132,7 @@ static inline pte_t *pte_alloc_one(struc { pte_t *pte; - pte = (pte_t *) __get_free_page(GFP_KERNEL); + pte = (pte_t *) __get_free_page(GFP_KERNEL|__GFP_REPEAT); if (pte) clear_page(pte); return pte; --- linux-2.5.68/include/asm-parisc/pgalloc.h 2003-01-16 18:22:48.000000000 -0800 +++ 25/include/asm-parisc/pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -35,7 +35,7 @@ static inline void pgd_populate(struct m static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) { - pmd_t *pmd = (pmd_t *) __get_free_page(GFP_KERNEL); + pmd_t *pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (pmd) clear_page(pmd); return pmd; @@ -73,7 +73,7 @@ pmd_populate_kernel(struct mm_struct *mm static inline struct page * pte_alloc_one(struct mm_struct *mm, unsigned long address) { - struct page *page = alloc_page(GFP_KERNEL); + struct page *page = alloc_page(GFP_KERNEL|__GFP_REPEAT); if (likely(page != NULL)) clear_page(page_address(page)); return page; @@ -82,7 +82,7 @@ pte_alloc_one(struct mm_struct *mm, unsi static inline pte_t * pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr) { - pte_t *pte = (pte_t *) __get_free_page(GFP_KERNEL); + pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (likely(pte != NULL)) clear_page(pte); return pte; --- linux-2.5.68/include/asm-ppc64/pgalloc.h 2003-01-16 18:21:36.000000000 -0800 +++ 25/include/asm-ppc64/pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -31,19 +31,11 @@ pgd_free(pgd_t *pgd) static inline pmd_t * pmd_alloc_one(struct mm_struct *mm, unsigned long addr) { - int count = 0; pmd_t *pmd; - do { - pmd = (pmd_t *)__get_free_page(GFP_KERNEL); - if (pmd) - clear_page(pmd); - else { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - } - } while (!pmd && (count++ < 10)); - + pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); + if (pmd) + clear_page(pmd); return pmd; } @@ -62,19 +54,11 @@ pmd_free(pmd_t *pmd) static inline pte_t * pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr) { - int count = 0; pte_t *pte; - do { - pte = (pte_t *)__get_free_page(GFP_KERNEL); - if (pte) - clear_page(pte); - else { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - } - } while (!pte && (count++ < 10)); - + pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); + if (pte) + clear_page(pte); return pte; } --- linux-2.5.68/include/asm-s390/pgalloc.h 2003-04-19 20:45:20.000000000 -0700 +++ 25/include/asm-s390/pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -120,20 +120,13 @@ static inline pte_t * pte_alloc_one_kernel(struct mm_struct *mm, unsigned long vmaddr) { pte_t *pte; - int count; int i; - count = 0; - do { - pte = (pte_t *) __get_free_page(GFP_KERNEL); - if (pte != NULL) { - for (i=0; i < PTRS_PER_PTE; i++) - pte_clear(pte+i); - } else { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - } - } while (!pte && (count++ < 10)); + pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); + if (pte != NULL) { + for (i=0; i < PTRS_PER_PTE; i++) + pte_clear(pte+i); + } return pte; } --- linux-2.5.68/include/asm-sh/pgalloc.h 2003-01-16 18:22:10.000000000 -0800 +++ 25/include/asm-sh/pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -35,7 +35,7 @@ static inline void pgd_free(pgd_t *pgd) static inline pte_t *pte_alloc_one(struct mm_struct *mm, unsigned long address) { - pte_t *pte = (pte_t *) __get_free_page(GFP_KERNEL); + pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (pte) clear_page(pte); return pte; --- linux-2.5.68/include/asm-sparc64/pgalloc.h 2003-01-16 18:22:45.000000000 -0800 +++ 25/include/asm-sparc64/pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -159,7 +159,7 @@ static __inline__ pmd_t *pmd_alloc_one(s pmd = pmd_alloc_one_fast(mm, address); if (!pmd) { - pmd = (pmd_t *)__get_free_page(GFP_KERNEL); + pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (pmd) memset(pmd, 0, PAGE_SIZE); } --- linux-2.5.68/include/asm-x86_64/pgalloc.h 2003-02-14 17:35:06.000000000 -0800 +++ 25/include/asm-x86_64/pgalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -31,12 +31,12 @@ extern __inline__ void pmd_free(pmd_t *p static inline pmd_t *pmd_alloc_one (struct mm_struct *mm, unsigned long addr) { - return (pmd_t *) get_zeroed_page(GFP_KERNEL); + return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); } static inline pgd_t *pgd_alloc (struct mm_struct *mm) { - return (pgd_t *)get_zeroed_page(GFP_KERNEL); + return (pgd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); } static inline void pgd_free (pgd_t *pgd) @@ -48,12 +48,12 @@ static inline void pgd_free (pgd_t *pgd) static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { - return (pte_t *) get_zeroed_page(GFP_KERNEL); + return (pte_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); } static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) { - void *p = (void *)get_zeroed_page(GFP_KERNEL); + void *p = (void *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); if (!p) return NULL; return virt_to_page(p); --- /dev/null 2002-08-30 16:31:37.000000000 -0700 +++ 25/include/linux/8250_pci.h 2003-04-21 02:45:04.000000000 -0700 @@ -0,0 +1,2 @@ +int pci_siig10x_fn(struct pci_dev *dev, int enable); +int pci_siig20x_fn(struct pci_dev *dev, int enable); --- linux-2.5.68/include/linux/arcdevice.h 2003-01-16 18:21:44.000000000 -0800 +++ 25/include/linux/arcdevice.h 2003-04-21 00:31:42.000000000 -0700 @@ -329,7 +329,7 @@ void arcnet_dump_packet(struct net_devic #endif void arcnet_unregister_proto(struct ArcProto *proto); -void arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs); +irqreturn_t arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs); void arcdev_setup(struct net_device *dev); void arcnet_rx(struct net_device *dev, int bufnum); --- linux-2.5.68/include/linux/blkdev.h 2003-04-07 13:06:55.000000000 -0700 +++ 25/include/linux/blkdev.h 2003-04-21 02:44:42.000000000 -0700 @@ -341,7 +341,7 @@ extern int scsi_cmd_ioctl(struct block_d extern void blk_start_queue(request_queue_t *q); extern void blk_stop_queue(request_queue_t *q); extern void __blk_stop_queue(request_queue_t *q); -extern void __blk_run_queue(request_queue_t *q); +extern void blk_run_queue(request_queue_t *q); static inline request_queue_t *bdev_get_queue(struct block_device *bdev) { --- linux-2.5.68/include/linux/blk.h 2003-01-16 18:22:31.000000000 -0800 +++ 25/include/linux/blk.h 2003-04-21 00:31:39.000000000 -0700 @@ -12,24 +12,6 @@ extern void set_disk_ro(struct gendisk * extern void add_disk_randomness(struct gendisk *disk); extern void rand_initialize_disk(struct gendisk *disk); -#ifdef CONFIG_BLK_DEV_RAM - -extern int rd_doload; /* 1 = load ramdisk, 0 = don't load */ -extern int rd_prompt; /* 1 = prompt for ramdisk, 0 = don't prompt */ -extern int rd_image_start; /* starting block # of image */ - -#ifdef CONFIG_BLK_DEV_INITRD - -#define INITRD_MINOR 250 /* shouldn't collide with /dev/ram* too soon ... */ - -extern unsigned long initrd_start,initrd_end; -extern int initrd_below_start_ok; /* 1 if it is not an error if initrd_start < memory_start */ -void initrd_init(void); - -#endif /* CONFIG_BLK_DEV_INITRD */ - -#endif - /* * end_request() and friends. Must be called with the request queue spinlock * acquired. All functions called within end_request() _must_be_ atomic. --- linux-2.5.68/include/linux/buffer_head.h 2003-04-07 13:06:55.000000000 -0700 +++ 25/include/linux/buffer_head.h 2003-04-21 00:31:39.000000000 -0700 @@ -172,7 +172,7 @@ struct buffer_head * __getblk(struct blo void __brelse(struct buffer_head *); void __bforget(struct buffer_head *); struct buffer_head *__bread(struct block_device *, sector_t block, int size); -struct buffer_head *alloc_buffer_head(void); +struct buffer_head *alloc_buffer_head(int gfp_flags); void free_buffer_head(struct buffer_head * bh); void FASTCALL(unlock_buffer(struct buffer_head *bh)); void ll_rw_block(int, int, struct buffer_head * bh[]); --- linux-2.5.68/include/linux/dcache.h 2003-04-07 13:06:55.000000000 -0700 +++ 25/include/linux/dcache.h 2003-04-21 00:31:39.000000000 -0700 @@ -270,7 +270,6 @@ static inline struct dentry *dget(struct if (!atomic_read(&dentry->d_count)) BUG(); atomic_inc(&dentry->d_count); - dentry->d_vfs_flags |= DCACHE_REFERENCED; } return dentry; } --- linux-2.5.68/include/linux/devfs_fs_kernel.h 2003-04-19 20:45:20.000000000 -0700 +++ 25/include/linux/devfs_fs_kernel.h 2003-04-21 00:31:39.000000000 -0700 @@ -25,7 +25,8 @@ extern devfs_handle_t devfs_register (de unsigned int flags, unsigned int major, unsigned int minor, umode_t mode, void *ops, void *info); -extern void devfs_unregister (devfs_handle_t de); +extern int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) + __attribute__((format (printf, 3, 4))); extern int devfs_mk_symlink (const char *name, const char *link); extern devfs_handle_t devfs_mk_dir(const char *fmt, ...) __attribute__((format (printf, 1, 2))); @@ -33,10 +34,6 @@ extern void devfs_remove(const char *fmt __attribute__((format (printf, 1, 2))); extern int devfs_register_tape(const char *name); extern void devfs_unregister_tape(int num); -extern void devfs_create_partitions(struct gendisk *dev); -extern void devfs_create_cdrom(struct gendisk *dev); -extern void devfs_remove_partitions(struct gendisk *dev); -extern void devfs_remove_cdrom(struct gendisk *dev); extern void devfs_register_partition(struct gendisk *dev, int part); extern void mount_devfs_fs(void); #else /* CONFIG_DEVFS_FS */ @@ -50,9 +47,9 @@ static inline devfs_handle_t devfs_regis { return NULL; } -static inline void devfs_unregister (devfs_handle_t de) +static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) { - return; + return 0; } static inline int devfs_mk_symlink (const char *name, const char *link) { @@ -72,18 +69,6 @@ static inline int devfs_register_tape (d static inline void devfs_unregister_tape(int num) { } -static inline void devfs_create_partitions(struct gendisk *dev) -{ -} -static inline void devfs_create_cdrom(struct gendisk *dev) -{ -} -static inline void devfs_remove_partitions(struct gendisk *dev) -{ -} -static inline void devfs_remove_cdrom(struct gendisk *dev) -{ -} static inline void devfs_register_partition(struct gendisk *dev, int part) { } --- linux-2.5.68/include/linux/genhd.h 2003-04-19 20:45:20.000000000 -0700 +++ 25/include/linux/genhd.h 2003-04-21 00:31:39.000000000 -0700 @@ -64,7 +64,7 @@ struct hd_struct { sector_t nr_sects; struct kobject kobj; unsigned reads, read_sectors, writes, write_sectors; - int policy; + int policy, partno; }; #define GENHD_FL_REMOVABLE 1 @@ -89,7 +89,7 @@ struct gendisk { int minor_shift; /* number of times minor is shifted to get real minor */ char disk_name[16]; /* name of major driver */ - struct hd_struct *part; /* [indexed by minor] */ + struct hd_struct **part; /* [indexed by minor] */ struct block_device_operations *fops; struct request_queue *queue; void *private_data; --- linux-2.5.68/include/linux/gfp.h 2003-03-04 20:02:39.000000000 -0800 +++ 25/include/linux/gfp.h 2003-04-21 00:31:39.000000000 -0700 @@ -11,13 +11,26 @@ #define __GFP_DMA 0x01 #define __GFP_HIGHMEM 0x02 -/* Action modifiers - doesn't change the zoning */ +/* + * Action modifiers - doesn't change the zoning + * + * __GFP_REPEAT: Try hard to allocate the memory, but the allocation attempt + * _might_ fail. This depends upon the particular VM implementation. + * + * __GFP_NOFAIL: The VM implementation _must_ retry infinitely: the caller + * cannot handle allocation failures. + * + * __GFP_NORETRY: The VM implementation must not retry indefinitely. + */ #define __GFP_WAIT 0x10 /* Can wait and reschedule? */ #define __GFP_HIGH 0x20 /* Should access emergency pools? */ #define __GFP_IO 0x40 /* Can start physical IO? */ #define __GFP_FS 0x80 /* Can call down to low-level FS? */ #define __GFP_COLD 0x100 /* Cache-cold page required */ #define __GFP_NOWARN 0x200 /* Suppress page allocation failure warning */ +#define __GFP_REPEAT 0x400 /* Retry the allocation. Might fail */ +#define __GFP_NOFAIL 0x800 /* Retry for ever. Cannot fail */ +#define __GFP_NORETRY 0x1000 /* Do not retry. Might fail */ #define GFP_ATOMIC (__GFP_HIGH) #define GFP_NOIO (__GFP_WAIT) --- linux-2.5.68/include/linux/ide.h 2003-04-19 20:45:20.000000000 -0700 +++ 25/include/linux/ide.h 2003-04-21 00:31:39.000000000 -0700 @@ -1568,7 +1568,7 @@ extern void ide_stall_queue(ide_drive_t extern int ide_spin_wait_hwgroup(ide_drive_t *); extern void ide_timer_expiry(unsigned long); -extern void ide_intr(int irq, void *dev_id, struct pt_regs *regs); +extern irqreturn_t ide_intr(int irq, void *dev_id, struct pt_regs *regs); extern void do_ide_request(request_queue_t *); extern void ide_init_subdrivers(void); --- /dev/null 2002-08-30 16:31:37.000000000 -0700 +++ 25/include/linux/initrd.h 2003-04-21 00:31:39.000000000 -0700 @@ -0,0 +1,16 @@ + +#define INITRD_MINOR 250 /* shouldn't collide with /dev/ram* too soon ... */ + +/* 1 = load ramdisk, 0 = don't load */ +extern int rd_doload; + +/* 1 = prompt for ramdisk, 0 = don't prompt */ +extern int rd_prompt; + +/* starting block # of image */ +extern int rd_image_start; + +/* 1 if it is not an error if initrd_start < memory_start */ +extern int initrd_below_start_ok; + +extern unsigned long initrd_start, initrd_end; --- linux-2.5.68/include/linux/input.h 2003-02-14 17:35:06.000000000 -0800 +++ 25/include/linux/input.h 2003-04-21 00:31:39.000000000 -0700 @@ -895,8 +895,8 @@ void input_close_device(struct input_han int input_accept_process(struct input_handle *handle, struct file *file); int input_flush_device(struct input_handle* handle, struct file* file); -devfs_handle_t input_register_minor(char *name, int minor, int minor_base); -void input_unregister_minor(devfs_handle_t handle); +/* will go away once devfs_register gets sanitized */ +void input_register_minor(char *name, int minor, int minor_base); void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); --- linux-2.5.68/include/linux/interrupt.h 2003-04-19 20:45:20.000000000 -0700 +++ 25/include/linux/interrupt.h 2003-04-21 00:31:39.000000000 -0700 @@ -11,8 +11,30 @@ #include #include +/* + * For 2.4.x compatibility, 2.4.x can use + * + * typedef void irqreturn_t; + * #define IRQ_NONE + * #define IRQ_HANDLED + * #define IRQ_RETVAL(x) + * + * To mix old-style and new-style irq handler returns. + * + * IRQ_NONE means we didn't handle it. + * IRQ_HANDLED means that we did have a valid interrupt and handled it. + * IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled) + */ +typedef struct irqreturn { + unsigned int val; +} irqreturn_t; + +#define IRQ_NONE ((struct irqreturn) { 0 }) +#define IRQ_HANDLED ((struct irqreturn) { 1 }) +#define IRQ_RETVAL(x) ((struct irqreturn) { (x) != 0 }) + struct irqaction { - void (*handler)(int, void *, struct pt_regs *); + irqreturn_t (*handler)(int, void *, struct pt_regs *); unsigned long flags; unsigned long mask; const char *name; @@ -20,8 +42,9 @@ struct irqaction { struct irqaction *next; }; +extern irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs); extern int request_irq(unsigned int, - void (*handler)(int, void *, struct pt_regs *), + irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long, const char *, void *); extern void free_irq(unsigned int, void *); --- linux-2.5.68/include/linux/irq.h 2003-01-16 18:22:04.000000000 -0800 +++ 25/include/linux/irq.h 2003-04-21 00:31:39.000000000 -0700 @@ -72,7 +72,6 @@ extern int handle_IRQ_event(unsigned int extern int setup_irq(unsigned int , struct irqaction * ); extern hw_irq_controller no_irq_type; /* needed in every arch ? */ -extern void no_action(int cpl, void *dev_id, struct pt_regs *regs); #endif --- linux-2.5.68/include/linux/linux_logo.h 2003-04-19 20:45:20.000000000 -0700 +++ 25/include/linux/linux_logo.h 2003-04-21 00:31:39.000000000 -0700 @@ -32,6 +32,6 @@ struct linux_logo { const unsigned char *data; }; -extern const struct linux_logo * __init find_logo(int depth); +extern const struct linux_logo *fb_find_logo(int depth); #endif /* _LINUX_LINUX_LOGO_H */ --- linux-2.5.68/include/linux/miscdevice.h 2003-01-16 18:22:18.000000000 -0800 +++ 25/include/linux/miscdevice.h 2003-04-21 00:31:39.000000000 -0700 @@ -44,7 +44,7 @@ struct miscdevice const char *name; struct file_operations *fops; struct miscdevice * next, * prev; - devfs_handle_t devfs_handle; + char devfs_name[64]; }; extern int misc_register(struct miscdevice * misc); --- linux-2.5.68/include/linux/mm.h 2003-04-19 20:45:20.000000000 -0700 +++ 25/include/linux/mm.h 2003-04-21 00:31:39.000000000 -0700 @@ -594,28 +594,10 @@ extern struct vm_area_struct *find_exten extern unsigned int nr_used_zone_pages(void); -#ifdef CONFIG_MMU extern struct page * vmalloc_to_page(void *addr); extern struct page * follow_page(struct mm_struct *mm, unsigned long address, int write); extern int remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long to, unsigned long size, pgprot_t prot); -#else -static inline struct page * vmalloc_to_page(void *addr) -{ - return NULL; -} -static inline struct page * follow_page(struct mm_struct *mm, - unsigned long address, int write) -{ - return NULL; -} -static inline int remap_page_range(struct vm_area_struct *vma, - unsigned long from, unsigned long to, - unsigned long size, pgprot_t prot) -{ - return -EPERM; -} -#endif /* CONFIG_MMU */ #endif /* __KERNEL__ */ #endif /* _LINUX_MM_H */ --- linux-2.5.68/include/linux/net.h 2003-04-19 20:45:20.000000000 -0700 +++ 25/include/linux/net.h 2003-04-21 00:31:39.000000000 -0700 @@ -127,14 +127,17 @@ struct proto_ops { int offset, size_t size, int flags); }; +struct module; + struct net_proto_family { - int family; - int (*create)(struct socket *sock, int protocol); + int family; + int (*create)(struct socket *sock, int protocol); /* These are counters for the number of different methods of each we support */ - short authentication; - short encryption; - short encrypt_net; + short authentication; + short encryption; + short encrypt_net; + struct module *owner; }; struct iovec; --- linux-2.5.68/include/linux/nfsd/syscall.h 2003-04-19 20:45:20.000000000 -0700 +++ 25/include/linux/nfsd/syscall.h 2003-04-21 00:31:39.000000000 -0700 @@ -59,7 +59,7 @@ struct nfsctl_client { struct nfsctl_export { char ex_client[NFSCLNT_IDMAX+1]; char ex_path[NFS_MAXPATHLEN+1]; - __kernel_dev_t ex_dev; + __kernel_old_dev_t ex_dev; __kernel_ino_t ex_ino; int ex_flags; __kernel_uid_t ex_anon_uid; @@ -104,7 +104,6 @@ struct nfsctl_arg { #define ca_export u.u_export #define ca_getfd u.u_getfd #define ca_getfs u.u_getfs -#define ca_authd u.u_authd }; union nfsctl_res { --- linux-2.5.68/include/linux/sched.h 2003-04-19 20:45:20.000000000 -0700 +++ 25/include/linux/sched.h 2003-04-21 02:44:42.000000000 -0700 @@ -465,6 +465,7 @@ do { if (atomic_dec_and_test(&(tsk)->usa #define PF_FROZEN 0x00010000 /* frozen for system suspend */ #define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ #define PF_KSWAPD 0x00040000 /* I am kswapd */ +#define PF_SWAPOFF 0x00080000 /* I am in swapoff */ #if CONFIG_SMP extern void set_cpus_allowed(task_t *p, unsigned long new_mask); --- linux-2.5.68/include/linux/serio.h 2003-02-14 17:35:06.000000000 -0800 +++ 25/include/linux/serio.h 2003-04-21 04:06:57.000000000 -0700 @@ -10,6 +10,7 @@ */ #include +#include #define SPIOCSTYPE _IOW('q', 0x01, unsigned long) @@ -50,7 +51,8 @@ struct serio_dev { char *name; void (*write_wakeup)(struct serio *); - void (*interrupt)(struct serio *, unsigned char, unsigned int, struct pt_regs *); + irqreturn_t (*interrupt)(struct serio *, unsigned char, + unsigned int, struct pt_regs *); void (*connect)(struct serio *, struct serio_dev *dev); void (*disconnect)(struct serio *); void (*cleanup)(struct serio *); @@ -61,7 +63,7 @@ struct serio_dev { int serio_open(struct serio *serio, struct serio_dev *dev); void serio_close(struct serio *serio); void serio_rescan(struct serio *serio); -void serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs); +irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs); void serio_register_port(struct serio *serio); void serio_unregister_port(struct serio *serio); --- linux-2.5.68/include/linux/slab.h 2003-03-17 14:56:03.000000000 -0800 +++ 25/include/linux/slab.h 2003-04-21 00:31:39.000000000 -0700 @@ -22,7 +22,7 @@ typedef struct kmem_cache_s kmem_cache_t #define SLAB_KERNEL GFP_KERNEL #define SLAB_DMA GFP_DMA -#define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|__GFP_COLD|__GFP_NOWARN) +#define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|__GFP_COLD|__GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|__GFP_NORETRY) #define SLAB_NO_GROW 0x00001000UL /* don't grow a cache */ /* flags to pass to kmem_cache_create(). --- linux-2.5.68/include/linux/time.h 2003-04-19 20:45:20.000000000 -0700 +++ 25/include/linux/time.h 2003-04-21 00:31:39.000000000 -0700 @@ -26,6 +26,16 @@ struct timezone { #include #include +#include +#include +#ifndef div_long_long_rem + +#define div_long_long_rem(dividend,divisor,remainder) ({ \ + u64 result = dividend; \ + *remainder = do_div(result,divisor); \ + result; }) + +#endif /* * Have the 32 bit jiffies value wrap 5 minutes after boot @@ -59,25 +69,52 @@ struct timezone { #ifndef NSEC_PER_USEC #define NSEC_PER_USEC (1000L) #endif +/* + * We want to do realistic conversions of time so we need to use the same + * values the update wall clock code uses as the jiffie size. This value + * is: TICK_NSEC(TICK_USEC) (both of which are defined in timex.h). This + * is a constant and is in nanoseconds. We will used scaled math and + * with a scales defined here as SEC_JIFFIE_SC, USEC_JIFFIE_SC and + * NSEC_JIFFIE_SC. Note that these defines contain nothing but + * constants and so are computed at compile time. SHIFT_HZ (computed in + * timex.h) adjusts the scaling for different HZ values. + */ +#define SEC_JIFFIE_SC (30 - SHIFT_HZ) +#define NSEC_JIFFIE_SC (SEC_JIFFIE_SC + 30) +#define USEC_JIFFIE_SC (SEC_JIFFIE_SC + 20) +#define SEC_CONVERSION ((unsigned long)(((u64)NSEC_PER_SEC << SEC_JIFFIE_SC) /\ + (u64)TICK_NSEC(TICK_USEC))) +#define NSEC_CONVERSION ((unsigned long)(((u64)1 << NSEC_JIFFIE_SC) / \ + (u64)TICK_NSEC(TICK_USEC))) +#define USEC_CONVERSION \ + ((unsigned long)(((u64)NSEC_PER_USEC << USEC_JIFFIE_SC)/ \ + (u64)TICK_NSEC(TICK_USEC))) +#define MAX_SEC_IN_JIFFIES \ + (u32)((u64)((u64)MAX_JIFFY_OFFSET * TICK_NSEC(TICK_USEC)) / NSEC_PER_SEC) static __inline__ unsigned long timespec_to_jiffies(struct timespec *value) { unsigned long sec = value->tv_sec; - long nsec = value->tv_nsec; + long nsec = value->tv_nsec + TICK_NSEC(TICK_USEC) - 1; - if (sec >= (MAX_JIFFY_OFFSET / HZ)) + if (sec >= MAX_SEC_IN_JIFFIES) return MAX_JIFFY_OFFSET; - nsec += 1000000000L / HZ - 1; - nsec /= 1000000000L / HZ; - return HZ * sec + nsec; + return (((u64)sec * SEC_CONVERSION) + + (((u64)nsec * NSEC_CONVERSION) >> + (NSEC_JIFFIE_SC - SEC_JIFFIE_SC))) >> SEC_JIFFIE_SC; + } static __inline__ void jiffies_to_timespec(unsigned long jiffies, struct timespec *value) { - value->tv_nsec = (jiffies % HZ) * (1000000000L / HZ); - value->tv_sec = jiffies / HZ; + /* + * Convert jiffies to nanoseconds and seperate with + * one divide. + */ + u64 nsec = (u64)jiffies * TICK_NSEC(TICK_USEC); + value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_nsec); } /* Same for "timeval" */ @@ -85,20 +122,25 @@ static __inline__ unsigned long timeval_to_jiffies(struct timeval *value) { unsigned long sec = value->tv_sec; - long usec = value->tv_usec; + long usec = value->tv_usec + USEC_PER_SEC / HZ - 1; - if (sec >= (MAX_JIFFY_OFFSET / HZ)) + if (sec >= MAX_SEC_IN_JIFFIES) return MAX_JIFFY_OFFSET; - usec += 1000000L / HZ - 1; - usec /= 1000000L / HZ; - return HZ * sec + usec; + return (((u64)sec * SEC_CONVERSION) + + (((u64)usec * USEC_CONVERSION) >> + (USEC_JIFFIE_SC - SEC_JIFFIE_SC))) >> SEC_JIFFIE_SC; } static __inline__ void jiffies_to_timeval(unsigned long jiffies, struct timeval *value) { - value->tv_usec = (jiffies % HZ) * (1000000L / HZ); - value->tv_sec = jiffies / HZ; + /* + * Convert jiffies to nanoseconds and seperate with + * one divide. + */ + u64 nsec = (u64)jiffies * TICK_NSEC(TICK_USEC); + value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_usec); + value->tv_usec /= NSEC_PER_USEC; } static __inline__ int timespec_equal(struct timespec *a, struct timespec *b) @@ -140,6 +182,7 @@ mktime (unsigned int year, unsigned int } extern struct timespec xtime; +extern struct timespec wall_to_monotonic; extern seqlock_t xtime_lock; static inline unsigned long get_seconds(void) @@ -200,6 +243,9 @@ struct itimerval { #define CLOCK_MONOTONIC_HR 5 #define MAX_CLOCKS 6 +#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC | \ + CLOCK_REALTIME_HR | CLOCK_MONOTONIC_HR) +#define CLOCKS_MONO (CLOCK_MONOTONIC & CLOCK_MONOTONIC_HR) /* * The various flags for setting POSIX.1b interval timers. --- linux-2.5.68/include/linux/timex.h 2003-01-16 18:21:36.000000000 -0800 +++ 25/include/linux/timex.h 2003-04-21 00:31:39.000000000 -0700 @@ -51,7 +51,6 @@ #ifndef _LINUX_TIMEX_H #define _LINUX_TIMEX_H -#include #include /* @@ -177,6 +176,7 @@ /* a value TUSEC for TICK_USEC (can be set bij adjtimex) */ #define TICK_NSEC(TUSEC) (SH_DIV (TUSEC * USER_HZ * 1000, ACTHZ, 8)) +#include /* * syscall interface - used (mainly by NTP daemon) * to discipline kernel clock oscillator --- linux-2.5.68/include/linux/videodev.h 2003-01-16 18:23:01.000000000 -0800 +++ 25/include/linux/videodev.h 2003-04-21 00:31:39.000000000 -0700 @@ -39,7 +39,7 @@ struct video_device /* for videodev.c intenal usage -- don't touch */ int users; struct semaphore lock; - devfs_handle_t devfs_handle; + char devfs_name[64]; /* devfs */ }; #define VIDEO_MAJOR 81 --- linux-2.5.68/include/linux/vmalloc.h 2003-01-16 18:22:56.000000000 -0800 +++ 25/include/linux/vmalloc.h 2003-04-21 00:31:39.000000000 -0700 @@ -27,7 +27,8 @@ extern void *vmalloc_32(unsigned long si extern void *__vmalloc(unsigned long size, int gfp_mask, pgprot_t prot); extern void vfree(void *addr); -extern void *vmap(struct page **pages, unsigned int count); +extern void *vmap(struct page **pages, unsigned int count, + unsigned long flags, pgprot_t prot); extern void vunmap(void *addr); /* --- linux-2.5.68/include/net/irda/irport.h 2003-01-16 18:22:21.000000000 -0800 +++ 25/include/net/irda/irport.h 2003-04-21 02:57:05.000000000 -0700 @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -73,7 +74,7 @@ struct irport_cb { /* For piggyback drivers */ void *priv; void (*change_speed)(void *priv, __u32 speed); - void (*interrupt)(int irq, void *dev_id, struct pt_regs *regs); + irqreturn_t (*interrupt)(int irq, void *dev_id, struct pt_regs *regs); }; struct irport_cb *irport_open(int i, unsigned int iobase, unsigned int irq); @@ -81,7 +82,7 @@ int irport_close(struct irport_cb *self void irport_start(struct irport_cb *self); void irport_stop(struct irport_cb *self); void irport_change_speed(void *priv, __u32 speed); -void irport_interrupt(int irq, void *dev_id, struct pt_regs *regs); +irqreturn_t irport_interrupt(int irq, void *dev_id, struct pt_regs *regs); int irport_hard_xmit(struct sk_buff *skb, struct net_device *dev); int irport_net_open(struct net_device *dev); int irport_net_close(struct net_device *dev); --- linux-2.5.68/include/net/pkt_cls.h 2003-01-16 18:22:26.000000000 -0800 +++ 25/include/net/pkt_cls.h 2003-04-21 00:31:39.000000000 -0700 @@ -39,6 +39,8 @@ struct tcf_walker int (*fn)(struct tcf_proto *, unsigned long node, struct tcf_walker *); }; +struct module; + struct tcf_proto_ops { struct tcf_proto_ops *next; @@ -56,6 +58,8 @@ struct tcf_proto_ops /* rtnetlink specific */ int (*dump)(struct tcf_proto*, unsigned long, struct sk_buff *skb, struct tcmsg*); + + struct module *owner; }; /* Main classifier routine: scans classifier chain attached --- linux-2.5.68/include/net/pkt_sched.h 2003-01-16 18:21:43.000000000 -0800 +++ 25/include/net/pkt_sched.h 2003-04-21 00:31:39.000000000 -0700 @@ -49,6 +49,8 @@ struct Qdisc_class_ops int (*dump)(struct Qdisc *, unsigned long, struct sk_buff *skb, struct tcmsg*); }; +struct module; + struct Qdisc_ops { struct Qdisc_ops *next; @@ -67,6 +69,8 @@ struct Qdisc_ops int (*change)(struct Qdisc *, struct rtattr *arg); int (*dump)(struct Qdisc *, struct sk_buff *); + + struct module *owner; }; extern rwlock_t qdisc_tree_lock; --- linux-2.5.68/include/sound/ad1848.h 2003-02-10 12:24:16.000000000 -0800 +++ 25/include/sound/ad1848.h 2003-04-21 00:32:53.000000000 -0700 @@ -23,6 +23,7 @@ */ #include "pcm.h" +#include /* IO ports */ @@ -163,7 +164,7 @@ int snd_ad1848_create(snd_card_t * card, int snd_ad1848_pcm(ad1848_t * chip, int device, snd_pcm_t **rpcm); const snd_pcm_ops_t *snd_ad1848_get_pcm_ops(int direction); int snd_ad1848_mixer(ad1848_t * chip); -void snd_ad1848_interrupt(int irq, void *dev_id, struct pt_regs *regs); +irqreturn_t snd_ad1848_interrupt(int irq, void *dev_id, struct pt_regs *regs); /* exported mixer stuffs */ enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE }; --- linux-2.5.68/include/sound/cs4231.h 2003-01-16 18:22:08.000000000 -0800 +++ 25/include/sound/cs4231.h 2003-04-21 00:32:53.000000000 -0700 @@ -316,7 +316,7 @@ unsigned char snd_cs4236_ext_in(cs4231_t void snd_cs4231_mce_up(cs4231_t *chip); void snd_cs4231_mce_down(cs4231_t *chip); -void snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs); +irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs); const char *snd_cs4231_chip_id(cs4231_t *chip); --- linux-2.5.68/include/sound/emu10k1.h 2003-04-19 20:45:20.000000000 -0700 +++ 25/include/sound/emu10k1.h 2003-04-21 00:32:53.000000000 -0700 @@ -30,6 +30,7 @@ #include #include #include +#include #include #ifndef PCI_VENDOR_ID_CREATIVE @@ -1014,7 +1015,7 @@ int snd_emu10k1_fx8010_pcm(emu10k1_t * e int snd_emu10k1_mixer(emu10k1_t * emu); int snd_emu10k1_fx8010_new(emu10k1_t *emu, int device, snd_hwdep_t ** rhwdep); -void snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs); +irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs); /* initialization */ void snd_emu10k1_voice_init(emu10k1_t * emu, int voice); --- linux-2.5.68/include/sound/es1688.h 2003-01-16 18:22:21.000000000 -0800 +++ 25/include/sound/es1688.h 2003-04-21 00:32:53.000000000 -0700 @@ -24,6 +24,7 @@ #include "control.h" #include "pcm.h" +#include #define ES1688_HW_AUTO 0x0000 #define ES1688_HW_688 0x0001 @@ -109,7 +110,7 @@ typedef struct _snd_es1688 es1688_t; void snd_es1688_mixer_write(es1688_t *chip, unsigned char reg, unsigned char data); unsigned char snd_es1688_mixer_read(es1688_t *chip, unsigned char reg); -void snd_es1688_interrupt(int irq, void *dev_id, struct pt_regs *regs); +irqreturn_t snd_es1688_interrupt(int irq, void *dev_id, struct pt_regs *regs); int snd_es1688_create(snd_card_t * card, unsigned long port, --- linux-2.5.68/include/sound/gus.h 2003-02-10 12:24:16.000000000 -0800 +++ 25/include/sound/gus.h 2003-04-21 00:32:53.000000000 -0700 @@ -561,7 +561,7 @@ struct _SND_IW_LFO_PROGRAM { }; #if 0 -extern void snd_gf1_lfo_effect_interrupt(snd_gus_card_t * gus, snd_gf1_voice_t * voice); +extern irqreturn_t snd_gf1_lfo_effect_interrupt(snd_gus_card_t * gus, snd_gf1_voice_t * voice); #endif extern void snd_gf1_lfo_init(snd_gus_card_t * gus); extern void snd_gf1_lfo_done(snd_gus_card_t * gus); @@ -666,7 +666,7 @@ int snd_gus_initialize(snd_gus_card_t * /* gus_irq.c */ -void snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs); +irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs); #ifdef CONFIG_SND_DEBUG void snd_gus_irq_profile_init(snd_gus_card_t *gus); #endif --- linux-2.5.68/include/sound/initval.h 2003-04-19 20:45:20.000000000 -0700 +++ 25/include/sound/initval.h 2003-04-21 00:32:53.000000000 -0700 @@ -100,8 +100,9 @@ static int snd_legacy_auto_probe(unsigne #ifdef SNDRV_LEGACY_FIND_FREE_IRQ #include -static void snd_legacy_empty_irq_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_legacy_empty_irq_handler(int irq, void *dev_id, struct pt_regs *regs) { + return IRQ_HANDLED; } static int snd_legacy_find_free_irq(int *irq_table) --- linux-2.5.68/include/sound/mpu401.h 2003-03-24 15:36:54.000000000 -0800 +++ 25/include/sound/mpu401.h 2003-04-21 00:32:53.000000000 -0700 @@ -23,6 +23,7 @@ */ #include "rawmidi.h" +#include #define MPU401_HW_MPU401 1 /* native MPU401 */ #define MPU401_HW_SB 2 /* SoundBlaster MPU-401 UART */ @@ -102,7 +103,7 @@ struct _snd_mpu401 { */ -void snd_mpu401_uart_interrupt(int irq, void *dev_id, struct pt_regs *regs); +irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, struct pt_regs *regs); int snd_mpu401_uart_new(snd_card_t * card, int device, --- linux-2.5.68/include/sound/sb.h 2003-02-10 12:24:16.000000000 -0800 +++ 25/include/sound/sb.h 2003-04-21 00:32:53.000000000 -0700 @@ -24,6 +24,7 @@ #include "pcm.h" #include "rawmidi.h" +#include #include enum sb_hw_type { @@ -99,7 +100,7 @@ struct _snd_sb { snd_rawmidi_t *rmidi; snd_rawmidi_substream_t *midi_substream_input; snd_rawmidi_substream_t *midi_substream_output; - void (*rmidi_callback)(int irq, void *dev_id, struct pt_regs *regs); + irqreturn_t (*rmidi_callback)(int irq, void *dev_id, struct pt_regs *regs); spinlock_t reg_lock; spinlock_t open_lock; @@ -282,7 +283,7 @@ int snd_sbdsp_reset(sb_t *chip); int snd_sbdsp_create(snd_card_t *card, unsigned long port, int irq, - void (*irq_handler)(int, void *, struct pt_regs *), + irqreturn_t (*irq_handler)(int, void *, struct pt_regs *), int dma8, int dma16, unsigned short hardware, sb_t **r_chip); @@ -308,7 +309,7 @@ int snd_sb16dsp_pcm(sb_t *chip, int devi const snd_pcm_ops_t *snd_sb16dsp_get_pcm_ops(int direction); int snd_sb16dsp_configure(sb_t *chip); /* sb16.c */ -void snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs); +irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs); int snd_sb16_playback_open(snd_pcm_substream_t *substream); int snd_sb16_capture_open(snd_pcm_substream_t *substream); int snd_sb16_playback_close(snd_pcm_substream_t *substream); --- linux-2.5.68/init/do_mounts_rd.c 2003-03-17 14:56:03.000000000 -0800 +++ 25/init/do_mounts_rd.c 2003-04-21 00:31:39.000000000 -0700 @@ -4,6 +4,7 @@ #include #include #include +#include #include "do_mounts.h" --- linux-2.5.68/init/Kconfig 2003-03-17 14:56:03.000000000 -0800 +++ 25/init/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -56,12 +56,12 @@ config SYSVIPC and some programs won't run unless you say Y here. In particular, if you want to run the DOS emulator dosemu under Linux (read the DOSEMU-HOWTO, available from - ), you'll need to say Y + ), you'll need to say Y here. You can find documentation about IPC with "info ipc" and also in section 6.4 of the Linux Programmer's Guide, available from - . + . config BSD_PROCESS_ACCT bool "BSD Process Accounting" --- linux-2.5.68/init/main.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/init/main.c 2003-04-21 00:31:39.000000000 -0700 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include --- linux-2.5.68/ipc/shm.c 2003-01-16 18:22:10.000000000 -0800 +++ 25/ipc/shm.c 2003-04-21 00:31:39.000000000 -0700 @@ -361,27 +361,35 @@ static inline unsigned long copy_shminfo } } -static void shm_get_stat (unsigned long *rss, unsigned long *swp) +static void shm_get_stat(unsigned long *rss, unsigned long *swp) { - struct shmem_inode_info *info; int i; *rss = 0; *swp = 0; - for(i = 0; i <= shm_ids.max_id; i++) { - struct shmid_kernel* shp; - struct inode * inode; + for (i = 0; i <= shm_ids.max_id; i++) { + struct shmid_kernel *shp; + struct inode *inode; shp = shm_get(i); - if(shp == NULL) + if(!shp) continue; + inode = shp->shm_file->f_dentry->d_inode; - info = SHMEM_I(inode); - spin_lock (&info->lock); - *rss += inode->i_mapping->nrpages; - *swp += info->swapped; - spin_unlock (&info->lock); + + if (is_file_hugepages(shp->shm_file)) { + struct address_space *mapping = inode->i_mapping; + spin_lock(&mapping->page_lock); + *rss += (HPAGE_SIZE/PAGE_SIZE)*mapping->nrpages; + spin_unlock(&mapping->page_lock); + } else { + struct shmem_inode_info *info = SHMEM_I(inode); + spin_lock(&info->lock); + *rss += inode->i_mapping->nrpages; + *swp += info->swapped; + spin_unlock(&info->lock); + } } } @@ -737,21 +745,66 @@ out: * detach and kill segment if marked destroyed. * The work is done in shm_close. */ -asmlinkage long sys_shmdt (char *shmaddr) +asmlinkage long sys_shmdt(char *shmaddr) { struct mm_struct *mm = current->mm; - struct vm_area_struct *shmd, *shmdnext; + struct vm_area_struct *vma, *next; + unsigned long addr = (unsigned long)shmaddr; + loff_t size = 0; int retval = -EINVAL; down_write(&mm->mmap_sem); - for (shmd = mm->mmap; shmd; shmd = shmdnext) { - shmdnext = shmd->vm_next; - if ((shmd->vm_ops == &shm_vm_ops || (shmd->vm_flags & VM_HUGETLB)) - && shmd->vm_start - (shmd->vm_pgoff << PAGE_SHIFT) == (ulong) shmaddr) { - do_munmap(mm, shmd->vm_start, shmd->vm_end - shmd->vm_start); + + /* + * If it had been mremap()'d, the starting address would not + * match the usual checks anyway. So assume all vma's are + * above the starting address given. + */ + vma = find_vma(mm, addr); + + while (vma) { + next = vma->vm_next; + + /* + * Check if the starting address would match, i.e. it's + * a fragment created by mprotect() and/or munmap(), or it + * otherwise it starts at this address with no hassles. + */ + if ((vma->vm_ops == &shm_vm_ops || is_vm_hugetlb_page(vma)) && + (vma->vm_start - addr)/PAGE_SIZE == vma->vm_pgoff) { + + + size = vma->vm_file->f_dentry->d_inode->i_size; + do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start); + /* + * We discovered the size of the shm segment, so + * break out of here and fall through to the next + * loop that uses the size information to stop + * searching for matching vma's. + */ retval = 0; + vma = next; + break; } + vma = next; } + + /* + * We need look no further than the maximum address a fragment + * could possibly have landed at. Also cast things to loff_t to + * prevent overflows and make comparisions vs. equal-width types. + */ + while (vma && (loff_t)(vma->vm_end - addr) <= size) { + next = vma->vm_next; + + /* finding a matching vma now does not alter retval */ + if ((vma->vm_ops == &shm_vm_ops || is_vm_hugetlb_page(vma)) && + (vma->vm_start - addr)/PAGE_SIZE == vma->vm_pgoff) + + do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start); + vma = next; + } + up_write(&mm->mmap_sem); return retval; } --- linux-2.5.68/kernel/posix-timers.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/kernel/posix-timers.c 2003-04-21 00:31:39.000000000 -0700 @@ -33,7 +33,12 @@ result; }) #endif +#define CLOCK_REALTIME_RES TICK_NSEC(TICK_USEC) // In nano seconds. +static inline u64 mpy_l_X_l_ll(unsigned long mpy1,unsigned long mpy2) +{ + return (u64)mpy1 * mpy2; +} /* * Management arrays for POSIX timers. Timers are kept in slab memory * Timer ids are allocated by an external routine that keeps track of the @@ -48,7 +53,7 @@ * The idr_get_new *may* call slab for more memory so it must not be * called under a spin lock. Likewise idr_remore may release memory * (but it may be ok to do this under a lock...). - * idr_find is just a memory look up and is quite fast. A zero return + * idr_find is just a memory look up and is quite fast. A -1 return * indicates that the requested id does not exist. */ @@ -82,6 +87,7 @@ static spinlock_t idr_lock = SPIN_LOCK_U * For some reason mips/mips64 define the SIGEV constants plus 128. * Here we define a mask to get rid of the common bits. The * optimizer should make this costless to all but mips. + * Note that no common bits (the non-mips case) will give 0xffffffff. */ #define MIPS_SIGEV ~(SIGEV_NONE & \ SIGEV_SIGNAL & \ @@ -93,7 +99,7 @@ static spinlock_t idr_lock = SPIN_LOCK_U * The timer ID is turned into a timer address by idr_find(). * Verifying a valid ID consists of: * - * a) checking that idr_find() returns other than zero. + * a) checking that idr_find() returns other than -1. * b) checking that the timer id matches the one in the timer itself. * c) that the timer owner is in the callers thread group. */ @@ -162,6 +168,8 @@ static struct k_clock posix_clocks[MAX_C void register_posix_clock(int clock_id, struct k_clock *new_clock); static int do_posix_gettime(struct k_clock *clock, struct timespec *tp); +static u64 do_posix_clock_monotonic_gettime_parts( + struct timespec *tp, struct timespec *mo); int do_posix_clock_monotonic_gettime(struct timespec *tp); int do_posix_clock_monotonic_settime(struct timespec *tp); static struct k_itimer *lock_timer(timer_t timer_id, unsigned long *flags); @@ -172,8 +180,8 @@ static inline void unlock_timer(struct k */ static __init int init_posix_timers(void) { - struct k_clock clock_realtime = {.res = NSEC_PER_SEC / HZ }; - struct k_clock clock_monotonic = {.res = NSEC_PER_SEC / HZ, + struct k_clock clock_realtime = {.res = CLOCK_REALTIME_RES }; + struct k_clock clock_monotonic = {.res = CLOCK_REALTIME_RES, .clock_get = do_posix_clock_monotonic_gettime, .clock_set = do_posix_clock_monotonic_settime }; @@ -192,7 +200,7 @@ __initcall(init_posix_timers); static void tstojiffie(struct timespec *tp, int res, u64 *jiff) { - unsigned long sec = tp->tv_sec; + long sec = tp->tv_sec; long nsec = tp->tv_nsec + res - 1; if (nsec > NSEC_PER_SEC) { @@ -201,35 +209,14 @@ static void tstojiffie(struct timespec * } /* - * A note on jiffy overflow: It is possible for the system to - * have been up long enough for the jiffies quanity to overflow. - * In order for correct timer evaluations we require that the - * specified time be somewhere between now and now + (max - * unsigned int/2). Times beyond this will be truncated back to - * this value. This is done in the absolute adjustment code, - * below. Here it is enough to just discard the high order - * bits. - */ - *jiff = (u64)sec * HZ; - /* - * Do the res thing. (Don't forget the add in the declaration of nsec) - */ - nsec -= nsec % res; - /* - * Split to jiffie and sub jiffie - */ - *jiff += nsec / (NSEC_PER_SEC / HZ); -} - -static void tstotimer(struct itimerspec *time, struct k_itimer *timer) -{ - u64 result; - int res = posix_clocks[timer->it_clock].res; - - tstojiffie(&time->it_value, res, &result); - timer->it_timer.expires = (unsigned long)result; - tstojiffie(&time->it_interval, res, &result); - timer->it_incr = (unsigned long)result; + * The scaling constants are defined in + * The difference between there and here is that we do the + * res rounding and compute a 64-bit result (well so does that + * but it then throws away the high bits). + */ + *jiff = (mpy_l_X_l_ll(sec, SEC_CONVERSION) + + (mpy_l_X_l_ll(nsec, NSEC_CONVERSION) >> + (NSEC_JIFFIE_SC - SEC_JIFFIE_SC))) >> SEC_JIFFIE_SC; } static void schedule_next_timer(struct k_itimer *timr) @@ -690,57 +677,81 @@ sys_timer_getoverrun(timer_t timer_id) * If it is relative time, we need to add the current (CLOCK_MONOTONIC) * time to it to get the proper time for the timer. */ -static int adjust_abs_time(struct k_clock *clock, struct timespec *tp, int abs) +static int adjust_abs_time(struct k_clock *clock, struct timespec *tp, + int abs, u64 *exp) { struct timespec now; - struct timespec oc; - do_posix_clock_monotonic_gettime(&now); - - if (!abs || (posix_clocks[CLOCK_MONOTONIC].clock_get != - clock->clock_get)) { - if (abs) - do_posix_gettime(clock, &oc); - else - oc.tv_nsec = oc.tv_sec = 0; - - tp->tv_sec += now.tv_sec - oc.tv_sec; - tp->tv_nsec += now.tv_nsec - oc.tv_nsec; + struct timespec oc = *tp; + struct timespec wall_to_mono; + u64 jiffies_64_f; + int rtn =0; + if (abs) { + /* + * The mask pick up the 4 basic clocks + */ + if (!(clock - &posix_clocks[0]) & ~CLOCKS_MASK) { + jiffies_64_f = do_posix_clock_monotonic_gettime_parts( + &now, &wall_to_mono); + /* + * If we are doing a MONOTONIC clock + */ + if((clock - &posix_clocks[0]) & CLOCKS_MONO){ + now.tv_sec += wall_to_mono.tv_sec; + now.tv_nsec += wall_to_mono.tv_nsec; + } + } else { + /* + * Not one of the basic clocks + */ + do_posix_gettime(clock, &now); + jiffies_64_f = get_jiffies_64(); + } + /* + * Take away now to get delta + */ + oc.tv_sec -= now.tv_sec; + oc.tv_nsec -= now.tv_nsec; /* * Normalize... */ - if ((tp->tv_nsec - NSEC_PER_SEC) >= 0) { - tp->tv_nsec -= NSEC_PER_SEC; - tp->tv_sec++; + while ((oc.tv_nsec - NSEC_PER_SEC) >= 0) { + oc.tv_nsec -= NSEC_PER_SEC; + oc.tv_sec++; } - if ((tp->tv_nsec) < 0) { - tp->tv_nsec += NSEC_PER_SEC; - tp->tv_sec--; + while ((oc.tv_nsec) < 0) { + oc.tv_nsec += NSEC_PER_SEC; + oc.tv_sec--; } + }else{ + jiffies_64_f = get_jiffies_64(); } /* - * Check if the requested time is prior to now (if so set now) or - * is more than the timer code can handle (if so we error out). - * The (unsigned) catches the case of prior to "now" with the same - * test. Only on failure do we sort out what happened, and then - * we use the (unsigned) to error out negative seconds. + * Check if the requested time is prior to now (if so set now) + */ + if (oc.tv_sec < 0) + oc.tv_sec = oc.tv_nsec = 0; + tstojiffie(&oc, clock->res, exp); + + /* + * Check if the requested time is more than the timer code + * can handle (if so we error out but return the value too). */ - if ((unsigned) (tp->tv_sec - now.tv_sec) > (MAX_JIFFY_OFFSET / HZ)) { - if ((unsigned) tp->tv_sec < now.tv_sec) { - tp->tv_sec = now.tv_sec; - tp->tv_nsec = now.tv_nsec; - } else + if (*exp > ((u64)MAX_JIFFY_OFFSET)) /* * This is a considered response, not exactly in * line with the standard (in fact it is silent on - * possible overflows). We assume such a large + * possible overflows). We assume such a large * value is ALMOST always a programming error and * try not to compound it by setting a really dumb * value. */ - return -EINVAL; - } - return 0; + rtn = -EINVAL; + /* + * return the actual jiffies expire time, full 64 bits + */ + *exp += jiffies_64_f; + return rtn; } /* Set a POSIX.1b interval timer. */ @@ -750,6 +761,7 @@ do_timer_settime(struct k_itimer *timr, struct itimerspec *new_setting, struct itimerspec *old_setting) { struct k_clock *clock = &posix_clocks[timr->it_clock]; + u64 expire_64; if (old_setting) do_timer_gettime(timr, old_setting); @@ -788,14 +800,15 @@ do_timer_settime(struct k_itimer *timr, return 0; } - if ((flags & TIMER_ABSTIME) && - (clock->clock_get != do_posix_clock_monotonic_gettime)) - // FIXME: what is this? - ; if (adjust_abs_time(clock, - &new_setting->it_value, flags & TIMER_ABSTIME)) + &new_setting->it_value, flags & TIMER_ABSTIME, + &expire_64)) { return -EINVAL; - tstotimer(new_setting, timr); + } + timr->it_timer.expires = (unsigned long)expire_64; + tstojiffie(&new_setting->it_interval, clock->res, &expire_64); + timr->it_incr = (unsigned long)expire_64; + /* * For some reason the timer does not fire immediately if expires is @@ -964,30 +977,46 @@ static int do_posix_gettime(struct k_clo * Note also that the while loop assures that the sub_jiff_offset * will be less than a jiffie, thus no need to normalize the result. * Well, not really, if called with ints off :( - * - * HELP, this code should make an attempt at resolution beyond the - * jiffie. Trouble is this is "arch" dependent... */ -int do_posix_clock_monotonic_gettime(struct timespec *tp) +static u64 do_posix_clock_monotonic_gettime_parts( + struct timespec *tp, struct timespec *mo) { - long sub_sec; - u64 jiffies_64_f; - -#if (BITS_PER_LONG > 32) - jiffies_64_f = jiffies_64; -#else + u64 jiff; + struct timeval tpv; unsigned int seq; do { seq = read_seqbegin(&xtime_lock); - jiffies_64_f = jiffies_64; + do_gettimeofday(&tpv); + *mo = wall_to_monotonic; + jiff = jiffies_64; - } while (read_seqretry(&xtime_lock, seq)); -#endif - tp->tv_sec = div_long_long_rem(jiffies_64_f, HZ, &sub_sec); - tp->tv_nsec = sub_sec * (NSEC_PER_SEC / HZ); + } while(read_seqretry(&xtime_lock, seq)); + + /* + * Love to get this before it is converted to usec. + * It would save a div AND a mpy. + */ + tp->tv_sec = tpv.tv_sec; + tp->tv_nsec = tpv.tv_usec * NSEC_PER_USEC; + return jiff; +} + +int do_posix_clock_monotonic_gettime(struct timespec *tp) +{ + struct timespec wall_to_mono; + + do_posix_clock_monotonic_gettime_parts(tp, &wall_to_mono); + + tp->tv_sec += wall_to_mono.tv_sec; + tp->tv_nsec += wall_to_mono.tv_nsec; + + if ((tp->tv_nsec - NSEC_PER_SEC) > 0) { + tp->tv_nsec -= NSEC_PER_SEC; + tp->tv_sec++; + } return 0; } @@ -1138,7 +1167,7 @@ do_clock_nanosleep(clockid_t which_clock struct timespec t; struct timer_list new_timer; DECLARE_WAITQUEUE(abs_wqueue, current); - u64 rq_time = 0; + u64 rq_time = (u64)0; s64 left; int abs; struct restart_block *restart_block = @@ -1163,7 +1192,7 @@ do_clock_nanosleep(clockid_t which_clock if (!rq_time) return -EINTR; left = rq_time - get_jiffies_64(); - if (left <= 0LL) + if (left <= (s64)0) return 0; /* Already passed */ } @@ -1174,14 +1203,14 @@ do_clock_nanosleep(clockid_t which_clock do { t = *tsave; if (abs || !rq_time) { - adjust_abs_time(&posix_clocks[which_clock], &t, abs); - tstojiffie(&t, posix_clocks[which_clock].res, &rq_time); + adjust_abs_time(&posix_clocks[which_clock], &t, abs, + &rq_time); } left = rq_time - get_jiffies_64(); - if (left >= MAX_JIFFY_OFFSET) - left = MAX_JIFFY_OFFSET; - if (left < 0) + if (left >= (s64)MAX_JIFFY_OFFSET) + left = (s64)MAX_JIFFY_OFFSET; + if (left < (s64)0) break; new_timer.expires = jiffies + left; @@ -1192,13 +1221,12 @@ do_clock_nanosleep(clockid_t which_clock del_timer_sync(&new_timer); left = rq_time - get_jiffies_64(); - } while (left > 0 && !test_thread_flag(TIF_SIGPENDING)); + } while (left > (s64)0 && !test_thread_flag(TIF_SIGPENDING)); if (abs_wqueue.task_list.next) finish_wait(&nanosleep_abs_wqueue, &abs_wqueue); - if (left > 0) { - unsigned long rmd; + if (left > (s64)0) { /* * Always restart abs calls from scratch to pick up any @@ -1207,9 +1235,10 @@ do_clock_nanosleep(clockid_t which_clock if (abs) return -ERESTARTNOHAND; - tsave->tv_sec = div_long_long_rem(left, HZ, &rmd); - tsave->tv_nsec = rmd * (NSEC_PER_SEC / HZ); - + left *= TICK_NSEC(TICK_USEC); + tsave->tv_sec = div_long_long_rem(left, + NSEC_PER_SEC, + &tsave->tv_nsec); restart_block->fn = clock_nanosleep_restart; restart_block->arg0 = which_clock; restart_block->arg1 = (unsigned long)tsave; --- linux-2.5.68/kernel/sched.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/kernel/sched.c 2003-04-21 02:44:49.000000000 -0700 @@ -1091,7 +1091,7 @@ out: #define IDLE_REBALANCE_TICK (HZ/1000 ?: 1) #define BUSY_REBALANCE_TICK (HZ/5 ?: 1) #define IDLE_NODE_REBALANCE_TICK (IDLE_REBALANCE_TICK * 5) -#define BUSY_NODE_REBALANCE_TICK (BUSY_REBALANCE_TICK * 100) +#define BUSY_NODE_REBALANCE_TICK (BUSY_REBALANCE_TICK * 2) #ifdef CONFIG_NUMA static void balance_node(runqueue_t *this_rq, int idle, int this_cpu) --- linux-2.5.68/kernel/timer.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/kernel/timer.c 2003-04-21 00:31:39.000000000 -0700 @@ -441,8 +441,16 @@ repeat: unsigned long tick_usec = TICK_USEC; /* ACTHZ period (usec) */ unsigned long tick_nsec = TICK_NSEC(TICK_USEC); /* USER_HZ period (nsec) */ -/* The current time */ +/* + * The current time + * wall_to_monotonic is what we need to add to xtime (or xtime corrected + * for sub jiffie times) to get to monotonic time. Monotonic is pegged at zero + * at zero at system boot time, so wall_to_monotonic will be negative, + * however, we will ALWAYS keep the tv_nsec part positive so we can use + * the usual normalization. + */ struct timespec xtime __attribute__ ((aligned (16))); +struct timespec wall_to_monotonic __attribute__ ((aligned (16))); /* Don't completely fail for HZ > 500. */ int tickadj = 500/HZ ? : 1; /* microsecs */ @@ -508,6 +516,7 @@ static void second_overflow(void) case TIME_INS: if (xtime.tv_sec % 86400 == 0) { xtime.tv_sec--; + wall_to_monotonic.tv_sec++; time_state = TIME_OOP; clock_was_set(); printk(KERN_NOTICE "Clock: inserting leap second 23:59:60 UTC\n"); @@ -517,6 +526,7 @@ static void second_overflow(void) case TIME_DEL: if ((xtime.tv_sec + 1) % 86400 == 0) { xtime.tv_sec++; + wall_to_monotonic.tv_sec--; time_state = TIME_WAIT; clock_was_set(); printk(KERN_NOTICE "Clock: deleting leap second 23:59:59 UTC\n"); --- linux-2.5.68/Makefile 2003-04-19 20:45:17.000000000 -0700 +++ 25/Makefile 2003-04-21 00:31:40.000000000 -0700 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 5 SUBLEVEL = 68 -EXTRAVERSION = +EXTRAVERSION = -mm1 # *DOCUMENTATION* # To see a list of typical targets execute "make help" --- linux-2.5.68/mm/filemap.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/mm/filemap.c 2003-04-21 00:31:39.000000000 -0700 @@ -31,12 +31,11 @@ * This is needed for the following functions: * - try_to_release_page * - block_invalidatepage - * - page_has_buffers * - generic_osync_inode * - * FIXME: remove all knowledge of the buffer layer from this file + * FIXME: remove all knowledge of the buffer layer from the core VM */ -#include +#include /* for generic_osync_inode */ #include #include --- linux-2.5.68/mm/oom_kill.c 2003-03-24 15:36:54.000000000 -0800 +++ 25/mm/oom_kill.c 2003-04-21 00:31:39.000000000 -0700 @@ -129,6 +129,8 @@ static struct task_struct * select_bad_p chosen = p; maxpoints = points; } + if (p->flags & PF_SWAPOFF) + return p; } while_each_thread(g, p); return chosen; --- linux-2.5.68/mm/page_alloc.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/mm/page_alloc.c 2003-04-21 02:44:45.000000000 -0700 @@ -536,6 +536,7 @@ __alloc_pages(unsigned int gfp_mask, uns struct page *page; int i; int cold; + int do_retry; if (wait) might_sleep(); @@ -626,10 +627,21 @@ rebalance: } /* - * Don't let big-order allocations loop. Yield for kswapd, try again. + * Don't let big-order allocations loop unless the caller explicitly + * requests that. Wait for some write requests to complete then retry. + * + * In this implementation, __GFP_REPEAT means __GFP_NOFAIL, but that + * may not be true in other implementations. */ - if (order <= 3) { - yield(); + do_retry = 0; + if (!(gfp_mask & __GFP_NORETRY)) { + if ((order <= 3) || (gfp_mask & __GFP_REPEAT)) + do_retry = 1; + if (gfp_mask & __GFP_NOFAIL) + do_retry = 1; + } + if (do_retry) { + blk_congestion_wait(WRITE, HZ/50); goto rebalance; } --- linux-2.5.68/mm/page-writeback.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/mm/page-writeback.c 2003-04-21 00:31:39.000000000 -0700 @@ -462,88 +462,6 @@ int write_one_page(struct page *page, in EXPORT_SYMBOL(write_one_page); /* - * Add a page to the dirty page list. - * - * It is a sad fact of life that this function is called from several places - * deeply under spinlocking. It may not sleep. - * - * If the page has buffers, the uptodate buffers are set dirty, to preserve - * dirty-state coherency between the page and the buffers. It the page does - * not have buffers then when they are later attached they will all be set - * dirty. - * - * The buffers are dirtied before the page is dirtied. There's a small race - * window in which a writepage caller may see the page cleanness but not the - * buffer dirtiness. That's fine. If this code were to set the page dirty - * before the buffers, a concurrent writepage caller could clear the page dirty - * bit, see a bunch of clean buffers and we'd end up with dirty buffers/clean - * page on the dirty page list. - * - * There is also a small window where the page is dirty, and not on dirty_pages. - * Also a possibility that by the time the page is added to dirty_pages, it has - * been set clean. The page lists are somewhat approximate in this regard. - * It's better to have clean pages accidentally attached to dirty_pages than to - * leave dirty pages attached to clean_pages. - * - * We use private_lock to lock against try_to_free_buffers while using the - * page's buffer list. Also use this to protect against clean buffers being - * added to the page after it was set dirty. - * - * FIXME: may need to call ->reservepage here as well. That's rather up to the - * address_space though. - * - * For now, we treat swapper_space specially. It doesn't use the normal - * block a_ops. - * - * FIXME: this should move over to fs/buffer.c - buffer_heads have no business in mm/ - */ -#include -int __set_page_dirty_buffers(struct page *page) -{ - struct address_space * const mapping = page->mapping; - int ret = 0; - - if (mapping == NULL) { - SetPageDirty(page); - goto out; - } - - if (!PageUptodate(page)) - buffer_error(); - - spin_lock(&mapping->private_lock); - if (page_has_buffers(page)) { - struct buffer_head *head = page_buffers(page); - struct buffer_head *bh = head; - - do { - if (buffer_uptodate(bh)) - set_buffer_dirty(bh); - else - buffer_error(); - bh = bh->b_this_page; - } while (bh != head); - } - spin_unlock(&mapping->private_lock); - - if (!TestSetPageDirty(page)) { - spin_lock(&mapping->page_lock); - if (page->mapping) { /* Race with truncate? */ - if (!mapping->backing_dev_info->memory_backed) - inc_page_state(nr_dirty); - list_del(&page->list); - list_add(&page->list, &mapping->dirty_pages); - } - spin_unlock(&mapping->page_lock); - __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); - } - -out: - return ret; -} -EXPORT_SYMBOL(__set_page_dirty_buffers); - -/* * For address_spaces which do not use buffers. Just set the page's dirty bit * and move it to the dirty_pages list. Also perform space reservation if * required. --- linux-2.5.68/mm/swap.c 2003-03-24 15:36:54.000000000 -0800 +++ 25/mm/swap.c 2003-04-21 00:31:39.000000000 -0700 @@ -21,7 +21,7 @@ #include #include #include -#include +#include /* for try_to_release_page() */ #include /* How many pages do we try to swap or page in/out together? */ --- linux-2.5.68/mm/swapfile.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/mm/swapfile.c 2003-04-21 00:31:39.000000000 -0700 @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -300,7 +300,7 @@ int remove_exclusive_swap_page(struct pa struct swap_info_struct * p; swp_entry_t entry; - BUG_ON(page_has_buffers(page)); + BUG_ON(PagePrivate(page)); BUG_ON(!PageLocked(page)); if (!PageSwapCache(page)) @@ -355,7 +355,7 @@ void free_swap_and_cache(swp_entry_t ent if (page) { int one_user; - BUG_ON(page_has_buffers(page)); + BUG_ON(PagePrivate(page)); page_cache_get(page); one_user = (page_count(page) == 2); /* Only cache user (+us), or swap space full? Free it! */ @@ -590,6 +590,11 @@ static int try_to_unuse(unsigned int typ * to swapoff for a while, then reappear - but that is rare. */ while ((i = find_next_to_unuse(si, i))) { + if (signal_pending(current)) { + retval = -EINTR; + break; + } + /* * Get a page for the entry, using the existing swap * cache page if there is one. Otherwise, get a clean @@ -759,8 +764,7 @@ static int try_to_unuse(unsigned int typ /* * Make sure that we aren't completely killing - * interactive performance. Interruptible check on - * signal_pending() would be nice, but changes the spec? + * interactive performance. */ cond_resched(); } @@ -1029,12 +1033,18 @@ asmlinkage long sys_swapoff(const char _ } prev = type; } - err = -EINVAL; if (type < 0) { + err = -EINVAL; + swap_list_unlock(); + goto out_dput; + } + if (vm_enough_memory(p->pages)) + vm_unacct_memory(p->pages); + else { + err = -ENOMEM; swap_list_unlock(); goto out_dput; } - if (prev < 0) { swap_list.head = p->next; } else { @@ -1048,7 +1058,9 @@ asmlinkage long sys_swapoff(const char _ total_swap_pages -= p->pages; p->flags &= ~SWP_WRITEOK; swap_list_unlock(); + current->flags |= PF_SWAPOFF; err = try_to_unuse(type); + current->flags &= ~PF_SWAPOFF; if (err) { /* re-insert swap space back into swap_list */ swap_list_lock(); --- linux-2.5.68/mm/swap_state.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/mm/swap_state.c 2003-04-21 00:31:39.000000000 -0700 @@ -13,7 +13,6 @@ #include #include #include -#include /* block_sync_page() */ #include @@ -187,7 +186,7 @@ void delete_from_swap_cache(struct page BUG_ON(!PageLocked(page)); BUG_ON(PageWriteback(page)); - BUG_ON(page_has_buffers(page)); + BUG_ON(PagePrivate(page)); entry.val = page->index; @@ -236,7 +235,7 @@ int move_from_swap_cache(struct page *pa BUG_ON(!PageLocked(page)); BUG_ON(PageWriteback(page)); - BUG_ON(page_has_buffers(page)); + BUG_ON(PagePrivate(page)); entry.val = page->index; --- linux-2.5.68/mm/vmalloc.c 2003-01-16 18:22:17.000000000 -0800 +++ 25/mm/vmalloc.c 2003-04-21 00:31:39.000000000 -0700 @@ -308,7 +308,7 @@ void __vunmap(void *addr, int deallocate * * @addr: memory base address * - * Free the virtually continguos memory area starting at @addr, as + * Free the virtually contiguous memory area starting at @addr, as * obtained from vmalloc(), vmalloc_32() or __vmalloc(). * * May not be called in interrupt context. @@ -324,7 +324,7 @@ void vfree(void *addr) * * @addr: memory base address * - * Free the virtually continguos memory area starting at @addr, + * Free the virtually contiguous memory area starting at @addr, * which was created from the page array passed to vmap(). * * May not be called in interrupt context. @@ -336,25 +336,28 @@ void vunmap(void *addr) } /** - * vmap - map an array of pages into virtually continguos space + * vmap - map an array of pages into virtually contiguous space * * @pages: array of page pointers * @count: number of pages to map + * @flags: vm_area->flags + * @prot: page protection for the mapping * - * Maps @count pages from @pages into continguos kernel virtual + * Maps @count pages from @pages into contiguous kernel virtual * space. */ -void *vmap(struct page **pages, unsigned int count) +void *vmap(struct page **pages, unsigned int count, + unsigned long flags, pgprot_t prot) { struct vm_struct *area; if (count > num_physpages) return NULL; - area = get_vm_area((count << PAGE_SHIFT), VM_MAP); + area = get_vm_area((count << PAGE_SHIFT), flags); if (!area) return NULL; - if (map_vm_area(area, PAGE_KERNEL, &pages)) { + if (map_vm_area(area, prot, &pages)) { vunmap(area->addr); return NULL; } @@ -363,14 +366,14 @@ void *vmap(struct page **pages, unsigned } /** - * __vmalloc - allocate virtually continguos memory + * __vmalloc - allocate virtually contiguous memory * * @size: allocation size * @gfp_mask: flags for the page level allocator * @prot: protection mask for the allocated pages * * Allocate enough pages to cover @size from the page level - * allocator with @gfp_mask flags. Map them into continguos + * allocator with @gfp_mask flags. Map them into contiguous * kernel virtual space, using a pagetable protection of @prot. */ void *__vmalloc(unsigned long size, int gfp_mask, pgprot_t prot) @@ -418,12 +421,12 @@ fail: } /** - * vmalloc - allocate virtually continguos memory + * vmalloc - allocate virtually contiguous memory * * @size: allocation size * * Allocate enough pages to cover @size from the page level - * allocator and map them into continguos kernel virtual space. + * allocator and map them into contiguous kernel virtual space. * * For tight cotrol over page level allocator and protection flags * use __vmalloc() instead. @@ -434,12 +437,12 @@ void *vmalloc(unsigned long size) } /** - * vmalloc_32 - allocate virtually continguos memory (32bit addressable) + * vmalloc_32 - allocate virtually contiguous memory (32bit addressable) * * @size: allocation size * * Allocate enough 32bit PA addressable pages to cover @size from the - * page level allocator and map them into continguos kernel virtual space. + * page level allocator and map them into contiguous kernel virtual space. */ void *vmalloc_32(unsigned long size) { --- linux-2.5.68/mm/vmscan.c 2003-04-19 20:45:20.000000000 -0700 +++ 25/mm/vmscan.c 2003-04-21 00:31:39.000000000 -0700 @@ -22,7 +22,8 @@ #include #include #include -#include /* for try_to_release_page() */ +#include /* for try_to_release_page(), + buffer_heads_over_limit */ #include #include #include @@ -134,11 +135,9 @@ void remove_shrinker(struct shrinker *sh * If the vm encounted mapped pages on the LRU it increase the pressure on * slab to avoid swapping. * - * FIXME: do not do for zone highmem - * * We do weird things to avoid (scanned*seeks*entries) overflowing 32 bits. */ -static int shrink_slab(long scanned, unsigned int gfp_mask) +static int shrink_slab(long scanned, unsigned int gfp_mask) { struct shrinker *shrinker; long pages; @@ -804,8 +803,7 @@ shrink_caches(struct zone *classzone, in * excessive rotation of the inactive list, which is _supposed_ to be an LRU, * yes? */ -int -try_to_free_pages(struct zone *classzone, +int try_to_free_pages(struct zone *classzone, unsigned int gfp_mask, unsigned int order) { int priority; @@ -835,9 +833,10 @@ try_to_free_pages(struct zone *classzone /* Take a nap, wait for some writeback to complete */ blk_congestion_wait(WRITE, HZ/10); - shrink_slab(total_scanned, gfp_mask); + if (classzone - classzone->zone_pgdat->node_zones < ZONE_HIGHMEM) + shrink_slab(total_scanned, gfp_mask); } - if (gfp_mask & __GFP_FS) + if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY)) out_of_memory(); return 0; } @@ -895,7 +894,8 @@ static int balance_pgdat(pg_data_t *pgda max_scan = SWAP_CLUSTER_MAX; to_free -= shrink_zone(zone, max_scan, GFP_KERNEL, to_reclaim, &nr_mapped, ps, priority); - shrink_slab(max_scan + nr_mapped, GFP_KERNEL); + if (i < ZONE_HIGHMEM) + shrink_slab(max_scan + nr_mapped, GFP_KERNEL); if (zone->all_unreclaimable) continue; if (zone->pages_scanned > zone->present_pages * 2) --- linux-2.5.68/net/ax25/Kconfig 2003-02-10 12:24:16.000000000 -0800 +++ 25/net/ax25/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -13,7 +13,7 @@ config HAMRADIO help If you want to connect your Linux box to an amateur radio, answer Y here. You want to read and - the AX25-HOWTO, available from . + the AX25-HOWTO, available from . Note that the answer to this question won't directly affect the kernel: saying N will just cause the configurator to skip all @@ -42,7 +42,7 @@ config AX25 Information about where to get supporting software for Linux amateur radio as well as information about how to configure an AX.25 port is contained in the AX25-HOWTO, available from - . You might also want to + . You might also want to check out the file in the kernel source. More information about digital amateur radio in general is on the WWW at @@ -76,7 +76,7 @@ config NETROM A comprehensive listing of all the software for Linux amateur radio users as well as information about how to configure an AX.25 port is contained in the AX25-HOWTO, available from - . You also might want to + . You also might want to check out the file . More information about digital amateur radio in general is on the WWW at . @@ -97,7 +97,7 @@ config ROSE A comprehensive listing of all the software for Linux amateur radio users as well as information about how to configure an AX.25 port is contained in the AX25-HOWTO, available from - . You also might want to + . You also might want to check out the file . More information about digital amateur radio in general is on the WWW at . --- linux-2.5.68/net/ipv6/xfrm6_input.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/net/ipv6/xfrm6_input.c 2003-04-21 00:31:39.000000000 -0700 @@ -136,7 +136,7 @@ int xfrm6_rcv(struct sk_buff **pskb, uns unsigned char *tmp_hdr = NULL; int hdr_len = 0; u16 nh_offset = 0; - u8 nexthdr = 0; + int nexthdr = 0; nh_offset = ((unsigned char*)&skb->nh.ipv6h->nexthdr) - skb->nh.raw; hdr_len = sizeof(struct ipv6hdr); --- linux-2.5.68/net/ipx/Kconfig 2003-01-16 18:22:06.000000000 -0800 +++ 25/net/ipx/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -12,7 +12,7 @@ config IPX_INTERN same address). The way this is done is to create a virtual internal "network" inside your box and to assign an IPX address to this network. Say Y here if you want to do this; read the IPX-HOWTO at - for details. + for details. The full internal IPX network enables you to allocate sockets on different virtual nodes of the internal network. This is done by --- linux-2.5.68/net/irda/Kconfig 2003-02-10 12:24:16.000000000 -0800 +++ 25/net/irda/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -16,7 +16,7 @@ config IRDA some user-space utilities like irattach. For more information, see the file . You also want to read the IR-HOWTO, available at - . + . If you want to exchange bits of data (vCal, vCard) with a PDA, you will need to install some OBEX application, such as OpenObex : --- linux-2.5.68/net/Kconfig 2003-04-07 13:06:55.000000000 -0700 +++ 25/net/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -18,7 +18,7 @@ config NET For a general introduction to Linux networking, it is highly recommended to read the NET-HOWTO, available from - . + . menu "Networking options" depends on NET @@ -162,7 +162,7 @@ config INET For an excellent introduction to Linux networking, please read the NET-3-HOWTO, available from - . + . This option is also necessary if you want to use the full power of term (term is a program which gives you almost full Internet @@ -294,7 +294,7 @@ config IPX Novell client ncpfs (available from ) or from within the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, - available from ). In order + available from ). In order to do the former, you'll also have to say Y to "NCP file system support", below. @@ -307,7 +307,7 @@ config IPX or mars_nwe from . For more information, read the IPX-HOWTO available from - . + . General information about how to connect Linux, Windows machines and Macs is on the WWW at . @@ -339,7 +339,7 @@ config ATALK General information about how to connect Linux, Windows machines and Macs is on the WWW at . The NET-3-HOWTO, available from - , contains valuable + , contains valuable information as well. This driver is also available as a module ( = code which can be --- linux-2.5.68/net/sched/cls_api.c 2003-01-16 18:21:45.000000000 -0800 +++ 25/net/sched/cls_api.c 2003-04-21 00:31:39.000000000 -0700 @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -223,8 +224,9 @@ static int tc_ctl_tfilter(struct sk_buff tp->q = q; tp->classify = tp_ops->classify; tp->classid = parent; - err = tp_ops->init(tp); - if (err) { + err = -EBUSY; + if (!try_module_get(tp_ops->owner) || + (err = tp_ops->init(tp)) != 0) { kfree(tp); goto errout; } @@ -248,6 +250,7 @@ static int tc_ctl_tfilter(struct sk_buff write_unlock(&qdisc_tree_lock); tp->ops->destroy(tp); + module_put(tp->ops->owner); kfree(tp); err = 0; goto errout; --- linux-2.5.68/net/sched/cls_fw.c 2003-01-16 18:22:02.000000000 -0800 +++ 25/net/sched/cls_fw.c 2003-04-21 00:31:39.000000000 -0700 @@ -117,7 +117,6 @@ static void fw_put(struct tcf_proto *tp, static int fw_init(struct tcf_proto *tp) { - MOD_INC_USE_COUNT; return 0; } @@ -127,10 +126,8 @@ static void fw_destroy(struct tcf_proto struct fw_filter *f; int h; - if (head == NULL) { - MOD_DEC_USE_COUNT; + if (head == NULL) return; - } for (h=0; h<256; h++) { while ((f=head->ht[h]) != NULL) { @@ -146,7 +143,6 @@ static void fw_destroy(struct tcf_proto } } kfree(head); - MOD_DEC_USE_COUNT; } static int fw_delete(struct tcf_proto *tp, unsigned long arg) @@ -351,18 +347,18 @@ rtattr_failure: } struct tcf_proto_ops cls_fw_ops = { - NULL, - "fw", - fw_classify, - fw_init, - fw_destroy, - - fw_get, - fw_put, - fw_change, - fw_delete, - fw_walk, - fw_dump + .next = NULL, + .kind = "fw", + .classify = fw_classify, + .init = fw_init, + .destroy = fw_destroy, + .get = fw_get, + .put = fw_put, + .change = fw_change, + .delete = fw_delete, + .walk = fw_walk, + .dump = fw_dump, + .owner = THIS_MODULE, }; #ifdef MODULE --- linux-2.5.68/net/sched/cls_route.c 2003-01-16 18:21:49.000000000 -0800 +++ 25/net/sched/cls_route.c 2003-04-21 00:31:39.000000000 -0700 @@ -272,7 +272,6 @@ static void route4_put(struct tcf_proto static int route4_init(struct tcf_proto *tp) { - MOD_INC_USE_COUNT; return 0; } @@ -281,10 +280,8 @@ static void route4_destroy(struct tcf_pr struct route4_head *head = xchg(&tp->root, NULL); int h1, h2; - if (head == NULL) { - MOD_DEC_USE_COUNT; + if (head == NULL) return; - } for (h1=0; h1<=256; h1++) { struct route4_bucket *b; @@ -309,7 +306,6 @@ static void route4_destroy(struct tcf_pr } } kfree(head); - MOD_DEC_USE_COUNT; } static int route4_delete(struct tcf_proto *tp, unsigned long arg) @@ -607,18 +603,18 @@ rtattr_failure: } struct tcf_proto_ops cls_route4_ops = { - NULL, - "route", - route4_classify, - route4_init, - route4_destroy, - - route4_get, - route4_put, - route4_change, - route4_delete, - route4_walk, - route4_dump + .next = NULL, + .kind = "route", + .classify = route4_classify, + .init = route4_init, + .destroy = route4_destroy, + .get = route4_get, + .put = route4_put, + .change = route4_change, + .delete = route4_delete, + .walk = route4_walk, + .dump = route4_dump, + .owner = THIS_MODULE, }; #ifdef MODULE --- linux-2.5.68/net/sched/cls_rsvp.h 2003-04-19 20:45:21.000000000 -0700 +++ 25/net/sched/cls_rsvp.h 2003-04-21 00:31:39.000000000 -0700 @@ -242,14 +242,12 @@ static int rsvp_init(struct tcf_proto *t { struct rsvp_head *data; - MOD_INC_USE_COUNT; data = kmalloc(sizeof(struct rsvp_head), GFP_KERNEL); if (data) { memset(data, 0, sizeof(struct rsvp_head)); tp->root = data; return 0; } - MOD_DEC_USE_COUNT; return -ENOBUFS; } @@ -289,7 +287,6 @@ static void rsvp_destroy(struct tcf_prot } } kfree(data); - MOD_DEC_USE_COUNT; } static int rsvp_delete(struct tcf_proto *tp, unsigned long arg) @@ -668,18 +665,18 @@ rtattr_failure: } struct tcf_proto_ops RSVP_OPS = { - NULL, - RSVP_ID, - rsvp_classify, - rsvp_init, - rsvp_destroy, - - rsvp_get, - rsvp_put, - rsvp_change, - rsvp_delete, - rsvp_walk, - rsvp_dump + .next = NULL, + .kind = RSVP_ID, + .classify = rsvp_classify, + .init = rsvp_init, + .destroy = rsvp_destroy, + .get = rsvp_get, + .put = rsvp_put, + .change = rsvp_change, + .delete = rsvp_delete, + .walk = rsvp_walk, + .dump = rsvp_dump, + .owner = THIS_MODULE, }; #ifdef MODULE --- linux-2.5.68/net/sched/cls_tcindex.c 2003-01-16 18:22:05.000000000 -0800 +++ 25/net/sched/cls_tcindex.c 2003-04-21 00:31:39.000000000 -0700 @@ -144,12 +144,10 @@ static int tcindex_init(struct tcf_proto struct tcindex_data *p; DPRINTK("tcindex_init(tp %p)\n",tp); - MOD_INC_USE_COUNT; p = kmalloc(sizeof(struct tcindex_data),GFP_KERNEL); - if (!p) { - MOD_DEC_USE_COUNT; + if (!p) return -ENOMEM; - } + tp->root = p; p->perfect = NULL; p->h = NULL; @@ -417,7 +415,6 @@ static void tcindex_destroy(struct tcf_p kfree(p->h); kfree(p); tp->root = NULL; - MOD_DEC_USE_COUNT; } @@ -480,18 +477,18 @@ rtattr_failure: } struct tcf_proto_ops cls_tcindex_ops = { - NULL, - "tcindex", - tcindex_classify, - tcindex_init, - tcindex_destroy, - - tcindex_get, - tcindex_put, - tcindex_change, - tcindex_delete, - tcindex_walk, - tcindex_dump + .next = NULL, + .kind = "tcindex", + .classify = tcindex_classify, + .init = tcindex_init, + .destroy = tcindex_destroy, + .get = tcindex_get, + .put = tcindex_put, + .change = tcindex_change, + .delete = tcindex_delete, + .walk = tcindex_walk, + .dump = tcindex_dump, + .owner = THIS_MODULE, }; --- linux-2.5.68/net/sched/cls_u32.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/net/sched/cls_u32.c 2003-04-21 00:31:39.000000000 -0700 @@ -257,17 +257,14 @@ static int u32_init(struct tcf_proto *tp struct tc_u_hnode *root_ht; struct tc_u_common *tp_c; - MOD_INC_USE_COUNT; - for (tp_c = u32_list; tp_c; tp_c = tp_c->next) if (tp_c->q == tp->q) break; root_ht = kmalloc(sizeof(*root_ht), GFP_KERNEL); - if (root_ht == NULL) { - MOD_DEC_USE_COUNT; + if (root_ht == NULL) return -ENOBUFS; - } + memset(root_ht, 0, sizeof(*root_ht)); root_ht->divisor = 0; root_ht->refcnt++; @@ -277,7 +274,6 @@ static int u32_init(struct tcf_proto *tp tp_c = kmalloc(sizeof(*tp_c), GFP_KERNEL); if (tp_c == NULL) { kfree(root_ht); - MOD_DEC_USE_COUNT; return -ENOBUFS; } memset(tp_c, 0, sizeof(*tp_c)); @@ -402,7 +398,6 @@ static void u32_destroy(struct tcf_proto kfree(tp_c); } - MOD_DEC_USE_COUNT; tp->data = NULL; } @@ -690,18 +685,18 @@ rtattr_failure: } struct tcf_proto_ops cls_u32_ops = { - NULL, - "u32", - u32_classify, - u32_init, - u32_destroy, - - u32_get, - u32_put, - u32_change, - u32_delete, - u32_walk, - u32_dump + .next = NULL, + .kind = "u32", + .classify = u32_classify, + .init = u32_init, + .destroy = u32_destroy, + .get = u32_get, + .put = u32_put, + .change = u32_change, + .delete = u32_delete, + .walk = u32_walk, + .dump = u32_dump, + .owner = THIS_MODULE, }; #ifdef MODULE --- linux-2.5.68/net/sched/sch_api.c 2003-01-16 18:22:05.000000000 -0800 +++ 25/net/sched/sch_api.c 2003-04-21 00:31:39.000000000 -0700 @@ -16,6 +16,7 @@ */ #include +#include #include #include #include @@ -447,6 +448,10 @@ qdisc_create(struct net_device *dev, u32 else sch->handle = handle; + err = -EBUSY; + if (!try_module_get(ops->owner)) + goto err_out; + if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) { write_lock(&qdisc_tree_lock); sch->next = dev->qdisc_list; @@ -458,6 +463,7 @@ qdisc_create(struct net_device *dev, u32 #endif return sch; } + module_put(ops->owner); err_out: *errp = err; --- linux-2.5.68/net/sched/sch_atm.c 2003-03-24 15:36:54.000000000 -0800 +++ 25/net/sched/sch_atm.c 2003-04-21 00:31:39.000000000 -0700 @@ -575,7 +575,6 @@ static int atm_tc_init(struct Qdisc *sch p->link.ref = 1; p->link.next = NULL; tasklet_init(&p->task,sch_atm_dequeue,(unsigned long) sch); - MOD_INC_USE_COUNT; return 0; } @@ -612,7 +611,6 @@ static void atm_tc_destroy(struct Qdisc } } tasklet_kill(&p->task); - MOD_DEC_USE_COUNT; } @@ -663,41 +661,35 @@ static int atm_tc_dump(struct Qdisc *sch return 0; } -static struct Qdisc_class_ops atm_class_ops = -{ - .graft = atm_tc_graft, - .leaf = atm_tc_leaf, - .get = atm_tc_get, - .put = atm_tc_put, - .change = atm_tc_change, - .delete = atm_tc_delete, - .walk = atm_tc_walk, - - .tcf_chain = atm_tc_find_tcf, - .bind_tcf = atm_tc_bind_filter, - .unbind_tcf = atm_tc_put, - - .dump = atm_tc_dump_class, +static struct Qdisc_class_ops atm_class_ops = { + .graft = atm_tc_graft, + .leaf = atm_tc_leaf, + .get = atm_tc_get, + .put = atm_tc_put, + .change = atm_tc_change, + .delete = atm_tc_delete, + .walk = atm_tc_walk, + .tcf_chain = atm_tc_find_tcf, + .bind_tcf = atm_tc_bind_filter, + .unbind_tcf = atm_tc_put, + .dump = atm_tc_dump_class, }; -struct Qdisc_ops atm_qdisc_ops = -{ - .next = NULL, - .cl_ops = &atm_class_ops, - .id = "atm", - .priv_size = sizeof(struct atm_qdisc_data), - - .enqueue = atm_tc_enqueue, - .dequeue = atm_tc_dequeue, - .requeue = atm_tc_requeue, - .drop = atm_tc_drop, - - .init = atm_tc_init, - .reset = atm_tc_reset, - .destroy = atm_tc_destroy, - .change = NULL, - - .dump = atm_tc_dump +struct Qdisc_ops atm_qdisc_ops = { + .next = NULL, + .cl_ops = &atm_class_ops, + .id = "atm", + .priv_size = sizeof(struct atm_qdisc_data), + .enqueue = atm_tc_enqueue, + .dequeue = atm_tc_dequeue, + .requeue = atm_tc_requeue, + .drop = atm_tc_drop, + .init = atm_tc_init, + .reset = atm_tc_reset, + .destroy = atm_tc_destroy, + .change = NULL, + .dump = atm_tc_dump, + .owner = THIS_MODULE, }; --- linux-2.5.68/net/sched/sch_cbq.c 2003-02-17 16:21:15.000000000 -0800 +++ 25/net/sched/sch_cbq.c 2003-04-21 00:31:39.000000000 -0700 @@ -1411,11 +1411,8 @@ static int cbq_init(struct Qdisc *sch, s r = RTA_DATA(tb[TCA_CBQ_RATE-1]); - MOD_INC_USE_COUNT; - if ((q->link.R_tab = qdisc_get_rtab(r, tb[TCA_CBQ_RTAB-1])) == NULL) { - MOD_DEC_USE_COUNT; + if ((q->link.R_tab = qdisc_get_rtab(r, tb[TCA_CBQ_RTAB-1])) == NULL) return -EINVAL; - } q->link.refcnt = 1; q->link.sibling = &q->link; @@ -1749,7 +1746,6 @@ cbq_destroy(struct Qdisc* sch) } qdisc_put_rtab(q->link.R_tab); - MOD_DEC_USE_COUNT; } static void cbq_put(struct Qdisc *sch, unsigned long arg) @@ -2064,41 +2060,35 @@ static void cbq_walk(struct Qdisc *sch, } } -static struct Qdisc_class_ops cbq_class_ops = -{ - .graft = cbq_graft, - .leaf = cbq_leaf, - .get = cbq_get, - .put = cbq_put, - .change = cbq_change_class, - .delete = cbq_delete, - .walk = cbq_walk, - - .tcf_chain = cbq_find_tcf, - .bind_tcf = cbq_bind_filter, - .unbind_tcf = cbq_unbind_filter, - - .dump = cbq_dump_class, +static struct Qdisc_class_ops cbq_class_ops = { + .graft = cbq_graft, + .leaf = cbq_leaf, + .get = cbq_get, + .put = cbq_put, + .change = cbq_change_class, + .delete = cbq_delete, + .walk = cbq_walk, + .tcf_chain = cbq_find_tcf, + .bind_tcf = cbq_bind_filter, + .unbind_tcf = cbq_unbind_filter, + .dump = cbq_dump_class, }; -struct Qdisc_ops cbq_qdisc_ops = -{ - .next = NULL, - .cl_ops = &cbq_class_ops, - .id = "cbq", - .priv_size = sizeof(struct cbq_sched_data), - - .enqueue = cbq_enqueue, - .dequeue = cbq_dequeue, - .requeue = cbq_requeue, - .drop = cbq_drop, - - .init = cbq_init, - .reset = cbq_reset, - .destroy = cbq_destroy, - .change = NULL, - - .dump = cbq_dump, +struct Qdisc_ops cbq_qdisc_ops = { + .next = NULL, + .cl_ops = &cbq_class_ops, + .id = "cbq", + .priv_size = sizeof(struct cbq_sched_data), + .enqueue = cbq_enqueue, + .dequeue = cbq_dequeue, + .requeue = cbq_requeue, + .drop = cbq_drop, + .init = cbq_init, + .reset = cbq_reset, + .destroy = cbq_destroy, + .change = NULL, + .dump = cbq_dump, + .owner = THIS_MODULE, }; #ifdef MODULE --- linux-2.5.68/net/sched/sch_csz.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/net/sched/sch_csz.c 2003-04-21 00:31:39.000000000 -0700 @@ -756,8 +756,6 @@ csz_destroy(struct Qdisc* sch) q->filter_list = tp->next; tp->ops->destroy(tp); } - - MOD_DEC_USE_COUNT; } static int csz_init(struct Qdisc *sch, struct rtattr *opt) @@ -799,7 +797,6 @@ static int csz_init(struct Qdisc *sch, s q->wd_timer.data = (unsigned long)sch; q->wd_timer.function = csz_watchdog; #endif - MOD_INC_USE_COUNT; return 0; } @@ -1018,42 +1015,35 @@ static struct tcf_proto ** csz_find_tcf( return &q->filter_list; } -struct Qdisc_class_ops csz_class_ops = -{ - .graft = csz_graft, - .leaf = csz_leaf, - - .get = csz_get, - .put = csz_put, - .change = csz_change, - .delete = csz_delete, - .walk = csz_walk, - - .tcf_chain = csz_find_tcf, - .bind_tcf = csz_bind, - .unbind_tcf = csz_put, - - .dump = csz_dump_class, +struct Qdisc_class_ops csz_class_ops = { + .graft = csz_graft, + .leaf = csz_leaf, + .get = csz_get, + .put = csz_put, + .change = csz_change, + .delete = csz_delete, + .walk = csz_walk, + .tcf_chain = csz_find_tcf, + .bind_tcf = csz_bind, + .unbind_tcf = csz_put, + .dump = csz_dump_class, }; -struct Qdisc_ops csz_qdisc_ops = -{ - .next = NULL, - .cl_ops = &csz_class_ops, - .id = "csz", - .priv_size = sizeof(struct csz_sched_data), - - .enqueue = csz_enqueue, - .dequeue = csz_dequeue, - .requeue = NULL, - .drop = NULL, - - .init = csz_init, - .reset = csz_reset, - .destroy = csz_destroy, - .change = NULL, - - .dump = csz_dump, +struct Qdisc_ops csz_qdisc_ops = { + .next = NULL, + .cl_ops = &csz_class_ops, + .id = "csz", + .priv_size = sizeof(struct csz_sched_data), + .enqueue = csz_enqueue, + .dequeue = csz_dequeue, + .requeue = NULL, + .drop = NULL, + .init = csz_init, + .reset = csz_reset, + .destroy = csz_destroy, + .change = NULL, + .dump = csz_dump, + .owner = THIS_MODULE, }; --- linux-2.5.68/net/sched/sch_dsmark.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/net/sched/sch_dsmark.c 2003-04-21 00:31:39.000000000 -0700 @@ -353,7 +353,6 @@ int dsmark_init(struct Qdisc *sch,struct if (!(p->q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops))) p->q = &noop_qdisc; DPRINTK("dsmark_init: qdisc %p\n",&p->q); - MOD_INC_USE_COUNT; return 0; } @@ -382,7 +381,6 @@ static void dsmark_destroy(struct Qdisc qdisc_destroy(p->q); p->q = &noop_qdisc; kfree(p->mask); - MOD_DEC_USE_COUNT; } @@ -433,41 +431,35 @@ rtattr_failure: return -1; } -static struct Qdisc_class_ops dsmark_class_ops = -{ - .graft = dsmark_graft, - .leaf = dsmark_leaf, - .get = dsmark_get, - .put = dsmark_put, - .change = dsmark_change, - .delete = dsmark_delete, - .walk = dsmark_walk, - - .tcf_chain = dsmark_find_tcf, - .bind_tcf = dsmark_bind_filter, - .unbind_tcf = dsmark_put, - - .dump = dsmark_dump_class, +static struct Qdisc_class_ops dsmark_class_ops = { + .graft = dsmark_graft, + .leaf = dsmark_leaf, + .get = dsmark_get, + .put = dsmark_put, + .change = dsmark_change, + .delete = dsmark_delete, + .walk = dsmark_walk, + .tcf_chain = dsmark_find_tcf, + .bind_tcf = dsmark_bind_filter, + .unbind_tcf = dsmark_put, + .dump = dsmark_dump_class, }; -struct Qdisc_ops dsmark_qdisc_ops = -{ - .next = NULL, - .cl_ops = &dsmark_class_ops, - .id = "dsmark", - .priv_size = sizeof(struct dsmark_qdisc_data), - - .enqueue = dsmark_enqueue, - .dequeue = dsmark_dequeue, - .requeue = dsmark_requeue, - .drop = dsmark_drop, - - .init = dsmark_init, - .reset = dsmark_reset, - .destroy = dsmark_destroy, - .change = NULL, - - .dump = dsmark_dump +struct Qdisc_ops dsmark_qdisc_ops = { + .next = NULL, + .cl_ops = &dsmark_class_ops, + .id = "dsmark", + .priv_size = sizeof(struct dsmark_qdisc_data), + .enqueue = dsmark_enqueue, + .dequeue = dsmark_dequeue, + .requeue = dsmark_requeue, + .drop = dsmark_drop, + .init = dsmark_init, + .reset = dsmark_reset, + .destroy = dsmark_destroy, + .change = NULL, + .dump = dsmark_dump, + .owner = THIS_MODULE, }; #ifdef MODULE --- linux-2.5.68/net/sched/sch_fifo.c 2003-01-16 18:21:44.000000000 -0800 +++ 25/net/sched/sch_fifo.c 2003-04-21 00:31:39.000000000 -0700 @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -168,42 +169,36 @@ rtattr_failure: return -1; } -struct Qdisc_ops pfifo_qdisc_ops = -{ - .next = NULL, - .cl_ops = NULL, - .id = "pfifo", - .priv_size = sizeof(struct fifo_sched_data), - - .enqueue = pfifo_enqueue, - .dequeue = pfifo_dequeue, - .requeue = pfifo_requeue, - .drop = fifo_drop, - - .init = fifo_init, - .reset = fifo_reset, - .destroy = NULL, - .change = fifo_init, - - .dump = fifo_dump, +struct Qdisc_ops pfifo_qdisc_ops = { + .next = NULL, + .cl_ops = NULL, + .id = "pfifo", + .priv_size = sizeof(struct fifo_sched_data), + .enqueue = pfifo_enqueue, + .dequeue = pfifo_dequeue, + .requeue = pfifo_requeue, + .drop = fifo_drop, + .init = fifo_init, + .reset = fifo_reset, + .destroy = NULL, + .change = fifo_init, + .dump = fifo_dump, + .owner = THIS_MODULE, }; -struct Qdisc_ops bfifo_qdisc_ops = -{ - .next = NULL, - .cl_ops = NULL, - .id = "bfifo", - .priv_size = sizeof(struct fifo_sched_data), - - .enqueue = bfifo_enqueue, - .dequeue = bfifo_dequeue, - .requeue = bfifo_requeue, - .drop = fifo_drop, - - .init = fifo_init, - .reset = fifo_reset, - .destroy = NULL, - .change = fifo_init, - - .dump = fifo_dump, +struct Qdisc_ops bfifo_qdisc_ops = { + .next = NULL, + .cl_ops = NULL, + .id = "bfifo", + .priv_size = sizeof(struct fifo_sched_data), + .enqueue = bfifo_enqueue, + .dequeue = bfifo_dequeue, + .requeue = bfifo_requeue, + .drop = fifo_drop, + .init = fifo_init, + .reset = fifo_reset, + .destroy = NULL, + .change = fifo_init, + .dump = fifo_dump, + .owner = THIS_MODULE, }; --- linux-2.5.68/net/sched/sch_generic.c 2003-01-16 18:21:36.000000000 -0800 +++ 25/net/sched/sch_generic.c 2003-04-21 00:31:39.000000000 -0700 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -222,45 +223,40 @@ noop_requeue(struct sk_buff *skb, struct return NET_XMIT_CN; } -struct Qdisc_ops noop_qdisc_ops = -{ - .next = NULL, - .cl_ops = NULL, - .id = "noop", - .priv_size = 0, - - .enqueue = noop_enqueue, - .dequeue = noop_dequeue, - .requeue = noop_requeue, +struct Qdisc_ops noop_qdisc_ops = { + .next = NULL, + .cl_ops = NULL, + .id = "noop", + .priv_size = 0, + .enqueue = noop_enqueue, + .dequeue = noop_dequeue, + .requeue = noop_requeue, + .owner = THIS_MODULE, }; -struct Qdisc noop_qdisc = -{ - .enqueue = noop_enqueue, - .dequeue = noop_dequeue, - .flags = TCQ_F_BUILTIN, - .ops = &noop_qdisc_ops, +struct Qdisc noop_qdisc = { + .enqueue = noop_enqueue, + .dequeue = noop_dequeue, + .flags = TCQ_F_BUILTIN, + .ops = &noop_qdisc_ops, }; - -struct Qdisc_ops noqueue_qdisc_ops = -{ - .next = NULL, - .cl_ops = NULL, - .id = "noqueue", - .priv_size = 0, - - .enqueue = noop_enqueue, - .dequeue = noop_dequeue, - .requeue = noop_requeue, +struct Qdisc_ops noqueue_qdisc_ops = { + .next = NULL, + .cl_ops = NULL, + .id = "noqueue", + .priv_size = 0, + .enqueue = noop_enqueue, + .dequeue = noop_dequeue, + .requeue = noop_requeue, + .owner = THIS_MODULE, }; -struct Qdisc noqueue_qdisc = -{ - .enqueue = NULL, - .dequeue = noop_dequeue, - .flags = TCQ_F_BUILTIN, - .ops = &noqueue_qdisc_ops, +struct Qdisc noqueue_qdisc = { + .enqueue = NULL, + .dequeue = noop_dequeue, + .flags = TCQ_F_BUILTIN, + .ops = &noqueue_qdisc_ops, }; @@ -343,19 +339,17 @@ static int pfifo_fast_init(struct Qdisc return 0; } -static struct Qdisc_ops pfifo_fast_ops = -{ - .next = NULL, - .cl_ops = NULL, - .id = "pfifo_fast", - .priv_size = 3 * sizeof(struct sk_buff_head), - - .enqueue = pfifo_fast_enqueue, - .dequeue = pfifo_fast_dequeue, - .requeue = pfifo_fast_requeue, - - .init = pfifo_fast_init, - .reset = pfifo_fast_reset, +static struct Qdisc_ops pfifo_fast_ops = { + .next = NULL, + .cl_ops = NULL, + .id = "pfifo_fast", + .priv_size = 3 * sizeof(struct sk_buff_head), + .enqueue = pfifo_fast_enqueue, + .dequeue = pfifo_fast_dequeue, + .requeue = pfifo_fast_requeue, + .init = pfifo_fast_init, + .reset = pfifo_fast_reset, + .owner = THIS_MODULE, }; struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops) @@ -422,6 +416,7 @@ void qdisc_destroy(struct Qdisc *qdisc) ops->reset(qdisc); if (ops->destroy) ops->destroy(qdisc); + module_put(ops->owner); if (!(qdisc->flags&TCQ_F_BUILTIN)) kfree(qdisc); } --- linux-2.5.68/net/sched/sch_gred.c 2003-03-04 20:02:40.000000000 -0800 +++ 25/net/sched/sch_gred.c 2003-04-21 00:31:39.000000000 -0700 @@ -348,7 +348,6 @@ static int gred_change(struct Qdisc *sch table->grio=sopt->grio; table->initd=0; /* probably need to clear all the table DP entries as well */ - MOD_INC_USE_COUNT; return 0; } @@ -490,7 +489,6 @@ static int gred_init(struct Qdisc *sch, table->def=sopt->def_DP; table->grio=sopt->grio; table->initd=0; - MOD_INC_USE_COUNT; return 0; } @@ -602,27 +600,23 @@ static void gred_destroy(struct Qdisc *s if (table->tab[i]) kfree(table->tab[i]); } - MOD_DEC_USE_COUNT; } -struct Qdisc_ops gred_qdisc_ops = -{ - .next = NULL, - .cl_ops = NULL, - .id = "gred", - .priv_size = sizeof(struct gred_sched), - - .enqueue = gred_enqueue, - .dequeue = gred_dequeue, - .requeue = gred_requeue, - .drop = gred_drop, - - .init = gred_init, - .reset = gred_reset, - .destroy = gred_destroy, - .change = gred_change, - - .dump = gred_dump, +struct Qdisc_ops gred_qdisc_ops = { + .next = NULL, + .cl_ops = NULL, + .id = "gred", + .priv_size = sizeof(struct gred_sched), + .enqueue = gred_enqueue, + .dequeue = gred_dequeue, + .requeue = gred_requeue, + .drop = gred_drop, + .init = gred_init, + .reset = gred_reset, + .destroy = gred_destroy, + .change = gred_change, + .dump = gred_dump, + .owner = THIS_MODULE, }; --- linux-2.5.68/net/sched/sch_htb.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/net/sched/sch_htb.c 2003-04-21 00:31:39.000000000 -0700 @@ -1167,7 +1167,6 @@ static int htb_init(struct Qdisc *sch, s q->rate2quantum = 1; q->defcls = gopt->defcls; - MOD_INC_USE_COUNT; return 0; } @@ -1352,7 +1351,6 @@ static void htb_destroy(struct Qdisc* sc htb_destroy_filters(&q->filter_list); __skb_queue_purge(&q->direct_queue); - MOD_DEC_USE_COUNT; } static int htb_delete(struct Qdisc *sch, unsigned long arg) @@ -1588,41 +1586,35 @@ static void htb_walk(struct Qdisc *sch, } } -static struct Qdisc_class_ops htb_class_ops = -{ - htb_graft, - htb_leaf, - htb_get, - htb_put, - htb_change_class, - htb_delete, - htb_walk, - - htb_find_tcf, - htb_bind_filter, - htb_unbind_filter, - - htb_dump_class, +static struct Qdisc_class_ops htb_class_ops = { + .graft = htb_graft, + .leaf = htb_leaf, + .get = htb_get, + .put = htb_put, + .change = htb_change_class, + .delete = htb_delete, + .walk = htb_walk, + .tcf_chain = htb_find_tcf, + .bind_tcf = htb_bind_filter, + .unbind_tcf = htb_unbind_filter, + .dump = htb_dump_class, }; -struct Qdisc_ops htb_qdisc_ops = -{ - NULL, - &htb_class_ops, - "htb", - sizeof(struct htb_sched), - - htb_enqueue, - htb_dequeue, - htb_requeue, - htb_drop, - - htb_init, - htb_reset, - htb_destroy, - NULL /* htb_change */, - - htb_dump, +struct Qdisc_ops htb_qdisc_ops = { + .next = NULL, + .cl_ops = &htb_class_ops, + .id = "htb", + .priv_size = sizeof(struct htb_sched), + .enqueue = htb_enqueue, + .dequeue = htb_dequeue, + .requeue = htb_requeue, + .drop = htb_drop, + .init = htb_init, + .reset = htb_reset, + .destroy = htb_destroy, + .change = NULL /* htb_change */, + .dump = htb_dump, + .owner = THIS_MODULE, }; #ifdef MODULE --- linux-2.5.68/net/sched/sch_ingress.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/net/sched/sch_ingress.c 2003-04-21 00:31:39.000000000 -0700 @@ -262,7 +262,6 @@ int ingress_init(struct Qdisc *sch,struc memset(p, 0, sizeof(*p)); p->filter_list = NULL; p->q = &noop_qdisc; - MOD_INC_USE_COUNT; return 0; error: return -EINVAL; @@ -308,9 +307,6 @@ static void ingress_destroy(struct Qdisc /* for future use */ qdisc_destroy(p->q); #endif - - MOD_DEC_USE_COUNT; - } @@ -329,41 +325,35 @@ rtattr_failure: return -1; } -static struct Qdisc_class_ops ingress_class_ops = -{ - .graft = ingress_graft, - .leaf = ingress_leaf, - .get = ingress_get, - .put = ingress_put, - .change = ingress_change, - .delete = NULL, - .walk = ingress_walk, - - .tcf_chain = ingress_find_tcf, - .bind_tcf = ingress_bind_filter, - .unbind_tcf = ingress_put, - - .dump = NULL, +static struct Qdisc_class_ops ingress_class_ops = { + .graft = ingress_graft, + .leaf = ingress_leaf, + .get = ingress_get, + .put = ingress_put, + .change = ingress_change, + .delete = NULL, + .walk = ingress_walk, + .tcf_chain = ingress_find_tcf, + .bind_tcf = ingress_bind_filter, + .unbind_tcf = ingress_put, + .dump = NULL, }; -struct Qdisc_ops ingress_qdisc_ops = -{ - .next = NULL, - .cl_ops = &ingress_class_ops, - .id = "ingress", - .priv_size = sizeof(struct ingress_qdisc_data), - - .enqueue = ingress_enqueue, - .dequeue = ingress_dequeue, - .requeue = ingress_requeue, - .drop = ingress_drop, - - .init = ingress_init, - .reset = ingress_reset, - .destroy = ingress_destroy, - .change = NULL, - - .dump = ingress_dump, +struct Qdisc_ops ingress_qdisc_ops = { + .next = NULL, + .cl_ops = &ingress_class_ops, + .id = "ingress", + .priv_size = sizeof(struct ingress_qdisc_data), + .enqueue = ingress_enqueue, + .dequeue = ingress_dequeue, + .requeue = ingress_requeue, + .drop = ingress_drop, + .init = ingress_init, + .reset = ingress_reset, + .destroy = ingress_destroy, + .change = NULL, + .dump = ingress_dump, + .owner = THIS_MODULE, }; --- linux-2.5.68/net/sched/sch_prio.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/net/sched/sch_prio.c 2003-04-21 00:31:39.000000000 -0700 @@ -169,7 +169,6 @@ prio_destroy(struct Qdisc* sch) qdisc_destroy(q->queues[prio]); q->queues[prio] = &noop_qdisc; } - MOD_DEC_USE_COUNT; } static int prio_tune(struct Qdisc *sch, struct rtattr *opt) @@ -233,7 +232,6 @@ static int prio_init(struct Qdisc *sch, if ((err= prio_tune(sch, opt)) != 0) return err; } - MOD_INC_USE_COUNT; return 0; } @@ -369,42 +367,35 @@ static struct tcf_proto ** prio_find_tcf return &q->filter_list; } -static struct Qdisc_class_ops prio_class_ops = -{ - .graft = prio_graft, - .leaf = prio_leaf, - - .get = prio_get, - .put = prio_put, - .change = prio_change, - .delete = prio_delete, - .walk = prio_walk, - - .tcf_chain = prio_find_tcf, - .bind_tcf = prio_bind, - .unbind_tcf = prio_put, - - .dump = prio_dump_class, +static struct Qdisc_class_ops prio_class_ops = { + .graft = prio_graft, + .leaf = prio_leaf, + .get = prio_get, + .put = prio_put, + .change = prio_change, + .delete = prio_delete, + .walk = prio_walk, + .tcf_chain = prio_find_tcf, + .bind_tcf = prio_bind, + .unbind_tcf = prio_put, + .dump = prio_dump_class, }; -struct Qdisc_ops prio_qdisc_ops = -{ - .next = NULL, - .cl_ops = &prio_class_ops, - .id = "prio", - .priv_size = sizeof(struct prio_sched_data), - - .enqueue = prio_enqueue, - .dequeue = prio_dequeue, - .requeue = prio_requeue, - .drop = prio_drop, - - .init = prio_init, - .reset = prio_reset, - .destroy = prio_destroy, - .change = prio_tune, - - .dump = prio_dump, +struct Qdisc_ops prio_qdisc_ops = { + .next = NULL, + .cl_ops = &prio_class_ops, + .id = "prio", + .priv_size = sizeof(struct prio_sched_data), + .enqueue = prio_enqueue, + .dequeue = prio_dequeue, + .requeue = prio_requeue, + .drop = prio_drop, + .init = prio_init, + .reset = prio_reset, + .destroy = prio_destroy, + .change = prio_tune, + .dump = prio_dump, + .owner = THIS_MODULE, }; #ifdef MODULE --- linux-2.5.68/net/sched/sch_red.c 2003-01-16 18:22:56.000000000 -0800 +++ 25/net/sched/sch_red.c 2003-04-21 00:31:39.000000000 -0700 @@ -407,14 +407,7 @@ static int red_change(struct Qdisc *sch, static int red_init(struct Qdisc* sch, struct rtattr *opt) { - int err; - - MOD_INC_USE_COUNT; - - if ((err = red_change(sch, opt)) != 0) { - MOD_DEC_USE_COUNT; - } - return err; + return red_change(sch, opt); } @@ -458,27 +451,23 @@ rtattr_failure: static void red_destroy(struct Qdisc *sch) { - MOD_DEC_USE_COUNT; } -struct Qdisc_ops red_qdisc_ops = -{ - .next = NULL, - .cl_ops = NULL, - .id = "red", - .priv_size = sizeof(struct red_sched_data), - - .enqueue = red_enqueue, - .dequeue = red_dequeue, - .requeue = red_requeue, - .drop = red_drop, - - .init = red_init, - .reset = red_reset, - .destroy = red_destroy, - .change = red_change, - - .dump = red_dump, +struct Qdisc_ops red_qdisc_ops = { + .next = NULL, + .cl_ops = NULL, + .id = "red", + .priv_size = sizeof(struct red_sched_data), + .enqueue = red_enqueue, + .dequeue = red_dequeue, + .requeue = red_requeue, + .drop = red_drop, + .init = red_init, + .reset = red_reset, + .destroy = red_destroy, + .change = red_change, + .dump = red_dump, + .owner = THIS_MODULE, }; --- linux-2.5.68/net/sched/sch_sfq.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/net/sched/sch_sfq.c 2003-04-21 00:31:39.000000000 -0700 @@ -431,7 +431,6 @@ static int sfq_init(struct Qdisc *sch, s } for (i=0; idata; del_timer(&q->perturb_timer); - MOD_DEC_USE_COUNT; } static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb) @@ -464,24 +462,21 @@ rtattr_failure: return -1; } -struct Qdisc_ops sfq_qdisc_ops = -{ - .next = NULL, - .cl_ops = NULL, - .id = "sfq", - .priv_size = sizeof(struct sfq_sched_data), - - .enqueue = sfq_enqueue, - .dequeue = sfq_dequeue, - .requeue = sfq_requeue, - .drop = sfq_drop, - - .init = sfq_init, - .reset = sfq_reset, - .destroy = sfq_destroy, - .change = NULL, - - .dump = sfq_dump, +struct Qdisc_ops sfq_qdisc_ops = { + .next = NULL, + .cl_ops = NULL, + .id = "sfq", + .priv_size = sizeof(struct sfq_sched_data), + .enqueue = sfq_enqueue, + .dequeue = sfq_dequeue, + .requeue = sfq_requeue, + .drop = sfq_drop, + .init = sfq_init, + .reset = sfq_reset, + .destroy = sfq_destroy, + .change = NULL, + .dump = sfq_dump, + .owner = THIS_MODULE, }; #ifdef MODULE --- linux-2.5.68/net/sched/sch_tbf.c 2003-01-16 18:21:37.000000000 -0800 +++ 25/net/sched/sch_tbf.c 2003-04-21 00:31:39.000000000 -0700 @@ -330,23 +330,17 @@ done: static int tbf_init(struct Qdisc* sch, struct rtattr *opt) { - int err; struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data; if (opt == NULL) return -EINVAL; - MOD_INC_USE_COUNT; - PSCHED_GET_TIME(q->t_c); init_timer(&q->wd_timer); q->wd_timer.function = tbf_watchdog; q->wd_timer.data = (unsigned long)sch; - if ((err = tbf_change(sch, opt)) != 0) { - MOD_DEC_USE_COUNT; - } - return err; + return tbf_change(sch, opt); } static void tbf_destroy(struct Qdisc *sch) @@ -359,8 +353,6 @@ static void tbf_destroy(struct Qdisc *sc qdisc_put_rtab(q->P_tab); if (q->R_tab) qdisc_put_rtab(q->R_tab); - - MOD_DEC_USE_COUNT; } static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb) @@ -391,24 +383,20 @@ rtattr_failure: return -1; } -struct Qdisc_ops tbf_qdisc_ops = -{ - .next = NULL, - .cl_ops = NULL, - .id = "tbf", - .priv_size = sizeof(struct tbf_sched_data), - - .enqueue = tbf_enqueue, - .dequeue = tbf_dequeue, - .requeue = tbf_requeue, - .drop = tbf_drop, - - .init = tbf_init, - .reset = tbf_reset, - .destroy = tbf_destroy, - .change = tbf_change, - - .dump = tbf_dump, +struct Qdisc_ops tbf_qdisc_ops = { + .next = NULL, + .cl_ops = NULL, + .id = "tbf", + .priv_size = sizeof(struct tbf_sched_data), + .enqueue = tbf_enqueue, + .dequeue = tbf_dequeue, + .requeue = tbf_requeue, + .drop = tbf_drop, + .init = tbf_init, + .reset = tbf_reset, + .destroy = tbf_destroy, + .change = tbf_change, + .dump = tbf_dump, }; --- linux-2.5.68/net/sched/sch_teql.c 2003-01-16 18:21:44.000000000 -0800 +++ 25/net/sched/sch_teql.c 2003-04-21 00:31:39.000000000 -0700 @@ -177,8 +177,6 @@ teql_destroy(struct Qdisc* sch) } while ((prev = q) != master->slaves); } - - MOD_DEC_USE_COUNT; } static int teql_qdisc_init(struct Qdisc *sch, struct rtattr *opt) @@ -222,8 +220,6 @@ static int teql_qdisc_init(struct Qdisc m->dev.mtu = dev->mtu; m->dev.flags = (m->dev.flags&~FMASK)|(dev->flags&FMASK); } - - MOD_INC_USE_COUNT; return 0; } @@ -386,14 +382,12 @@ static int teql_master_open(struct net_d m->dev.mtu = mtu; m->dev.flags = (m->dev.flags&~FMASK) | flags; netif_start_queue(&m->dev); - MOD_INC_USE_COUNT; return 0; } static int teql_master_close(struct net_device *dev) { netif_stop_queue(dev); - MOD_DEC_USE_COUNT; return 0; } @@ -440,20 +434,19 @@ static int teql_master_init(struct net_d static struct teql_master the_master = { { - .next = NULL, - .cl_ops = NULL, - .id = "", - .priv_size = sizeof(struct teql_sched_data), - - .enqueue = teql_enqueue, - .dequeue = teql_dequeue, - .requeue = teql_requeue, - .drop = NULL, - - .init = teql_qdisc_init, - .reset = teql_reset, - .destroy = teql_destroy, - .dump = NULL, + .next = NULL, + .cl_ops = NULL, + .id = "", + .priv_size = sizeof(struct teql_sched_data), + .enqueue = teql_enqueue, + .dequeue = teql_dequeue, + .requeue = teql_requeue, + .drop = NULL, + .init = teql_qdisc_init, + .reset = teql_reset, + .destroy = teql_destroy, + .dump = NULL, + .owner = THIS_MODULE, },}; @@ -474,6 +467,7 @@ int __init teql_init(void) memcpy(the_master.qops.id, the_master.dev.name, IFNAMSIZ); the_master.dev.init = teql_master_init; + SET_MODULE_OWNER(&the_master.dev); err = register_netdevice(&the_master.dev); if (err == 0) { err = register_qdisc(&the_master.qops); --- linux-2.5.68/net/socket.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/net/socket.c 2003-04-21 00:31:39.000000000 -0700 @@ -506,8 +506,13 @@ struct file_operations bad_sock_fops = { void sock_release(struct socket *sock) { - if (sock->ops) + if (sock->ops) { + const int family = sock->ops->family; + sock->ops->release(sock); + sock->ops = NULL; + module_put(net_families[family]->owner); + } if (sock->fasync_list) printk(KERN_ERR "sock_release: fasync list not empty!\n"); @@ -1058,11 +1063,12 @@ int sock_create(int family, int type, in sock->type = type; + i = -EBUSY; + if (!try_module_get(net_families[family]->owner)) + goto out_release; + if ((i = net_families[family]->create(sock, protocol)) < 0) - { - sock_release(sock); - goto out; - } + goto out_release; *res = sock; security_socket_post_create(sock, family, type, protocol); @@ -1070,6 +1076,9 @@ int sock_create(int family, int type, in out: net_family_read_unlock(); return i; +out_release: + sock_release(sock); + goto out; } asmlinkage long sys_socket(int family, int type, int protocol) --- linux-2.5.68/sound/core/sgbuf.c 2003-03-24 15:36:54.000000000 -0800 +++ 25/sound/core/sgbuf.c 2003-04-21 00:31:39.000000000 -0700 @@ -85,7 +85,7 @@ void *snd_malloc_sgbuf_pages(struct pci_ } sgbuf->size = size; - dmab->area = vmap(sgbuf->page_table, sgbuf->pages); + dmab->area = vmap(sgbuf->page_table, sgbuf->pages, VM_MAP, PAGE_KERNEL); if (! dmab->area) goto _failed; return dmab->area; --- linux-2.5.68/sound/core/sound.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/core/sound.c 2003-04-21 00:31:39.000000000 -0700 @@ -68,10 +68,6 @@ static struct list_head snd_minors_hash[ static DECLARE_MUTEX(sound_mutex); -#ifdef CONFIG_DEVFS_FS -static devfs_handle_t devfs_handle = NULL; -#endif - #ifdef CONFIG_KMOD /** @@ -343,15 +339,7 @@ static int __init alsa_sound_init(void) if ((err = snd_oss_init_module()) < 0) return err; #endif -#ifdef CONFIG_DEVFS_FS -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) - devfs_handle = devfs_mk_dir(NULL, "snd", 3, NULL); -#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,5,67) - devfs_handle = devfs_mk_dir(NULL, "snd", NULL); -#else - devfs_handle = devfs_mk_dir("snd"); -#endif -#endif + devfs_mk_dir("snd"); if (register_chrdev(major, "alsa", &snd_fops)) { snd_printk(KERN_ERR "unable to register native major device number %d\n", major); return -EIO; @@ -404,9 +392,7 @@ static void __exit alsa_sound_exit(void) #endif if (unregister_chrdev(major, "alsa") != 0) snd_printk(KERN_ERR "unable to unregister major device number %d\n", major); -#ifdef CONFIG_DEVFS_FS - devfs_unregister(devfs_handle); -#endif + devfs_remove("snd"); } module_init(alsa_sound_init) --- linux-2.5.68/sound/drivers/mpu401/mpu401_uart.c 2003-03-24 15:36:54.000000000 -0800 +++ 25/sound/drivers/mpu401/mpu401_uart.c 2003-04-21 00:31:39.000000000 -0700 @@ -90,7 +90,7 @@ static void snd_mpu401_uart_clear_rx(mpu #endif } -static void _snd_mpu401_uart_interrupt(mpu401_t *mpu) +static irqreturn_t _snd_mpu401_uart_interrupt(mpu401_t *mpu) { if (test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) { if (! test_and_set_bit(MPU401_MODE_BIT_RX_LOOP, &mpu->mode)) { @@ -108,6 +108,9 @@ static void _snd_mpu401_uart_interrupt(m snd_mpu401_uart_output_write(mpu); spin_unlock(&mpu->output_lock); } + + /* FIXME! This should really check whether the irq was for us */ + return IRQ_HANDLED; } /** @@ -118,13 +121,13 @@ static void _snd_mpu401_uart_interrupt(m * * Processes the interrupt for MPU401-UART i/o. */ -void snd_mpu401_uart_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, struct pt_regs *regs) { mpu401_t *mpu = snd_magic_cast(mpu401_t, dev_id, return); if (mpu == NULL) - return; - _snd_mpu401_uart_interrupt(mpu); + return IRQ_NONE; + return _snd_mpu401_uart_interrupt(mpu); } /* --- linux-2.5.68/sound/drivers/mtpav.c 2003-03-24 15:36:54.000000000 -0800 +++ 25/sound/drivers/mtpav.c 2003-04-21 00:32:53.000000000 -0700 @@ -585,7 +585,7 @@ static void snd_mtpav_read_bytes(mtpav_t } while (sbyt & SIGS_BYTE); } -static void snd_mtpav_irqh(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_mtpav_irqh(int irq, void *dev_id, struct pt_regs *regs) { mtpav_t *mcard = snd_magic_cast(mtpav_t, dev_id, return); @@ -593,6 +593,7 @@ static void snd_mtpav_irqh(int irq, void spin_lock(&mcard->spinlock); snd_mtpav_read_bytes(mcard); spin_unlock(&mcard->spinlock); + return IRQ_HANDLED; } /* --- linux-2.5.68/sound/drivers/serial-u16550.c 2003-02-24 13:08:47.000000000 -0800 +++ 25/sound/drivers/serial-u16550.c 2003-04-21 00:32:53.000000000 -0700 @@ -290,7 +290,7 @@ static void snd_uart16550_io_loop(snd_ua * Note that some devices need OUT2 to be set before they will generate * interrupts at all. (Possibly tied to an internal pull-up on CTS?) */ -static void snd_uart16550_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_uart16550_interrupt(int irq, void *dev_id, struct pt_regs *regs) { snd_uart16550_t *uart; @@ -298,11 +298,12 @@ static void snd_uart16550_interrupt(int spin_lock(&uart->open_lock); if (uart->filemode == SERIAL_MODE_NOT_OPENED) { spin_unlock(&uart->open_lock); - return; + return IRQ_NONE; } inb(uart->base + UART_IIR); /* indicate to the UART that the interrupt has been serviced */ snd_uart16550_io_loop(uart); spin_unlock(&uart->open_lock); + return IRQ_HANDLED; } /* When the polling mode, this function calls snd_uart16550_io_loop. */ --- linux-2.5.68/sound/isa/ad1816a/ad1816a_lib.c 2003-02-10 12:24:17.000000000 -0800 +++ 25/sound/isa/ad1816a/ad1816a_lib.c 2003-04-21 00:32:53.000000000 -0700 @@ -311,7 +311,7 @@ static snd_pcm_uframes_t snd_ad1816a_cap } -static void snd_ad1816a_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_ad1816a_interrupt(int irq, void *dev_id, struct pt_regs *regs) { ad1816a_t *chip = snd_magic_cast(ad1816a_t, dev_id, return); unsigned char status; @@ -332,6 +332,7 @@ static void snd_ad1816a_interrupt(int ir spin_lock(&chip->lock); snd_ad1816a_out(chip, AD1816A_INTERRUPT_STATUS, 0x00); spin_unlock(&chip->lock); + return IRQ_HANDLED; } --- linux-2.5.68/sound/isa/ad1848/ad1848_lib.c 2003-02-10 12:24:17.000000000 -0800 +++ 25/sound/isa/ad1848/ad1848_lib.c 2003-04-21 00:32:53.000000000 -0700 @@ -585,7 +585,7 @@ static int snd_ad1848_capture_prepare(sn return 0; } -void snd_ad1848_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t snd_ad1848_interrupt(int irq, void *dev_id, struct pt_regs *regs) { ad1848_t *chip = snd_magic_cast(ad1848_t, dev_id, return); @@ -596,6 +596,7 @@ void snd_ad1848_interrupt(int irq, void (chip->mode & AD1848_MODE_RUNNING)) snd_pcm_period_elapsed(chip->capture_substream); outb(0, AD1848P(chip, STATUS)); /* clear global interrupt bit */ + return IRQ_HANDLED; } static snd_pcm_uframes_t snd_ad1848_playback_pointer(snd_pcm_substream_t * substream) --- linux-2.5.68/sound/isa/cs423x/cs4231_lib.c 2003-02-17 16:21:15.000000000 -0800 +++ 25/sound/isa/cs423x/cs4231_lib.c 2003-04-21 00:32:53.000000000 -0700 @@ -967,7 +967,7 @@ static void snd_cs4231_overrange(cs4231_ chip->capture_substream->runtime->overrange++; } -void snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs) { cs4231_t *chip = snd_magic_cast(cs4231_t, dev_id, return); unsigned char status; @@ -998,6 +998,7 @@ void snd_cs4231_interrupt(int irq, void spin_lock(&chip->reg_lock); snd_cs4231_outm(chip, CS4231_IRQ_STATUS, ~CS4231_ALL_IRQS | ~status, 0); spin_unlock(&chip->reg_lock); + return IRQ_HANDLED; } #ifdef LEGACY_SUPPORT --- linux-2.5.68/sound/isa/es1688/es1688_lib.c 2003-02-10 12:24:17.000000000 -0800 +++ 25/sound/isa/es1688/es1688_lib.c 2003-04-21 00:32:53.000000000 -0700 @@ -482,7 +482,7 @@ static int snd_es1688_capture_trigger(sn return snd_es1688_trigger(chip, cmd, 0x0f); } -void snd_es1688_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t snd_es1688_interrupt(int irq, void *dev_id, struct pt_regs *regs) { es1688_t *chip = snd_magic_cast(es1688_t, dev_id, return); @@ -492,6 +492,7 @@ void snd_es1688_interrupt(int irq, void snd_pcm_period_elapsed(chip->capture_substream); inb(ES1688P(chip, DATA_AVAIL)); /* ack interrupt */ + return IRQ_HANDLED; } static snd_pcm_uframes_t snd_es1688_playback_pointer(snd_pcm_substream_t * substream) --- linux-2.5.68/sound/isa/es18xx.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/isa/es18xx.c 2003-04-21 00:32:53.000000000 -0700 @@ -727,12 +727,11 @@ static int snd_es18xx_playback_trigger(s return snd_es18xx_playback2_trigger(chip, substream, cmd); } -static void snd_es18xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_es18xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) { es18xx_t *chip = snd_magic_cast(es18xx_t, dev_id, return); unsigned char status; - if (chip->caps & ES18XX_CONTROL) { /* Read Interrupt status */ status = inb(chip->ctrl_port + 6); @@ -787,7 +786,7 @@ static void snd_es18xx_interrupt(int irq /* ack interrupt */ snd_es18xx_mixer_write(chip, 0x66, 0x00); } - + return IRQ_HANDLED; } static snd_pcm_uframes_t snd_es18xx_playback_pointer(snd_pcm_substream_t * substream) --- linux-2.5.68/sound/isa/gus/gus_irq.c 2003-02-10 12:24:17.000000000 -0800 +++ 25/sound/isa/gus/gus_irq.c 2003-04-21 00:32:53.000000000 -0700 @@ -30,16 +30,18 @@ #define STAT_ADD(x) while (0) { ; } #endif -void snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs) { snd_gus_card_t * gus = snd_magic_cast(snd_gus_card_t, dev_id, return); unsigned char status; int loop = 100; - - __again: + int handled = 0; + +__again: status = inb(gus->gf1.reg_irqstat); if (status == 0) - return; + return IRQ_RETVAL(handled); + handled = 1; // snd_printk("IRQ: status = 0x%x\n", status); if (status & 0x02) { STAT_ADD(gus->gf1.interrupt_stat_midi_in); @@ -101,6 +103,7 @@ void snd_gus_interrupt(int irq, void *de } if (--loop > 0) goto __again; + return IRQ_NONE; } #ifdef CONFIG_SND_DEBUG --- linux-2.5.68/sound/isa/gus/gusmax.c 2003-01-16 18:22:18.000000000 -0800 +++ 25/sound/isa/gus/gusmax.c 2003-04-21 00:32:53.000000000 -0700 @@ -129,22 +129,26 @@ static int __init snd_gusmax_detect(snd_ return 0; } -static void snd_gusmax_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_gusmax_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct snd_gusmax *maxcard = (struct snd_gusmax *) dev_id; int loop, max = 5; + int handled = 0; do { loop = 0; if (inb(maxcard->gus_status_reg)) { + handled = 1; snd_gus_interrupt(irq, maxcard->gus, regs); loop++; } if (inb(maxcard->pcm_status_reg) & 0x01) { /* IRQ bit is set? */ + handled = 1; snd_cs4231_interrupt(irq, maxcard->cs4231, regs); loop++; } } while (loop && --max > 0); + return IRQ_RETVAL(handled); } static void __init snd_gusmax_init(int dev, snd_card_t * card, snd_gus_card_t * gus) --- linux-2.5.68/sound/isa/gus/interwave.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/isa/gus/interwave.c 2003-04-21 00:32:53.000000000 -0700 @@ -312,22 +312,26 @@ static int __devinit snd_interwave_detec return -ENODEV; } -static void snd_interwave_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_interwave_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct snd_interwave *iwcard = (struct snd_interwave *) dev_id; int loop, max = 5; + int handled = 0; do { loop = 0; if (inb(iwcard->gus_status_reg)) { + handled = 1; snd_gus_interrupt(irq, iwcard->gus, regs); loop++; } if (inb(iwcard->pcm_status_reg) & 0x01) { /* IRQ bit is set? */ + handled = 1; snd_cs4231_interrupt(irq, iwcard->cs4231, regs); loop++; } } while (loop && --max > 0); + return IRQ_RETVAL(handled); } static void __devinit snd_interwave_reset(snd_gus_card_t * gus) --- linux-2.5.68/sound/isa/opl3sa2.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/isa/opl3sa2.c 2003-04-21 00:32:53.000000000 -0700 @@ -297,26 +297,34 @@ static int __init snd_opl3sa2_detect(opl return 0; } -static void snd_opl3sa2_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_opl3sa2_interrupt(int irq, void *dev_id, struct pt_regs *regs) { unsigned short status; opl3sa2_t *chip = snd_magic_cast(opl3sa2_t, dev_id, return); + int handled = 0; if (chip == NULL || chip->card == NULL) - return; + return IRQ_NONE; status = snd_opl3sa2_read(chip, OPL3SA2_IRQ_STATUS); - if (status & 0x20) + if (status & 0x20) { + handled = 1; snd_opl3_interrupt(chip->synth); + } - if ((status & 0x10) && chip->rmidi != NULL) + if ((status & 0x10) && chip->rmidi != NULL) { + handled = 1; snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data, regs); + } - if (status & 0x07) /* TI,CI,PI */ + if (status & 0x07) { /* TI,CI,PI */ + handled = 1; snd_cs4231_interrupt(irq, chip->cs4231, regs); + } if (status & 0x40) { /* hardware volume change */ + handled = 1; /* reading from Master Lch register at 0x07 clears this bit */ snd_opl3sa2_read(chip, OPL3SA2_MASTER_RIGHT); snd_opl3sa2_read(chip, OPL3SA2_MASTER_LEFT); @@ -325,6 +333,7 @@ static void snd_opl3sa2_interrupt(int ir snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->master_volume->id); } } + return IRQ_RETVAL(handled); } #define OPL3SA2_SINGLE(xname, xindex, reg, shift, mask, invert) \ --- linux-2.5.68/sound/isa/opti9xx/opti92x-ad1848.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/isa/opti9xx/opti92x-ad1848.c 2003-04-21 00:32:53.000000000 -0700 @@ -1125,7 +1125,7 @@ static void snd_opti93x_overrange(opti93 spin_unlock_irqrestore(&chip->lock, flags); } -void snd_opti93x_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t snd_opti93x_interrupt(int irq, void *dev_id, struct pt_regs *regs) { opti93x_t *codec = snd_magic_cast(opti93x_t, dev_id, return); unsigned char status; @@ -1138,6 +1138,7 @@ void snd_opti93x_interrupt(int irq, void snd_pcm_period_elapsed(codec->capture_substream); } outb(0x00, OPTi93X_PORT(codec, STATUS)); + return IRQ_HANDLED; } --- linux-2.5.68/sound/isa/sb/sb16_main.c 2003-02-10 12:24:17.000000000 -0800 +++ 25/sound/isa/sb/sb16_main.c 2003-04-21 00:32:53.000000000 -0700 @@ -393,7 +393,7 @@ static int snd_sb16_capture_trigger(snd_ return result; } -void snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs) { sb_t *chip = snd_magic_cast(sb_t, dev_id, return); unsigned char status; @@ -438,6 +438,7 @@ void snd_sb16dsp_interrupt(int irq, void snd_sb_ack_16bit(chip); spin_unlock(&chip->reg_lock); } + return IRQ_HANDLED; } /* --- linux-2.5.68/sound/isa/sb/sb8.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/isa/sb/sb8.c 2003-04-21 00:32:53.000000000 -0700 @@ -70,7 +70,7 @@ struct snd_sb8 { static snd_card_t *snd_sb8_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; -static void snd_sb8_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id, struct pt_regs *regs) { sb_t *chip = snd_magic_cast(sb_t, dev_id, return); @@ -79,6 +79,7 @@ static void snd_sb8_interrupt(int irq, v } else { snd_sb8dsp_midi_interrupt(chip); } + return IRQ_HANDLED; } static void snd_sb8_free(snd_card_t *card) --- linux-2.5.68/sound/isa/sb/sb_common.c 2003-02-10 12:24:17.000000000 -0800 +++ 25/sound/isa/sb/sb_common.c 2003-04-21 00:32:59.000000000 -0700 @@ -214,7 +214,7 @@ static int snd_sbdsp_dev_free(snd_device int snd_sbdsp_create(snd_card_t *card, unsigned long port, int irq, - void (*irq_handler)(int, void *, struct pt_regs *), + irqreturn_t (*irq_handler)(int, void *, struct pt_regs *), int dma8, int dma16, unsigned short hardware, --- linux-2.5.68/sound/isa/sgalaxy.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/isa/sgalaxy.c 2003-04-21 00:32:53.000000000 -0700 @@ -112,8 +112,9 @@ static int __init snd_sgalaxy_sbdsp_comm return 0; } -static void snd_sgalaxy_dummy_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_sgalaxy_dummy_interrupt(int irq, void *dev_id, struct pt_regs *regs) { + return IRQ_NONE; } static int __init snd_sgalaxy_setup_wss(unsigned long port, int irq, int dma) --- linux-2.5.68/sound/isa/wavefront/wavefront.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/isa/wavefront/wavefront.c 2003-04-21 00:32:53.000000000 -0700 @@ -276,7 +276,7 @@ snd_wavefront_pnp (int dev, snd_wavefron #endif /* CONFIG_PNP */ -static void snd_wavefront_ics2115_interrupt(int irq, +static irqreturn_t snd_wavefront_ics2115_interrupt(int irq, void *dev_id, struct pt_regs *regs) { @@ -285,13 +285,14 @@ static void snd_wavefront_ics2115_interr acard = (snd_wavefront_card_t *) dev_id; if (acard == NULL) - return; + return IRQ_NONE; if (acard->wavefront.interrupts_are_midi) { snd_wavefront_midi_interrupt (acard); } else { snd_wavefront_internal_interrupt (acard); } + return IRQ_HANDLED; } snd_hwdep_t * __devinit --- linux-2.5.68/sound/oss/ad1816.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/ad1816.c 2003-04-21 00:32:53.000000000 -0700 @@ -540,7 +540,7 @@ static struct audio_driver ad1816_audio_ /* Interrupt handler */ -static void ad1816_interrupt (int irq, void *dev_id, struct pt_regs *dummy) +static irqreturn_t ad1816_interrupt (int irq, void *dev_id, struct pt_regs *dummy) { unsigned char status; ad1816_info *devc; @@ -549,7 +549,7 @@ static void ad1816_interrupt (int irq, v if (irq < 0 || irq > 15) { printk(KERN_WARNING "ad1816: Got bogus interrupt %d\n", irq); - return; + return IRQ_NONE; } dev = irq2dev[irq]; @@ -557,7 +557,7 @@ static void ad1816_interrupt (int irq, v if (dev < 0 || dev >= num_audiodevs) { printk(KERN_WARNING "ad1816: IRQ2AD1816-mapping failed for " "irq %d device %d\n", irq,dev); - return; + return IRQ_NONE; } devc = (ad1816_info *) audio_devs[dev]->devc; @@ -583,6 +583,7 @@ static void ad1816_interrupt (int irq, v DMAbuf_outputintr (dev, 1); spin_unlock(&devc->lock); + return IRQ_HANDLED; } /* ------------------------------------------------------------------- */ --- linux-2.5.68/sound/oss/ad1848.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/ad1848.c 2003-04-21 00:32:53.000000000 -0700 @@ -2212,7 +2212,7 @@ void ad1848_unload(int io_base, int irq, printk(KERN_ERR "ad1848: Can't find device to be unloaded. Base=%x\n", io_base); } -void adintr(int irq, void *dev_id, struct pt_regs *dummy) +irqreturn_t adintr(int irq, void *dev_id, struct pt_regs *dummy) { unsigned char status; ad1848_info *devc; @@ -2287,6 +2287,7 @@ interrupt_again: /* Jump back here if i { goto interrupt_again; } + return IRQ_HANDLED; } /* --- linux-2.5.68/sound/oss/ad1848.h 2003-01-16 18:21:34.000000000 -0800 +++ 25/sound/oss/ad1848.h 2003-04-21 00:32:53.000000000 -0700 @@ -1,4 +1,6 @@ +#include + #define AD_F_CS4231 0x0001 /* Returned if a CS4232 (or compatible) detected */ #define AD_F_CS4248 0x0001 /* Returned if a CS4248 (or compatible) detected */ @@ -16,7 +18,7 @@ void ad1848_unload (int io_base, int irq int ad1848_detect (int io_base, int *flags, int *osp); int ad1848_control(int cmd, int arg); -void adintr(int irq, void *dev_id, struct pt_regs * dummy); +irqreturn_t adintr(int irq, void *dev_id, struct pt_regs * dummy); void attach_ms_sound(struct address_info * hw_config, struct module * owner); int probe_ms_sound(struct address_info *hw_config); --- linux-2.5.68/sound/oss/btaudio.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/btaudio.c 2003-04-21 00:32:53.000000000 -0700 @@ -817,18 +817,20 @@ static char *irq_name[] = { "", "", "", "RISCI", "FBUS", "FTRGT", "FDSR", "PPERR", "RIPERR", "PABORT", "OCERR", "SCERR" }; -static void btaudio_irq(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t btaudio_irq(int irq, void *dev_id, struct pt_regs * regs) { int count = 0; u32 stat,astat; struct btaudio *bta = dev_id; + int handled = 0; for (;;) { count++; stat = btread(REG_INT_STAT); astat = stat & btread(REG_INT_MASK); if (!astat) - return; + return IRQ_RETVAL(handled); + handled = 1; btwrite(astat,REG_INT_STAT); if (irq_debug) { @@ -864,7 +866,7 @@ static void btaudio_irq(int irq, void *d btwrite(0, REG_INT_MASK); } } - return; + return IRQ_NONE; } /* -------------------------------------------------------------- */ --- linux-2.5.68/sound/oss/cmpci.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/cmpci.c 2003-04-21 00:32:53.000000000 -0700 @@ -1156,7 +1156,7 @@ static void cm_handle_midi(struct cm_sta } #endif -static void cm_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t cm_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct cm_state *s = (struct cm_state *)dev_id; unsigned int intsrc, intstat; @@ -1165,7 +1165,7 @@ static void cm_interrupt(int irq, void * /* fastpath out, to ease interrupt sharing */ intsrc = inl(s->iobase + CODEC_CMI_INT_STATUS); if (!(intsrc & 0x80000000)) - return; + return IRQ_NONE; spin_lock(&s->lock); intstat = inb(s->iobase + CODEC_CMI_INT_HLDCLR + 2); /* acknowledge interrupt */ @@ -1180,6 +1180,7 @@ static void cm_interrupt(int irq, void * cm_handle_midi(s); #endif spin_unlock(&s->lock); + return IRQ_HANDLED; } #ifdef CONFIG_SOUND_CMPCI_MIDI --- linux-2.5.68/sound/oss/cs4281/cs4281m.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/cs4281/cs4281m.c 2003-04-21 00:32:53.000000000 -0700 @@ -3792,7 +3792,7 @@ static void cs4281_handle_midi(struct cs -static void cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct cs4281_state *s = (struct cs4281_state *) dev_id; unsigned int temp1; @@ -3809,7 +3809,7 @@ static void cs4281_interrupt(int irq, vo writel(HICR_IEV | HICR_CHGM, s->pBA0 + BA0_HICR); CS_DBGOUT(CS_INTERRUPT, 9, printk(KERN_INFO "cs4281: cs4281_interrupt(): returning not cs4281 interrupt.\n")); - return; + return IRQ_NONE; } if (temp1 & HISR_DMA0) // If play interrupt, @@ -3823,6 +3823,7 @@ static void cs4281_interrupt(int irq, vo cs4281_update_ptr(s,CS_TRUE); cs4281_handle_midi(s); spin_unlock(&s->lock); + return IRQ_HANDLED; } // ************************************************************************** --- linux-2.5.68/sound/oss/cs46xx.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/cs46xx.c 2003-04-21 00:32:53.000000000 -0700 @@ -1670,7 +1670,7 @@ static void cs_handle_midi(struct cs_car wake_up(&card->midi.owait); } -static void cs_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t cs_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct cs_card *card = (struct cs_card *)dev_id; /* Single channel card */ @@ -1688,7 +1688,7 @@ static void cs_interrupt(int irq, void * { cs461x_pokeBA0(card, BA0_HICR, HICR_CHGM|HICR_IEV); spin_unlock(&card->lock); - return; + return IRQ_HANDLED; /* Might be IRQ_NONE.. */ } /* @@ -1709,6 +1709,7 @@ static void cs_interrupt(int irq, void * cs461x_pokeBA0(card, BA0_HICR, HICR_CHGM|HICR_IEV); spin_unlock(&card->lock); CS_DBGOUT(CS_INTERRUPT, 9, printk("cs46xx: cs_interrupt()- \n")); + return IRQ_HANDLED; } --- linux-2.5.68/sound/oss/dmasound/dmasound_atari.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/dmasound/dmasound_atari.c 2003-04-21 00:32:53.000000000 -0700 @@ -134,7 +134,7 @@ static int FalconSetFormat(int format); static int FalconSetVolume(int volume); static void AtaPlayNextFrame(int index); static void AtaPlay(void); -static void AtaInterrupt(int irq, void *dummy, struct pt_regs *fp); +static irqreturn_t AtaInterrupt(int irq, void *dummy, struct pt_regs *fp); /*** Mid level stuff *********************************************************/ @@ -1250,7 +1250,7 @@ static void AtaPlay(void) } -static void AtaInterrupt(int irq, void *dummy, struct pt_regs *fp) +static irqreturn_t AtaInterrupt(int irq, void *dummy, struct pt_regs *fp) { #if 0 /* ++TeSche: if you should want to test this... */ @@ -1259,7 +1259,7 @@ static void AtaInterrupt(int irq, void * if (++cnt == 10) { /* simulate losing an interrupt */ cnt = 0; - return; + return IRQ_HANDLED; } #endif spin_lock(&dmasound.lock); @@ -1269,7 +1269,7 @@ static void AtaInterrupt(int irq, void * * (almost) like on the TT. */ write_sq_ignore_int = 0; - return; + return IRQ_HANDLED; } if (!write_sq.active) { @@ -1277,7 +1277,7 @@ static void AtaInterrupt(int irq, void * * the sq variables, so better don't do anything here. */ WAKE_UP(write_sq.sync_queue); - return; + return IRQ_HANDLED; } /* Probably ;) one frame is finished. Well, in fact it may be that a @@ -1315,6 +1315,7 @@ static void AtaInterrupt(int irq, void * is nothing to play any more. Wake up a process waiting for audio output to drain. */ spin_unlock(&dmasound.lock); + return IRQ_HANDLED; } --- linux-2.5.68/sound/oss/dmasound/dmasound_awacs.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/dmasound/dmasound_awacs.c 2003-04-21 00:32:53.000000000 -0700 @@ -266,9 +266,9 @@ static int PMacSetFormat(int format); static int PMacSetVolume(int volume); static void PMacPlay(void); static void PMacRecord(void); -static void pmac_awacs_tx_intr(int irq, void *devid, struct pt_regs *regs); -static void pmac_awacs_rx_intr(int irq, void *devid, struct pt_regs *regs); -static void pmac_awacs_intr(int irq, void *devid, struct pt_regs *regs); +static irqreturn_t pmac_awacs_tx_intr(int irq, void *devid, struct pt_regs *regs); +static irqreturn_t pmac_awacs_rx_intr(int irq, void *devid, struct pt_regs *regs); +static irqreturn_t pmac_awacs_intr(int irq, void *devid, struct pt_regs *regs); static void awacs_write(int val); static int awacs_get_volume(int reg, int lshift); static int awacs_volume_setter(int volume, int n, int mute, int lshift); @@ -395,20 +395,24 @@ read_audio_gpio(int gpio_addr) return ((pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, gpio_addr, 0) & 0x02) !=0); } -static void +static irqreturn_t headphone_intr(int irq, void *devid, struct pt_regs *regs) { + int handled = 0; spin_lock(&dmasound.lock); if (read_audio_gpio(gpio_headphone_detect) == gpio_headphone_detect_pol) { + handled = 1; printk(KERN_INFO "Audio jack plugged, muting speakers.\n"); write_audio_gpio(gpio_amp_mute, gpio_amp_mute_pol); write_audio_gpio(gpio_headphone_mute, !gpio_headphone_mute_pol); } else { + handled = 1; printk(KERN_INFO "Audio jack unplugged, enabling speakers.\n"); write_audio_gpio(gpio_amp_mute, !gpio_amp_mute_pol); write_audio_gpio(gpio_headphone_mute, gpio_headphone_mute_pol); } spin_unlock(&dmasound.lock); + return IRQ_RETVAL(handled); } @@ -923,7 +927,7 @@ static void PMacRecord(void) 'next_cmd' field will already point back to the original loop of blocks. */ -static void +static irqreturn_t pmac_awacs_tx_intr(int irq, void *devid, struct pt_regs *regs) { int i = write_sq.front; @@ -1009,10 +1013,11 @@ printk("dmasound_pmac: tx-irq: xfer died if (!write_sq.active && (write_sq.syncing & 1)) WAKE_UP(write_sq.sync_queue); /* any time we're empty */ spin_unlock(&dmasound.lock); + return IRQ_HANDLED; } -static void +static irqreturn_t pmac_awacs_rx_intr(int irq, void *devid, struct pt_regs *regs) { int stat ; @@ -1023,12 +1028,12 @@ pmac_awacs_rx_intr(int irq, void *devid, * just blow it off. */ if (in_le32(&awacs_rxdma->cmdptr) == 0) - return; + return IRQ_HANDLED; /* We also want to blow 'em off when shutting down. */ if (read_sq.active == 0) - return; + return IRQ_HANDLED; spin_lock(&dmasound.lock); /* Check multiple buffers in case we were held off from @@ -1063,7 +1068,7 @@ printk("dmasound_pmac: rx-irq: DIED - at out_le32(&awacs_rxdma->control, ((RUN|WAKE) << 16) + (RUN|WAKE)); spin_unlock(&dmasound.lock); - return; /* try this block again */ + return IRQ_HANDLED; /* try this block again */ } /* Clear status and move on to next buffer. */ @@ -1091,10 +1096,11 @@ printk("dmasound_pmac: rx-irq: DIED - at WAKE_UP(read_sq.action_queue); spin_unlock(&dmasound.lock); + return IRQ_HANDLED; } -static void +static irqreturn_t pmac_awacs_intr(int irq, void *devid, struct pt_regs *regs) { int ctrl; @@ -1113,6 +1119,7 @@ pmac_awacs_intr(int irq, void *devid, st /* Writing 1s to the CNTLERR and PORTCHG bits clears them... */ out_le32(&awacs->control, ctrl); spin_unlock(&dmasound.lock); + return IRQ_HANDLED; } static void --- linux-2.5.68/sound/oss/dmasound/dmasound_paula.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/dmasound/dmasound_paula.c 2003-04-21 00:32:53.000000000 -0700 @@ -83,7 +83,7 @@ static int AmiSetVolume(int volume); static int AmiSetTreble(int treble); static void AmiPlayNextFrame(int index); static void AmiPlay(void); -static void AmiInterrupt(int irq, void *dummy, struct pt_regs *fp); +static irqreturn_t AmiInterrupt(int irq, void *dummy, struct pt_regs *fp); #ifdef CONFIG_HEARTBEAT @@ -567,7 +567,7 @@ static void AmiPlay(void) } -static void AmiInterrupt(int irq, void *dummy, struct pt_regs *fp) +static irqreturn_t AmiInterrupt(int irq, void *dummy, struct pt_regs *fp) { int minframes = 1; @@ -578,7 +578,7 @@ static void AmiInterrupt(int irq, void * * the sq variables, so better don't do anything here. */ WAKE_UP(write_sq.sync_queue); - return; + return IRQ_HANDLED; } if (write_sq.active & AMI_PLAY_PLAYING) { @@ -608,6 +608,7 @@ static void AmiInterrupt(int irq, void * /* Nothing to play anymore. Wake up a process waiting for audio output to drain. */ WAKE_UP(write_sq.sync_queue); + return IRQ_HANDLED; } /*** Mid level stuff *********************************************************/ --- linux-2.5.68/sound/oss/dmasound/dmasound_q40.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/dmasound/dmasound_q40.c 2003-04-21 00:32:53.000000000 -0700 @@ -49,8 +49,8 @@ static int Q40SetFormat(int format); static int Q40SetVolume(int volume); static void Q40PlayNextFrame(int index); static void Q40Play(void); -static void Q40StereoInterrupt(int irq, void *dummy, struct pt_regs *fp); -static void Q40MonoInterrupt(int irq, void *dummy, struct pt_regs *fp); +static irqreturn_t Q40StereoInterrupt(int irq, void *dummy, struct pt_regs *fp); +static irqreturn_t Q40MonoInterrupt(int irq, void *dummy, struct pt_regs *fp); static void Q40Interrupt(void); @@ -464,7 +464,7 @@ static void Q40Play(void) spin_unlock_irqrestore_flags(&dmasound.lock, flags); } -static void Q40StereoInterrupt(int irq, void *dummy, struct pt_regs *fp) +static irqreturn_t Q40StereoInterrupt(int irq, void *dummy, struct pt_regs *fp) { spin_lock(&dmasound.lock); if (q40_sc>1){ @@ -474,8 +474,9 @@ static void Q40StereoInterrupt(int irq, master_outb(1,SAMPLE_CLEAR_REG); }else Q40Interrupt(); spin_unlock(&dmasound.lock); + return IRQ_HANDLED; } -static void Q40MonoInterrupt(int irq, void *dummy, struct pt_regs *fp) +static irqreturn_t Q40MonoInterrupt(int irq, void *dummy, struct pt_regs *fp) { spin_lock(&dmasound.lock); if (q40_sc>0){ @@ -485,6 +486,7 @@ static void Q40MonoInterrupt(int irq, vo master_outb(1,SAMPLE_CLEAR_REG); }else Q40Interrupt(); spin_unlock(&dmasound.lock); + return IRQ_HANDLED; } static void Q40Interrupt(void) { --- linux-2.5.68/sound/oss/emu10k1/cardwo.c 2003-03-24 15:36:54.000000000 -0800 +++ 25/sound/oss/emu10k1/cardwo.c 2003-04-21 00:32:53.000000000 -0700 @@ -444,7 +444,7 @@ static void copy_ilv_block(struct woinst while (len) { for (voice_num = 0; voice_num < woinst->num_voices; voice_num++) { if (__copy_from_user((u8 *)(voice[voice_num].mem.addr[pg]) + pgoff, src, woinst->format.bytespervoicesample)) - return -EFAULT; + return; src += woinst->format.bytespervoicesample; } --- linux-2.5.68/sound/oss/emu10k1/irqmgr.c 2003-03-24 15:36:54.000000000 -0800 +++ 25/sound/oss/emu10k1/irqmgr.c 2003-04-21 00:32:53.000000000 -0700 @@ -37,10 +37,11 @@ /* Interrupt handler */ -void emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct emu10k1_card *card = (struct emu10k1_card *) dev_id; u32 irqstatus, irqstatus_tmp; + int handled = 0; DPD(4, "emu10k1_interrupt called, irq = %u\n", irq); @@ -105,6 +106,8 @@ void emu10k1_interrupt(int irq, void *de } /* acknowledge interrupt */ - outl(irqstatus_tmp, card->iobase + IPR); + outl(irqstatus_tmp, card->iobase + IPR); + handled = 1; } + return IRQ_RETVAL(handled); } --- linux-2.5.68/sound/oss/emu10k1/main.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/emu10k1/main.c 2003-04-21 00:32:53.000000000 -0700 @@ -157,7 +157,7 @@ extern struct file_operations emu10k1_mi static struct midi_operations emu10k1_midi_operations; #endif -extern void emu10k1_interrupt(int, void *, struct pt_regs *s); +extern irqreturn_t emu10k1_interrupt(int, void *, struct pt_regs *s); static int __devinit emu10k1_audio_init(struct emu10k1_card *card) { --- linux-2.5.68/sound/oss/es1370.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/es1370.c 2003-04-21 00:32:53.000000000 -0700 @@ -755,7 +755,7 @@ static void es1370_handle_midi(struct es outb((s->midi.ocnt > 0) ? UCTRL_RXINTEN | UCTRL_ENA_TXINT : UCTRL_RXINTEN, s->io+ES1370_REG_UART_CONTROL); } -static void es1370_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t es1370_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct es1370_state *s = (struct es1370_state *)dev_id; unsigned int intsrc, sctl; @@ -763,7 +763,7 @@ static void es1370_interrupt(int irq, vo /* fastpath out, to ease interrupt sharing */ intsrc = inl(s->io+ES1370_REG_STATUS); if (!(intsrc & 0x80000000)) - return; + return IRQ_NONE; spin_lock(&s->lock); /* clear audio interrupts first */ sctl = s->sctrl; @@ -778,6 +778,7 @@ static void es1370_interrupt(int irq, vo es1370_update_ptr(s); es1370_handle_midi(s); spin_unlock(&s->lock); + return IRQ_HANDLED; } /* --------------------------------------------------------------------- */ --- linux-2.5.68/sound/oss/es1371.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/es1371.c 2003-04-21 00:32:53.000000000 -0700 @@ -1091,7 +1091,7 @@ static void es1371_handle_midi(struct es outb((s->midi.ocnt > 0) ? UCTRL_RXINTEN | UCTRL_ENA_TXINT : UCTRL_RXINTEN, s->io+ES1371_REG_UART_CONTROL); } -static void es1371_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t es1371_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct es1371_state *s = (struct es1371_state *)dev_id; unsigned int intsrc, sctl; @@ -1099,7 +1099,7 @@ static void es1371_interrupt(int irq, vo /* fastpath out, to ease interrupt sharing */ intsrc = inl(s->io+ES1371_REG_STATUS); if (!(intsrc & 0x80000000)) - return; + return IRQ_NONE; spin_lock(&s->lock); /* clear audio interrupts first */ sctl = s->sctrl; @@ -1114,6 +1114,7 @@ static void es1371_interrupt(int irq, vo es1371_update_ptr(s); es1371_handle_midi(s); spin_unlock(&s->lock); + return IRQ_HANDLED; } /* --------------------------------------------------------------------- */ --- linux-2.5.68/sound/oss/esssolo1.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/esssolo1.c 2003-04-21 00:32:53.000000000 -0700 @@ -1694,7 +1694,7 @@ static void solo1_handle_midi(struct sol wake_up(&s->midi.owait); } -static void solo1_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t solo1_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct solo1_state *s = (struct solo1_state *)dev_id; unsigned int intsrc; @@ -1702,7 +1702,7 @@ static void solo1_interrupt(int irq, voi /* fastpath out, to ease interrupt sharing */ intsrc = inb(s->iobase+7); /* get interrupt source(s) */ if (!intsrc) - return; + return IRQ_NONE; (void)inb(s->sbbase+0xe); /* clear interrupt */ spin_lock(&s->lock); /* clear audio interrupts first */ @@ -1711,6 +1711,7 @@ static void solo1_interrupt(int irq, voi solo1_update_ptr(s); solo1_handle_midi(s); spin_unlock(&s->lock); + return IRQ_HANDLED; } static void solo1_midi_timer(unsigned long data) --- linux-2.5.68/sound/oss/gus_card.c 2003-01-16 18:21:33.000000000 -0800 +++ 25/sound/oss/gus_card.c 2003-04-21 00:32:53.000000000 -0700 @@ -25,7 +25,7 @@ #include "gus.h" #include "gus_hw.h" -void gusintr(int irq, void *dev_id, struct pt_regs *dummy); +irqreturn_t gusintr(int irq, void *dev_id, struct pt_regs *dummy); int gus_base = 0, gus_irq = 0, gus_dma = 0; int gus_no_wave_dma = 0; @@ -119,10 +119,11 @@ static void __exit unload_gus(struct add sound_free_dma(hw_config->dma2); } -void gusintr(int irq, void *dev_id, struct pt_regs *dummy) +irqreturn_t gusintr(int irq, void *dev_id, struct pt_regs *dummy) { unsigned char src; extern int gus_timer_enabled; + int handled = 0; #ifdef CONFIG_SOUND_GUSMAX if (have_gus_max) { @@ -140,8 +141,8 @@ void gusintr(int irq, void *dev_id, stru while (1) { if (!(src = inb(u_IrqStatus))) - return; - + break; + handled = 1; if (src & DMA_TC_IRQ) { guswave_dma_irq(); @@ -160,6 +161,7 @@ void gusintr(int irq, void *dev_id, stru if (src & (WAVETABLE_IRQ | ENVELOPE_IRQ)) gus_voice_irq(); } + return IRQ_RETVAL(handled); } /* --- linux-2.5.68/sound/oss/gus.h 2003-01-16 18:22:40.000000000 -0800 +++ 25/sound/oss/gus.h 2003-04-21 00:32:53.000000000 -0700 @@ -3,7 +3,7 @@ /* From gus_card.c */ int gus_set_midi_irq(int num); -void gusintr(int irq, void *dev_id, struct pt_regs * dummy); +irqreturn_t gusintr(int irq, void *dev_id, struct pt_regs * dummy); /* From gus_wave.c */ int gus_wave_detect(int baseaddr); --- linux-2.5.68/sound/oss/gus_wave.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/gus_wave.c 2003-04-21 00:32:53.000000000 -0700 @@ -508,7 +508,7 @@ static void step_envelope(int voice) { unsigned vol, prev_vol, phase; unsigned char rate; - long int flags; + unsigned long flags; if (voices[voice].mode & WAVE_SUSTAIN_ON && voices[voice].env_phase == 2) { @@ -593,7 +593,7 @@ static void start_release(int voice) static void gus_voice_fade(int voice) { int instr_no = sample_map[voice], is16bits; - long int flags; + unsigned long flags; spin_lock_irqsave(&gus_lock,flags); gus_select_voice(voice); @@ -1511,7 +1511,7 @@ static int guswave_start_note2(int dev, static int guswave_start_note(int dev, int voice, int note_num, int volume) { - long int flags; + unsigned long flags; int mode; int ret_val = 0; --- linux-2.5.68/sound/oss/i810_audio.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/i810_audio.c 2003-04-21 00:32:53.000000000 -0700 @@ -1389,7 +1389,7 @@ static void i810_channel_interrupt(struc #endif } -static void i810_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t i810_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct i810_card *card = (struct i810_card *)dev_id; u32 status; @@ -1401,7 +1401,7 @@ static void i810_interrupt(int irq, void if(!(status & INT_MASK)) { spin_unlock(&card->lock); - return; /* not for us */ + return IRQ_NONE; /* not for us */ } if(status & (INT_PO|INT_PI|INT_MC)) @@ -1410,6 +1410,7 @@ static void i810_interrupt(int irq, void /* clear 'em */ outl(status & INT_MASK, card->iobase + GLOB_STA); spin_unlock(&card->lock); + return IRQ_HANDLED; } /* in this loop, dmabuf.count signifies the amount of data that is --- linux-2.5.68/sound/oss/ite8172.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/ite8172.c 2003-04-21 00:32:53.000000000 -0700 @@ -727,7 +727,7 @@ static inline int prog_dmabuf_dac(struct /* hold spinlock for the following! */ -static void it8172_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t it8172_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct it8172_state *s = (struct it8172_state *)dev_id; struct dmabuf* dac = &s->dma_dac; @@ -741,8 +741,10 @@ static void it8172_interrupt(int irq, vo isc = inb(s->io+IT_AC_ISC); /* fastpath out, to ease interrupt sharing */ - if (!(isc & (ISC_VCI | ISC_CCI | ISC_PCI))) - return; + if (!(isc & (ISC_VCI | ISC_CCI | ISC_PCI))) { + spin_unlock(&s->lock); + return IRQ_NONE; + } /* clear audio interrupts first */ outb(isc | ISC_VCI | ISC_CCI | ISC_PCI, s->io+IT_AC_ISC); @@ -819,6 +821,7 @@ static void it8172_interrupt(int irq, vo } spin_unlock(&s->lock); + return IRQ_HANDLED; } /* --------------------------------------------------------------------- */ --- linux-2.5.68/sound/oss/Kconfig 2003-03-24 15:36:54.000000000 -0800 +++ 25/sound/oss/Kconfig 2003-04-21 00:31:39.000000000 -0700 @@ -872,7 +872,7 @@ config SOUND_AWE32_SYNTH Say Y here if you have a Sound Blaster SB32, AWE32-PnP, SB AWE64 or similar sound card. See , and the Soundblaster-AWE - mini-HOWTO, available from + mini-HOWTO, available from for more info. config SOUND_WAVEFRONT --- linux-2.5.68/sound/oss/maestro3.c 2003-03-04 20:02:40.000000000 -0800 +++ 25/sound/oss/maestro3.c 2003-04-21 00:32:53.000000000 -0700 @@ -1232,7 +1232,7 @@ static void m3_update_ptr(struct m3_stat } } -static void m3_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t m3_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct m3_card *c = (struct m3_card *)dev_id; struct m3_state *s = &c->channels[0]; @@ -1240,13 +1240,14 @@ static void m3_interrupt(int irq, void * status = inb(c->iobase+0x1A); - if(status == 0xff) return; + if(status == 0xff) + return IRQ_NONE; /* presumably acking the ints? */ outw(status, c->iobase+0x1A); if(c->in_suspend) - return; + return IRQ_HANDLED; /* * ack an assp int if its running @@ -1269,6 +1270,7 @@ static void m3_interrupt(int irq, void * /* XXX is this needed? */ if(status & 0x40) outb(0x40, c->iobase+0x1A); + return IRQ_HANDLED; } --- linux-2.5.68/sound/oss/maestro.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/maestro.c 2003-04-21 00:32:53.000000000 -0700 @@ -1631,7 +1631,7 @@ static inline unsigned get_dmac(struct e * Meet Bob, the timer... */ -static void ess_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t ess_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void stop_bob(struct ess_state *s) { @@ -1900,7 +1900,7 @@ ess_update_ptr(struct ess_state *s) } } -static void +static irqreturn_t ess_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct ess_state *s; @@ -1908,7 +1908,8 @@ ess_interrupt(int irq, void *dev_id, str int i; u32 event; - if ( ! (event = inb(c->iobase+0x1A)) ) return; + if ( ! (event = inb(c->iobase+0x1A)) ) + return IRQ_NONE; outw(inw(c->iobase+4)&1, c->iobase+4); @@ -1972,6 +1973,7 @@ ess_interrupt(int irq, void *dev_id, str ess_update_ptr(s); spin_unlock(&s->lock); } + return IRQ_HANDLED; } --- linux-2.5.68/sound/oss/maui.c 2003-01-16 18:22:26.000000000 -0800 +++ 25/sound/oss/maui.c 2003-04-21 00:32:53.000000000 -0700 @@ -102,9 +102,10 @@ static int maui_write(unsigned char data return 0; } -static void mauiintr(int irq, void *dev_id, struct pt_regs *dummy) +static irqreturn_t mauiintr(int irq, void *dev_id, struct pt_regs *dummy) { irq_ok = 1; + return IRQ_HANDLED; } static int __init download_code(void) --- linux-2.5.68/sound/oss/mpu401.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/mpu401.c 2003-04-21 00:32:53.000000000 -0700 @@ -444,15 +444,17 @@ int intchk_mpu401(void *dev_id) return input_avail(devc); } -void mpuintr(int irq, void *dev_id, struct pt_regs *dummy) +irqreturn_t mpuintr(int irq, void *dev_id, struct pt_regs *dummy) { struct mpu_config *devc; int dev = (int) dev_id; + int handled = 0; devc = &dev_conf[dev]; if (input_avail(devc)) { + handled = 1; if (devc->base != 0 && (devc->opened & OPEN_READ || devc->mode == MODE_SYNTH)) mpu401_input_loop(devc); else @@ -461,6 +463,7 @@ void mpuintr(int irq, void *dev_id, stru read_data(devc); } } + return IRQ_RETVAL(handled); } static int mpu401_open(int dev, int mode, @@ -500,7 +503,7 @@ static int mpu401_open(int dev, int mode { if (!try_module_get(coprocessor->owner)) { mpu401_close(dev); - return err; + return -ENODEV; } if ((err = coprocessor->open(coprocessor->devc, COPR_MIDI)) < 0) @@ -839,7 +842,7 @@ static int mpu_synth_open(int dev, int m coprocessor = midi_devs[midi_dev]->coproc; if (coprocessor) { if (!try_module_get(coprocessor->owner)) - return err; + return -ENODEV; if ((err = coprocessor->open(coprocessor->devc, COPR_MIDI)) < 0) { --- linux-2.5.68/sound/oss/mpu401.h 2003-01-16 18:22:04.000000000 -0800 +++ 25/sound/oss/mpu401.h 2003-04-21 00:32:53.000000000 -0700 @@ -3,7 +3,7 @@ int probe_uart401 (struct address_info *hw_config, struct module *owner); void unload_uart401 (struct address_info *hw_config); -void uart401intr (int irq, void *dev_id, struct pt_regs * dummy); +irqreturn_t uart401intr (int irq, void *dev_id, struct pt_regs * dummy); /* From mpu401.c */ int probe_mpu401(struct address_info *hw_config); @@ -11,4 +11,4 @@ int attach_mpu401(struct address_info * void unload_mpu401(struct address_info *hw_info); int intchk_mpu401(void *dev_id); -void mpuintr(int irq, void *dev_id, struct pt_regs * dummy); +irqreturn_t mpuintr(int irq, void *dev_id, struct pt_regs * dummy); --- linux-2.5.68/sound/oss/msnd_pinnacle.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/msnd_pinnacle.c 2003-04-21 00:32:53.000000000 -0700 @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -1061,7 +1062,7 @@ static __inline__ void eval_dsp_msg(regi } } -static void intr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t intr(int irq, void *dev_id, struct pt_regs *regs) { /* Send ack to DSP */ inb(dev.io + HP_RXL); @@ -1077,6 +1078,7 @@ static void intr(int irq, void *dev_id, else isa_writew(wTmp, dev.DSPQ + JQS_wHead); } + return IRQ_HANDLED; } static struct file_operations dev_fileops = { --- linux-2.5.68/sound/oss/nec_vrc5477.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/nec_vrc5477.c 2003-04-21 00:32:53.000000000 -0700 @@ -813,7 +813,7 @@ static inline void vrc5477_ac97_dac_inte wake_up_interruptible(&dac->wait); } -static void vrc5477_ac97_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t vrc5477_ac97_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct vrc5477_ac97_state *s = (struct vrc5477_ac97_state *)dev_id; u32 irqStatus; @@ -851,6 +851,7 @@ static void vrc5477_ac97_interrupt(int i } spin_unlock(&s->lock); + return IRQ_HANDLED; } /* --------------------------------------------------------------------- */ --- linux-2.5.68/sound/oss/nm256_audio.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/nm256_audio.c 2003-04-21 00:32:53.000000000 -0700 @@ -44,8 +44,8 @@ static struct audio_driver nm256_audio_d static int nm256_grabInterrupt (struct nm256_info *card); static int nm256_releaseInterrupt (struct nm256_info *card); -static void nm256_interrupt (int irq, void *dev_id, struct pt_regs *dummy); -static void nm256_interrupt_zx (int irq, void *dev_id, struct pt_regs *dummy); +static irqreturn_t nm256_interrupt (int irq, void *dev_id, struct pt_regs *dummy); +static irqreturn_t nm256_interrupt_zx (int irq, void *dev_id, struct pt_regs *dummy); static int handle_pm_event (struct pm_dev *dev, pm_request_t rqst, void *data); /* These belong in linux/pci.h. */ @@ -528,16 +528,17 @@ nm256_initHw (struct nm256_info *card) * I suppose...yucky bleah.) */ -static void +static irqreturn_t nm256_interrupt (int irq, void *dev_id, struct pt_regs *dummy) { struct nm256_info *card = (struct nm256_info *)dev_id; u16 status; static int badintrcount = 0; + int handled = 0; if ((card == NULL) || (card->magsig != NM_MAGIC_SIG)) { printk (KERN_ERR "NM256: Bad card pointer\n"); - return; + return IRQ_NONE; } status = nm256_readPort16 (card, 2, NM_INT_REG); @@ -558,13 +559,14 @@ nm256_interrupt (int irq, void *dev_id, * inserted a PCMCIA card and someone's spamming us with IRQ 9s. */ + handled = 1; if (card->playing) stopPlay (card); if (card->recording) stopRecord (card); badintrcount = 0; } - return; + return IRQ_RETVAL(handled); } badintrcount = 0; @@ -572,6 +574,7 @@ nm256_interrupt (int irq, void *dev_id, /* Rather boring; check for individual interrupts and process them. */ if (status & NM_PLAYBACK_INT) { + handled = 1; status &= ~NM_PLAYBACK_INT; NM_ACK_INT (card, NM_PLAYBACK_INT); @@ -580,6 +583,7 @@ nm256_interrupt (int irq, void *dev_id, } if (status & NM_RECORD_INT) { + handled = 1; status &= ~NM_RECORD_INT; NM_ACK_INT (card, NM_RECORD_INT); @@ -590,6 +594,7 @@ nm256_interrupt (int irq, void *dev_id, if (status & NM_MISC_INT_1) { u8 cbyte; + handled = 1; status &= ~NM_MISC_INT_1; printk (KERN_ERR "NM256: Got misc interrupt #1\n"); NM_ACK_INT (card, NM_MISC_INT_1); @@ -601,6 +606,7 @@ nm256_interrupt (int irq, void *dev_id, if (status & NM_MISC_INT_2) { u8 cbyte; + handled = 1; status &= ~NM_MISC_INT_2; printk (KERN_ERR "NM256: Got misc interrupt #2\n"); NM_ACK_INT (card, NM_MISC_INT_2); @@ -610,11 +616,13 @@ nm256_interrupt (int irq, void *dev_id, /* Unknown interrupt. */ if (status) { + handled = 1; printk (KERN_ERR "NM256: Fire in the hole! Unknown status 0x%x\n", status); /* Pray. */ NM_ACK_INT (card, status); } + return IRQ_RETVAL(handled); } /* @@ -623,16 +631,17 @@ nm256_interrupt (int irq, void *dev_id, * routine. */ -static void +static irqreturn_t nm256_interrupt_zx (int irq, void *dev_id, struct pt_regs *dummy) { struct nm256_info *card = (struct nm256_info *)dev_id; u32 status; static int badintrcount = 0; + int handled = 0; if ((card == NULL) || (card->magsig != NM_MAGIC_SIG)) { printk (KERN_ERR "NM256: Bad card pointer\n"); - return; + return IRQ_NONE; } status = nm256_readPort32 (card, 2, NM_INT_REG); @@ -655,13 +664,14 @@ nm256_interrupt_zx (int irq, void *dev_i * IRQ 9s. */ + handled = 1; if (card->playing) stopPlay (card); if (card->recording) stopRecord (card); badintrcount = 0; } - return; + return IRQ_RETVAL(handled); } badintrcount = 0; @@ -669,6 +679,7 @@ nm256_interrupt_zx (int irq, void *dev_i /* Rather boring; check for individual interrupts and process them. */ if (status & NM2_PLAYBACK_INT) { + handled = 1; status &= ~NM2_PLAYBACK_INT; NM2_ACK_INT (card, NM2_PLAYBACK_INT); @@ -677,6 +688,7 @@ nm256_interrupt_zx (int irq, void *dev_i } if (status & NM2_RECORD_INT) { + handled = 1; status &= ~NM2_RECORD_INT; NM2_ACK_INT (card, NM2_RECORD_INT); @@ -687,6 +699,7 @@ nm256_interrupt_zx (int irq, void *dev_i if (status & NM2_MISC_INT_1) { u8 cbyte; + handled = 1; status &= ~NM2_MISC_INT_1; printk (KERN_ERR "NM256: Got misc interrupt #1\n"); NM2_ACK_INT (card, NM2_MISC_INT_1); @@ -697,6 +710,7 @@ nm256_interrupt_zx (int irq, void *dev_i if (status & NM2_MISC_INT_2) { u8 cbyte; + handled = 1; status &= ~NM2_MISC_INT_2; printk (KERN_ERR "NM256: Got misc interrupt #2\n"); NM2_ACK_INT (card, NM2_MISC_INT_2); @@ -706,11 +720,13 @@ nm256_interrupt_zx (int irq, void *dev_i /* Unknown interrupt. */ if (status) { + handled = 1; printk (KERN_ERR "NM256: Fire in the hole! Unknown status 0x%x\n", status); /* Pray. */ NM2_ACK_INT (card, status); } + return IRQ_RETVAL(handled); } /* --- linux-2.5.68/sound/oss/nm256.h 2003-01-16 18:22:20.000000000 -0800 +++ 25/sound/oss/nm256.h 2003-04-21 00:32:53.000000000 -0700 @@ -2,6 +2,8 @@ #define _NM256_H_ #include +#include + #include "ac97.h" /* The revisions that we currently handle. */ @@ -113,7 +115,7 @@ struct nm256_info int has_irq; /* The card interrupt service routine. */ - void (*introutine) (int, void *, struct pt_regs *); + irqreturn_t (*introutine) (int, void *, struct pt_regs *); /* Current audio config, cached. */ struct sinfo { --- linux-2.5.68/sound/oss/pas2_card.c 2003-01-16 18:22:24.000000000 -0800 +++ 25/sound/oss/pas2_card.c 2003-04-21 00:32:53.000000000 -0700 @@ -89,7 +89,7 @@ void pas_write(unsigned char data, int i /******************* Begin of the Interrupt Handler ********************/ -void pasintr(int irq, void *dev_id, struct pt_regs *dummy) +static irqreturn_t pasintr(int irq, void *dev_id, struct pt_regs *dummy) { int status; @@ -106,6 +106,7 @@ void pasintr(int irq, void *dev_id, stru pas_midi_interrupt(); status &= ~0x10; } + return IRQ_HANDLED; } int pas_set_intr(int mask) --- linux-2.5.68/sound/oss/pss.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/pss.c 2003-04-21 00:32:53.000000000 -0700 @@ -152,7 +152,7 @@ static int pss_enable_joystick = 0;/* Pa static void pss_write(pss_confdata *devc, int data) { - int i, limit; + unsigned long i, limit; limit = jiffies + HZ/10; /* The timeout is 0.1 seconds */ /* @@ -305,7 +305,8 @@ static int pss_get_dspword(pss_confdata static int pss_download_boot(pss_confdata * devc, unsigned char *block, int size, int flags) { - int i, limit, val, count; + int i, val, count; + unsigned long limit; if (flags & CPF_FIRST) { --- linux-2.5.68/sound/oss/rme96xx.c 2003-03-04 20:02:40.000000000 -0800 +++ 25/sound/oss/rme96xx.c 2003-04-21 00:32:53.000000000 -0700 @@ -542,7 +542,7 @@ static inline int rme96xx_spdif_sample_r inline int rme96xx_gethwptr(rme96xx_info* s,int exact) { - long flags; + unsigned long flags; if (exact) { unsigned int hwp; /* the hwptr seems to be rather unreliable :(, so we don't use it */ @@ -587,7 +587,7 @@ static void rme96xx_clearbufs(struct dma static int rme96xx_startcard(rme96xx_info *s,int stop) { int i; - long flags; + unsigned long flags; COMM ("startcard"); if(s->control_register & RME96xx_IE){ @@ -760,7 +760,7 @@ inline int rme96xx_copytouser(struct dma } -static void rme96xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t rme96xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) { int i; rme96xx_info *s = (rme96xx_info *)dev_id; @@ -770,7 +770,7 @@ static void rme96xx_interrupt(int irq, v status = readl(s->iobase + RME96xx_status_register); if (!(status & RME96xx_IRQ)) { - return; + return IRQ_NONE; } spin_lock_irqsave(&s->lock,flags); @@ -785,6 +785,7 @@ static void rme96xx_interrupt(int irq, v wake_up(&(db->wait)); } spin_unlock_irqrestore(&s->lock,flags); + return IRQ_HANDLED; } --- linux-2.5.68/sound/oss/sb_common.c 2003-01-16 18:21:37.000000000 -0800 +++ 25/sound/oss/sb_common.c 2003-04-21 00:32:53.000000000 -0700 @@ -201,7 +201,7 @@ static void pci_intr(sb_devc *devc) sb_intr(devc); } -static void sbintr(int irq, void *dev_id, struct pt_regs *dummy) +static irqreturn_t sbintr(int irq, void *dev_id, struct pt_regs *dummy) { sb_devc *devc = dev_id; @@ -219,6 +219,7 @@ static void sbintr(int irq, void *dev_id sb_intr (devc); break; } + return IRQ_HANDLED; } int sb_dsp_reset(sb_devc * devc) --- linux-2.5.68/sound/oss/sonicvibes.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/sonicvibes.c 2003-04-21 00:32:53.000000000 -0700 @@ -899,7 +899,7 @@ static void sv_handle_midi(struct sv_sta wake_up(&s->midi.owait); } -static void sv_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t sv_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct sv_state *s = (struct sv_state *)dev_id; unsigned int intsrc; @@ -907,11 +907,12 @@ static void sv_interrupt(int irq, void * /* fastpath out, to ease interrupt sharing */ intsrc = inb(s->ioenh + SV_CODEC_STATUS); if (!(intsrc & (SV_CSTAT_DMAA | SV_CSTAT_DMAC | SV_CSTAT_MIDI))) - return; + return IRQ_NONE; spin_lock(&s->lock); sv_update_ptr(s); sv_handle_midi(s); spin_unlock(&s->lock); + return IRQ_HANDLED; } static void sv_midi_timer(unsigned long data) --- linux-2.5.68/sound/oss/trident.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/trident.c 2003-04-21 00:32:53.000000000 -0700 @@ -1728,7 +1728,7 @@ static void cyber_address_interrupt(stru } } -static void trident_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t trident_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct trident_card *card = (struct trident_card *)dev_id; u32 event; @@ -1755,13 +1755,14 @@ static void trident_interrupt(int irq, v event = inl(TRID_REG(card, T4D_MISCINT)); outl(event | (ST_TARGET_REACHED | MIXER_OVERFLOW | MIXER_UNDERFLOW), TRID_REG(card, T4D_MISCINT)); spin_unlock(&card->lock); - return; + return IRQ_HANDLED; } /* manually clear interrupt status, bad hardware design, blame T^2 */ outl((ST_TARGET_REACHED | MIXER_OVERFLOW | MIXER_UNDERFLOW), TRID_REG(card, T4D_MISCINT)); spin_unlock(&card->lock); + return IRQ_HANDLED; } /* in this loop, dmabuf.count signifies the amount of data that is waiting to be copied to --- linux-2.5.68/sound/oss/uart401.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/uart401.c 2003-04-21 00:32:53.000000000 -0700 @@ -96,18 +96,19 @@ static void uart401_input_loop(uart401_d printk(KERN_WARNING "Too much work in interrupt on uart401 (0x%X). UART jabbering ??\n", devc->base); } -void uart401intr(int irq, void *dev_id, struct pt_regs *dummy) +irqreturn_t uart401intr(int irq, void *dev_id, struct pt_regs *dummy) { uart401_devc *devc = dev_id; if (devc == NULL) { printk(KERN_ERR "uart401: bad devc\n"); - return; + return IRQ_NONE; } if (input_avail(devc)) uart401_input_loop(devc); + return IRQ_HANDLED; } static int --- linux-2.5.68/sound/oss/uart6850.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/uart6850.c 2003-04-21 00:32:53.000000000 -0700 @@ -105,10 +105,11 @@ static void uart6850_input_loop(void) } } -void m6850intr(int irq, void *dev_id, struct pt_regs *dummy) +static irqreturn_t m6850intr(int irq, void *dev_id, struct pt_regs *dummy) { if (input_avail()) uart6850_input_loop(); + return IRQ_HANDLED; } /* --- linux-2.5.68/sound/oss/via82cxxx_audio.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/via82cxxx_audio.c 2003-04-21 00:32:53.000000000 -0700 @@ -1694,10 +1694,11 @@ static void via_intr_channel (struct via } -static void via_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t via_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct via_info *card = dev_id; u32 status32; + int handled = 0; /* to minimize interrupt sharing costs, we use the SGD status * shadow register to check the status of all inputs and @@ -1708,10 +1709,12 @@ static void via_interrupt(int irq, void if (!(status32 & VIA_INTR_MASK)) { #ifdef CONFIG_MIDI_VIA82CXXX - if (card->midi_devc) + if (card->midi_devc) { uart401intr(irq, card->midi_devc, regs); + handled = 1; + } #endif - return; + goto out; } DPRINTK ("intr, status32 == 0x%08X\n", status32); @@ -1720,14 +1723,21 @@ static void via_interrupt(int irq, void */ spin_lock (&card->lock); - if (status32 & VIA_INTR_OUT) + if (status32 & VIA_INTR_OUT) { + handled = 1; via_intr_channel (&card->ch_out); - if (status32 & VIA_INTR_IN) + } + if (status32 & VIA_INTR_IN) { + handled = 1; via_intr_channel (&card->ch_in); - if (status32 & VIA_INTR_FM) + } + if (status32 & VIA_INTR_FM) { + handled = 1; via_intr_channel (&card->ch_fm); - + } spin_unlock (&card->lock); +out: + return IRQ_RETVAL(handled); } --- linux-2.5.68/sound/oss/vidc_fill.S 2003-01-16 18:22:22.000000000 -0800 +++ 25/sound/oss/vidc_fill.S 2003-04-21 00:32:53.000000000 -0700 @@ -133,6 +133,10 @@ ENTRY(vidc_clear) * ip = corrupted */ +%%%%%%%%%%%%%%%%%%% +fixme! This funtion needs to return IRQ_HANDLED +%%%%%%%%%%%%%%%%%%% + ENTRY(vidc_sound_dma_irq) stmfd sp!, {r4 - r8, lr} ldr r8, =dma_start --- linux-2.5.68/sound/oss/vidc.h 2003-01-16 18:21:35.000000000 -0800 +++ 25/sound/oss/vidc.h 2003-04-21 00:32:53.000000000 -0700 @@ -37,7 +37,7 @@ extern unsigned long vidc_fill_2x16_s(un * DMA Interrupt handler */ -extern void vidc_sound_dma_irq(int irqnr, void *ref, struct pt_regs *regs); +extern irqreturn_t vidc_sound_dma_irq(int irqnr, void *ref, struct pt_regs *regs); /* * Filler routine pointer --- linux-2.5.68/sound/oss/vwsnd.c 2003-02-24 13:08:47.000000000 -0800 +++ 25/sound/oss/vwsnd.c 2003-04-21 00:32:53.000000000 -0700 @@ -2236,7 +2236,7 @@ static void vwsnd_audio_write_intr(vwsnd pcm_output(devc, underflown, 0); } -static void vwsnd_audio_intr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t vwsnd_audio_intr(int irq, void *dev_id, struct pt_regs *regs) { vwsnd_dev_t *devc = (vwsnd_dev_t *) dev_id; unsigned int status; @@ -2246,6 +2246,7 @@ static void vwsnd_audio_intr(int irq, vo status = li_get_clear_intr_status(&devc->lith); vwsnd_audio_read_intr(devc, status); vwsnd_audio_write_intr(devc, status); + return IRQ_HANDLED; } static ssize_t vwsnd_audio_do_read(struct file *file, --- linux-2.5.68/sound/oss/waveartist.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/waveartist.c 2003-04-21 00:32:53.000000000 -0700 @@ -833,7 +833,7 @@ static struct audio_driver waveartist_au }; -static void +static irqreturn_t waveartist_intr(int irq, void *dev_id, struct pt_regs *regs) { wavnc_info *devc = (wavnc_info *)dev_id; @@ -872,6 +872,7 @@ waveartist_intr(int irq, void *dev_id, s // We do not use SB mode natively... printk(KERN_WARNING "waveartist: Unexpected SB interrupt...\n"); spin_unlock(&waveartist_lock); + return IRQ_HANDLED; } /* ------------------------------------------------------------------------- --- linux-2.5.68/sound/oss/wavfront.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/wavfront.c 2003-04-21 00:32:53.000000000 -0700 @@ -2123,8 +2123,8 @@ static void __exit unload_wavefront (str /* WaveFront: Linux modular sound kernel installation interface */ /***********************************************************************/ -void -wavefrontintr (int irq, void *dev_id, struct pt_regs *dummy) +static irqreturn_t +wavefrontintr(int irq, void *dev_id, struct pt_regs *dummy) { struct wf_config *hw = dev_id; @@ -2149,12 +2149,13 @@ wavefrontintr (int irq, void *dev_id, st */ if ((wavefront_status() & (STAT_INTR_READ|STAT_INTR_WRITE)) == 0) { - return; + return IRQ_NONE; } hw->irq_ok = 1; hw->irq_cnt++; wake_up_interruptible (&hw->interrupt_sleeper); + return IRQ_HANDLED; } /* STATUS REGISTER --- linux-2.5.68/sound/oss/wf_midi.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/wf_midi.c 2003-04-21 00:32:53.000000000 -0700 @@ -354,8 +354,8 @@ wf_mpu_input_scanner (int devno, int syn return 1; } -void -wf_mpuintr (int irq, void *dev_id, struct pt_regs *dummy) +static irqreturn_t +wf_mpuintr(int irq, void *dev_id, struct pt_regs *dummy) { struct wf_mpu_config *physical_dev = dev_id; @@ -364,10 +364,11 @@ wf_mpuintr (int irq, void *dev_id, struc int n; if (!input_avail()) { /* not for us */ - return; + return IRQ_NONE; } - if (mi->m_busy) return; + if (mi->m_busy) + return IRQ_HANDLED; spin_lock(&lock); mi->m_busy = 1; @@ -410,6 +411,7 @@ wf_mpuintr (int irq, void *dev_id, struc mi->m_busy = 0; spin_unlock(&lock); + return IRQ_HANDLED; } static int --- linux-2.5.68/sound/oss/ymfpci.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/oss/ymfpci.c 2003-04-21 00:32:53.000000000 -0700 @@ -1016,7 +1016,7 @@ static int ymf_capture_prepare(struct ym return 0; } -void ymf_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t ymf_interrupt(int irq, void *dev_id, struct pt_regs *regs) { ymfpci_t *codec = dev_id; u32 status, nvoice, mode; @@ -1050,6 +1050,7 @@ void ymf_interrupt(int irq, void *dev_id /* timer handler */ ymfpci_writel(codec, YDSXGR_INTFLAG, ~0); } + return IRQ_HANDLED; } static void ymf_pcm_free_substream(struct ymf_pcm *ypcm) --- linux-2.5.68/sound/pci/ali5451/ali5451.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/ali5451/ali5451.c 2003-04-21 00:32:53.000000000 -0700 @@ -1032,15 +1032,16 @@ static void snd_ali_interrupt(ali_t * co } -static void snd_ali_card_interrupt(int irq, +static irqreturn_t snd_ali_card_interrupt(int irq, void *dev_id, struct pt_regs *regs) { ali_t *codec = snd_magic_cast(ali_t, dev_id, return); if (codec == NULL) - return; + return IRQ_NONE; snd_ali_interrupt(codec); + return IRQ_HANDLED; } --- linux-2.5.68/sound/pci/als4000.c 2003-02-24 13:08:47.000000000 -0800 +++ 25/sound/pci/als4000.c 2003-04-21 00:32:53.000000000 -0700 @@ -356,7 +356,7 @@ static snd_pcm_uframes_t snd_als4000_pla return bytes_to_frames( substream->runtime, result ); } -static void snd_als4000_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_als4000_interrupt(int irq, void *dev_id, struct pt_regs *regs) { sb_t *chip = snd_magic_cast(sb_t, dev_id, return); unsigned long flags; @@ -387,6 +387,7 @@ static void snd_als4000_interrupt(int ir inb(chip->mpu_port); if (sb_status & 0x20) inb(SBP(chip, RESET)); + return IRQ_HANDLED; } /*****************************************************************/ --- linux-2.5.68/sound/pci/cmipci.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/cmipci.c 2003-04-21 00:32:53.000000000 -0700 @@ -1640,7 +1640,7 @@ static int snd_cmipci_capture_spdif_hw_f /* * interrupt handler */ -static void snd_cmipci_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_cmipci_interrupt(int irq, void *dev_id, struct pt_regs *regs) { cmipci_t *cm = snd_magic_cast(cmipci_t, dev_id, return); unsigned int status, mask = 0; @@ -1648,7 +1648,7 @@ static void snd_cmipci_interrupt(int irq /* fastpath out, to ease interrupt sharing */ status = snd_cmipci_read(cm, CM_REG_INT_STATUS); if (!(status & CM_INTR)) - return; + return IRQ_NONE; /* acknowledge interrupt */ spin_lock(&cm->reg_lock); @@ -1669,6 +1669,7 @@ static void snd_cmipci_interrupt(int irq if ((status & CM_CHINT1) && cm->channel[1].running) snd_pcm_period_elapsed(cm->channel[1].substream); } + return IRQ_HANDLED; } /* --- linux-2.5.68/sound/pci/cs4281.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/cs4281.c 2003-04-21 00:32:53.000000000 -0700 @@ -511,7 +511,7 @@ struct snd_cs4281 { }; -static void snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs); static struct pci_device_id snd_cs4281_ids[] __devinitdata = { { 0x1013, 0x6005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4281 */ @@ -1883,18 +1883,18 @@ static int __devinit snd_cs4281_midi(cs4 * Interrupt handler */ -static void snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs) { cs4281_t *chip = snd_magic_cast(cs4281_t, dev_id, return); unsigned int status, dma, val; cs4281_dma_t *cdma; if (chip == NULL) - return; + return IRQ_NONE; status = snd_cs4281_peekBA0(chip, BA0_HISR); if ((status & 0x7fffffff) == 0) { snd_cs4281_pokeBA0(chip, BA0_HICR, BA0_HICR_EOI); - return; + return IRQ_HANDLED; } if (status & (BA0_HISR_DMA(0)|BA0_HISR_DMA(1)|BA0_HISR_DMA(2)|BA0_HISR_DMA(3))) { @@ -1949,6 +1949,7 @@ static void snd_cs4281_interrupt(int irq /* EOI to the PCI part... reenables interrupts */ snd_cs4281_pokeBA0(chip, BA0_HICR, BA0_HICR_EOI); + return IRQ_HANDLED; } --- linux-2.5.68/sound/pci/cs46xx/cs46xx_lib.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/cs46xx/cs46xx_lib.c 2003-04-21 00:32:53.000000000 -0700 @@ -1217,7 +1217,7 @@ static int snd_cs46xx_capture_prepare(sn return 0; } -static void snd_cs46xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_cs46xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) { cs46xx_t *chip = snd_magic_cast(cs46xx_t, dev_id, return); u32 status1; @@ -1234,7 +1234,7 @@ static void snd_cs46xx_interrupt(int irq status1 = snd_cs46xx_peekBA0(chip, BA0_HISR); if ((status1 & 0x7fffffff) == 0) { snd_cs46xx_pokeBA0(chip, BA0_HICR, HICR_CHGM | HICR_IEV); - return; + return IRQ_HANDLED; } #ifdef CONFIG_SND_CS46XX_NEW_DSP @@ -1305,6 +1305,7 @@ static void snd_cs46xx_interrupt(int irq * EOI to the PCI part....reenables interrupts */ snd_cs46xx_pokeBA0(chip, BA0_HICR, HICR_CHGM | HICR_IEV); + return IRQ_HANDLED; } static snd_pcm_hardware_t snd_cs46xx_playback = --- linux-2.5.68/sound/pci/emu10k1/irq.c 2003-01-16 18:22:25.000000000 -0800 +++ 25/sound/pci/emu10k1/irq.c 2003-04-21 00:32:53.000000000 -0700 @@ -30,13 +30,15 @@ #include #include -void snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs) { emu10k1_t *emu = snd_magic_cast(emu10k1_t, dev_id, return); unsigned int status; + int handled = 0; while ((status = inl(emu->port + IPR)) != 0) { // printk("irq - status = 0x%x\n", status); + handled = 1; if (status & IPR_PCIERROR) { snd_printk("interrupt: PCI error\n"); snd_emu10k1_intr_disable(emu, INTE_PCIERRORENABLE); @@ -145,4 +147,5 @@ void snd_emu10k1_interrupt(int irq, void outl(IPR_FXDSP, emu->port + IPR); } } + return IRQ_RETVAL(handled); } --- linux-2.5.68/sound/pci/ens1370.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/ens1370.c 2003-04-21 00:31:39.000000000 -0700 @@ -412,7 +412,7 @@ struct _snd_ensoniq { #endif }; -static void snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs); static struct pci_device_id snd_audiopci_ids[] __devinitdata = { #ifdef CHIP1370 @@ -2231,17 +2231,17 @@ static int __devinit snd_ensoniq_midi(en * Interrupt handler */ -static void snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs) { ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, dev_id, return); unsigned int status, sctrl; if (ensoniq == NULL) - return; + return IRQ_NONE; status = inl(ES_REG(ensoniq, STATUS)); if (!(status & ES_INTR)) - return; + return IRQ_NONE; spin_lock(&ensoniq->reg_lock); sctrl = ensoniq->sctrl; @@ -2263,6 +2263,7 @@ static void snd_audiopci_interrupt(int i snd_pcm_period_elapsed(ensoniq->capture_substream); if ((status & ES_DAC1) && ensoniq->playback1_substream) snd_pcm_period_elapsed(ensoniq->playback1_substream); + return IRQ_HANDLED; } static int __devinit snd_audiopci_probe(struct pci_dev *pci, --- linux-2.5.68/sound/pci/es1938.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/es1938.c 2003-04-21 00:32:53.000000000 -0700 @@ -249,7 +249,7 @@ struct _snd_es1938 { #endif }; -static void snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs); static struct pci_device_id snd_es1938_ids[] __devinitdata = { { 0x125d, 0x1969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Solo-1 */ @@ -1490,10 +1490,11 @@ static int __devinit snd_es1938_create(s /* -------------------------------------------------------------------- * Interrupt handler * -------------------------------------------------------------------- */ -static void snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs) { es1938_t *chip = snd_magic_cast(es1938_t, dev_id, return); unsigned char status, audiostatus; + int handled = 0; status = inb(SLIO_REG(chip, IRQCONTROL)); #if 0 @@ -1509,6 +1510,7 @@ static void snd_es1938_interrupt(int irq printk("Es1938debug - AUDIO channel 1 DMAC DMA status: 0x%x\n", inl(SLDM_REG(chip, DMASTATUS))); #endif /* clear irq */ + handled = 1; audiostatus = inb(SLSB_REG(chip, STATUS)); if (chip->active & ADC1) snd_pcm_period_elapsed(chip->capture_substream); @@ -1525,6 +1527,7 @@ static void snd_es1938_interrupt(int irq #endif /* clear irq */ + handled = 1; snd_es1938_mixer_bits(chip, ESSSB_IREG_AUDIO2CONTROL2, 0x80, 0); if (chip->active & DAC2) snd_pcm_period_elapsed(chip->playback1_substream); @@ -1533,6 +1536,7 @@ static void snd_es1938_interrupt(int irq /* Hardware volume */ if (status & 0x40) { int split = snd_es1938_mixer_read(chip, 0x64) & 0x80; + handled = 1; snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->hw_switch->id); snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->hw_volume->id); if (!split) { @@ -1546,9 +1550,12 @@ static void snd_es1938_interrupt(int irq /* MPU401 */ if (status & 0x80) { // snd_es1938_mixer_bits(chip, ESSSB_IREG_MPU401CONTROL, 0x40, 0); /* ack? */ - if (chip->rmidi) + if (chip->rmidi) { + handled = 1; snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data, regs); + } } + return IRQ_RETVAL(handled); } #define ES1938_DMA_SIZE 64 --- linux-2.5.68/sound/pci/es1968.c 2003-03-24 15:36:55.000000000 -0800 +++ 25/sound/pci/es1968.c 2003-04-21 00:32:53.000000000 -0700 @@ -600,7 +600,7 @@ struct snd_es1968 { #endif }; -static void snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs); static struct pci_device_id snd_es1968_ids[] __devinitdata = { /* Maestro 1 */ @@ -2009,13 +2009,13 @@ static void es1968_update_hw_volume(unsi /* * interrupt handler */ -static void snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs) { es1968_t *chip = snd_magic_cast(es1968_t, dev_id, return); u32 event; if (!(event = inb(chip->io_port + 0x1A))) - return; + return IRQ_NONE; outw(inw(chip->io_port + 4) & 1, chip->io_port + 4); @@ -2041,6 +2041,7 @@ static void snd_es1968_interrupt(int irq } spin_unlock(&chip->substream_lock); } + return IRQ_HANDLED; } /* --- linux-2.5.68/sound/pci/fm801.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/fm801.c 2003-04-21 00:32:53.000000000 -0700 @@ -481,7 +481,7 @@ static snd_pcm_uframes_t snd_fm801_captu return bytes_to_frames(substream->runtime, ptr); } -static void snd_fm801_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_fm801_interrupt(int irq, void *dev_id, struct pt_regs *regs) { fm801_t *chip = snd_magic_cast(fm801_t, dev_id, return); unsigned short status; @@ -490,7 +490,7 @@ static void snd_fm801_interrupt(int irq, status = inw(FM801_REG(chip, IRQ_STATUS)); status &= FM801_IRQ_PLAYBACK|FM801_IRQ_CAPTURE|FM801_IRQ_MPU|FM801_IRQ_VOLUME; if (! status) - return; + return IRQ_NONE; /* ack first */ outw(status, FM801_REG(chip, IRQ_STATUS)); if (chip->pcm && (status & FM801_IRQ_PLAYBACK) && chip->playback_substream) { @@ -525,6 +525,7 @@ static void snd_fm801_interrupt(int irq, snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data, regs); if (status & FM801_IRQ_VOLUME) ;/* TODO */ + return IRQ_HANDLED; } static snd_pcm_hardware_t snd_fm801_playback = --- linux-2.5.68/sound/pci/ice1712/ice1712.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/ice1712/ice1712.c 2003-04-21 00:32:53.000000000 -0700 @@ -398,15 +398,17 @@ int __devinit snd_ice1712_init_cs8427(ic * Interrupt handler */ -static void snd_ice1712_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_ice1712_interrupt(int irq, void *dev_id, struct pt_regs *regs) { ice1712_t *ice = snd_magic_cast(ice1712_t, dev_id, return); unsigned char status; + int handled = 0; while (1) { status = inb(ICEREG(ice, IRQSTAT)); if (status == 0) break; + handled = 1; if (status & ICE1712_IRQ_MPU1) { if (ice->rmidi[0]) snd_mpu401_uart_interrupt(irq, ice->rmidi[0]->private_data, regs); @@ -462,6 +464,7 @@ static void snd_ice1712_interrupt(int ir outb(ICE1712_IRQ_CONPBK, ICEREG(ice, IRQSTAT)); } } + return IRQ_RETVAL(handled); } --- linux-2.5.68/sound/pci/ice1712/ice1724.c 2003-03-24 15:36:55.000000000 -0800 +++ 25/sound/pci/ice1712/ice1724.c 2003-04-21 00:32:53.000000000 -0700 @@ -194,16 +194,18 @@ static unsigned int snd_vt1724_get_gpio_ * Interrupt handler */ -static void snd_vt1724_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_vt1724_interrupt(int irq, void *dev_id, struct pt_regs *regs) { ice1712_t *ice = snd_magic_cast(ice1712_t, dev_id, return); unsigned char status; + int handled = 0; while (1) { status = inb(ICEREG1724(ice, IRQSTAT)); if (status == 0) break; - + + handled = 1; /* these should probably be separated at some point, but as we don't currently have MPU support on the board I will leave it */ if ((status & VT1724_IRQ_MPU_RX)||(status & VT1724_IRQ_MPU_TX)) { @@ -242,6 +244,7 @@ static void snd_vt1724_interrupt(int irq } } + return IRQ_RETVAL(handled); } /* --- linux-2.5.68/sound/pci/intel8x0.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/intel8x0.c 2003-04-21 00:31:39.000000000 -0700 @@ -716,7 +716,7 @@ static inline void snd_intel8x0_update(i iputbyte(chip, port + ichdev->roff_sr, ICH_FIFOE | ICH_BCIS | ICH_LVBCI); } -static void snd_intel8x0_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_intel8x0_interrupt(int irq, void *dev_id, struct pt_regs *regs) { intel8x0_t *chip = snd_magic_cast(intel8x0_t, dev_id, return); ichdev_t *ichdev; @@ -727,7 +727,7 @@ static void snd_intel8x0_interrupt(int i status = igetdword(chip, chip->int_sta_reg); if ((status & chip->int_sta_mask) == 0) { spin_unlock(&chip->reg_lock); - return; + return IRQ_NONE; } /* ack first */ iputdword(chip, chip->int_sta_reg, status & ~chip->int_sta_mask); @@ -738,6 +738,7 @@ static void snd_intel8x0_interrupt(int i if (status & ichdev->int_sta_mask) snd_intel8x0_update(chip, ichdev); } + return IRQ_HANDLED; } /* --- linux-2.5.68/sound/pci/korg1212/korg1212.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/korg1212/korg1212.c 2003-04-21 00:32:53.000000000 -0700 @@ -1133,18 +1133,18 @@ static void snd_korg1212_OnDSPDownloadCo snd_korg1212_setCardState(korg1212, K1212_STATE_DSP_COMPLETE); } -static void snd_korg1212_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_korg1212_interrupt(int irq, void *dev_id, struct pt_regs *regs) { u32 doorbellValue; korg1212_t *korg1212 = snd_magic_cast(korg1212_t, dev_id, return); if(irq != korg1212->irq) - return; + return IRQ_NONE; doorbellValue = readl(korg1212->inDoorbellPtr); if (!doorbellValue) - return; + return IRQ_HANDLED; spin_lock(&korg1212->lock); @@ -1218,6 +1218,7 @@ static void snd_korg1212_interrupt(int i korg1212->inIRQ--; spin_unlock(&korg1212->lock); + return IRQ_HANDLED; } static int snd_korg1212_downloadDSPCode(korg1212_t *korg1212) --- linux-2.5.68/sound/pci/maestro3.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/maestro3.c 2003-04-21 00:32:53.000000000 -0700 @@ -1549,7 +1549,7 @@ static void snd_m3_update_ptr(m3_t *chip } } -static void +static irqreturn_t snd_m3_interrupt(int irq, void *dev_id, struct pt_regs *regs) { m3_t *chip = snd_magic_cast(m3_t, dev_id, ); @@ -1559,7 +1559,7 @@ snd_m3_interrupt(int irq, void *dev_id, status = inb(chip->iobase + 0x1A); if (status == 0xff) - return; + return IRQ_NONE; /* presumably acking the ints? */ outw(status, chip->iobase + 0x1A); @@ -1592,6 +1592,7 @@ snd_m3_interrupt(int irq, void *dev_id, /* XXX is this needed? */ if (status & 0x40) outb(0x40, chip->iobase+0x1A); + return IRQ_HANDLED; } --- linux-2.5.68/sound/pci/nm256/nm256.c 2003-02-17 16:21:15.000000000 -0800 +++ 25/sound/pci/nm256/nm256.c 2003-04-21 00:32:53.000000000 -0700 @@ -238,7 +238,7 @@ struct snd_nm256 { int mixer_status_mask; /* bit mask to test the mixer status */ int irq; - void (*interrupt)(int, void *, struct pt_regs *); + irqreturn_t (*interrupt)(int, void *, struct pt_regs *); int badintrcount; /* counter to check bogus interrupts */ nm256_stream_t streams[2]; @@ -972,7 +972,7 @@ snd_nm256_intr_check(nm256_t *chip) * I suppose...yucky bleah.) */ -static void +static irqreturn_t snd_nm256_interrupt(int irq, void *dev_id, struct pt_regs *dummy) { nm256_t *chip = snd_magic_cast(nm256_t, dev_id, return); @@ -984,7 +984,7 @@ snd_nm256_interrupt(int irq, void *dev_i /* Not ours. */ if (status == 0) { snd_nm256_intr_check(chip); - return; + return IRQ_NONE; } chip->badintrcount = 0; @@ -1030,6 +1030,7 @@ snd_nm256_interrupt(int irq, void *dev_i } spin_unlock(&chip->reg_lock); + return IRQ_HANDLED; } /* @@ -1038,7 +1039,7 @@ snd_nm256_interrupt(int irq, void *dev_i * routine. */ -static void +static irqreturn_t snd_nm256_interrupt_zx(int irq, void *dev_id, struct pt_regs *dummy) { nm256_t *chip = snd_magic_cast(nm256_t, dev_id, return); @@ -1050,7 +1051,7 @@ snd_nm256_interrupt_zx(int irq, void *de /* Not ours. */ if (status == 0) { snd_nm256_intr_check(chip); - return; + return IRQ_NONE; } chip->badintrcount = 0; @@ -1095,6 +1096,7 @@ snd_nm256_interrupt_zx(int irq, void *de } spin_unlock(&chip->reg_lock); + return IRQ_HANDLED; } /* --- linux-2.5.68/sound/pci/rme32.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/rme32.c 2003-04-21 00:32:53.000000000 -0700 @@ -833,14 +833,14 @@ static void snd_rme32_capture_stop(rme32 writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); } -static void +static irqreturn_t snd_rme32_interrupt(int irq, void *dev_id, struct pt_regs *regs) { rme32_t *rme32 = (rme32_t *) dev_id; rme32->rcreg = readl(rme32->iobase + RME32_IO_CONTROL_REGISTER); if (!(rme32->rcreg & RME32_RCR_IRQ)) { - return; + return IRQ_NONE; } else { if (rme32->capture_substream) { snd_pcm_period_elapsed(rme32->capture_substream); @@ -850,6 +850,7 @@ snd_rme32_interrupt(int irq, void *dev_i } writel(0, rme32->iobase + RME32_IO_CONFIRM_ACTION_IRQ); } + return IRQ_HANDLED; } static unsigned int period_bytes[] = { RME32_BLOCK_SIZE }; --- linux-2.5.68/sound/pci/rme9652/hdsp.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/rme9652/hdsp.c 2003-04-21 00:32:53.000000000 -0700 @@ -3076,7 +3076,7 @@ void hdsp_midi_tasklet(unsigned long arg } } -void snd_hdsp_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_hdsp_interrupt(int irq, void *dev_id, struct pt_regs *regs) { hdsp_t *hdsp = (hdsp_t *) dev_id; unsigned int status; @@ -3094,7 +3094,7 @@ void snd_hdsp_interrupt(int irq, void *d midi1 = status & HDSP_midi1IRQPending; if (!audio && !midi0 && !midi1) { - return; + return IRQ_NONE; } hdsp_write(hdsp, HDSP_interruptConfirmation, 0); @@ -3128,6 +3128,7 @@ void snd_hdsp_interrupt(int irq, void *d } if (schedule) tasklet_hi_schedule(&hdsp->midi_tasklet); + return IRQ_HANDLED; } static snd_pcm_uframes_t snd_hdsp_hw_pointer(snd_pcm_substream_t *substream) --- linux-2.5.68/sound/pci/rme9652/rme9652.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/rme9652/rme9652.c 2003-04-21 00:32:53.000000000 -0700 @@ -1947,12 +1947,12 @@ static void snd_rme9652_set_defaults(rme rme9652_set_rate(rme9652, 48000); } -void snd_rme9652_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_rme9652_interrupt(int irq, void *dev_id, struct pt_regs *regs) { rme9652_t *rme9652 = (rme9652_t *) dev_id; if (!(rme9652_read(rme9652, RME9652_status_register) & RME9652_IRQ)) { - return; + return IRQ_NONE; } rme9652_write(rme9652, RME9652_irq_clear, 0); @@ -1964,6 +1964,7 @@ void snd_rme9652_interrupt(int irq, void if (rme9652->playback_substream) { snd_pcm_period_elapsed(rme9652->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream); } + return IRQ_HANDLED; } static snd_pcm_uframes_t snd_rme9652_hw_pointer(snd_pcm_substream_t *substream) --- linux-2.5.68/sound/pci/rme96.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/rme96.c 2003-04-21 00:32:53.000000000 -0700 @@ -1153,7 +1153,7 @@ snd_rme96_capture_stop(rme96_t *rme96) writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); } -static void +static irqreturn_t snd_rme96_interrupt(int irq, void *dev_id, struct pt_regs *regs) @@ -1165,7 +1165,7 @@ snd_rme96_interrupt(int irq, if (!((rme96->rcreg & RME96_RCR_IRQ) || (rme96->rcreg & RME96_RCR_IRQ_2))) { - return; + return IRQ_NONE; } if (rme96->rcreg & RME96_RCR_IRQ) { @@ -1178,6 +1178,7 @@ snd_rme96_interrupt(int irq, snd_pcm_period_elapsed(rme96->capture_substream); writel(0, rme96->iobase + RME96_IO_CONFIRM_REC_IRQ); } + return IRQ_HANDLED; } static unsigned int period_bytes[] = { RME96_SMALL_BLOCK_SIZE, RME96_LARGE_BLOCK_SIZE }; --- linux-2.5.68/sound/pci/sonicvibes.c 2003-03-24 15:36:55.000000000 -0800 +++ 25/sound/pci/sonicvibes.c 2003-04-21 00:32:53.000000000 -0700 @@ -596,18 +596,18 @@ static int snd_sonicvibes_trigger(sonicv return result; } -static void snd_sonicvibes_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_sonicvibes_interrupt(int irq, void *dev_id, struct pt_regs *regs) { sonicvibes_t *sonic = snd_magic_cast(sonicvibes_t, dev_id, return); unsigned char status; status = inb(SV_REG(sonic, STATUS)); if (!(status & (SV_DMAA_IRQ | SV_DMAC_IRQ | SV_MIDI_IRQ))) - return; + return IRQ_NONE; if (status == 0xff) { /* failure */ outb(sonic->irqmask = ~0, SV_REG(sonic, IRQMASK)); snd_printk("IRQ failure - interrupts disabled!!\n"); - return; + return IRQ_HANDLED; } if (sonic->pcm) { if (status & SV_DMAA_IRQ) @@ -654,6 +654,7 @@ static void snd_sonicvibes_interrupt(int snd_ctl_notify(sonic->card, SNDRV_CTL_EVENT_MASK_VALUE, &sonic->master_mute->id); snd_ctl_notify(sonic->card, SNDRV_CTL_EVENT_MASK_VALUE, &sonic->master_volume->id); } + return IRQ_HANDLED; } /* --- linux-2.5.68/sound/pci/trident/trident_main.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/trident/trident_main.c 2003-04-21 00:32:53.000000000 -0700 @@ -48,7 +48,7 @@ static int snd_trident_pcm_mixer_build(trident_t *trident, snd_trident_voice_t * voice, snd_pcm_substream_t *substream); static int snd_trident_pcm_mixer_free(trident_t *trident, snd_trident_voice_t * voice, snd_pcm_substream_t *substream); -static void snd_trident_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t snd_trident_interrupt(int irq, void *dev_id, struct pt_regs *regs); #ifdef CONFIG_PM static int snd_trident_set_power_state(snd_card_t *card, unsigned int power_state); #endif @@ -3687,7 +3687,7 @@ int snd_trident_free(trident_t *trident) ---------------------------------------------------------------------------*/ -static void snd_trident_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_trident_interrupt(int irq, void *dev_id, struct pt_regs *regs) { trident_t *trident = snd_magic_cast(trident_t, dev_id, return); unsigned int audio_int, chn_int, stimer, channel, mask, tmp; @@ -3696,7 +3696,7 @@ static void snd_trident_interrupt(int ir audio_int = inl(TRID_REG(trident, T4D_MISCINT)); if ((audio_int & (ADDRESS_IRQ|MPU401_IRQ)) == 0) - return; + return IRQ_NONE; if (audio_int & ADDRESS_IRQ) { // get interrupt status for all channels spin_lock(&trident->reg_lock); @@ -3781,6 +3781,7 @@ static void snd_trident_interrupt(int ir } } // outl((ST_TARGET_REACHED | MIXER_OVERFLOW | MIXER_UNDERFLOW), TRID_REG(trident, T4D_MISCINT)); + return IRQ_HANDLED; } /*--------------------------------------------------------------------------- --- linux-2.5.68/sound/pci/via82xx.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/via82xx.c 2003-04-21 00:32:53.000000000 -0700 @@ -574,7 +574,7 @@ static void snd_via82xx_channel_reset(vi * Interrupt handler */ -static void snd_via82xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_via82xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) { via82xx_t *chip = snd_magic_cast(via82xx_t, dev_id, return); unsigned int status; @@ -591,8 +591,8 @@ static void snd_via82xx_interrupt(int ir spin_unlock(&chip->reg_lock); if (chip->rmidi) /* check mpu401 interrupt */ - snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data, regs); - return; + return snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data, regs); + return IRQ_NONE; } // _skip_sgd: @@ -611,6 +611,7 @@ static void snd_via82xx_interrupt(int ir outb(c_status, VIADEV_REG(viadev, OFFSET_STATUS)); /* ack */ } spin_unlock(&chip->reg_lock); + return IRQ_HANDLED; } /* --- linux-2.5.68/sound/pci/ymfpci/ymfpci_main.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/pci/ymfpci/ymfpci_main.c 2003-04-21 00:32:53.000000000 -0700 @@ -741,7 +741,7 @@ static void snd_ymfpci_irq_wait(ymfpci_t } } -static void snd_ymfpci_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_ymfpci_interrupt(int irq, void *dev_id, struct pt_regs *regs) { ymfpci_t *chip = snd_magic_cast(ymfpci_t, dev_id, return); u32 status, nvoice, mode; @@ -787,6 +787,7 @@ static void snd_ymfpci_interrupt(int irq if (chip->rawmidi) snd_mpu401_uart_interrupt(irq, chip->rawmidi->private_data, regs); + return IRQ_HANDLED; } static snd_pcm_hardware_t snd_ymfpci_playback = --- linux-2.5.68/sound/ppc/pmac.c 2003-04-19 20:45:21.000000000 -0700 +++ 25/sound/ppc/pmac.c 2003-04-21 00:32:53.000000000 -0700 @@ -693,23 +693,25 @@ static void snd_pmac_dbdma_reset(pmac_t /* * interrupt handlers */ -static void +static irqreturn_t snd_pmac_tx_intr(int irq, void *devid, struct pt_regs *regs) { pmac_t *chip = snd_magic_cast(pmac_t, devid, return); snd_pmac_pcm_update(chip, &chip->playback); + return IRQ_HANDLED; } -static void +static irqreturn_t snd_pmac_rx_intr(int irq, void *devid, struct pt_regs *regs) { pmac_t *chip = snd_magic_cast(pmac_t, devid, return); snd_pmac_pcm_update(chip, &chip->capture); + return IRQ_HANDLED; } -static void +static irqreturn_t snd_pmac_ctrl_intr(int irq, void *devid, struct pt_regs *regs) { pmac_t *chip = snd_magic_cast(pmac_t, devid, return); @@ -728,6 +730,7 @@ snd_pmac_ctrl_intr(int irq, void *devid, } /* Writing 1s to the CNTLERR and PORTCHG bits clears them... */ out_le32(&chip->awacs->control, ctrl); + return IRQ_HANDLED; } --- linux-2.5.68/sound/ppc/tumbler.c 2003-02-10 12:24:18.000000000 -0800 +++ 25/sound/ppc/tumbler.c 2003-04-21 00:32:53.000000000 -0700 @@ -785,11 +785,14 @@ static void tumbler_update_automute(pmac /* interrupt - headphone plug changed */ -static void headphone_intr(int irq, void *devid, struct pt_regs *regs) +static irqreturn_t headphone_intr(int irq, void *devid, struct pt_regs *regs) { pmac_t *chip = snd_magic_cast(pmac_t, devid, return); - if (chip->update_automute && chip->initialized) + if (chip->update_automute && chip->initialized) { chip->update_automute(chip, 1); + return IRQ_HANDLED; + } + return IRQ_NONE; } /* look for audio-gpio device */ --- linux-2.5.68/sound/sound_core.c 2003-03-24 15:36:55.000000000 -0800 +++ 25/sound/sound_core.c 2003-04-21 00:31:39.000000000 -0700 @@ -54,7 +54,7 @@ struct sound_unit int unit_minor; struct file_operations *unit_fops; struct sound_unit *next; - devfs_handle_t de; + char name[32]; }; #ifdef CONFIG_SOUND_MSNDCLAS @@ -151,30 +151,29 @@ static spinlock_t sound_loader_lock = SP static int sound_insert_unit(struct sound_unit **list, struct file_operations *fops, int index, int low, int top, const char *name, umode_t mode) { + struct sound_unit *s = kmalloc(sizeof(*s), GFP_KERNEL); int r; - struct sound_unit *s=(struct sound_unit *)kmalloc(sizeof(struct sound_unit), GFP_KERNEL); - char name_buf[32]; - if(s==NULL) + if (!s) return -ENOMEM; spin_lock(&sound_loader_lock); - r=__sound_insert_unit(s,list,fops,index,low,top); + r = __sound_insert_unit(s, list, fops, index, low, top); spin_unlock(&sound_loader_lock); - if(r<0) - { - kfree(s); - return r; - } - - if (r < SOUND_STEP) - sprintf (name_buf, "sound/%s", name); + if (r < 0) + goto fail; + else if (r < SOUND_STEP) + sprintf(s->name, "sound/%s", name); else - sprintf (name_buf, "sound/%s%d", name, r / SOUND_STEP); - s->de = devfs_register (NULL, name_buf, - DEVFS_FL_NONE, SOUND_MAJOR, s->unit_minor, - S_IFCHR | mode, fops, NULL); + sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP); + + devfs_register(NULL, s->name, 0, SOUND_MAJOR, s->unit_minor, + S_IFCHR | mode, fops, NULL); + return r; + + fail: + kfree(s); return r; } @@ -192,7 +191,7 @@ static void sound_remove_unit(struct sou p = __sound_remove_unit(list, unit); spin_unlock(&sound_loader_lock); if (p) { - devfs_unregister (p->de); + devfs_remove(p->name); kfree(p); } } --- linux-2.5.68/sound/sparc/amd7930.c 2003-01-16 18:21:41.000000000 -0800 +++ 25/sound/sparc/amd7930.c 2003-04-21 00:32:53.000000000 -0700 @@ -497,7 +497,7 @@ static void __amd7930_update_map(amd7930 __amd7930_write_map(amd); } -static void snd_amd7930_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_amd7930_interrupt(int irq, void *dev_id, struct pt_regs *regs) { amd7930_t *amd = dev_id; unsigned int elapsed; @@ -536,6 +536,7 @@ static void snd_amd7930_interrupt(int ir snd_pcm_period_elapsed(amd->playback_substream); else snd_pcm_period_elapsed(amd->capture_substream); + return IRQ_HANDLED; } static int snd_amd7930_trigger(amd7930_t *amd, unsigned int flag, int cmd) --- linux-2.5.68/sound/sparc/cs4231.c 2003-01-16 18:21:37.000000000 -0800 +++ 25/sound/sparc/cs4231.c 2003-04-21 00:32:53.000000000 -0700 @@ -1228,7 +1228,7 @@ static void snd_cs4231_generic_interrupt } #ifdef SBUS_SUPPORT -static void snd_cs4231_sbus_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t snd_cs4231_sbus_interrupt(int irq, void *dev_id, struct pt_regs *regs) { cs4231_t *chip = snd_magic_cast(cs4231_t, dev_id, return); u32 csr; @@ -1240,12 +1240,13 @@ static void snd_cs4231_sbus_interrupt(in APC_GENL_INT | APC_XINT_PEMP | APC_XINT_CEMP))) - return; + return IRQ_NONE; /* ACK the APC interrupt. */ sbus_writel(csr, chip->port + APCCSR); snd_cs4231_generic_interrupt(chip); + return IRQ_HANDLED; } #endif