diff -u --recursive --new-file v2.1.123/linux/Documentation/Configure.help linux/Documentation/Configure.help --- v2.1.123/linux/Documentation/Configure.help Mon Sep 28 10:51:32 1998 +++ linux/Documentation/Configure.help Mon Sep 28 11:09:52 1998 @@ -431,6 +431,20 @@ 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 @@ 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 -u --recursive --new-file v2.1.123/linux/Documentation/fb/vesafb.txt linux/Documentation/fb/vesafb.txt --- v2.1.123/linux/Documentation/fb/vesafb.txt Thu Jul 16 18:09:22 1998 +++ linux/Documentation/fb/vesafb.txt Tue Sep 29 21:03:34 1998 @@ -30,37 +30,66 @@ ============== 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 +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: - | 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. - - -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 -u --recursive --new-file v2.1.123/linux/Documentation/paride.txt linux/Documentation/paride.txt --- v2.1.123/linux/Documentation/paride.txt Tue Jun 23 10:01:18 1998 +++ linux/Documentation/paride.txt Mon Sep 28 10:51:16 1998 @@ -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 @@ 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 @@ 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 @@ 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,13 +290,56 @@ 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, diff -u --recursive --new-file v2.1.123/linux/Makefile linux/Makefile --- v2.1.123/linux/Makefile Mon Sep 28 10:51:32 1998 +++ linux/Makefile Mon Sep 28 10:51:19 1998 @@ -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 -u --recursive --new-file v2.1.123/linux/arch/i386/boot/video.S linux/arch/i386/boot/video.S --- v2.1.123/linux/arch/i386/boot/video.S Wed Jun 24 22:54:03 1998 +++ linux/arch/i386/boot/video.S Tue Sep 29 21:03:35 1998 @@ -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 @@ 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 @@ 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 @@ 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 -u --recursive --new-file v2.1.123/linux/arch/i386/defconfig linux/arch/i386/defconfig --- v2.1.123/linux/arch/i386/defconfig Mon Sep 28 10:51:32 1998 +++ linux/arch/i386/defconfig Tue Sep 29 11:20:28 1998 @@ -67,6 +67,7 @@ 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 -u --recursive --new-file v2.1.123/linux/arch/i386/kernel/io_apic.c linux/arch/i386/kernel/io_apic.c --- v2.1.123/linux/arch/i386/kernel/io_apic.c Mon Sep 28 10:51:33 1998 +++ linux/arch/i386/kernel/io_apic.c Tue Sep 29 21:57:11 1998 @@ -129,7 +129,7 @@ /* * 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 @@ 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 -u --recursive --new-file v2.1.123/linux/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c --- v2.1.123/linux/arch/i386/kernel/process.c Mon Sep 28 10:51:33 1998 +++ linux/arch/i386/kernel/process.c Tue Sep 29 11:41:15 1998 @@ -519,34 +519,22 @@ 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 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 -u --recursive --new-file v2.1.123/linux/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c --- v2.1.123/linux/arch/i386/kernel/ptrace.c Thu Sep 17 17:53:34 1998 +++ linux/arch/i386/kernel/ptrace.c Tue Sep 29 10:40:41 1998 @@ -647,8 +647,6 @@ #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 -u --recursive --new-file v2.1.123/linux/arch/i386/kernel/signal.c linux/arch/i386/kernel/signal.c --- v2.1.123/linux/arch/i386/kernel/signal.c Thu Sep 17 17:53:34 1998 +++ linux/arch/i386/kernel/signal.c Tue Sep 29 11:39:28 1998 @@ -153,11 +153,9 @@ 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 @@ 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 -u --recursive --new-file v2.1.123/linux/arch/i386/kernel/traps.c linux/arch/i386/kernel/traps.c --- v2.1.123/linux/arch/i386/kernel/traps.c Thu Sep 17 17:53:34 1998 +++ linux/arch/i386/kernel/traps.c Tue Sep 29 10:52:41 1998 @@ -385,20 +385,15 @@ { 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 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 -u --recursive --new-file v2.1.123/linux/drivers/block/Config.in linux/drivers/block/Config.in --- v2.1.123/linux/drivers/block/Config.in Thu Sep 17 17:53:35 1998 +++ linux/drivers/block/Config.in Mon Sep 28 11:09:52 1998 @@ -33,6 +33,7 @@ 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 -u --recursive --new-file v2.1.123/linux/drivers/block/ide-pci.c linux/drivers/block/ide-pci.c --- v2.1.123/linux/drivers/block/ide-pci.c Thu Sep 17 17:53:35 1998 +++ linux/drivers/block/ide-pci.c Mon Sep 28 11:09:52 1998 @@ -117,29 +117,39 @@ 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 @@ -175,6 +185,8 @@ pci_write_config_byte(dev, (PCI_INTERRUPT_LINE)|0x80, irq1); /* 0xbc */ } } + return dev->irq; + case PCI_DEVICE_ID_TTI_HPT343: return dev->irq; default: break; diff -u --recursive --new-file v2.1.123/linux/drivers/block/paride/frpw.c linux/drivers/block/paride/frpw.c --- v2.1.123/linux/drivers/block/paride/frpw.c Wed May 20 19:10:38 1998 +++ linux/drivers/block/paride/frpw.c Mon Sep 28 10:51:16 1998 @@ -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 @@ -183,6 +184,9 @@ /* returns chip_type: 0 = Xilinx, 1 = ASIC */ { int olddelay, a, b; + + w0(0); w2(8); udelay(50); w2(0xc); /* parallel bus reset */ + mdelay(1500); olddelay = pi->delay; pi->delay = 10; diff -u --recursive --new-file v2.1.123/linux/drivers/block/paride/jumbo linux/drivers/block/paride/jumbo --- v2.1.123/linux/drivers/block/paride/jumbo Wed Dec 31 16:00:00 1969 +++ linux/drivers/block/paride/jumbo Mon Sep 28 10:51:16 1998 @@ -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 -u --recursive --new-file v2.1.123/linux/drivers/block/paride/on26.c linux/drivers/block/paride/on26.c --- v2.1.123/linux/drivers/block/paride/on26.c Wed May 20 19:10:38 1998 +++ linux/drivers/block/paride/on26.c Mon Sep 28 10:51:16 1998 @@ -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 @@ } } -#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 @@ 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 @@ { 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 @@ on26_read_block, on26_connect, on26_disconnect, - 0, + on26_test_port, 0, 0, on26_log_adapter, diff -u --recursive --new-file v2.1.123/linux/drivers/block/paride/pcd.c linux/drivers/block/paride/pcd.c --- v2.1.123/linux/drivers/block/paride/pcd.c Wed Aug 26 11:37:35 1998 +++ linux/drivers/block/paride/pcd.c Mon Sep 28 10:51:16 1998 @@ -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 @@ #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) @@ -364,6 +365,12 @@ int init_module(void) { int err; + +#ifdef PARIDE_JUMBO + { extern paride_init(); + paride_init(); + } +#endif err = pcd_init(); diff -u --recursive --new-file v2.1.123/linux/drivers/block/paride/pd.c linux/drivers/block/paride/pd.c --- v2.1.123/linux/drivers/block/paride/pd.c Wed Aug 26 11:37:35 1998 +++ linux/drivers/block/paride/pd.c Mon Sep 28 10:51:16 1998 @@ -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 @@ -610,6 +611,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 -u --recursive --new-file v2.1.123/linux/drivers/block/paride/pf.c linux/drivers/block/paride/pf.c --- v2.1.123/linux/drivers/block/paride/pf.c Wed Aug 26 11:37:35 1998 +++ linux/drivers/block/paride/pf.c Mon Sep 28 10:51:16 1998 @@ -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 @@ -508,6 +509,12 @@ int init_module(void) { int err; + +#ifdef PARIDE_JUMBO + { extern paride_init(); + paride_init(); + } +#endif err = pf_init(); diff -u --recursive --new-file v2.1.123/linux/drivers/block/paride/pg.c linux/drivers/block/paride/pg.c --- v2.1.123/linux/drivers/block/paride/pg.c Wed Aug 26 11:37:35 1998 +++ linux/drivers/block/paride/pg.c Mon Sep 28 10:51:16 1998 @@ -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 @@ -323,6 +325,12 @@ int init_module(void) { int err; + +#ifdef PARIDE_JUMBO + { extern paride_init(); + paride_init(); + } +#endif err = pg_init(); diff -u --recursive --new-file v2.1.123/linux/drivers/block/paride/pt.c linux/drivers/block/paride/pt.c --- v2.1.123/linux/drivers/block/paride/pt.c Wed Aug 26 11:37:35 1998 +++ linux/drivers/block/paride/pt.c Mon Sep 28 10:51:16 1998 @@ -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 err; +#ifdef PARIDE_JUMBO + { extern paride_init(); + paride_init(); + } +#endif + err = pt_init(); return err; @@ -584,8 +591,8 @@ 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 -u --recursive --new-file v2.1.123/linux/drivers/char/Makefile linux/drivers/char/Makefile --- v2.1.123/linux/drivers/char/Makefile Mon Sep 28 10:51:33 1998 +++ linux/drivers/char/Makefile Tue Sep 29 21:01:15 1998 @@ -27,9 +27,6 @@ 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 -u --recursive --new-file v2.1.123/linux/drivers/char/fbmem.c linux/drivers/char/fbmem.c --- v2.1.123/linux/drivers/char/fbmem.c Wed Aug 26 11:37:36 1998 +++ linux/drivers/char/fbmem.c Wed Dec 31 16:00:00 1969 @@ -1,654 +0,0 @@ -/* - * linux/drivers/char/fbmem.c - * - * Copyright (C) 1994 Martin Schaller - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_PROC_FS -#include -#endif -#ifdef CONFIG_KMOD -#include -#endif - -#ifdef __mc68000__ -#include -#endif -#ifdef __powerpc__ -#include -#endif -#include -#include -#include - -#include - - - /* - * Frame buffer device initialization and setup routines - */ - -extern unsigned long acornfb_init(void); -extern void acornfb_setup(char *options, int *ints); -extern void amifb_init(void); -extern void amifb_setup(char *options, int *ints); -extern void atafb_init(void); -extern void atafb_setup(char *options, int *ints); -extern void macfb_init(void); -extern void macfb_setup(char *options, int *ints); -extern void cyberfb_init(void); -extern void cyberfb_setup(char *options, int *ints); -extern void retz3fb_init(void); -extern void retz3fb_setup(char *options, int *ints); -extern void clgenfb_init(void); -extern void clgenfb_setup(char *options, int *ints); -extern void vfb_init(void); -extern void vfb_setup(char *options, int *ints); -extern void offb_init(void); -extern void offb_setup(char *options, int *ints); -extern void atyfb_init(void); -extern void atyfb_setup(char *options, int *ints); -extern void dnfb_init(void); -extern void tgafb_init(void); -extern void virgefb_init(void); -extern void virgefb_setup(char *options, int *ints); -extern void resolver_video_setup(char *options, int *ints); -extern void s3triofb_init(void); -extern void s3triofb_setup(char *options, int *ints); -extern void vgafb_init(void); -extern void vgafb_setup(char *options, int *ints); -extern void vesafb_init(void); -extern void vesafb_setup(char *options, int *ints); -extern void mdafb_init(void); -extern void mdafb_setup(char *options, int *ints); -extern void hpfb_init(void); -extern void hpfb_setup(char *options, int *ints); -extern void sbusfb_init(void); -extern void sbusfb_setup(char *options, int *ints); - -static struct { - const char *name; - void (*init)(void); - void (*setup)(char *options, int *ints); -} fb_drivers[] __initdata = { -#ifdef CONFIG_FB_RETINAZ3 - { "retz3", retz3fb_init, retz3fb_setup }, -#endif -#ifdef CONFIG_FB_ACORN - { "acorn", acornfb_init, acornfb_setup }, -#endif -#ifdef CONFIG_FB_AMIGA - { "amifb", amifb_init, amifb_setup }, -#endif -#ifdef CONFIG_FB_ATARI - { "atafb", atafb_init, atafb_setup }, -#endif -#ifdef CONFIG_FB_MAC - { "macfb", macfb_init, macfb_setup }, -#endif -#ifdef CONFIG_FB_CYBER - { "cyber", cyberfb_init, cyberfb_setup }, -#endif -#ifdef CONFIG_FB_CLGEN - { "clgen", clgenfb_init, clgenfb_setup }, -#endif -#ifdef CONFIG_FB_OF - { "offb", offb_init, offb_setup }, -#endif -#ifdef CONFIG_FB_ATY - { "atyfb", atyfb_init, atyfb_setup }, -#endif -#ifdef CONFIG_APOLLO - { "apollo", dnfb_init, NULL }, -#endif -#ifdef CONFIG_FB_S3TRIO - { "s3trio", s3triofb_init, s3triofb_setup }, -#endif -#ifdef CONFIG_FB_TGA - { "tga", tgafb_init, NULL }, -#endif -#ifdef CONFIG_FB_VIRGE - { "virge", virgefb_init, virgefb_setup }, -#endif -#ifdef CONFIG_FB_VGA - { "vga", vgafb_init, vgafb_setup }, -#endif -#ifdef CONFIG_FB_VESA - { "vesa", vesafb_init, vesafb_setup }, -#endif -#ifdef CONFIG_FB_MDA - { "mda", mdafb_init, mdafb_setup }, -#endif -#ifdef CONFIG_FB_HP300 - { "hpfb", hpfb_init, hpfb_setup }, -#endif -#ifdef CONFIG_FB_SBUS - { "sbus", sbusfb_init, sbusfb_setup }, -#endif -#ifdef CONFIG_GSP_RESOLVER - /* Not a real frame buffer device... */ - { "resolver", NULL, resolver_video_setup }, -#endif -#ifdef CONFIG_FB_VIRTUAL - /* Must be last to avoid that vfb becomes your primary display */ - { "vfb", vfb_init, vfb_setup }, -#endif -}; - -#define NUM_FB_DRIVERS (sizeof(fb_drivers)/sizeof(*fb_drivers)) - -static void (*pref_init_funcs[FB_MAX])(void); -static int num_pref_init_funcs __initdata = 0; - - -#define GET_INODE(i) MKDEV(FB_MAJOR, (i) << FB_MODES_SHIFT) -#define GET_FB_VAR_IDX(node) (MINOR(node) & ((1 << FB_MODES_SHIFT)-1)) - -struct fb_info *registered_fb[FB_MAX]; -int num_registered_fb = 0; - -char con2fb_map[MAX_NR_CONSOLES]; - -static inline int PROC_CONSOLE(void) -{ - if (!current->tty) - return fg_console; - - if (current->tty->driver.type != TTY_DRIVER_TYPE_CONSOLE) - /* XXX Should report error here? */ - return fg_console; - - if (MINOR(current->tty->device) < 1) - return fg_console; - - return MINOR(current->tty->device) - 1; -} - -#ifdef CONFIG_PROC_FS -static int fbmem_read_proc(char *buf, char **start, off_t offset, - int len, int *eof, void *private) -{ - struct fb_info **fi; - - len = 0; - for (fi = registered_fb; fi < ®istered_fb[FB_MAX] && len < 4000; fi++) - if (*fi) - len += sprintf(buf + len, "%d %s\n", - GET_FB_IDX((*fi)->node), - (*fi)->modename); - *start = buf + offset; - return len > offset ? len - offset : 0; -} -#endif - -static ssize_t -fb_read(struct file *file, char *buf, size_t count, loff_t *ppos) -{ - unsigned long p = *ppos; - struct inode *inode = file->f_dentry->d_inode; - int fbidx = GET_FB_IDX(inode->i_rdev); - struct fb_info *info = registered_fb[fbidx]; - struct fb_ops *fb = info->fbops; - struct fb_fix_screeninfo fix; - char *base_addr; - ssize_t copy_size; - - if (! fb || ! info->disp) - return -ENODEV; - - fb->fb_get_fix(&fix,PROC_CONSOLE(), info); - base_addr=info->disp->screen_base; - copy_size=(count + p <= fix.smem_len ? count : fix.smem_len - p); - if (copy_to_user(buf, base_addr+p, copy_size)) - return -EFAULT; - *ppos += copy_size; - return copy_size; -} - -static ssize_t -fb_write(struct file *file, const char *buf, size_t count, loff_t *ppos) -{ - unsigned long p = *ppos; - struct inode *inode = file->f_dentry->d_inode; - int fbidx = GET_FB_IDX(inode->i_rdev); - struct fb_info *info = registered_fb[fbidx]; - struct fb_ops *fb = info->fbops; - struct fb_fix_screeninfo fix; - char *base_addr; - ssize_t copy_size; - - if (! fb || ! info->disp) - return -ENODEV; - - fb->fb_get_fix(&fix, PROC_CONSOLE(), info); - base_addr=info->disp->screen_base; - copy_size=(count + p <= fix.smem_len ? count : fix.smem_len - p); - if (copy_from_user(base_addr+p, buf, copy_size)) - return -EFAULT; - file->f_pos += copy_size; - return copy_size; -} - - -static void set_con2fb_map(int unit, int newidx) -{ - int oldidx = con2fb_map[unit]; - struct fb_info *oldfb, *newfb; - struct vc_data *conp; - - if (newidx != con2fb_map[unit]) { - oldfb = registered_fb[oldidx]; - newfb = registered_fb[newidx]; - if (newfb->fbops->fb_open(newfb,0)) - return; - oldfb->fbops->fb_release(oldfb,0); - conp = fb_display[unit].conp; - con2fb_map[unit] = newidx; - fb_display[unit] = *(newfb->disp); - fb_display[unit].conp = conp; - fb_display[unit].fb_info = newfb; - if (!newfb->changevar) - newfb->changevar = oldfb->changevar; - /* tell console var has changed */ - if (newfb->changevar) - newfb->changevar(unit); - } -} - -#ifdef CONFIG_KMOD -static void try_to_load(int fb) -{ - char modname[16]; - - sprintf(modname, "fb%d", fb); - request_module(modname); -} -#endif /* CONFIG_KMOD */ - -static int -fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) -{ - int fbidx = GET_FB_IDX(inode->i_rdev); - struct fb_info *info = registered_fb[fbidx]; - struct fb_ops *fb = info->fbops; - struct fb_cmap cmap; - struct fb_var_screeninfo var; - struct fb_fix_screeninfo fix; - struct fb_con2fbmap con2fb; - int i; - - if (! fb) - return -ENODEV; - switch (cmd) { - case FBIOGET_VSCREENINFO: - if ((i = fb->fb_get_var(&var, PROC_CONSOLE(), info))) - return i; - return copy_to_user((void *) arg, &var, - sizeof(var)) ? -EFAULT : 0; - case FBIOPUT_VSCREENINFO: - if (copy_from_user(&var, (void *) arg, sizeof(var))) - return -EFAULT; - if ((i = fb->fb_set_var(&var, PROC_CONSOLE(), info))) - return i; - if (copy_to_user((void *) arg, &var, sizeof(var))) - return -EFAULT; - return 0; - case FBIOGET_FSCREENINFO: - if ((i = fb->fb_get_fix(&fix, PROC_CONSOLE(), info))) - return i; - return copy_to_user((void *) arg, &fix, sizeof(fix)) ? - -EFAULT : 0; - case FBIOPUTCMAP: - if (copy_from_user(&cmap, (void *) arg, sizeof(cmap))) - return -EFAULT; - return (fb->fb_set_cmap(&cmap, 0, PROC_CONSOLE(), info)); - case FBIOGETCMAP: - if (copy_from_user(&cmap, (void *) arg, sizeof(cmap))) - return -EFAULT; - return (fb->fb_get_cmap(&cmap, 0, PROC_CONSOLE(), info)); - case FBIOPAN_DISPLAY: - if (copy_from_user(&var, (void *) arg, sizeof(var))) - return -EFAULT; - if ((i=fb->fb_pan_display(&var, PROC_CONSOLE(), info))) - return i; - if (copy_to_user((void *) arg, &var, sizeof(var))) - return -EFAULT; - return i; - case FBIOGET_CON2FBMAP: - if (copy_from_user(&con2fb, (void *)arg, sizeof(con2fb))) - return -EFAULT; - if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES) - return -EINVAL; - con2fb.framebuffer = con2fb_map[con2fb.console-1]; - return copy_to_user((void *)arg, &con2fb, - sizeof(con2fb)) ? -EFAULT : 0; - case FBIOPUT_CON2FBMAP: - if (copy_from_user(&con2fb, (void *)arg, sizeof(con2fb))) - return - EFAULT; - if (con2fb.console < 0 || con2fb.console > MAX_NR_CONSOLES) - return -EINVAL; - if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX) - return -EINVAL; -#ifdef CONFIG_KMOD - if (!registered_fb[con2fb.framebuffer]) - try_to_load(con2fb.framebuffer); -#endif /* CONFIG_KMOD */ - if (!registered_fb[con2fb.framebuffer]) - return -EINVAL; - if (con2fb.console != 0) - set_con2fb_map(con2fb.console-1, con2fb.framebuffer); - else - /* set them all */ - for (i = 0; i < MAX_NR_CONSOLES; i++) - set_con2fb_map(i, con2fb.framebuffer); - return 0; - default: - return fb->fb_ioctl(inode, file, cmd, arg, PROC_CONSOLE(), - info); - } -} - -static int -fb_mmap(struct file *file, struct vm_area_struct * vma) -{ - int fbidx = GET_FB_IDX(file->f_dentry->d_inode->i_rdev); - struct fb_info *info = registered_fb[fbidx]; - struct fb_ops *fb = info->fbops; - struct fb_fix_screeninfo fix; - struct fb_var_screeninfo var; - unsigned long start; - u32 len; - - if (!fb) - return -ENODEV; - if (fb->fb_mmap) - return fb->fb_mmap(info, file, vma); - fb->fb_get_fix(&fix, PROC_CONSOLE(), info); - - /* frame buffer memory */ - start = (unsigned long)fix.smem_start; - len = (start & ~PAGE_MASK)+fix.smem_len; - start &= PAGE_MASK; - len = (len+~PAGE_MASK) & PAGE_MASK; - if (vma->vm_offset >= len) { - /* memory mapped io */ - vma->vm_offset -= len; - fb->fb_get_var(&var, PROC_CONSOLE(), info); - if (var.accel_flags) - return -EINVAL; - start = (unsigned long)fix.mmio_start; - len = (start & ~PAGE_MASK)+fix.mmio_len; - start &= PAGE_MASK; - len = (len+~PAGE_MASK) & PAGE_MASK; - } - if ((vma->vm_end - vma->vm_start + vma->vm_offset) > len) - return -EINVAL; - vma->vm_offset += start; - if (vma->vm_offset & ~PAGE_MASK) - return -ENXIO; -#if defined(__mc68000__) - if (CPU_IS_020_OR_030) - pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030; - if (CPU_IS_040_OR_060) { - pgprot_val(vma->vm_page_prot) &= _CACHEMASK040; - /* Use no-cache mode, serialized */ - pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S; - } -#elif defined(__powerpc__) - pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE|_PAGE_GUARDED; -#elif defined(__alpha__) - /* Caching is off in the I/O space quadrant by design. */ -#elif defined(__sparc__) - /* Should never get here, all fb drivers should have their own - mmap routines */ -#elif defined(__i386__) - if (boot_cpu_data.x86 > 3) - pgprot_val(vma->vm_page_prot) |= _PAGE_PCD; -#else -#warning What do we have to do here?? -#endif - if (remap_page_range(vma->vm_start, vma->vm_offset, - vma->vm_end - vma->vm_start, vma->vm_page_prot)) - return -EAGAIN; - vma->vm_file = file; - file->f_count++; - return 0; -} - -static int -fb_open(struct inode *inode, struct file *file) -{ - int fbidx = GET_FB_IDX(inode->i_rdev); - struct fb_info *info; - -#ifdef CONFIG_KMOD - if (!(info = registered_fb[fbidx])) - try_to_load(fbidx); -#endif /* CONFIG_KMOD */ - if (!(info = registered_fb[fbidx])) - return -ENODEV; - return info->fbops->fb_open(info,1); -} - -static int -fb_release(struct inode *inode, struct file *file) -{ - int fbidx = GET_FB_IDX(inode->i_rdev); - struct fb_info *info = registered_fb[fbidx]; - - info->fbops->fb_release(info,1); - return 0; -} - -static struct file_operations fb_fops = { - NULL, /* lseek */ - fb_read, /* read */ - fb_write, /* write */ - NULL, /* readdir */ - NULL, /* poll */ - fb_ioctl, /* ioctl */ - fb_mmap, /* mmap */ - fb_open, /* open */ - NULL, /* flush */ - fb_release, /* release */ - NULL /* fsync */ -}; - -int -register_framebuffer(struct fb_info *fb_info) -{ - int i, j; - static int fb_ever_opened[FB_MAX]; - static int first = 1; - - if (num_registered_fb == FB_MAX) - return -ENXIO; - num_registered_fb++; - for (i = 0 ; i < FB_MAX; i++) - if (!registered_fb[i]) - break; - fb_info->node=GET_INODE(i); - registered_fb[i] = fb_info; - if (!fb_ever_opened[i]) { - /* - * We assume initial frame buffer devices can be opened this - * many times - */ - for (j = 0; j < MAX_NR_CONSOLES; j++) - if (con2fb_map[j] == i) - fb_info->fbops->fb_open(fb_info,0); - fb_ever_opened[i] = 1; - } - - if (first) { - first = 0; - take_over_console(&fb_con, 0, MAX_NR_CONSOLES-1, 1); - } - - return 0; -} - -int -unregister_framebuffer(const struct fb_info *fb_info) -{ - int i, j; - - i = GET_FB_IDX(fb_info->node); - for (j = 0; j < MAX_NR_CONSOLES; j++) - if (con2fb_map[j] == i) - return -EBUSY; - if (!registered_fb[i]) - return -EINVAL; - registered_fb[i]=NULL; - num_registered_fb--; - return 0; -} - -#ifdef CONFIG_PROC_FS -static struct proc_dir_entry *proc_fbmem; -#endif - -__initfunc(void -fbmem_init(void)) -{ - int i; - -#ifdef CONFIG_PROC_FS - proc_fbmem = create_proc_entry("fb", 0, 0); - if (proc_fbmem) - proc_fbmem->read_proc = fbmem_read_proc; -#endif - - if (register_chrdev(FB_MAJOR,"fb",&fb_fops)) - printk("unable to get major %d for fb devs\n", FB_MAJOR); - - /* - * Probe for all builtin frame buffer devices - */ - for (i = 0; i < num_pref_init_funcs; i++) - pref_init_funcs[i](); - - for (i = 0; i < NUM_FB_DRIVERS; i++) - if (fb_drivers[i].init) - fb_drivers[i].init(); -} - - -int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal, - const struct fb_info *fb_info) -{ -#if 0 - /* - * long long divisions .... $#%%#$ - */ - unsigned long long hpicos, vpicos; - const unsigned long long _1e12 = 1000000000000ULL; - const struct fb_monspecs *monspecs = &fb_info->monspecs; - - hpicos = (unsigned long long)htotal*(unsigned long long)pixclock; - vpicos = (unsigned long long)vtotal*(unsigned long long)hpicos; - if (!vpicos) - return 0; - - if (monspecs->hfmin == 0) - return 1; - - if (hpicos*monspecs->hfmin > _1e12 || hpicos*monspecs->hfmax < _1e12 || - vpicos*monspecs->vfmin > _1e12 || vpicos*monspecs->vfmax < _1e12) - return 0; -#endif - return 1; -} - -int fbmon_dpms(const struct fb_info *fb_info) -{ - return fb_info->monspecs.dpms; -} - - - /* - * Command line options - */ - -__initfunc(void video_setup(char *options, int *ints)) -{ - int i, j; - - if (!options || !*options) - return; - - if (!strncmp(options, "map:", 4)) { - options += 4; - if (*options) - for (i = 0, j = 0; i < MAX_NR_CONSOLES; i++) { - if (!options[j]) - j = 0; - con2fb_map[i] = (options[j++]-'0') % FB_MAX; - } - return; - } - - if (num_pref_init_funcs == FB_MAX) - return; - - for (i = 0; i < NUM_FB_DRIVERS; i++) { - j = strlen(fb_drivers[i].name); - if (!strncmp(options, fb_drivers[i].name, j) && - options[j] == ':') { - if (!strcmp(options+j+1, "off")) - fb_drivers[i].init = NULL; - else { - if (fb_drivers[i].init) { - pref_init_funcs[num_pref_init_funcs++] = - fb_drivers[i].init; - fb_drivers[i].init = NULL; - } - if (fb_drivers[i].setup) - fb_drivers[i].setup(options+j+1, ints); - } - return; - } - } - /* - * If we get here no fb was specified and we default to pass the - * options to the first frame buffer that has an init and a setup - * function. - */ - for (i = 0; i < NUM_FB_DRIVERS; i++) { - if (fb_drivers[i].init && fb_drivers[i].setup) { - pref_init_funcs[num_pref_init_funcs++] = - fb_drivers[i].init; - fb_drivers[i].init = NULL; - - fb_drivers[i].setup(options, ints); - return; - } - } -} - - - /* - * Visible symbols for modules - */ - -EXPORT_SYMBOL(register_framebuffer); -EXPORT_SYMBOL(unregister_framebuffer); diff -u --recursive --new-file v2.1.123/linux/drivers/char/pty.c linux/drivers/char/pty.c --- v2.1.123/linux/drivers/char/pty.c Tue Aug 18 22:02:03 1998 +++ linux/drivers/char/pty.c Mon Sep 28 11:07:45 1998 @@ -336,7 +336,9 @@ __initfunc(int pty_init(void)) { +#ifdef CONFIG_UNIX98_PTYS int i; +#endif /* Traditional BSD devices */ diff -u --recursive --new-file v2.1.123/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c --- v2.1.123/linux/drivers/char/tty_io.c Mon Sep 28 10:51:33 1998 +++ linux/drivers/char/tty_io.c Mon Sep 28 11:07:45 1998 @@ -1276,8 +1276,10 @@ 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 -u --recursive --new-file v2.1.123/linux/drivers/isdn/isdn_net.c linux/drivers/isdn/isdn_net.c --- v2.1.123/linux/drivers/isdn/isdn_net.c Wed May 20 19:10:39 1998 +++ linux/drivers/isdn/isdn_net.c Tue Sep 29 21:30:05 1998 @@ -1042,12 +1042,14 @@ 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 -u --recursive --new-file v2.1.123/linux/drivers/video/ati-gt.h linux/drivers/video/ati-gt.h --- v2.1.123/linux/drivers/video/ati-gt.h Thu Mar 26 15:57:04 1998 +++ linux/drivers/video/ati-gt.h Wed Dec 31 16:00:00 1969 @@ -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 -u --recursive --new-file v2.1.123/linux/drivers/video/ati-gx.h linux/drivers/video/ati-gx.h --- v2.1.123/linux/drivers/video/ati-gx.h Thu Mar 26 15:57:04 1998 +++ linux/drivers/video/ati-gx.h Wed Dec 31 16:00:00 1969 @@ -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 -u --recursive --new-file v2.1.123/linux/drivers/video/ati-vt.h linux/drivers/video/ati-vt.h --- v2.1.123/linux/drivers/video/ati-vt.h Thu Mar 26 15:57:04 1998 +++ linux/drivers/video/ati-vt.h Wed Dec 31 16:00:00 1969 @@ -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 -u --recursive --new-file v2.1.123/linux/drivers/video/fbcmap.c linux/drivers/video/fbcmap.c --- v2.1.123/linux/drivers/video/fbcmap.c Sun Jul 26 11:57:17 1998 +++ linux/drivers/video/fbcmap.c Tue Sep 29 20:56:33 1998 @@ -31,10 +31,6 @@ } } -#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 @@ * 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 @@ 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 @@ * 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 @@ 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 -u --recursive --new-file v2.1.123/linux/drivers/video/fbcon-afb.c linux/drivers/video/fbcon-afb.c --- v2.1.123/linux/drivers/video/fbcon-afb.c Tue Jul 28 14:21:09 1998 +++ linux/drivers/video/fbcon-afb.c Tue Sep 29 21:01:45 1998 @@ -15,8 +15,8 @@ #include #include -#include "fbcon.h" -#include "fbcon-afb.h" +#include