From a172a8a2eb2cd0bd116805ef45085629d236f3e7 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 23 Nov 2007 15:16:49 -0500 Subject: [PATCH] Import 2.1.124pre1 --- Documentation/Configure.help | 22 +- Documentation/fb/vesafb.txt | 85 ++- Documentation/paride.txt | 59 +- Makefile | 2 +- arch/i386/boot/video.S | 41 +- arch/i386/defconfig | 1 + arch/i386/kernel/io_apic.c | 8 +- arch/i386/kernel/process.c | 27 +- arch/i386/kernel/ptrace.c | 2 - arch/i386/kernel/signal.c | 21 +- arch/i386/kernel/traps.c | 23 +- drivers/block/Config.in | 1 + drivers/block/ide-pci.c | 56 +- drivers/block/paride/frpw.c | 6 +- drivers/block/paride/jumbo | 70 ++ drivers/block/paride/on26.c | 63 +- drivers/block/paride/pcd.c | 11 +- drivers/block/paride/pd.c | 9 +- drivers/block/paride/pf.c | 9 +- drivers/block/paride/pg.c | 18 +- drivers/block/paride/pt.c | 15 +- drivers/char/Makefile | 3 - drivers/char/pty.c | 2 + drivers/char/tty_io.c | 2 + drivers/isdn/isdn_net.c | 2 + drivers/video/ati-gt.h | 203 ------ drivers/video/ati-gx.h | 122 ---- drivers/video/ati-vt.h | 147 ---- drivers/video/fbcmap.c | 22 +- drivers/video/fbcon-afb.c | 52 +- drivers/video/fbcon-cfb16.c | 192 +++-- drivers/video/fbcon-cfb2.c | 30 +- drivers/video/fbcon-cfb24.c | 210 +++--- drivers/video/fbcon-cfb32.c | 192 +++-- drivers/video/fbcon-cfb4.c | 36 +- drivers/video/fbcon-cfb8.c | 127 ++-- drivers/video/fbcon-ilbm.c | 52 +- drivers/video/fbcon-iplan2p2.c | 38 +- drivers/video/fbcon-iplan2p4.c | 38 +- drivers/video/fbcon-iplan2p8.c | 38 +- drivers/video/fbcon-mac.c | 60 +- drivers/video/fbcon-mfb.c | 51 +- drivers/video/fbcon-vga.c | 4 +- drivers/video/fbcon.c | 736 ++++++++++--------- drivers/{char => video}/fbmem.c | 62 +- drivers/video/font_6x11.c | 2 +- drivers/video/font_8x16.c | 2 +- drivers/video/font_8x8.c | 2 +- drivers/video/font_acorn_8x8.c | 2 +- drivers/video/font_pearl_8x8.c | 2 +- drivers/video/font_sun12x22.c | 2 +- drivers/video/font_sun8x16.c | 2 +- drivers/video/fonts.c | 2 +- drivers/video/mdacon.c | 468 ++++++++++++ drivers/video/mdafb.c | 480 ------------ drivers/video/skeletonfb.c | 131 ++-- drivers/video/vesafb.c | 238 ++++-- drivers/video/vgafb.c | 764 -------------------- fs/fcntl.c | 2 +- include/asm-alpha/termios.h | 5 +- include/asm-arm/termios.h | 3 + include/asm-i386/fixmap.h | 2 +- include/asm-i386/processor.h | 18 + include/asm-i386/termios.h | 4 +- include/asm-m68k/termios.h | 4 +- include/asm-mips/termios.h | 3 + include/asm-ppc/termios.h | 7 + include/asm-sparc/termios.h | 3 + include/asm-sparc64/termios.h | 3 + include/linux/fb.h | 119 ++- include/linux/parport.h | 4 +- {drivers => include}/video/fbcon-afb.h | 11 +- {drivers => include}/video/fbcon-cfb16.h | 15 +- {drivers => include}/video/fbcon-cfb2.h | 11 +- {drivers => include}/video/fbcon-cfb24.h | 15 +- {drivers => include}/video/fbcon-cfb32.h | 15 +- {drivers => include}/video/fbcon-cfb4.h | 11 +- {drivers => include}/video/fbcon-cfb8.h | 14 +- {drivers => include}/video/fbcon-ilbm.h | 11 +- {drivers => include}/video/fbcon-iplan2p2.h | 11 +- {drivers => include}/video/fbcon-iplan2p4.h | 11 +- {drivers => include}/video/fbcon-iplan2p8.h | 11 +- {drivers => include}/video/fbcon-mac.h | 11 +- {drivers => include}/video/fbcon-mfb.h | 11 +- {drivers => include}/video/fbcon-vga.h | 11 +- {drivers => include}/video/fbcon.h | 90 ++- {drivers => include}/video/font.h | 21 +- {drivers => include}/video/macmodes.h | 4 + {drivers => include}/video/s3blit.h | 5 + {drivers => include}/video/sbusfb.h | 30 +- init/main.c | 12 +- net/sunrpc/clnt.c | 20 +- net/sunrpc/svcsock.c | 72 +- net/sunrpc/xprt.c | 31 +- 94 files changed, 2558 insertions(+), 3140 deletions(-) create mode 100644 drivers/block/paride/jumbo delete mode 100644 drivers/video/ati-gt.h delete mode 100644 drivers/video/ati-gx.h delete mode 100644 drivers/video/ati-vt.h rename drivers/{char => video}/fbmem.c (90%) create mode 100644 drivers/video/mdacon.c delete mode 100644 drivers/video/mdafb.c delete mode 100644 drivers/video/vgafb.c rename {drivers => include}/video/fbcon-afb.h (86%) rename {drivers => include}/video/fbcon-cfb16.h (81%) rename {drivers => include}/video/fbcon-cfb2.h (84%) rename {drivers => include}/video/fbcon-cfb24.h (81%) rename {drivers => include}/video/fbcon-cfb32.h (81%) rename {drivers => include}/video/fbcon-cfb4.h (84%) rename {drivers => include}/video/fbcon-cfb8.h (82%) rename {drivers => include}/video/fbcon-ilbm.h (83%) rename {drivers => include}/video/fbcon-iplan2p2.h (81%) rename {drivers => include}/video/fbcon-iplan2p4.h (81%) rename {drivers => include}/video/fbcon-iplan2p8.h (81%) rename {drivers => include}/video/fbcon-mac.h (83%) rename {drivers => include}/video/fbcon-mfb.h (85%) rename {drivers => include}/video/fbcon-vga.h (84%) rename {drivers => include}/video/fbcon.h (84%) rename {drivers => include}/video/font.h (68%) rename {drivers => include}/video/macmodes.h (96%) rename {drivers => include}/video/s3blit.h (96%) rename {drivers => include}/video/sbusfb.h (80%) diff --git a/Documentation/Configure.help b/Documentation/Configure.help index ee3b2ef1c47f..1e6062626071 100644 --- a/Documentation/Configure.help +++ b/Documentation/Configure.help @@ -431,6 +431,20 @@ CONFIG_BLK_DEV_IDEDMA It is safe to say Y to this question. +Boot off-board chipsets first support +CONFIG_BLK_DEV_OFFBOARD + Normally, IDE controllers built into the motherboard (on-board + controllers) are assigned to ide0 and ide1 while those on add-in + PCI cards (off-board controllers) are relegated to ide2 and ide3. + Saying Y to here will reverse the situation, with off-board + controllers on ide0/1 and on-board controllers on ide2/3. This + can improve the usability of some boot managers such as LILO + when booting from a drive on an off-board controller. + Note that this will rearrange the order of the hd* devices and + may require modification of fstab and other files. + + If in doubt, say N. + Use DMA by default when available CONFIG_IDEDMA_AUTO Prior to kernel version 2.1.112, Linux used to automatically use @@ -650,9 +664,11 @@ CONFIG_PARIDE_PG The module will be called pg.o. You must also have at least one parallel port protocol driver in your system. This driver implements an API loosely related to the generic SCSI driver. - See /usr/include/linux/pg.h for details, or visit - http://www.torque.net/parport/cdr.html for more information and - the required patches to cdrecord. + See /usr/include/linux/pg.h for details. + + You can obtain the most recent version of cdrecord from + ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ . Versions 1.6.1a3 and + later fully support the pg driver. ATEN EH-100 protocol CONFIG_PARIDE_ATEN diff --git a/Documentation/fb/vesafb.txt b/Documentation/fb/vesafb.txt index ed58f7241725..e6f52393d346 100644 --- a/Documentation/fb/vesafb.txt +++ b/Documentation/fb/vesafb.txt @@ -30,37 +30,66 @@ How to use it? ============== Switching modes is done using the vga=... boot parameter. Read -Documentation/svga.txt for details. With vesafb both text and -graphics modes work. Text modes are handled by vgafb, graphic modes -by the new vesafb.c. +Documentation/svga.txt for details. -The graphic modes are not in the list which you get if you boot with -vga=ask and hit return. Here are some mode numbers: - - | 640x480 800x600 1024x768 -----+--------------------------- -256 | 0x101 0x103 0x105 -32k | 0x110 0x113 0x116 -64k | 0x111 0x114 0x117 -16M | 0x112 0x115 0x118 - -Note 1: this are the VESA mode numbers. The video mode select code - expects 0x200 + VESA mode number. -Note 2: lilo can't handle hex, for booting with "vga=??" you have to - transform the numbers to decimal. +You should compile in both vgacon (for text mode) and vesafb (for +graphics mode). Which of them takes over the console depends on +whenever the specified mode is text or graphics. +The graphic modes are NOT in the list which you get if you boot with +vga=ask and hit return. Here are some mode numbers: -Speed it up! -============ - -Check /usr/src/linux/Documentation/mtrr.txt, enabling write-combining -for the framebuffer memory gives a performance boost. - -There are two ways to do console scrolling: redraw the screen -completely, or by copying around the video memory. You can select one -of them using the kernel command line: video=vesa:redraw or -video=vesa:memmove. redraw is the default, becauce this one works -faster on my box. + | 640x480 800x600 1024x768 1280x1024 +----+------------------------------------- +256 | 0x101 0x103 0x105 0x107 +32k | 0x110 0x113 0x116 0x119 +64k | 0x111 0x114 0x117 0x11A +16M | 0x112 0x115 0x118 0x11B + +This are the VESA mode numbers. The video mode select code expects +0x200 + VESA mode number. Therefore you have to enter "305" at the +"vga=ask" prompt to boot into 1024x768x8. + +If this does'nt work, this might be becauce your BIOS does not support +linear framebuffers or becauce it does'nt support this mode at all. +Even if your board does, it might be the BIOS does not. VESA BIOS +Extentions v2.0 are required, 1.2 is NOT sufficient. You'll get a +"bad mode number" message if something goes wrong. + +Note: LILO can't handle hex, for booting directly with "vga=mode-number" + you have to transform the numbers to decimal. + + +X11 +=== + +XF68_FBDev should work just fine, but it is non-accelerated. Running +another (accelerated) X-Server like XF86_SVGA might or might not work. +It depends on X-Server and graphics board. + +The X-Server must restore the video mode correctly, else you end up +with a broken console (and vesafb can't do anything about this). + + +Configuration +============= + +You can pass kernel command line options to vesafb with +"video=vesa:option1". Multiple options should be separated +by comma. Accepted options: + +invers - no comment... +redraw - scroll by redrawing the affected part of the screen +ypan - enable display panning using the VESA protected mode + interface. This enables the Shift-PgUp scrollback + thing and greatly speeds up fullscreen scrolling. + It is slower than "redraw" when scrolling only a halve + screen. This is the default. +ywrap - If your gfx board supports wrap-around, use this one + instead of ypan. +nopal - Don't use the protected mode interface for palette + changes. vesafb will try the standard vga registers + instead. Have fun! diff --git a/Documentation/paride.txt b/Documentation/paride.txt index 47141f7a391b..4eb9a1855015 100644 --- a/Documentation/paride.txt +++ b/Documentation/paride.txt @@ -1,7 +1,7 @@ Linux and parallel port IDE devices -PARIDE v1.02 (c) 1997-8 Grant Guenther +PARIDE v1.03 (c) 1997-8 Grant Guenther 1. Introduction @@ -42,8 +42,8 @@ parallel port IDE subsystem, including: SyQuest EZ-135, EZ-230 & SparQ drives Avatar Shark Imation Superdisk LS-120 - FreeCom Power CD - Hewlett-Packard 5GB tape drive + FreeCom Power CD + Hewlett-Packard 5GB and 8GB tape drives Hewlett-Packard 7100 and 7200 CD-RW drives as well as most of the clone and no-name products on the market. @@ -52,7 +52,7 @@ To support such a wide range of devices, PARIDE, the parallel port IDE subsystem, is actually structured in three parts. There is a base paride module which provides a registry and some common methods for accessing the parallel ports. The second component is a set of -high-level drivers for each of the different type of supported device: +high-level drivers for each of the different types of supported devices: pd IDE disk pcd ATAPI CD-ROM @@ -176,7 +176,7 @@ It is much faster and simpler to get to understand the PARIDE drivers if you use them as loadable kernel modules. Note 1: using these drivers with the "kerneld" automatic module loading -system is not recommended, and is not documented here. +system is not recommended for beginners, and is not documented here. Note 2: if you build PARPORT support as a loadable module, PARIDE must also be built as loadable modules, and PARPORT must be loaded before the @@ -290,14 +290,57 @@ floppy that you could share with a DOS system: mkdosfs /dev/pf0 mount /dev/pf0 /mnt -2.4 Using the pg driver + +2.4 The pf driver + +The pf driver is intended for use with parallel port ATAPI disk +devices. The most common devices in this category are PD drives +and LS-120 drives. Traditionally, media for these devices are not +partitioned. Consequently, the pf driver does not support partitioned +media. This may be changed in a future version of the driver. + + +2.5 Using the pt driver + +The pt driver for parallel port ATAPI tape drives is a minimal driver. +It does not yet support many of the standard tape ioctl operations. +For best performance, a block size of 32KB should be used. You will +probably want to set the parallel port delay to 0, if you can. + + +2.6 Using the pg driver The pg driver can be used in conjunction with the cdrecord program -to create CD-ROMs. For more information, and the required patches -to cdrecord, please visit http://www.torque.net/parport/cdr.html . +to create CD-ROMs. Please get cdrecord version 1.6.1a3 or later +from ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ (you may have to look +in the alpha subdirectory). To record CD-R media your parallel port +should ideally be set to EPP mode, and the "port delay" should be +set to 0. With those settings it is possible to record at 2x speed +without any buffer underruns. If you cannot get the driver to work +in EPP mode, try to use "bidirectional" or "PS/2" mode and 1x speeds only. + 3. Troubleshooting +The most common problems that people report with the PARIDE drivers +concern the parallel port CMOS settings. At this time, none of the +PARIDE protocol modules support ECP mode, or any ECP combination modes. +If you are able to do so, please set your parallel port into EPP mode +using your CMOS setup procedure. + +Some parallel ports cannot reliably transfer data at full speed. To +offset the errors, the PARIDE protocol modules introduce a "port +delay" between each access to the i/o ports. Each protocol sets +a default value for this delay. In most cases, the user can override +the default and set it to 0 - resulting in somewhat higher transfer +rates. In some rare cases (especially with older 486 systems) the +default delays are not long enough. if you experience corrupt data +transfers, or unexpected failures, you may wish to increase the +port delay. The delay can be programmed using the "driveN" parameters +to each of the high-level drivers. Please see the notes above, or +read the comments at the beginning of the driver source files in +linux/drivers/block/paride. + While a lot of testing has gone into these drivers to make them work as smoothly as possible, problems will arise. If you do have problems, please check all the obvious things first: does the drive work in diff --git a/Makefile b/Makefile index 577bc3f854d0..a038be2dcfcd 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 1 -SUBLEVEL = 123 +SUBLEVEL = 124 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/i386/boot/video.S b/arch/i386/boot/video.S index 6480765894d3..879f0aa306a9 100644 --- a/arch/i386/boot/video.S +++ b/arch/i386/boot/video.S @@ -24,7 +24,7 @@ #undef CONFIG_VIDEO_LOCAL ! Force 400 scan lines for standard modes (hack to fix bad behaviour -! of certain broken BIOS'es -- don't use unless needed) +! of certain broken BIOSes -- don't use unless needed) #undef CONFIG_VIDEO_400_HACK ! A special hack allowing to force specific BIOS mode ID along with specific @@ -85,6 +85,9 @@ #define PARAM_LFB_SIZE 0x1c #define PARAM_LFB_LINELENGTH 0x24 #define PARAM_LFB_COLORS 0x26 +#define PARAM_VESAPM_SEG 0x2e +#define PARAM_VESAPM_OFF 0x30 +#define PARAM_LFB_PAGES 0x32 ! Define DO_STORE according to CONFIG_VIDEO_RETAIN #ifdef CONFIG_VIDEO_RETAIN @@ -236,13 +239,14 @@ mopar_gr: seg fs mov [PARAM_LFB_DEPTH],ax - mov eax,(di+40) + mov al,(di+29) + mov ah,#0 seg fs - mov [PARAM_LFB_BASE],eax + mov [PARAM_LFB_PAGES],ax - mov eax,(di+44) + mov eax,(di+40) seg fs - mov [PARAM_LFB_SIZE],eax + mov [PARAM_LFB_BASE],eax mov eax,(di+31) seg fs @@ -251,7 +255,30 @@ mopar_gr: mov eax,(di+35) seg fs mov [PARAM_LFB_COLORS+4],eax - + + ! get video mem size + lea di,modelist+1024 + mov ax,#0x4f00 + int 0x10 + + xor eax,eax + mov ax,(di+18) + seg fs + mov [PARAM_LFB_SIZE],eax + + ! get protected mode interface informations + mov ax,#0x4f0a + xor bx,bx + xor di,di + int 0x10 + cmp ax,#0x004f + jnz no_pm + seg fs + mov [PARAM_VESAPM_SEG],es + seg fs + mov [PARAM_VESAPM_OFF],di + +no_pm: ret ! @@ -619,7 +646,7 @@ st80: cmpb [adapter],#0 ! CGA/MDA/HGA => mode 3/7 is always 80x25 jz set80 seg gs ! This is EGA+ -- beware of 80x50 etc. mov al,[0x0484] - or al,al ! Some buggy BIOSs set 0 rows + or al,al ! Some buggy BIOSes set 0 rows jz set80 cmp al,#24 ! Let's hope this is correct jz set80 diff --git a/arch/i386/defconfig b/arch/i386/defconfig index 30051bea8ac8..7996c7af7f1b 100644 --- a/arch/i386/defconfig +++ b/arch/i386/defconfig @@ -67,6 +67,7 @@ CONFIG_BLK_DEV_CMD640=y CONFIG_BLK_DEV_RZ1000=y CONFIG_BLK_DEV_IDEPCI=y CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_BLK_DEV_OFFBOARD is not set CONFIG_IDEDMA_AUTO=y # CONFIG_IDE_CHIPSETS is not set diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 01de6305c95e..fb5cfa3b3276 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c @@ -129,7 +129,7 @@ static inline void io_apic_sync(void) /* * We disable IO-APIC IRQs by setting their 'destination CPU mask' to - * zero. Trick, trick. + * zero. Trick by Ramesh Nalluri. */ static inline void disable_IO_APIC_irq(unsigned int irq) { @@ -882,9 +882,9 @@ static void __init construct_default_ISA_mptable(void) if (!IO_APIC_IRQ(i)) continue; - mp_irqs[pos].mpc_irqtype = 0; - mp_irqs[pos].mpc_irqflag = 0; - mp_irqs[pos].mpc_srcbus = 0; + mp_irqs[pos].mpc_irqtype = mp_INT; + mp_irqs[pos].mpc_irqflag = (1 << 2) | 1; /* High-active edge */ + mp_irqs[pos].mpc_srcbus = MP_BUS_ISA; mp_irqs[pos].mpc_srcbusirq = i; mp_irqs[pos].mpc_dstapic = 0; mp_irqs[pos].mpc_dstirq = i; diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 6bf227df57dc..fc73c2e85475 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c @@ -519,34 +519,22 @@ void exit_thread(void) void flush_thread(void) { int i; + struct task_struct *tsk = current; for (i=0 ; i<8 ; i++) - current->tss.debugreg[i] = 0; + tsk->tss.debugreg[i] = 0; /* * Forget coprocessor state.. */ - if (current->flags & PF_USEDFPU) { - current->flags &= ~PF_USEDFPU; - stts(); - } - current->used_math = 0; + clear_fpu(tsk); + tsk->used_math = 0; } void release_thread(struct task_struct *dead_task) { } -static inline void unlazy_fpu(struct task_struct *tsk) -{ - if (tsk->flags & PF_USEDFPU) { - __asm__("fnsave %0":"=m" (tsk->tss.i387)); - asm volatile("fwait"); - tsk->flags &= ~PF_USEDFPU; - stts(); - } -} - /* * If new_mm is NULL, we're being called to set up the LDT descriptor * for a clone task. Each clone must have a separate entry in the GDT. @@ -621,11 +609,12 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, int dump_fpu (struct pt_regs * regs, struct user_i387_struct* fpu) { int fpvalid; + struct task_struct *tsk = current; - fpvalid = current->used_math; + fpvalid = tsk->used_math; if (fpvalid) { - unlazy_fpu(current); - memcpy(fpu,¤t->tss.i387.hard,sizeof(*fpu)); + unlazy_fpu(tsk); + memcpy(fpu,&tsk->tss.i387.hard,sizeof(*fpu)); } return fpvalid; diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index 8968b334e1f7..8f0a1c005805 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c @@ -647,8 +647,6 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) #endif __copy_from_user(&child->tss.i387.hard, (void *)data, sizeof(struct user_i387_struct)); - child->flags &= ~PF_USEDFPU; - stts(); #ifdef CONFIG_MATH_EMULATION } else { restore_i387_soft(&child->tss.i387.soft, diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c index 47e3c3027170..e6ed37c3b330 100644 --- a/arch/i386/kernel/signal.c +++ b/arch/i386/kernel/signal.c @@ -153,11 +153,9 @@ struct rt_sigframe static inline int restore_i387_hard(struct _fpstate *buf) { - if (current->flags & PF_USEDFPU) { - current->flags &= ~PF_USEDFPU; - stts(); - } - return __copy_from_user(¤t->tss.i387.hard, buf, sizeof(*buf)); + struct task_struct *tsk = current; + clear_fpu(tsk); + return __copy_from_user(&tsk->tss.i387.hard, buf, sizeof(*buf)); } static inline int restore_i387(struct _fpstate *buf) @@ -307,14 +305,11 @@ badframe: static inline int save_i387_hard(struct _fpstate * buf) { - if (current->flags & PF_USEDFPU) { - current->flags &= ~PF_USEDFPU; - __asm__ __volatile__("fnsave %0":"=m"(current->tss.i387.hard)); - stts(); - } - asm volatile("fwait"); - current->tss.i387.hard.status = current->tss.i387.hard.swd; - if (__copy_to_user(buf, ¤t->tss.i387.hard, sizeof(*buf))) + struct task_struct *tsk = current; + + unlazy_fpu(tsk); + tsk->tss.i387.hard.status = tsk->tss.i387.hard.swd; + if (__copy_to_user(buf, &tsk->tss.i387.hard, sizeof(*buf))) return -1; return 1; } diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index bd9c5a760831..08f8154e6777 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -385,20 +385,15 @@ void math_error(void) { struct task_struct * task; - lock_kernel(); - clts(); - task = current; /* - * Save the info for the exception handler + * Save the info for the exception handler + * (this will also clear the error) */ - __asm__ __volatile__("fnsave %0":"=m" (task->tss.i387.hard)); - task->flags&=~PF_USEDFPU; - stts(); - + task = current; + unlazy_fpu(task); task->tss.trap_no = 16; task->tss.error_code = 0; force_sig(SIGFPE, task); - unlock_kernel(); } asmlinkage void do_coprocessor_error(struct pt_regs * regs, long error_code) @@ -426,16 +421,6 @@ asmlinkage void do_spurious_interrupt_bug(struct pt_regs * regs, asmlinkage void math_state_restore(void) { __asm__ __volatile__("clts"); /* Allow maths ops (or we recurse) */ - -/* - * SMP is actually simpler than uniprocessor for once. Because - * we can't pull the delayed FPU switching trick Linus does - * we simply have to do the restore each context switch and - * set the flag. switch_to() will always save the state in - * case we swap processors. We also don't use the coprocessor - * timer - IRQ 13 mode isn't used with SMP machines (thank god). - */ - if(current->used_math) __asm__("frstor %0": :"m" (current->tss.i387)); else diff --git a/drivers/block/Config.in b/drivers/block/Config.in index 85177ada1ce7..c63837287d77 100644 --- a/drivers/block/Config.in +++ b/drivers/block/Config.in @@ -33,6 +33,7 @@ else bool ' Generic PCI IDE chipset support' CONFIG_BLK_DEV_IDEPCI if [ "$CONFIG_BLK_DEV_IDEPCI" = "y" ]; then bool ' Generic PCI bus-master DMA support' CONFIG_BLK_DEV_IDEDMA + bool ' Boot off-board chipsets first support' CONFIG_BLK_DEV_OFFBOARD if [ "$CONFIG_BLK_DEV_IDEDMA" = "y" ]; then bool ' Use DMA by default when available' CONFIG_IDEDMA_AUTO fi diff --git a/drivers/block/ide-pci.c b/drivers/block/ide-pci.c index f823ffdd25d5..2a987e3d5dd7 100644 --- a/drivers/block/ide-pci.c +++ b/drivers/block/ide-pci.c @@ -117,29 +117,39 @@ typedef struct ide_pci_device_s { unsigned int extra; } ide_pci_device_t; +#ifdef CONFIG_BLK_DEV_OFFBOARD +# define ON_BOARD 0 +# define OFF_BOARD 1 +# define NEVER_BOARD 0 +#else /* CONFIG_BLK_DEV_OFFBOARD */ +# define ON_BOARD 1 +# define OFF_BOARD 0 +# define NEVER_BOARD 0 +#endif /* CONFIG_BLK_DEV_OFFBOARD */ + static ide_pci_device_t ide_pci_chipsets[] __initdata = { - {DEVID_PIIXa, "PIIX", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, 0x01, 0 }, - {DEVID_PIIXb, "PIIX", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, 0x01, 0 }, - {DEVID_PIIX3, "PIIX3", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, 0x01, 0 }, - {DEVID_PIIX4, "PIIX4", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, 0x01, 0 }, - {DEVID_VP_IDE, "VP_IDE", INIT_VIA82C586, {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, 0x01, 0 }, - {DEVID_PDC20246,"PDC20246", NULL, {{0x50,0x02,0x02}, {0x50,0x04,0x04}}, 0x01, 16 }, - {DEVID_RZ1000, "RZ1000", INIT_RZ1000, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, - {DEVID_RZ1001, "RZ1001", INIT_RZ1000, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, - {DEVID_CMD640, "CMD640", IDE_IGNORE, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, - {DEVID_NS87410, "NS87410", NULL, {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, 0x01, 0 }, - {DEVID_SIS5513, "SIS5513", NULL, {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, 0x01, 0 }, - {DEVID_CMD646, "CMD646", INIT_CMD646, {{0x00,0x00,0x00}, {0x51,0x80,0x80}}, 0x01, 0 }, - {DEVID_HT6565, "HT6565", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, - {DEVID_OPTI621, "OPTI621", INIT_OPTI621, {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, 0x01, 0 }, - {DEVID_OPTI621X,"OPTI621X", INIT_OPTI621, {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, 0x01, 0 }, - {DEVID_TRM290, "TRM290", INIT_TRM290, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, - {DEVID_NS87415, "NS87415", INIT_NS87415, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, - {DEVID_AEC6210, "AEC6210", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, - {DEVID_W82C105, "W82C105", INIT_W82C105, {{0x40,0x01,0x01}, {0x40,0x10,0x10}}, 0x01, 0 }, - {DEVID_UM8886BF,"UM8886BF", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, - {DEVID_HPT343, "HPT343", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x00, 16 }, - {IDE_PCI_DEVID_NULL, "PCI_IDE", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }}; + {DEVID_PIIXa, "PIIX", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0 }, + {DEVID_PIIXb, "PIIX", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0 }, + {DEVID_PIIX3, "PIIX3", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0 }, + {DEVID_PIIX4, "PIIX4", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0 }, + {DEVID_VP_IDE, "VP_IDE", INIT_VIA82C586, {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, ON_BOARD, 0 }, + {DEVID_PDC20246,"PDC20246", NULL, {{0x50,0x02,0x02}, {0x50,0x04,0x04}}, OFF_BOARD, 16 }, + {DEVID_RZ1000, "RZ1000", INIT_RZ1000, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }, + {DEVID_RZ1001, "RZ1001", INIT_RZ1000, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }, + {DEVID_CMD640, "CMD640", IDE_IGNORE, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }, + {DEVID_NS87410, "NS87410", NULL, {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, ON_BOARD, 0 }, + {DEVID_SIS5513, "SIS5513", NULL, {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, ON_BOARD, 0 }, + {DEVID_CMD646, "CMD646", INIT_CMD646, {{0x00,0x00,0x00}, {0x51,0x80,0x80}}, ON_BOARD, 0 }, + {DEVID_HT6565, "HT6565", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }, + {DEVID_OPTI621, "OPTI621", INIT_OPTI621, {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, ON_BOARD, 0 }, + {DEVID_OPTI621X,"OPTI621X", INIT_OPTI621, {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, ON_BOARD, 0 }, + {DEVID_TRM290, "TRM290", INIT_TRM290, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }, + {DEVID_NS87415, "NS87415", INIT_NS87415, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }, + {DEVID_AEC6210, "AEC6210", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 0 }, + {DEVID_W82C105, "W82C105", INIT_W82C105, {{0x40,0x01,0x01}, {0x40,0x10,0x10}}, ON_BOARD, 0 }, + {DEVID_UM8886BF,"UM8886BF", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }, + {DEVID_HPT343, "HPT343", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, NEVER_BOARD, 16 }, + {IDE_PCI_DEVID_NULL, "PCI_IDE", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }}; /* * This allows offboard ide-pci cards the enable a BIOS, verify interrupt @@ -176,6 +186,8 @@ __initfunc(static unsigned int ide_special_settings (struct pci_dev *dev, const } } return dev->irq; + case PCI_DEVICE_ID_TTI_HPT343: + return dev->irq; default: break; } diff --git a/drivers/block/paride/frpw.c b/drivers/block/paride/frpw.c index f965fb9da478..680f9e592ffa 100644 --- a/drivers/block/paride/frpw.c +++ b/drivers/block/paride/frpw.c @@ -12,10 +12,11 @@ 1.01 GRG 1998.05.06 init_proto, release_proto fix chip detect added EPP-16 and EPP-32 + 1.02 GRG 1998.09.23 added hard reset to initialisation process */ -#define FRPW_VERSION "1.01" +#define FRPW_VERSION "1.02" #include #include @@ -184,6 +185,9 @@ static int frpw_test_pnp ( PIA *pi ) { int olddelay, a, b; + w0(0); w2(8); udelay(50); w2(0xc); /* parallel bus reset */ + mdelay(1500); + olddelay = pi->delay; pi->delay = 10; diff --git a/drivers/block/paride/jumbo b/drivers/block/paride/jumbo new file mode 100644 index 000000000000..b952fde92b32 --- /dev/null +++ b/drivers/block/paride/jumbo @@ -0,0 +1,70 @@ +#!/bin/sh +# +# This script can be used to build "jumbo" modules that contain the +# base PARIDE support, one protocol module and one high-level driver. +# +echo -n "High level driver [pcd] : " +read X +HLD=${X:-pcd} +# +echo -n "Protocol module [bpck] : " +read X +PROTO=${X:-bpck} +# +echo -n "Use MODVERSIONS [y] ? " +read X +UMODV=${X:-y} +# +echo -n "For SMP kernel [n] ? " +read X +USMP=${X:-n} +# +echo -n "Support PARPORT [n] ? " +read X +UPARP=${X:-n} +# +echo +# +case $USMP in + y* | Y* ) FSMP="-D__SMP__" + ;; + *) FSMP="" + ;; +esac +# +MODI="-include ../../../include/linux/modversions.h" +# +case $UMODV in + y* | Y* ) FMODV="-DMODVERSIONS $MODI" + ;; + *) FMODV="" + ;; +esac +# +case $UPARP in + y* | Y* ) FPARP="-DCONFIG_PARPORT" + ;; + *) FPARP="" + ;; +esac +# +TARG=$HLD-$PROTO.o +FPROTO=-DCONFIG_PARIDE_`echo "$PROTO" | tr [a-z] [A-Z]` +FK="-D__KERNEL__ -I ../../../include" +FLCH=-D_LINUX_CONFIG_H +# +echo cc $FK $FSMP $FLCH $FPARP $FPROTO -Wall -O2 -o Jb.o -c paride.c +cc $FK $FSMP $FLCH $FPARP $FPROTO -Wall -O2 -o Jb.o -c paride.c +# +echo cc $FK $FSMP -Wall -O2 -o Jp.o -c $PROTO.c +cc $FK $FSMP -Wall -O2 -o Jp.o -c $PROTO.c +# +echo cc $FK $FSMP $FMODV -DMODULE -DPARIDE_JUMBO -Wall -O2 -o Jd.o -c $HLD.c +cc $FK $FSMP $FMODV -DMODULE -DPARIDE_JUMBO -Wall -O2 -o Jd.o -c $HLD.c +# +echo ld -r -o $TARG Jp.o Jb.o Jd.o +ld -r -o $TARG Jp.o Jb.o Jd.o +# +# +rm Jp.o Jb.o Jd.o +# diff --git a/drivers/block/paride/on26.c b/drivers/block/paride/on26.c index 89457cc801fb..78477593e545 100644 --- a/drivers/block/paride/on26.c +++ b/drivers/block/paride/on26.c @@ -10,10 +10,11 @@ /* Changes: 1.01 GRG 1998.05.06 init_proto, release_proto + 1.02 GRG 1998.09.23 updates for the -E rev chip */ -#define ON26_VERSION "1.01" +#define ON26_VERSION "1.02" #include #include @@ -91,8 +92,8 @@ static void on26_write_regr( PIA *pi, int cont, int regr, int val ) } } -#define CCP(x) w0(0xff);w0(0xaa);w0(0x55);w0(0);w0(0xff);\ - w0(0x87);w0(0x78);w0(x);w2(4); +#define CCP(x) w0(0xfe);w0(0xaa);w0(0x55);w0(0);w0(0xff);\ + w0(0x87);w0(0x78);w0(x);w2(4);w2(5);w2(4);w0(0xff); static void on26_connect ( PIA *pi ) @@ -102,7 +103,6 @@ static void on26_connect ( PIA *pi ) pi->saved_r2 = r2(); CCP(0x20); - w2(0xcd); w2(0xcc); w0(0xff); x = 8; if (pi->mode) x = 9; w0(2); P1; w0(8); P2; @@ -114,11 +114,62 @@ static void on26_disconnect ( PIA *pi ) { if (pi->mode >= 2) { w3(4); w3(4); w3(4); w3(4); } else { w0(4); P1; w0(4); P1; } CCP(0x30); - w2(0xcd); w2(0xcc); w0(0xff); w0(pi->saved_r0); w2(pi->saved_r2); } +static int on26_test_port( PIA *pi) /* hard reset */ + +{ int i, m, d; + + pi->saved_r0 = r0(); + pi->saved_r2 = r2(); + + d = pi->delay; + m = pi->mode; + pi->delay = 5; + pi->mode = 0; + + w2(0xc); + + CCP(0x30); CCP(0); + + w0(0xfe);w0(0xaa);w0(0x55);w0(0);w0(0xff); + i = ((r1() & 0xf0) << 4); w0(0x87); + i |= (r1() & 0xf0); w0(0x78); + w0(0x20);w2(4);w2(5); + i |= ((r1() & 0xf0) >> 4); + w2(4);w0(0xff); + + if (i == 0xb5f) { + + w0(2); P1; w0(0); P2; + w0(3); P1; w0(0); P2; + w0(2); P1; w0(8); P2; udelay(100); + w0(2); P1; w0(0xa); P2; udelay(100); + w0(2); P1; w0(8); P2; udelay(1000); + + on26_write_regr(pi,0,6,0xa0); + + for (i=0;i<100;i++) { + if (!(on26_read_regr(pi,0,7) & 0x80)) break; + udelay(100000); + } + + w0(4); P1; w0(4); P1; + } + + CCP(0x30); + + pi->delay = d; + pi->mode = m; + w0(pi->saved_r0); + w2(pi->saved_r2); + + return 5; +} + + static void on26_read_block( PIA *pi, char * buf, int count ) { int k, a, b; @@ -240,7 +291,7 @@ struct pi_protocol on26 = {"on26",0,5,2,1,1, on26_read_block, on26_connect, on26_disconnect, - 0, + on26_test_port, 0, 0, on26_log_adapter, diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c index 4a083abbfcb1..48055268c573 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c @@ -96,10 +96,11 @@ pcd_completion, use HZ in loop timing 1.05 GRG 1998.08.16 Conformed to "Uniform CD-ROM" standard 1.06 GRG 1998.08.19 Added audio ioctl support + 1.07 GRG 1998.09.24 Increased reset timeout, added jumbo support */ -#define PCD_VERSION "1.06" +#define PCD_VERSION "1.07" #define PCD_MAJOR 46 #define PCD_NAME "pcd" #define PCD_UNITS 4 @@ -191,7 +192,7 @@ MODULE_PARM(drive3,"1-6i"); #define PCD_TMO 800 /* timeout in jiffies */ #define PCD_DELAY 50 /* spin delay in uS */ #define PCD_READY_TMO 20 /* in seconds */ -#define PCD_RESET_TMO 30 /* in tenths of a second */ +#define PCD_RESET_TMO 100 /* in tenths of a second */ #define PCD_SPIN (1000000*PCD_TMO)/(HZ*PCD_DELAY) @@ -365,6 +366,12 @@ int init_module(void) { int err; +#ifdef PARIDE_JUMBO + { extern paride_init(); + paride_init(); + } +#endif + err = pcd_init(); return err; diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index 69274fe4873d..3518a59d644a 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c @@ -110,10 +110,11 @@ Added slave support 1.03 GRG 1998.06.16 Eliminate an Ugh. 1.04 GRG 1998.08.15 Extra debugging, use HZ in loop timing + 1.05 GRG 1998.09.24 Added jumbo support */ -#define PD_VERSION "1.04" +#define PD_VERSION "1.05" #define PD_MAJOR 45 #define PD_NAME "pd" #define PD_UNITS 4 @@ -611,6 +612,12 @@ int init_module(void) { int err, unit; +#ifdef PARIDE_JUMBO + { extern paride_init(); + paride_init(); + } +#endif + err = pd_init(); if (err) return err; diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index a2f1f1da9e30..a6418efa7baf 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c @@ -109,10 +109,11 @@ up transfer size. 1.02 GRG 1998.06.16 Eliminated an Ugh 1.03 GRG 1998.08.16 Use HZ in loop timings, extra debugging + 1.04 GRG 1998.09.24 Added jumbo support */ -#define PF_VERSION "1.03" +#define PF_VERSION "1.04" #define PF_MAJOR 47 #define PF_NAME "pf" #define PF_UNITS 4 @@ -509,6 +510,12 @@ int init_module(void) { int err; +#ifdef PARIDE_JUMBO + { extern paride_init(); + paride_init(); + } +#endif + err = pf_init(); return err; diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c index fd001008dad7..128b2a2e5804 100644 --- a/drivers/block/paride/pg.c +++ b/drivers/block/paride/pg.c @@ -34,10 +34,10 @@ To use this device, you must have the following device special files defined: - /dev/pg0 b 97 0 - /dev/pg1 b 97 1 - /dev/pg2 b 97 2 - /dev/pg3 b 97 3 + /dev/pg0 c 97 0 + /dev/pg1 c 97 1 + /dev/pg2 c 97 2 + /dev/pg3 c 97 3 (You'll need to change the 97 to something else if you use the 'major' parameter to install the driver on a different @@ -117,9 +117,11 @@ /* Changes: 1.01 GRG 1998.06.16 Bug fixes + 1.02 GRG 1998.09.24 Added jumbo support + */ -#define PG_VERSION "1.01" +#define PG_VERSION "1.02" #define PG_MAJOR 97 #define PG_NAME "pg" #define PG_UNITS 4 @@ -324,6 +326,12 @@ int init_module(void) { int err; +#ifdef PARIDE_JUMBO + { extern paride_init(); + paride_init(); + } +#endif + err = pg_init(); return err; diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c index 44c4dadfbe6e..48fcdda747af 100644 --- a/drivers/block/paride/pt.c +++ b/drivers/block/paride/pt.c @@ -100,10 +100,11 @@ 1.02 GRG 1998.06.16 Eliminate an Ugh. 1.03 GRG 1998.08.15 Adjusted PT_TMO, use HZ in loop timing, extra debugging - + 1.04 GRG 1998.09.24 Repair minor coding error, added jumbo support + */ -#define PT_VERSION "1.03" +#define PT_VERSION "1.04" #define PT_MAJOR 96 #define PT_NAME "pt" #define PT_UNITS 4 @@ -328,6 +329,12 @@ int init_module(void) { int err; +#ifdef PARIDE_JUMBO + { extern paride_init(); + paride_init(); + } +#endif + err = pt_init(); return err; @@ -584,8 +591,8 @@ static int pt_identify( int unit ) char *ms[2] = {"master","slave"}; char mf[10], id[18]; char id_cmd[12] = { ATAPI_IDENTIFY,0,0,0,36,0,0,0,0,0,0,0}; - char ms_cmd[12] = { ATAPI_MODE_SENSE,0,0x2a,0,128,0,0,0,0,0,0,0}; - char ls_cmd[12] = { ATAPI_LOG_SENSE,0,0x71,0,0,0,0,0,128,0,0,0}; + char ms_cmd[12] = { ATAPI_MODE_SENSE,0,0x2a,0,36,0,0,0,0,0,0,0}; + char ls_cmd[12] = { ATAPI_LOG_SENSE,0,0x71,0,0,0,0,0,36,0,0,0}; char buf[36]; s = pt_atapi(unit,id_cmd,36,buf,"identify"); diff --git a/drivers/char/Makefile b/drivers/char/Makefile index 5d7857c77710..ac9462c9a355 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile @@ -27,9 +27,6 @@ ifdef CONFIG_VT L_OBJS += vt.o vc_screen.o consolemap.o consolemap_deftbl.o LX_OBJS += console.o selection.o endif -ifdef CONFIG_FB - LX_OBJS += fbmem.o -endif ifeq ($(CONFIG_SERIAL),y) ifndef CONFIG_SUN_SERIAL diff --git a/drivers/char/pty.c b/drivers/char/pty.c index a7ea984973d9..0b27057a17a6 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c @@ -336,7 +336,9 @@ static void pty_set_termios(struct tty_struct *tty, struct termios *old_termios) __initfunc(int pty_init(void)) { +#ifdef CONFIG_UNIX98_PTYS int i; +#endif /* Traditional BSD devices */ diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index a7345a979297..8b29e6fd7da3 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -1276,8 +1276,10 @@ retry_open: if (retval) return retval; +#ifdef CONFIG_UNIX98_PTYS /* N.B. this error exit may leave filp->f_flags with O_NONBLOCK set */ init_dev_done: +#endif filp->private_data = tty; check_tty_count(tty, "tty_open"); if (tty->driver.type == TTY_DRIVER_TYPE_PTY && diff --git a/drivers/isdn/isdn_net.c b/drivers/isdn/isdn_net.c index e976d0e87f07..33b122c96015 100644 --- a/drivers/isdn/isdn_net.c +++ b/drivers/isdn/isdn_net.c @@ -1042,12 +1042,14 @@ isdn_net_send_skb(struct device *ndev, isdn_net_local * lp, if (ret == len) { lp->transcount += len; clear_bit(0, (void *) &(ndev->tbusy)); + mark_bh(NET_BH); return 0; } if (ret < 0) { dev_kfree_skb(skb); lp->stats.tx_errors++; clear_bit(0, (void *) &(ndev->tbusy)); + mark_bh(NET_BH); return 0; } return 1; diff --git a/drivers/video/ati-gt.h b/drivers/video/ati-gt.h deleted file mode 100644 index 32dc792b53fa..000000000000 --- a/drivers/video/ati-gt.h +++ /dev/null @@ -1,203 +0,0 @@ -/* the usage for the following structs vary from the gx and vt: -and sdram and sgram gt's - pll registers (sdram) 6,7,11; - crtc_h_sync_strt_wid[3]; - dsp1[3] (sdram,sgram,unused) - dsp2[3] (offset regbase+24, depends on colour mode); - crtc_h_tot_disp,crtc_v_tot_disp,crtc_v_sync_strt_wid,unused; - pll registers (sgram) 7,11; -*/ - -/* Register values for 1280x1024, 75Hz mode (20). no 16/32 */ -static struct aty_regvals aty_gt_reg_init_20 = { - { 0x41, 0xf9, 0x04 }, - { 0xe02a7, 0x1401a6, 0 }, - { 0x260957, 0x2806d6, 0 }, - { 0x10006b6, 0x20006b6, 0x30006b6 }, - - 0x9f00d2, 0x03ff0429, 0x30400, 0, - { 0xb5, 0x04 } -}; - -#if 0 -/* Register values for 1280x960, 75Hz mode (19) */ -static struct aty_regvals aty_gt_reg_init_19 = { -}; -#endif - -/* Register values for 1152x870, 75Hz mode (18) */ -static struct aty_regvals aty_gt_reg_init_18 = { - { 0x41, 0xe6, 0x04 }, - { 0x300295, 0x300194, 0x300593 }, - { 0x260a1c, 0x380561, 0}, - { 0x1000744, 0x2000744, 0x3000744 }, - - 0x8f00b5, 0x3650392, 0x230368, 0, - { 0xe6, 0x04 } -}; - -/* Register values for 1024x768, 75Hz mode (17), 32 bpp untested */ -static struct aty_regvals aty_gt_reg_init_17 = { - { 0x41, 0xb5, 0x04 }, - { 0xc0283, 0xc0182, 0xc0581 }, - { 0x36066d, 0x3806d6, 0}, - { 0xa0049e, 0x100049e, 0x200049e }, - - 0x7f00a3, 0x2ff031f, 0x30300, 0, - { 0xb8, 0x04 } -}; - -#if 0 -/* Register values for x, Hz mode (16) */ -static struct aty_regvals aty_gt_reg_init_16 = { -}; -#endif - -/* Register values for 1024x768, 70Hz mode (15) */ -static struct aty_regvals aty_gt_reg_init_15 = { - { 0x41, 0xad, 0x04 }, - { 0x310284, 0x310183, 0x310582 }, - { 0x0, 0x380727 }, - { 0x0 }, - 0x7f00a5, 0x2ff0325, 0x260302, -}; - -/* Register values for 1024x768, 60Hz mode (14) */ -static struct aty_regvals aty_gt_reg_init_14 = { - { 0x40, 0xe1, 0x14 }, - { 0x310284, 0x310183, 0x310582 }, - { 0x3607c0, 0x380840, 0x0 }, - { 0xa80592, 0x1000592, 0x0 }, - - 0x7f00a7, 0x2ff0325, 0x260302, 0, - { 0xe1, 0x14 } -}; - -/* Register values for 832x624, 75Hz mode (13) */ -static struct aty_regvals aty_gt_reg_init_13 = { - { 0x40, 0xc6, 0x14 }, - { 0x28026d, 0x28016c, 0x28056b }, - { 0x3608cf, 0x380960, 0 }, - { 0xb00655, 0x1000655, 0x2000655 }, - - 0x67008f, 0x26f029a, 0x230270, 0, - { 0xc6, 0x14 } -}; - -/* Register values for 800x600, 75Hz mode (12) */ -static struct aty_regvals aty_gt_reg_init_12 = { - { 0x42, 0xe4, 0x04 }, - { 0xa0267, 0xa0166, 0x0a0565}, - { 0x360a33, 0x48056d, 0}, - { 0xc00755, 0x1000755, 0x02000755}, - - 0x630083, 0x2570270, 0x30258, 0, - { 0xe4, 0x4 } -}; - -/* Register values for 800x600, 72Hz mode (11) */ -static struct aty_regvals aty_gt_reg_init_11 = { - { 0x42, 0xe6, 0x04 }, - { 0xf026c, 0xf016b, 0xf056a }, - { 0x360a1d, 0x480561, 0}, - { 0xc00745, 0x1000745, 0x2000745 }, - - 0x630081, 0x02570299, 0x6027c -}; - -/* Register values for 800x600, 60Hz mode (10) */ -static struct aty_regvals aty_gt_reg_init_10 = { - { 0x42, 0xb8, 0x04 }, - { 0x10026a, 0x100169, 0x100568 }, - { 0x460652, 0x4806ba, 0}, - { 0x68048b, 0xa0048b, 0x100048b }, - - 0x630083, 0x02570273, 0x40258, 0, - { 0xb8, 0x4 } -}; - -/* Register values for 800x600, 56Hz mode (9) */ -static struct aty_regvals aty_gt_reg_init_9 = { - { 0x42, 0xf9, 0x14 }, - { 0x90268, 0x90167, 0x090566 }, - { 0x460701, 0x480774, 0}, - { 0x700509, 0xa80509, 0x1000509 }, - - 0x63007f, 0x2570270, 0x20258 -}; - -#if 0 -/* Register values for 768x576, 50Hz mode (8) */ -static struct aty_regvals aty_gt_reg_init_8 = { -}; - -/* Register values for 640x870, 75Hz Full Page Display (7) */ -static struct aty_regvals aty_gt_reg_init_7 = { -}; -#endif - -/* Register values for 640x480, 67Hz mode (6) */ -static struct aty_regvals aty_gt_reg_init_6 = { - { 0x42, 0xd1, 0x14 }, - { 0x280259, 0x280158, 0x280557 }, - { 0x460858, 0x4808e2, 0}, - { 0x780600, 0xb00600, 0x1000600 }, - - 0x4f006b, 0x1df020c, 0x2301e2, 0, - { 0x8b, 0x4 } -}; - -/* Register values for 640x480, 60Hz mode (5) */ -static struct aty_regvals aty_gt_reg_init_5 = { - { 0x43, 0xe8, 0x04 }, - { 0x2c0253, 0x2c0152, 0x2c0551 }, - { 0x460a06, 0x580555, 0}, - { 0x880734, 0xc00734, 0x1000734 }, - - 0x4f0063, 0x1df020c, 0x2201e9, 0, - { 0xe8, 0x04 } -}; - -#if 0 -/* Register values for x, Hz mode (4) */ -static struct aty_regvals aty_gt_reg_init_4 = { -}; - -/* Register values for x, Hz mode (3) */ -static struct aty_regvals aty_gt_reg_init_3 = { -}; - -/* Register values for x, Hz mode (2) */ -static struct aty_regvals aty_gt_reg_init_2 = { -}; - -/* Register values for x, Hz mode (1) */ -static struct aty_regvals aty_gt_reg_init_1 = { -}; -#endif - -/* yikes, more data structures (dsp2) - * XXX kludge for sgram - */ -static int sgram_dsp[20][3] = { - {0,0,0}, - {0,0,0}, - {0,0,0}, - {0,0,0}, - {0x5203d7,0x7803d9,0xb803dd}, //5 - {0x940666,0xe0066a,0x1700672}, //6 - {0,0,0}, - {0,0,0}, - {0x88055f,0xd80563,0x170056b}, //9 - {0x8404d9,0xb804dd,0x17004e5}, //10 - {0x7803e2,0xb803e6,0x17003ee}, //11 - {0x7803eb,0xb803ef,0x17003f7}, //12 - {0xe806c5,0x17006cd,0x2e006dd}, //13 - {0xe005f6,0x17005fe,0x2e0060e}, //14 - {0xd8052c,0x1700534,0x2e00544}, //15 - {0,0,0}, - {0xb804f2,0x17004e5,0x2e0050a}, //17 - {0xb803e6,0x17003ee,0x2e003fe}, //18 - {0,0,0}, - {0,0,0}, -}; diff --git a/drivers/video/ati-gx.h b/drivers/video/ati-gx.h deleted file mode 100644 index df48c1865bf3..000000000000 --- a/drivers/video/ati-gx.h +++ /dev/null @@ -1,122 +0,0 @@ -/* Register values for 1280x1024, 75Hz (WAS 60) mode (20) */ -static struct aty_regvals aty_gx_reg_init_20 = { - { 0x200, 0x200, 0x200 }, - - { 0x1200a5, 0x1200a3, 0x1200a3 }, - { 0x30c0200, 0x30e0300, 0x30e0300 }, - { 0x2, 0x3, 0x3 }, - - 0x9f00d2, 0x3ff0429, 0x30400, 0x28100040, - { 0xd4, 0x9 } -}; - -/* Register values for 1152x870, 75Hz mode (18) */ -static struct aty_regvals aty_gx_reg_init_18 = { - { 0x200, 0x200, 0x200 }, - - { 0x300097, 0x300095, 0x300094 }, - { 0x3090200, 0x30e0300, 0x30e0600 }, - { 0x2, 0x3, 0x6 }, - - 0x8f00b5, 0x3650392, 0x230368, 0x24100040, - { 0x53, 0x3 } -}; - -/* Register values for 1024x768, 75Hz mode (17) */ -static struct aty_regvals aty_gx_reg_init_17 = { - { 0x200, 0x200, 0x200 }, - - { 0x2c0087, 0x2c0085, 0x2c0084 }, - { 0x3070200, 0x30e0300, 0x30e0600 }, - { 0x2, 0x3, 0x6 }, - - 0x7f00a5, 0x2ff0323, 0x230302, 0x20100000, - { 0x42, 0x3 } -}; - -/* Register values for 1024x768, 72Hz mode (15) */ -static struct aty_regvals aty_gx_reg_init_15 = { - { 0, 0, 0 }, - - { 0x310086, 0x310084, 0x310084 }, - { 0x3070200, 0x30e0300, 0x30e0300 }, - { 0x2002312, 0x3002312, 0x3002312 }, - - 0x7f00a5, 0x2ff0325, 0x260302, 0x20100000, - { 0x88, 0x7 } -}; - -/* Register values for 1024x768, 60Hz mode (14) */ -static struct aty_regvals aty_gx_reg_init_14 = { - { 0, 0, 0 }, - - { 0x310086, 0x310084, 0x310084 }, - { 0x3060200, 0x30d0300, 0x30d0300 }, - { 0x2002312, 0x3002312, 0x3002312 }, - - 0x7f00a7, 0x2ff0325, 0x260302, 0x20100000, - { 0x6c, 0x6 } -}; - -/* Register values for 832x624, 75Hz mode (13) */ -static struct aty_regvals aty_gx_reg_init_13 = { - { 0x200, 0x200, 0x200 }, - - { 0x28006f, 0x28006d, 0x28006c }, - { 0x3050200, 0x30b0300, 0x30e0600 }, - { 0x2, 0x3, 0x6 }, - - 0x67008f, 0x26f029a, 0x230270, 0x1a100040, - { 0x4f, 0x5 } -}; - -#if 0 /* not filled in yet */ -/* Register values for 800x600, 75Hz mode (12) */ -static struct aty_regvals aty_gx_reg_init_12 = { - { 0x10, 0x28, 0x50 }, - { }, - { } /* pixel clock = 49.11MHz for V=74.40Hz */ -}; - -/* Register values for 800x600, 72Hz mode (11) */ -static struct aty_regvals aty_gx_reg_init_11 = { - { 0x10, 0x28, 0x50 }, - { }, - { } /* pixel clock = 49.63MHz for V=71.66Hz */ -}; - -/* Register values for 800x600, 60Hz mode (10) */ -static struct aty_regvals aty_gx_reg_init_10 = { - { 0x10, 0x28, 0x50 }, - { }, - { } /* pixel clock = 41.41MHz for V=59.78Hz */ -}; - -/* Register values for 640x870, 75Hz Full Page Display (7) */ -static struct aty_regvals aty_gx_reg_init_7 = { - { 0x10, 0x30, 0x68 }, - { }, - { } /* pixel clock = 57.29MHz for V=75.01Hz */ -}; -#endif - -/* Register values for 640x480, 67Hz mode (6) */ -static struct aty_regvals aty_gx_reg_init_6 = { - { 0x200, 0x200, 0x200 }, - - { 0x28005b, 0x280059, 0x280058 }, - { 0x3040200, 0x3060300, 0x30c0600 }, - { 0x2002312, 0x3002312, 0x6002312 }, - - 0x4f006b, 0x1df020c, 0x2301e2, 0x14100040, - { 0x35, 0x07 } -}; - -#if 0 /* not filled in yet */ -/* Register values for 640x480, 60Hz mode (5) */ -static struct aty_regvals aty_gx_reg_init_5 = { - { 0x200, 0x200, 0x200 }, - { }, - { 0x35, 0x07 } -}; -#endif diff --git a/drivers/video/ati-vt.h b/drivers/video/ati-vt.h deleted file mode 100644 index 3b25d6d5de60..000000000000 --- a/drivers/video/ati-vt.h +++ /dev/null @@ -1,147 +0,0 @@ -/* Register values for 1280x1024, 60Hz mode (20) */ -static struct aty_regvals aty_vt_reg_init_20 = { - { 0, 0, 0 }, - - { 0x002e02a7, 0x002e02a7, 0 }, - { 0x03070200, 0x03070200, 0 }, - { 0x0a00cb22, 0x0b00cb23, 0 }, - - 0x009f00d2, 0x03ff0429, 0x00030400, 0x28000000, - { 0x00, 0xaa } -}; - -/* Register values for 1280x960, 75Hz mode (19) */ -static struct aty_regvals aty_vt_reg_init_19 = { - { 0, 0, 0 }, - { 0x003202a3, 0x003201a2, 0 }, - { 0x030b0200, 0x030b0300, 0 }, - { 0x0a00cb22, 0x0b00cb23, 0 }, - - 0x009f00d1, 0x03bf03e7, 0x000303c0, 0x28000000, - { 0x00, 0xc6 } -}; - -/* Register values for 1152x870, 75Hz mode (18) */ -static struct aty_regvals aty_vt_reg_init_18 = { - { 0, 0, 0 }, - - { 0x00300295, 0x00300194, 0 }, - { 0x03080200, 0x03080300, 0 }, - { 0x0a00cb21, 0x0b00cb22, 0 }, - - 0x008f00b5, 0x03650392, 0x00230368, 0x24000000, - { 0x00, 0x9d } -}; - -/* Register values for 1024x768, 75Hz mode (17) */ -static struct aty_regvals aty_vt_reg_init_17 = { - { 0, 0, 0 }, - - { 0x002c0283, 0x002c0182, 0 }, - { 0x03080200, 0x03080300, 0 }, - { 0x0a00cb21, 0x0b00cb22, 0 }, - - 0x007f00a3, 0x02ff031f, 0x00030300, 0x20000000, - { 0x01, 0xf7 } -}; - -/* Register values for 1024x768, 70Hz mode (15) */ -static struct aty_regvals aty_vt_reg_init_15 = { - { 0, 0, 0 }, - { 0x00310284, 0x00310183, 0 }, - { 0x03080200, 0x03080300, 0 }, - { 0x0a00cb21, 0x0b00cb22, 0 }, - - 0x007f00a5, 0x02ff0325, 0x00260302, 0x20000000, - { 0x01, 0xeb } -}; - -/* Register values for 1024x768, 60Hz mode (14) */ -static struct aty_regvals aty_vt_reg_init_14 = { - { 0, 0, 0 }, - - { 0x00310284, 0x00310183, 0x00310582 }, /* 32 bit 0x00310582 */ - { 0x03080200, 0x03080300, 0x03070600 }, /* 32 bit 0x03070600 */ - { 0x0a00cb21, 0x0b00cb22, 0x0e00cb23 }, - - 0x007f00a7, 0x02ff0325, 0x00260302, 0x20000000, - { 0x01, 0xcc } -}; - -/* Register values for 832x624, 75Hz mode (13) */ -static struct aty_regvals aty_vt_reg_init_13 = { - { 0, 0, 0 }, - - { 0x0028026d, 0x0028016c, 0x0028056b }, - { 0x03080200, 0x03070300, 0x03090600 }, - { 0x0a00cb21, 0x0b00cb21, 0x0e00cb22 }, - - 0x0067008f, 0x026f029a, 0x00230270, 0x1a000000, - { 0x01, 0xb4 } -}; - -/* Register values for 800x600, 75Hz mode (12) */ -static struct aty_regvals aty_vt_reg_init_12 = { - { 0, 0, 0 }, - - { 0x002a0267, 0x002a0166, 0x002a0565 }, - { 0x03040200, 0x03060300, 0x03070600 }, - { 0x0a00cb21, 0x0b00cb21, 0x0e00cb22 }, - - 0x00630083, 0x02570270, 0x00030258, 0x19000000, - { 0x01, 0x9c } -}; - -/* Register values for 800x600, 72Hz mode (11) */ -static struct aty_regvals aty_vt_reg_init_11 = { - { 0, 0, 0 }, - - { 0x002f026c, 0x002f016b, 0x002f056a }, - { 0x03050200, 0x03070300, 0x03090600 }, - { 0x0a00cb21, 0x0b00cb21, 0x0e00cb22 }, - - 0x00630081, 0x02570299, 0x0006027c, 0x19000000, - { 0x01, 0x9d } -}; - -/* Register values for 800x600, 60Hz mode (10) */ -static struct aty_regvals aty_vt_reg_init_10 = { - { 0, 0, 0 }, - - { 0x0030026a, 0x00300169, 0x00300568 }, - { 0x03050200, 0x03070300, 0x03090600 }, - { 0x0a00cb21, 0x0b00cb21, 0x0e00cb22 }, - - 0x00630083, 0x02570273, 0x00040258, 0x19000000, - { 0x02, 0xfb } -}; - -/* Register values for 640x480, 67Hz mode (6) */ -static struct aty_regvals aty_vt_reg_init_6 = { - { 0, 0, 0 }, - - { 0x00280259, 0x00280158, 0x00280557 }, - { 0x03050200, 0x03070300, 0x030a0600 }, - { 0x0a00cb21, 0x0b00cb21, 0x0e00cb22 }, - - 0x004f006b, 0x01df020c, 0x002301e2, 0x14000000, - { 0x02, 0xbe } -}; - -/* Register values for 640x480, 60Hz mode (5) */ -static struct aty_regvals aty_vt_reg_init_5 = { - { 0, 0, 0 }, - - { 0x002c0253, 0x002c0152, 0x002c0551 }, - { 0x03050200, 0x03070300, 0x03090600 }, - { 0x0a00cb21, 0x0b00cb21, 0x0e00cb22 }, - - 0x004f0063, 0x01df020c, 0x002201e9, 0x14000000, - { 0x02, 0x9e } -}; - /* 8 bit 15 bit 32 bit */ -static int vt_mem_cntl[3][3] = { { 0x0A00CB21, 0x0B00CB21, 0x0E00CB21 }, /* 1 MB VRAM */ - { 0x0A00CB22, 0x0B00CB22, 0x0E00CB22 }, /* 2 MB VRAM */ - { 0x0200053B, 0x0300053B, 0x0600053B } /* 4 M B VRAM */ - }; - diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c index d3e339e4f5d2..5f1780bd8ded 100644 --- a/drivers/video/fbcmap.c +++ b/drivers/video/fbcmap.c @@ -31,10 +31,6 @@ static void memcpy_fs(int fsfromto, void *to, void *from, int len) } } -#define CNVT_TOHW(val,width) ((((val)<<(width))+0x7fff-(val))>>16) -#define CNVT_FROMHW(val,width) (((width) ? ((((val)<<16)-(val)) / \ - ((1<<(width))-1)) : 0)) - static u16 red2[] = { 0x0000, 0xaaaa }; @@ -163,9 +159,10 @@ void fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto) * Get the colormap for a screen */ -int fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, int kspc, +int fb_get_cmap(struct fb_cmap *cmap, int kspc, int (*getcolreg)(u_int, u_int *, u_int *, u_int *, u_int *, - struct fb_info *), struct fb_info *info) + struct fb_info *), + struct fb_info *info) { int i, start; u16 *red, *green, *blue, *transp; @@ -181,10 +178,6 @@ int fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, int kspc, for (i = 0; i < cmap->len; i++) { if (getcolreg(start++, &hred, &hgreen, &hblue, &htransp, info)) return 0; - hred = CNVT_FROMHW(hred, var->red.length); - hgreen = CNVT_FROMHW(hgreen, var->green.length); - hblue = CNVT_FROMHW(hblue, var->blue.length); - htransp = CNVT_FROMHW(htransp, var->transp.length); if (kspc) { *red = hred; *green = hgreen; @@ -212,9 +205,10 @@ int fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, int kspc, * Set the colormap for a screen */ -int fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, int kspc, +int fb_set_cmap(struct fb_cmap *cmap, int kspc, int (*setcolreg)(u_int, u_int, u_int, u_int, u_int, - struct fb_info *), struct fb_info *info) + struct fb_info *), + struct fb_info *info) { int i, start; u16 *red, *green, *blue, *transp; @@ -243,10 +237,6 @@ int fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, int kspc, else htransp = 0; } - hred = CNVT_TOHW(hred, var->red.length); - hgreen = CNVT_TOHW(hgreen, var->green.length); - hblue = CNVT_TOHW(hblue, var->blue.length); - htransp = CNVT_TOHW(htransp, var->transp.length); red++; green++; blue++; diff --git a/drivers/video/fbcon-afb.c b/drivers/video/fbcon-afb.c index a8c01d6a0fd7..205c1347d5d6 100644 --- a/drivers/video/fbcon-afb.c +++ b/drivers/video/fbcon-afb.c @@ -15,8 +15,8 @@ #include #include -#include "fbcon.h" -#include "fbcon-afb.h" +#include