Commit 24579a88 authored by Linus Torvalds's avatar Linus Torvalds

v2.4.3.5 -> v2.4.3.6

  - Chris Mason: daemonize reiserfs commit thread
  - Alan Cox: syncup (AFFS might even work, and official VIA workarounds)
  - Jeff Garzik: network driver updates
  - Paul Mackerras: PPP update
  - David Howells: more rw-sem cleanups, updates. Slowly getting somewhere.
parent 9102e0eb
No related merge requests found
......@@ -1121,8 +1121,8 @@ N: Richard Henderson
E: rth@twiddle.net
E: rth@cygnus.com
D: Alpha hacker, kernel and userland
S: 50 E. Middlefield #10
S: Mountain View, California 94043
S: 1668 California St.
S: Mountain View, California 94041
S: USA
N: Benjamin Herrenschmidt
......@@ -1483,8 +1483,9 @@ E: ajk@iehk.rwth-aachen.de
D: 6pack driver for AX.25
N: Harald Koerfgen
E: harald@unix-ag.org
D: DECstation port
E: hkoerfg@web.de
D: Linux/MIPS kernel hacks and fixes,
D: DECstation port, Sharp Mobilon port
S: D-50931 Koeln
S: Germany
......
......@@ -1617,6 +1617,27 @@ CONFIG_DDB5074
This enables support for the VR5000-based NEC DDB Vrc-5074
evaluation board.
Support for NEC DDB Vrc-5476
CONFIG_DDB5476
This enables support for the R5432-based NEC DDB Vrc-5476
evaluation board.
Features : kernel debugging, serial terminal, NFS root fs, on-board
ether port (with a patch to tulip driver), IDE controller, PS2 keyboard
PS2 mouse, etc.
TODO : USB, Compact-PCI interface.
Support for MIPS Atlas board
CONFIG_MIPS_ATLAS
This enables support for the QED R5231-based MIPS Atlas evaluation
board.
Support for MIPS Malta board
CONFIG_MIPS_MALTA
This enables support for the VR5000-based MIPS Malta evaluation
board.
Support for Mips Magnum 4000
CONFIG_MIPS_MAGNUM_4000
This is a machine with a R4000 100 MHz CPU. To compile a Linux
......@@ -1660,6 +1681,12 @@ CONFIG_JAZZ_ESP
4000, Acer PICA, Olivetti M700-10 and a few other identical OEM
systems.
Kernel floating-point instruction emulation
CONFIG_MIPS_FPU_EMULATOR
This option enables the MIPS software floatingpoint support. Due to the
way floatingpoint works you should always enable this option unless
you exactly know what you're doing.
PCMCIA SCSI adapter support
CONFIG_SCSI_PCMCIA
Say Y here if you intend to attach a PCMCIA or CardBus card to your
......@@ -1756,6 +1783,10 @@ CONFIG_FILTER
certain types of data to get through the socket. Linux Socket
Filtering works on all socket types except TCP for now. See the text
file Documentation/networking/filter.txt for more information.
You need to say Y here if you want to use PPP packet filtering
(see the CONFIG_PPP_FILTER option below).
If unsure, say N.
Network packet filtering
......@@ -2415,7 +2446,7 @@ CONFIG_SERIAL_MULTIPORT
of those special I/O ports.
SGI PROM Console Support
CONFIG_SGI_PROM_CONSOLE
CONFIG_ARC_CONSOLE
Say Y here if you want to use the PROMs for console I/O.
SGI Zilog85C30 serial support
......@@ -7087,6 +7118,17 @@ CONFIG_PPP_MULTILINK
If unsure, say N.
PPP filtering (EXPERIMENTAL)
CONFIG_PPP_FILTER
Say Y here if you want to be able to filter the packets passing over
PPP interfaces. This allows you to control which packets count as
activity (i.e. which packets will reset the idle timer or bring up
a demand-dialled link) and which packets are to be dropped entirely.
You need to say Y here if you wish to use the pass-filter and
active-filter options to pppd.
If unsure, say N.
PPP support for async serial ports
CONFIG_PPP_ASYNC
Say Y (or M) here if you want to be able to use PPP over standard
......@@ -12926,8 +12968,8 @@ CONFIG_PRINTER
how to pass options to the kernel at boot time.) The syntax of the
"lp" command line option can be found in drivers/char/lp.c.
If you have more than 3 printers, you need to increase the LP_NO
variable in lp.c.
If you have more than 8 printers, you need to increase the LP_NO
macro in lp.c and the PARPORT_MAX macro in parport.h.
Support for console on line printer
CONFIG_LP_CONSOLE
......@@ -15515,10 +15557,10 @@ CONFIG_ISDN_DRV_AVMB1_T1PCI
Enable support for the AVM T1 T1B card.
Note: This is a PRI card and handle 30 B-channels.
AVM C4 support
AVM C4/C2 support
CONFIG_ISDN_DRV_AVMB1_C4
Enable support for the AVM C4 PCI card.
This card handle 4 BRI ISDN lines (8 channels).
Enable support for the AVM C4/C2 PCI cards.
These cards handle 4/2 BRI ISDN lines (8/4 channels).
Verbose reason code reporting (kernel size +=7K)
CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON
......
This diff is collapsed.
README for arch/mips/gt64120 directory and subdirectories
Jun Sun, jsun@mvista.com or jsun@junsun.net
01/27, 2001
MOTIVATION
----------
Many MIPS boards share the same system controller (or CPU companian chip),
such as GT-64120. It is highly desirable to let these boards share
the same controller code instead of duplicating them.
This directory is meant to hold all MIPS boards that use GT-64120 or GT-64120A.
HOW TO ADD A BOARD
------------------
. Create a subdirectory include/asm/gt64120/<board>.
. Create a file called gt64120_dep.h under that directory.
. Modify include/asm/gt64120/gt64120.h file to include the new gt64120_dep.h
based on config options. The board-dep section is at the end of
include/asm/gt64120/gt64120.h file. There you can find all required
definitions include/asm/gt64120/<board>/gt64120_dep.h file must supply.
. Create a subdirectory arch/mips/gt64120/<board> directory to hold
board specific routines.
. The GT-64120 common code is supplied under arch/mips/gt64120/common directory.
It includes:
1) arch/mips/gt64120/pci.c -
common PCI routine, include the top-level pcibios_init()
2) arch/mips/gt64120/irq.c -
common IRQ routine, include the top-level do_IRQ()
[This part really belongs to arch/mips/kernel. jsun]
3) arch/mips/gt64120/gt_irq.c -
common IRQ routines for GT-64120 chip. Currently it only handles
the timer interrupt.
. Board-specific routines are supplied under arch/mips/gt64120/<board> dir.
1) arch/mips/gt64120/<board>/pci.c - it provides bus fixup routine
2) arch/mips/gt64120/<board>/irq.c - it provides enable/disable irqs
and board irq setup routine (irq_setup)
3) arch/mips/gt64120/<board>/int-handler.S -
The first-level interrupt dispatching routine.
4) a bunch of other "normal" stuff (setup, prom, dbg_io, reset, etc)
. Follow other "normal" procedure to modify configuration files, etc.
TO-DO LIST
----------
. Expand arch/mips/gt64120/gt_irq.c to handle all GT-64120 interrupts.
We probably need to introduce GT_IRQ_BASE in board-dep header file,
which is used the starting irq_nr for all GT irqs.
A function, gt64120_handle_irq(), will be added so that the first-level
irq dispatcher will call this function if it detects an interrupt
from GT-64120.
. More support for GT-64120 PCI features (2nd PCI bus, perhaps)
README for MIPS time services
Jun Sun
jsun@mvista.com or jsun@junsun.net
ABOUT
-----
This file describes the new arch/mips/kernel/time.c, related files and the
services they provide.
If you are short in patience and just want to know how to use time.c for a
new board or convert an existing board, go to the last section.
FILES, COMPATABILITY AND CONFIGS
---------------------------------
The old arch/mips/kernel/time.c is renamed to old-time.c.
A new time.c is put there, together with include/asm-mips/time.h.
Two configs variables are introduced, CONFIG_OLD_TIME_C and CONFIG_NEW_TIME_C.
So we allow boards using
1) old time.c (CONFIG_OLD_TIME_C)
2) new time.c (CONFIG_NEW_TIME_C)
3) neither (their own private time.c)
However, it is expected every board will move to the new time.c in the near
future.
WHAT THE NEW CODE PROVIDES?
---------------------------
The new time code provide the following services:
a) Implements functions required by Linux common code:
time_init
do_gettimeofday
do_settimeofday
b) provides an abstraction of RTC and null RTC implementation as default.
extern unsigned long (*rtc_get_time)(void);
extern int (*rtc_set_time)(unsigned long);
c) a set of gettimeoffset functions for different CPUs and different
needs.
d) high-level and low-level timer interrupt routines where the timer
interrupt source may or may not be the CPU timer. The high-level
routine is dispatched through do_IRQ() while the low-level is
dispatched in assemably code (usually int-handler.S)
WHAT THE NEW CODE REQUIRES?
---------------------------
For the new code to work properly, each board implementation needs to supply
the following functions or values:
a) board_time_init - a function pointer. Invoked at the beginnig of
time_init(). It is optional.
1. (optional) set up RTC routines
2. (optional) calibrate and set the mips_counter_frequency
b) board_timer_setup - a function pointer. Invoked at the end of time_init()
1. (optional) over-ride any decisions made in time_init()
2. set up the irqaction for timer interrupt.
3. enable the timer interrupt
c) (optional) board-specific RTC routines.
d) (optional) mips_counter_frequency - It must be definied if the board
is using CPU counter for timer interrupt or it is using fixed rate
gettimeoffset().
PORTING GUIDE
-------------
Step 1: decide how you like to implement the time services.
a) does this board have a RTC? If yes, implement the two RTC funcs.
b) does the CPU have counter/compare registers?
If the answer is no, you need a timer to provide the timer interrupt
at 100 HZ speed.
You cannot use the fast gettimeoffset functions, i.e.,
unsigned long fixed_rate_gettimeoffset(void);
unsigned long calibrate_div32_gettimeoffset(void);
unsigned long calibrate_div64_gettimeoffset(void);
You can use null_gettimeoffset() will gives the same time resolution as
jiffy. Or you can implement your own gettimeoffset (probably based on
some ad hoc hardware on your machine.)
c) The following sub steps assume your CPU has counter register.
Do you plan to use the CPU counter register as the timer interrupt
or use an exnternal timer?
In order to CPU counter register as the timer interrupt source, you must
know the counter speed (mips_counter_frequency). It is usually the
same as the CPU speed (Or it is ALWAYS the same?)
d) decide on whether you want to use high-level or low-level timer
interrupt routines. The low-level one is presumably faster, but should
not make too mcuh difference.
Step 2: the machine setup() function
If you supply board_time_init(), set the function poointer.
Set the function pointer board_timer_setup() (mandatory)
Step 3: implement rtc routines, board_time_init() and board_timer_setup()
if needed.
board_time_init() -
a) (optional) set up RTC routines,
b) (optional) calibrate and set the mips_counter_frequency
(only needed if you intended to use fixed_rate_gettimeoffset
or use cpu counter as timer interrupt source)
board_timer_setup() -
a) (optional) over-write any choices made above by time_init().
b) machine specific code should setup the timer irqaction.
c) enable the timer interrupt
If the RTC chip is a common chip, I suggest the routines are put under
arch/mips/libs. For example, for DS1386 chip, one would create
rtc-ds1386.c under arch/mips/lib directory. Add the following line to
the arch/mips/lib/Makefile:
obj-$(CONFIG_DDB5476) += rtc-ds1386.o
Step 4: if you are using low-level timer interrupt, change your interrupt
dispathcing code to check for timer interrupt and jump to
ll_timer_interrupt() directly if one is detected.
Step 5: Modify arch/mips/config.in and add CONFIG_NEW_TIME_C to your machine.
Modify the appropriate defconfig if applicable.
Final notes:
For some tricky cases, you may need to add your own wrapper functions
for some of the functions in time.c.
For example, you may define your own timer interrupt routine, which does
its own processing and in turn calls timer_interrupt().
You can also over-ride any of the built-in functions (gettimeoffset,
RTC routines and/or timer interrupt routine).
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 4
EXTRAVERSION =-pre5
EXTRAVERSION =-pre6
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
......
......@@ -173,9 +173,6 @@ EXPORT_SYMBOL(down);
EXPORT_SYMBOL(down_interruptible);
EXPORT_SYMBOL(down_trylock);
EXPORT_SYMBOL(up);
EXPORT_SYMBOL(__down_read_failed);
EXPORT_SYMBOL(__down_write_failed);
EXPORT_SYMBOL(__rwsem_wake);
EXPORT_SYMBOL(down_read);
EXPORT_SYMBOL(down_write);
EXPORT_SYMBOL(up_read);
......
......@@ -9,8 +9,6 @@ define_bool CONFIG_ISA y
define_bool CONFIG_SBUS n
define_bool CONFIG_UID16 y
define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
mainmenu_option next_comment
comment 'Code maturity level options'
......@@ -52,6 +50,8 @@ if [ "$CONFIG_M386" = "y" ]; then
define_bool CONFIG_X86_CMPXCHG n
define_bool CONFIG_X86_XADD n
define_int CONFIG_X86_L1_CACHE_SHIFT 4
define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
else
define_bool CONFIG_X86_WP_WORKS_OK y
define_bool CONFIG_X86_INVLPG y
......@@ -59,6 +59,8 @@ else
define_bool CONFIG_X86_XADD y
define_bool CONFIG_X86_BSWAP y
define_bool CONFIG_X86_POPAD_OK y
define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
fi
if [ "$CONFIG_M486" = "y" ]; then
define_int CONFIG_X86_L1_CACHE_SHIFT 4
......
......@@ -169,9 +169,7 @@ startup_32:
rep
movsl
1:
#ifdef CONFIG_SMP
checkCPUtype:
#endif
movl $-1,X86_CPUID # -1 for no CPUID initially
......@@ -244,9 +242,7 @@ is386: pushl %ecx # restore original EFLAGS
orl $2,%eax # set MP
2: movl %eax,%cr0
call check_x87
#ifdef CONFIG_SMP
incb ready
#endif
lgdt gdt_descr
lidt idt_descr
ljmp $(__KERNEL_CS),$1f
......@@ -278,9 +274,7 @@ L6:
jmp L6 # main should never return here, but
# just in case, we know what happens.
#ifdef CONFIG_SMP
ready: .byte 0
#endif
/*
* We depend on ET to be correct. This checks for 287/387.
......
......@@ -80,9 +80,11 @@ EXPORT_SYMBOL_NOVERS(__down_failed);
EXPORT_SYMBOL_NOVERS(__down_failed_interruptible);
EXPORT_SYMBOL_NOVERS(__down_failed_trylock);
EXPORT_SYMBOL_NOVERS(__up_wakeup);
#ifdef CONFIG_RWSEM_XCHGADD_ALGORITHM
EXPORT_SYMBOL_NOVERS(__rwsem_down_write_failed);
EXPORT_SYMBOL_NOVERS(__rwsem_down_read_failed);
EXPORT_SYMBOL_NOVERS(__rwsem_wake);
#endif
/* Networking helper routines. */
EXPORT_SYMBOL(csum_partial_copy_generic);
/* Delay loops */
......
......@@ -960,34 +960,6 @@ static void __init pci_fixup_piix4_acpi(struct pci_dev *d)
d->irq = 9;
}
static void __init pci_fixup_vt8363(struct pci_dev *d)
{
/*
* The VIA bridge will corrupt disks without these settings.
*/
u8 tmp;
pci_read_config_byte(d, 0x54, &tmp);
if(tmp & (1<<2)) {
printk("PCI: Bus master Pipeline request disabled\n");
pci_write_config_byte(d, 0x54, tmp & ~(1<<2));
}
pci_read_config_byte(d, 0x70, &tmp);
if(tmp & (1<<3)) {
printk("PCI: Disabled enhanced CPU to PCI writes\n");
pci_write_config_byte(d, 0x70, tmp & ~(1<<3));
}
pci_read_config_byte(d, 0x71, &tmp);
if((tmp & (1<<3)) == 0) {
printk("PCI: Bursting cornercase bug worked around\n");
pci_write_config_byte(d, 0x71, tmp | (1<<3));
}
pci_read_config_byte(d, 0x76, &tmp);
if(tmp & (1<<7)) {
printk("PCI: Post Write Fail set to Retry\n");
pci_write_config_byte(d, 0x76, tmp & ~(1<<7));
}
}
static void __init pci_fixup_via691(struct pci_dev *d)
{
/*
......@@ -1036,7 +1008,6 @@ struct pci_fixup pcibios_fixups[] = {
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5598, pci_fixup_latency },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, pci_fixup_via_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, pci_fixup_via_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, pci_fixup_vt8363 },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C691, pci_fixup_via691 },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C598_1, pci_fixup_via691_2 },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, pci_fixup_piix4_acpi },
......
......@@ -309,14 +309,11 @@ void __init zap_low_mappings (void)
* Zap initial low-memory mappings.
*
* Note that "pgd_clear()" doesn't do it for
* us in this case, because pgd_clear() is a
* no-op in the 2-level case (pmd_clear() is
* the thing that clears the page-tables in
* that case).
* us, because pgd_clear() is a no-op on i386.
*/
for (i = 0; i < USER_PTRS_PER_PGD; i++)
#if CONFIG_X86_PAE
pgd_clear(swapper_pg_dir+i);
set_pgd(swapper_pg_dir+i, __pgd(1 + __pa(empty_zero_page)));
#else
set_pgd(swapper_pg_dir+i, __pgd(0));
#endif
......
......@@ -646,9 +646,6 @@ int __init chr_dev_init(void)
#if defined(CONFIG_S390_TAPE) && defined(CONFIG_S390_TAPE_CHAR)
tapechar_init();
#endif
#if defined(CONFIG_S390_TAPE) && defined(CONFIG_S390_TAPE_CHAR)
tapechar_init();
#endif
#if defined(CONFIG_ADB)
adbdev_init();
#endif
......
......@@ -571,6 +571,26 @@ static void __init ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_t *
* Can we trust the reported IRQ?
*/
pciirq = dev->irq;
if (dev->class >> 8 == PCI_CLASS_STORAGE_RAID)
{
/* By rights we want to ignore these, but the Promise Fastrak
people have some strange ideas about proprietary so we have
to act otherwise on those. The supertrak however we need
to skip */
if (IDE_PCI_DEVID_EQ(d->devid, DEVID_PDC20265))
{
printk(KERN_INFO "ide: Found promise 20265 in RAID mode.\n");
if(dev->bus->self->vendor == PCI_VENDOR_ID_INTEL &&
dev->bus->self->device == PCI_DEVICE_ID_INTEL_I960)
{
printk(KERN_INFO "ide: Skipping Promise PDC20265 attached to I2O RAID controller.\n");
return;
}
}
/* Its attached to something else, just a random bridge.
Suspect a fastrak and fall through */
}
if ((dev->class & ~(0xfa)) != ((PCI_CLASS_STORAGE_IDE << 8) | 5)) {
printk("%s: not 100%% native mode: will probe irqs later\n", d->name);
/*
......
......@@ -224,6 +224,7 @@ const char *pdc_quirk_drives[] = {
"QUANTUM FIREBALLlct08 08",
"QUANTUM FIREBALLP KA6.4",
"QUANTUM FIREBALLP LM20.4",
"QUANTUM FIREBALLP KX20.5",
"QUANTUM FIREBALLP LM20.5",
NULL
};
......
......@@ -133,7 +133,7 @@ if [ "$CONFIG_ISDN_CAPI" != "n" ]; then
dep_tristate ' AVM B1/M1/M2 PCMCIA support' CONFIG_ISDN_DRV_AVMB1_B1PCMCIA $CONFIG_ISDN_CAPI
dep_tristate ' AVM B1/M1/M2 PCMCIA cs module' CONFIG_ISDN_DRV_AVMB1_AVM_CS $CONFIG_ISDN_DRV_AVMB1_B1PCMCIA $CONFIG_PCMCIA
dep_tristate ' AVM T1/T1-B PCI support' CONFIG_ISDN_DRV_AVMB1_T1PCI $CONFIG_ISDN_CAPI $CONFIG_PCI
dep_tristate ' AVM C4 support' CONFIG_ISDN_DRV_AVMB1_C4 $CONFIG_ISDN_CAPI $CONFIG_PCI
dep_tristate ' AVM C4/C2 support' CONFIG_ISDN_DRV_AVMB1_C4 $CONFIG_ISDN_CAPI $CONFIG_PCI
fi
# HYSDN
......
/*
* $Id: avmcard.h,v 1.8 2000/10/10 17:44:19 kai Exp $
* $Id: avmcard.h,v 1.8.6.1 2001/04/20 02:41:59 keil Exp $
*
* Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: avmcard.h,v $
* Revision 1.8.6.1 2001/04/20 02:41:59 keil
* changes from mainstream
*
* Revision 1.8 2000/10/10 17:44:19 kai
* changes from/for 2.2.18
*
......@@ -83,7 +86,8 @@ enum avmcardtype {
avm_m2,
avm_t1isa,
avm_t1pci,
avm_c4
avm_c4,
avm_c2
};
typedef struct avmcard_dmainfo {
......
/*
* $Id: b1.c,v 1.20.6.3 2001/03/21 08:52:20 kai Exp $
* $Id: b1.c,v 1.20.6.4 2001/04/20 02:41:59 keil Exp $
*
* Common module for AVM B1 cards.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1.c,v $
* Revision 1.20.6.4 2001/04/20 02:41:59 keil
* changes from mainstream
*
* Revision 1.20.6.3 2001/03/21 08:52:20 kai
* merge from main branch: fix buffer for revision string (calle)
*
......@@ -126,7 +129,7 @@
#include "capicmd.h"
#include "capiutil.h"
static char *revision = "$Revision: 1.20.6.3 $";
static char *revision = "$Revision: 1.20.6.4 $";
/* ------------------------------------------------------------- */
......@@ -686,6 +689,7 @@ int b1ctl_read_proc(char *page, char **start, off_t off,
case avm_t1isa: s = "T1 ISA (HEMA)"; break;
case avm_t1pci: s = "T1 PCI"; break;
case avm_c4: s = "C4"; break;
case avm_c2: s = "C2"; break;
default: s = "???"; break;
}
len += sprintf(page+len, "%-16s %s\n", "type", s);
......
/*
* $Id: b1dma.c,v 1.11.6.3 2001/03/21 08:52:21 kai Exp $
* $Id: b1dma.c,v 1.11.6.4 2001/04/20 02:41:59 keil Exp $
*
* Common module for AVM B1 cards that support dma with AMCC
*
* (c) Copyright 2000 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1dma.c,v $
* Revision 1.11.6.4 2001/04/20 02:41:59 keil
* changes from mainstream
*
* Revision 1.11.6.3 2001/03/21 08:52:21 kai
* merge from main branch: fix buffer for revision string (calle)
*
......@@ -71,7 +74,7 @@
#include "capicmd.h"
#include "capiutil.h"
static char *revision = "$Revision: 1.11.6.3 $";
static char *revision = "$Revision: 1.11.6.4 $";
/* ------------------------------------------------------------- */
......@@ -907,6 +910,7 @@ int b1dmactl_read_proc(char *page, char **start, off_t off,
case avm_t1isa: s = "T1 ISA (HEMA)"; break;
case avm_t1pci: s = "T1 PCI"; break;
case avm_c4: s = "C4"; break;
case avm_c2: s = "C2"; break;
default: s = "???"; break;
}
len += sprintf(page+len, "%-16s %s\n", "type", s);
......
/*
* $Id: b1pci.c,v 1.29.6.2 2001/03/21 08:52:21 kai Exp $
* $Id: b1pci.c,v 1.29.6.3 2001/04/20 02:41:59 keil Exp $
*
* Module for AVM B1 PCI-card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1pci.c,v $
* Revision 1.29.6.3 2001/04/20 02:41:59 keil
* changes from mainstream
*
* Revision 1.29.6.2 2001/03/21 08:52:21 kai
* merge from main branch: fix buffer for revision string (calle)
*
......@@ -122,7 +125,7 @@
#include "capilli.h"
#include "avmcard.h"
static char *revision = "$Revision: 1.29.6.2 $";
static char *revision = "$Revision: 1.29.6.3 $";
/* ------------------------------------------------------------- */
......
This diff is collapsed.
......@@ -7,27 +7,27 @@
# cards in the moment.
# Read ../../../Documentation/isdn/HiSax.cert for more informations.
#
ca7bd9bac39203f3074f3f093948cc3c isac.c
a2ad619fd404b3149099a2984de9d23c isdnl1.c
d2a78e407f3d94876deac160c6f9aae6 isdnl2.c
e7932ca7ae39c497c17f13a2e1434fcd isdnl3.c
afb5f2f4ac296d6de45c856993b161e1 tei.c
00023e2a482cb86a26ea870577ade5d6 callc.c
a1834e9b2ec068440cff2e899eff4710 cert.c
1551f78b3cd01097ecd586b5c96d0765 l3dss1.c
89aecf3a80489c723dc885fcaa4aba1b l3_1tr6.c
1685c1ddfecf3e1b88ae5f3d7202ce69 elsa.c
6d7056d1558bf6cc57dd89b7b260dc27 diva.c
4398918680d45c4618bb48108ea0c282 sedlbauer.c
9663cc9f4374c361197d394f6d27c459 isac.c
9666c672c0fa0e65d5cc5b322f10a18c isdnl1.c
9250f15b932dfc36855aa120b896ed0b isdnl2.c
0cc2ef892bdb4a2be473e00eb1398950 isdnl3.c
cac9c32fff889c57ff50d59823053019 tei.c
665044a72334336533ac79da1a831b17 callc.c
e592db58630c1f1029cc064110108156 cert.c
fadeb3b85bb23bc1ac48470c0848d6fa l3dss1.c
cf7dec9fac6283716904d26b99188476 l3_1tr6.c
65d9e5471bc129624f858ebcf0743525 elsa.c
b4cf8a4dceed9ea6dcba65a85b4eecc7 diva.c
99e67bea8f6945fa0d4e0aded5bf0fa0 sedlbauer.c
# end of md5sums
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
iQCVAwUBOlxeLTpxHvX/mS9tAQH6RwP8DhyvqAnXFV6WIGi16iQ3vKikkPoqnDQs
GEn5uCW0dPYKlwthD2Grj/JbMYZhOmCFuDxF7ufJnjTSDe/D8XNe2wngxzAiwcIe
WjCrT8X95cuP3HZHscbFTEinVV0GAnoI0ZEgs5eBDhVHDqILLYMaTFBQaRH3jgXc
i5VH88jPfUM=
=qc+J
iQCVAwUBOt+j/jpxHvX/mS9tAQGXwAP/U4voKzXAcTfo9CqJhHN92GRxunj6mlvn
H+1pxSe0GdtC7BlrPhrokB5dNSwewk89Z5t7kTD76kx2FFuTcXBJxbgH7LZVF3ga
JX92bOWQekHMH7Hk12Qc7zpeTmPzY02pvVc37Eo614BCvJMCk02cpQyo8a5wWRKH
8vpQkQKiSyY=
=FFLG
-----END PGP SIGNATURE-----
/* $Id: icn.c,v 1.65.6.3 2001/02/16 16:43:31 kai Exp $
/* $Id: icn.c,v 1.65.6.4 2001/04/20 02:42:01 keil Exp $
* ISDN low-level module for the ICN active ISDN-Card.
*
......@@ -34,7 +34,7 @@
#undef MAP_DEBUG
static char
*revision = "$Revision: 1.65.6.3 $";
*revision = "$Revision: 1.65.6.4 $";
static int icn_addcard(int, char *, char *);
......@@ -838,23 +838,23 @@ icn_loadboot(u_char * buffer, icn_card * card)
card->other->rvalid = 1;
}
if (!dev.mvalid) {
if (check_shmem((ulong) dev.shmem, 0x4000)) {
if (check_mem_region(dev.memaddr, 0x4000)) {
printk(KERN_WARNING
"icn: memory at 0x%08lx in use.\n",
(ulong) dev.shmem);
"icn: memory at 0x%08lx in use.\n", dev.memaddr);
restore_flags(flags);
return -EBUSY;
}
request_shmem((ulong) dev.shmem, 0x4000, "icn");
request_mem_region(dev.memaddr, 0x4000, "icn-isdn (all cards)");
dev.shmem = ioremap(dev.memaddr, 0x4000);
dev.mvalid = 1;
}
restore_flags(flags);
OUTB_P(0, ICN_RUN); /* Reset Controller */
OUTB_P(0, ICN_MAPRAM); /* Disable RAM */
icn_shiftout(ICN_CFG, 0x0f, 3, 4); /* Windowsize= 16k */
icn_shiftout(ICN_CFG, (unsigned long) dev.shmem, 23, 10); /* Set RAM-Addr. */
icn_shiftout(ICN_CFG, dev.memaddr, 23, 10); /* Set RAM-Addr. */
#ifdef BOOT_DEBUG
printk(KERN_DEBUG "shmem=%08lx\n", (ulong) dev.shmem);
printk(KERN_DEBUG "shmem=%08lx\n", dev.memaddr);
#endif
SLEEP(1);
#ifdef BOOT_DEBUG
......@@ -1177,29 +1177,31 @@ icn_command(isdn_ctrl * c, icn_card * card)
memcpy(&a, c->parm.num, sizeof(ulong));
switch (c->arg) {
case ICN_IOCTL_SETMMIO:
if ((unsigned long) dev.shmem != (a & 0x0ffc000)) {
if (check_shmem((ulong) (a & 0x0ffc000), 0x4000)) {
if (dev.memaddr != (a & 0x0ffc000)) {
if (check_mem_region(a & 0x0ffc000, 0x4000)) {
printk(KERN_WARNING
"icn: memory at 0x%08lx in use.\n",
(ulong) (a & 0x0ffc000));
a & 0x0ffc000);
return -EINVAL;
}
icn_stopallcards();
save_flags(flags);
cli();
if (dev.mvalid)
release_shmem((ulong) dev.shmem, 0x4000);
if (dev.mvalid) {
iounmap(dev.shmem);
release_mem_region(dev.memaddr, 0x4000);
}
dev.mvalid = 0;
dev.shmem = (icn_shmem *) (a & 0x0ffc000);
dev.memaddr = a & 0x0ffc000;
restore_flags(flags);
printk(KERN_INFO
"icn: (%s) mmio set to 0x%08lx\n",
CID,
(unsigned long) dev.shmem);
dev.memaddr);
}
break;
case ICN_IOCTL_GETMMIO:
return (long) dev.shmem;
return (long) dev.memaddr;
case ICN_IOCTL_SETPORT:
if (a == 0x300 || a == 0x310 || a == 0x320 || a == 0x330
|| a == 0x340 || a == 0x350 || a == 0x360 ||
......@@ -1652,7 +1654,7 @@ icn_setup(char *line)
if (ints[0])
portbase = ints[1];
if (ints[0] > 1)
membase = ints[2];
membase = (unsigned long)ints[2];
if (str && *str) {
strcpy(sid, str);
icn_id = sid;
......@@ -1673,7 +1675,7 @@ static int __init icn_init(void)
char rev[10];
memset(&dev, 0, sizeof(icn_dev));
dev.shmem = (icn_shmem *) ((unsigned long) membase & 0x0ffc000);
dev.memaddr = (membase & 0x0ffc000);
dev.channel = -1;
dev.mcard = NULL;
dev.firstload = 1;
......@@ -1685,7 +1687,7 @@ static int __init icn_init(void)
} else
strcpy(rev, " ??? ");
printk(KERN_NOTICE "ICN-ISDN-driver Rev%smem=0x%08lx\n", rev,
(ulong) dev.shmem);
dev.memaddr);
return (icn_addcard(portbase, icn_id, icn_id2));
}
......@@ -1719,8 +1721,10 @@ static void __exit icn_exit(void)
card = card->next;
kfree(last);
}
if (dev.mvalid)
release_shmem((ulong) dev.shmem, 0x4000);
if (dev.mvalid) {
iounmap(dev.shmem);
release_mem_region(dev.memaddr, 0x4000);
}
printk(KERN_NOTICE "ICN-ISDN-driver unloaded\n");
}
......
/* $Id: icn.h,v 1.30.6.2 2001/02/16 16:43:31 kai Exp $
/* $Id: icn.h,v 1.30.6.3 2001/04/20 02:42:01 keil Exp $
* ISDN lowlevel-module for the ICN active ISDN-Card.
*
......@@ -187,6 +187,7 @@ typedef struct icn_card {
* Main driver data
*/
typedef struct icn_dev {
unsigned long memaddr; /* Address of memory mapped buffers */
icn_shmem *shmem; /* Pointer to memory-mapped-buffers */
int mvalid; /* IO-shmem has been requested */
int channel; /* Currently mapped channel */
......@@ -210,7 +211,7 @@ static icn_dev dev;
* integers.
*/
static int portbase = ICN_BASEADDR;
static int membase = ICN_MEMADDR;
static unsigned long membase = ICN_MEMADDR;
static char *icn_id = "\0";
static char *icn_id2 = "\0";
......@@ -218,7 +219,7 @@ static char *icn_id2 = "\0";
MODULE_AUTHOR("Fritz Elfert");
MODULE_PARM(portbase, "i");
MODULE_PARM_DESC(portbase, "Port address of first card");
MODULE_PARM(membase, "i");
MODULE_PARM(membase, "l");
MODULE_PARM_DESC(membase, "Shared memory address of all cards");
MODULE_PARM(icn_id, "s");
MODULE_PARM_DESC(icn_id, "ID-String of first card");
......@@ -287,13 +288,5 @@ MODULE_PARM_DESC(icn_id2, "ID-String of first card, second S0 (4B only)");
#define MIN(a,b) ((a<b)?a:b)
#define MAX(a,b) ((a>b)?a:b)
/* Hopefully, a separate resource-registration-scheme for shared-memory
* will be introduced into the kernel. Until then, we use the normal
* routines, designed for port-registration.
*/
#define check_shmem check_region
#define release_shmem release_region
#define request_shmem request_region
#endif /* defined(__KERNEL__) || defined(__DEBUGVAR__) */
#endif /* icn_h */
......@@ -1674,10 +1674,11 @@ static int lvm_make_request_fn(request_queue_t *q,
int rw,
struct buffer_head *bh)
{
int ret = lvm_map(bh, rw);
if (ret < 0)
buffer_IO_error(bh);
return ret;
if (lvm_map(bh, rw) >= 0)
return 1;
buffer_IO_error(bh);
return 0;
}
......
......@@ -227,6 +227,7 @@ fi
tristate 'PPP (point-to-point protocol) support' CONFIG_PPP
if [ ! "$CONFIG_PPP" = "n" ]; then
dep_bool ' PPP multilink support (EXPERIMENTAL)' CONFIG_PPP_MULTILINK $CONFIG_EXPERIMENTAL
bool ' PPP filtering' CONFIG_PPP_FILTER
dep_tristate ' PPP support for async serial ports' CONFIG_PPP_ASYNC $CONFIG_PPP
dep_tristate ' PPP support for sync tty ports' CONFIG_PPP_SYNC_TTY $CONFIG_PPP
dep_tristate ' PPP Deflate compression' CONFIG_PPP_DEFLATE $CONFIG_PPP
......
......@@ -375,8 +375,8 @@ static void *slow_memcpy( void *dst, const void *src, size_t len )
int __init atarilance_probe( struct net_device *dev )
{
int i;
static int found = 0;
int i;
static int found;
SET_MODULE_OWNER(dev);
......@@ -458,7 +458,7 @@ static unsigned long __init lance_probe1( struct net_device *dev,
struct lance_private *lp;
struct lance_ioreg *IO;
int i;
static int did_version = 0;
static int did_version;
unsigned short save1, save2;
PROBE_PRINT(( "Probing for Lance card at mem %#lx io %#lx\n",
......
......@@ -414,14 +414,17 @@ static int __devinit dfx_init_one_pci_or_eisa(struct pci_dev *pdev, long ioaddr)
{
struct net_device *dev;
DFX_board_t *bp; /* board pointer */
static int version_disp;
int err;
if (!version_disp) /* display version info if adapter is found */
#ifndef MODULE
static int version_disp;
if (!version_disp) /* display version info if adapter is found */
{
version_disp = 1; /* set display flag to TRUE so that */
printk(version); /* we only display this string ONCE */
version_disp = 1; /* set display flag to TRUE so that */
printk(version); /* we only display this string ONCE */
}
#endif
/*
* init_fddidev() allocates a device structure with private data, clears the device structure and private data,
......@@ -3385,6 +3388,11 @@ static int __init dfx_init(void)
{
int rc_pci, rc_eisa;
/* when a module, this is printed whether or not devices are found in probe */
#ifdef MODULE
printk(version);
#endif
rc_pci = pci_module_init(&dfx_driver);
if (rc_pci >= 0) dfx_have_pci = 1;
......
This diff is collapsed.
......@@ -43,14 +43,6 @@
*/
/* These identify the driver base version and may not be removed. */
static const char version[] =
"epic100.c:v1.11 1/7/2001 Written by Donald Becker <becker@scyld.com>\n";
static const char version2[] =
" http://www.scyld.com/network/epic100.html\n";
static const char version3[] =
" (unofficial 2.4.x kernel port, version 1.1.6, January 11, 2001)\n";
/* The user-configurable values.
These may be modified when a driver module is loaded.*/
......@@ -115,6 +107,14 @@ static int rx_copybreak;
#include <asm/bitops.h>
#include <asm/io.h>
/* These identify the driver base version and may not be removed. */
static char version[] __devinitdata =
"epic100.c:v1.11 1/7/2001 Written by Donald Becker <becker@scyld.com>\n";
static char version2[] __devinitdata =
" http://www.scyld.com/network/epic100.html\n";
static char version3[] __devinitdata =
" (unofficial 2.4.x kernel port, version 1.1.7, April 17, 2001)\n";
MODULE_AUTHOR("Donald Becker <becker@scyld.com>");
MODULE_DESCRIPTION("SMC 83c170 EPIC series Ethernet driver");
MODULE_PARM(debug, "i");
......@@ -337,7 +337,6 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
const struct pci_device_id *ent)
{
static int card_idx = -1;
static int printed_version;
long ioaddr;
int chip_idx = (int) ent->driver_data;
int irq;
......@@ -347,11 +346,15 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
void *ring_space;
dma_addr_t ring_dma;
card_idx++;
/* when built into the kernel, we only print version if device is found */
#ifndef MODULE
static int printed_version;
if (!printed_version++)
printk (KERN_INFO "%s" KERN_INFO "%s" KERN_INFO "%s",
version, version2, version3);
#endif
card_idx++;
i = pci_enable_device(pdev);
if (i)
......@@ -1440,6 +1443,12 @@ static struct pci_driver epic_driver = {
static int __init epic_init (void)
{
/* when a module, this is printed whether or not devices are found in probe */
#ifdef MODULE
printk (KERN_INFO "%s" KERN_INFO "%s" KERN_INFO "%s",
version, version2, version3);
#endif
return pci_module_init (&epic_driver);
}
......
......@@ -27,16 +27,6 @@
*/
static const char *version =
"hamachi.c:v1.01 5/16/2000 Written by Donald Becker\n"
" Some modifications by Eric kasten <kasten@nscl.msu.edu>\n"
" Further modifications by Keith Underwood <keithu@parl.clemson.edu>\n"
" Support by many others\n"
" http://www.scyld.com/network/hamachi.html\n"
" or\n"
" http://www.parl.clemson.edu/~keithu/drivers/hamachi.html\n";
/* A few user-configurable values. */
static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */
......@@ -175,6 +165,12 @@ static int tx_params[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
#include <linux/ip.h>
#include <linux/delay.h>
static char version[] __initdata =
KERN_INFO "hamachi.c:v1.01 5/16/2000 Written by Donald Becker\n"
KERN_INFO " Some modifications by Eric kasten <kasten@nscl.msu.edu>\n"
KERN_INFO " Further modifications by Keith Underwood <keithu@parl.clemson.edu>\n";
/* IP_MF appears to be only defined in <netinet/ip.h>, however,
we need it for hardware checksumming support. FYI... some of
the definitions in <netinet/ip.h> conflict/duplicate those in
......@@ -548,7 +544,6 @@ static void set_rx_mode(struct net_device *dev);
static int __init hamachi_init_one (struct pci_dev *pdev,
const struct pci_device_id *ent)
{
static int did_version; /* Already printed version info. */
struct hamachi_private *hmp;
int option, i, rx_int_var, tx_int_var, boguscnt;
int chip_id = ent->driver_data;
......@@ -557,8 +552,12 @@ static int __init hamachi_init_one (struct pci_dev *pdev,
static int card_idx;
struct net_device *dev;
if (hamachi_debug > 0 && did_version++ == 0)
/* when built into the kernel, we only print version if device is found */
#ifndef MODULE
static int printed_version;
if (!printed_version++)
printk(version);
#endif
if (pci_enable_device(pdev))
return -EIO;
......@@ -1887,6 +1886,10 @@ static struct pci_driver hamachi_driver = {
static int __init hamachi_init (void)
{
/* when a module, this is printed whether or not devices are found in probe */
#ifdef MODULE
printk(version);
#endif
if (pci_register_driver(&hamachi_driver) > 0)
return 0;
pci_unregister_driver(&hamachi_driver);
......
......@@ -37,13 +37,6 @@
*/
/* These identify the driver base version and may not be removed. */
static const char version1[] =
"natsemi.c:v1.07 1/9/2001 Written by Donald Becker <becker@scyld.com>\n";
static const char version2[] =
" http://www.scyld.com/network/natsemi.html\n";
static const char version3[] =
" (unofficial 2.4.x kernel port, version 1.0.4, February 26, 2001 Jeff Garzik, Tjeerd Mulder)\n";
/* Updated to recommendations in pci-skeleton v2.03. */
/* Automatically extracted configuration info:
......@@ -125,6 +118,12 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
#include <asm/bitops.h>
#include <asm/io.h>
/* These identify the driver base version and may not be removed. */
static char version[] __devinitdata =
KERN_INFO "natsemi.c:v1.07 1/9/2001 Written by Donald Becker <becker@scyld.com>\n"
KERN_INFO " http://www.scyld.com/network/natsemi.html\n"
KERN_INFO " (unofficial 2.4.x kernel port, version 1.0.5, April 17, 2001 Jeff Garzik, Tjeerd Mulder)\n";
/* Condensed operations for readability. */
#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr))
#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr))
......@@ -368,15 +367,17 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
struct netdev_private *np;
int i, option, irq, chip_idx = ent->driver_data;
static int find_cnt = -1;
static int printed_version;
unsigned long ioaddr, iosize;
const int pcibar = 1; /* PCI base address register */
int prev_eedata;
u32 tmp;
if ((debug <= 1) && !printed_version++)
printk(KERN_INFO "%s" KERN_INFO "%s" KERN_INFO "%s",
version1, version2, version3);
/* when built into the kernel, we only print version if device is found */
#ifndef MODULE
static int printed_version;
if (!printed_version++)
printk(version);
#endif
i = pci_enable_device(pdev);
if (i) return i;
......@@ -1250,9 +1251,10 @@ static struct pci_driver natsemi_driver = {
static int __init natsemi_init_mod (void)
{
if (debug > 1)
printk(KERN_INFO "%s" KERN_INFO "%s" KERN_INFO "%s",
version1, version2, version3);
/* when a module, this is printed whether or not devices are found in probe */
#ifdef MODULE
printk(version);
#endif
return pci_module_init (&natsemi_driver);
}
......
......@@ -25,12 +25,6 @@
Limited full-duplex support.
*/
/* These identify the driver base version and may not be removed. */
static const char version1[] =
"ne2k-pci.c:v1.02 10/19/2000 D. Becker/P. Gortmaker\n";
static const char version2[] =
" http://www.scyld.com/network/ne2k-pci.html\n";
/* The user-configurable values.
These may be modified when a driver module is loaded.*/
......@@ -60,6 +54,11 @@ static int options[MAX_UNITS];
#include <linux/etherdevice.h>
#include "8390.h"
/* These identify the driver base version and may not be removed. */
static char version[] __devinitdata =
KERN_INFO "ne2k-pci.c:v1.02 10/19/2000 D. Becker/P. Gortmaker\n"
KERN_INFO " http://www.scyld.com/network/ne2k-pci.html\n";
#if defined(__powerpc__)
#define inl_le(addr) le32_to_cpu(inl(addr))
#define inw_le(addr) le16_to_cpu(inw(addr))
......@@ -199,8 +198,14 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev,
long ioaddr;
int flags = pci_clone_list[chip_idx].flags;
if (fnd_cnt++ == 0)
printk(KERN_INFO "%s" KERN_INFO "%s", version1, version2);
/* when built into the kernel, we only print version if device is found */
#ifndef MODULE
static int printed_version;
if (!printed_version++)
printk(version);
#endif
fnd_cnt++;
i = pci_enable_device (pdev);
if (i)
......@@ -593,6 +598,10 @@ static struct pci_driver ne2k_driver = {
static int __init ne2k_pci_init(void)
{
/* when a module, this is printed whether or not devices are found in probe */
#ifdef MODULE
printk(version);
#endif
return pci_module_init (&ne2k_driver);
}
......
......@@ -83,13 +83,6 @@ IVb. References
IVc. Errata
1) The RTL-8139 has a serious problem with motherboards which do
posted MMIO writes to PCI space. This driver works around the
problem by having an MMIO register write be immediately followed by
an MMIO register read.
2) The RTL-8129 is only supported in Donald Becker's rtl8139 driver.
*/
#include <linux/module.h>
......@@ -102,12 +95,14 @@ an MMIO register read.
#include <linux/delay.h>
#include <asm/io.h>
#define NETDRV_VERSION "1.0.0"
#define MODNAME "netdrv"
#define NETDRV_DRIVER_LOAD_MSG "MyVendor Fast Ethernet driver " NETDRV_VERSION " loaded"
#define PFX MODNAME ": "
static char version[] __devinitdata =
KERN_INFO NETDRV_DRIVER_LOAD_MSG "\n"
KERN_INFO " Support available from http://foo.com/bar/baz.html\n";
/* define to 1 to enable PIO instead of MMIO */
#undef USE_IO_OPS
......@@ -740,9 +735,15 @@ static int __devinit netdrv_init_one (struct pci_dev *pdev,
int i, addr_len, option;
void *ioaddr = NULL;
static int board_idx = -1;
static int printed_version;
u8 tmp;
/* when built into the kernel, we only print version if device is found */
#ifndef MODULE
static int printed_version;
if (!printed_version++)
printk(version);
#endif
DPRINTK ("ENTER\n");
assert (pdev != NULL);
......@@ -750,11 +751,6 @@ static int __devinit netdrv_init_one (struct pci_dev *pdev,
board_idx++;
if (!printed_version) {
printk (KERN_INFO NETDRV_DRIVER_LOAD_MSG "\n");
printed_version = 1;
}
i = netdrv_init_board (pdev, &dev, &ioaddr);
if (i < 0) {
DPRINTK ("EXIT, returning %d\n", i);
......@@ -1973,6 +1969,10 @@ static struct pci_driver netdrv_pci_driver = {
static int __init netdrv_init_module (void)
{
/* when a module, this is printed whether or not devices are found in probe */
#ifdef MODULE
printk(version);
#endif
return pci_module_init (&netdrv_pci_driver);
}
......
......@@ -195,6 +195,7 @@ static hw_info_t hw_info[] = {
{ /* SCM Ethernet */ 0x0ff0, 0x00, 0x20, 0xcb, 0 },
{ /* Socket EA */ 0x4000, 0x00, 0xc0, 0x1b,
DELAY_OUTPUT | HAS_MISC_REG | USE_BIG_BUF },
{ /* Socket LP-E CF+ */ 0x01c0, 0x00, 0xc0, 0x1b, 0 },
{ /* SuperSocket RE450T */ 0x0110, 0x00, 0xe0, 0x98, 0 },
{ /* Volktek NPL-402CT */ 0x0060, 0x00, 0x40, 0x05, 0 },
{ /* NEC PC-9801N-J12 */ 0x0ff0, 0x00, 0x00, 0x4c, 0 },
......
......@@ -535,13 +535,12 @@ pcnet32_probe1(unsigned long ioaddr, unsigned char irq_line, int shared, int car
pcnet32_dwio_reset(ioaddr);
pcnet32_wio_reset(ioaddr);
/* Important to do the check for dwio mode first. */
if (pcnet32_dwio_read_csr(ioaddr, 0) == 4 && pcnet32_dwio_check(ioaddr)) {
a = &pcnet32_dwio;
/* NOTE: 16-bit check is first, otherwise some older PCnet chips fail */
if (pcnet32_wio_read_csr (ioaddr, 0) == 4 && pcnet32_wio_check (ioaddr)) {
a = &pcnet32_wio;
} else {
if (pcnet32_wio_read_csr(ioaddr, 0) == 4 &&
pcnet32_wio_check(ioaddr)) {
a = &pcnet32_wio;
if (pcnet32_dwio_read_csr (ioaddr, 0) == 4 && pcnet32_dwio_check(ioaddr)) {
a = &pcnet32_dwio;
} else
return -ENODEV;
}
......@@ -653,7 +652,13 @@ pcnet32_probe1(unsigned long ioaddr, unsigned char irq_line, int shared, int car
promaddr[i] = inb(ioaddr + i);
}
if( memcmp( promaddr, dev->dev_addr, 6) )
printk(" warning: PROM address does not match CSR address");
{
printk(" warning PROM address does not match CSR address");
#if defined(__i386__)
printk(KERN_WARNING "%s: Probably a Compaq, using the PROM address of", dev->name);
memcpy(dev->dev_addr, promaddr, 6);
#endif
}
}
/* if the ethernet address is not valid, force to 00:00:00:00:00:00 */
if( !is_valid_ether_addr(dev->dev_addr) )
......
......@@ -244,11 +244,6 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
err = 0;
break;
case PPPIOCATTACH:
case PPPIOCDETACH:
err = ppp_channel_ioctl(&ap->chan, cmd, arg);
break;
default:
err = -ENOIOCTLCMD;
}
......
......@@ -19,7 +19,7 @@
* PPP driver, written by Michael Callahan and Al Longyear, and
* subsequently hacked by Paul Mackerras.
*
* ==FILEVERSION 20000417==
* ==FILEVERSION 20000902==
*/
#include <linux/config.h>
......@@ -32,6 +32,7 @@
#include <linux/netdevice.h>
#include <linux/poll.h>
#include <linux/ppp_defs.h>
#include <linux/filter.h>
#include <linux/if_ppp.h>
#include <linux/ppp_channel.h>
#include <linux/ppp-comp.h>
......@@ -121,6 +122,10 @@ struct ppp {
struct sk_buff_head mrq; /* MP: receive reconstruction queue */
#endif /* CONFIG_PPP_MULTILINK */
struct net_device_stats stats; /* statistics */
#ifdef CONFIG_PPP_FILTER
struct sock_fprog pass_filter; /* filter for packets to pass */
struct sock_fprog active_filter;/* filter for pkts to reset idle */
#endif /* CONFIG_PPP_FILTER */
};
/*
......@@ -621,6 +626,43 @@ static int ppp_ioctl(struct inode *inode, struct file *file,
err = 0;
break;
#ifdef CONFIG_PPP_FILTER
case PPPIOCSPASS:
case PPPIOCSACTIVE:
{
struct sock_fprog uprog, *filtp;
struct sock_filter *code = NULL;
int len;
if (copy_from_user(&uprog, (void *) arg, sizeof(uprog)))
break;
if (uprog.len > 0) {
err = -ENOMEM;
len = uprog.len * sizeof(struct sock_filter);
code = kmalloc(len, GFP_KERNEL);
if (code == 0)
break;
err = -EFAULT;
if (copy_from_user(code, uprog.filter, len))
break;
err = sk_chk_filter(code, uprog.len);
if (err) {
kfree(code);
break;
}
}
filtp = (cmd == PPPIOCSPASS)? &ppp->pass_filter: &ppp->active_filter;
ppp_lock(ppp);
if (filtp->filter)
kfree(filtp->filter);
filtp->filter = code;
filtp->len = uprog.len;
ppp_unlock(ppp);
err = 0;
break;
}
#endif /* CONFIG_PPP_FILTER */
#ifdef CONFIG_PPP_MULTILINK
case PPPIOCSMRRU:
if (get_user(val, (int *) arg))
......@@ -890,6 +932,33 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb)
int len;
unsigned char *cp;
if (proto < 0x8000) {
#ifdef CONFIG_PPP_FILTER
/* check if we should pass this packet */
/* the filter instructions are constructed assuming
a four-byte PPP header on each packet */
*skb_push(skb, 2) = 1;
if (ppp->pass_filter.filter
&& sk_run_filter(skb, ppp->pass_filter.filter,
ppp->pass_filter.len) == 0) {
if (ppp->debug & 1) {
printk(KERN_DEBUG "PPP: outbound frame not passed\n");
kfree_skb(skb);
return;
}
}
/* if this packet passes the active filter, record the time */
if (!(ppp->active_filter.filter
&& sk_run_filter(skb, ppp->active_filter.filter,
ppp->active_filter.len) == 0))
ppp->last_xmit = jiffies;
skb_pull(skb, 2);
#else
/* for data packets, record the time */
ppp->last_xmit = jiffies;
#endif /* CONFIG_PPP_FILTER */
}
++ppp->stats.tx_packets;
ppp->stats.tx_bytes += skb->len - 2;
......@@ -962,10 +1031,6 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb)
}
}
/* for data packets, record the time */
if (proto < 0x8000)
ppp->last_xmit = jiffies;
/*
* If we are waiting for traffic (demand dialling),
* queue it up for pppd to receive.
......@@ -1400,7 +1465,29 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
} else {
/* network protocol frame - give it to the kernel */
#ifdef CONFIG_PPP_FILTER
/* check if the packet passes the pass and active filters */
/* the filter instructions are constructed assuming
a four-byte PPP header on each packet */
*skb_push(skb, 2) = 0;
if (ppp->pass_filter.filter
&& sk_run_filter(skb, ppp->pass_filter.filter,
ppp->pass_filter.len) == 0) {
if (ppp->debug & 1)
printk(KERN_DEBUG "PPP: inbound frame not passed\n");
kfree_skb(skb);
return;
}
if (!(ppp->active_filter.filter
&& sk_run_filter(skb, ppp->active_filter.filter,
ppp->active_filter.len) == 0))
ppp->last_recv = jiffies;
skb_pull(skb, 2);
#else
ppp->last_recv = jiffies;
#endif /* CONFIG_PPP_FILTER */
if ((ppp->dev->flags & IFF_UP) == 0
|| ppp->npmode[npi] != NPMODE_PASS) {
kfree_skb(skb);
......@@ -1805,70 +1892,6 @@ ppp_output_wakeup(struct ppp_channel *chan)
ppp_channel_push(pch);
}
/*
* This is basically temporary compatibility stuff.
*/
ssize_t
ppp_channel_read(struct ppp_channel *chan, struct file *file,
char *buf, size_t count)
{
struct channel *pch = chan->ppp;
if (pch == 0)
return -ENXIO;
return ppp_file_read(&pch->file, file, buf, count);
}
ssize_t
ppp_channel_write(struct ppp_channel *chan, const char *buf, size_t count)
{
struct channel *pch = chan->ppp;
if (pch == 0)
return -ENXIO;
return ppp_file_write(&pch->file, buf, count);
}
/* No kernel lock - fine */
unsigned int
ppp_channel_poll(struct ppp_channel *chan, struct file *file, poll_table *wait)
{
unsigned int mask;
struct channel *pch = chan->ppp;
mask = POLLOUT | POLLWRNORM;
if (pch != 0) {
poll_wait(file, &pch->file.rwait, wait);
if (skb_peek(&pch->file.rq) != 0)
mask |= POLLIN | POLLRDNORM;
}
return mask;
}
int ppp_channel_ioctl(struct ppp_channel *chan, unsigned int cmd,
unsigned long arg)
{
struct channel *pch = chan->ppp;
int err = -ENOTTY;
int unit;
if (!capable(CAP_NET_ADMIN))
return -EPERM;
if (pch == 0)
return -EINVAL;
switch (cmd) {
case PPPIOCATTACH:
if (get_user(unit, (int *) arg))
break;
err = ppp_connect_channel(pch, unit);
break;
case PPPIOCDETACH:
err = ppp_disconnect_channel(pch);
break;
}
return err;
}
/*
* Compression control.
*/
......@@ -2192,6 +2215,7 @@ ppp_create_interface(int unit, int *retp)
ppp->file.index = unit;
ppp->mru = PPP_MRU;
init_ppp_file(&ppp->file, INTERFACE);
ppp->file.hdrlen = PPP_HDRLEN - 2; /* don't count proto bytes */
for (i = 0; i < NUM_NP; ++i)
ppp->npmode[i] = NPMODE_PASS;
INIT_LIST_HEAD(&ppp->channels);
......@@ -2263,6 +2287,16 @@ static void ppp_destroy_interface(struct ppp *ppp)
#ifdef CONFIG_PPP_MULTILINK
skb_queue_purge(&ppp->mrq);
#endif /* CONFIG_PPP_MULTILINK */
#ifdef CONFIG_PPP_FILTER
if (ppp->pass_filter.filter) {
kfree(ppp->pass_filter.filter);
ppp->pass_filter.filter = NULL;
}
if (ppp->active_filter.filter) {
kfree(ppp->active_filter.filter);
ppp->active_filter.filter = 0;
}
#endif /* CONFIG_PPP_FILTER */
dev = ppp->dev;
ppp->dev = 0;
ppp_unlock(ppp);
......@@ -2429,9 +2463,5 @@ EXPORT_SYMBOL(ppp_input_error);
EXPORT_SYMBOL(ppp_output_wakeup);
EXPORT_SYMBOL(ppp_register_compressor);
EXPORT_SYMBOL(ppp_unregister_compressor);
EXPORT_SYMBOL(ppp_channel_read);
EXPORT_SYMBOL(ppp_channel_write);
EXPORT_SYMBOL(ppp_channel_poll);
EXPORT_SYMBOL(ppp_channel_ioctl);
EXPORT_SYMBOL(all_ppp_units); /* for debugging */
EXPORT_SYMBOL(all_channels); /* for debugging */
......@@ -233,31 +233,25 @@ ppp_sync_close(struct tty_struct *tty)
}
/*
* Read a PPP frame, for compatibility until pppd is updated.
* Read does nothing - no data is ever available this way.
* Pppd reads and writes packets via /dev/ppp instead.
*/
static ssize_t
ppp_sync_read(struct tty_struct *tty, struct file *file,
unsigned char *buf, size_t count)
{
struct syncppp *ap = tty->disc_data;
if (ap == 0)
return -ENXIO;
return ppp_channel_read(&ap->chan, file, buf, count);
return -EAGAIN;
}
/*
* Write a ppp frame, for compatibility until pppd is updated.
* Write on the tty does nothing, the packets all come in
* from the ppp generic stuff.
*/
static ssize_t
ppp_sync_write(struct tty_struct *tty, struct file *file,
const unsigned char *buf, size_t count)
{
struct syncppp *ap = tty->disc_data;
if (ap == 0)
return -ENXIO;
return ppp_channel_write(&ap->chan, buf, count);
return -EAGAIN;
}
static int
......@@ -308,30 +302,6 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
err = 0;
break;
/*
* Compatibility calls until pppd is updated.
*/
case PPPIOCGFLAGS:
case PPPIOCSFLAGS:
case PPPIOCGASYNCMAP:
case PPPIOCSASYNCMAP:
case PPPIOCGRASYNCMAP:
case PPPIOCSRASYNCMAP:
case PPPIOCGXASYNCMAP:
case PPPIOCSXASYNCMAP:
case PPPIOCGMRU:
case PPPIOCSMRU:
err = -EPERM;
if (!capable(CAP_NET_ADMIN))
break;
err = ppp_sync_ioctl(&ap->chan, cmd, arg);
break;
case PPPIOCATTACH:
case PPPIOCDETACH:
err = ppp_channel_ioctl(&ap->chan, cmd, arg);
break;
default:
err = -ENOIOCTLCMD;
}
......@@ -343,16 +313,7 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
static unsigned int
ppp_sync_poll(struct tty_struct *tty, struct file *file, poll_table *wait)
{
struct syncppp *ap = tty->disc_data;
unsigned int mask;
mask = POLLOUT | POLLWRNORM;
/* compatibility for old pppd */
if (ap != 0)
mask |= ppp_channel_poll(&ap->chan, file, wait);
if (test_bit(TTY_OTHER_CLOSED, &tty->flags) || tty_hung_up_p(file))
mask |= POLLHUP;
return mask;
return 0;
}
static int
......
......@@ -47,7 +47,7 @@
#include <linux/timer.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/malloc.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
......@@ -62,8 +62,8 @@
#include "sis900.h"
static const char *version =
"sis900.c: v1.07.11 4/10/2001\n";
static char version[] __devinitdata =
KERN_INFO "sis900.c: v1.07.11 4/10/2001\n";
static int max_interrupt_work = 40;
static int multicast_filter_limit = 128;
......@@ -308,6 +308,13 @@ static int __devinit sis900_probe (struct pci_dev *pci_dev, const struct pci_dev
u8 revision;
char *card_name = card_names[pci_id->driver_data];
/* when built into the kernel, we only print version if device is found */
#ifndef MODULE
static int printed_version;
if (!printed_version++)
printk(version);
#endif
/* setup various bits in PCI command register */
ret = pci_enable_device(pci_dev);
if(ret) return ret;
......@@ -1997,7 +2004,10 @@ static struct pci_driver sis900_pci_driver = {
static int __init sis900_init_module(void)
{
printk(KERN_INFO "%s", version);
/* when a module, this is printed whether or not devices are found in probe */
#ifdef MODULE
printk(version);
#endif
return pci_module_init(&sis900_pci_driver);
}
......
......@@ -36,15 +36,6 @@
- Merge Becker version 1.03
*/
/* These identify the driver base version and may not be removed. */
static const char version1[] =
"starfire.c:v1.03 7/26/2000 Written by Donald Becker <becker@scyld.com>\n";
static const char version2[] =
" Updates and info at http://www.scyld.com/network/starfire.html\n";
static const char version3[] =
" (unofficial 2.4.x kernel port, version 1.1.4, August 10, 2000)\n";
/* The user-configurable values.
These may be modified when a driver module is loaded.*/
......@@ -123,6 +114,12 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
#include <asm/bitops.h>
#include <asm/io.h>
/* These identify the driver base version and may not be removed. */
static char version[] __devinitdata =
KERN_INFO "starfire.c:v1.03 7/26/2000 Written by Donald Becker <becker@scyld.com>\n"
KERN_INFO " Updates and info at http://www.scyld.com/network/starfire.html\n"
KERN_INFO " (unofficial 2.4.x kernel port, version 1.1.4a, April 17, 2001)\n";
MODULE_AUTHOR("Donald Becker <becker@scyld.com>");
MODULE_DESCRIPTION("Adaptec Starfire Ethernet driver");
MODULE_PARM(max_interrupt_work, "i");
......@@ -395,17 +392,19 @@ static int __devinit starfire_init_one (struct pci_dev *pdev,
int i, irq, option, chip_idx = ent->driver_data;
struct net_device *dev;
static int card_idx = -1;
static int printed_version;
long ioaddr;
int drv_flags, io_size = netdrv_tbl[chip_idx].io_size;
/* when built into the kernel, we only print version if device is found */
#ifndef MODULE
static int printed_version;
if (!printed_version++)
printk(version);
#endif
card_idx++;
option = card_idx < MAX_UNITS ? options[card_idx] : 0;
if (!printed_version++)
printk(KERN_INFO "%s" KERN_INFO "%s" KERN_INFO "%s",
version1, version2, version3);
if (pci_enable_device (pdev))
return -EIO;
......@@ -1390,6 +1389,10 @@ static struct pci_driver starfire_driver = {
static int __init starfire_init (void)
{
/* when a module, this is printed whether or not devices are found in probe */
#ifdef MODULE
printk(version);
#endif
return pci_module_init (&starfire_driver);
}
......
......@@ -910,7 +910,10 @@ static int bigmac_open(struct net_device *dev)
return ret;
}
init_timer(&bp->bigmac_timer);
return bigmac_init(bp, 0);
ret = bigmac_init(bp, 0);
if (ret)
free_irq(dev->irq, bp);
return ret;
}
static int bigmac_close(struct net_device *dev)
......@@ -923,7 +926,7 @@ static int bigmac_close(struct net_device *dev)
bigmac_stop(bp);
bigmac_clean_rings(bp);
free_irq(dev->irq, (void *)bp);
free_irq(dev->irq, bp);
return 0;
}
......@@ -1249,7 +1252,7 @@ static int __init bigmac_probe(void)
struct net_device *dev = NULL;
struct sbus_bus *sbus;
struct sbus_dev *sdev = 0;
static int called = 0;
static int called;
int cards = 0, v;
root_bigmac_dev = NULL;
......
......@@ -18,12 +18,6 @@
http://www.scyld.com/network/sundance.html
*/
/* These identify the driver base version and may not be removed. */
static const char version1[] =
"sundance.c:v1.01 4/09/00 Written by Donald Becker\n";
static const char version2[] =
" http://www.scyld.com/network/sundance.html\n";
/* The user-configurable values.
These may be modified when a driver module is loaded.*/
......@@ -97,6 +91,10 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
#include <linux/spinlock.h>
/* These identify the driver base version and may not be removed. */
static char version[] __devinitdata =
KERN_INFO "sundance.c:v1.01 4/09/00 Written by Donald Becker\n"
KERN_INFO " http://www.scyld.com/network/sundance.html\n";
/* Condensed operations for readability. */
#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr))
......@@ -384,6 +382,13 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
int i, option = card_idx < MAX_UNITS ? options[card_idx] : 0;
long ioaddr;
/* when built into the kernel, we only print version if device is found */
#ifndef MODULE
static int printed_version;
if (!printed_version++)
printk(version);
#endif
if (pci_enable_device(pdev))
return -EIO;
pci_set_master(pdev);
......@@ -404,7 +409,7 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
ioaddr = pci_resource_start(pdev, 1);
ioaddr = (long) ioremap (ioaddr, pci_id_tbl[chip_idx].io_size);
if (!ioaddr)
goto err_out_iomem;
goto err_out_res;
#endif
for (i = 0; i < 3; i++)
......@@ -445,6 +450,7 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
dev->do_ioctl = &mii_ioctl;
dev->tx_timeout = &tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT;
pci_set_drvdata(pdev, dev);
if (mtu)
dev->mtu = mtu;
......@@ -493,7 +499,7 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
pci_set_drvdata(pdev, NULL);
#ifndef USE_IO_OPS
iounmap((void *)ioaddr);
err_out_iomem:
err_out_res:
#endif
pci_release_regions(pdev);
err_out_netdev:
......@@ -1260,6 +1266,10 @@ static struct pci_driver sundance_driver = {
static int __init sundance_init(void)
{
/* when a module, this is printed whether or not devices are found in probe */
#ifdef MODULE
printk(version);
#endif
return pci_module_init(&sundance_driver);
}
......
......@@ -17,7 +17,7 @@
* 16-Jan-00 AF Created
*
*/
static const char *version = "madgemc.c: v0.91 23/01/2000 by Adam Fritzler\n";
static const char version[] = "madgemc.c: v0.91 23/01/2000 by Adam Fritzler\n";
#include <linux/module.h>
#include <linux/mca.h>
......
......@@ -19,7 +19,7 @@
* TODO:
* 1. Add support for Proteon TR ISA adapters (1392, 1392+)
*/
static const char *version = "tmsisa.c: v1.00 14/01/2001 by Jochen Friedrich\n";
static const char version[] = "tmsisa.c: v1.00 14/01/2001 by Jochen Friedrich\n";
#include <linux/module.h>
#include <linux/kernel.h>
......@@ -60,7 +60,7 @@ static int dmalist[] __initdata = {
0
};
static char *isa_cardname = "SK NET TR 4/16 ISA\0";
static char isa_cardname[] = "SK NET TR 4/16 ISA\0";
int tms_isa_probe(struct net_device *dev);
static int tms_isa_open(struct net_device *dev);
......@@ -271,6 +271,14 @@ int __init tms_isa_probe(struct net_device *dev)
{
/* Enlist in the card list */
card = kmalloc(sizeof(struct tms_isa_card), GFP_KERNEL);
if (!card) {
unregister_trdev(dev);
release_region(dev->base_addr, TMS_ISA_IO_EXTENT);
free_irq(dev->irq, dev);
free_dma(dev->dma);
tmsdev_term(dev);
return -1;
}
card->next = tms_isa_card_list;
tms_isa_card_list = card;
card->dev = dev;
......
2001-04-03 Jeff Garzik <jgarzik@mandrakesoft.com>
* tulip_core.c: Now that dev->name is only available late
in the probe, insert a hack to replace a not-evaluated
"eth%d" string with an evaluated "tulip%d" string.
Also, remove obvious comment and an indentation cleanup.
2001-04-03 Jeff Garzik <jgarzik@mandrakesoft.com>
* tulip_core.c: If we are a module, always print out the
version string. If we are built into the kernel, only print
the version string if at least one tulip is detected.
2001-04-03 Jeff Garzik <jgarzik@mandrakesoft.com>
Merged from Becker's tulip.c 0.92t:
* tulip_core.c: Add support for Conexant LANfinity.
2001-04-03 Jeff Garzik <jgarzik@mandrakesoft.com>
* tulip_core.c: Only suspend/resume if the interface
is up and running. Use alloc_etherdev and pci_request_regions.
Spelling fix.
2001-04-03 Jeff Garzik <jgarzik@mandrakesoft.com>
* tulip_core.c: Remove code that existed when one or more of
......
......@@ -321,7 +321,19 @@ void tulip_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
(tp->link_change)(dev, csr5);
}
if (csr5 & SytemError) {
printk(KERN_ERR "%s: (%lu) System Error occured\n", dev->name, tp->nir);
int error = (csr5 >> 23) & 7;
/* oops, we hit a PCI error. The code produced corresponds
* to the reason:
* 0 - parity error
* 1 - master abort
* 2 - target abort
* Note that on parity error, we should do a software reset
* of the chip to get it back into a sane state (according
* to the 21142/3 docs that is).
* -- rmk
*/
printk(KERN_ERR "%s: (%lu) System Error occured (%d)\n",
dev->name, tp->nir, error);
}
/* Clear all error sources, included undocumented ones! */
outl(0x0800f7ba, ioaddr + CSR5);
......
......@@ -83,6 +83,7 @@ enum chips {
COMPEX9881,
I21145,
DM910X,
CONEXANT,
};
......
This diff is collapsed.
......@@ -131,10 +131,9 @@ static const int multicast_filter_limit = 32;
#include <asm/irq.h>
/* These identify the driver base version and may not be removed. */
static char version1[] __devinitdata =
"via-rhine.c:v1.08b-LK1.1.7 8/9/2000 Written by Donald Becker\n";
static char version2[] __devinitdata =
" http://www.scyld.com/network/via-rhine.html\n";
static char version[] __devinitdata =
KERN_INFO "via-rhine.c:v1.08b-LK1.1.8 4/17/2000 Written by Donald Becker\n"
KERN_INFO " http://www.scyld.com/network/via-rhine.html\n";
......@@ -477,17 +476,17 @@ static int __devinit via_rhine_init_one (struct pci_dev *pdev,
int i, option;
int chip_id = (int) ent->driver_data;
static int card_idx = -1;
static int did_version;
long ioaddr;
int io_size;
int pci_flags;
/* print version once and once only */
if (! did_version++) {
printk (KERN_INFO "%s", version1);
printk (KERN_INFO "%s", version2);
}
/* when built into the kernel, we only print version if device is found */
#ifndef MODULE
static int printed_version;
if (!printed_version++)
printk(version);
#endif
card_idx++;
option = card_idx < MAX_UNITS ? options[card_idx] : 0;
io_size = via_rhine_chip_info[chip_id].io_size;
......@@ -1499,6 +1498,10 @@ static struct pci_driver via_rhine_driver = {
static int __init via_rhine_init (void)
{
/* when a module, this is printed whether or not devices are found in probe */
#ifdef MODULE
printk(version);
#endif
return pci_module_init (&via_rhine_driver);
}
......
......@@ -57,8 +57,8 @@
#include <net/sock.h>
static const char *devname = "dlci";
static const char *version = "DLCI driver v0.35, 4 Jan 1997, mike.mclagan@linux.org";
static const char devname[] = "dlci";
static const char version[] = "DLCI driver v0.35, 4 Jan 1997, mike.mclagan@linux.org";
static struct net_device *open_dev[CONFIG_DLCI_COUNT];
......
......@@ -107,7 +107,7 @@
#include <linux/hdlc.h>
/* Version */
static const char * version = "$Id: dscc4.c,v 1.130 2001/02/25 15:27:34 romieu Exp $\n";
static const char version[] = "$Id: dscc4.c,v 1.130 2001/02/25 15:27:34 romieu Exp $\n";
static int debug;
......
......@@ -1024,9 +1024,7 @@ static int if_init (netdevice_t* dev)
dev->tx_queue_len = 100;
/* Initialize socket buffers */
#if defined(LINUX_2_1) || defined(LINUX_2_4)
dev_init_buffers(dev);
#else
#if !defined(LINUX_2_1) && !defined(LINUX_2_4)
for (i = 0; i < DEV_NUMBUFFS; ++i)
skb_queue_head_init(&dev->buffs[i]);
#endif
......
......@@ -1278,9 +1278,7 @@ static int if_init (netdevice_t* dev)
dev->tx_queue_len = 100;
/* Initialize socket buffers */
#if defined(LINUX_2_1) || defined(LINUX_2_4)
dev_init_buffers(dev);
#else
#if !defined(LINUX_2_1) && !defined(LINUX_2_4)
for (i = 0; i < DEV_NUMBUFFS; ++i)
skb_queue_head_init(&dev->buffs[i]);
#endif
......
......@@ -793,9 +793,7 @@ static int if_init(netdevice_t *dev)
dev->tx_queue_len = 100;
/* Initialize socket buffers */
#if defined(LINUX_2_1) || defined(LINUX_2_4)
dev_init_buffers(dev);
#else
#if !defined(LINUX_2_1) && !defined(LINUX_2_4)
for (i = 0; i < DEV_NUMBUFFS; ++i)
skb_queue_head_init(&dev->buffs[i]);
#endif
......
......@@ -1174,9 +1174,7 @@ static int if_init (netdevice_t* dev)
dev->tx_queue_len = 100;
/* Initialize socket buffers */
#if defined(LINUX_2_1) || defined(LINUX_2_4)
dev_init_buffers(dev);
#else
#if !defined(LINUX_2_1) && !defined(LINUX_2_4)
for (i = 0; i < DEV_NUMBUFFS; ++i)
skb_queue_head_init(&dev->buffs[i]);
#endif
......
......@@ -719,8 +719,7 @@ static int if_init (netdevice_t* dev)
dev->tx_queue_len = 100;
/* Initialize socket buffers */
#if defined(LINUX_2_1) || defined(LINUX_2_4)
#else
#if !defined(LINUX_2_1) && !defined(LINUX_2_4)
for (i = 0; i < DEV_NUMBUFFS; ++i)
skb_queue_head_init(&dev->buffs[i]);
#endif
......
......@@ -38,12 +38,6 @@
descriptors. Remove cpu_to_le32, enable BE descriptors.
*/
/* These identify the driver base version and may not be removed. */
static const char version1[] =
"winbond-840.c:v1.01 (2.4 port) 5/15/2000 Donald Becker <becker@scyld.com>\n";
static const char version2[] =
" http://www.scyld.com/network/drivers.html\n";
/* Automatically extracted configuration info:
probe-func: winbond840_probe
config-in: tristate 'Winbond W89c840 Ethernet support' CONFIG_WINBOND_840
......@@ -132,6 +126,11 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
#include <asm/bitops.h>
#include <asm/io.h>
/* These identify the driver base version and may not be removed. */
static char version[] __devinitdata =
KERN_INFO "winbond-840.c:v1.01 (2.4 port) 5/15/2000 Donald Becker <becker@scyld.com>\n"
KERN_INFO " http://www.scyld.com/network/drivers.html\n";
MODULE_AUTHOR("Donald Becker <becker@scyld.com>");
MODULE_DESCRIPTION("Winbond W89c840 Ethernet driver");
MODULE_PARM(max_interrupt_work, "i");
......@@ -1412,6 +1411,10 @@ static struct pci_driver w840_driver = {
static int __init w840_init(void)
{
/* when a module, this is printed whether or not devices are found in probe */
#ifdef MODULE
printk(version);
#endif
return pci_module_init(&w840_driver);
}
......
......@@ -31,14 +31,6 @@
*/
/* These identify the driver base version and may not be removed. */
static const char version1[] =
"yellowfin.c:v1.05 1/09/2001 Written by Donald Becker <becker@scyld.com>\n";
static const char version2[] =
" http://www.scyld.com/network/yellowfin.html\n";
static const char version3[] =
" (unofficial 2.4.x port, LK1.1.2, January 11, 2001)\n";
/* The user-configurable values.
These may be modified when a driver module is loaded.*/
......@@ -115,6 +107,12 @@ static int gx_fix;
#include <asm/bitops.h>
#include <asm/io.h>
/* These identify the driver base version and may not be removed. */
static char version[] __devinitdata =
KERN_INFO "yellowfin.c:v1.05 1/09/2001 Written by Donald Becker <becker@scyld.com>\n"
KERN_INFO " http://www.scyld.com/network/yellowfin.html\n"
KERN_INFO " (unofficial 2.4.x port, LK1.1.2, January 11, 2001)\n";
/* Condensed operations for readability. */
#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr))
#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr))
......@@ -391,6 +389,13 @@ static int __devinit yellowfin_init_one(struct pci_dev *pdev,
int i, option = find_cnt < MAX_UNITS ? options[find_cnt] : 0;
int drv_flags = pci_id_tbl[chip_idx].drv_flags;
/* when built into the kernel, we only print version if device is found */
#ifndef MODULE
static int printed_version;
if (!printed_version++)
printk(version);
#endif
i = pci_enable_device(pdev);
if (i) return i;
......@@ -1391,10 +1396,10 @@ static struct pci_driver yellowfin_driver = {
static int __init yellowfin_init (void)
{
if (debug) /* Emit version even if no cards detected. */
printk(KERN_INFO "%s" KERN_INFO "%s" KERN_INFO "%s",
version1, version2, version3);
/* when a module, this is printed whether or not devices are found in probe */
#ifdef MODULE
printk(version);
#endif
return pci_module_init (&yellowfin_driver);
}
......
2001-04-20 Paul Gortmaker <p_gortmaker@yahoo.com>
* parport_pc.c: Cut down the size quite a bit (more than 4k off
the object, about 1k off the zImage) for the older non-PCI
machines which are typically resource starved anyway...
2001-03-26 R Horn <rjh@world.std.com>
* parport_pc.c: Some commentary changes.
2001-04-19 Tim Waugh <twaugh@redhat.com>
* parport_pc.c (parport_pc_probe_port): Remove __devinit
attribute. Export unconditionally.
2001-04-14 Jeff Garzik <jgarzik@mandrakesoft.com>
Merged: 2001-03-30 Tim Waugh <twaugh@redhat.com>
......
......@@ -11,6 +11,7 @@
* Cleaned up include files - Russell King <linux@arm.uk.linux.org>
* DMA support - Bert De Jonghe <bert@sophis.be>
* Many ECP bugs fixed. Fred Barnes & Jamie Lokier, 1999
* More PCI support now conditional on CONFIG_PCI, 03/2001, Paul G.
*/
/* This driver should work with any hardware that is broadly compatible
......@@ -940,13 +941,11 @@ size_t parport_pc_ecp_read_block_pio (struct parport *port,
/* Can't yield the port. */
schedule ();
/* At this point, the FIFO may already be full.
* Ideally, we'd be able to tell the port to hold on
* for a second while we empty the FIFO, and we'd be
* able to ensure that no data is lost. I'm not sure
* that's the case. :-( It might be that you can play
* games with STB, as in the forward case; someone should
* look at a datasheet. */
/* At this point, the FIFO may already be full. In
* that case ECP is already holding back the
* peripheral (assuming proper design) with a delayed
* handshake. Work fast to avoid a peripheral
* timeout. */
if (ecrval & 0x01) {
/* FIFO is empty. Wait for interrupt. */
......@@ -978,6 +977,10 @@ size_t parport_pc_ecp_read_block_pio (struct parport *port,
goto false_alarm;
}
/* Depending on how the FIFO threshold was
* set, how long interrupt service took, and
* how fast the peripheral is, we might be
* lucky and have a just filled FIFO. */
continue;
}
......@@ -989,6 +992,9 @@ size_t parport_pc_ecp_read_block_pio (struct parport *port,
continue;
}
/* FIFO not filled. We will cycle this loop for a while
* and either the peripheral will fill it faster,
* tripping a fast empty with insb, or we empty it. */
*bufp++ = inb (fifo);
left--;
}
......@@ -1983,10 +1989,10 @@ static int __devinit parport_dma_probe (struct parport *p)
/* --- Initialisation code -------------------------------- */
struct parport *__devinit parport_pc_probe_port (unsigned long int base,
unsigned long int base_hi,
int irq, int dma,
struct pci_dev *dev)
struct parport *parport_pc_probe_port (unsigned long int base,
unsigned long int base_hi,
int irq, int dma,
struct pci_dev *dev)
{
struct parport_pc_private *priv;
struct parport_operations *ops;
......@@ -2179,6 +2185,7 @@ struct parport *__devinit parport_pc_probe_port (unsigned long int base,
}
#ifdef CONFIG_PCI
/* Via support maintained by Jeff Garzik <jgarzik@mandrakesoft.com> */
static int __devinit sio_via_686a_probe (struct pci_dev *pdev, int autoirq,
int autodma)
......@@ -2553,7 +2560,6 @@ static struct pci_driver parport_pc_pci_driver = {
static int __init parport_pc_init_superio (int autoirq, int autodma)
{
#ifdef CONFIG_PCI
const struct pci_device_id *id;
struct pci_dev *pdev;
......@@ -2565,10 +2571,13 @@ static int __init parport_pc_init_superio (int autoirq, int autodma)
return parport_pc_superio_info[id->driver_data].probe
(pdev, autoirq, autodma);
}
#endif /* CONFIG_PCI */
return 0; /* zero devices found */
}
#else
static struct pci_driver parport_pc_pci_driver;
static int __init parport_pc_init_superio(void) {return 0;}
#endif /* CONFIG_PCI */
/* This is called by parport_pc_find_nonpci_ports (in asm/parport.h) */
static int __init __attribute__((unused))
......@@ -2641,17 +2650,8 @@ int __init parport_pc_init (int *io, int *io_hi, int *irq, int *dma)
}
/* Exported symbols. */
#ifdef CONFIG_PARPORT_PC_PCMCIA
/* parport_cs needs this in order to dyncamically get us to find ports. */
EXPORT_SYMBOL (parport_pc_probe_port);
#else
EXPORT_NO_SYMBOLS;
#endif
#ifdef MODULE
static int io[PARPORT_PC_MAX_PORTS+1] = { [0 ... PARPORT_PC_MAX_PORTS] = 0 };
static int io_hi[PARPORT_PC_MAX_PORTS+1] = { [0 ... PARPORT_PC_MAX_PORTS] = 0 };
......
......@@ -84,6 +84,29 @@ static void __init quirk_triton(struct pci_dev *dev)
}
}
/*
* VIA Apollo KT133 needs PCI latency patch
* Made according to a windows driver based patch by George E. Breese
* see PCI Latency Adjust on http://www.viahardware.com/download/viatweak.shtm
*/
static void __init quirk_vialatency(struct pci_dev *dev)
{
u8 r70;
printk(KERN_INFO "Applying VIA PCI latency patch.\n");
/*
* In register 0x70, mask off bit 2 (PCI Master read caching)
* and 1 (Delay Transaction)
*/
pci_read_config_byte(dev, 0x70, &r70);
r70 &= 0xf9;
pci_write_config_byte(dev, 0x70, r70);
/*
* Turn off PCI Latency timeout (set to 0 clocks)
*/
pci_write_config_byte(dev, 0x75, 0x80);
}
/*
* VIA Apollo VP3 needs ETBF on BT848/878
*/
......@@ -289,6 +312,7 @@ static struct pci_fixup pci_fixups[] __initdata = {
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_2, quirk_natoma },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, quirk_nopcipci },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, quirk_nopcipci },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, quirk_vialatency },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_viaetbf },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_vt82c598_id },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_vt82c586_acpi },
......
......@@ -2307,6 +2307,8 @@ static int __init m3_codec_install(struct m3_card *card)
codec->private_data = card;
codec->codec_read = m3_ac97_read;
codec->codec_write = m3_ac97_write;
/* someday we should support secondary codecs.. */
codec->id = 0;
if (ac97_probe_codec(codec) == 0) {
printk(KERN_ERR PFX "codec probe failed\n");
......@@ -2934,6 +2936,7 @@ static int __init m3_init_module(void)
if (!pci_register_driver(&m3_pci_driver)) {
pci_unregister_driver(&m3_pci_driver);
unregister_reboot_notifier(&m3_reboot_nb);
return -ENODEV;
}
return 0;
......
......@@ -26,7 +26,30 @@ Known bugs:
last allocated block is not cleared. Well,
this fs never claimed to be Posix conformant.
Please direct bug reports to: hjw@zvw.de
Please direct bug reports to: zippel@linux-m68k.org
Version 3.14
------------
- correctly cut off long file names for compares
- correctly initialize s_last_bmap
Version 3.13
------------
Major cleanup for 2.4 [Roman Zippel]
- new extended block handling
- new bitmap allocation functions
- locking should be safe for the future
- cleanup of some interfaces
Version 3.12
------------
more 2.4 fixes: [Roman Zippel]
- s_lock changes
- increased getblock mess
- clear meta blocks
Version 3.11
------------
......
......@@ -7,6 +7,8 @@
#
# Note 2! The CFLAGS definitions are now in the main makefile.
#EXTRA_CFLAGS=-DDEBUG=1
O_TARGET := affs.o
obj-y := super.o namei.o inode.o file.o dir.o amigaffs.o bitmap.o symlink.o
......
This diff is collapsed.
This diff is collapsed.
......@@ -13,7 +13,6 @@
*
*/
#define DEBUG 0
#include <asm/uaccess.h>
#include <linux/errno.h>
#include <linux/fs.h>
......@@ -50,109 +49,115 @@ struct inode_operations affs_dir_inode_operations = {
static int
affs_readdir(struct file *filp, void *dirent, filldir_t filldir)
{
int j, namelen;
s32 i;
struct inode *inode = filp->f_dentry->d_inode;
struct super_block *sb = inode->i_sb;
struct buffer_head *dir_bh;
struct buffer_head *fh_bh;
unsigned char *name;
int namelen;
u32 i;
int hash_pos;
int chain_pos;
unsigned long ino;
u32 f_pos;
u32 ino;
int stored;
unsigned char *name;
struct buffer_head *dir_bh;
struct buffer_head *fh_bh;
struct inode *dir;
struct inode *inode = filp->f_dentry->d_inode;
int res;
pr_debug("AFFS: readdir(ino=%lu,f_pos=%lu)\n",inode->i_ino,(unsigned long)filp->f_pos);
pr_debug("AFFS: readdir(ino=%lu,f_pos=%lx)\n",inode->i_ino,(unsigned long)filp->f_pos);
stored = 0;
res = -EIO;
dir_bh = NULL;
fh_bh = NULL;
dir = NULL;
ino = inode->i_ino;
f_pos = filp->f_pos;
if (filp->f_pos == 0) {
if (f_pos == 0) {
filp->private_data = (void *)0;
if (filldir(dirent,".",1,filp->f_pos,inode->i_ino,DT_DIR) < 0) {
if (filldir(dirent, ".", 1, f_pos, inode->i_ino, DT_DIR) < 0)
return 0;
}
++filp->f_pos;
filp->f_pos = f_pos = 1;
stored++;
}
if (filp->f_pos == 1) {
if (filldir(dirent,"..",2,filp->f_pos,affs_parent_ino(inode),DT_DIR) < 0) {
if (f_pos == 1) {
if (filldir(dirent, "..", 2, f_pos, filp->f_dentry->d_parent->d_inode->i_ino, DT_DIR) < 0)
return stored;
}
filp->f_pos = 2;
filp->f_pos = f_pos = 2;
stored++;
}
chain_pos = (filp->f_pos - 2) & 0xffff;
hash_pos = (filp->f_pos - 2) >> 16;
down(&AFFS_INODE->i_hash_lock);
chain_pos = (f_pos - 2) & 0xffff;
hash_pos = (f_pos - 2) >> 16;
if (chain_pos == 0xffff) {
affs_warning(inode->i_sb,"readdir","More than 65535 entries in chain");
affs_warning(sb, "readdir", "More than 65535 entries in chain");
chain_pos = 0;
hash_pos++;
filp->f_pos = ((hash_pos << 16) | chain_pos) + 2;
}
if (!(dir_bh = affs_bread(inode->i_dev,inode->i_ino,
AFFS_I2BSIZE(inode))))
goto readdir_done;
dir_bh = affs_bread(sb, inode->i_ino);
if (!dir_bh)
goto readdir_out;
while (1) {
while (hash_pos < AFFS_I2HSIZE(inode) &&
!((struct dir_front *)dir_bh->b_data)->hashtable[hash_pos])
hash_pos++;
if (hash_pos >= AFFS_I2HSIZE(inode))
break;
i = be32_to_cpu(((struct dir_front *)dir_bh->b_data)->hashtable[hash_pos]);
j = chain_pos;
/* If the directory hasn't changed since the last call to readdir(),
* we can jump directly to where we left off.
*/
ino = (u32)filp->private_data;
if (ino && filp->f_version == inode->i_version) {
pr_debug("AFFS: readdir() left off=%d\n", ino);
goto inside;
}
/* If the directory hasn't changed since the last call to readdir(),
* we can jump directly to where we left off.
*/
if (filp->private_data && filp->f_version == inode->i_version) {
i = (s32)(unsigned long)filp->private_data;
j = 0;
pr_debug("AFFS: readdir() left off=%d\n",i);
ino = be32_to_cpu(AFFS_HEAD(dir_bh)->table[hash_pos]);
for (i = 0; ino && i < chain_pos; i++) {
fh_bh = affs_bread(sb, ino);
if (!fh_bh) {
affs_error(sb, "readdir","Cannot read block %d", i);
goto readdir_out;
}
filp->f_version = inode->i_version;
pr_debug("AFFS: hash_pos=%d chain_pos=%d\n",hash_pos,chain_pos);
while (i) {
if (!(fh_bh = affs_bread(inode->i_dev,i,AFFS_I2BSIZE(inode)))) {
affs_error(inode->i_sb,"readdir","Cannot read block %d",i);
ino = be32_to_cpu(AFFS_TAIL(sb, fh_bh)->hash_chain);
affs_brelse(fh_bh);
fh_bh = NULL;
}
if (ino)
goto inside;
hash_pos++;
for (; hash_pos < AFFS_SB->s_hashsize; hash_pos++) {
ino = be32_to_cpu(AFFS_HEAD(dir_bh)->table[hash_pos]);
if (!ino)
continue;
f_pos = (hash_pos << 16) + 2;
inside:
do {
fh_bh = affs_bread(sb, ino);
if (!fh_bh) {
affs_error(sb, "readdir","Cannot read block %d", ino);
goto readdir_done;
}
ino = i;
i = be32_to_cpu(FILE_END(fh_bh->b_data,inode)->hash_chain);
if (j == 0)
break;
affs_brelse(fh_bh);
fh_bh = NULL;
j--;
}
if (fh_bh) {
namelen = affs_get_file_name(AFFS_I2BSIZE(inode),fh_bh->b_data,&name);
pr_debug("AFFS: readdir(): filldir(\"%.*s\",ino=%lu), i=%d\n",
namelen,name,ino,i);
filp->private_data = (void *)ino;
if (filldir(dirent,name,namelen,filp->f_pos,ino,DT_UNKNOWN) < 0)
namelen = MIN(AFFS_TAIL(sb, fh_bh)->name[0], 30);
name = AFFS_TAIL(sb, fh_bh)->name + 1;
pr_debug("AFFS: readdir(): filldir(\"%.*s\", ino=%u), hash=%d, f_pos=%x\n",
namelen, name, ino, hash_pos, f_pos);
if (filldir(dirent, name, namelen, f_pos, ino, DT_UNKNOWN) < 0)
goto readdir_done;
filp->private_data = (void *)(unsigned long)i;
stored++;
f_pos++;
ino = be32_to_cpu(AFFS_TAIL(sb, fh_bh)->hash_chain);
affs_brelse(fh_bh);
fh_bh = NULL;
stored++;
}
if (i == 0) {
hash_pos++;
chain_pos = 0;
} else
chain_pos++;
filp->f_pos = ((hash_pos << 16) | chain_pos) + 2;
} while (ino);
}
readdir_done:
filp->f_pos = f_pos;
filp->f_version = inode->i_version;
filp->private_data = (void *)ino;
res = stored;
readdir_out:
affs_brelse(dir_bh);
affs_brelse(fh_bh);
pr_debug("AFFS: readdir()=%d\n",stored);
return stored;
up(&AFFS_INODE->i_hash_lock);
pr_debug("AFFS: readdir()=%d\n", stored);
return res;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -32,7 +32,7 @@ static int affs_symlink_readpage(struct file *file, struct page *page)
err = -EIO;
lock_kernel();
bh = affs_bread(inode->i_dev,inode->i_ino,AFFS_I2BSIZE(inode));
bh = affs_bread(inode->i_sb, inode->i_ino);
unlock_kernel();
if (!bh)
goto fail;
......
......@@ -98,8 +98,6 @@ static int is_tree_busy(struct vfsmount *topmnt, struct dentry *top)
top, count));
this_parent = top;
count--; /* top is passed in after being dgot */
if (is_autofs4_dentry(top)) {
count--;
DPRINTK(("is_tree_busy: autofs; count=%d\n", count));
......@@ -168,8 +166,6 @@ static struct dentry *autofs4_expire(struct super_block *sb,
unsigned long timeout;
struct dentry *root = sb->s_root;
struct list_head *tmp;
struct dentry *d;
struct vfsmount *p;
if (!sbi->exp_timeout || !root)
return NULL;
......@@ -208,23 +204,17 @@ static struct dentry *autofs4_expire(struct super_block *sb,
attempts if expire fails the first time */
ino->last_used = now;
}
p = mntget(mnt);
d = dget_locked(dentry);
if (!is_tree_busy(p, d)) {
if (!is_tree_busy(mnt, dentry)) {
DPRINTK(("autofs_expire: returning %p %.*s\n",
dentry, (int)dentry->d_name.len, dentry->d_name.name));
/* Start from here next time */
list_del(&root->d_subdirs);
list_add(&root->d_subdirs, &dentry->d_child);
dget(dentry);
spin_unlock(&dcache_lock);
dput(d);
mntput(p);
return dentry;
}
dput(d);
mntput(p);
}
spin_unlock(&dcache_lock);
......@@ -251,6 +241,7 @@ int autofs4_expire_run(struct super_block *sb,
pkt.len = dentry->d_name.len;
memcpy(pkt.name, dentry->d_name.name, pkt.len);
pkt.name[pkt.len] = '\0';
dput(dentry);
if ( copy_to_user(pkt_p, &pkt, sizeof(struct autofs_packet_expire)) )
return -EFAULT;
......@@ -278,6 +269,7 @@ int autofs4_expire_multi(struct super_block *sb, struct vfsmount *mnt,
de_info->flags |= AUTOFS_INF_EXPIRING;
ret = autofs4_wait(sbi, &dentry->d_name, NFY_EXPIRE);
de_info->flags &= ~AUTOFS_INF_EXPIRING;
dput(dentry);
}
return ret;
......
......@@ -113,7 +113,7 @@ static inline int do_getname(const char *filename, char *page)
if ((unsigned long) filename >= TASK_SIZE) {
if (!segment_eq(get_fs(), KERNEL_DS))
return -EFAULT;
} else if (TASK_SIZE - (unsigned long) filename < PAGE_SIZE)
} else if (TASK_SIZE - (unsigned long) filename < PATH_MAX + 1)
len = TASK_SIZE - (unsigned long) filename;
retval = strncpy_from_user((char *)page, filename, len);
......
......@@ -1814,16 +1814,14 @@ static void commit_flush_async(struct super_block *p_s_sb, int jindex) {
** then run the per filesystem commit task queue when we wakeup.
*/
static int reiserfs_journal_commit_thread(void *nullp) {
exit_files(current);
exit_mm(current);
daemonize() ;
spin_lock_irq(&current->sigmask_lock);
sigfillset(&current->blocked);
recalc_sigpending(current);
spin_unlock_irq(&current->sigmask_lock);
current->session = 1;
current->pgrp = 1;
sprintf(current->comm, "kreiserfsd") ;
lock_kernel() ;
while(1) {
......
......@@ -225,5 +225,3 @@ extern inline void up(struct semaphore *sem)
#endif
#endif
#endif
This diff is collapsed.
/* rwsem-xadd.h: R/W semaphores implemented using XADD/CMPXCHG
*
* Written by David Howells (dhowells@redhat.com), 2001.
* Derived from asm-i386/semaphore.h
*/
#ifndef _I386_RWSEM_XADD_H
#define _I386_RWSEM_XADD_H
#ifndef _LINUX_RWSEM_H
#error please dont include asm/rwsem-xadd.h directly, use linux/rwsem.h instead
#endif
#ifdef __KERNEL__
/*
* the semaphore definition
*/
struct rw_semaphore {
signed long count;
#define RWSEM_UNLOCKED_VALUE 0x00000000
#define RWSEM_ACTIVE_BIAS 0x00000001
#define RWSEM_ACTIVE_MASK 0x0000ffff
#define RWSEM_WAITING_BIAS (-0x00010000)
#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS
#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
wait_queue_head_t wait;
#define RWSEM_WAITING_FOR_READ WQ_FLAG_CONTEXT_0 /* bits to use in wait_queue_t.flags */
#define RWSEM_WAITING_FOR_WRITE WQ_FLAG_CONTEXT_1
#if RWSEM_DEBUG
int debug;
#endif
#if RWSEM_DEBUG_MAGIC
long __magic;
atomic_t readers;
atomic_t writers;
#endif
};
/*
* initialisation
*/
#if RWSEM_DEBUG
#define __RWSEM_DEBUG_INIT , 0
#else
#define __RWSEM_DEBUG_INIT /* */
#endif
#if RWSEM_DEBUG_MAGIC
#define __RWSEM_DEBUG_MINIT(name) , (int)&(name).__magic, ATOMIC_INIT(0), ATOMIC_INIT(0)
#else
#define __RWSEM_DEBUG_MINIT(name) /* */
#endif
#define __RWSEM_INITIALIZER(name) \
{ RWSEM_UNLOCKED_VALUE, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
__RWSEM_DEBUG_INIT __RWSEM_DEBUG_MINIT(name) }
#define DECLARE_RWSEM(name) \
struct rw_semaphore name = __RWSEM_INITIALIZER(name)
static inline void init_rwsem(struct rw_semaphore *sem)
{
sem->count = RWSEM_UNLOCKED_VALUE;
init_waitqueue_head(&sem->wait);
#if RWSEM_DEBUG
sem->debug = 0;
#endif
#if RWSEM_DEBUG_MAGIC
sem->__magic = (long)&sem->__magic;
atomic_set(&sem->readers, 0);
atomic_set(&sem->writers, 0);
#endif
}
/*
* lock for reading
*/
static inline void __down_read(struct rw_semaphore *sem)
{
__asm__ __volatile__(
"# beginning down_read\n\t"
LOCK_PREFIX " incl (%%eax)\n\t" /* adds 0x00000001, returns the old value */
" js 2f\n\t" /* jump if we weren't granted the lock */
"1:\n\t"
".section .text.lock,\"ax\"\n"
"2:\n\t"
" call __rwsem_down_read_failed\n\t"
" jmp 1b\n"
".previous"
"# ending down_read\n\t"
: "=m"(sem->count)
: "a"(sem), "m"(sem->count)
: "memory");
}
/*
* lock for writing
*/
static inline void __down_write(struct rw_semaphore *sem)
{
int tmp;
tmp = RWSEM_ACTIVE_WRITE_BIAS;
__asm__ __volatile__(
"# beginning down_write\n\t"
LOCK_PREFIX " xadd %0,(%%eax)\n\t" /* subtract 0x00010001, returns the old value */
" testl %0,%0\n\t" /* was the count 0 before? */
" jnz 2f\n\t" /* jump if we weren't granted the lock */
"1:\n\t"
".section .text.lock,\"ax\"\n"
"2:\n\t"
" call __rwsem_down_write_failed\n\t"
" jmp 1b\n"
".previous\n"
"# ending down_write"
: "+r"(tmp), "=m"(sem->count)
: "a"(sem), "m"(sem->count)
: "memory");
}
/*
* unlock after reading
*/
static inline void __up_read(struct rw_semaphore *sem)
{
int tmp;
tmp = -RWSEM_ACTIVE_READ_BIAS;
__asm__ __volatile__(
"# beginning __up_read\n\t"
LOCK_PREFIX " xadd %0,(%%eax)\n\t" /* subtracts 1, returns the old value */
" js 2f\n\t" /* jump if the lock is being waited upon */
"1:\n\t"
".section .text.lock,\"ax\"\n"
"2:\n\t"
" decl %0\n\t" /* xadd gave us the old count */
" testl %3,%0\n\t" /* do nothing if still outstanding active readers */
" jnz 1b\n\t"
" call __rwsem_wake\n\t"
" jmp 1b\n"
".previous\n"
"# ending __up_read\n"
: "+r"(tmp), "=m"(sem->count)
: "a"(sem), "i"(RWSEM_ACTIVE_MASK), "m"(sem->count)
: "memory");
}
/*
* unlock after writing
*/
static inline void __up_write(struct rw_semaphore *sem)
{
__asm__ __volatile__(
"# beginning __up_write\n\t"
LOCK_PREFIX " addl %2,(%%eax)\n\t" /* adds 0x0000ffff */
" js 2f\n\t" /* jump if the lock is being waited upon */
"1:\n\t"
".section .text.lock,\"ax\"\n"
"2:\n\t"
" call __rwsem_wake\n\t"
" jmp 1b\n"
".previous\n"
"# ending __up_write\n"
: "=m"(sem->count)
: "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS), "m"(sem->count)
: "memory");
}
/*
* implement exchange and add functionality
*/
static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem)
{
int tmp = delta;
__asm__ __volatile__(
LOCK_PREFIX "xadd %0,(%1)"
: "+r"(tmp)
: "r"(sem)
: "memory");
return tmp+delta;
}
/*
* implement compare and exchange functionality on the rw-semaphore count LSW
*/
static inline __u16 rwsem_cmpxchgw(struct rw_semaphore *sem, __u16 old, __u16 new)
{
return cmpxchg((__u16*)&sem->count,0,RWSEM_ACTIVE_BIAS);
}
#endif /* __KERNEL__ */
#endif /* _I386_RWSEM_XADD_H */
This diff is collapsed.
......@@ -13,6 +13,8 @@
#ifdef __KERNEL__
struct rwsem_waiter;
struct rw_semaphore {
signed int count;
#define RWSEM_UNLOCKED_VALUE 0x00000000
......@@ -21,13 +23,13 @@ struct rw_semaphore {
#define RWSEM_WAITING_BIAS 0xffff0000
#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS
#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
wait_queue_head_t wait;
#define RWSEM_WAITING_FOR_READ WQ_FLAG_CONTEXT_0 /* bits to use in wait_queue_t.flags */
#define RWSEM_WAITING_FOR_WRITE WQ_FLAG_CONTEXT_1
spinlock_t wait_lock;
struct rwsem_waiter *wait_front;
struct rwsem_waiter **wait_back;
};
#define __RWSEM_INITIALIZER(name) \
{ RWSEM_UNLOCKED_VALUE, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) }
{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, NULL, &(name).wait_front }
#define DECLARE_RWSEM(name) \
struct rw_semaphore name = __RWSEM_INITIALIZER(name)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -135,6 +135,7 @@ static inline unsigned int sk_filter_len(struct sk_filter *fp)
#ifdef __KERNEL__
extern int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen);
extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
extern int sk_chk_filter(struct sock_filter *filter, int flen);
#endif /* __KERNEL__ */
#endif /* __LINUX_FILTER_H__ */
/* $Id: if_ppp.h,v 1.19 1999/03/31 06:07:57 paulus Exp $ */
/* $Id: if_ppp.h,v 1.21 2000/03/27 06:03:36 paulus Exp $ */
/*
* if_ppp.h - Point-to-Point Protocol definitions.
......@@ -21,7 +21,7 @@
*/
/*
* ==FILEVERSION 20000324==
* ==FILEVERSION 20000724==
*
* NOTE TO MAINTAINERS:
* If you modify this file at all, please set the above date.
......@@ -130,6 +130,8 @@ struct ifpppcstatsreq {
#define PPPIOCSCOMPRESS _IOW('t', 77, struct ppp_option_data)
#define PPPIOCGNPMODE _IOWR('t', 76, struct npioctl) /* get NP mode */
#define PPPIOCSNPMODE _IOW('t', 75, struct npioctl) /* set NP mode */
#define PPPIOCSPASS _IOW('t', 71, struct sock_fprog) /* set pass filter */
#define PPPIOCSACTIVE _IOW('t', 70, struct sock_fprog) /* set active filt */
#define PPPIOCGDEBUG _IOR('t', 65, int) /* Read debug level */
#define PPPIOCSDEBUG _IOW('t', 64, int) /* Set debug level */
#define PPPIOCGIDLE _IOR('t', 63, struct ppp_idle) /* get idle time */
......
This diff is collapsed.
......@@ -3,7 +3,9 @@
#ifndef _LINUX_ISDN_PPP_H
#define _LINUX_ISDN_PPP_H
#ifdef __KERNEL__
#include <linux/config.h>
#endif
#define CALLTYPE_INCOMING 0x1
#define CALLTYPE_OUTGOING 0x2
......
......@@ -26,7 +26,9 @@
#ifndef isdnif_h
#define isdnif_h
#ifdef __KERNEL__
#include <linux/config.h>
#endif
/*
* Values for general protocol-selection
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment