Commit 27c07b25 authored by Linus Torvalds's avatar Linus Torvalds

v2.4.2.8 -> v2.4.3

  - Kai Germaschewski: Makefile dependency fixes. ISDN update
  - Chris Mason: another reiserfs tail writing fix
  - unify pte/pmd allocation
  - undo some VIA PCI fixups - conflicting behaviour
parent 8b11a705
......@@ -40,4 +40,4 @@ README.x25
_ info for running X.25 over ISDN.
README.hysdn
- info on driver for Hypercope active HYSDN cards
\ No newline at end of file
$Id: INTERFACE,v 1.15.8.1 2001/02/16 16:43:22 kai Exp $
$Id: INTERFACE,v 1.15.8.2 2001/03/13 16:17:07 kai Exp $
Description of the Interface between Linklevel and Hardwarelevel
of isdn4linux:
......
$Id: README.eicon,v 1.10 2000/08/13 12:19:15 armin Exp $
$Id: README.eicon,v 1.10.6.1 2001/02/19 10:04:59 armin Exp $
(c) 1999,2000 Armin Schindler (mac@melware.de)
(c) 1999,2000 Cytronics & Melware (info@melware.de)
......
......@@ -19,12 +19,12 @@ Parport as modules
If you load the parport code as a module, say
# insmod parport.o
# insmod parport
to load the generic parport code. You then must load the
architecture-dependent code with (for example):
# insmod parport_pc.o io=0x3bc,0x378,0x278 irq=none,7,auto
# insmod parport_pc io=0x3bc,0x378,0x278 irq=none,7,auto
to tell the parport code that you want three PC-style ports, one at
0x3bc with no IRQ, one at 0x378 using IRQ 7, and one at 0x278 with an
......@@ -192,7 +192,7 @@ is loaded it will create one lp device for each port found. You can
override this, though, by using parameters either when you load the lp
driver:
# insmod lp.o parport=0,2
# insmod lp parport=0,2
or on the LILO command line:
......
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 3
EXTRAVERSION =-pre8
EXTRAVERSION =
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
......
......@@ -968,23 +968,13 @@ static void __init pci_fixup_vt8363(struct pci_dev *d)
printk("PCI: Bus master Pipeline request disabled\n");
pci_write_config_byte(d, 0x54, tmp & ~(1<<2));
}
pci_read_config_byte(d, 0x54, &tmp);
if(tmp & (1)) {
printk("PCI: Fast Write to Read turnaround disabled\n");
pci_write_config_byte(d, 0x54, tmp & ~(1));
}
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, 0x70, &tmp);
if(tmp & (1<<2)) {
printk("PCI: Disabled Master Read Caching\n");
pci_write_config_byte(d, 0x70, tmp & ~(1<<2));
}
pci_read_config_byte(d, 0x71, &tmp);
if ((tmp & (1<<3))==0) {
if((tmp & (1<<3)) == 0) {
printk("PCI: Bursting cornercase bug worked around\n");
pci_write_config_byte(d, 0x71, tmp | (1<<3));
}
......
......@@ -50,11 +50,11 @@ int do_check_pgt_cache(int low, int high)
freed++;
}
if (pmd_quicklist) {
pmd_free_slow(pmd_alloc_one_fast());
pmd_free_slow(pmd_alloc_one_fast(NULL, 0));
freed++;
}
if (pte_quicklist) {
pte_free_slow(pte_alloc_one_fast(0));
pte_free_slow(pte_alloc_one_fast(NULL, 0));
freed++;
}
} while(pgtable_cache_size > low);
......
......@@ -216,7 +216,7 @@ int do_check_pgt_cache(int low, int high)
freed++;
}
if (pte_quicklist) {
pte_free_slow(pte_alloc_one_fast(0));
pte_free_slow(pte_alloc_one_fast(NULL, 0));
freed++;
}
} while (pgtable_cache_size > low);
......
......@@ -416,9 +416,9 @@ void flush_thread(void)
unsigned long pgd_cache;
if (pgd_none(*pgd0)) {
pmd_t *page = pmd_alloc_one_fast();
pmd_t *page = pmd_alloc_one_fast(NULL, 0);
if (!page)
page = pmd_alloc_one();
page = pmd_alloc_one(NULL, 0);
pgd_set(pgd0, page);
}
pgd_cache = pgd_val(*pgd0) << 11UL;
......
/* $Id: generic.c,v 1.15 2001/03/24 09:36:01 davem Exp $
/* $Id: generic.c,v 1.16 2001/03/25 04:40:05 davem Exp $
* generic.c: Generic Sparc mm routines that are not dependent upon
* MMU type but are Sparc specific.
*
......@@ -107,9 +107,7 @@ static inline int io_remap_pmd_range(pmd_t * pmd, unsigned long address, unsigne
pte_t * pte = pte_alloc(current->mm, pmd, address);
if (!pte)
return -ENOMEM;
spin_lock(&current->mm->page_table_lock);
io_remap_pte_range(pte, address, end - address, address + offset, prot, space);
spin_unlock(&current->mm->page_table_lock);
address = (address + PMD_SIZE) & PMD_MASK;
pmd++;
} while (address < end);
......@@ -122,11 +120,14 @@ int io_remap_page_range(unsigned long from, unsigned long offset, unsigned long
pgd_t * dir;
unsigned long beg = from;
unsigned long end = from + size;
struct mm_struct *mm = current->mm;
prot = __pgprot(pg_iobits);
offset -= from;
dir = pgd_offset(current->mm, from);
flush_cache_range(current->mm, beg, end);
dir = pgd_offset(mm, from);
flush_cache_range(mm, beg, end);
spin_lock(&mm->page_table_lock);
while (from < end) {
pmd_t *pmd = pmd_alloc(current->mm, dir, from);
error = -ENOMEM;
......@@ -138,6 +139,8 @@ int io_remap_page_range(unsigned long from, unsigned long offset, unsigned long
from = (from + PGDIR_SIZE) & PGDIR_MASK;
dir++;
}
spin_unlock(&mm->page_table_lock);
flush_tlb_range(current->mm, beg, end);
return error;
}
......@@ -66,9 +66,9 @@ int do_check_pgt_cache(int low, int high)
free_pgd_slow(get_pgd_fast()), freed++;
#endif
if (pte_quicklist[0])
free_pte_slow(pte_alloc_one_fast(0)), freed++;
free_pte_slow(pte_alloc_one_fast(NULL, 0)), freed++;
if (pte_quicklist[1])
free_pte_slow(pte_alloc_one_fast(1 << (PAGE_SHIFT + 10))), freed++;
free_pte_slow(pte_alloc_one_fast(NULL, 1 << (PAGE_SHIFT + 10))), freed++;
} while (pgtable_cache_size > low);
}
#ifndef CONFIG_SMP
......@@ -904,7 +904,7 @@ struct pgtable_cache_struct pgt_quicklists;
* 3) Process faults back in the page, the old pre-dirtied copy
* is provided and here is the corruption.
*/
pte_t *pte_alloc_one(unsigned long address)
pte_t *pte_alloc_one(struct mm_struct *mm, unsigned long address)
{
struct page *page = alloc_pages(GFP_KERNEL, 1);
unsigned long color = ((address >> (PAGE_SHIFT + 10)) & 1UL);
......
......@@ -50,6 +50,9 @@ obj-$(CONFIG_ATM_FORE200E) += fore_200e.o
EXTRA_CFLAGS=-g
list-multi := fore_200e.o
fore_200e-objs := fore200e.o $(FORE200E_FW_OBJS)
include $(TOPDIR)/Rules.make
......@@ -82,9 +85,8 @@ fore200e_mkfirm: fore200e_mkfirm.c
objcopy -Iihex $< -Obinary $@.gz
gzip -df $@.gz
# module build
fore_200e.o: fore200e.o $(FORE200E_FW_OBJS)
$(LD) -r -o $@ $< $(FORE200E_FW_OBJS)
fore_200e.o: $(fore_200e-objs)
$(LD) -r -o $@ $(fore_200e-objs)
# firmware dependency stuff taken from drivers/sound/Makefile
FORE200E_FW_UP_TO_DATE :=
......
......@@ -2037,7 +2037,7 @@ static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
ret = cdrom_read_block(cdi, &cgc, lba, nr, 1, CD_FRAMESIZE_RAW);
if (ret)
break;
__copy_to_user(ra.buf, cgc.buffer, CD_FRAMESIZE_RAW);
__copy_to_user(ra.buf, cgc.buffer, CD_FRAMESIZE_RAW*nr);
ra.buf += CD_FRAMESIZE_RAW * nr;
ra.nframes -= nr;
lba += nr;
......
......@@ -7,7 +7,7 @@ O_TARGET := agp.o
export-objs := agpgart_be.o
multi-objs := agpgart.o
list-multi := agpgart.o
agpgart-objs := agpgart_fe.o agpgart_be.o
obj-$(CONFIG_AGP) += agpgart.o
......
......@@ -3,12 +3,10 @@
# the Direct Rendering Infrastructure (DRI) in XFree86 4.x.
#
# drm.o is a fake target -- it is never built
# The real targets are in the module-list
O_TARGET := drm.o
module-list := gamma.o tdfx.o r128.o ffb.o mga.o i810.o
export-objs := $(patsubst %.o,%_drv.o,$(module-list))
export-objs := gamma_drv.o tdfx_drv.o r128_drv.o ffb_drv.o mga_drv.o \
i810_drv.o
# lib-objs are included in every module so that radical changes to the
# architecture of the DRM support library can be made at a later time.
......@@ -42,6 +40,7 @@ else
endif
endif
list-multi := gamma.o tdfx.o r128.o ffb.o mga.o i810.o
gamma-objs := gamma_drv.o gamma_dma.o
tdfx-objs := tdfx_drv.o tdfx_context.o
r128-objs := r128_drv.o r128_cce.o r128_context.o r128_bufs.o r128_state.o
......
......@@ -135,8 +135,8 @@
#include <asm/uaccess.h>
#include <asm/system.h>
/* if you have more than 3 printers, remember to increase LP_NO */
#define LP_NO 3
/* if you have more than 8 printers, remember to increase LP_NO */
#define LP_NO 8
/* ROUND_UP macro from fs/select.c */
#define ROUND_UP(x,y) (((x)+(y)-1)/(y))
......@@ -344,26 +344,7 @@ static ssize_t lp_read(struct file * file, char * buf,
return -EINTR;
parport_claim_or_block (lp_table[minor].dev);
for (;;) {
retval = parport_read (port, kbuf, count);
if (retval)
break;
if (file->f_flags & O_NONBLOCK)
break;
/* Wait for an interrupt. */
interruptible_sleep_on_timeout (&lp_table[minor].waitq,
LP_TIMEOUT_POLLED);
if (signal_pending (current)) {
retval = -EINTR;
break;
}
}
retval = parport_read (port, kbuf, count);
parport_release (lp_table[minor].dev);
if (retval > 0 && copy_to_user (buf, kbuf, retval))
......
......@@ -14,7 +14,7 @@ obj-$(CONFIG_FC4) += fc4.o
obj-$(CONFIG_FC4_SOC) += soc.o
obj-$(CONFIG_FC4_SOCAL) += socal.o
include $(TOPDIR)/Rules.make
fc4.o: $(fc4-objs)
$(LD) -r -o $@ $(fc4-objs)
include $(TOPDIR)/Rules.make
......@@ -76,10 +76,9 @@ if [ "$CONFIG_ISDN_DRV_HISAX" != "n" ]; then
bool ' Am7930' CONFIG_HISAX_AMD7930
fi
fi
fi
dep_tristate 'Sedlbauer PCMCIA cards' CONFIG_HISAX_SEDLBAUER_CS $CONFIG_PCMCIA
dep_tristate ' Sedlbauer PCMCIA cs module' CONFIG_HISAX_SEDLBAUER_CS $CONFIG_PCMCIA
fi
endmenu
### Active ISDN cards
......
......@@ -34,7 +34,6 @@ hisax-objs-$(CONFIG_HISAX_DIEHLDIVA) += diva.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_ASUSCOM) += asuscom.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_TELEINT) += teleint.o isac.o arcofi.o hfc_2bs0.o
hisax-objs-$(CONFIG_HISAX_SEDLBAUER) += sedlbauer.o isac.o arcofi.o hscx.o isar.o
hisax-objs-$(CONFIG_HISAX_SEDLBAUER_CS) += sedlbauer_cs.o
hisax-objs-$(CONFIG_HISAX_SPORTSTER) += sportster.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_MIC) += mic.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_NETJET) += nj_s.o netjet.o isac.o arcofi.o
......@@ -55,7 +54,8 @@ hisax-objs += $(sort $(hisax-objs-y))
# Each configuration option enables a list of files.
obj-$(CONFIG_ISDN_DRV_HISAX) += hisax.o
obj-$(CONFIG_ISDN_DRV_HISAX) += hisax.o
obj-$(CONFIG_HISAX_SEDLBAUER_CS) += sedlbauer_cs.o
MD5FILES := isac.c isdnl1.c isdnl2.c isdnl3.c \
tei.c callc.c cert.c l3dss1.c l3_1tr6.c \
......
/* $Id: callc.c,v 2.51.6.1 2001/02/16 16:43:25 kai Exp $
/* $Id: callc.c,v 2.51.6.2 2001/03/13 16:17:08 kai Exp $
*
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
......@@ -20,7 +20,7 @@
#define MOD_USE_COUNT ( GET_USE_COUNT (&__this_module))
#endif /* MODULE */
const char *lli_revision = "$Revision: 2.51.6.1 $";
const char *lli_revision = "$Revision: 2.51.6.2 $";
extern struct IsdnCard cards[];
extern int nrcards;
......
/* $Id: config.c,v 2.57.6.10 2001/02/16 16:43:25 kai Exp $
/* $Id: config.c,v 2.57.6.11 2001/03/13 16:17:08 kai Exp $
*
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
......
// $Id: icc.c,v 1.5.6.1 2001/02/16 16:43:27 kai Exp $
// $Id: icc.c,v 1.5.6.2 2001/03/13 16:17:08 kai Exp $
//-----------------------------------------------------------------------------
//
// ICC specific routines
......
// $Id: icc.h,v 1.2.6.1 2001/02/16 16:43:27 kai Exp $
// $Id: icc.h,v 1.2.6.2 2001/03/13 16:17:08 kai Exp $
//-----------------------------------------------------------------------------
//
// ICC specific routines
......
/* $Id: q931.c,v 1.10.6.1 2001/02/16 16:43:28 kai Exp $
/* $Id: q931.c,v 1.10.6.2 2001/03/13 16:17:08 kai Exp $
*
* q931.c code to decode ITU Q.931 call control messages
*
......
/* $Id: boardergo.c,v 1.5.6.2 2001/02/16 16:43:30 kai Exp $
/* $Id: boardergo.c,v 1.5.6.3 2001/03/13 16:17:09 kai Exp $
* Linux driver for HYSDN cards, specific routines for ergo type boards.
*
......
/* $Id: hysdn_boot.c,v 1.4.6.2 2001/02/16 16:43:30 kai Exp $
/* $Id: hysdn_boot.c,v 1.4.6.3 2001/03/13 16:17:09 kai Exp $
* Linux driver for HYSDN cards, specific routines for booting and pof handling.
*
......
/* $Id: hysdn_procconf.c,v 1.8 2000/11/13 22:51:47 kai Exp $
/* $Id: hysdn_procconf.c,v 1.8.6.1 2001/03/13 16:17:09 kai Exp $
* Linux driver for HYSDN cards, /proc/net filesystem dir and conf functions.
* written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
......@@ -31,7 +31,7 @@
#include "hysdn_defs.h"
static char *hysdn_procconf_revision = "$Revision: 1.8 $";
static char *hysdn_procconf_revision = "$Revision: 1.8.6.1 $";
#define INFO_OUT_LEN 80 /* length of info line including lf */
......
/* $Id: hysdn_sched.c,v 1.5 2000/11/22 17:13:13 kai Exp $
/* $Id: hysdn_sched.c,v 1.5.6.1 2001/03/13 16:17:09 kai Exp $
* Linux driver for HYSDN cards, scheduler routines for handling exchange card <-> pc.
*
......
/*
* $Id: interrupt.c,v 1.4 1998/01/31 22:10:52 keil Exp $
* $Id: interrupt.c,v 1.4.8.1 2001/03/13 16:17:09 kai Exp $
* Copyright (C) 1996 SpellCaster Telecommunications Inc.
*
* This program is free software; you can redistribute it and/or modify
......
......@@ -15,8 +15,9 @@ O_TARGET := net.o
# All of the (potential) objects that export symbols.
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
export-objs := 8390.o arlan.o aironet4500_core.o aironet4500_card.o ppp_async.o \
ppp_generic.o slhc.o pppox.o auto_irq.o
export-objs := 8390.o arlan.o aironet4500_core.o aironet4500_card.o \
ppp_async.o ppp_generic.o slhc.o pppox.o auto_irq.o \
net_init.o
ifeq ($(CONFIG_TULIP),y)
obj-y += tulip/tulip.o
......
......@@ -1691,11 +1691,6 @@ static int __devinit parport_ECP_supported(struct parport *pb)
config & 0x80 ? "Level" : "Pulses");
configb = inb (CONFIGB (pb));
if (!(configb & 0x40)) {
printk (KERN_WARNING "0x%lx: possible IRQ conflict!\n",
pb->base);
pb->irq = PARPORT_IRQ_NONE;
}
printk (KERN_DEBUG "0x%lx: ECP port cfgA=0x%02x cfgB=0x%02x\n",
pb->base, config, configb);
printk (KERN_DEBUG "0x%lx: ECP settings irq=", pb->base);
......
......@@ -810,6 +810,10 @@ void parport_unregister_device(struct pardevice *dev)
struct parport *parport_find_number (int number)
{
struct parport *port, *result = NULL;
if (!portlist)
get_lowlevel_driver ();
spin_lock (&parportlist_lock);
for (port = portlist; port; port = port->next)
if (port->number == number) {
......@@ -835,6 +839,10 @@ struct parport *parport_find_number (int number)
struct parport *parport_find_base (unsigned long base)
{
struct parport *port, *result = NULL;
if (!portlist)
get_lowlevel_driver ();
spin_lock (&parportlist_lock);
for (port = portlist; port; port = port->next)
if (port->base == base) {
......
......@@ -12,7 +12,7 @@ O_TARGET := pcmcia.o
export-objs := ds.o cs.o cb_enabler.o yenta.o pci_socket.o
multi-list = pcmcia_core.o yenta_socket.o
list-multi := pcmcia_core.o yenta_socket.o
yenta_socket-objs := pci_socket.o yenta.o
pcmcia_core-objs := cistpl.o rsrc_mgr.o bulkmem.o cs.o
......
......@@ -11,7 +11,7 @@
O_TARGET := pnp.o
export-objs := isapnp.o
multi-objs := isa-pnp.o
list-multi := isa-pnp.o
proc-$(CONFIG_PROC_FS) = isapnp_proc.o
isa-pnp-objs := isapnp.o quirks.o $(proc-y)
......
/* $Id: envctrl.c,v 1.21 2001/02/13 04:07:38 davem Exp $
/* $Id: envctrl.c,v 1.22 2001/03/25 09:12:15 davem Exp $
* envctrl.c: Temperature and Fan monitoring on Machines providing it.
*
* Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
......@@ -984,6 +984,17 @@ static int __init envctrl_init(void)
struct linux_ebus_child *edev_child = NULL;
int i = 0;
for_each_ebus(ebus) {
for_each_ebusdev(edev, ebus) {
if (!strcmp(edev->prom_name, "bbc")) {
/* If we find a boot-bus controller node,
* then this envctrl driver is not for us.
*/
return -ENODEV;
}
}
}
/* Traverse through ebus and ebus device list for i2c device and
* adc and gpio nodes.
*/
......
......@@ -26,7 +26,6 @@ else
endif
export-objs := scsi_syms.o
list-multi := scsi_mod.o initio.o a100u2w.o
CFLAGS_aha152x.o = -DAHA152X_STAT -DAUTOCONF
CFLAGS_gdth.o = # -DDEBUG_GDTH=2 -D__SERIAL__ -D__COM2__ -DGDTH_STATISTICS
......@@ -126,12 +125,13 @@ obj-$(CONFIG_BLK_DEV_SD) += sd_mod.o
obj-$(CONFIG_BLK_DEV_SR) += sr_mod.o
obj-$(CONFIG_CHR_DEV_SG) += sg.o
list-multi := scsi_mod.o sd_mod.o sr_mod.o initio.o a100u2w.o
scsi_mod-objs := scsi.o hosts.o scsi_ioctl.o constants.o \
scsicam.o scsi_proc.o scsi_error.o \
scsi_obsolete.o scsi_queue.o scsi_lib.o \
scsi_merge.o scsi_dma.o scsi_scan.o \
scsi_syms.o
sd_mod-objs := sd.o
sr_mod-objs := sr.o sr_ioctl.o sr_vendor.o
initio-objs := ini9100u.o i91uscsi.o
a100u2w-objs := inia100.o i60uscsi.o
......@@ -142,8 +142,8 @@ include $(TOPDIR)/Rules.make
scsi_mod.o: $(scsi_mod-objs)
$(LD) -r -o $@ $(scsi_mod-objs)
sd_mod.o: sd.o
$(LD) -r -o $@ sd.o
sd_mod.o: $(sd_mod-objs)
$(LD) -r -o $@ $(sd_mod-objs)
sr_mod.o: $(sr_mod-objs)
$(LD) -r -o $@ $(sr_mod-objs)
......
......@@ -21,17 +21,17 @@ obj-$(CONFIG_PCMCIA_FDOMAIN) += fdomain_cs.o
obj-$(CONFIG_PCMCIA_AHA152X) += aha152x_cs.o
list-multi := qlogic_cs.o fdomain_cs.o aha152x_cs.o
aha152x-objs := aha152x_stub.o aha152x.o
fdomain-objs := fdomain_stub.o fdomain.o
qlogic-objs := qlogic_stub.o qlogicfas.o
aha152x_cs-objs := aha152x_stub.o aha152x.o
fdomain_cs-objs := fdomain_stub.o fdomain.o
qlogic_cs-objs := qlogic_stub.o qlogicfas.o
include $(TOPDIR)/Rules.make
aha152x_cs.o: $(aha152x-objs)
$(LD) -r -o $@ $(aha152x-objs)
aha152x_cs.o: $(aha152x_cs-objs)
$(LD) -r -o $@ $(aha152x_cs-objs)
fdomain_cs.o: $(fdomain-objs)
$(LD) -r -o $@ $(fdomain-objs)
fdomain_cs.o: $(fdomain_cs-objs)
$(LD) -r -o $@ $(fdomain_cs-objs)
qlogic_cs.o: $(qlogic-objs)
$(LD) -r -o $@ $(qlogic-objs)
qlogic_cs.o: $(qlogic_cs-objs)
$(LD) -r -o $@ $(qlogic_cs-objs)
......@@ -55,7 +55,7 @@ int alloc_kiovec(int nr, struct kiobuf **bufp)
return -ENOMEM;
}
kiobuf_init(iobuf);
*bufp++ = iobuf;
bufp[i] = iobuf;
}
return 0;
......
......@@ -304,6 +304,7 @@ static int _get_block_create_0 (struct inode * inode, long block,
char * p = NULL;
int chars;
int ret ;
int done = 0 ;
unsigned long offset ;
// prepare the key to look for the 'block'-th block of file
......@@ -355,6 +356,14 @@ static int _get_block_create_0 (struct inode * inode, long block,
return -ENOENT;
}
/* if we've got a direct item, and the buffer was uptodate,
** we don't want to pull data off disk again. skip to the
** end, where we map the buffer and return
*/
if (buffer_uptodate(bh_result)) {
goto finished ;
}
// read file tail into part of page
offset = (cpu_key_k_offset(&key) - 1) & (PAGE_CACHE_SIZE - 1) ;
fs_gen = get_generation(inode->i_sb) ;
......@@ -375,8 +384,24 @@ static int _get_block_create_0 (struct inode * inode, long block,
if (!is_direct_le_ih (ih)) {
BUG ();
}
chars = le16_to_cpu (ih->ih_item_len) - path.pos_in_item;
/* make sure we don't read more bytes than actually exist in
** the file. This can happen in odd cases where i_size isn't
** correct, and when direct item padding results in a few
** extra bytes at the end of the direct item
*/
if ((le_ih_k_offset(ih) + path.pos_in_item) > inode->i_size)
break ;
if ((le_ih_k_offset(ih) - 1 + ih_item_len(ih)) > inode->i_size) {
chars = inode->i_size - (le_ih_k_offset(ih) - 1) - path.pos_in_item;
done = 1 ;
} else {
chars = le16_to_cpu (ih->ih_item_len) - path.pos_in_item;
}
memcpy (p, B_I_PITEM (bh, ih) + path.pos_in_item, chars);
if (done)
break ;
p += chars;
if (PATH_LAST_POSITION (&path) != (B_NR_ITEMS (bh) - 1))
......@@ -395,16 +420,14 @@ static int _get_block_create_0 (struct inode * inode, long block,
ih = get_ih (&path);
} while (1);
finished:
pathrelse (&path);
// FIXME: b_blocknr == 0 here. but b_data contains correct data
// from tail. ll_rw_block will skip uptodate buffers
bh_result->b_blocknr = 0 ;
bh_result->b_dev = inode->i_dev;
mark_buffer_uptodate (bh_result, 1);
bh_result->b_state |= (1UL << BH_Mapped);
flush_dcache_page(bh_result->b_page) ;
kunmap(bh_result->b_page) ;
return 0;
}
......@@ -1567,8 +1590,9 @@ void reiserfs_truncate_file(struct inode *p_s_inode, int update_timestamps) {
/* so, if page != NULL, we have a buffer head for the offset at
** the end of the file. if the bh is mapped, and bh->b_blocknr != 0,
** then we have an unformatted node. Otherwise, we have a direct item,
** and no zeroing is required. We zero after the truncate, because the
** truncate might pack the item anyway (it will unmap bh if it packs).
** and no zeroing is required on disk. We zero after the truncate,
** because the truncate might pack the item anyway
** (it will unmap bh if it packs).
*/
prevent_flush_page_lock(page, p_s_inode) ;
journal_begin(&th, p_s_inode->i_sb, JOURNAL_PER_BALANCE_CNT * 2 ) ;
......@@ -1578,7 +1602,7 @@ void reiserfs_truncate_file(struct inode *p_s_inode, int update_timestamps) {
journal_end(&th, p_s_inode->i_sb, JOURNAL_PER_BALANCE_CNT * 2 ) ;
allow_flush_page_lock(page, p_s_inode) ;
if (page && buffer_mapped(bh) && bh->b_blocknr != 0) {
if (page) {
length = offset & (blocksize - 1) ;
/* if we are not on a block boundary */
if (length) {
......@@ -1586,14 +1610,14 @@ void reiserfs_truncate_file(struct inode *p_s_inode, int update_timestamps) {
memset((char *)kmap(page) + offset, 0, length) ;
flush_dcache_page(page) ;
kunmap(page) ;
mark_buffer_dirty(bh) ;
if (buffer_mapped(bh) && bh->b_blocknr != 0) {
mark_buffer_dirty(bh) ;
}
}
}
if (page) {
UnlockPage(page) ;
page_cache_release(page) ;
}
return ;
}
......@@ -1646,6 +1670,7 @@ static int map_block_for_writepage(struct inode *inode,
goto out ;
}
set_block_dev_mapped(bh_result, le32_to_cpu(item[pos_in_item]), inode);
mark_buffer_uptodate(bh_result, 1);
} else if (is_direct_le_ih(ih)) {
char *p ;
p = page_address(bh_result->b_page) ;
......@@ -1665,6 +1690,7 @@ static int map_block_for_writepage(struct inode *inode,
journal_mark_dirty(&th, inode->i_sb, bh) ;
bytes_copied += copy_size ;
set_block_dev_mapped(bh_result, 0, inode);
mark_buffer_uptodate(bh_result, 1);
/* are there still bytes left? */
if (bytes_copied < bh_result->b_size &&
......
......@@ -11,7 +11,7 @@
#define pte_quicklist (current_cpu_data.pte_quick)
#define pgtable_cache_size (current_cpu_data.pgtable_cache_sz)
#define pmd_populate(pmd, pte) \
#define pmd_populate(mm, pmd, pte) \
set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte)))
/*
......@@ -94,7 +94,7 @@ extern __inline__ void free_pgd_slow(pgd_t *pgd)
#endif
}
static inline pte_t *pte_alloc_one(unsigned long address)
static inline pte_t *pte_alloc_one(struct mm_struct *mm, unsigned long address)
{
pte_t *pte;
......@@ -104,7 +104,7 @@ static inline pte_t *pte_alloc_one(unsigned long address)
return pte;
}
static inline pte_t *pte_alloc_one_fast(unsigned long address)
static inline pte_t *pte_alloc_one_fast(struct mm_struct *mm, unsigned long address)
{
unsigned long *ret;
......@@ -138,12 +138,12 @@ extern __inline__ void pte_free_slow(pte_t *pte)
* (In the PAE case we free the pmds as part of the pgd.)
*/
#define pmd_alloc_one_fast() ({ BUG(); ((pmd_t *)1); })
#define pmd_alloc_one() ({ BUG(); ((pmd_t *)2); })
#define pmd_alloc_one_fast(mm, addr) ({ BUG(); ((pmd_t *)1); })
#define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *)2); })
#define pmd_free_slow(x) do { } while (0)
#define pmd_free_fast(x) do { } while (0)
#define pmd_free(x) do { } while (0)
#define pgd_populate(pmd, pte) BUG()
#define pgd_populate(mm, pmd, pte) BUG()
extern int do_check_pgt_cache(int, int);
......
......@@ -93,12 +93,12 @@ extern __inline__ void free_pgd_slow(pgd_t *pgd)
* We don't have any real pmd's, and this code never triggers because
* the pgd will always be present..
*/
#define pmd_alloc_one_fast() ({ BUG(); ((pmd_t *)1); })
#define pmd_alloc_one() ({ BUG(); ((pmd_t *)2); })
#define pmd_alloc_one_fast(mm, address) ({ BUG(); ((pmd_t *)1); })
#define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); })
#define pmd_free(x) do { } while (0)
#define pgd_populate(pmd, pte) BUG()
#define pgd_populate(mm, pmd, pte) BUG()
static inline pte_t *pte_alloc_one(unsigned long address)
static inline pte_t *pte_alloc_one(struct mm_struct *mm, unsigned long address)
{
pte_t *pte;
extern int mem_init_done;
......@@ -113,7 +113,7 @@ static inline pte_t *pte_alloc_one(unsigned long address)
return pte;
}
static inline pte_t *pte_alloc_one_fast(unsigned long address)
static inline pte_t *pte_alloc_one_fast(struct mm_struct *mm, unsigned long address)
{
unsigned long *ret;
......@@ -139,7 +139,7 @@ extern __inline__ void pte_free_slow(pte_t *pte)
#define pte_free(pte) pte_free_slow(pte)
#define pmd_populate(pmd, pte) (pmd_val(*(pmd)) = (unsigned long) (pte))
#define pmd_populate(mm, pmd, pte) (pmd_val(*(pmd)) = (unsigned long) (pte))
extern int do_check_pgt_cache(int, int);
......
......@@ -79,9 +79,9 @@ do { unsigned char flags = current->thread.flags; \
if (flags & SPARC_FLAG_32BIT) { \
pgd_t *pgd0 = &current->mm->pgd[0]; \
if (pgd_none (*pgd0)) { \
pmd_t *page = pmd_alloc_one_fast(); \
pmd_t *page = pmd_alloc_one_fast(NULL, 0); \
if (!page) \
page = pmd_alloc_one(); \
page = pmd_alloc_one(NULL, 0); \
pgd_set(pgd0, page); \
} \
pgd_cache = pgd_val(*pgd0) << 11UL; \
......
......@@ -227,9 +227,9 @@ extern __inline__ void free_pgd_slow(pgd_t *pgd)
#endif /* CONFIG_SMP */
#define pgd_populate(PGD, PMD) pgd_set(PGD, PMD)
#define pgd_populate(MM, PGD, PMD) pgd_set(PGD, PMD)
extern __inline__ pmd_t *pmd_alloc_one(void)
extern __inline__ pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
{
pmd_t *pmd = (pmd_t *)__get_free_page(GFP_KERNEL);
if (pmd)
......@@ -237,7 +237,7 @@ extern __inline__ pmd_t *pmd_alloc_one(void)
return pmd;
}
extern __inline__ pmd_t *pmd_alloc_one_fast(void)
extern __inline__ pmd_t *pmd_alloc_one_fast(struct mm_struct *mm, unsigned long address)
{
unsigned long *ret;
int color = 0;
......@@ -267,11 +267,11 @@ extern __inline__ void free_pmd_slow(pmd_t *pmd)
free_page((unsigned long)pmd);
}
#define pmd_populate(PMD, PTE) pmd_set(PMD, PTE)
#define pmd_populate(MM, PMD, PTE) pmd_set(PMD, PTE)
extern pte_t *pte_alloc_one(unsigned long address);
extern pte_t *pte_alloc_one(struct mm_struct *mm, unsigned long address);
extern __inline__ pte_t *pte_alloc_one_fast(unsigned long address)
extern __inline__ pte_t *pte_alloc_one_fast(struct mm_struct *mm, unsigned long address)
{
unsigned long color = (address >> (PAGE_SHIFT + 10)) & 0x1UL;
unsigned long *ret;
......
/*
* $Id: b1lli.h,v 1.8 1999/07/01 15:26:54 calle Exp $
* $Id: b1lli.h,v 1.8.8.1 2001/03/15 09:58:30 kai Exp $
*
* ISDN lowlevel-module for AVM B1-card.
*
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1lli.h,v $
* Revision 1.8.8.1 2001/03/15 09:58:30 kai
* spelling fix
*
* Revision 1.8 1999/07/01 15:26:54 calle
* complete new version (I love it):
* + new hardware independed "capi_driver" interface that will make it easy to:
......@@ -129,7 +132,7 @@ typedef struct avmb1_extcarddef {
#define AVMB1_LOAD_AND_CONFIG 3 /* load image and config to card */
#define AVMB1_ADDCARD_WITH_TYPE 4 /* add a new card, with cardtype */
#define AVMB1_GET_CARDINFO 5 /* get cardtype */
#define AVMB1_REMOVECARD 6 /* remove a card (usefull for T1) */
#define AVMB1_REMOVECARD 6 /* remove a card (useful for T1) */
#define AVMB1_REGISTERCARD_IS_OBSOLETE
......
/* $Id: hysdn_if.h,v 1.1 2000/02/10 19:47:50 werner Exp $
/* $Id: hysdn_if.h,v 1.1.8.1 2001/03/13 16:17:10 kai Exp $
* Linux driver for HYSDN cards, ioctl definitions shared by hynetmgr and driver.
* written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
......@@ -20,6 +20,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: hysdn_if.h,v $
* Revision 1.1.8.1 2001/03/13 16:17:10 kai
* spelling fixes from 2.4.3-pre
*
* Revision 1.1 2000/02/10 19:47:50 werner
*
* Initial release
......
......@@ -76,7 +76,7 @@ struct isdn_ppp_comp_data {
*
* We use this same struct for the reset entry of the compressor to commu-
* nicate to its caller how to deal with sending of a Reset Ack. In this
* case, expra is not used, but other options still apply (supressing
* case, expra is not used, but other options still apply (suppressing
* sending with rsend, appending arbitrary data, etc).
*/
......
......@@ -1284,10 +1284,10 @@ pmd_t *__pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
pmd_t *new;
/* "fast" allocation can happen without dropping the lock.. */
new = pmd_alloc_one_fast();
new = pmd_alloc_one_fast(mm, address);
if (!new) {
spin_unlock(&mm->page_table_lock);
new = pmd_alloc_one();
new = pmd_alloc_one(mm, address);
spin_lock(&mm->page_table_lock);
if (!new)
return NULL;
......@@ -1301,7 +1301,7 @@ pmd_t *__pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
goto out;
}
}
pgd_populate(pgd, new);
pgd_populate(mm, pgd, new);
out:
return pmd_offset(pgd, address);
}
......@@ -1318,10 +1318,10 @@ pte_t *pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address)
pte_t *new;
/* "fast" allocation can happen without dropping the lock.. */
new = pte_alloc_one_fast(address);
new = pte_alloc_one_fast(mm, address);
if (!new) {
spin_unlock(&mm->page_table_lock);
new = pte_alloc_one(address);
new = pte_alloc_one(mm, address);
spin_lock(&mm->page_table_lock);
if (!new)
return NULL;
......@@ -1335,7 +1335,7 @@ pte_t *pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address)
goto out;
}
}
pmd_populate(pmd, new);
pmd_populate(mm, pmd, new);
}
out:
return pte_offset(pmd, address);
......
......@@ -204,6 +204,9 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr, unsigned lon
int correct_wcount = 0;
int error;
if (file && (!file->f_op || !file->f_op->mmap))
return -ENODEV;
if ((len = PAGE_ALIGN(len)) == 0)
return addr;
......@@ -245,9 +248,6 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr, unsigned lon
}
if (file) {
if (!file->f_op || !file->f_op->mmap)
return -ENODEV;
switch (flags & MAP_TYPE) {
case MAP_SHARED:
if ((prot & PROT_WRITE) && !(file->f_mode & FMODE_WRITE))
......
......@@ -7,16 +7,14 @@
#
# Note 2! The CFLAGS definition is now in the main makefile...
include ../../.config
O_TARGET := atm.o
O_TARGET= atm.o
export-objs := common.o atm_misc.o raw.o resources.o ipcommon.o proc.o
export-objs = common.o atm_misc.o raw.o resources.o ipcommon.o proc.o
list-multi := mpoa.o
mpoa-objs := mpc.o mpoa_caches.o mpoa_proc.o
multi-list = mpoa.o
mpoa-objs = mpc.o mpoa_caches.o mpoa_proc.o
obj-$(CONFIG_ATM) = addr.o pvc.o signaling.o svc.o common.o atm_misc.o raw.o resources.o
obj-$(CONFIG_ATM) := addr.o pvc.o signaling.o svc.o common.o atm_misc.o raw.o resources.o
ifeq ($(CONFIG_ATM_CLIP),y)
obj-y += clip.o
......
......@@ -1542,7 +1542,7 @@ static int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx, stru
ipx_offset = intrfc->if_ipx_offset;
size = sizeof(struct ipxhdr) + len + ipx_offset;
skb = sock_alloc_send_skb(sk, size, noblock, &err);
skb = sock_alloc_send_skb(sk, size, 0, noblock, &err);
if (!skb)
goto out_put;
......@@ -2531,7 +2531,6 @@ static struct proto_ops SOCKOPS_WRAPPED(ipx_dgram_ops) = {
sendmsg: ipx_sendmsg,
recvmsg: ipx_recvmsg,
mmap: sock_no_mmap,
sendpage: sock_no_sendpage,
};
#include <linux/smp_lock.h>
......
......@@ -9,7 +9,7 @@
O_TARGET := ircomm_and_tty.o
multi-objs := ircomm.o ircomm-tty.o
list-multi := ircomm.o ircomm-tty.o
ircomm-objs := ircomm_core.o ircomm_event.o ircomm_lmp.o ircomm_ttp.o
ircomm-tty-objs := ircomm_tty.o ircomm_tty_attach.o ircomm_tty_ioctl.o ircomm_param.o
......
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