From 0030092695133ded1571acb759d88b1268bfe49d Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 23 Nov 2007 15:12:07 -0500 Subject: [PATCH] Linux 2.0.36pre22 o Fix IDE maintainers email o Small security/hangup fix for thge cyclades driver This one is the final cut. You have 24 hours to scream if you break it. THen it goes to Linus for final approval ftp://ftp.linux.org.uk/pub/linux/alan/2.0.36pre/... Alan --- MAINTAINERS | 6 ++-- arch/i386/mm/init.c | 11 ++++++ drivers/block/floppy.c | 4 ++- drivers/block/ide-cd.c | 5 +++ drivers/char/cyclades.c | 66 ++++++++++++++++++---------------- drivers/isdn/hisax/config.c | 5 ++- drivers/isdn/pcbit/callbacks.c | 14 +++++--- drivers/scsi/aha152x.c | 3 +- include/linux/isdn.h | 6 ---- 9 files changed, 74 insertions(+), 46 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 838bd612fbd1..f9a1f2910a1e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -237,8 +237,10 @@ L: linux-kernel@vger.rutgers.edu S: Maintained IDE/ATAPI CDROM DRIVER -P: Erik Andersen -M: andersee@debian.org +P: Jens Axboe +M: axboe@image.dk +P: Chris Zwilling +M: chris@cloudnet.com L: linux-kernel@vger.rutgers.edu S: Maintained diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 997bd1e31d0f..ba4ae7997e61 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c @@ -140,6 +140,17 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem) */ if (!smp_scan_config(639*0x400,0x400)) /* Scan the top 1K of base RAM */ smp_scan_config(0xF0000,0x10000); /* Scan the 64K of bios */ + /* + * If it is an SMP machine we should know now, unless the + * configuration is in an EISA/MCA bus machine with an + * extended bios data area. + * + * there is a real-mode segmented pointer pointing to the + * 4K EBDA area at 0x40E, calculate and scan it here: + */ + address = *(unsigned short *)phys_to_virt(0x40E); + address<<=4; + smp_scan_config(address, 0x1000); } /* * If it is an SMP machine we should know now, unless the configuration diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 7221187dbeab..0314a0b76ee8 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -1682,12 +1682,14 @@ void floppy_interrupt(int irq, void *dev_id, struct pt_regs * regs) if(do_print) print_result("unexpected interrupt", inr); if (inr == 0){ + int max_sensei = 4; do { output_byte(FD_SENSEI); inr = result(); if(do_print) print_result("sensei", inr); - } while ((ST0 & 0x83) != UNIT(current_drive) && inr == 2); + max_sensei--; + } while ((ST0 & 0x83) != UNIT(current_drive) && inr == 2 && max_sensei); } if (handler) { if(intr_count >= 2) { diff --git a/drivers/block/ide-cd.c b/drivers/block/ide-cd.c index 2176f115db35..825d942595a1 100644 --- a/drivers/block/ide-cd.c +++ b/drivers/block/ide-cd.c @@ -6,6 +6,7 @@ * * Copyright (C) 1994, 1995, 1996 scott snyder * Copyright (C) 1996, 1997 Erik Andersen + * Copyright (C) 1998 Jens Axboe and Chris Zwilling * * May be copied or modified under the terms of the GNU General Public License * see linux/COPYING for more information. @@ -127,6 +128,10 @@ * Better detection if door locking isn't supported * 3.21 Jun 16,1997 -- Add work-around for GCD-R580B * + * 3.22 Nov 13, 1998 -- New ide-cd maintainers: + * Jens Axboe + * Chris Zwilling + * * NOTE: Direct audio reads will only work on some types of drive. * So far, i've received reports of success for Sony and Toshiba drives. * diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index cddde8b33ae3..8b7695ff54b9 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -1,7 +1,7 @@ #define BLOCKMOVE #define Z_WAKE static char rcsid[] = -"$Revision: 2.1.1.9 $$Date: 1998/09/02 14:47:01 $"; +"$Revision: 2.1.1.10 $$Date: 1998/11/12 16:08:23 $"; /* * linux/drivers/char/cyclades.c @@ -31,6 +31,10 @@ static char rcsid[] = * void cleanup_module(void); * * $Log: cyclades.c,v $ + * Revision: 2.1.1.10 1998/11/12 16:08:23 ivan + * cy_close function now resets (correctly) the tty->closing flag; + * JIFFIES_DIFF macro fixed. + * * Revision 2.1.1.9 1998/09/02 14:47:01 ivan * Fixed bug in cy_close function, which was not informing HW of * which port should have the reception disabled before doing so; @@ -611,7 +615,7 @@ static char rcsid[] = #define SERIAL_TYPE_NORMAL 1 #define SERIAL_TYPE_CALLOUT 2 -#define JIFFIES_DIFF(n, j) ((n) - (j)) +#define JIFFIES_DIFF(n, j) ((j) - (n)) DECLARE_TASK_QUEUE(tq_cyclades); @@ -2015,7 +2019,7 @@ startup(struct cyclades_port * info) base_addr = (unsigned char*) (cy_card[card].base_addr + (cy_chip_offset[chip]<board_ctrl; ch_ctrl = zfw_ctrl->ch_ctrl; -#ifdef SERIAL_DEBUG_OPEN +#ifdef CY_DEBUG_OPEN printk("cyc startup Z card %d, channel %d, base_addr %lx\n", card, channel, (long)base_addr);/**/ #endif @@ -2101,7 +2105,7 @@ startup(struct cyclades_port * info) if (retval != 0){ printk("cyc:startup(2) retval was %x\n", retval); } -#ifdef SERIAL_DEBUG_DTR +#ifdef CY_DEBUG_DTR printk("cyc:startup raising Z DTR\n"); #endif @@ -2118,7 +2122,7 @@ startup(struct cyclades_port * info) info->idle_stats.xmit_idle = jiffies; } -#ifdef SERIAL_DEBUG_OPEN +#ifdef CY_DEBUG_OPEN printk(" cyc startup done\n"); #endif return 0; @@ -2178,7 +2182,7 @@ shutdown(struct cyclades_port * info) (cy_card[card].base_addr + (cy_chip_offset[chip]<tty || (info->tty->termios->c_cflag & HUPCL)) { cy_writeb((u_long)base_addr+(CyMSVR1<open_wait, &wait); -#ifdef SERIAL_DEBUG_OPEN +#ifdef CY_DEBUG_OPEN printk("cyc block_til_ready before block: ttyC%d, count = %d\n", info->line, info->count);/**/ #endif @@ -2357,7 +2361,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp, if (!tty_hung_up_p(filp)) info->count--; restore_flags(flags); -#ifdef SERIAL_DEBUG_COUNT +#ifdef CY_DEBUG_COUNT printk("cyc block_til_ready: (%d): decrementing count to %d\n", current->pid, info->count); #endif @@ -2378,7 +2382,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp, cy_writeb((u_long)base_addr+(CyCAR<line, info->count);/**/ #endif @@ -2444,7 +2448,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp, if (retval != 0){ printk("cyc:block_til_ready retval was %x\n", retval); } -#ifdef SERIAL_DEBUG_DTR +#ifdef CY_DEBUG_DTR printk("cyc:block_til_ready raising Z DTR\n"); #endif @@ -2468,7 +2472,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp, retval = -ERESTARTSYS; break; } -#ifdef SERIAL_DEBUG_OPEN +#ifdef CY_DEBUG_OPEN printk("cyc block_til_ready blocking: ttyC%d, count = %d\n", info->line, info->count);/**/ #endif @@ -2479,13 +2483,13 @@ block_til_ready(struct tty_struct *tty, struct file * filp, remove_wait_queue(&info->open_wait, &wait); if (!tty_hung_up_p(filp)){ info->count++; -#ifdef SERIAL_DEBUG_COUNT +#ifdef CY_DEBUG_COUNT printk("cyc:block_til_ready (%d): incrementing count to %d\n", current->pid, info->count); #endif } info->blocked_open--; -#ifdef SERIAL_DEBUG_OPEN +#ifdef CY_DEBUG_OPEN printk("cyc:block_til_ready after blocking: ttyC%d, count = %d\n", info->line, info->count);/**/ #endif @@ -2533,18 +2537,18 @@ cy_open(struct tty_struct *tty, struct file * filp) return -ENODEV; } } -#ifdef SERIAL_DEBUG_OTHER +#ifdef CY_DEBUG_OTHER printk("cyc:cy_open ttyC%d\n", info->line); /* */ #endif if (serial_paranoia_check(info, tty->device, "cy_open")){ return -ENODEV; } -#ifdef SERIAL_DEBUG_OPEN +#ifdef CY_DEBUG_OPEN printk("cyc:cy_open ttyC%d, count = %d\n", info->line, info->count);/**/ #endif info->count++; -#ifdef SERIAL_DEBUG_COUNT +#ifdef CY_DEBUG_COUNT printk("cyc:cy_open (%d): incrementing count to %d\n", current->pid, info->count); #endif @@ -2578,7 +2582,7 @@ cy_open(struct tty_struct *tty, struct file * filp) retval = block_til_ready(tty, filp, info); if (retval) { -#ifdef SERIAL_DEBUG_OPEN +#ifdef CY_DEBUG_OPEN printk("cyc:cy_open returning after block_til_ready with %d\n", retval); #endif @@ -2588,7 +2592,7 @@ cy_open(struct tty_struct *tty, struct file * filp) info->session = current->session; info->pgrp = current->pgrp; -#ifdef SERIAL_DEBUG_OPEN +#ifdef CY_DEBUG_OPEN printk(" cyc:cy_open done\n");/**/ #endif @@ -2674,7 +2678,7 @@ cy_close(struct tty_struct * tty, struct file * filp) struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; unsigned long flags; -#ifdef SERIAL_DEBUG_OTHER +#ifdef CY_DEBUG_OTHER printk("cyc:cy_close ttyC%d\n", info->line); #endif @@ -2682,7 +2686,7 @@ cy_close(struct tty_struct * tty, struct file * filp) || serial_paranoia_check(info, tty->device, "cy_close")){ return; } -#ifdef SERIAL_DEBUG_OPEN +#ifdef CY_DEBUG_OPEN printk("cyc:cy_close ttyC%d, count = %d\n", info->line, info->count); #endif @@ -2707,12 +2711,12 @@ cy_close(struct tty_struct * tty, struct file * filp) "info->count is %d\n", info->count); info->count = 1; } -#ifdef SERIAL_DEBUG_COUNT +#ifdef CY_DEBUG_COUNT printk("cyc:cy_close at (%d): decrementing count to %d\n", current->pid, info->count - 1); #endif if (--info->count < 0) { -#ifdef SERIAL_DEBUG_COUNT +#ifdef CY_DEBUG_COUNT printk("cyc:cyc_close setting count to 0\n"); #endif info->count = 0; @@ -2784,6 +2788,7 @@ cy_close(struct tty_struct * tty, struct file * filp) tty->driver.flush_buffer(tty); if (tty->ldisc.flush_buffer) tty->ldisc.flush_buffer(tty); + tty->closing = 0; info->event = 0; info->tty = 0; if (info->blocked_open) { @@ -2798,13 +2803,12 @@ cy_close(struct tty_struct * tty, struct file * filp) ASYNC_CLOSING); wake_up_interruptible(&info->close_wait); -#ifdef SERIAL_DEBUG_OTHER +#ifdef CY_DEBUG_OTHER printk(" cyc:cy_close done\n"); #endif MOD_DEC_USE_COUNT; restore_flags(flags); - return; } /* cy_close */ diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index 8b3b63b60a14..ce618983dad9 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c @@ -1,10 +1,13 @@ -/* $Id: config.c,v 1.15.2.23 1998/11/11 11:04:36 keil Exp $ +/* $Id: config.c,v 1.15.2.24 1998/11/11 13:37:53 keil Exp $ * Author Karsten Keil (keil@isdn4linux.de) * based on the teles driver from Jan den Ouden * * * $Log: config.c,v $ + * Revision 1.15.2.24 1998/11/11 13:37:53 keil + * fix typo + * * Revision 1.15.2.23 1998/11/11 11:04:36 keil * update version * diff --git a/drivers/isdn/pcbit/callbacks.c b/drivers/isdn/pcbit/callbacks.c index 14c0bdcb89cd..86e7d096e390 100644 --- a/drivers/isdn/pcbit/callbacks.c +++ b/drivers/isdn/pcbit/callbacks.c @@ -164,12 +164,18 @@ void cb_in_1(struct pcbit_dev * dev, struct pcbit_chan* chan, * ictl.num >= strlen() + strlen() + 5 */ + if (cbdata->data.setup.CallingPN == NULL) + strcpy(ictl.parm.setup.phone, "0"); + else strcpy(ictl.parm.setup.phone, cbdata->data.setup.CallingPN); + if (cbdata->data.setup.CalledPN == NULL) + strcpy(ictl.parm.setup.eazmsn, "0"); + else strcpy(ictl.parm.setup.eazmsn, cbdata->data.setup.CalledPN); - ictl.parm.setup.si1 = 7; - ictl.parm.setup.si2 = 0; - ictl.parm.setup.plan = 0; - ictl.parm.setup.screen = 0; + ictl.parm.setup.si1 = 7; + ictl.parm.setup.si2 = 0; + ictl.parm.setup.plan = 0; + ictl.parm.setup.screen = 0; #ifdef DEBUG printk(KERN_DEBUG "statstr: %s\n", ictl.num); diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index 5f721f4f579d..083dd0a53b74 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c @@ -551,7 +551,8 @@ static struct signature { } signatures[] = { { "Adaptec AHA-1520 BIOS", 0x102e, 21 }, /* Adaptec 152x */ - { "Adaptec AHA-1520B", 0x0b, 19 }, /* Adaptec 152x rev B */ + { "Adaptec AHA-1520B", 0x0b, 17 }, /* Adaptec 152x rev B */ + { "Adaptec AHA-1520B/1522B", 0x3e20, 23 }, /* Adaptec 1520B/1522B */ { "Adaptec ASW-B626 BIOS", 0x1029, 21 }, /* on-board controller */ { "Adaptec BIOS: ASW-B626", 0x0f, 22 }, /* on-board controller */ { "Adaptec ASW-B626 S2", 0x2e6c, 19 }, /* on-board controller */ diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 96719ce66282..c54b0db0a747 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -253,12 +253,6 @@ #define IIOCGETCPS _IO('I',21) #define IIOCGETDVR _IO('I',22) -#define IIOCNETARU _IO('I',23) -#define IIOCNETDRU _IO('I',24) -#define IIOCNETGRU _IO('I',25) - -#define IIOCNETBUD _IO('I',26) - #define IIOCNETALN _IO('I',32) #define IIOCNETDLN _IO('I',33) -- 2.39.5