From a224067086db72e4c794708c01988e5f3a6a3c84 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 23 Nov 2007 15:22:54 -0500 Subject: [PATCH] Linux 2.2.18pre25 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit o Fix tight loop spinning reporting out of free (Marcelo Tosatti) pages o Back out ppa changes causing problems for a (Tim Waugh) few users o Set master enable on UHCI USB controllers (Erik Mouw) o RIO DCD fixes (Patrick van de Lageweg) o 3c59x.c support for 3c556B (Andrew Morton) o S390 cleanups for loopsperjiffy etc (Kurt Roeckx) o Fix acceleport 4 SMP hangs (Al Borchers) o Fix drivers/char/Makefile buglet (Chip Salzenberg) o PPC syscall table fix (Chip Salzenberg) o Move HID sysctl to avoid clash in 2.4 case (Tom Rini) o Small symbios check condition fix (Gérard Roudier) o Fix Makefile module version check (Eric Lammerts) o Fix DRM build on Sparc (Dave Miller) o Work around Dallas D4201 PCM8 audio bug (Thomas Sailer) o Fix USB memory leak (Dan Streetman) o Fix ioremap fencepost error (Chip Salzenberg) --- CREDITS | 1 + Documentation/Configure.help | 3 ++ Documentation/usb/usb-serial.txt | 3 ++ MAINTAINERS | 2 +- Makefile | 4 +- arch/i386/kernel/dmi_scan.c | 20 ++++++---- arch/i386/mm/ioremap.c | 2 +- arch/ppc/kernel/misc.S | 4 +- arch/s390/kernel/s390mach.c | 10 ----- arch/s390/kernel/setup.c | 4 +- drivers/char/Makefile | 9 +---- drivers/char/drm/drmP.h | 2 - drivers/char/generic_serial.c | 8 +++- drivers/char/rio/rio_linux.c | 44 ++++++++++++++++---- drivers/char/rio/rio_linux.h | 2 +- drivers/char/rio/riocmd.c | 16 +++++--- drivers/char/rio/riotty.c | 4 +- drivers/net/3c59x.c | 9 ++++- drivers/s390/net/ctc.c | 2 - drivers/scsi/ppa.c | 17 +++++--- drivers/scsi/ppa.h | 10 +---- drivers/scsi/sym53c8xx.c | 4 +- drivers/usb/Config.in | 2 +- drivers/usb/audio.c | 8 ++++ drivers/usb/devio.c | 16 ++++++-- drivers/usb/serial/digi_acceleport.c | 60 ++++++++++++++++++++++------ drivers/usb/uhci.c | 2 + drivers/usb/usb-uhci.c | 2 + i815.patch | 11 ----- include/asm-s390/irq.h | 2 +- include/asm-s390/processor.h | 2 +- include/linux/sysctl.h | 2 +- kernel/ksyms.c | 2 +- mm/filemap.c | 4 +- 34 files changed, 186 insertions(+), 107 deletions(-) delete mode 100644 i815.patch diff --git a/CREDITS b/CREDITS index ca3834d7f5c6..2d790eb15ffb 100644 --- a/CREDITS +++ b/CREDITS @@ -276,6 +276,7 @@ D: Linux CD and Support Giveaway List N: Al Borchers E: alborchers@steinerpoint.com D: Author/maintainer of Digi AccelePort USB driver +D: work on usbserial and keyspan_pda drivers S: 4912 Zenith Ave. S. S: Minneapolis, MN 55410 S: USA diff --git a/Documentation/Configure.help b/Documentation/Configure.help index 042c3726d85c..3f86c6f47b12 100644 --- a/Documentation/Configure.help +++ b/Documentation/Configure.help @@ -7846,6 +7846,9 @@ CONFIG_USB_SERIAL_DIGI_ACCELEPORT parallel port on the USB 2 appears as a third serial port on Linux. The Digi Acceleport USB 8 is not yet supported by this driver. + This driver works under SMP with the usb-uhci driver. It does not + work under SMP with the uhci driver. + This code is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module will be called digi_acceleport.o. If you want to compile diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt index a6efeefa57d1..1be7b76b59e7 100644 --- a/Documentation/usb/usb-serial.txt +++ b/Documentation/usb/usb-serial.txt @@ -139,6 +139,9 @@ Digi AccelePort Driver (plus a parallel port) and 4 port USB serial converters. The driver does NOT yet support the Digi AccelePort USB 8. + This driver works under SMP with the usb-uhci driver. It does not work + under SMP with the uhci driver. + The driver is generally working, though we still have a few more ioctls to implement and final testing and debugging to do. The paralled port on the USB 2 is supported as a serial to parallel converter; in other diff --git a/MAINTAINERS b/MAINTAINERS index 6b3c7eabe4d5..6f62f8af930e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1044,7 +1044,7 @@ M: pberger@brimson.com M: alborchers@steinerpoint.com L: linux-usb-users@lists.sourceforge.net L: linux-usb-devel@lists.sourceforge.net -S: Supported +S: Maintained USB SERIAL KEYSPAN DRIVER P: Hugh Blemings diff --git a/Makefile b/Makefile index cacde83e6e79..21b8c725f1ae 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 2 SUBLEVEL = 18 -EXTRAVERSION = pre24 +EXTRAVERSION = pre25 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) @@ -335,7 +335,7 @@ modules_install: MODLIB=$(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE); \ mkdir -p $$MODLIB; \ rm -f $$MODLIB/build; \ - [ `/sbin/insmod -V 2>&1 | head -1 | awk '/^insmod version /{split("$3", a, /\./); printf "%d%03d%03d\n", a[1], a[2], a[3];}'`0 -ge 20030140 ] && \ + [ `/sbin/insmod -V 2>&1 | head -1 | awk '/^insmod version /{split($$3, a, /\./); printf "%d%03d%03d\n", a[1], a[2], a[3];}'`0 -ge 20030140 ] && \ ln -s `pwd` $$MODLIB/build; \ cd modules; \ MODULES=""; \ diff --git a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c index 27b52e6215b0..b5133d827bc3 100644 --- a/arch/i386/kernel/dmi_scan.c +++ b/arch/i386/kernel/dmi_scan.c @@ -28,20 +28,23 @@ static char * __init dmi_string(struct dmi_header *dm, u8 s) static int __init dmi_table(u32 base, int len, int num, void (*decode)(struct dmi_header *)) { - char *buf; + u8 *buf; struct dmi_header *dm; u8 *data; int i=1; - + int last = 0; buf = ioremap(base, len); if(buf==NULL) return -1; data = buf; - while(itype < last) + break; + last = dm->type; decode(dm); data+=dm->length; while(*data || data[1]) @@ -69,7 +72,7 @@ int __init dmi_iterate(void (*decode)(struct dmi_header *)) u16 num=buf[13]<<8|buf[12]; u16 len=buf[7]<<8|buf[6]; u32 base=buf[11]<<24|buf[10]<<16|buf[9]<<8|buf[8]; - +#ifdef DUMP_DMI printk(KERN_INFO "DMI %d.%d present.\n", buf[14]>>4, buf[14]&0x0F); printk(KERN_INFO "%d structures occupying %d bytes.\n", @@ -77,6 +80,7 @@ int __init dmi_iterate(void (*decode)(struct dmi_header *)) buf[7]<<8|buf[6]); printk(KERN_INFO "DMI table at 0x%08X.\n", buf[11]<<24|buf[10]<<16|buf[9]<<8|buf[8]); +#endif if(dmi_table(base,len, num, decode)==0) return 0; } @@ -98,9 +102,9 @@ static void __init dmi_decode(struct dmi_header *dm) switch(dm->type) { - case 0: + case 0: +#ifdef DUMP_DMI p=dmi_string(dm,data[4]); - if(*p && *p!=' ') { printk("BIOS Vendor: %s\n", p); @@ -109,7 +113,7 @@ static void __init dmi_decode(struct dmi_header *dm) printk("BIOS Release: %s\n", dmi_string(dm, data[8])); } - +#endif /* * Check for clue free BIOS implementations who use * the following QA technique @@ -134,6 +138,7 @@ static void __init dmi_decode(struct dmi_header *dm) #endif } break; +#ifdef DUMP_DMI case 1: p=dmi_string(dm,data[4]); @@ -165,6 +170,7 @@ static void __init dmi_decode(struct dmi_header *dm) if(*p && *p!=' ') printk("Asset Tag: %s.\n", p); break; +#endif } } diff --git a/arch/i386/mm/ioremap.c b/arch/i386/mm/ioremap.c index 549e724ce169..6207cfed1370 100644 --- a/arch/i386/mm/ioremap.c +++ b/arch/i386/mm/ioremap.c @@ -117,7 +117,7 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag temp_addr = __va(phys_addr); temp_end = temp_addr + (size - 1); - for(i = MAP_NR(temp_addr); i < MAP_NR(temp_end); i++) { + for(i = MAP_NR(temp_addr); i <= MAP_NR(temp_end); i++) { if(!PageReserved(mem_map + i)) return NULL; } diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S index 72fe9c71996f..a0b6dde2d804 100644 --- a/arch/ppc/kernel/misc.S +++ b/arch/ppc/kernel/misc.S @@ -1062,4 +1062,6 @@ sys_call_table: .long sys_pciconfig_write /* 199 */ .long sys_pciconfig_iobase /* 200 */ .long sys_ni_syscall /* 201 - reserved - MacOnLinux - new */ - .space (NR_syscalls-201)*4 + .rept NR_syscalls-201 + .long sys_ni_syscall + .endr diff --git a/arch/s390/kernel/s390mach.c b/arch/s390/kernel/s390mach.c index a055fc59f8fb..b45d23d99dd0 100644 --- a/arch/s390/kernel/s390mach.c +++ b/arch/s390/kernel/s390mach.c @@ -38,16 +38,6 @@ static crwe_t *crw_buffer_anchor = NULL; static spinlock_t mchchk_queue_lock = SPIN_LOCK_UNLOCKED; static spinlock_t crw_queue_lock = SPIN_LOCK_UNLOCKED; -static inline void init_MUTEX (struct semaphore *sem) -{ - sema_init(sem, 1); -} - -static inline void init_MUTEX_LOCKED (struct semaphore *sem) -{ - sema_init(sem, 0); -} - /* * s390_init_machine_check * diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 5b362dc83223..ec0eff9e4bfa 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -332,8 +332,8 @@ int get_cpuinfo(char * buffer) p += sprintf(p,"vendor_id : IBM/S390\n" "# processors : %i\n" "bogomips per cpu: %lu.%02lu\n", - smp_num_cpus, loops_per_sec/500000, - (loops_per_sec/5000)%100); + smp_num_cpus, loops_per_jiffy/(500000/HZ), + (loops_per_jiffy/(5000/HZ)) % 100); for (i = 0; i < smp_num_cpus; i++) { cpuinfo = &safe_get_cpu_lowcore(i).cpu_data; p += sprintf(p,"processor %i: " diff --git a/drivers/char/Makefile b/drivers/char/Makefile index 79fa5398f38b..e3572c36d207 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile @@ -11,7 +11,7 @@ SUB_DIRS := MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) rio ftape joystick +ALL_SUB_DIRS := $(SUB_DIRS) rio ftape hfmodem joystick agp drm # # This file contains the font map for the default (hardware) font @@ -377,23 +377,19 @@ endif ifeq ($(CONFIG_AGP),y) O_OBJS += agp/agp.o -ALL_SUB_DIRS += agp SUB_DIRS += agp else ifeq ($(CONFIG_AGP),m) - ALL_SUB_DIRS += agp MOD_SUB_DIRS += agp endif endif ifeq ($(CONFIG_DRM),y) O_OBJS += drm/drm.o -ALL_SUB_DIRS += drm MOD_SUB_DIRS += drm SUB_DIRS += drm else ifeq ($(CONFIG_DRM),m) - ALL_SUB_DIRS += drm MOD_SUB_DIRS += drm endif endif @@ -664,15 +660,12 @@ endif ifeq ($(CONFIG_HFMODEM),y) -ALL_SUB_DIRS += hfmodem SUB_DIRS += hfmodem O_OBJS += hfmodem/hfmodem.o else ifeq ($(CONFIG_HFMODEM),m) - ALL_SUB_DIRS += hfmodem MOD_SUB_DIRS += hfmodem endif - endif ifeq ($(CONFIG_DZ),y) diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 22624e4f704f..21a26a33a76b 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h @@ -52,9 +52,7 @@ #include #include /* For (un)lock_kernel */ #include -#ifdef __alpha__ #include /* For pte_wrprotect */ -#endif #include #include #include diff --git a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c index 3df261a6a028..c24e212f9d25 100644 --- a/drivers/char/generic_serial.c +++ b/drivers/char/generic_serial.c @@ -29,7 +29,7 @@ #include #include -#define DEBUG +#define DEBUG 1 static char * tmp_buf; static DECLARE_MUTEX(tmp_buf_sem); @@ -575,7 +575,7 @@ void gs_hangup(struct tty_struct *tty) port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE |GS_ACTIVE); port->tty = NULL; port->count = 0; - + port->event = 0; wake_up_interruptible(&port->open_wait); func_exit (); } @@ -750,9 +750,13 @@ void gs_close(struct tty_struct * tty, struct file * filp) if (!port) return; if (!port->tty) { + port->rd->hungup (port); + return; +#if 0 /* This seems to happen when this is called from vhangup. */ gs_dprintk (GS_DEBUG_CLOSE, "gs: Odd: port->tty is NULL\n"); port->tty = tty; +#endif } save_flags(flags); cli(); diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c index 9ebb920da21f..478bd81693a6 100644 --- a/drivers/char/rio/rio_linux.c +++ b/drivers/char/rio/rio_linux.c @@ -165,7 +165,7 @@ RIOConf = /* startuptime */ HZ*2, /* how long to wait for card to run */ /* slowcook */ 0, /* TRUE -> always use line disc. */ /* intrpolltime */ 1, /* The frequency of OUR polls */ - /* breakinterval */ 25, /* x10 mS */ + /* breakinterval */ 25, /* x10 mS XXX: units seem to be 1ms not 10! -- REW*/ /* timer */ 10, /* mS */ /* RtaLoadBase */ 0x7000, /* HostLoadBase */ 0x7C00, @@ -205,11 +205,11 @@ static int rio_fw_open(struct inode *inode, struct file *filp); static INT rio_fw_release(struct inode *inode, struct file *filp); static int rio_init_drivers(void); +int RIOShortCommand(struct rio_info *p, struct Port *PortP, + int command, int len, int arg); void my_hd (void *addr, int len); - - static struct tty_driver rio_driver, rio_callout_driver; static struct tty_driver rio_driver2, rio_callout_driver2; @@ -458,7 +458,6 @@ static void rio_interrupt (int irq, void *ptr, struct pt_regs *regs) func_enter (); HostP = (struct Host*)ptr; /* &p->RIOHosts[(long)ptr]; */ - rio_dprintk (RIO_DEBUG_IFLOW, "rio: enter rio_interrupt (%d/%d)\n", irq, HostP->Ivec); @@ -519,8 +518,8 @@ static void rio_interrupt (int irq, void *ptr, struct pt_regs *regs) RIOServiceHost(p, HostP, irq); - rio_dprintk ( RIO_DEBUG_IFLOW, "riointr() doing host %d type %d\n", - (int) ptr, HostP->Type); + rio_dprintk ( RIO_DEBUG_IFLOW, "riointr() doing host %p type %d\n", + ptr, HostP->Type); clear_bit (RIO_BOARD_INTR_LOCK, &HostP->locks); rio_dprintk (RIO_DEBUG_IFLOW, "rio: exit rio_interrupt (%d/%d)\n", @@ -627,8 +626,12 @@ static int rio_chars_in_buffer (void * ptr) /* Nothing special here... */ static void rio_shutdown_port (void * ptr) { + struct Port *PortP; + func_enter(); + PortP = (struct Port *)ptr; + PortP->gs.tty = NULL; #if 0 port->gs.flags &= ~ GS_ACTIVE; if (!port->gs.tty) { @@ -706,9 +709,8 @@ static void rio_close (void *ptr) PortP->gs.count = 0; } - + PortP->gs.tty = NULL; rio_dec_mod_count (); - func_exit (); } @@ -756,11 +758,37 @@ static int rio_ioctl (struct tty_struct * tty, struct file * filp, (ival ? CLOCAL : 0); } break; + case TIOCGSERIAL: if ((rc = verify_area(VERIFY_WRITE, (void *) arg, sizeof(struct serial_struct))) == 0) gs_getserial(&PortP->gs, (struct serial_struct *) arg); break; + case TCSBRK: + if ( PortP->State & RIO_DELETED ) { + rio_dprintk (RIO_DEBUG_TTY, "BREAK on deleted RTA\n"); + rc = -EIO; + } else { + if (RIOShortCommand(p, PortP, SBREAK, 2, 250) == RIO_FAIL) { + rio_dprintk (RIO_DEBUG_INTR, "SBREAK RIOShortCommand failed\n"); + rc = -EIO; + } + } + break; + case TCSBRKP: + if ( PortP->State & RIO_DELETED ) { + rio_dprintk (RIO_DEBUG_TTY, "BREAK on deleted RTA\n"); + rc = -EIO; + } else { + int l; + l = arg?arg*100:250; + if (l > 255) l = 255; + if (RIOShortCommand(p, PortP, SBREAK, 2, arg?arg*100:250) == RIO_FAIL) { + rio_dprintk (RIO_DEBUG_INTR, "SBREAK RIOShortCommand failed\n"); + rc = -EIO; + } + } + break; case TIOCSSERIAL: if ((rc = verify_area(VERIFY_READ, (void *) arg, sizeof(struct serial_struct))) == 0) diff --git a/drivers/char/rio/rio_linux.h b/drivers/char/rio/rio_linux.h index d0605f913f3c..ba3cd1dfdf64 100644 --- a/drivers/char/rio/rio_linux.h +++ b/drivers/char/rio/rio_linux.h @@ -165,7 +165,7 @@ static inline void *rio_memcpy_fromio (void *dest, void *source, int n) #define rio_memcpy_fromio memcpy_fromio #endif -#define DEBUG +#define DEBUG 1 /* diff --git a/drivers/char/rio/riocmd.c b/drivers/char/rio/riocmd.c index b96865694d2a..53e770acf33c 100644 --- a/drivers/char/rio/riocmd.c +++ b/drivers/char/rio/riocmd.c @@ -536,7 +536,7 @@ PKT *PacketP; PortP->ModemState, ReportedModemStatus); PortP->ModemState = ReportedModemStatus; #ifdef MODEM_SUPPORT - if ( PortP->Mapped ) { + if ( PortP->Mapped && (PortP->PortState & PORT_ISOPEN) && !(PortP->PortState & RIO_CLOSING)) { /***********************************************************\ ************************************************************* *** *** @@ -548,12 +548,15 @@ PKT *PacketP; ** If the device is a modem, then check the modem ** carrier. */ + if (PortP->gs.tty == NULL) break; - - if (!(PortP->gs.tty->termios->c_cflag & CLOCAL) && - ((PortP->State & (RIO_MOPEN|RIO_WOPEN)))) { + if (PortP->gs.tty->termios == NULL) + break; + + if (!(PortP->gs.tty->termios->c_cflag & CLOCAL) && + ((PortP->State & (RIO_MOPEN|RIO_WOPEN)))) { rio_dprintk (RIO_DEBUG_CMD, "Is there a Carrier?\n"); /* ** Is there a carrier? @@ -579,8 +582,9 @@ PKT *PacketP; ** Has carrier just dropped? */ if (PortP->State & RIO_CARR_ON) { - if (PortP->State & (PORT_ISOPEN|RIO_WOPEN|RIO_MOPEN)) - tty_hangup (PortP->gs.tty); + if (PortP->State & (PORT_ISOPEN|RIO_WOPEN|RIO_MOPEN)) + tty_hangup (PortP->gs.tty); + PortP->State &= ~RIO_CARR_ON; rio_dprintk (RIO_DEBUG_CMD, "Carrirer just went down\n"); #ifdef STATS diff --git a/drivers/char/rio/riotty.c b/drivers/char/rio/riotty.c index 2ff09394d89f..699ecfcd1b70 100644 --- a/drivers/char/rio/riotty.c +++ b/drivers/char/rio/riotty.c @@ -95,7 +95,7 @@ static void ttyseth_pv(struct Port *, struct ttystatics *, #endif static void RIOClearUp(struct Port *PortP); -static int RIOShortCommand(struct rio_info *p, struct Port *PortP, +int RIOShortCommand(struct rio_info *p, struct Port *PortP, int command, int len, int arg); @@ -793,7 +793,7 @@ struct Port *PortP; ** Other values of len aren't allowed, and will cause ** a panic. */ -static int RIOShortCommand(struct rio_info *p, struct Port *PortP, +int RIOShortCommand(struct rio_info *p, struct Port *PortP, int command, int len, int arg) { PKT *PacketP; diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 603e125d70f4..d5dd7d7715a8 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c @@ -60,11 +60,14 @@ - In vortex_open(), set vp->tx_full to zero (else we get errors if the device was closed with a full Tx ring). + 15Sep00 <2.2.18-pre3> andrewm + - Added support for the 3c556B Laptop Hurricane (Louis Gerbarg) + - See http://www.uow.edu.au/~andrewm/linux/#3c59x-2.2 for more details. */ static char version[] = -"3c59x.c 16Aug00 Donald Becker and others http://www.scyld.com/network/vortex.html\n"; +"3c59x.c 15Sep00 Donald Becker and others http://www.scyld.com/network/vortex.html\n"; /* "Knobs" that adjust features and parameters. */ /* Set the copy breakpoint for the copy-only-tiny-frames scheme. @@ -336,6 +339,8 @@ static struct pci_id_info pci_tbl[] = { PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE, 128, vortex_probe1}, {"3c556 10/100 Mini PCI Adapter", 0x10B7, 0x6055, 0xffff, PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_CB_FNS, 128, vortex_probe1}, + {"3c556B Laptop Hurricane", 0x10B7, 0x6056, 0xffff, + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_CB_FNS, 128, vortex_probe1}, {"3c575 Boomerang CardBus", 0x10B7, 0x5057, 0xffff, PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII, 64, vortex_probe1}, {"3CCFE575 Cyclone CardBus", 0x10B7, 0x5157, 0xffff, @@ -932,6 +937,8 @@ static struct device *vortex_probe1(int pci_bus, int pci_devfn, #else if (pci_tbl[chip_idx].device_id == 0x6055) { outw(0x230 + i, ioaddr + Wn0EepromCmd); + } else if (pci_tbl[chip_idx].device_id == 0x6056) { + outw(EEPROM_Read + 0x30 + i, ioaddr + Wn0EepromCmd); } else { outw(EEPROM_Read + i, ioaddr + Wn0EepromCmd); } diff --git a/drivers/s390/net/ctc.c b/drivers/s390/net/ctc.c index 9a828e262169..20ea4fe7b77e 100644 --- a/drivers/s390/net/ctc.c +++ b/drivers/s390/net/ctc.c @@ -276,8 +276,6 @@ static int ctc_no_auto = 0; typedef struct net_device net_device; #else typedef struct device net_device; -typedef struct wait_queue* wait_queue_head_t; -#define init_waitqueue_head(nothing) #endif struct adapterlist{ diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c index 62dad99ad885..bc1f50a8ffab 100644 --- a/drivers/scsi/ppa.c +++ b/drivers/scsi/ppa.c @@ -299,11 +299,12 @@ static unsigned char ppa_wait(int host_no) unsigned char r; k = PPA_SPIN_TMO; - /* Wait for bit 6 and 7 - PJC */ - for (r = r_str (ppb); ((r & 0xc0)!=0xc0) && (k); k--) { - udelay (1); - r = r_str (ppb); + do { + r = r_str(ppb); + k--; + udelay(1); } + while (!(r & 0x80) && (k)); /* * return some status information. @@ -652,7 +653,11 @@ static int ppa_completion(Scsi_Cmnd * cmd) (v == WRITE_6) || (v == WRITE_10)); - r = ppa_wait(host_no); /* Need a ppa_wait() - PJC */ + /* + * We only get here if the drive is ready to communicate, + * hence no need for a full ppa_wait. + */ + r = (r_str(ppb) & 0xf0); while (r != (unsigned char) 0xf0) { /* @@ -690,7 +695,7 @@ static int ppa_completion(Scsi_Cmnd * cmd) } } /* Now check to see if the drive is ready to comunicate */ - r = ppa_wait(host_no); /* need ppa_wait() - PJC */ + r = (r_str(ppb) & 0xf0); /* If not, drop back down to the scheduler and wait a timer tick */ if (!(r & 0x80)) return 0; diff --git a/drivers/scsi/ppa.h b/drivers/scsi/ppa.h index fb2997df6ac9..618cf518a3e3 100644 --- a/drivers/scsi/ppa.h +++ b/drivers/scsi/ppa.h @@ -10,7 +10,7 @@ #ifndef _PPA_H #define _PPA_H -#define PPA_VERSION "2.05 (for Linux 2.2.x)" +#define PPA_VERSION "2.03 (for Linux 2.2.x)" /* * this driver has been hacked by Matteo Frigo (athena@theory.lcs.mit.edu) @@ -51,13 +51,6 @@ * CONFIG_SCSI_PPA_HAVE_PEDANTIC => CONFIG_SCSI_IZIP_EPP16 * added CONFIG_SCSI_IZIP_SLOW_CTR option * [2.03] - * - * Use ppa_wait() to check for ready AND connected status bits - * Add ppa_wait() calls to ppa_completion() - * by Peter Cherriman and - * Tim Waugh - * [2.04] - * Fix kernel panic on scsi timeout, 2000-08-18 [2.05] */ /* ------ END OF USER CONFIGURABLE PARAMETERS ----- */ @@ -173,7 +166,6 @@ int ppa_biosparam(Disk *, kdev_t, int *); eh_device_reset_handler: NULL, \ eh_bus_reset_handler: ppa_reset, \ eh_host_reset_handler: ppa_reset, \ - use_new_eh_code: 1, \ bios_param: ppa_biosparam, \ this_id: -1, \ sg_tablesize: SG_ALL, \ diff --git a/drivers/scsi/sym53c8xx.c b/drivers/scsi/sym53c8xx.c index 45c806823fff..8a8f21e49cff 100644 --- a/drivers/scsi/sym53c8xx.c +++ b/drivers/scsi/sym53c8xx.c @@ -1930,8 +1930,8 @@ struct ccb { ** a SDTR or WDTR message is appended. **---------------------------------------------------------------- */ - u_char scsi_smsg [8]; - u_char scsi_smsg2[8]; + u_char scsi_smsg [12]; + u_char scsi_smsg2[12]; /*---------------------------------------------------------------- ** Miscellaneous status'. diff --git a/drivers/usb/Config.in b/drivers/usb/Config.in index a6e46f600c00..66ae3b852dd3 100644 --- a/drivers/usb/Config.in +++ b/drivers/usb/Config.in @@ -35,6 +35,7 @@ comment 'USB Devices' if [ "$CONFIG_USB_SERIAL" != "n" ]; then bool ' USB Generic Serial Driver' CONFIG_USB_SERIAL_GENERIC $CONFIG_USB_SERIAL dep_tristate ' USB Handspring Visor Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL + dep_tristate ' USB Digi International AccelePort USB Serial Driver' CONFIG_USB_SERIAL_DIGI_ACCELEPORT $CONFIG_USB_SERIAL if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then dep_tristate ' USB ConnectTech WhiteHEAT Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_WHITEHEAT $CONFIG_USB_SERIAL dep_tristate ' USB FTDI Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL @@ -47,7 +48,6 @@ comment 'USB Devices' bool ' USB Keyspan USA-18X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA18X bool ' USB Keyspan USA-19W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19W fi - dep_tristate ' USB Digi International AccelePort USB Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_DIGI_ACCELEPORT $CONFIG_USB_SERIAL dep_tristate ' USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_OMNINET $CONFIG_USB_SERIAL dep_tristate ' USB Belkin and Peracom Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_BELKIN $CONFIG_USB_SERIAL fi diff --git a/drivers/usb/audio.c b/drivers/usb/audio.c index db94db197746..96ff9ecc70bf 100644 --- a/drivers/usb/audio.c +++ b/drivers/usb/audio.c @@ -89,6 +89,9 @@ * Somewhat peculiar due to OSS interface limitations. Only works * for channels where a "slider" is already in front of it (i.e. * a MIXER unit or a FEATURE unit with volume capability). + * 2000-11-26: Thomas Sailer + * Workaround for Dallas DS4201. The DS4201 uses PCM8 as format tag for + * its 8 bit modes, but expects signed data (and should therefore have used PCM). * */ @@ -1559,6 +1562,7 @@ static int set_format_in(struct usb_audiodev *as) dev->devnum, u->interface, fmt->altsetting, d->srate, data[0] | (data[1] << 8) | (data[2] << 16))); d->srate = data[0] | (data[1] << 8) | (data[2] << 16); } + dprintk((KERN_DEBUG "usbaudio: set_format_in: USB format 0x%x, DMA format 0x%x srate %u\n", u->format, d->format, d->srate)); return 0; } @@ -1655,6 +1659,7 @@ static int set_format_out(struct usb_audiodev *as) dev->devnum, u->interface, fmt->altsetting, d->srate, data[0] | (data[1] << 8) | (data[2] << 16))); d->srate = data[0] | (data[1] << 8) | (data[2] << 16); } + dprintk((KERN_DEBUG "usbaudio: set_format_out: USB format 0x%x, DMA format 0x%x srate %u\n", u->format, d->format, d->srate)); return 0; } @@ -2867,6 +2872,9 @@ static void usb_audio_parsestreaming(struct usb_audio_state *s, unsigned char *b continue; } format = (fmt[5] == 2) ? (AFMT_U16_LE | AFMT_U8) : (AFMT_S16_LE | AFMT_S8); + /* Dallas DS4201 workaround */ + if (dev->descriptor.idVendor == 0x04fa && dev->descriptor.idProduct == 0x4201) + format = (AFMT_S16_LE | AFMT_S8); fmt = find_csinterface_descriptor(buffer, buflen, NULL, FORMAT_TYPE, asifout, i); if (!fmt) { printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not found\n", diff --git a/drivers/usb/devio.c b/drivers/usb/devio.c index 115ef51e8cd3..719d47deb62f 100644 --- a/drivers/usb/devio.c +++ b/drivers/usb/devio.c @@ -637,13 +637,17 @@ static int proc_control(struct dev_state *ps, void *arg) i = my_usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), ctrl.request, ctrl.requesttype, ctrl.value, ctrl.index, tbuf, ctrl.length, tmo); if ((i > 0) && ctrl.length) { - if (copy_to_user(ctrl.data, tbuf, ctrl.length)) + if (copy_to_user(ctrl.data, tbuf, ctrl.length)) { + free_page((unsigned long)tbuf); return -EFAULT; + } } } else { if (ctrl.length) { - if (copy_from_user(tbuf, ctrl.data, ctrl.length)) + if (copy_from_user(tbuf, ctrl.data, ctrl.length)) { + free_page((unsigned long)tbuf); return -EFAULT; + } } i = my_usb_control_msg(dev, usb_sndctrlpipe(dev, 0), ctrl.request, ctrl.requesttype, ctrl.value, ctrl.index, tbuf, ctrl.length, tmo); @@ -690,13 +694,17 @@ static int proc_bulk(struct dev_state *ps, void *arg) } i = my_usb_bulk_msg(dev, pipe, tbuf, len1, &len2, tmo); if (!i && len2) { - if (copy_to_user(bulk.data, tbuf, len2)) + if (copy_to_user(bulk.data, tbuf, len2)) { + free_page((unsigned long)tbuf); return -EFAULT; + } } } else { if (len1) { - if (copy_from_user(tbuf, bulk.data, len1)) + if (copy_from_user(tbuf, bulk.data, len1)) { + free_page((unsigned long)tbuf); return -EFAULT; + } } i = my_usb_bulk_msg(dev, pipe, tbuf, len1, &len2, tmo); } diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index 8fabc83642e0..5d0ac544ce23 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c @@ -1,5 +1,5 @@ /* -* Digi AccelePort USB-4 Serial Converter +* Digi AccelePort USB-4 and USB-2 Serial Converters * * Copyright 2000 by Digi International * @@ -14,6 +14,17 @@ * Peter Berger (pberger@brimson.com) * Al Borchers (borchers@steinerpoint.com) * +* (11/01/2000) pberger and borchers +* -- Turned off the USB_DISABLE_SPD flag for write bulk urbs--it caused +* USB 4 ports to hang on startup. +* -- Serialized access to write urbs by adding the dp_write_urb_in_use +* flag; otherwise, the driver caused SMP system hangs. Watching the +* urb status is not sufficient. +* +* (10/05/2000) gkh +* -- Fixed bug with urb->dev not being set properly, now that the usb +* core needs it. +* * (8/8/2000) pberger and borchers * -- Fixed close so that * - it can timeout while waiting for transmit idle, if needed; @@ -209,7 +220,7 @@ * - Following Documentation/DocBook/kernel-locking.pdf no spin locks * are held when calling copy_to/from_user or printk. * -* $Id: digi_acceleport.c,v 1.80 2000/08/09 06:36:18 root Exp $ +* $Id: digi_acceleport.c,v 1.80.1.2 2000/11/02 05:45:08 root Exp $ */ #include @@ -407,6 +418,7 @@ typedef struct digi_port { int dp_in_buf_len; unsigned char dp_in_buf[DIGI_IN_BUF_SIZE]; unsigned char dp_in_flag_buf[DIGI_IN_BUF_SIZE]; + int dp_write_urb_in_use; unsigned int dp_modem_signals; wait_queue_head_t dp_modem_change_wait; int dp_open_count; /* inc on open, dec on close */ @@ -592,7 +604,7 @@ static void digi_wakeup_write( struct usb_serial_port *port ) /* wake up other tty processes */ wake_up_interruptible( &tty->write_wait ); - /* For 2.2.16 backport -- wake_up_interruptible( &tty->poll_wait ); */ + wake_up_interruptible( &tty->poll_wait ); /* For 2.2.x backport */ } @@ -625,7 +637,8 @@ dbg( "digi_write_oob_command: TOP: port=%d, count=%d", oob_priv->dp_port_num, co while( count > 0 ) { - while( oob_port->write_urb->status == -EINPROGRESS ) { + while( oob_port->write_urb->status == -EINPROGRESS + || oob_priv->dp_write_urb_in_use ) { cond_wait_interruptible_timeout_irqrestore( &oob_port->write_wait, DIGI_RETRY_TIMEOUT, &oob_priv->dp_port_lock, flags ); @@ -642,8 +655,10 @@ dbg( "digi_write_oob_command: TOP: port=%d, count=%d", oob_priv->dp_port_num, co memcpy( oob_port->write_urb->transfer_buffer, buf, len ); oob_port->write_urb->transfer_buffer_length = len; + oob_port->write_urb->dev = port->serial->dev; if( (ret=usb_submit_urb(oob_port->write_urb)) == 0 ) { + oob_priv->dp_write_urb_in_use = 1; count -= len; buf += len; } @@ -697,8 +712,8 @@ count ); while( count > 0 && ret == 0 ) { - while( port->write_urb->status == -EINPROGRESS - && jiffies < timeout ) { + while( (port->write_urb->status == -EINPROGRESS + || priv->dp_write_urb_in_use) && jiffies < timeout ) { cond_wait_interruptible_timeout_irqrestore( &port->write_wait, DIGI_RETRY_TIMEOUT, &priv->dp_port_lock, flags ); @@ -728,8 +743,10 @@ count ); memcpy( data, buf, len ); port->write_urb->transfer_buffer_length = len; } + port->write_urb->dev = port->serial->dev; if( (ret=usb_submit_urb(port->write_urb)) == 0 ) { + priv->dp_write_urb_in_use = 1; priv->dp_out_buf_len = 0; count -= len; buf += len; @@ -777,7 +794,8 @@ port_priv->dp_port_num, modem_signals ); spin_lock_irqsave( &oob_priv->dp_port_lock, flags ); spin_lock( &port_priv->dp_port_lock ); - while( oob_port->write_urb->status == -EINPROGRESS ) { + while( oob_port->write_urb->status == -EINPROGRESS + || oob_priv->dp_write_urb_in_use ) { spin_unlock( &port_priv->dp_port_lock ); cond_wait_interruptible_timeout_irqrestore( &oob_port->write_wait, DIGI_RETRY_TIMEOUT, @@ -802,8 +820,10 @@ port_priv->dp_port_num, modem_signals ); data[7] = 0; oob_port->write_urb->transfer_buffer_length = 8; + oob_port->write_urb->dev = port->serial->dev; if( (ret=usb_submit_urb(oob_port->write_urb)) == 0 ) { + oob_priv->dp_write_urb_in_use = 1; port_priv->dp_modem_signals = (port_priv->dp_modem_signals&~(TIOCM_DTR|TIOCM_RTS)) | (modem_signals&(TIOCM_DTR|TIOCM_RTS)); @@ -921,8 +941,10 @@ dbg( "digi_rx_unthrottle: TOP: port=%d", priv->dp_port_num ); } /* restart read chain */ - if( priv->dp_throttle_restart ) + if( priv->dp_throttle_restart ) { + port->read_urb->dev = port->serial->dev; ret = usb_submit_urb( port->read_urb ); + } /* turn throttle off */ priv->dp_throttled = 0; @@ -1240,7 +1262,8 @@ priv->dp_port_num, count, from_user, in_interrupt() ); spin_lock_irqsave( &priv->dp_port_lock, flags ); /* wait for urb status clear to submit another urb */ - if( port->write_urb->status == -EINPROGRESS ) { + if( port->write_urb->status == -EINPROGRESS + || priv->dp_write_urb_in_use ) { /* buffer data if count is 1 (probably put_char) if possible */ if( count == 1 ) { @@ -1270,6 +1293,7 @@ priv->dp_port_num, count, from_user, in_interrupt() ); } port->write_urb->transfer_buffer_length = data_len+2; + port->write_urb->dev = port->serial->dev; *data++ = DIGI_CMD_SEND_DATA; *data++ = data_len; @@ -1282,6 +1306,7 @@ priv->dp_port_num, count, from_user, in_interrupt() ); memcpy( data, from_user ? user_buf : buf, new_len ); if( (ret=usb_submit_urb(port->write_urb)) == 0 ) { + priv->dp_write_urb_in_use = 1; ret = new_len; priv->dp_out_buf_len = 0; } @@ -1327,6 +1352,7 @@ dbg( "digi_write_bulk_callback: TOP, urb->status=%d", urb->status ); == ((digi_serial_t *)(serial->private))->ds_oob_port_num ) { dbg( "digi_write_bulk_callback: oob callback" ); spin_lock( &priv->dp_port_lock ); + priv->dp_write_urb_in_use = 0; wake_up_interruptible( &port->write_wait ); spin_unlock( &priv->dp_port_lock ); return; @@ -1339,6 +1365,7 @@ dbg( "digi_write_bulk_callback: TOP, urb->status=%d", urb->status ); /* try to send any buffered data on this port, if it is open */ spin_lock( &priv->dp_port_lock ); + priv->dp_write_urb_in_use = 0; if( priv->dp_open_count && port->write_urb->status != -EINPROGRESS && priv->dp_out_buf_len > 0 ) { @@ -1349,11 +1376,13 @@ dbg( "digi_write_bulk_callback: TOP, urb->status=%d", urb->status ); port->write_urb->transfer_buffer_length = priv->dp_out_buf_len+2; + port->write_urb->dev = serial->dev; memcpy( port->write_urb->transfer_buffer+2, priv->dp_out_buf, priv->dp_out_buf_len ); if( (ret=usb_submit_urb(port->write_urb)) == 0 ) { + priv->dp_write_urb_in_use = 1; priv->dp_out_buf_len = 0; } @@ -1386,7 +1415,8 @@ static int digi_write_room( struct usb_serial_port *port ) spin_lock_irqsave( &priv->dp_port_lock, flags ); - if( port->write_urb->status == -EINPROGRESS ) + if( port->write_urb->status == -EINPROGRESS + || priv->dp_write_urb_in_use ) room = 0; else room = port->bulk_out_size - 2 - priv->dp_out_buf_len; @@ -1405,7 +1435,8 @@ static int digi_chars_in_buffer( struct usb_serial_port *port ) digi_port_t *priv = (digi_port_t *)(port->private); - if( port->write_urb->status == -EINPROGRESS ) { + if( port->write_urb->status == -EINPROGRESS + || priv->dp_write_urb_in_use ) { dbg( "digi_chars_in_buffer: port=%d, chars=%d", priv->dp_port_num, port->bulk_out_size - 2 ); /* return( port->bulk_out_size - 2 ); */ return( 256 ); @@ -1590,6 +1621,7 @@ dbg( "digi_close: TOP: port=%d, active=%d, open_count=%d", priv->dp_port_num, po spin_lock_irqsave( &priv->dp_port_lock, flags ); port->active = 0; + priv->dp_write_urb_in_use = 0; priv->dp_in_close = 0; --priv->dp_open_count; MOD_DEC_USE_COUNT; @@ -1630,7 +1662,7 @@ static int digi_startup_device( struct usb_serial *serial ) port = &serial->port[i]; - port->write_urb->transfer_flags |= USB_DISABLE_SPD; + port->write_urb->dev = port->serial->dev; if( (ret=usb_submit_urb(port->read_urb)) != 0 ) { err( @@ -1677,6 +1709,7 @@ dbg( "digi_startup: TOP" ); priv->dp_port_num = i; priv->dp_out_buf_len = 0; priv->dp_in_buf_len = 0; + priv->dp_write_urb_in_use = 0; priv->dp_modem_signals = 0; init_waitqueue_head( &priv->dp_modem_change_wait ); priv->dp_open_count = 0; @@ -1794,6 +1827,7 @@ dbg( "digi_read_bulk_callback: TOP" ); } /* continue read */ + urb->dev = port->serial->dev; if( (ret=usb_submit_urb(urb)) != 0 ) { err( __FUNCTION__ ": failed resubmitting urb, ret=%d, port=%d", ret, priv->dp_port_num ); @@ -2034,5 +2068,5 @@ module_exit(digi_exit); MODULE_AUTHOR("Peter Berger , Al Borchers "); -MODULE_DESCRIPTION("Digi AccelePort USB-4 Serial Converter driver"); +MODULE_DESCRIPTION("Digi AccelePort USB-2/USB-4 Serial Converter driver"); diff --git a/drivers/usb/uhci.c b/drivers/usb/uhci.c index 824d634ba924..94da61e7a873 100644 --- a/drivers/usb/uhci.c +++ b/drivers/usb/uhci.c @@ -2387,6 +2387,8 @@ static int found_uhci(struct pci_dev *dev) if (pci_enable_device(dev) < 0) return -1; + pci_set_master(dev); + if (!dev->irq) { err("found UHCI device with no IRQ assigned. check BIOS settings!"); return -1; diff --git a/drivers/usb/usb-uhci.c b/drivers/usb/usb-uhci.c index 4d2bcaf9bea9..99b5cad95263 100644 --- a/drivers/usb/usb-uhci.c +++ b/drivers/usb/usb-uhci.c @@ -2863,6 +2863,8 @@ static int __init uhci_init (void) if (pci_enable_device (dev) < 0) continue; + pci_set_master(dev); + if(!dev->irq) { err("Found UHCI device with no IRQ assigned. Check BIOS settings!"); diff --git a/i815.patch b/i815.patch deleted file mode 100644 index 0c1c2ca914b8..000000000000 --- a/i815.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- i810_rng.c_orig Sun Nov 26 18:58:26 2000 -+++ i810_rng.c Sun Nov 26 18:59:27 2000 -@@ -439,6 +439,8 @@ - if (!pdev) - pdev = pci_find_device (0x8086, 0x2428, NULL); - if (!pdev) -+ pdev = pci_find_device (0x8086, 0x1130, NULL); -+ if (!pdev) - return -ENODEV; - - DPRINTK ("ENTER\n"); diff --git a/include/asm-s390/irq.h b/include/asm-s390/irq.h index afdb43a3a119..c3f3f602e8e5 100644 --- a/include/asm-s390/irq.h +++ b/include/asm-s390/irq.h @@ -809,7 +809,7 @@ static inline void s390_do_profile (unsigned long addr) { if (prof_buffer && current->pid) { addr &= 0x7fffffff; - addr -= (unsigned long)&_stext[0]; + addr -= (unsigned long)&_stext; addr >>= prof_shift; /* * Don't ignore out-of-bounds EIP values silently, diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index 5a0abe6af35c..c364cccf8981 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h @@ -35,7 +35,7 @@ struct cpuinfo_S390 cpuid_t cpu_id; __u16 cpu_addr; __u16 cpu_nr; - unsigned long loops_per_sec; + unsigned long loops_per_jiffy; unsigned long *pgd_quick; unsigned long *pte_quick; unsigned long pgtable_cache_sz; diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index a69ddf96b939..9a50e2e4c393 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -435,7 +435,7 @@ enum enum { DEV_CDROM=1, DEV_HWMON=2, - DEV_MAC_HID=3 + DEV_MAC_HID=5 }; /* /proc/sys/dev/cdrom */ diff --git a/kernel/ksyms.c b/kernel/ksyms.c index 00453f3d6627..e9db2567b239 100644 --- a/kernel/ksyms.c +++ b/kernel/ksyms.c @@ -440,7 +440,7 @@ EXPORT_SYMBOL(strnicmp); EXPORT_SYMBOL(init_task_union); /* Support for external backtracer */ -extern char _stext[], _etext[]; +extern char _stext, _etext; EXPORT_SYMBOL(_stext); EXPORT_SYMBOL(_etext); EXPORT_SYMBOL(module_list); diff --git a/mm/filemap.c b/mm/filemap.c index 9f02f7ee4f17..1acdafe8ba07 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -220,8 +220,10 @@ int shrink_mmap(int priority, int gfp_mask) * throttling. */ - if (!try_to_free_buffers(page, wait)) + if (!try_to_free_buffers(page, wait)) { + if(--count < 0) break; goto refresh_clock; + } return 1; } -- 2.39.5