From 77adcf737ee6c3473200b6081066369e1b2d19a9 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 23 Nov 2007 15:23:57 -0500 Subject: [PATCH] Linux 2.2.20pre11 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit o Security fixes | Details censored in accordance with the US DMCA o Sparc updates (Dave Miller) o Add escaped usb hot plug config item (Ryan Maple) o Fix eepro10 driver problems (Aris) o Make request_module return match 2.4 (David Woodhouse) o Update SiS900 driver (Hui-Fen Hsu) o Update ver_linux to match 2.4 (Steven Cole) o Final isdn fixups for 2.2 (Kai Germaschewski) o scsi tape fixes from 2.4 (Kai Mäkisara) o Update credits entry (Henrik Storner) o Fix scc driver hang case (Jeroen) o Update credits entry (Dave Jones) o Update FAT documentation (Hirokazu Nomoto) o Small net tweaks (Dave Miller) o Fix cs89xx abuse of skb->len (Kapr Johnik) --- CREDITS | 27 +++--- Documentation/filesystems/fat_cvf.txt | 6 +- Makefile | 2 +- arch/sparc/kernel/head.S | 10 +-- arch/sparc/kernel/signal.c | 39 ++++++++- arch/sparc/kernel/traps.c | 23 +++++- arch/sparc64/kernel/psycho.c | 15 +++- arch/sparc64/kernel/signal32.c | 39 ++++++++- arch/sparc64/kernel/ttable.S | 4 +- drivers/isdn/hisax/asuscom.c | 6 +- drivers/isdn/hisax/config.c | 2 +- drivers/isdn/isdn_net.c | 22 ++--- drivers/isdn/isdn_net.h | 3 +- drivers/isdn/isdn_ppp.c | 1 + drivers/isdn/isdn_tty.c | 14 +++- drivers/isdn/isdn_tty.h | 5 +- drivers/isdn/isdn_ttyfax.c | 6 +- drivers/net/cs89x0.c | 2 +- drivers/net/eepro.c | 114 ++++++++++++-------------- drivers/net/hamradio/scc.c | 2 + drivers/net/sis900.c | 33 +++++--- drivers/net/sis900.h | 5 +- drivers/sbus/audio/cs4215.h | 8 +- drivers/sbus/audio/dbri.c | 8 +- drivers/scsi/st.c | 74 ++++++++++------- drivers/scsi/st.h | 5 ++ drivers/usb/Config.in | 1 + drivers/video/cgfourteenfb.c | 4 +- fs/exec.c | 5 +- fs/namei.c | 23 +++++- include/asm-sparc64/pbm.h | 5 +- include/linux/fs.h | 1 + include/linux/kmod.h | 2 +- include/linux/netlink.h | 2 +- include/linux/quota.h | 2 +- net/ipv4/igmp.c | 4 +- scripts/ver_linux | 8 +- 37 files changed, 346 insertions(+), 186 deletions(-) diff --git a/CREDITS b/CREDITS index 29e1dfc6847b..a175cf0cd552 100644 --- a/CREDITS +++ b/CREDITS @@ -1066,16 +1066,16 @@ S: USA N: Dave Jones E: davej@suse.de -E: dave@powertweak.com -E: djones2@glam.ac.uk -W: http://powertweak.sourceforge.net -D: Userspace PCI bridge tuning (Powertweak). -D: Centaur/IDT Winchip/Winchip 2 tweaks. -D: Misc clean ups and other random hacking. -S: 28 Laura Street, -S: Treforest, Pontypridd, -S: Mid Glamorgan, CF37 1NW, -S: Wales, United Kingdom +W: http://www.suse.de/~davej +D: Moved PCI bridge tuning to userspace (Powertweak). +D: Various x86 (& clones) setup code hacking. +D: Various Janitorial hacks. (kernel-janitor.sourceforge.net) +S: c/o SuSE Linux UK Ltd +S: The Kinetic Centre +S: Theobald Street +S: Borehamwood +S: Herts, WD6 4PJ +S: United Kingdom N: Bernhard Kaindl E: bkaindl@netway.at @@ -2079,14 +2079,13 @@ S: Sunyvale, CA 94086 S: USA N: Henrik Storner -E: storner@image.dk -W: http://www.image.dk/~storner/ +E: henrik@storner.dk W: http://www.sslug.dk/ D: Configure script: Invented tristate for module-configuration D: vfat/msdos integration, kerneld docs, Linux promotion D: Miscellaneous bug-fixes -S: Chr. Winthersvej 1 B, st.th. -S: DK-1860 Frederiksberg C +S: Raunstrupvej 13 +S: DK-2720 Vanloese S: Denmark N: Drew Sullivan diff --git a/Documentation/filesystems/fat_cvf.txt b/Documentation/filesystems/fat_cvf.txt index 9082cbe4e9da..25bbe2d128ab 100644 --- a/Documentation/filesystems/fat_cvf.txt +++ b/Documentation/filesystems/fat_cvf.txt @@ -112,7 +112,7 @@ struct cvf_format int (*mount_cvf) (struct super_block*sb,char*options); int (*unmount_cvf) (struct super_block*sb); [...] - void (*cvf_zero_cluster) (struct inode*inode,int clusternr); + void (*zero_out_cluster) (struct inode*, int clusternr); } This structure defines the capabilities of a CVF module. It must be filled @@ -161,8 +161,8 @@ It contains... functions. NULL means use the original FAT driver functions instead. If you really want "no action", write a function that does nothing and hang it in instead. - - cvf_zero_cluster: - The cvf_zero_cluster function is called when the fat driver wants to + - zero_out_cluster: + The zero_out_cluster function is called when the fat driver wants to zero out a (new) cluster. This is important for directories (mkdir). If it is NULL, the FAT driver defaults to overwriting the whole cluster with zeros. Note that clusternr is absolute, not relative diff --git a/Makefile b/Makefile index 09a0f5995236..eb755f03ab8a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 2 SUBLEVEL = 20 -EXTRAVERSION = pre10 +EXTRAVERSION = pre11 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S index 3c38b6ac87c1..1cebe62a6a35 100644 --- a/arch/sparc/kernel/head.S +++ b/arch/sparc/kernel/head.S @@ -1,4 +1,4 @@ -/* $Id: head.S,v 1.95.2.6 2000/01/21 01:05:39 davem Exp $ +/* $Id: head.S,v 1.95.2.7 2001/08/12 10:56:22 davem Exp $ * head.S: The initial boot code for the Sparc port of Linux. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -157,7 +157,7 @@ t_sunos:SUNOS_SYSCALL_TRAP /* SunOS System Call */ t_sunos:SUNOS_NO_SYSCALL_TRAP /* No SunOS emulation */ #endif t_sbkpt:BREAKPOINT_TRAP /* Software Breakpoint/KGDB */ -t_divz: BAD_TRAP(0x82) /* Divide by zero trap */ +t_divz: TRAP_ENTRY(0x82, do_hw_divzero) /* Divide by zero trap */ t_flwin:TRAP_ENTRY(0x83, do_flush_windows) /* Flush Windows Trap */ t_clwin:BAD_TRAP(0x84) /* Clean Windows Trap */ t_rchk: BAD_TRAP(0x85) /* Range Check */ @@ -246,7 +246,7 @@ C_LABEL(trapbase_cpu1): SUNOS_NO_SYSCALL_TRAP /* No SunOS emulation */ #endif BREAKPOINT_TRAP - BAD_TRAP(0x82) + TRAP_ENTRY(0x82, do_hw_divzero) TRAP_ENTRY(0x83, do_flush_windows) BAD_TRAP(0x84) BAD_TRAP(0x85) BAD_TRAP(0x86) BAD_TRAP(0x87) SOLARIS_SYSCALL_TRAP NETBSD_SYSCALL_TRAP BAD_TRAP(0x8a) BAD_TRAP(0x8b) BAD_TRAP(0x8c) @@ -318,7 +318,7 @@ C_LABEL(trapbase_cpu2): SUNOS_NO_SYSCALL_TRAP /* No SunOS emulation */ #endif BREAKPOINT_TRAP - BAD_TRAP(0x82) + TRAP_ENTRY(0x82, do_hw_divzero) TRAP_ENTRY(0x83, do_flush_windows) BAD_TRAP(0x84) BAD_TRAP(0x85) BAD_TRAP(0x86) BAD_TRAP(0x87) SOLARIS_SYSCALL_TRAP NETBSD_SYSCALL_TRAP BAD_TRAP(0x8a) BAD_TRAP(0x8b) BAD_TRAP(0x8c) @@ -390,7 +390,7 @@ C_LABEL(trapbase_cpu3): SUNOS_NO_SYSCALL_TRAP /* No SunOS emulation */ #endif BREAKPOINT_TRAP - BAD_TRAP(0x82) + TRAP_ENTRY(0x82, do_hw_divzero) TRAP_ENTRY(0x83, do_flush_windows) BAD_TRAP(0x84) BAD_TRAP(0x85) BAD_TRAP(0x86) BAD_TRAP(0x87) SOLARIS_SYSCALL_TRAP NETBSD_SYSCALL_TRAP BAD_TRAP(0x8a) BAD_TRAP(0x8b) BAD_TRAP(0x8c) diff --git a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c index abc934ebd5e4..35b18f56d21c 100644 --- a/arch/sparc/kernel/signal.c +++ b/arch/sparc/kernel/signal.c @@ -1,4 +1,4 @@ -/* $Id: signal.c,v 1.91.2.4 2001/06/19 16:49:41 davem Exp $ +/* $Id: signal.c,v 1.91.2.5 2001/08/12 10:56:22 davem Exp $ * linux/arch/sparc/kernel/signal.c * * Copyright (C) 1991, 1992 Linus Torvalds @@ -659,13 +659,48 @@ new_setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs, switch (signr) { case SIGSEGV: case SIGILL: - case SIGFPE: case SIGBUS: case SIGEMT: info->si_code = current->tss.sig_desc; info->si_addr = (void *)current->tss.sig_address; info->si_trapno = 0; break; + case SIGFPE: + switch (current->tss.sig_desc) { + case SUBSIG_FPDISABLED: + info->si_code = FPE_FLTSUB; + break; + case SUBSIG_FPERROR: + info->si_code = FPE_FLTSUB; + break; + case SUBSIG_FPINTOVFL: + info->si_code = FPE_INTOVF; + break; + case SUBSIG_FPSTSIG: + info->si_code = FPE_FLTSUB; + break; + case SUBSIG_IDIVZERO: + info->si_code = FPE_INTDIV; + break; + case SUBSIG_FPINEXACT: + info->si_code = FPE_FLTRES; + break; + case SUBSIG_FPDIVZERO: + info->si_code = FPE_FLTDIV; + break; + case SUBSIG_FPUNFLOW: + info->si_code = FPE_FLTUND; + break; + case SUBSIG_FPOPERROR: + info->si_code = FPE_FLTINV; + break; + case SUBSIG_FPOVFLOW: + info->si_code = FPE_FLTOVF; + break; + } + info->si_addr = (void *)current->tss.sig_address; + info->si_trapno = 0; + break; default: break; } diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c index b9afa02f795c..c20d974fc088 100644 --- a/arch/sparc/kernel/traps.c +++ b/arch/sparc/kernel/traps.c @@ -1,4 +1,4 @@ -/* $Id: traps.c,v 1.59 1999/03/06 12:07:31 anton Exp $ +/* $Id: traps.c,v 1.59.2.2 2001/08/23 17:36:12 davem Exp $ * arch/sparc/kernel/traps.c * * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) @@ -328,6 +328,18 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc, fpt->tss.sig_address = pc; fpt->tss.sig_desc = SUBSIG_FPERROR; /* as good as any */ + if ((fpt->tss.fsr & 0x1c000) == (1 << 14)) { + if (fpt->tss.fsr & 0x01) + fpt->tss.sig_desc = SUBSIG_FPINEXACT; + else if (fpt->tss.fsr & 0x02) + fpt->tss.sig_desc = SUBSIG_FPDIVZERO; + else if (fpt->tss.fsr & 0x04) + fpt->tss.sig_desc = SUBSIG_FPUNFLOW; + else if (fpt->tss.fsr & 0x08) + fpt->tss.sig_desc = SUBSIG_FPOVFLOW; + else if (fpt->tss.fsr & 0x10) + fpt->tss.sig_desc = SUBSIG_FPINTOVFL; + } #ifdef __SMP__ fpt->flags &= ~PF_USEDFPU; #endif @@ -417,8 +429,15 @@ void handle_cp_exception(struct pt_regs *regs, unsigned long pc, unsigned long n void handle_hw_divzero(struct pt_regs *regs, unsigned long pc, unsigned long npc, unsigned long psr) { +#ifndef __SMP__ + struct task_struct *fpt = last_task_used_math; +#else + struct task_struct *fpt = current; +#endif lock_kernel(); - send_sig(SIGILL, current, 1); + fpt->tss.sig_address = pc; + fpt->tss.sig_desc = SUBSIG_IDIVZERO; + send_sig(SIGFPE, fpt, 1); unlock_kernel(); } diff --git a/arch/sparc64/kernel/psycho.c b/arch/sparc64/kernel/psycho.c index 225dc91a9bef..75eb9de05eed 100644 --- a/arch/sparc64/kernel/psycho.c +++ b/arch/sparc64/kernel/psycho.c @@ -1,4 +1,4 @@ -/* $Id: psycho.c,v 1.85.2.13 2001/06/28 01:31:12 davem Exp $ +/* $Id: psycho.c,v 1.85.2.14 2001/08/12 13:17:25 davem Exp $ * psycho.c: Ultra/AX U2P PCI controller support. * * Copyright (C) 1997 David S. Miller (davem@caipfs.rutgers.edu) @@ -412,6 +412,7 @@ void __init sabre_init(int pnode) pbm = &sabre->pbm_A; pbm->parent = sabre; + pbm->pci_first_slot = 1; pbm->IO_assignments = NULL; pbm->MEM_assignments = NULL; pbm->prom_node = node; @@ -586,10 +587,18 @@ void __init pcibios_init(void) pbm = &psycho->pbm_B; pbm->parent = psycho; + pbm->pci_first_slot = 1; pbm->IO_assignments = NULL; pbm->MEM_assignments = NULL; pbm->prom_node = node; + if (!is_pbm_a) { + prom_getstring(prom_root_node, "name", + namebuf, sizeof(namebuf)); + if (!strcmp(namebuf, "SUNW,Ultra-1-Engine")) + pbm->pci_first_slot = 2; + } + prom_getstring(node, "name", namebuf, sizeof(namebuf)); strcpy(pbm->prom_name, namebuf); @@ -1908,12 +1917,12 @@ static void __init fixup_irq(struct pci_dev *pdev, * ranges. -DaveM */ if(pdev->bus->number == pbm->pci_first_busno) { - slot = (pdev->devfn >> 3) - 1; + slot = (pdev->devfn >> 3) - pbm->pci_first_slot; } else { /* Underneath a bridge, use slot number of parent * bridge. */ - slot = (pdev->bus->self->devfn >> 3) - 1; + slot = (pdev->bus->self->devfn >> 3) - pbm->pci_first_slot; /* Use low slot number bits of child as IRQ line. */ line = (pdev->devfn >> 3) & 0x03; diff --git a/arch/sparc64/kernel/signal32.c b/arch/sparc64/kernel/signal32.c index 5dcaf71159de..7a48cb583f3b 100644 --- a/arch/sparc64/kernel/signal32.c +++ b/arch/sparc64/kernel/signal32.c @@ -1,4 +1,4 @@ -/* $Id: signal32.c,v 1.47.2.5 2001/06/19 16:49:42 davem Exp $ +/* $Id: signal32.c,v 1.47.2.6 2001/08/12 10:56:22 davem Exp $ * arch/sparc64/kernel/signal32.c * * Copyright (C) 1991, 1992 Linus Torvalds @@ -1041,13 +1041,48 @@ static inline void setup_rt_frame32(struct k_sigaction *ka, struct pt_regs *regs switch (signr) { case SIGSEGV: case SIGILL: - case SIGFPE: case SIGBUS: case SIGEMT: info->si_code = current->tss.sig_desc; info->si_addr = (void *)current->tss.sig_address; info->si_trapno = 0; break; + case SIGFPE: + switch (current->tss.sig_desc) { + case SUBSIG_FPDISABLED: + info->si_code = FPE_FLTSUB; + break; + case SUBSIG_FPERROR: + info->si_code = FPE_FLTSUB; + break; + case SUBSIG_FPINTOVFL: + info->si_code = FPE_INTOVF; + break; + case SUBSIG_FPSTSIG: + info->si_code = FPE_FLTSUB; + break; + case SUBSIG_IDIVZERO: + info->si_code = FPE_INTDIV; + break; + case SUBSIG_FPINEXACT: + info->si_code = FPE_FLTRES; + break; + case SUBSIG_FPDIVZERO: + info->si_code = FPE_FLTDIV; + break; + case SUBSIG_FPUNFLOW: + info->si_code = FPE_FLTUND; + break; + case SUBSIG_FPOPERROR: + info->si_code = FPE_FLTINV; + break; + case SUBSIG_FPOVFLOW: + info->si_code = FPE_FLTOVF; + break; + } + info->si_addr = (void *)current->tss.sig_address; + info->si_trapno = 0; + break; default: break; } diff --git a/arch/sparc64/kernel/ttable.S b/arch/sparc64/kernel/ttable.S index 5551b57d9933..2c66c27382cd 100644 --- a/arch/sparc64/kernel/ttable.S +++ b/arch/sparc64/kernel/ttable.S @@ -1,4 +1,4 @@ -/* $Id: ttable.S,v 1.28.2.2 1999/12/01 23:55:44 davem Exp $ +/* $Id: ttable.S,v 1.28.2.3 2001/08/12 10:56:22 davem Exp $ * ttable.S: Sparc V9 Trap Table(s) with SpitFire extensions. * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) @@ -101,7 +101,7 @@ tl0_f6o: FILL_6_OTHER tl0_f7o: FILL_7_OTHER tl0_sunos: SUNOS_SYSCALL_TRAP tl0_bkpt: BREAKPOINT_TRAP -tl0_resv102: BTRAP(0x102) +tl0_divz: TRAP(do_div0) tl0_flushw: FLUSH_WINDOW_TRAP tl0_resv104: BTRAP(0x104) BTRAP(0x105) BTRAP(0x106) BTRAP(0x107) .globl tl0_solaris diff --git a/drivers/isdn/hisax/asuscom.c b/drivers/isdn/hisax/asuscom.c index c14bc94009fb..f92ee9af0017 100644 --- a/drivers/isdn/hisax/asuscom.c +++ b/drivers/isdn/hisax/asuscom.c @@ -1,4 +1,4 @@ -/* $Id: asuscom.c,v 1.11.6.1 2001/02/16 16:43:25 kai Exp $ +/* $Id: asuscom.c,v 1.11.6.2 2001/07/13 09:20:12 kai Exp $ * * asuscom.c low level stuff for ASUSCOM NETWORK INC. ISDNLink cards * @@ -20,7 +20,7 @@ extern const char *CardType[]; -const char *Asuscom_revision = "$Revision: 1.11.6.1 $"; +const char *Asuscom_revision = "$Revision: 1.11.6.2 $"; #define byteout(addr,val) outb(val,addr) #define bytein(addr) inb(addr) @@ -341,7 +341,7 @@ setup_asuscom(struct IsdnCard *card) cs->cardmsg = &Asus_card_msg; val = readreg(cs->hw.asus.cfg_reg + ASUS_IPAC_ALE, cs->hw.asus.cfg_reg + ASUS_IPAC_DATA, IPAC_ID); - if (val == 1) { + if ((val == 1) || (val == 2)) { cs->subtyp = ASUS_IPAC; cs->hw.asus.adr = cs->hw.asus.cfg_reg + ASUS_IPAC_ALE; cs->hw.asus.isac = cs->hw.asus.cfg_reg + ASUS_IPAC_DATA; diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index 9fb88af070b2..09a0afeed8e1 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c @@ -434,7 +434,7 @@ void HiSax_mod_inc_use_count(void) } #ifndef MODULE -static void __init HiSax_setup(char *str, int *ints) +void __init HiSax_setup(char *str, int *ints) { int i, j, argc; argc = ints[0]; diff --git a/drivers/isdn/isdn_net.c b/drivers/isdn/isdn_net.c index 9bb3bf253fec..468041e24ca3 100644 --- a/drivers/isdn/isdn_net.c +++ b/drivers/isdn/isdn_net.c @@ -1,4 +1,4 @@ -/* $Id: isdn_net.c,v 1.140.6.6 2001/06/11 22:08:37 kai Exp $ +/* $Id: isdn_net.c,v 1.140.6.8 2001/08/14 14:04:21 kai Exp $ * Linux ISDN subsystem, network interfaces and related functions (linklevel). * @@ -191,7 +191,7 @@ static int isdn_net_start_xmit(struct sk_buff *, struct device *); static void isdn_net_ciscohdlck_connected(isdn_net_local *lp); static void isdn_net_ciscohdlck_disconnected(isdn_net_local *lp); -char *isdn_net_revision = "$Revision: 1.140.6.6 $"; +char *isdn_net_revision = "$Revision: 1.140.6.8 $"; /* * Code for raw-networking over ISDN @@ -1431,7 +1431,7 @@ isdn_net_ciscohdlck_alloc_skb(isdn_net_local *lp, int len) } /* cisco hdlck device private ioctls */ -static int +int isdn_ciscohdlck_dev_ioctl(struct device *dev, struct ifreq *ifr, int cmd) { isdn_net_local *lp = (isdn_net_local *) dev->priv; @@ -1743,6 +1743,11 @@ isdn_net_ciscohdlck_receive(isdn_net_local *lp, struct sk_buff *skb) case CISCO_TYPE_SLARP: isdn_net_ciscohdlck_slarp_in(lp, skb); goto out_free; + case CISCO_TYPE_CDP: + if (lp->cisco_debserint) + printk(KERN_DEBUG "%s: Received CDP packet. use " + "\"no cdp enable\" on cisco.\n", lp->name); + goto out_free; default: printk(KERN_WARNING "%s: Unknown Cisco type 0x%04x\n", lp->name, type); @@ -2016,17 +2021,8 @@ isdn_net_init(struct device *ndev) { ushort max_hlhdr_len = 0; isdn_net_local *lp = (isdn_net_local *) ndev->priv; - int drvidx, - i; + int drvidx, i; - if (ndev == NULL) { - printk(KERN_WARNING "isdn_net_init: dev = NULL!\n"); - return -ENODEV; - } - if (ndev->priv == NULL) { - printk(KERN_WARNING "isdn_net_init: dev->priv = NULL!\n"); - return -ENODEV; - } ether_setup(ndev); lp->org_hhc = ndev->hard_header_cache; lp->org_hcu = ndev->header_cache_update; diff --git a/drivers/isdn/isdn_net.h b/drivers/isdn/isdn_net.h index a9667abd149e..135fcb099ad4 100644 --- a/drivers/isdn/isdn_net.h +++ b/drivers/isdn/isdn_net.h @@ -1,4 +1,4 @@ -/* $Id: isdn_net.h,v 1.19.6.1 2001/04/20 02:41:58 keil Exp $ +/* $Id: isdn_net.h,v 1.19.6.2 2001/08/14 14:04:21 kai Exp $ * header for Linux ISDN subsystem, network related functions (linklevel). * @@ -36,6 +36,7 @@ #define CISCO_ADDR_UNICAST 0x0f #define CISCO_ADDR_BROADCAST 0x8f #define CISCO_CTRL 0x00 +#define CISCO_TYPE_CDP 0x2000 #define CISCO_TYPE_INET 0x0800 #define CISCO_TYPE_SLARP 0x8035 #define CISCO_SLARP_REPLY 0 diff --git a/drivers/isdn/isdn_ppp.c b/drivers/isdn/isdn_ppp.c index 547379f518ee..1d4749157b22 100644 --- a/drivers/isdn/isdn_ppp.c +++ b/drivers/isdn/isdn_ppp.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "isdn_common.h" diff --git a/drivers/isdn/isdn_tty.c b/drivers/isdn/isdn_tty.c index df3645e9d8d6..9d2dfeabf96d 100644 --- a/drivers/isdn/isdn_tty.c +++ b/drivers/isdn/isdn_tty.c @@ -1,4 +1,4 @@ -/* $Id: isdn_tty.c,v 1.94.6.3 2001/07/03 14:48:25 kai Exp $ +/* $Id: isdn_tty.c,v 1.94.6.5 2001/08/14 14:12:18 kai Exp $ * Linux ISDN subsystem, tty functions and AT-command emulator (linklevel). * @@ -66,7 +66,7 @@ static int bit2si[8] = static int si2bit[8] = {4, 1, 4, 4, 4, 4, 4, 4}; -char *isdn_tty_revision = "$Revision: 1.94.6.3 $"; +char *isdn_tty_revision = "$Revision: 1.94.6.5 $"; /* isdn_tty_try_read() is called from within isdn_tty_rcv_skb() @@ -1182,8 +1182,6 @@ isdn_tty_write(struct tty_struct *tty, int from_user, const u_char * buf, int co if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_write")) return 0; - if (!tty) - return 0; if (from_user) down(&info->write_sem); /* See isdn_tty_senddown() */ @@ -2711,6 +2709,10 @@ isdn_tty_modem_result(int code, modem_info * info) if (!(m->mdmreg[REG_CIDONCE] & BIT_CIDONCE)) { isdn_tty_at_cout("\r\nCALLER NUMBER: ", info); isdn_tty_at_cout(dev->num[info->drv_index], info); + if (m->mdmreg[REG_CDN] & BIT_CDN) { + isdn_tty_at_cout("\r\nCALLED NUMBER: ", info); + isdn_tty_at_cout(info->emu.cpn, info); + } } } isdn_tty_at_cout("\r\n", info); @@ -2736,6 +2738,10 @@ isdn_tty_modem_result(int code, modem_info * info) isdn_tty_at_cout("\r\n", info); isdn_tty_at_cout("CALLER NUMBER: ", info); isdn_tty_at_cout(dev->num[info->drv_index], info); + if (m->mdmreg[REG_CDN] & BIT_CDN) { + isdn_tty_at_cout("\r\nCALLED NUMBER: ", info); + isdn_tty_at_cout(info->emu.cpn, info); + } } break; case RESULT_NO_CARRIER: diff --git a/drivers/isdn/isdn_tty.h b/drivers/isdn/isdn_tty.h index 4553cf5687b2..e2ce92c38d18 100644 --- a/drivers/isdn/isdn_tty.h +++ b/drivers/isdn/isdn_tty.h @@ -1,4 +1,4 @@ -/* $Id: isdn_tty.h,v 1.22 2000/06/21 09:54:29 keil Exp $ +/* $Id: isdn_tty.h,v 1.22.6.1 2001/08/14 14:12:18 kai Exp $ * header for Linux ISDN subsystem, tty related functions (linklevel). * @@ -85,7 +85,10 @@ #define REG_CPN 23 #define BIT_CPN 1 +#define REG_CPNFCON 23 #define BIT_CPNFCON 2 +#define REG_CDN 23 +#define BIT_CDN 4 /* defines for result codes */ #define RESULT_OK 0 diff --git a/drivers/isdn/isdn_ttyfax.c b/drivers/isdn/isdn_ttyfax.c index 8899ce5a9a4c..0e6b9a35908f 100644 --- a/drivers/isdn/isdn_ttyfax.c +++ b/drivers/isdn/isdn_ttyfax.c @@ -1,4 +1,4 @@ -/* $Id: isdn_ttyfax.c,v 1.7 2000/05/11 22:29:21 kai Exp $ +/* $Id: isdn_ttyfax.c,v 1.7.6.1 2001/08/14 14:12:18 kai Exp $ * Linux ISDN subsystem, tty_fax AT-command emulator (linklevel). * @@ -33,7 +33,7 @@ #include "isdn_ttyfax.h" -static char *isdn_tty_fax_revision = "$Revision: 1.7 $"; +static char *isdn_tty_fax_revision = "$Revision: 1.7.6.1 $"; #define PARSE_ERROR1 { isdn_tty_fax_modem_result(1, info); return 1; } @@ -86,7 +86,7 @@ isdn_tty_fax_modem_result(int code, modem_info * info) break; case 2: /* +FCON */ /* Append CPN, if enabled */ - if ((m->mdmreg[REG_CPN] & BIT_CPNFCON) && + if ((m->mdmreg[REG_CPNFCON] & BIT_CPNFCON) && (!(dev->usage[info->isdn_channel] & ISDN_USAGE_OUTGOING))) { sprintf(rs, "/%s", m->cpn); isdn_tty_at_cout(rs, info); diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index c1612939fc33..785faee664a0 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c @@ -904,7 +904,7 @@ net_rx(struct device *dev) lp->stats.rx_dropped++; return; } - skb->len = length; + skb_put(skb, length); skb->dev = dev; insw(ioaddr + RX_FRAME_PORT, skb->data, length >> 1); diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c index 2c9ca0f5ae3d..1167dda7925e 100644 --- a/drivers/net/eepro.c +++ b/drivers/net/eepro.c @@ -23,6 +23,8 @@ This is a compatibility hardware problem. Versions: + 0.12d tottaly isolated old code to new code (blue cards). + (aris, 12/27/2000) 0.12c fixed other multiple cards bug and other cleanups (aris, 08/21/2000) 0.12b added reset when the tx interrupt is called and TX isn't done @@ -103,7 +105,7 @@ */ static const char *version = - "eepro.c: v0.12b 06/20/2000 aris@conectiva.com.br\n"; + "eepro.c: v0.12d 12/27/2000 aris@conectiva.com.br\n"; #include @@ -149,47 +151,28 @@ static const char *version = #include #include - #include -/* For linux 2.1.xx */ -#if defined (LINUX_VERSION_CODE) && LINUX_VERSION_CODE > 0x20155 - #include #include #include -#define compat_dev_kfree_skb( skb, mode ) dev_kfree_skb( (skb) ) /* I had reports of looong delays with SLOW_DOWN defined as udelay(2) */ #define SLOW_DOWN inb(0x80) -/* udelay(2) */ -#define compat_init_func(X) __initfunc(X) -#define compat_init_data __initdata - -#else -/* for 2.x */ - -#define compat_dev_kfree_skb( skb, mode ) dev_kfree_skb( (skb), (mode) ) -#define test_and_set_bit(a,b) set_bit((a),(b)) -#define SLOW_DOWN SLOW_DOWN_IO -#define compat_init_func(X) X -#define compat_init_data - -#endif - -/* First, a few definitions that the brave might change. */ -/* A zero-terminated list of I/O addresses to be probed. */ -static unsigned int eepro_portlist[] compat_init_data = +/* First, a few definitions that the brave might change. + * A zero-terminated list of I/O addresses to be probed. + * note: 0x300 is default, the 595FX supports ALL IO Ports + * from 0x000 to 0x3F0, some of which are reserved in PCs + */ +static unsigned eepro_portlist[] __initdata = { 0x300, 0x210, 0x240, 0x280, 0x2C0, 0x200, 0x320, 0x340, 0x360, 0}; -/* note: 0x300 is default, the 595FX supports ALL IO Ports - from 0x000 to 0x3F0, some of which are reserved in PCs */ /* use 0 for production, 1 for verification, >2 for debug */ #ifndef NET_DEBUG #define NET_DEBUG 0 #endif -static unsigned int net_debug = NET_DEBUG; +static unsigned net_debug = NET_DEBUG; /* The number of low I/O ports used by the ethercard. */ #define EEPRO_IO_EXTENT 16 @@ -204,16 +187,17 @@ static unsigned int net_debug = NET_DEBUG; struct eepro_local { struct enet_statistics stats; unsigned rx_start; - unsigned tx_start; /* start of the transmit chain */ - int tx_last; /* pointer to last packet in the transmit chain */ - unsigned tx_end; /* end of the transmit chain (plus 1) */ - int eepro; /* 1 for the EtherExpress Pro/10, - 2 for the EtherExpress Pro/10+, - 0 for other 82595-based lan cards. */ - int version; /* a flag to indicate if this is a TX or FX - version of the 82595 chip. */ + unsigned tx_start; /* start of the transmit chain */ + int tx_last; /* pointer to last packet in the transmit chain */ + unsigned tx_end; /* end of the transmit chain (plus 1) */ + int eepro; /* 1 for the EtherExpress Pro/10, + * 2 for the EtherExpress Pro/10+, + * 3 for the blue cards, + * 0 for other 82595-based lan cards. */ + int version; /* a flag to indicate if this is a TX or FX + * version of the 82595 chip. */ int stepping; - spinlock_t lock; /* Serializing lock */ + spinlock_t lock; /* Serializing lock */ unsigned rcv_ram; unsigned rcv_start; unsigned xmt_bar; @@ -322,7 +306,7 @@ static struct enet_statistics *eepro_get_stats(struct device *dev); static void set_multicast_list(struct device *dev); static int read_eeprom(int ioaddr, int location, struct device *dev); -static void hardware_send_packet(struct device *dev, void *buf, short length); +static int hardware_send_packet(struct device *dev, void *buf, short length); static int eepro_grab_irq(struct device *dev); /* @@ -518,8 +502,10 @@ buffer (transmit-buffer = 32K - receive-buffer). /* set diagnose flag */ #define eepro_diag(ioaddr) outb(DIAGNOSE_CMD, ioaddr) +#ifdef ANSWER_TX_AND_RX /* ack for rx/tx int */ #define eepro_ack_rxtx(ioaddr) outb (RX_INT | TX_INT, ioaddr + STATUS_REG) +#endif /* ack for rx int */ #define eepro_ack_rx(ioaddr) outb (RX_INT, ioaddr + STATUS_REG) @@ -548,14 +534,7 @@ buffer (transmit-buffer = 32K - receive-buffer). If dev->base_addr == 2, allocate space for the device and return success (detachable devices only). */ -#ifdef HAVE_DEVLIST - /* Support for an alternate probe manager, which will eliminate the - boilerplate below. */ -struct netdev_entry netcard_drv = - {"eepro", eepro_probe1, EEPRO_IO_EXTENT, eepro_portlist}; -#else -compat_init_func(int eepro_probe(struct device *dev)) -{ +__initfunc(int eepro_probe(struct device *dev)) { int i; int base_addr = dev ? dev->base_addr : 0; if (base_addr > 0x1ff) /* Check a single specified location. */ @@ -575,7 +554,6 @@ compat_init_func(int eepro_probe(struct device *dev)) return ENODEV; } -#endif static void printEEPROMInfo(short ioaddr, struct device *dev) { @@ -732,6 +710,7 @@ int eepro_probe1(struct device *dev, short ioaddr) dev->mem_start = (RCV_LOWER_LIMIT << 8); + /* received mem_end as argument */ if ((dev->mem_end & 0x3f) < 3 || /* RX buffer must be more than 3K */ (dev->mem_end & 0x3f) > 29) /* and less than 29K */ dev->mem_end = (RCV_UPPER_LIMIT << 8); @@ -1055,6 +1034,8 @@ static int eepro_open(struct device *dev) } eepro_sel_reset(ioaddr); + SLOW_DOWN; + SLOW_DOWN; lp->tx_start = lp->tx_end = (XMT_LOWER_LIMIT << 8); lp->tx_last = 0; @@ -1112,19 +1093,16 @@ static int eepro_send_packet(struct sk_buff *skb, struct device *dev) } else { short length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN; unsigned char *buf = skb->data; - int discard = lp->stats.tx_dropped; lp->stats.tx_bytes+=skb->len; - hardware_send_packet(dev, buf, length); - - if (lp->stats.tx_dropped != discard) + if (hardware_send_packet(dev, buf, length)) return 1; dev->trans_start = jiffies; } - compat_dev_kfree_skb (skb, FREE_WRITE); + dev_kfree_skb(skb); /* You might need to clean up and record Tx statistics here. */ /* lp->stats.tx_aborted_errors++; */ @@ -1175,9 +1153,11 @@ eepro_interrupt(int irq, void *dev_id, struct pt_regs * regs) while (((status = inb(ioaddr + STATUS_REG)) & 0x06) && (boguscount--)) { switch (status & (RX_INT | TX_INT)) { +#ifdef ANSWER_TX_AND_RX case (RX_INT | TX_INT): eepro_ack_rxtx(ioaddr); break; +#endif case RX_INT: eepro_ack_rx(ioaddr); break; @@ -1190,6 +1170,9 @@ eepro_interrupt(int irq, void *dev_id, struct pt_regs * regs) /* Get the received packets */ eepro_rx(dev); +#ifndef ANSWER_TX_AND_RX + continue; +#endif } if (status & TX_INT) { if (net_debug > 4) @@ -1385,7 +1368,11 @@ set_multicast_list(struct device *dev) eepro_en_int(ioaddr); } - eepro_complete_selreset(ioaddr); + if (lp->eepro == LAN595FX_10ISA) { + eepro_complete_selreset(ioaddr); + } + else + eepro_en_rx(ioaddr); } /* The horrible routine to read a word from the serial EEPROM. */ @@ -1445,7 +1432,7 @@ read_eeprom(int ioaddr, int location, struct device *dev) return retval; } -static void +static int hardware_send_packet(struct device *dev, void *buf, short length) { struct eepro_local *lp = (struct eepro_local *)dev->priv; @@ -1557,13 +1544,16 @@ hardware_send_packet(struct device *dev, void *buf, short length) if (net_debug > 5) printk(KERN_DEBUG "%s: exiting hardware_send_packet routine.\n", dev->name); - return; - } - dev->tbusy = 1; + return 0; + } + if (lp->eepro == LAN595FX_10ISA) + dev->tbusy = 1; if (net_debug > 5) printk(KERN_DEBUG "%s: exiting hardware_send_packet routine.\n", dev->name); + + return 1; } static void @@ -1681,9 +1671,13 @@ eepro_transmit_interrupt(struct device *dev) xmt_status = inw(ioaddr+IO_PORT); if ((xmt_status & TX_DONE_BIT) == 0) { - udelay(40); - boguscount--; - continue; + if (lp->eepro == LAN595FX_10ISA) { + udelay(40); + boguscount--; + continue; + } + else + break; } @@ -1757,7 +1751,7 @@ eepro_transmit_interrupt(struct device *dev) * interrupt again for tx. in other words: tx timeout what will take * a lot of time to happen, so we'll do a complete selreset. */ - if (!boguscount) + if (!boguscount && lp->eepro == LAN595FX_10ISA) eepro_complete_selreset(ioaddr); } diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index 9343652fbaef..0546df6d257c 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c @@ -104,6 +104,7 @@ flags that aren't... Restarting the DPLL does not help either, it resynchronizes too slow and the first received frame gets lost. + 2001-10-05 Set skb to NULL when it is freed in scc_spint. (PE1RXQ) Thanks to all who contributed to this driver with ideas and bug reports! @@ -618,6 +619,7 @@ static inline void scc_spint(struct scc_channel *scc) if (skb != NULL) kfree_skb(skb); scc->rx_buff = NULL; + skb=NULL; /* prevent reuse of skb */ } if(status & END_FR && skb != NULL) /* end of frame */ diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index bea93d1d1b27..0f21abe54ec1 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c @@ -1,6 +1,6 @@ /* sis900.c: A SiS 900/7016 PCI Fast Ethernet driver for Linux. Copyright 1999 Silicon Integrated System Corporation - Revision: 1.06.08 Apr. 3 2001 + Revision: 1.06.09 Sep. 28 2001 Modified from the driver which is originally written by Donald Becker. @@ -18,6 +18,7 @@ preliminary Rev. 1.0 Jan. 18, 1998 http://www.sis.com.tw/support/databook.htm + Rev 1.06.09 Sep. 28 2001 Hui-Fen Hsu (hfhsu@sis.com.tw) update for 630ET & workaround for ICS1893 PHY Rev 1.06.08 Mar. 2 2001 Hui-Fen Hsu (hfhsu@sis.com.tw) some bug fix & 635M/B support Rev 1.06.07 Jan. 8 2001 Lei-Chun Chang added RTL8201 PHY support Rev 1.06.06 Sep. 6 2000 Lei-Chun Chang added ICS1893 PHY support @@ -54,7 +55,7 @@ #include "sis900.h" static const char *version = -"sis900.c: v1.06.08 04/03/2001\n"; +"sis900.c: v1.06.09 09/28/2001\n"; static int max_interrupt_work = 20; static int multicast_filter_limit = 128; @@ -353,7 +354,11 @@ static struct device * sis900_mac_probe (struct mac_chip_info * mac, struct pci_ printk("%2.2x:", (u8)net_dev->dev_addr[i]); printk("%2.2x.\n", net_dev->dev_addr[i]); - /* probe for mii transciver */ + /* 630ET : set the mii access mode as software-mode */ + if (revision == SIS630ET_900_REV) + outl(ACCESSMODE | inl(ioaddr + cr), ioaddr + cr); + + /* probe for mii transceiver */ if (sis900_mii_probe(net_dev) == 0) { unregister_netdev(net_dev); kfree(sis_priv); @@ -444,6 +449,11 @@ static int sis900_mii_probe (struct device * net_dev) if( (sis_priv->mii->phy_id0 == 0x001D) && ( (sis_priv->mii->phy_id1&0xFFF0) == 0x8000) ) status = sis900_reset_phy( net_dev, sis_priv->cur_phy ); + + /* workaround for ICS1893 PHY */ + if ((sis_priv->mii->phy_id0 == 0x0015) && + ((sis_priv->mii->phy_id1&0xFFF0) == 0xF440)) + mdio_write(net_dev, sis_priv->cur_phy, 0x0018, 0xD200); if( status & MII_STAT_LINK ){ while (poll_bit) { @@ -730,7 +740,7 @@ sis900_open(struct device *net_dev) /* Enable all known interrupts by setting the interrupt mask. */ outl((RxSOVR|RxORN|RxERR|RxOK|TxURN|TxERR|TxIDLE), ioaddr + imr); - outl(RxENA, ioaddr + cr); + outl(RxENA | inl(ioaddr + cr), ioaddr + cr); outl(IE, ioaddr + ier); sis900_check_mode(net_dev, sis_priv->mii); @@ -886,7 +896,7 @@ static void sis630_set_eq(struct device *net_dev, u8 revision) struct pci_dev *dev=NULL; if ( !(revision == SIS630E_900_REV || revision == SIS630EA1_900_REV || - revision == SIS630A_900_REV) ) + revision == SIS630A_900_REV || revision == SIS630ET_900_REV) ) return; if ((dev = pci_find_device(SIS630_VENDOR_ID, SIS630_DEVICE_ID, dev))) @@ -903,7 +913,8 @@ static void sis630_set_eq(struct device *net_dev, u8 revision) min_value=(eq_value < min_value) ? eq_value : min_value; } /* 630E rule to determine the equalizer value */ - if (revision == SIS630E_900_REV || revision == SIS630EA1_900_REV) { + if (revision == SIS630E_900_REV || revision == SIS630EA1_900_REV || + revision == SIS630ET_900_REV) { if (max_value < 5) eq_value=max_value; else if (max_value >= 5 && max_value < 15) @@ -1141,7 +1152,7 @@ static void sis900_tx_timeout(struct device *net_dev) net_dev->tbusy = sis_priv->tx_full = 0; /* FIXME: Should we restart the transmission thread here ?? */ - outl(TxENA, ioaddr + cr); + outl(TxENA | inl(ioaddr + cr), ioaddr + cr); /* Enable all known interrupts by setting the interrupt mask. */ outl((RxSOVR|RxORN|RxERR|RxOK|TxURN|TxERR|TxIDLE), ioaddr + imr); @@ -1169,7 +1180,7 @@ sis900_start_xmit(struct sk_buff *skb, struct device *net_dev) /* set the transmit buffer descriptor and enable Transmit State Machine */ sis_priv->tx_ring[entry].bufptr = virt_to_bus(skb->data); sis_priv->tx_ring[entry].cmdsts = (OWN | skb->len); - outl(TxENA, ioaddr + cr); + outl(TxENA | inl(ioaddr + cr), ioaddr + cr); if (++sis_priv->cur_tx - sis_priv->dirty_tx < NUM_TX_DESC) { /* Typical path, clear tbusy to indicate more @@ -1376,7 +1387,7 @@ static int sis900_rx(struct device *net_dev) } /* re-enable the potentially idle receive state matchine */ - outl(RxENA , ioaddr + cr ); + outl(RxENA | inl(ioaddr + cr), ioaddr + cr ); return 0; } @@ -1454,7 +1465,7 @@ sis900_close(struct device *net_dev) outl(0x0000, ioaddr + ier); /* Stop the chip's Tx and Rx Status Machine */ - outl(RxDIS | TxDIS, ioaddr + cr); + outl(RxDIS | TxDIS | inl(ioaddr + cr), ioaddr + cr); del_timer(&sis_priv->timer); @@ -1621,7 +1632,7 @@ static void sis900_reset(struct device *net_dev) outl(0, ioaddr + imr); outl(0, ioaddr + rfcr); - outl(RxRESET | TxRESET | RESET, ioaddr + cr); + outl(RxRESET | TxRESET | RESET | inl(ioaddr + cr), ioaddr + cr); /* Check that the chip has finished the reset. */ while (status && (i++ < 1000)) { diff --git a/drivers/net/sis900.h b/drivers/net/sis900.h index 29129c838f39..12e41ee0ba85 100644 --- a/drivers/net/sis900.h +++ b/drivers/net/sis900.h @@ -38,7 +38,7 @@ enum sis900_registers { /* Symbolic names for bits in various registers */ enum sis900_command_register_bits { - RELOAD = 0x00000400, + RELOAD = 0x00000400, ACCESSMODE = 0x00000200,/* ET */ RESET = 0x00000100, SWI = 0x00000080, RxRESET = 0x00000020, TxRESET = 0x00000010, RxDIS = 0x00000008, RxENA = 0x00000004, TxDIS = 0x00000002, TxENA = 0x00000001 @@ -236,7 +236,8 @@ enum mii_stssum_register_bits { enum sis900_revision_id { SIS630A_900_REV = 0x80, SIS630E_900_REV = 0x81, SIS630S_900_REV = 0x82, SIS630EA1_900_REV = 0x83, - SIS635A_900_REV = 0x90, SIS900B_900_REV = 0x03 + SIS630ET_900_REV = 0x84, SIS635A_900_REV = 0x90, + SIS900B_900_REV = 0x03 }; enum sis630_revision_id { diff --git a/drivers/sbus/audio/cs4215.h b/drivers/sbus/audio/cs4215.h index e148279ee6e6..73185f7ddd82 100644 --- a/drivers/sbus/audio/cs4215.h +++ b/drivers/sbus/audio/cs4215.h @@ -31,6 +31,7 @@ struct cs4215 { #define CS4215_MLB (1<<4) /* 1: Microphone: 20dB gain disabled */ #define CS4215_RSRVD_1 (1<<5) +#define CS4215_STATUS_MASK 0xe4 /* Status bits */ /* Time Slot 2, Data Format Register */ #define CS4215_DFR_LINEAR16 0 @@ -45,7 +46,7 @@ static struct { } CS4215_FREQ[] = { { 8000, (1<<4), (0<<3) }, { 16000, (1<<4), (1<<3) }, - { 27429, (1<<4), (2<<3) }, /* Actually 24428.57 */ + { 27429, (1<<4), (2<<3) }, /* Actually 27428.57 */ { 32000, (1<<4), (3<<3) }, /* { NA, (1<<4), (4<<3) }, */ /* { NA, (1<<4), (5<<3) }, */ @@ -63,7 +64,8 @@ static struct { }; #define CS4215_HPF (1<<7) /* High Pass Filter, 1: Enabled */ -#define CS4215_12_MASK 0xfcbf /* Mask off reserved bits in slot 1 & 2 */ +#define CS4215_FREQ_MASK 0x38 /* Frequency selection bits */ +#define CS4215_12_MASK 0xfcbf /* Mask off reserved bits in slot 1 & 2 */ /* Time Slot 3, Serial Port Control register */ #define CS4215_XEN (1<<0) /* 0: Enable serial output */ @@ -77,6 +79,8 @@ static struct { #define CS4215_MCK_CLK1 (3<<4) /* Clockin, 256 x Fs */ #define CS4215_MCK_CLK2 (4<<4) /* Clockin, see DFR */ +#define CS4215_CLOCK_MASK 0x70 /* Clock source selection bits */ + /* Time Slot 4, Test Register */ #define CS4215_DAD (1<<0) /* 0:Digital-Dig loop, 1:Dig-Analog-Dig loop */ #define CS4215_ENL (1<<1) /* Enable Loopback Testing */ diff --git a/drivers/sbus/audio/dbri.c b/drivers/sbus/audio/dbri.c index 5f4fb45c7012..49d244c3d5db 100644 --- a/drivers/sbus/audio/dbri.c +++ b/drivers/sbus/audio/dbri.c @@ -1490,7 +1490,7 @@ static int mmcodec_setctrl(struct dbri *dbri) */ i = 64; - while (((dbri->mm.status & 0xe4) != 0x20) && --i) udelay(125); + while (((dbri->mm.status & CS4215_STATUS_MASK) != CS4215_RSRVD_1) && --i) udelay(125); if (i == 0) { return 0; } @@ -1914,9 +1914,9 @@ static int dbri_set_output_rate(struct sparcaudio_driver *drv, int rate) return -1; } - dbri->mm.ctrl[1] &= ~ 0x38; + dbri->mm.ctrl[1] &= ~ CS4215_FREQ_MASK; dbri->mm.ctrl[1] |= CS4215_FREQ[i].csval; - dbri->mm.ctrl[2] &= ~ 0x70; + dbri->mm.ctrl[2] &= ~ CS4215_CLOCK_MASK; dbri->mm.ctrl[2] |= CS4215_FREQ[i].xtal; dbri->perchip_info.play.sample_rate = rate; @@ -2443,7 +2443,7 @@ static int dbri_attach(struct sparcaudio_driver *drv, printk(KERN_INFO "audio%d at 0x%lx (irq %d) is DBRI(%c)+CS4215(%d)\n", num_drivers, (unsigned long)dbri->regs, - dbri->irq, dbri->dbri_version, dbri->mm.version); + dbri->irq, dbri->dbri_version, dbri->mm.version & CS4215_VERSION_MASK); return 0; } diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index e18fa719ebb8..72aa49a07de0 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -8,10 +8,10 @@ order) Klaus Ehrenfried, Wolfgang Denk, Steve Hirsch, Andreas Koppenh"ofer, Michael Leodolter, Eyal Lebedinsky, J"org Weule, and Eric Youngdale. - Copyright 1992 - 2000 Kai Makisara + Copyright 1992 - 2001 Kai Makisara email Kai.Makisara@metla.fi - Last modified: Tue Sep 5 23:17:08 2000 by makisara@kai.makisara.local + Last modified: Wed Sep 12 09:16:22 2001 by makisara@abies.metla.fi Some small formal changes - aeb, 950809 */ @@ -59,9 +59,13 @@ #ifdef MODULE MODULE_PARM(buffer_kbs, "i"); +MODULE_PARM_DESC(buffer_kbs, "Default driver buffer size (KB; 32)"); MODULE_PARM(write_threshold_kbs, "i"); +MODULE_PARM_DESC(write_threshold_kbs, "Asynchronous write threshold (KB; 30)"); MODULE_PARM(max_buffers, "i"); +MODULE_PARM_DESC(max_buffers, "Maximum number of buffer allocated at initialisation (4)"); MODULE_PARM(max_sg_segs, "i"); +MODULE_PARM_DESC(max_sg_segs, "Maximum number of scatter/gather segments to use (32)"); static int buffer_kbs = 0; static int write_threshold_kbs = 0; static int max_buffers = 0; @@ -225,38 +229,33 @@ st_sleep_done (Scsi_Cmnd * SCpnt) int remainder; Scsi_Tape * STp; - if ((st_nbr = TAPE_NR(SCpnt->request.rq_dev)) < st_template.nr_dev) { - STp = &(scsi_tapes[st_nbr]); - if ((STp->buffer)->writing && - (SCpnt->sense_buffer[0] & 0x70) == 0x70 && - (SCpnt->sense_buffer[2] & 0x40)) { - /* EOM at write-behind, has all been written? */ - if ((SCpnt->sense_buffer[0] & 0x80) != 0) - remainder = (SCpnt->sense_buffer[3] << 24) | + st_nbr = TAPE_NR(SCpnt->request.rq_dev); + STp = &(scsi_tapes[st_nbr]); + if ((STp->buffer)->writing && + (SCpnt->sense_buffer[0] & 0x70) == 0x70 && + (SCpnt->sense_buffer[2] & 0x40)) { + /* EOM at write-behind, has all been written? */ + if ((SCpnt->sense_buffer[0] & 0x80) != 0) + remainder = (SCpnt->sense_buffer[3] << 24) | (SCpnt->sense_buffer[4] << 16) | - (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; - else - remainder = 0; - if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW || - remainder > 0) - (STp->buffer)->last_result = SCpnt->result; /* Error */ - else - (STp->buffer)->last_result = INT_MAX; /* OK */ - } + (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; else - (STp->buffer)->last_result = SCpnt->result; - SCpnt->request.rq_status = RQ_SCSI_DONE; - (STp->buffer)->last_SCpnt = SCpnt; - -#if DEBUG - STp->write_pending = 0; -#endif - up(SCpnt->request.sem); + remainder = 0; + if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW || + remainder > 0) + (STp->buffer)->last_result = SCpnt->result; /* Error */ + else + (STp->buffer)->last_result = INT_MAX; /* OK */ } + else + (STp->buffer)->last_result = SCpnt->result; + SCpnt->request.rq_status = RQ_SCSI_DONE; + (STp->buffer)->last_SCpnt = SCpnt; + #if DEBUG - else if (debugging) - printk(KERN_ERR "st?: Illegal interrupt device %x\n", st_nbr); + STp->write_pending = 0; #endif + up(SCpnt->request.sem); } @@ -2324,6 +2323,8 @@ st_int_ioctl(struct inode * inode, return (-EINVAL); } cmd[0] = MODE_SELECT; + if ((STp->use_pf & USE_PF)) + cmd[1] = 0x10; cmd[4] = datalen = 12; memset((STp->buffer)->b_data, 0, 12); @@ -2502,6 +2503,20 @@ st_int_ioctl(struct inode * inode, STps->drv_block = (-1); STps->eof = ST_EOD; } + else if (cmd_in == MTSETBLK || + cmd_in == MTSETDENSITY || + cmd_in == MTSETDRVBUFFER || + cmd_in == SET_DENS_AND_BLK) { + if ((SCpnt->sense_buffer[2] & 0x0f) == ILLEGAL_REQUEST && + !(STp->use_pf & PF_TESTED)) { + /* Try the other possible state of Page Format if not + already tried */ + STp->use_pf = !STp->use_pf | PF_TESTED; + scsi_release_command(SCpnt); + SCpnt = NULL; + return st_int_ioctl(inode, cmd_in, arg); + } + } else if (chg_eof) STps->eof = ST_NOEOF; @@ -3467,6 +3482,7 @@ static int st_attach(Scsi_Device * SDp){ tpnt->in_use = 0; tpnt->drv_buffer = 1; /* Try buffering if no mode sense */ tpnt->restr_dma = (SDp->host)->unchecked_isa_dma; + tpnt->use_pf = (SDp->scsi_level >= SCSI_2); tpnt->density = 0; tpnt->do_auto_lock = ST_AUTO_LOCK; tpnt->can_bsr = ST_IN_FILE_POS; diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h index 2a033a8eefd6..25845530b528 100644 --- a/drivers/scsi/st.h +++ b/drivers/scsi/st.h @@ -79,6 +79,7 @@ typedef struct { unsigned char restr_dma; unsigned char scsi2_logical; unsigned char default_drvbuffer; /* 0xff = don't touch, value 3 bits */ + unsigned char use_pf; /* Set Page Format bit in all mode selects? */ int write_threshold; int timeout; /* timeout for normal commands */ int long_timeout; /* timeout for commands known to take long time*/ @@ -119,6 +120,10 @@ typedef struct { #endif } Scsi_Tape; +/* Bit masks for use_pf */ +#define USE_PF 1 +#define PF_TESTED 2 + extern Scsi_Tape * scsi_tapes; /* Values of eof */ diff --git a/drivers/usb/Config.in b/drivers/usb/Config.in index b8489d13ca64..d31159320000 100644 --- a/drivers/usb/Config.in +++ b/drivers/usb/Config.in @@ -10,6 +10,7 @@ if [ ! "$CONFIG_USB" = "n" ]; then comment 'Miscellaneous USB options' bool ' Preliminary USB device filesystem' CONFIG_USB_DEVICEFS + bool ' Support for hot-pluggable USB devices' CONFIG_HOTPLUG if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then bool ' Enforce USB bandwidth allocation (EXPERIMENTAL)' CONFIG_USB_BANDWIDTH else diff --git a/drivers/video/cgfourteenfb.c b/drivers/video/cgfourteenfb.c index 949dc3bbfed2..9c4b1c2bd18d 100644 --- a/drivers/video/cgfourteenfb.c +++ b/drivers/video/cgfourteenfb.c @@ -1,4 +1,4 @@ -/* $Id: cgfourteenfb.c,v 1.4.2.1 1999/09/28 15:59:58 davem Exp $ +/* $Id: cgfourteenfb.c,v 1.4.2.2 2001/07/27 09:44:41 davem Exp $ * cgfourteenfb.c: CGfourteen frame buffer driver * * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) @@ -234,6 +234,8 @@ static void cg14_setcursor (struct fb_info_sbusfb *fb) spin_lock_irqsave(&fb->lock, flags); if (c->enable) cur->ccr |= CG14_CCR_ENABLE; + else + cur->ccr &= ~CG14_CCR_ENABLE; cur->cursx = ((c->cpos.fbx - c->chot.fbx) & 0xfff); cur->cursy = ((c->cpos.fby - c->chot.fby) & 0xfff); spin_unlock_irqrestore(&fb->lock, flags); diff --git a/fs/exec.c b/fs/exec.c index 5a81ac0e608a..3f58b8d2b37d 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -568,12 +568,11 @@ flush_failed: } /* - * We mustn't allow tracing of suid binaries, unless - * the tracer has the capability to trace anything.. + * We mustn't allow tracing of suid binaries, no matter what. */ static inline int must_not_trace_exec(struct task_struct * p) { - return (p->ptrace & PT_PTRACED) && !cap_raised(p->p_pptr->cap_effective, CAP_SYS_PTRACE); + return (p->ptrace & PT_PTRACED); } /* diff --git a/fs/namei.c b/fs/namei.c index 0f47c4e74c7b..b4baad3e8b83 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -277,6 +277,15 @@ static struct dentry * real_lookup(struct dentry * parent, struct qstr * name, i result->d_op->d_revalidate(result, flags); return result; } +/* + * Yes, this really increments the link_count by 5, and + * decrements it by 4. Together with checking against 25, + * this limits recursive symlink follows to 5, while + * limiting consecutive symlinks to 25. + * + * Without that kind of total limit, nasty chains of consecutive + * symlinks can cause almost arbitrarily long lookups. + */ static struct dentry * do_follow_link(struct dentry *base, struct dentry *dentry, unsigned int follow) { @@ -284,13 +293,17 @@ static struct dentry * do_follow_link(struct dentry *base, struct dentry *dentry if ((follow & LOOKUP_FOLLOW) && inode && inode->i_op && inode->i_op->follow_link) { - if (current->link_count < 5) { + if (current->link_count < 25) { struct dentry * result; - current->link_count++; + if (current->need_resched) { + current->state = TASK_RUNNING; + schedule(); + } + current->link_count += 5; /* This eats the base */ - result = inode->i_op->follow_link(dentry, base, follow); - current->link_count--; + result = inode->i_op->follow_link(dentry, base, follow|LOOKUP_INSYMLINK); + current->link_count -= 4; dput(dentry); return result; } @@ -324,6 +337,8 @@ struct dentry * lookup_dentry(const char * name, struct dentry * base, unsigned struct dentry * dentry; struct inode *inode; + if (!(lookup_flags & LOOKUP_INSYMLINK)) + current->link_count=0; if (*name == '/') { if (base) dput(base); diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h index 4a7e155e090f..6a15b30aae3c 100644 --- a/include/asm-sparc64/pbm.h +++ b/include/asm-sparc64/pbm.h @@ -1,4 +1,4 @@ -/* $Id: pbm.h,v 1.16.2.2 2001/05/16 07:28:43 davem Exp $ +/* $Id: pbm.h,v 1.16.2.3 2001/08/12 13:17:25 davem Exp $ * pbm.h: U2P PCI bus module pseudo driver software state. * * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) @@ -50,6 +50,9 @@ struct linux_pbm_info { int num_pbm_intmap; struct linux_prom_pci_intmask pbm_intmask; + /* PCI slot mapping. */ + unsigned int pci_first_slot; + /* Now things for the actual PCI bus probes. */ unsigned int pci_first_busno; unsigned int pci_last_busno; diff --git a/include/linux/fs.h b/include/linux/fs.h index b7a722c93cdc..ba3dafc44dc5 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -872,6 +872,7 @@ extern ino_t find_inode_number(struct dentry *, struct qstr *); #define LOOKUP_DIRECTORY (2) #define LOOKUP_SLASHOK (4) #define LOOKUP_CONTINUE (8) +#define LOOKUP_INSYMLINK (16) extern struct dentry * lookup_dentry(const char *, struct dentry *, unsigned int); extern struct dentry * __namei(const char *, unsigned int); diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 591df6dab584..da1489af69fb 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h @@ -15,7 +15,7 @@ extern char hotplug_path[]; static inline int request_module(const char *name) { - return -EINVAL; + return -ENOSYS; } static inline int exec_usermodehelper(char *program_path, char *argv[], char *envp[]) { diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 59075b0709e1..031d612e4b66 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -33,7 +33,7 @@ struct nlmsghdr #define NLM_F_REQUEST 1 /* It is request message. */ #define NLM_F_MULTI 2 /* Multipart message, terminated by NLMSG_DONE */ -#define NLM_F_ACK 4 /* If succeed, reply with ack */ +#define NLM_F_ACK 4 /* Reply with ack, with zero or error code */ #define NLM_F_ECHO 8 /* Echo this request */ /* Modifiers to GET request */ diff --git a/include/linux/quota.h b/include/linux/quota.h index 2c4a5bcef2b6..0ee7d6776f76 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -155,7 +155,7 @@ struct dqstats { * Maximum length of a message generated in the quota system, * that needs to be kicked onto the tty. */ -#define MAX_QUOTA_MESSAGE 75 +#define MAX_QUOTA_MESSAGE (PAGE_SIZE + 256) #define DQ_LOCKED 0x01 /* locked for update */ #define DQ_WANT 0x02 /* wanted for update */ diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 1a49c6339237..c26ddd0ec063 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -8,7 +8,7 @@ * the older version didn't come out right using gcc 2.5.8, the newer one * seems to fall out with gcc 2.6.2. * - * Version: $Id: igmp.c,v 1.30.2.2 2001/01/10 10:04:07 davem Exp $ + * Version: $Id: igmp.c,v 1.30.2.3 2001/07/27 09:35:49 davem Exp $ * * Authors: * Alan Cox @@ -109,7 +109,7 @@ #define IGMP_Unsolicited_Report_Count 2 -#define IGMP_Initial_Report_Delay (1*HZ) +#define IGMP_Initial_Report_Delay (1) /* IGMP_Initial_Report_Delay is not from IGMP specs! * IGMP specs require to report membership immediately after diff --git a/scripts/ver_linux b/scripts/ver_linux index 8bc8096dede1..fa151baf940a 100644 --- a/scripts/ver_linux +++ b/scripts/ver_linux @@ -26,7 +26,7 @@ mount --version | awk -F\- '{print "mount ", $NF}' insmod -V 2>&1 | awk 'NR==1 {print "modutils ",$NF}' -tune2fs 2>&1 | grep tune2fs | sed 's/,//' | awk \ +tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' | awk \ 'NR==1 {print "e2fsprogs ", $2}' reiserfsck 2>&1 | grep reiserfsprogs | awk \ @@ -66,5 +66,7 @@ loadkeys -V 2>&1 | awk \ expr --v 2>&1 | awk 'NR==1{print "Sh-utils ", $NF}' -X=`cat /proc/modules | sed -e "s/ .*$//"` -echo "Modules Loaded "$X +if [ -e /proc/modules ]; then + X=`cat /proc/modules | sed -e "s/ .*$//"` + echo "Modules Loaded "$X +fi -- 2.39.5