Commit 33fad918 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.99pre3-3

parent 6d6aae19
......@@ -891,6 +891,10 @@ S: Fichtenweg 3/511
S: 72076 Tbingen
S: Germany
N: Justin Guyett
E: jguyett@andrew.cmu.edu
D: via-rhine net driver hacking
N: Danny ter Haar
E: dth@cistron.nl
D: /proc/procinfo, reboot on panic , kernel pre-patch tester ;)
......@@ -2609,6 +2613,10 @@ S: Eichenweg 16
S: 73650 Winterbach
S: Germany
N: Urban Widmark
E: urban@svenskatest.se
D: via-rhine, misc net driver hacking
N: Marco van Wieringen
E: mvw@planets.elm.net
D: Author of process accounting and diskquota
......
......@@ -26,8 +26,9 @@ kernel-api.sgml: kernel-api.tmpl
$(TOPDIR)/arch/i386/kernel/mca.c \
$(TOPDIR)/arch/i386/kernel/mtrr.c \
$(TOPDIR)/drivers/char/misc.c \
$(TOPDIR)/drivers/char/serial.c \
$(TOPDIR)/drivers/char/videodev.c \
$(TOPDIR)/drivers/net/net_init.c \
$(TOPDIR)/drivers/char/serial.c \
$(TOPDIR)/drivers/sound/sound_core.c \
$(TOPDIR)/drivers/sound/sound_firmware.c \
$(TOPDIR)/drivers/net/wan/syncppp.c \
......
......@@ -49,7 +49,7 @@
</chapter>
<chapter id="miscdev">
<title>Miscellaneous Device</title>
<title>Miscellaneous Devices</title>
!Edrivers/char/misc.c
</chapter>
......@@ -58,6 +58,11 @@
!Edrivers/char/videodev.c
</chapter>
<chapter id="netdev">
<title>Network devices</title>
!Idrivers/net/net_init.c
</chapter>
<chapter id="snddev">
<title>Sound Devices</title>
!Edrivers/sound/sound_core.c
......
This diff is collapsed.
......@@ -125,7 +125,7 @@ them. The MII transceiver status is polled using an kernel timer.
Source tree tour
----------------
================
The following is a list of files comprising the Tulip ethernet driver in
drivers/net/tulip subdirectory.
......@@ -140,5 +140,15 @@ tulip_core.c - Driver core (a.k.a. where "everything else" goes)
Version history
===============
0.9.4.1:
* Finish PCI DMA conversion (davem)
* Do not netif_start_queue() at end of tulip_tx_timeout() (kuznet)
* PCI DMA fix (kuznet)
* eeprom.c code cleanup
* Remove Xircom Tulip crud
[EOF]
......@@ -398,6 +398,7 @@ mrproper: clean archmrproper
rm -f .hdepend scripts/mkdep scripts/split-include scripts/docproc
rm -f $(TOPDIR)/include/linux/modversions.h
rm -rf $(TOPDIR)/include/linux/modules
rm -f Documentation/DocBook/*.sgml
distclean: mrproper
rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
......
......@@ -145,7 +145,7 @@ static void gzip_release(void **ptr)
free_mem_ptr = (long) *ptr;
}
static void scroll()
static void scroll(void)
{
int i;
......@@ -197,6 +197,7 @@ void* memset(void* s, int c, size_t n)
char *ss = (char*)s;
for (i=0;i<n;i++) ss[i] = c;
return s;
}
void* memcpy(void* __dest, __const void* __src,
......@@ -206,13 +207,14 @@ void* memcpy(void* __dest, __const void* __src,
char *d = (char *)__dest, *s = (char *)__src;
for (i=0;i<__n;i++) d[i] = s[i];
return __dest;
}
/* ===========================================================================
* Fill the input buffer. This is called only when the buffer is empty
* and at least one byte is really needed.
*/
static int fill_inbuf()
static int fill_inbuf(void)
{
if (insize != 0) {
error("ran out of input data\n");
......@@ -228,7 +230,7 @@ static int fill_inbuf()
* Write the output window window[0..outcnt-1] and update crc and bytes_out.
* (Used for the decompressed data only.)
*/
static void flush_window_low()
static void flush_window_low(void)
{
ulg c = crc; /* temporary variable */
unsigned n;
......@@ -246,7 +248,7 @@ static void flush_window_low()
outcnt = 0;
}
static void flush_window_high()
static void flush_window_high(void)
{
ulg c = crc; /* temporary variable */
unsigned n;
......@@ -262,7 +264,7 @@ static void flush_window_high()
outcnt = 0;
}
static void flush_window()
static void flush_window(void)
{
if (high_loaded) flush_window_high();
else flush_window_low();
......@@ -286,7 +288,7 @@ struct {
short b;
} stack_start = { & user_stack [STACK_SIZE] , __KERNEL_DS };
void setup_normal_output_buffer()
void setup_normal_output_buffer(void)
{
#ifdef STANDARD_MEMORY_BIOS_CALL
if (EXT_MEM_K < 1024) error("Less than 2MB of memory.\n");
......
This diff is collapsed.
......@@ -670,10 +670,10 @@ static int __init rtc_init(void)
if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
BCD_TO_BIN(year); /* This should never happen... */
if (year > 10 && year < 44) {
if (year >= 20 && year < 48) {
epoch = 1980;
guess = "ARC console";
} else if (year < 96) {
} else if (year >= 48 && year < 100) {
epoch = 1952;
guess = "Digital UNIX";
}
......
......@@ -1838,7 +1838,7 @@ static void rtl8139_set_rx_mode (struct net_device *dev)
void *ioaddr = tp->mmio_addr;
u32 mc_filter[2]; /* Multicast hash filter */
int i, rx_mode;
unsigned long flags;
unsigned long flags=0;
DPRINTK ("ENTER\n");
......
......@@ -124,9 +124,7 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
bool ' EISA, VLB, PCI and on board controllers' CONFIG_NET_PCI
if [ "$CONFIG_NET_PCI" = "y" ]; then
tristate ' AMD PCnet32 (VLB and PCI) support' CONFIG_PCNET32
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate ' Adaptec Starfire support (EXPERIMENTAL)' CONFIG_ADAPTEC_STARFIRE
fi
dep_tristate ' Adaptec Starfire support (EXPERIMENTAL)' CONFIG_ADAPTEC_STARFIRE $CONFIG_PCI $CONFIG_EXPERIMENTAL
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate ' Ansel Communications EISA 3200 support (EXPERIMENTAL)' CONFIG_AC3200
fi
......@@ -134,12 +132,12 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
tristate ' Apricot Xen-II on board Ethernet' CONFIG_APRICOT
tristate ' CS89x0 support' CONFIG_CS89x0
tristate ' Generic DECchip & DIGITAL EtherWORKS PCI/EISA' CONFIG_DE4X5
tristate ' DECchip Tulip (dc21x4x) PCI support' CONFIG_TULIP
dep_tristate ' DECchip Tulip (dc21x4x) PCI support' CONFIG_TULIP $CONFIG_PCI
tristate ' Digi Intl. RightSwitch SE-X support' CONFIG_DGRS
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate ' DM9102 PCI Fast Ethernet Adapter support (EXPERIMENTAL)' CONFIG_DM9102
fi
tristate ' EtherExpressPro/100 support' CONFIG_EEPRO100
dep_tristate ' EtherExpressPro/100 support' CONFIG_EEPRO100 $CONFIG_PCI
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
if [ "$CONFIG_EEPRO100" = "y" -o "$CONFIG_EEPRO100" = "m" ]; then
bool ' Enable Power Management (EXPERIMENTAL)' CONFIG_EEPRO100_PM
......@@ -147,7 +145,7 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
tristate ' Mylex EISA LNE390A/B support (EXPERIMENTAL)' CONFIG_LNE390
tristate ' Novell/Eagle/Microdyne NE3210 EISA support (EXPERIMENTAL)' CONFIG_NE3210
fi
tristate ' PCI NE2000 support' CONFIG_NE2K_PCI
dep_tristate ' PCI NE2000 support' CONFIG_NE2K_PCI $CONFIG_PCI
# tristate ' Sundance Alta support' CONFIG_ALTA
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate ' RealTek 8129 (not 8019/8029!) support (EXPERIMENTAL)' CONFIG_RTL8129
......
......@@ -1099,6 +1099,12 @@ static int __devinit epic100_init_one (struct pci_dev *pdev,
struct net_device *dev;
long ioaddr;
static int card_idx = -1;
static int printed_version = 0;
if (!printed_version) {
printk (KERN_INFO "%s", version);
printed_version = 1;
}
chip_idx = ent->driver_data;
......@@ -1280,13 +1286,7 @@ static struct pci_driver epic100_driver = {
static int __init epic100_init (void)
{
printk (KERN_INFO "%s", version);
if (pci_register_driver (&epic100_driver) > 0)
return 0;
pci_unregister_driver (&epic100_driver);
return -ENODEV;
return pci_module_init (&epic100_driver);
}
......
/* netdrv_init.c: Initialization for network devices. */
/* net_init.c: Initialization for network devices. */
/*
Written 1993,1994,1995 by Donald Becker.
......@@ -27,6 +27,8 @@
08/11/99 - Alan Cox: Got fed up of the mess in this file and cleaned it
up. We now share common code and have regularised name
allocation setups. Abolished the 16 card limits.
03/19/2000 - jgarzik and Urban Widmark: init_etherdev 32-byte align
*/
#include <linux/config.h>
......@@ -139,14 +141,22 @@ static struct net_device *init_netdev(struct net_device *dev, int sizeof_priv, c
return dev;
}
/* Fill in the fields of the device structure with ethernet-generic values.
If no device structure is passed, a new one is constructed, complete with
a SIZEOF_PRIVATE private data area.
If an empty string area is passed as dev->name, or a new structure is made,
a new name string is constructed. The passed string area should be 8 bytes
long.
/**
* init_etherdev - Register ethernet device
* @dev: An ethernet device structure to be filled in, or %NULL if a new
* struct should be allocated.
* @sizeof_priv: Size of additional driver-private structure to be allocated
* for this ethernet device
*
* Fill in the fields of the device structure with ethernet-generic values.
*
* If no device structure is passed, a new one is constructed, complete with
* a private data area of size @sizeof_priv. A 32-byte (not bit)
* alignment is enforced for this private data area.
*
* If an empty string area is passed as dev->name, or a new structure is made,
* a new name string is constructed. The passed string area should be 8 bytes
* long.
*/
struct net_device *init_etherdev(struct net_device *dev, int sizeof_priv)
......
This diff is collapsed.
......@@ -18,6 +18,7 @@ if [ "$CONFIG_NET_PCMCIA" = "y" ]; then
if [ "$CONFIG_CARDBUS" = "y" ]; then
dep_tristate ' 3Com 3c575 CardBus support' CONFIG_PCMCIA_3C575 m
dep_tristate ' Xircom Tulip-like CardBus support' CONFIG_PCMCIA_XIRTULIP m
fi
bool 'Pcmcia Wireless LAN' CONFIG_NET_PCMCIA_RADIO
......
......@@ -19,8 +19,6 @@ obj- :=
# Things that need to export symbols
export-objs := ray_cs.o
CFLAGS_3c575_cb.o = -DCARDBUS -DMODULE
# 16-bit client drivers
obj-$(CONFIG_PCMCIA_3C589) += 3c589_cs.o
obj-$(CONFIG_PCMCIA_3C574) += 3c574_cs.o
......@@ -39,6 +37,7 @@ obj-$(CONFIG_AIRONET4500_CS) += aironet4500_cs.o
# Cardbus client drivers
obj-$(CONFIG_PCMCIA_3C575) += 3c575_cb.o
obj-$(CONFIG_PCMCIA_XIRTULIP) += xircom_tulip_cb.o
O_OBJS := $(filter-out $(export-objs), $(obj-y))
OX_OBJS := $(filter $(export-objs), $(obj-y))
......
This diff is collapsed.
This diff is collapsed.
......@@ -30,31 +30,31 @@
/* Known cards that have old-style EEPROMs. */
static struct eeprom_fixup eeprom_fixups[] __devinitdata = {
{"Asante", 0, 0, 0x94, {0x1e00, 0x0000, 0x0800, 0x0100, 0x018c,
0x0000, 0x0000, 0xe078, 0x0001, 0x0050, 0x0018 }},
0x0000, 0x0000, 0xe078, 0x0001, 0x0050, 0x0018 }},
{"SMC9332DST", 0, 0, 0xC0, { 0x1e00, 0x0000, 0x0800, 0x041f,
0x0000, 0x009E, /* 10baseT */
0x0004, 0x009E, /* 10baseT-FD */
0x0903, 0x006D, /* 100baseTx */
0x0905, 0x006D, /* 100baseTx-FD */ }},
0x0000, 0x009E, /* 10baseT */
0x0004, 0x009E, /* 10baseT-FD */
0x0903, 0x006D, /* 100baseTx */
0x0905, 0x006D, /* 100baseTx-FD */ }},
{"Cogent EM100", 0, 0, 0x92, { 0x1e00, 0x0000, 0x0800, 0x063f,
0x0107, 0x8021, /* 100baseFx */
0x0108, 0x8021, /* 100baseFx-FD */
0x0100, 0x009E, /* 10baseT */
0x0104, 0x009E, /* 10baseT-FD */
0x0103, 0x006D, /* 100baseTx */
0x0105, 0x006D, /* 100baseTx-FD */ }},
0x0107, 0x8021, /* 100baseFx */
0x0108, 0x8021, /* 100baseFx-FD */
0x0100, 0x009E, /* 10baseT */
0x0104, 0x009E, /* 10baseT-FD */
0x0103, 0x006D, /* 100baseTx */
0x0105, 0x006D, /* 100baseTx-FD */ }},
{"Maxtech NX-110", 0, 0, 0xE8, { 0x1e00, 0x0000, 0x0800, 0x0513,
0x1001, 0x009E, /* 10base2, CSR12 0x10*/
0x0000, 0x009E, /* 10baseT */
0x0004, 0x009E, /* 10baseT-FD */
0x0303, 0x006D, /* 100baseTx, CSR12 0x03 */
0x0305, 0x006D, /* 100baseTx-FD CSR12 0x03 */}},
0x1001, 0x009E, /* 10base2, CSR12 0x10*/
0x0000, 0x009E, /* 10baseT */
0x0004, 0x009E, /* 10baseT-FD */
0x0303, 0x006D, /* 100baseTx, CSR12 0x03 */
0x0305, 0x006D, /* 100baseTx-FD CSR12 0x03 */}},
{"Accton EN1207", 0, 0, 0xE8, { 0x1e00, 0x0000, 0x0800, 0x051F,
0x1B01, 0x0000, /* 10base2, CSR12 0x1B */
0x0B00, 0x009E, /* 10baseT, CSR12 0x0B */
0x0B04, 0x009E, /* 10baseT-FD,CSR12 0x0B */
0x1B03, 0x006D, /* 100baseTx, CSR12 0x1B */
0x1B05, 0x006D, /* 100baseTx-FD CSR12 0x1B */
0x1B01, 0x0000, /* 10base2, CSR12 0x1B */
0x0B00, 0x009E, /* 10baseT, CSR12 0x0B */
0x0B04, 0x009E, /* 10baseT-FD,CSR12 0x0B */
0x1B03, 0x006D, /* 100baseTx, CSR12 0x1B */
0x1B05, 0x006D, /* 100baseTx-FD CSR12 0x1B */
}},
{"NetWinder", 0x00, 0x10, 0x57,
/* Default media = MII
......
......@@ -211,9 +211,12 @@ void tulip_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
if (status < 0)
break; /* It still has not been Txed */
/* Check for Rx filter setup frames. */
if (tp->tx_buffers[entry].skb == NULL) {
pci_unmap_single(tp->pdev,
/* test because dummy frames not mapped */
if (tp->tx_buffers[entry].mapping)
pci_unmap_single(tp->pdev,
tp->tx_buffers[entry].mapping,
sizeof(tp->setup_frame),
PCI_DMA_TODEVICE);
......
......@@ -58,7 +58,6 @@ enum chips {
COMET,
COMPEX9881,
I21145,
X3201_3,
};
......@@ -334,7 +333,14 @@ extern u8 t21040_csr13[];
extern u16 t21041_csr13[];
extern u16 t21041_csr14[];
extern u16 t21041_csr15[];
void tulip_outl_CSR6 (struct tulip_private *tp, u32 newcsr6);
extern inline void tulip_outl_CSR6 (struct tulip_private *tp, u32 newcsr6)
{
long ioaddr = tp->base_addr;
outl (newcsr6, ioaddr + CSR6);
}
#endif /* __NET_TULIP_H__ */
......@@ -19,7 +19,7 @@
*/
static const char version[] = "Linux Tulip driver version 0.9.4 (Feb 28, 2000)\n";
static const char version[] = "Linux Tulip driver version 0.9.4.1 (Mar 18, 2000)\n";
#include <linux/module.h>
#include "tulip.h"
......@@ -92,9 +92,6 @@ static int csr0 = 0x00A00000 | 0x4800;
#define TX_TIMEOUT (4*HZ)
/* Kernel compatibility defines, some common to David Hind's PCMCIA package.
This is only in the support-all-kernels source code. */
MODULE_AUTHOR("The Linux Kernel Team");
MODULE_DESCRIPTION("Digital 21*4* Tulip ethernet driver");
MODULE_PARM(tulip_debug, "i");
......@@ -148,9 +145,6 @@ struct tulip_chip_table tulip_tbl[] = {
{ "Intel DS21145 Tulip", 128, 0x0801fbff,
HAS_MII | HAS_MEDIA_TABLE | ALWAYS_CHECK_MII | HAS_NWAY143,
t21142_timer },
{ "Xircom tulip work-alike", 128, 0x0801fbff,
HAS_MII | HAS_MEDIA_TABLE | ALWAYS_CHECK_MII | HAS_ACPI | HAS_NWAY143,
t21142_timer },
{0},
};
......@@ -169,10 +163,9 @@ static struct pci_device_id tulip_pci_tbl[] __devinitdata = {
{ 0x1317, 0x0981, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
{ 0x11F6, 0x9881, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMPEX9881 },
{ 0x8086, 0x0039, PCI_ANY_ID, PCI_ANY_ID, 0, 0, I21145 },
{ 0x115d, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, X3201_3 },
{0},
};
MODULE_DEVICE_TABLE(pci,tulip_pci_tbl);
MODULE_DEVICE_TABLE(pci, tulip_pci_tbl);
/* A full-duplex map for media types. */
......@@ -198,54 +191,6 @@ static int private_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static void set_rx_mode(struct net_device *dev);
/* The Xircom cards are picky about when certain bits in CSR6 can be
manipulated. Keith Owens <kaos@ocs.com.au>. */
void tulip_outl_CSR6 (struct tulip_private *tp, u32 newcsr6)
{
long ioaddr = tp->base_addr;
const int strict_bits = 0x0060e202;
int csr5, csr5_22_20, csr5_19_17, currcsr6, attempts = 200;
/* common path */
if (tp->chip_id != X3201_3) {
outl (newcsr6, ioaddr + CSR6);
return;
}
newcsr6 &= 0x726cfeca; /* mask out the reserved CSR6 bits that always */
/* read 0 on the Xircom cards */
newcsr6 |= 0x320c0000; /* or in the reserved bits that always read 1 */
currcsr6 = inl (ioaddr + CSR6);
if (((newcsr6 & strict_bits) == (currcsr6 & strict_bits)) ||
((currcsr6 & ~0x2002) == 0))
goto out_write;
/* make sure the transmitter and receiver are stopped first */
currcsr6 &= ~0x2002;
while (1) {
csr5 = inl (ioaddr + CSR5);
if (csr5 == 0xffffffff)
break; /* cannot read csr5, card removed? */
csr5_22_20 = csr5 & 0x700000;
csr5_19_17 = csr5 & 0x0e0000;
if ((csr5_22_20 == 0 || csr5_22_20 == 0x600000) &&
(csr5_19_17 == 0 || csr5_19_17 == 0x80000 || csr5_19_17 == 0xc0000))
break; /* both are stopped or suspended */
if (!--attempts) {
printk (KERN_INFO "tulip.c: tulip_outl_CSR6 too many attempts,"
"csr5=0x%08x\n", csr5);
goto out_write;
}
outl (currcsr6, ioaddr + CSR6);
udelay (1);
}
out_write:
/* now it is safe to change csr6 */
outl (newcsr6, ioaddr + CSR6);
}
static void tulip_up(struct net_device *dev)
{
......@@ -561,7 +506,6 @@ static void tulip_tx_timeout(struct net_device *dev)
out:
dev->trans_start = jiffies;
netif_start_queue (dev);
spin_unlock_irqrestore (&tp->lock, flags);
}
......
This diff is collapsed.
......@@ -55,9 +55,11 @@ if [ "$CONFIG_WAN" = "y" ]; then
if [ "$CONFIG_VENDOR_SANGOMA" != "n" ]; then
int ' Maximum number of cards' CONFIG_WANPIPE_CARDS 1
bool ' WANPIPE Cisco HDLC support' CONFIG_WANPIPE_CHDLC
bool ' WANPIPE Frame Relay support' CONFIG_WANPIPE_FR
if [ "$CONFIG_OBSOLETE" = "y" ]; then
bool ' WANPIPE Frame Relay support' CONFIG_WANPIPE_FR
bool ' WANPIPE X.25 support' CONFIG_WANPIPE_X25
fi
bool ' WANPIPE PPP support' CONFIG_WANPIPE_PPP
bool ' WANPIPE X.25 support' CONFIG_WANPIPE_X25
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
dep_tristate ' Cyclom 2X(tm) cards (EXPERIMENTAL)' CONFIG_CYCLADES_SYNC $CONFIG_WAN_ROUTER_DRIVERS
......
......@@ -25,7 +25,7 @@
* v0.3 Feb 22 2000 Ollie Lho
* bug fix for record mask setting
* v0.2 Feb 10 2000 Ollie Lho
* add ac97_read_proc for /proc/driver/vnedor/ac97
* add ac97_read_proc for /proc/driver/{vendor}/ac97
* v0.1 Jan 14 2000 Ollie Lho <ollie@sis.com.tw>
* Isolated from trident.c to support multiple ac97 codec
*/
......
......@@ -151,6 +151,7 @@ int sb_dsp_detect (struct address_info *hw_config, int pci, int pciio);
int sb_dsp_init (struct address_info *hw_config);
void sb_dsp_unload(struct address_info *hw_config, int sbmpu);
int sb_mixer_init(sb_devc *devc);
void sb_mixer_unload(sb_devc *devc);
void sb_mixer_set_stereo (sb_devc *devc, int mode);
void smw_mixer_init(sb_devc *devc);
void sb_dsp_midi_init (sb_devc *devc);
......
......@@ -908,13 +908,10 @@ void sb_dsp_unload(struct address_info *hw_config, int sbmpu)
}
if (!(devc->caps & SB_NO_AUDIO && devc->caps & SB_NO_MIDI))
{
extern int sbmixnum;
if (devc->irq > 0)
free_irq(devc->irq, devc);
sound_unload_mixerdev(devc->my_mixerdev);
sbmixnum--;
sb_mixer_unload(devc);
/* We don't have to do this bit any more the UART401 is its own
master -- Krzysztof Halasa */
/* But we have to do it, if UART401 is not detected */
......
......@@ -740,3 +740,9 @@ int sb_mixer_init(sb_devc * devc)
sb_mixer_reset(devc);
return 1;
}
void sb_mixer_unload(sb_devc *devc)
{
sound_unload_mixerdev(devc->my_mixerdev);
sbmixnum--;
}
......@@ -5,7 +5,7 @@
all: keyspan_pda_fw.h
%.asm: %.s
%.asm: %.S
gcc -x assembler-with-cpp -P -E -o $@ $<
%.hex: %.asm
......
This diff is collapsed.
......@@ -521,7 +521,7 @@ static int __devinit rivafb_init_one (struct pci_dev *pd,
rinfo->base1_region_size = pci_resource_len (pd, 1);
assert (rinfo->base0_region_size >= 0x00800000); /* from GGI */
assert (rinfo->base0_region_size >= 0x01000000); /* from GGI */
assert (rinfo->base1_region_size >= 0x01000000); /* from GGI */
rinfo->ctrl_base_phys = rinfo->pd->resource[0].start;
rinfo->fb_base_phys = rinfo->pd->resource[1].start;
......
......@@ -336,6 +336,44 @@ int is_root_busy(struct dentry *root)
return (count > 1); /* remaining users? */
}
/*
* Search for at least 1 mount point in the dentry's subdirs.
* We descend to the next level whenever the d_subdirs
* list is non-empty and continue searching.
*/
int have_submounts(struct dentry *parent)
{
struct dentry *this_parent = parent;
struct list_head *next;
if (parent->d_mounts != parent)
return 1;
repeat:
next = this_parent->d_subdirs.next;
resume:
while (next != &this_parent->d_subdirs) {
struct list_head *tmp = next;
struct dentry *dentry = list_entry(tmp, struct dentry, d_child);
next = tmp->next;
/* Have we found a mount point ? */
if (dentry->d_mounts != dentry)
return 1;
if (!list_empty(&dentry->d_subdirs)) {
this_parent = dentry;
goto repeat;
}
}
/*
* All done at this level ... ascend and resume the search.
*/
if (this_parent != parent) {
next = this_parent->d_child.next;
this_parent = this_parent->d_parent;
goto resume;
}
return 0; /* No mount points found in tree */
}
/*
* Search the dentry child list for the specified parent,
* and move any unused dentries to the end of the unused
......
......@@ -300,21 +300,20 @@ void ext2_free_blocks (const struct inode * inode, unsigned long block,
if (!gdp)
goto error_return;
if (test_opt (sb, CHECK_STRICT) &&
(in_range (le32_to_cpu(gdp->bg_block_bitmap), block, count) ||
in_range (le32_to_cpu(gdp->bg_inode_bitmap), block, count) ||
in_range (block, le32_to_cpu(gdp->bg_inode_table),
sb->u.ext2_sb.s_itb_per_group) ||
in_range (block + count - 1, le32_to_cpu(gdp->bg_inode_table),
sb->u.ext2_sb.s_itb_per_group)))
ext2_panic (sb, "ext2_free_blocks",
if (in_range (le32_to_cpu(gdp->bg_block_bitmap), block, count) ||
in_range (le32_to_cpu(gdp->bg_inode_bitmap), block, count) ||
in_range (block, le32_to_cpu(gdp->bg_inode_table),
sb->u.ext2_sb.s_itb_per_group) ||
in_range (block + count - 1, le32_to_cpu(gdp->bg_inode_table),
sb->u.ext2_sb.s_itb_per_group))
ext2_error (sb, "ext2_free_blocks",
"Freeing blocks in system zones - "
"Block = %lu, count = %lu",
block, count);
for (i = 0; i < count; i++) {
if (!ext2_clear_bit (bit + i, bh->b_data))
ext2_warning (sb, "ext2_free_blocks",
ext2_error (sb, "ext2_free_blocks",
"bit already cleared for block %lu",
block);
else {
......@@ -527,11 +526,11 @@ int ext2_new_block (const struct inode * inode, unsigned long goal,
tmp = j + i * EXT2_BLOCKS_PER_GROUP(sb) + le32_to_cpu(es->s_first_data_block);
if (test_opt (sb, CHECK_STRICT) &&
(tmp == le32_to_cpu(gdp->bg_block_bitmap) ||
tmp == le32_to_cpu(gdp->bg_inode_bitmap) ||
in_range (tmp, le32_to_cpu(gdp->bg_inode_table), sb->u.ext2_sb.s_itb_per_group)))
ext2_panic (sb, "ext2_new_block",
if (tmp == le32_to_cpu(gdp->bg_block_bitmap) ||
tmp == le32_to_cpu(gdp->bg_inode_bitmap) ||
in_range (tmp, le32_to_cpu(gdp->bg_inode_table),
sb->u.ext2_sb.s_itb_per_group))
ext2_error (sb, "ext2_new_block",
"Allocating block in system zone - "
"block = %u", tmp);
......@@ -679,6 +678,7 @@ int ext2_group_sparse(int group)
test_root(group, 7));
}
#ifdef CONFIG_EXT2_CHECK
/* Called at mount-time, super-block is locked */
void ext2_check_blocks_bitmap (struct super_block * sb)
{
......@@ -753,3 +753,4 @@ void ext2_check_blocks_bitmap (struct super_block * sb)
"stored = %lu, counted = %lu",
(unsigned long) le32_to_cpu(es->s_free_blocks_count), bitmap_count);
}
#endif
......@@ -236,7 +236,7 @@ void ext2_free_inode (struct inode * inode)
/* Ok, now we can actually update the inode bitmaps.. */
if (!ext2_clear_bit (bit, bh->b_data))
ext2_warning (sb, "ext2_free_inode",
ext2_error (sb, "ext2_free_inode",
"bit already cleared for inode %lu", ino);
else {
gdp = ext2_get_group_desc (sb, block_group, &bh2);
......@@ -401,7 +401,7 @@ struct inode * ext2_new_inode (const struct inode * dir, int mode, int * err)
EXT2_INODES_PER_GROUP(sb))) <
EXT2_INODES_PER_GROUP(sb)) {
if (ext2_set_bit (j, bh->b_data)) {
ext2_warning (sb, "ext2_new_inode",
ext2_error (sb, "ext2_new_inode",
"bit already set for inode %d", j);
goto repeat;
}
......@@ -527,6 +527,7 @@ unsigned long ext2_count_free_inodes (struct super_block * sb)
#endif
}
#ifdef CONFIG_EXT2_CHECK
/* Called at mount-time, super-block is locked */
void ext2_check_inodes_bitmap (struct super_block * sb)
{
......@@ -565,3 +566,4 @@ void ext2_check_inodes_bitmap (struct super_block * sb)
(unsigned long) le32_to_cpu(es->s_free_inodes_count),
bitmap_count);
}
#endif
......@@ -153,23 +153,14 @@ static int parse_options (char * options, unsigned long * sb_block,
set_opt (*mount_options, NO_UID32);
}
else if (!strcmp (this_char, "check")) {
if (!value || !*value)
set_opt (*mount_options, CHECK_NORMAL);
else if (!strcmp (value, "none")) {
clear_opt (*mount_options, CHECK_NORMAL);
clear_opt (*mount_options, CHECK_STRICT);
}
else if (!strcmp (value, "normal"))
set_opt (*mount_options, CHECK_NORMAL);
else if (!strcmp (value, "strict")) {
set_opt (*mount_options, CHECK_NORMAL);
set_opt (*mount_options, CHECK_STRICT);
}
else {
printk ("EXT2-fs: Invalid check option: %s\n",
value);
return 0;
}
if (!value || !*value || !strcmp (value, "none"))
clear_opt (*mount_options, CHECK);
else
#ifdef CONFIG_EXT2_CHECK
set_opt (*mount_options, CHECK);
#else
printk("EXT2 Check option not supported\n");
#endif
}
else if (!strcmp (this_char, "debug"))
set_opt (*mount_options, DEBUG);
......@@ -205,10 +196,6 @@ static int parse_options (char * options, unsigned long * sb_block,
set_opt (*mount_options, GRPID);
else if (!strcmp (this_char, "minixdf"))
set_opt (*mount_options, MINIX_DF);
else if (!strcmp (this_char, "nocheck")) {
clear_opt (*mount_options, CHECK_NORMAL);
clear_opt (*mount_options, CHECK_STRICT);
}
else if (!strcmp (this_char, "nogrpid") ||
!strcmp (this_char, "sysvgroups"))
clear_opt (*mount_options, GRPID);
......@@ -305,10 +292,12 @@ static void ext2_setup_super (struct super_block * sb,
EXT2_BLOCKS_PER_GROUP(sb),
EXT2_INODES_PER_GROUP(sb),
sb->u.ext2_sb.s_mount_opt);
#ifdef CONFIG_EXT2_CHECK
if (test_opt (sb, CHECK)) {
ext2_check_blocks_bitmap (sb);
ext2_check_inodes_bitmap (sb);
}
#endif
}
#if 0 /* ibasket's still have unresolved bugs... -DaveM */
......@@ -398,7 +387,6 @@ struct super_block * ext2_read_super (struct super_block * sb, void * data,
}
sb->u.ext2_sb.s_mount_opt = 0;
set_opt (sb->u.ext2_sb.s_mount_opt, CHECK_NORMAL);
if (!parse_options ((char *) data, &sb_block, &resuid, &resgid,
&sb->u.ext2_sb.s_mount_opt)) {
return NULL;
......@@ -674,7 +662,6 @@ int ext2_remount (struct super_block * sb, int * flags, char * data)
/*
* Allow the "check" option to be passed as a remount option.
*/
new_mount_opt = EXT2_MOUNT_CHECK_NORMAL;
if (!parse_options (data, &tmp, &resuid, &resgid,
&new_mount_opt))
return -EINVAL;
......
......@@ -296,6 +296,7 @@ nlmclnt_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback)
struct rpc_clnt *clnt;
struct nlm_args *argp = &req->a_args;
struct nlm_res *resp = &req->a_res;
struct rpc_message msg;
int status;
dprintk("lockd: call procedure %s on %s (async)\n",
......@@ -306,8 +307,11 @@ nlmclnt_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback)
return -ENOLCK;
/* bootstrap and kick off the async RPC call */
status = rpc_do_call(clnt, proc, argp, resp, RPC_TASK_ASYNC,
callback, req);
msg.rpc_proc = proc;
msg.rpc_argp = argp;
msg.rpc_resp =resp;
msg.rpc_cred = NULL;
status = rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, callback, req);
/* If the async call is proceeding, increment host refcount */
if (status >= 0 && (req->a_flags & RPC_TASK_ASYNC))
......
......@@ -163,7 +163,7 @@ xdr_encode_mon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp)
*p++ = htonl(argp->proc);
/* This is the private part. Needed only for SM_MON call */
if (rqstp->rq_task->tk_proc == SM_MON) {
if (rqstp->rq_task->tk_msg.rpc_proc == SM_MON) {
*p++ = argp->addr;
*p++ = 0;
*p++ = 0;
......
......@@ -599,6 +599,9 @@ static int nfs_lookup_revalidate(struct dentry * dentry, int flags)
d_drop(dentry);
if (!list_empty(&dentry->d_subdirs))
shrink_dcache_parent(dentry);
/* If we have submounts, don't unhash ! */
if (have_submounts(dentry))
goto out_valid;
/* Purge readdir caches. */
if (dentry->d_parent->d_inode) {
nfs_zap_caches(dentry->d_parent->d_inode);
......
......@@ -171,6 +171,7 @@ static inline int
nfs_readpage_async(struct dentry *dentry, struct inode *inode,
struct page *page)
{
struct rpc_message msg;
unsigned long address;
struct nfs_rreq *req;
int result = -1, flags;
......@@ -195,8 +196,13 @@ nfs_readpage_async(struct dentry *dentry, struct inode *inode,
/* Start the async call */
dprintk("NFS: executing async READ request.\n");
result = rpc_do_call(NFS_CLIENT(inode), NFSPROC_READ,
&req->ra_args, &req->ra_res, flags,
msg.rpc_proc = NFSPROC_READ;
msg.rpc_argp = &req->ra_args;
msg.rpc_resp = &req->ra_res;
msg.rpc_cred = NULL;
result = rpc_call_async(NFS_CLIENT(inode), &msg, flags,
nfs_readpage_result, req);
if (result < 0)
goto out_free;
......
......@@ -285,6 +285,7 @@ create_write_request(struct file * file, struct page *page, unsigned int offset,
struct rpc_clnt *clnt = NFS_CLIENT(inode);
struct nfs_wreq *wreq;
struct rpc_task *task;
struct rpc_message msg;
dprintk("NFS: create_write_request(%s/%s, %ld+%d)\n",
dentry->d_parent->d_name.name, dentry->d_name.name,
......@@ -298,13 +299,16 @@ create_write_request(struct file * file, struct page *page, unsigned int offset,
task = &wreq->wb_task;
rpc_init_task(task, clnt, nfs_wback_result, RPC_TASK_NFSWRITE);
task->tk_calldata = wreq;
task->tk_action = nfs_wback_begin;
rpcauth_lookupcred(task); /* Obtain user creds */
msg.rpc_proc = NFSPROC_WRITE;
msg.rpc_argp = &wreq->wb_args;
msg.rpc_resp = &wreq->wb_fattr;
msg.rpc_cred = NULL;
rpc_call_setup(task, &msg, 0);
if (task->tk_status < 0)
goto out_req;
task->tk_calldata = wreq;
/* Put the task on inode's writeback request list. */
get_file(file);
wreq->wb_file = file;
......@@ -360,6 +364,7 @@ schedule_write_request(struct nfs_wreq *req, int sync)
task->tk_pid);
/* Page is already locked */
rpc_clnt_sigmask(clnt, &oldmask);
nfs_wback_begin(task);
rpc_execute(task);
rpc_clnt_sigunmask(clnt, &oldmask);
} else {
......@@ -367,7 +372,7 @@ schedule_write_request(struct nfs_wreq *req, int sync)
task->tk_pid);
task->tk_flags |= RPC_TASK_ASYNC;
task->tk_timeout = NFS_WRITEBACK_DELAY;
rpc_sleep_on(&write_queue, task, NULL, NULL);
rpc_sleep_on(&write_queue, task, nfs_wback_begin, NULL);
}
return sync;
......@@ -641,8 +646,6 @@ nfs_wback_begin(struct rpc_task *task)
req->wb_args.count = req->wb_bytes;
req->wb_args.buffer = (void *) (page_address(page) + req->wb_offset);
rpc_call_setup(task, NFSPROC_WRITE, &req->wb_args, &req->wb_fattr, 0);
return;
}
......
This diff is collapsed.
......@@ -246,7 +246,7 @@ int udf_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
struct FileEntry *fe;
fe = (struct FileEntry *)bh->b_data;
eaicb = fe->extendedAttrICB;
eaicb = lela_to_cpu(fe->extendedAttrICB);
if (UDF_I_LENEATTR(inode))
ea = fe->extendedAttr;
}
......@@ -255,7 +255,7 @@ int udf_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
struct ExtendedFileEntry *efe;
efe = (struct ExtendedFileEntry *)bh->b_data;
eaicb = efe->extendedAttrICB;
eaicb = lela_to_cpu(efe->extendedAttrICB);
if (UDF_I_LENEATTR(inode))
ea = efe->extendedAttr;
}
......
......@@ -74,10 +74,13 @@ static int udf_get_block(struct inode *, long, struct buffer_head *, int);
*/
void udf_put_inode(struct inode * inode)
{
lock_kernel();
udf_discard_prealloc(inode);
write_inode_now(inode);
unlock_kernel();
if (!(inode->i_sb->s_flags & MS_RDONLY))
{
lock_kernel();
udf_discard_prealloc(inode);
write_inode_now(inode);
unlock_kernel();
}
}
/*
......@@ -1554,16 +1557,18 @@ int udf_add_aext(struct inode *inode, lb_addr *bloc, int *extoffset,
case ICB_FLAG_AD_SHORT:
{
sad = (short_ad *)sptr;
sad->extLength = EXTENT_NEXT_EXTENT_ALLOCDECS << 30 |
inode->i_sb->s_blocksize;
sad->extLength = cpu_to_le32(
EXTENT_NEXT_EXTENT_ALLOCDECS << 30 |
inode->i_sb->s_blocksize);
sad->extPosition = cpu_to_le32(bloc->logicalBlockNum);
break;
}
case ICB_FLAG_AD_LONG:
{
lad = (long_ad *)sptr;
lad->extLength = EXTENT_NEXT_EXTENT_ALLOCDECS << 30 |
inode->i_sb->s_blocksize;
lad->extLength = cpu_to_le32(
EXTENT_NEXT_EXTENT_ALLOCDECS << 30 |
inode->i_sb->s_blocksize);
lad->extLocation = cpu_to_lelb(*bloc);
break;
}
......
......@@ -70,8 +70,6 @@ udf_get_last_session(struct super_block *sb)
unsigned int
udf_get_last_block(struct super_block *sb)
{
extern int *blksize_size[];
kdev_t dev = sb->s_dev;
struct block_device *bdev = sb->s_bdev;
int ret;
unsigned long lblock = 0;
......@@ -80,28 +78,10 @@ udf_get_last_block(struct super_block *sb)
if (ret) /* Hard Disk */
{
unsigned int hbsize = get_hardblocksize(dev);
unsigned int blocksize = sb->s_blocksize;
unsigned int mult = 0;
unsigned int div = 0;
if (!hbsize)
hbsize = blksize_size[MAJOR(dev)][MINOR(dev)];
if (hbsize > blocksize)
mult = hbsize / blocksize;
else if (blocksize > hbsize)
div = blocksize / hbsize;
ret = ioctl_by_bdev(bdev, BLKGETSIZE, (unsigned long) &lblock);
if (!ret && lblock != 0x7FFFFFFF)
{
if (mult)
lblock *= mult;
else if (div)
lblock /= div;
}
lblock = ((512 * lblock) / sb->s_blocksize);
}
if (!ret && lblock)
......
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.
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.
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