Commit 537b6ff0 authored by Linus Torvalds's avatar Linus Torvalds

Import 0.99.13k

parent 4779b38b
VERSION = 0.99
PATCHLEVEL = 13
ALPHA = k
all: Version zImage
......@@ -41,7 +44,8 @@ ROOT_DEV = CURRENT
# The number is the same as you would ordinarily press at bootup.
#
SVGA_MODE= -DSVGA_MODE=3
# SVGA_MODE= -DSVGA_MODE=3
SVGA_MODE= -DSVGA_MODE=NORMAL_VGA
# Special options.
#OPTS = -pro
......@@ -50,7 +54,7 @@ SVGA_MODE= -DSVGA_MODE=3
# standard CFLAGS
#
CFLAGS = -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer # -x c++
CFLAGS = -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -pipe # -x c++
ifdef CONFIG_M486
CFLAGS := $(CFLAGS) -m486
......@@ -77,15 +81,27 @@ STRIP =strip
ARCHIVES =kernel/kernel.o mm/mm.o fs/fs.o net/net.o ipc/ipc.o
FILESYSTEMS =fs/filesystems.a
DRIVERS =kernel/blk_drv/blk_drv.a kernel/chr_drv/chr_drv.a \
kernel/blk_drv/scsi/scsi.a kernel/chr_drv/sound/sound.a \
DRIVERS =drivers/block/block.a \
drivers/char/char.a \
drivers/net/net.a \
ibcs/ibcs.o
MATH =kernel/FPU-emu/math.a
LIBS =lib/lib.a
SUBDIRS =kernel mm fs net ipc ibcs lib
SUBDIRS =kernel drivers mm fs net ipc ibcs lib
KERNELHDRS =/usr/src/linux/include
ifdef CONFIG_SCSI
DRIVERS := $(DRIVERS) drivers/scsi/scsi.a
endif
ifdef CONFIG_SOUND
DRIVERS := $(DRIVERS) drivers/sound/sound.a
endif
ifdef CONFIG_MATH_EMULATION
DRIVERS := $(DRIVERS) drivers/FPU-emu/math.a
endif
.c.s:
$(CC) $(CFLAGS) -S -o $*.s $<
.s.o:
......@@ -102,7 +118,7 @@ config:
$(MAKE) soundconf
soundconf:
cd kernel/chr_drv/sound;$(MAKE) config
cd drivers/sound;$(MAKE) config
linuxsubdirs: dummy
@for i in $(SUBDIRS); do (cd $$i && echo $$i && $(MAKE)) || exit; done
......@@ -111,7 +127,7 @@ tools/./version.h: tools/version.h
tools/version.h: $(CONFIGURE) Makefile
@./makever.sh
@echo \#define UTS_RELEASE \"0.99.13\" > tools/version.h
@echo \#define UTS_RELEASE \"$(VERSION).$(PATCHLEVEL)$(ALPHA)\" > tools/version.h
@echo \#define UTS_VERSION \"\#`cat .version` `date`\" >> tools/version.h
@echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> tools/version.h
@echo \#define LINUX_COMPILE_BY \"`whoami`\" >> tools/version.h
......@@ -137,7 +153,6 @@ tools/system: boot/head.o init/main.o tools/version.o linuxsubdirs
$(ARCHIVES) \
$(FILESYSTEMS) \
$(DRIVERS) \
$(MATH) \
$(LIBS) \
-o tools/system > System.map
......@@ -176,7 +191,6 @@ tools/zSystem: boot/head.o init/main.o tools/version.o linuxsubdirs
$(ARCHIVES) \
$(FILESYSTEMS) \
$(DRIVERS) \
$(MATH) \
$(LIBS) \
-o tools/zSystem > zSystem.map
......@@ -192,11 +206,15 @@ mm: dummy
kernel: dummy
$(MAKE) linuxsubdirs SUBDIRS=kernel
drivers: dummy
$(MAKE) linuxsubdirs SUBDIRS=drivers
clean:
rm -f zImage zSystem.map tools/zSystem
rm -f Image System.map core boot/bootsect boot/setup \
rm -f core `find . -name '*.[oas]' -print`
rm -f zImage zSystem.map tools/zSystem tools/system
rm -f Image System.map boot/bootsect boot/setup \
boot/bootsect.s boot/setup.s boot/head.s init/main.s
rm -f init/*.o tools/system tools/build boot/*.o tools/*.o
rm -f init/*.o tools/build boot/*.o tools/*.o
for i in zBoot $(SUBDIRS); do (cd $$i && $(MAKE) clean); done
mrproper: clean
......@@ -204,6 +222,8 @@ mrproper: clean
rm -f .version .config* config.old
rm -f .depend `find . -name .depend -print`
distclean: mrproper
backup: mrproper
cd .. && tar cf - linux | gzip -9 > backup.gz
sync
......
......@@ -165,8 +165,8 @@ CONFIGURING the kernel:
should probably answer 'n' to the questions for a "production"
kernel.
- edit net/inet/CONFIG to configure the networking parts of the kernel.
The comments should hopefully clarify it all.
- edit drivers/net/CONFIG to configure the networking parts of the
kernel. The comments should hopefully clarify it all.
- Check the top Makefile for further site-dependent configuration
(default SVGA mode etc).
......
This diff is collapsed.
......@@ -822,7 +822,7 @@ moparadise: .byte 0x04, 0x55, 0x54
motrident: .byte 0x09, 0x50, 0x51, 0x52, 0x57, 0x58, 0x59, 0x5a
motseng: .byte 0x07, 0x26, 0x2a, 0x23, 0x24, 0x22
movideo7: .byte 0x08, 0x40, 0x43, 0x44, 0x41, 0x42, 0x45
mooakvga: .byte 0x07, 0x00, 0x07, 0x4f, 0x50, 0x51
mooakvga: .byte 0x08, 0x00, 0x07, 0x4e, 0x4f, 0x50, 0x51
mof1280: .byte 0x04, 0x54, 0x55
mounknown: .byte 0x02
......@@ -840,7 +840,7 @@ dscparadise: .word 0x5032, 0x501c, 0x8419, 0x842b
dsctrident: .word 0x5032, 0x501c, 0x501e, 0x502b, 0x503c, 0x8419, 0x841e, 0x842b, 0x843c
dsctseng: .word 0x5032, 0x501c, 0x503c, 0x6428, 0x8419, 0x841c, 0x842c
dscvideo7: .word 0x5032, 0x501c, 0x502b, 0x503c, 0x643c, 0x8419, 0x842c, 0x841c
dscoakvga: .word 0x5032, 0x501c, 0x2819, 0x5019, 0x843c, 0x8419, 0x842C
dscoakvga: .word 0x5032, 0x501c, 0x2819, 0x5019, 0x503c, 0x843c, 0x8419, 0x842b
dscf1280: .word 0x5032, 0x501c, 0x842b, 0x8419
dsunknown: .word 0x5032, 0x501c
modesave: .word SVGA_MODE
......
......@@ -5,11 +5,11 @@
*
* General setup
*
bool 'Kernel math emulation' CONFIG_MATH_EMULATION y
bool 'Kernel math emulation' CONFIG_MATH_EMULATION n
bool 'Normal harddisk support' CONFIG_BLK_DEV_HD y
bool 'XT harddisk support' CONFIG_BLK_DEV_XD n
bool 'TCP/IP networking' CONFIG_INET y
bool 'Limit memory to low 16MB' CONFIG_MAX_16M n
bool 'Limit memory to low 16MB' CONFIG_MAX_16M y
bool 'System V IPC' CONFIG_SYSVIPC y
bool 'Use -m486 flag for 486-specific optimizations' CONFIG_M486 y
*
......@@ -28,23 +28,28 @@ else
*
* SCSI support type (disk, tape, CDrom)
*
bool 'Scsi disk support' CONFIG_BLK_DEV_SD n
bool 'Scsi tape support' CONFIG_BLK_DEV_ST n
bool 'Scsi CDROM support' CONFIG_BLK_DEV_SR n
bool 'Scsi disk support' CONFIG_BLK_DEV_SD y
bool 'Scsi tape support' CONFIG_CHR_DEV_ST y
bool 'Scsi CDROM support' CONFIG_BLK_DEV_SR y
bool 'Scsi generic support' CONFIG_CHR_DEV_SG y
*
* SCSI low-level drivers
*
bool 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 n
bool 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 n
bool 'Future Domain SCSI support' CONFIG_SCSI_FUTURE_DOMAIN n
bool 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE n
bool 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR n
bool '7000FASST SCSI support' CONFIG_SCSI_7000FASST n
bool 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X y
bool 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 y
bool 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 y
bool 'Future Domain 16xx SCSI support' CONFIG_SCSI_FUTURE_DOMAIN y
bool 'Generic NCR5380 SCSI support' CONFIG_SCSI_GENERIC_NCR5380 y
bool 'PAS16 SCSI support' CONFIG_SCSI_PAS16 y
bool 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE y
bool 'Trantor T128/T128F/T228 SCSI support' CONFIG_SCSI_T128 y
bool 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR y
bool '7000FASST SCSI support' CONFIG_SCSI_7000FASST y
fi
*
* Network device support
*
bool 'Network device support?' CONFIG_ETHERCARDS y
bool 'Network device support?' CONFIG_ETHERCARDS n
if [ "$CONFIG_ETHERCARDS" = "n" ]
:
: Skipping ethercard configuration options...
......@@ -52,17 +57,22 @@ if [ "$CONFIG_ETHERCARDS" = "n" ]
else
bool 'SLIP (serial line) support' CONFIG_SLIP n
bool 'PLIP (parallel port) support' CONFIG_PLIP n
bool 'NE2000/NE1000 support' CONFIG_NE2000 y
bool 'NE2000/NE1000 support' CONFIG_NE2000 n
bool 'WD80*3 support' CONFIG_WD80x3 y
#bool '3c501 support' CONFIG_EL1 n
bool '3c503 support' CONFIG_EL2 y
#bool '3c509 support' CONFIG_EL3 n
bool 'HP PCLAN support' CONFIG_HPLAN y
bool 'AT1500 and NE2100 support' CONFIG_AT1500 y
bool 'SMC Ultra support' CONFIG_ULTRA n
bool '3c501 support' CONFIG_EL1 n
bool '3c503 support' CONFIG_EL2 n
#bool '3c507 support' CONFIG_EL16 n
bool '3c509 support' CONFIG_EL3 n
bool 'HP PCLAN support' CONFIG_HPLAN n
bool 'AT1500 and NE2100 support' CONFIG_AT1500 n
bool 'D-Link DE600 pocket adaptor support' CONFIG_DE600 n
#bool 'Zenith Z-Note support' CONFIG_ZNET n
#bool 'EtherExpress support' CONFIG_EEXPRESS n
#bool 'DEPCA support' CONFIG_DEPCA n
bool 'D-Link DE600 pocket adaptor support' CONFIG_DE600 y
#bool 'NI52** support' CONFIG_NI52 n
#bool 'NI65** support' CONFIG_NI65 n
#bool 'AT-LAN-TEC pocket adaptor support' CONFIG_ATP n
#bool 'EtherExpress support' CONFIG_EEXPRESS n
fi
*
bool 'Sony CDU31A CDROM driver support' CONFIG_CDU31A n
......@@ -82,11 +92,12 @@ bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS n
* character devices
*
bool 'Keyboard meta-key sends ESC-prefix' CONFIG_KBD_META y
bool 'Keyboard Num Lock on by default' CONFIG_KBD_NUML y
bool 'Logitech busmouse support' CONFIG_BUSMOUSE y
bool 'QuickPort mouse support' CONFIG_QUICKPORT_MOUSE y
bool 'Keyboard Num Lock on by default' CONFIG_KBD_NUML n
bool 'Parallel printer support' CONFIG_PRINTER y
bool 'Logitech busmouse support' CONFIG_BUSMOUSE n
bool 'QuickPort mouse support' CONFIG_QUICKPORT_MOUSE n
if [ "$CONFIG_QUICKPORT_MOUSE" = "n" ]
bool 'PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE n
bool 'PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE y
fi
bool 'Microsoft busmouse support' CONFIG_MS_BUSMOUSE n
bool 'ATIXL busmouse support' CONFIG_ATIXL_BUSMOUSE n
......@@ -102,5 +113,5 @@ bool 'Sound card support (distributed separately)' CONFIG_SOUND n
bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC n
bool 'Kernel profiling support' CONFIG_PROFILE n
if [ "$CONFIG_SCSI" = "y" ]
bool 'Verbose scsi error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS n
bool 'Verbose scsi error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS y
fi
......@@ -15,11 +15,7 @@ CFLAGS := $(CFLAGS) -DPARANOID $(DEBUG) -fno-builtin
.s.o:
$(CC) -c $<
OBJS = fpu_entry.o
ifdef CONFIG_MATH_EMULATION
OBJS := $(OBJS) div_small.o errors.o \
OBJS = fpu_entry.o div_small.o errors.o \
fpu_arith.o fpu_aux.o fpu_etc.o fpu_trig.o \
load_store.o get_address.o \
poly_atan.o poly_l2.o poly_2xm1.o poly_sin.o poly_tan.o \
......@@ -30,8 +26,6 @@ OBJS := $(OBJS) div_small.o errors.o \
reg_round.o \
wm_shrx.o wm_sqrt.o
endif
math.a: $(OBJS)
rm -f math.a
$(AR) rcs math.a $(OBJS)
......
......@@ -23,10 +23,6 @@
| math_emulate() is the sole entry point for wm-FPU-emu |
+---------------------------------------------------------------------------*/
#include <linux/config.h>
#ifdef CONFIG_MATH_EMULATION
#include <linux/signal.h>
#include <linux/segment.h>
......@@ -607,18 +603,3 @@ void __math_abort(struct info * info, unsigned int signal)
printk("ERROR: wm-FPU-emu math_abort failed!\n");
#endif PARANOID
}
#else /* no math emulation */
#include <linux/signal.h>
#include <linux/sched.h>
asmlinkage void math_emulate(long arg)
{
printk("math-emulation not enabled and no coprocessor found.\n");
printk("killing %s.\n",current->comm);
send_sig(SIGFPE,current,1);
schedule();
}
#endif /* CONFIG_MATH_EMULATION */
......@@ -34,7 +34,7 @@ _mul64:
movl (%esi),%eax
mull (%ecx)
movl %eax,-16(%ebp) // Not used
movl %eax,-16(%ebp) /* Not used */
movl %edx,-12(%ebp)
movl (%esi),%eax
......
......@@ -22,7 +22,7 @@
#include "fpu_asm.h"
// #define EXTRA_PRECISE // Do not use: not complete
/* #define EXTRA_PRECISE Do not use: not complete */
#define TERM_SIZE $8
#define SUM_MS -20(%ebp) /* sum ms long */
......@@ -45,16 +45,16 @@ _polynomial:
pushl %edi
pushl %ebx
movl PARAM2,%esi // x
movl PARAM3,%edi // terms
movl PARAM2,%esi /* x */
movl PARAM3,%edi /* terms */
movl TERM_SIZE,%eax
mull PARAM4 // n
mull PARAM4 /* n */
addl %eax,%edi
movl 4(%edi),%edx // terms[n]
movl 4(%edi),%edx /* terms[n] */
movl %edx,SUM_MS
movl (%edi),%edx // terms[n]
movl (%edi),%edx /* terms[n] */
movl %edx,SUM_MIDDLE
xor %eax,%eax
movl %eax,SUM_LS
......@@ -69,41 +69,43 @@ L_accum_loop:
movl %eax,ACCUM_MIDDLE
movl SUM_MIDDLE,%eax
mull (%esi) // x ls long
// movl %eax,-16(%ebp) // Not needed
mull (%esi) /* x ls long */
/* movl %eax,-16(%ebp) Not needed */
movl %edx,ACCUM_LS
movl SUM_MIDDLE,%eax
mull 4(%esi) // x ms long
mull 4(%esi) /* x ms long */
addl %eax,ACCUM_LS
adcl %edx,ACCUM_MIDDLE
adcl $0,ACCUM_MS
movl SUM_MS,%eax
mull (%esi) // x ls long
mull (%esi) /* x ls long */
addl %eax,ACCUM_LS
adcl %edx,ACCUM_MIDDLE
adcl $0,ACCUM_MS
movl SUM_MS,%eax
mull 4(%esi) // x ms long
mull 4(%esi) /* x ms long */
addl %eax,ACCUM_MIDDLE
adcl %edx,ACCUM_MS
// Now put the sum of next term and the accumulator
// into the sum register
/*
* Now put the sum of next term and the accumulator
* into the sum register
*/
movl ACCUM_MIDDLE,%eax
addl (%edi),%eax // term ls long
addl (%edi),%eax /* term ls long */
movl %eax,SUM_MIDDLE
movl ACCUM_MS,%eax
adcl 4(%edi),%eax // term ms long
adcl 4(%edi),%eax /* term ms long */
movl %eax,SUM_MS
#ifdef EXTRA_PRECISE
movl ACCUM_LS,%eax
movl %eax,SUM_LS
#else
testb $0x80,ACCUM_LS_HI // ms bit of ACCUM_LS
testb $0x80,ACCUM_LS_HI /* ms bit of ACCUM_LS */
je L_no_poly_round
addl $1,SUM_MIDDLE
......@@ -126,7 +128,7 @@ L_accum_done:
#endif EXTRA_PRECISE
L_poly_done:
movl PARAM1,%edi // accum
movl PARAM1,%edi /* accum */
movl SUM_MIDDLE,%eax
movl %eax,(%edi)
movl SUM_MS,%eax
......
......@@ -36,10 +36,10 @@ _reg_div:
movb TAG(%esi),%al
orb TAG(%ebx),%al
jne L_div_special // Not (both numbers TW_Valid)
jne L_div_special /* Not (both numbers TW_Valid) */
#ifdef DENORM_OPERAND
// Check for denormals
/* Check for denormals */
cmpl EXP_UNDER,EXP(%esi)
jg xL_arg1_not_denormal
......@@ -58,12 +58,12 @@ xL_arg1_not_denormal:
xL_arg2_not_denormal:
#endif DENORM_OPERAND
// Both arguments are TW_Valid
/* Both arguments are TW_Valid */
movb TW_Valid,TAG(%edi)
movb SIGN(%esi),%cl
cmpb %cl,SIGN(%ebx)
setne (%edi) // Set the sign, requires SIGN_NEG=1, SIGN_POS=0
setne (%edi) /* Set the sign, requires SIGN_NEG=1, SIGN_POS=0 */
movl EXP(%esi),%edx
movl EXP(%ebx),%eax
......@@ -76,27 +76,27 @@ xL_arg2_not_denormal:
/*-----------------------------------------------------------------------*/
L_div_special:
cmpb TW_NaN,TAG(%esi) // A NaN with anything to give NaN
cmpb TW_NaN,TAG(%esi) /* A NaN with anything to give NaN */
je L_arg1_NaN
cmpb TW_NaN,TAG(%ebx) // A NaN with anything to give NaN
cmpb TW_NaN,TAG(%ebx) /* A NaN with anything to give NaN */
jne L_no_NaN_arg
// Operations on NaNs
/* Operations on NaNs */
L_arg1_NaN:
L_arg2_NaN:
pushl %edi // Destination
// pushl %ebx
pushl %edi /* Destination */
/* pushl %ebx */
pushl %esi
pushl %ebx // Ordering is important here
pushl %ebx /* Ordering is important here */
call _real_2op_NaN
jmp LDiv_exit
// Invalid operations
/* Invalid operations */
L_zero_zero:
L_inf_inf:
pushl %edi // Destination
call _arith_invalid // 0/0 or Infinity/Infinity
pushl %edi /* Destination */
call _arith_invalid /* 0/0 or Infinity/Infinity */
jmp LDiv_exit
L_no_NaN_arg:
......@@ -104,50 +104,50 @@ L_no_NaN_arg:
jne L_arg1_not_inf
cmpb TW_Infinity,TAG(%ebx)
je L_inf_inf // invalid operation
je L_inf_inf /* invalid operation */
cmpb TW_Valid,TAG(%ebx)
je L_inf_valid
#ifdef PARANOID
// arg2 must be zero or valid
/* arg2 must be zero or valid */
cmpb TW_Zero,TAG(%ebx)
ja L_unknown_tags
#endif PARANOID
// Note that p16-9 says that infinity/0 returns infinity
jmp L_copy_arg1 // Answer is Inf
/* Note that p16-9 says that infinity/0 returns infinity */
jmp L_copy_arg1 /* Answer is Inf */
L_inf_valid:
#ifdef DENORM_OPERAND
cmpl EXP_UNDER,EXP(%ebx)
jg L_copy_arg1 // Answer is Inf
jg L_copy_arg1 /* Answer is Inf */
call _denormal_operand
orl %eax,%eax
jnz FPU_Arith_exit
#endif DENORM_OPERAND
jmp L_copy_arg1 // Answer is Inf
jmp L_copy_arg1 /* Answer is Inf */
L_arg1_not_inf:
cmpb TW_Zero,TAG(%ebx) // Priority to div-by-zero error
cmpb TW_Zero,TAG(%ebx) /* Priority to div-by-zero error */
jne L_arg2_not_zero
cmpb TW_Zero,TAG(%esi)
je L_zero_zero // invalid operation
je L_zero_zero /* invalid operation */
#ifdef PARANOID
// arg1 must be valid
/* arg1 must be valid */
cmpb TW_Valid,TAG(%esi)
ja L_unknown_tags
#endif PARANOID
// Division by zero error
pushl %edi // destination
/* Division by zero error */
pushl %edi /* destination */
movb SIGN(%esi),%al
xorb SIGN(%ebx),%al
pushl %eax // lower 8 bits have the sign
pushl %eax /* lower 8 bits have the sign */
call _divide_by_zero
jmp LDiv_exit
......@@ -160,14 +160,14 @@ L_arg2_not_zero:
jne L_return_zero
cmpl EXP_UNDER,EXP(%esi)
jg L_return_zero // Answer is zero
jg L_return_zero /* Answer is zero */
call _denormal_operand
orl %eax,%eax
jnz FPU_Arith_exit
#endif DENORM_OPERAND
jmp L_return_zero // Answer is zero
jmp L_return_zero /* Answer is zero */
L_arg2_not_inf:
......@@ -176,11 +176,11 @@ L_arg2_not_inf:
jne L_unknown_tags
#endif PARANOID
// arg1 is zero, arg2 is not Infinity or a NaN
/* arg1 is zero, arg2 is not Infinity or a NaN */
#ifdef DENORM_OPERAND
cmpl EXP_UNDER,EXP(%ebx)
jg L_copy_arg1 // Answer is zero
jg L_copy_arg1 /* Answer is zero */
call _denormal_operand
orl %eax,%eax
......@@ -203,12 +203,12 @@ LDiv_set_result_sign:
jne LDiv_negative_result
movb SIGN_POS,SIGN(%edi)
xorl %eax,%eax // Valid result
xorl %eax,%eax /* Valid result */
jmp LDiv_exit
LDiv_negative_result:
movb SIGN_NEG,SIGN(%edi)
xorl %eax,%eax // Valid result
xorl %eax,%eax /* Valid result */
LDiv_exit:
leal -12(%ebp),%esp
......@@ -233,12 +233,12 @@ L_unknown_tags:
push EX_INTERNAL | 0x208
call EXCEPTION
// Generate a NaN for unknown tags
/* Generate a NaN for unknown tags */
movl _CONST_QNaN,%eax
movl %eax,(%edi)
movl _CONST_QNaN+4,%eax
movl %eax,SIGL(%edi)
movl _CONST_QNaN+8,%eax
movl %eax,SIGH(%edi)
jmp LDiv_exit // %eax is nz
jmp LDiv_exit /* %eax is nz */
#endif PARANOID
......@@ -32,17 +32,17 @@ _normalize:
movl SIGH(%ebx),%edx
movl SIGL(%ebx),%eax
orl %edx,%edx // ms bits
js L_done // Already normalized
jnz L_shift_1 // Shift left 1 - 31 bits
orl %edx,%edx /* ms bits */
js L_done /* Already normalized */
jnz L_shift_1 /* Shift left 1 - 31 bits */
orl %eax,%eax
jz L_zero // The contents are zero
jz L_zero /* The contents are zero */
// L_shift_32:
/* L_shift_32: */
movl %eax,%edx
xorl %eax,%eax
subl $32,EXP(%ebx) // This can cause an underflow
subl $32,EXP(%ebx) /* This can cause an underflow */
/* We need to shift left by 1 - 31 bits */
L_shift_1:
......@@ -51,7 +51,7 @@ L_shift_1:
negl %ecx
shld %cl,%eax,%edx
shl %cl,%eax
subl %ecx,EXP(%ebx) // This can cause an underflow
subl %ecx,EXP(%ebx) /* This can cause an underflow */
movl %edx,SIGH(%ebx)
movl %eax,SIGL(%ebx)
......@@ -88,7 +88,7 @@ L_overflow:
// Normalise without reporting underflow or overflow
/* Normalise without reporting underflow or overflow */
.align 2,144
.globl _normalize_nuo
......@@ -102,17 +102,17 @@ _normalize_nuo:
movl SIGH(%ebx),%edx
movl SIGL(%ebx),%eax
orl %edx,%edx // ms bits
js L_exit // Already normalized
jnz L_nuo_shift_1 // Shift left 1 - 31 bits
orl %edx,%edx /* ms bits */
js L_exit /* Already normalized */
jnz L_nuo_shift_1 /* Shift left 1 - 31 bits */
orl %eax,%eax
jz L_zero // The contents are zero
jz L_zero /* The contents are zero */
// L_nuo_shift_32:
/* L_nuo_shift_32: */
movl %eax,%edx
xorl %eax,%eax
subl $32,EXP(%ebx) // This can cause an underflow
subl $32,EXP(%ebx) /* This can cause an underflow */
/* We need to shift left by 1 - 31 bits */
L_nuo_shift_1:
......@@ -121,7 +121,7 @@ L_nuo_shift_1:
negl %ecx
shld %cl,%eax,%edx
shl %cl,%eax
subl %ecx,EXP(%ebx) // This can cause an underflow
subl %ecx,EXP(%ebx) /* This can cause an underflow */
movl %edx,SIGH(%ebx)
movl %eax,SIGL(%ebx)
......
......@@ -34,7 +34,7 @@
_reg_u_add:
pushl %ebp
movl %esp,%ebp
// subl $16,%esp
/* subl $16,%esp */
pushl %esi
pushl %edi
pushl %ebx
......@@ -61,10 +61,10 @@ xOp1_not_denorm:
xOp2_not_denorm:
#endif DENORM_OPERAND
// xorl %ecx,%ecx
/* xorl %ecx,%ecx */
movl EXP(%esi),%ecx
subl EXP(%edi),%ecx /* exp1 - exp2 */
// jnc L_arg1_larger
/* jnc L_arg1_larger */
jge L_arg1_larger
/* num1 is smaller */
......@@ -82,8 +82,8 @@ L_arg1_larger:
L_accum_loaded:
movl PARAM3,%edi /* destination */
// movb SIGN(%esi),%dl
// movb %dl,SIGN(%edi) /* Copy the sign from the first arg */
/* movb SIGN(%esi),%dl */
/* movb %dl,SIGN(%edi) */ /* Copy the sign from the first arg */
movl EXP(%esi),%edx
......@@ -99,7 +99,7 @@ L_accum_loaded:
je L_bugged
#endif PARANOID
// The number to be shifted is in %eax:%ebx:%edx
/* The number to be shifted is in %eax:%ebx:%edx */
cmpw $32,%cx /* shrd only works for 0..31 bits */
jnc L_more_than_31
......@@ -119,9 +119,9 @@ L_more_than_31:
shrd %cl,%eax,%edx
shr %cl,%eax
orl %ebx,%ebx
jz L_more_31_no_low // none of the lowest bits is set
jz L_more_31_no_low /* none of the lowest bits is set */
orl $1,%edx // record the fact in the extension
orl $1,%edx /* record the fact in the extension */
L_more_31_no_low:
movl %eax,%ebx
......@@ -146,7 +146,7 @@ L_more_than_63:
jmp L_more_63_no_low
L_more_than_64:
movl $1,%edx // The shifted nr always at least one '1'
movl $1,%edx /* The shifted nr always at least one '1' */
L_more_63_no_low:
xorl %ebx,%ebx
......@@ -170,7 +170,7 @@ L_no_bit_lost:
incl EXP(%edi)
L_round_the_result:
jmp FPU_round // Round the result
jmp FPU_round /* Round the result */
......
......@@ -25,8 +25,8 @@
#include "control_w.h"
// #define dSIGL(x) (x)
// #define dSIGH(x) 4(x)
/* #define dSIGL(x) (x) */
/* #define dSIGH(x) 4(x) */
.data
......@@ -94,9 +94,9 @@ xOp2_not_denorm:
_divide_kernel:
#ifdef PARANOID
// testl $0x80000000, SIGH(%esi) // Dividend
// je L_bugged
testl $0x80000000, SIGH(%ebx) // Divisor
/* testl $0x80000000, SIGH(%esi) // Dividend */
/* je L_bugged */
testl $0x80000000, SIGH(%ebx) /* Divisor */
je L_bugged
#endif PARANOID
......@@ -143,7 +143,7 @@ L_no_adjust:
rcrl %eax
L_no_overflow:
jmp LRound_precision // Do the rounding as required
jmp LRound_precision /* Do the rounding as required */
/*---------------------------------------------------------------------------+
......@@ -165,7 +165,7 @@ L_no_overflow:
L_Full_Division:
// Save extended dividend in local register
/* Save extended dividend in local register */
movl SIGL(%esi),%eax
movl %eax,accum_2
movl SIGH(%esi),%eax
......@@ -280,7 +280,7 @@ LPrevent_2nd_overflow:
#endif PARANOID
LDo_2nd_div:
cmpl $0,%ecx // augmented denom msw
cmpl $0,%ecx /* augmented denom msw */
jnz LSecond_div_not_1
/* %ecx == 0, we are dividing by 1.0 */
......@@ -348,11 +348,11 @@ LDo_3rd_32_bits:
movl accum_0,%eax
/* need to check for possible subsequent overflow */
cmpl SIGH(%ebx),%edx // denom
cmpl SIGH(%ebx),%edx /* denom */
jb LRound_prep
ja LPrevent_3rd_overflow
cmpl SIGL(%ebx),%eax // denom
cmpl SIGL(%ebx),%eax /* denom */
jb LRound_prep
LPrevent_3rd_overflow:
......@@ -371,36 +371,38 @@ LPrevent_3rd_overflow:
movb $255,ovfl_flag /* Overflow -> 1.000 */
LRound_prep:
// Prepare for rounding.
// To test for rounding, we just need to compare 2*accum with the
// denom.
/*
* Prepare for rounding.
* To test for rounding, we just need to compare 2*accum with the
* denom.
*/
movl accum_0,%ecx
movl accum_1,%edx
movl %ecx,%eax
orl %edx,%eax
jz LRound_ovfl // The accumulator contains zero.
jz LRound_ovfl /* The accumulator contains zero. */
// Multiply by 2
/* Multiply by 2 */
clc
rcll $1,%ecx
rcll $1,%edx
jc LRound_large // No need to compare, denom smaller
jc LRound_large /* No need to compare, denom smaller */
subl SIGL(%ebx),%ecx
sbbl SIGH(%ebx),%edx
jnc LRound_not_small
movl $0x70000000,%eax // Denom was larger
movl $0x70000000,%eax /* Denom was larger */
jmp LRound_ovfl
LRound_not_small:
jnz LRound_large
movl $0x80000000,%eax // Remainder was exactly 1/2 denom
movl $0x80000000,%eax /* Remainder was exactly 1/2 denom */
jmp LRound_ovfl
LRound_large:
movl $0xff000000,%eax // Denom was smaller
movl $0xff000000,%eax /* Denom was smaller */
LRound_ovfl:
/* We are now ready to deal with rounding, but first we must get
......@@ -411,12 +413,12 @@ LRound_ovfl:
incl EXP(%edi)
/* shift the mantissa right one bit */
stc // Will set the ms bit
stc /* Will set the ms bit */
rcrl result_2
rcrl result_1
rcrl %eax
// Round the result as required
/* Round the result as required */
LRound_precision:
decl EXP(%edi) /* binary point between 1st & 2nd bits */
......
......@@ -88,7 +88,7 @@ xOp2_not_denorm:
mull SIGH(%edi)
addl %eax,accum_1
adcl %edx,%ebx
// adcl $0,%ecx // overflow here is not possible
/* adcl $0,%ecx // overflow here is not possible */
movl SIGH(%esi),%eax
mull SIGL(%edi)
......@@ -104,11 +104,11 @@ xOp2_not_denorm:
movl EXP(%esi),%eax /* Compute the exponent */
addl EXP(%edi),%eax
subl EXP_BIAS-1,%eax
// Have now finished with the sources
movl PARAM3,%edi // Point to the destination
/* Have now finished with the sources */
movl PARAM3,%edi /* Point to the destination */
movl %eax,EXP(%edi)
// Now make sure that the result is normalized
/* Now make sure that the result is normalized */
testl $0x80000000,%ecx
jnz LResult_Normalised
......
......@@ -79,16 +79,16 @@ xOp2_not_denorm:
| Form a register holding the |
| smaller number |
+--------------------------------------*/
movl SIGH(%edi),%eax // register ms word
movl SIGL(%edi),%ebx // register ls word
movl SIGH(%edi),%eax /* register ms word */
movl SIGL(%edi),%ebx /* register ls word */
movl PARAM3,%edi /* destination */
movl EXP(%esi),%edx
movl %edx,EXP(%edi) /* Copy exponent to destination */
// movb SIGN(%esi),%dl
// movb %dl,SIGN(%edi) /* Copy the sign from the first arg */
/* movb SIGN(%esi),%dl */
/* movb %dl,SIGN(%edi) */ /* Copy the sign from the first arg */
xorl %edx,%edx // register extension
xorl %edx,%edx /* register extension */
/*--------------------------------------+
| Shift the temporary register |
......@@ -115,9 +115,9 @@ L_more_than_31:
shrd %cl,%eax,%edx
shr %cl,%eax
orl %ebx,%ebx
jz L_more_31_no_low // none of the lowest bits is set
jz L_more_31_no_low /* none of the lowest bits is set */
orl $1,%edx // record the fact in the extension
orl $1,%edx /* record the fact in the extension */
L_more_31_no_low:
movl %eax,%ebx
......@@ -134,7 +134,7 @@ L_more_than_63:
cmpw $65,%cx
jnc L_more_than_64
// Shift right by 64 bits
/* Shift right by 64 bits */
movl %eax,%edx
orl %ebx,%ebx
jz L_more_63_no_low
......@@ -145,8 +145,8 @@ L_more_than_63:
L_more_than_64:
jne L_more_than_65
// Shift right by 65 bits
// Carry is clear if we get here
/* Shift right by 65 bits */
/* Carry is clear if we get here */
movl %eax,%edx
rcrl %edx
jnc L_shift_65_nc
......@@ -162,7 +162,7 @@ L_shift_65_nc:
jmp L_more_63_no_low
L_more_than_65:
movl $1,%edx // The shifted nr always at least one '1'
movl $1,%edx /* The shifted nr always at least one '1' */
L_more_63_no_low:
xorl %ebx,%ebx
......@@ -200,11 +200,13 @@ L_subtr:
orl %ebx,%ebx
jnz L_shift_32 /* shift left 32 - 63 bits */
// A rare case, the only one which is non-zero if we got here
// is: 1000000 .... 0000
// -0111111 .... 1111 1
// --------------------
// 0000000 .... 0000 1
/*
* A rare case, the only one which is non-zero if we got here
* is: 1000000 .... 0000
* -0111111 .... 1111 1
* --------------------
* 0000000 .... 0000 1
*/
cmpl $0x80000000,%edx
jnz L_must_be_zero
......@@ -225,7 +227,7 @@ L_must_be_zero:
movl $0,EXP(%edi) /* exponent */
movl $0,SIGL(%edi)
movl $0,SIGH(%edi)
jmp L_exit // %eax contains zero
jmp L_exit /* %eax contains zero */
L_shift_32:
movl %ebx,%eax
......@@ -244,7 +246,7 @@ L_shift_1:
subl %ecx,EXP(%edi) /* Can get underflow here */
L_round:
jmp FPU_round // Round the result
jmp FPU_round /* Round the result */
#ifdef PARANOID
......
......@@ -46,9 +46,9 @@ _shrx:
/* less than 32 bits */
pushl %ebx
movl (%esi),%ebx // lsl
movl 4(%esi),%edx // msl
xorl %eax,%eax // extension
movl (%esi),%ebx /* lsl */
movl 4(%esi),%edx /* msl */
xorl %eax,%eax /* extension */
shrd %cl,%ebx,%eax
shrd %cl,%edx,%ebx
shr %cl,%edx
......@@ -64,8 +64,8 @@ L_more_than_31:
jnc L_more_than_63
subb $32,%cl
movl (%esi),%eax // lsl
movl 4(%esi),%edx // msl
movl (%esi),%eax /* lsl */
movl 4(%esi),%edx /* msl */
shrd %cl,%edx,%eax
shr %cl,%edx
movl %edx,(%esi)
......@@ -79,7 +79,7 @@ L_more_than_63:
jnc L_more_than_95
subb $64,%cl
movl 4(%esi),%eax // msl
movl 4(%esi),%eax /* msl */
shr %cl,%eax
xorl %edx,%edx
movl %edx,(%esi)
......@@ -131,8 +131,8 @@ _shrxs:
is for small integers */
/* Shift by [32..63] bits */
subb $32,%cl
movl (%esi),%eax // lsl
movl 4(%esi),%edx // msl
movl (%esi),%eax /* lsl */
movl 4(%esi),%edx /* msl */
xorl %ebx,%ebx
shrd %cl,%eax,%ebx
shrd %cl,%edx,%eax
......@@ -152,9 +152,9 @@ _shrxs:
/* Shift by [0..31] bits */
Ls_less_than_32:
movl (%esi),%ebx // lsl
movl 4(%esi),%edx // msl
xorl %eax,%eax // extension
movl (%esi),%ebx /* lsl */
movl 4(%esi),%edx /* msl */
xorl %eax,%eax /* extension */
shrd %cl,%ebx,%eax
shrd %cl,%edx,%ebx
shr %cl,%edx
......@@ -173,9 +173,9 @@ Ls_more_than_63:
jnc Ls_more_than_95
subb $64,%cl
movl (%esi),%ebx // lsl
movl 4(%esi),%eax // msl
xorl %edx,%edx // extension
movl (%esi),%ebx /* lsl */
movl 4(%esi),%eax /* msl */
xorl %edx,%edx /* extension */
shrd %cl,%ebx,%edx
shrd %cl,%eax,%ebx
shr %cl,%eax
......@@ -186,8 +186,8 @@ Ls_more_than_63:
orw %bx,%bx
setne %al
xorl %edx,%edx
movl %edx,(%esi) // set to zero
movl %edx,4(%esi) // set to zero
movl %edx,(%esi) /* set to zero */
movl %edx,4(%esi) /* set to zero */
popl %ebx
popl %esi
leave
......
#
# Makefile for the kernel character device drivers.
# Makefile for the linux kernel device drivers.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now inherited from the
# parent makes..
#
# Note 2! The CFLAGS definitions are now in the main makefile...
.S.s:
$(CPP) -traditional $< -o $*.s
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o:
......@@ -16,28 +16,30 @@
.c.o:
$(CC) $(CFLAGS) -c $<
SUBDIRS= sound
SUBDIRS = block char net
ifdef CONFIG_MATH_EMULATION
SUBDIRS := $(SUBDIRS) FPU-emu
endif
OBJS = tty_io.o console.o keyboard.o serial.o \
tty_ioctl.o pty.o lp.o vt.o mem.o mouse.o \
busmouse.o psaux.o msbusmouse.o atixlmouse.o \
tpqic02.o defkeymap.o
ifdef CONFIG_SCSI
SUBDIRS := $(SUBDIRS) scsi
endif
all: chr_drv.a subdirs
ifdef CONFIG_SOUND
SUBDIRS := $(SUBDIRS) sound
endif
chr_drv.a: $(OBJS)
$(AR) rcs chr_drv.a $(OBJS)
sync
all: driversubdirs
subdirs: dummy
driversubdirs: dummy
@for i in $(SUBDIRS); do (cd $$i && echo $$i && $(MAKE)) || exit; done
clean:
rm -f core *.o *.a *.s
for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit; done
for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean); done
dep:
$(CPP) -M *.c > .depend
for i in $(SUBDIRS); do (cd $$i && $(MAKE) dep) || exit; done
dummy:
......@@ -48,3 +50,4 @@ dummy:
ifeq (.depend,$(wildcard .depend))
include .depend
endif
......@@ -10,36 +10,53 @@
#
.c.s:
$(CC) $(CFLAGS) $(RAMDISK) -S $<
$(CC) $(CFLAGS) -S $<
.s.o:
$(AS) -c -o $*.o $<
.c.o:
$(CC) $(CFLAGS) $(RAMDISK) -c $<
$(CC) $(CFLAGS) -c $<
SUBDIRS = scsi
#
# Note : at this point, these files are compiled on all systems.
# In the future, some of these should be built conditionally.
#
OBJS = xd.o hd.o ll_rw_blk.o floppy.o ramdisk.o genhd.o cdu31a.o mcd.o
OBJS := ll_rw_blk.o floppy.o ramdisk.o genhd.o
SRCS := ll_rw_blk.c floppy.c ramdisk.c genhd.c
all: blk_drv.a scsisubdirs
ifdef CONFIG_CDU31A
OBJS := $(OBJS) cdu31a.o
SRCS := $(SRCS) cdu31a.c
endif
blk_drv.a: $(OBJS)
rm -f blk_drv.a
$(AR) rcs blk_drv.a $(OBJS)
sync
ifdef CONFIG_MCD
OBJS := $(OBJS) mcd.o
SRCS := $(SRCS) mcd.c
endif
scsisubdirs: dummy
@for i in $(SUBDIRS); do (cd $$i && echo $$i && $(MAKE)) || exit; done
ifdef CONFIG_BLK_DEV_HD
OBJS := $(OBJS) hd.o
SRCS := $(SRCS) hd.c
endif
clean:
ifdef CONFIG_BLK_DEV_XD
OBJS := $(OBJS) xd.o
SRCS := $(SRCS) xd.c
endif
all: block.a
block.a: $(OBJS)
rm -f block.a
$(AR) rcs block.a $(OBJS)
sync
clean:
rm -f core *.o *.a *.s
for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean); done
for i in $(ALL_SUBDIRS); do (cd $$i && $(MAKE) clean); done
dep:
$(CPP) -M *.c > .depend
for i in $(SUBDIRS); do (cd $$i && $(MAKE) dep); done
xd.o:
$(CC) $(CFLAGS) -fno-omit-frame-pointer $(RAMDISK) -c $<
$(CPP) -M $(SRCS) > .depend
dummy:
......@@ -49,4 +66,3 @@ dummy:
ifeq (.depend,$(wildcard .depend))
include .depend
endif
......@@ -59,8 +59,6 @@
*/
#include <linux/config.h>
#ifdef CONFIG_CDU31A
#include <linux/errno.h>
#include <linux/signal.h>
......@@ -1702,4 +1700,3 @@ cdu31a_init(unsigned long mem_start, unsigned long mem_end)
return mem_start;
}
#endif
......@@ -16,8 +16,6 @@
* in the early extended-partition checks and added DM partitions
*/
#include <linux/config.h>
#ifdef CONFIG_BLK_DEV_HD
#define HD_IRQ 14
......@@ -29,6 +27,7 @@
#include <linux/kernel.h>
#include <linux/hdreg.h>
#include <linux/genhd.h>
#include <linux/config.h>
#define REALLY_SLOW_IO
#include <asm/system.h>
......@@ -803,4 +802,3 @@ static int revalidate_hddisk(int dev, int maxusage)
return 0;
}
#endif
......@@ -258,8 +258,8 @@ void ll_rw_page(int rw, int dev, int page, char * buffer)
printk("Can't page to read-only device 0x%X\n",dev);
return;
}
cli();
repeat:
cli();
req = request+NR_REQUEST;
while (--req >= request)
if (req->dev<0)
......@@ -268,9 +268,9 @@ void ll_rw_page(int rw, int dev, int page, char * buffer)
sleep_on(&wait_for_request);
goto repeat;
}
sti();
/* fill up the request-info, and add it to the queue */
req->dev = dev;
sti();
req->cmd = rw;
req->errors = 0;
req->sector = page<<3;
......@@ -391,6 +391,7 @@ void ll_rw_swap_file(int rw, int dev, unsigned int *b, int nb, char *buf)
for (i=0; i<nb; i++, buf += buffersize)
{
repeat:
cli();
req = request+NR_REQUEST;
while (--req >= request)
if (req->dev<0)
......@@ -399,8 +400,8 @@ void ll_rw_swap_file(int rw, int dev, unsigned int *b, int nb, char *buf)
sleep_on(&wait_for_request);
goto repeat;
}
req->dev = dev;
sti();
req->cmd = rw;
req->errors = 0;
req->sector = (b[i] * buffersize) >> 9;
......
......@@ -30,8 +30,6 @@
(Jon Tombs <jon@robots.ox.ac.uk>)
*/
#include <linux/config.h>
#ifdef CONFIG_MCD
#include <linux/errno.h>
#include <linux/signal.h>
......@@ -522,6 +520,7 @@ do_mcd_request(void)
unsigned int nsect;
repeat:
if (!(CURRENT) || CURRENT->dev < 0) return;
INIT_REQUEST;
dev = MINOR(CURRENT->dev);
block = CURRENT->sector;
......@@ -1193,4 +1192,3 @@ Toc[i].diskTime.min, Toc[i].diskTime.sec, Toc[i].diskTime.frame);
return limit > 0 ? 0 : -1;
}
#endif
......@@ -139,7 +139,8 @@ void rd_load(void)
*((struct minix_super_block *) bh->b_data);
brelse(bh);
nblocks = s.s_nzones << s.s_log_zone_size;
if (s.s_magic != MINIX_SUPER_MAGIC) {
if (s.s_magic != MINIX_SUPER_MAGIC &&
s.s_magic != MINIX_SUPER_MAGIC2) {
printk("RAMDISK: trying old-style RAM image.\n");
continue;
}
......
This diff is collapsed.
#
# Makefile for the WE8003 device driver..
# Makefile for the kernel character device drivers.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
......@@ -9,9 +9,6 @@
# parent makes..
#
SUBDIRS =
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o:
......@@ -19,21 +16,76 @@ SUBDIRS =
.c.o:
$(CC) $(CFLAGS) -c $<
OBJS = main.o
OBJS = tty_io.o console.o keyboard.o serial.o \
tty_ioctl.o pty.o vt.o mem.o \
defkeymap.o
SRCS = tty_io.c console.c keyboard.c serial.c \
tty_ioctl.c pty.c vt.c mem.c \
defkeymap.c
ifdef CONFIG_ATIXL_BUSMOUSE
M = y
OBJS := $(OBJS) atixlmouse.o
SRCS := $(SRCS) atixlmouse.c
endif
ifdef CONFIG_BUSMOUSE
M = y
OBJS := $(OBJS) busmouse.o
SRCS := $(SRCS) busmouse.c
endif
ifdef CONFIG_PRINTER
OBJS := $(OBJS) lp.o
SRCS := $(SRCS) lp.c
endif
ifdef CONFIG_MS_BUSMOUSE
M = y
OBJS := $(OBJS) msbusmouse.o
SRCS := $(SRCS) msbusmouse.c
endif
ifdef CONFIG_QUICKPORT_MOUSE
CONFIG_PSMOUSE = CONFIG_PSMOUSE
endif
ifdef CONFIG_PSMOUSE
M = y
OBJS := $(OBJS) psaux.o
SRCS := $(SRCS) psaux.c
endif
we8003.o: $(OBJS)
ld -r -o we8003.o $(OBJS)
ifdef CONFIG_TAPE_QIC02
OBJS := $(OBJS) tpqic02.o
SRCS := $(SRCS) tpqic02.c
endif
clean:
rm -f core *.o *.a tmp_make .depend
for i in *.c;do rm -f `basename $$i .c`.s;done
ifdef M
OBJS := $(OBJS) mouse.o
SRCS := $(SRCS) mouse.c
endif
all: char.a
char.a: $(OBJS)
$(AR) rcs char.a $(OBJS)
sync
defkeymap.c: defkeymap.map
./loadkeys defkeymap.map
./mktable > defkeymap.c
clean:
rm -f core *.o *.a *.s
dep:
$(CPP) -M *.c > .depend
@for i in $(SUBDIRS); do (cd $$i && echo $$i && $(MAKE) dep) || exit; done
$(CPP) -M $(SRCS) > .depend
dummy:
#
# include a dependency file if one exists
#
......
......@@ -73,6 +73,7 @@ static char sel_buffer[SEL_BUFFER_SIZE] = { '\0' };
extern void vt_init(void);
extern void register_console(void (*proc)(const char *));
extern void compute_shiftstate(void);
unsigned long video_num_columns; /* Number of text columns */
unsigned long video_num_lines; /* Number of test lines */
......@@ -224,9 +225,9 @@ static unsigned char * translations[] = {
"\040\255\233\234\376\235\174\025\376\376\246\256\252\055\376\376"
"\370\361\375\376\376\346\024\371\376\376\247\257\254\253\376\250"
"\376\376\376\376\216\217\222\200\376\220\376\376\376\376\376\376"
"\376\245\376\376\376\376\231\376\235\376\376\376\232\376\376\341"
"\376\245\376\376\376\376\231\376\350\376\376\376\232\376\376\341"
"\205\240\203\376\204\206\221\207\212\202\210\211\215\241\214\213"
"\376\244\225\242\223\376\224\366\233\227\243\226\201\376\376\230",
"\376\244\225\242\223\376\224\366\355\227\243\226\201\376\376\230",
/* vt100 graphics */
(unsigned char *)
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
......@@ -1511,6 +1512,7 @@ void update_screen(int new_console)
set_origin(fg_console);
set_cursor(new_console);
set_leds();
compute_shiftstate();
lock = 0;
}
......@@ -1525,7 +1527,7 @@ int do_screendump(int arg)
if (l)
return l;
currcons = get_fs_byte(buf+1);
if ((currcons<0) || (currcons>=NR_CONSOLES))
if ((currcons<0) || (currcons>NR_CONSOLES))
return -EIO;
put_fs_byte((char)(video_num_lines),buf++);
put_fs_byte((char)(video_num_columns),buf++);
......@@ -1708,7 +1710,7 @@ int set_selection(const int arg)
if (obp != bp)
{
bp = obp;
*bp++ = '\n';
*bp++ = '\r';
}
obp = bp;
}
......
......@@ -5,6 +5,7 @@ keycode 2 = one exclam
alt keycode 2 = Meta_one
keycode 3 = two at at
control keycode 3 = nul
shift control keycode 3 = nul
alt keycode 3 = Meta_two
keycode 4 = three numbersign
control keycode 4 = Escape
......@@ -30,6 +31,7 @@ keycode 11 = zero parenright braceright
alt keycode 11 = Meta_zero
keycode 12 = minus underscore backslash
control keycode 12 = Control_underscore
shift control keycode 12 = Control_underscore
alt keycode 12 = Meta_minus
keycode 13 = equal plus
alt keycode 13 = Meta_equal
......@@ -54,7 +56,7 @@ keycode 27 = bracketright braceright asciitilde
control keycode 27 = Control_bracketright
alt keycode 27 = Meta_bracketright
keycode 28 = Return
alt keycode 28 = 0x080d
alt keycode 28 = Meta_Control_m
keycode 29 = Control
keycode 30 = a
keycode 31 = s
......@@ -87,6 +89,7 @@ keycode 50 = m
keycode 51 = comma less
alt keycode 51 = Meta_comma
keycode 52 = period greater
control keycode 52 = Dead_Key_Next
alt keycode 52 = Meta_period
keycode 53 = slash question
control keycode 53 = Delete
......@@ -196,13 +199,13 @@ keycode 110 = Insert
keycode 111 = Remove
altgr control keycode 111 = Boot
control alt keycode 111 = Boot
keycode 112 =
keycode 113 =
keycode 114 =
keycode 115 =
keycode 116 =
keycode 117 =
keycode 118 =
keycode 112 = Macro
keycode 113 = F13
keycode 114 = F14
keycode 115 = Help
keycode 116 = Do
keycode 117 = F17
keycode 118 = KP_MinPlus
keycode 119 =
keycode 120 =
keycode 121 =
......@@ -244,3 +247,6 @@ string F23 = ""
string F24 = ""
string F25 = ""
string F26 = ""
string Macro = "\033[M"
string Help = ""
string Do = ""
......@@ -10,6 +10,7 @@
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/lp.h>
#include <linux/malloc.h>
#include <asm/io.h>
#include <asm/segment.h>
......
......@@ -4,6 +4,7 @@
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#include <linux/config.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/sched.h>
......@@ -11,15 +12,15 @@
#include <linux/tty.h>
#include <linux/mouse.h>
#include <linux/tpqic02.h>
#include <linux/user.h>
#include <linux/a.out.h>
#include <linux/string.h>
#include <linux/malloc.h>
#include <linux/mman.h>
#include <asm/segment.h>
#include <asm/io.h>
#ifdef CONFIG_SOUND
extern long soundcard_init(long mem_start);
#endif
static int read_ram(struct inode * inode, struct file * file,char * buf, int count)
{
......@@ -31,51 +32,6 @@ static int write_ram(struct inode * inode, struct file * file,char * buf, int co
return -EIO;
}
static int read_core(struct inode * inode, struct file * file,char * buf, int count)
{
unsigned long p = file->f_pos;
int read;
int count1;
char * pnt;
struct user dump;
memset(&dump, 0, sizeof(struct user));
dump.magic = CMAGIC;
dump.u_dsize = high_memory >> 12;
if (count < 0)
return -EINVAL;
if (p >= high_memory)
return 0;
if (count > high_memory - p)
count = high_memory - p;
read = 0;
if (p < sizeof(struct user) && count > 0) {
count1 = count;
if (p + count1 > sizeof(struct user))
count1 = sizeof(struct user)-p;
pnt = (char *) &dump + p;
memcpy_tofs(buf,(void *) pnt, count1);
buf += count1;
p += count1;
count -= count1;
read += count1;
}
while (p < 2*PAGE_SIZE && count > 0) {
put_fs_byte(0,buf);
buf++;
p++;
count--;
read++;
}
memcpy_tofs(buf,(void *) (p - PAGE_SIZE),count);
read += count;
file->f_pos += read;
return read;
}
static int read_mem(struct inode * inode, struct file * file,char * buf, int count)
{
unsigned long p = file->f_pos;
......@@ -149,8 +105,8 @@ static int mmap_mem(struct inode * inode, struct file * file,
inode->i_count++;
mpnt->vm_offset = off;
mpnt->vm_ops = NULL;
mpnt->vm_next = current->mmap;
current->mmap = mpnt;
insert_vm_struct(current, mpnt);
merge_segments(current->mmap, NULL, NULL);
return 0;
}
......@@ -206,10 +162,31 @@ static int read_zero(struct inode * node,struct file * file,char * buf,int count
static int mmap_zero(struct inode * inode, struct file * file,
unsigned long addr, size_t len, int prot, unsigned long off)
{
struct vm_area_struct *mpnt;
if (prot & PAGE_RW)
return -EINVAL;
if (zeromap_page_range(addr, len, prot))
return -EAGAIN;
/*
* try to create a dummy vmm-structure so that the
* rest of the kernel knows we are here
*/
mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL);
if (!mpnt)
return 0;
mpnt->vm_task = current;
mpnt->vm_start = addr;
mpnt->vm_end = addr + len;
mpnt->vm_page_prot = prot;
mpnt->vm_share = NULL;
mpnt->vm_inode = inode;
inode->i_count++;
mpnt->vm_offset = off;
mpnt->vm_ops = NULL;
insert_vm_struct(current, mpnt);
merge_segments(current->mmap, ignoff_mergep, inode);
return 0;
}
......@@ -330,19 +307,6 @@ static struct file_operations zero_fops = {
NULL /* no special release code */
};
static struct file_operations core_fops = {
memory_lseek,
read_core,
NULL,
NULL, /* zero_readdir */
NULL, /* zero_select */
NULL, /* zero_ioctl */
NULL, /* zero_mmap */
NULL, /* no special open code */
NULL, /* no special release code */
NULL /* fsync */
};
static int memory_open(struct inode * inode, struct file * filp)
{
switch (MINOR(inode->i_rdev)) {
......@@ -364,9 +328,6 @@ static int memory_open(struct inode * inode, struct file * filp)
case 5:
filp->f_op = &zero_fops;
break;
case 6:
filp->f_op = &core_fops;
break;
default:
return -ENODEV;
}
......@@ -393,9 +354,17 @@ long chr_dev_init(long mem_start, long mem_end)
if (register_chrdev(1,"mem",&memory_fops))
printk("unable to get major 1 for memory devs\n");
mem_start = tty_init(mem_start);
#ifdef CONFIG_PRINTER
mem_start = lp_init(mem_start);
#endif
#if defined (CONFIG_BUSMOUSE) || defined (CONFIG_QUICKPORT_MOUSE) || \
defined (CONFIG_PSMOUSE) || defined (CONFIG_MS_BUSMOUSE) || \
defined (CONFIG_ATIXL_BUSMOUSE)
mem_start = mouse_init(mem_start);
#endif
#ifdef CONFIG_SOUND
mem_start = soundcard_init(mem_start);
#endif
#if CONFIG_TAPE_QIC02
mem_start = tape_qic02_init(mem_start);
#endif
......
......@@ -1195,7 +1195,7 @@ static int set_modem_info(struct async_struct * info, unsigned int cmd,
control &= ~UART_MCR_DTR;
break;
case TIOCMSET:
control = (control & ~0x03)
control = (control & ~(UART_MCR_RTS | UART_MCR_DTR))
| ((arg & TIOCM_RTS) ? UART_MCR_RTS : 0)
| ((arg & TIOCM_DTR) ? UART_MCR_DTR : 0);
break;
......@@ -1328,7 +1328,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
send_break(info, arg ? arg*(HZ/10) : HZ/4);
return 0;
case TIOCGSOFTCAR:
error = verify_area(VERIFY_WRITE, (void *) arg,sizeof(unsigned int *));
error = verify_area(VERIFY_WRITE, (void *) arg,sizeof(long));
if (error)
return error;
put_fs_long(C_LOCAL(tty) ? 1 : 0,
......@@ -1341,7 +1341,8 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
(arg ? CLOCAL : 0));
return 0;
case TIOCMGET:
error = verify_area(VERIFY_WRITE, (void *) arg,sizeof(unsigned int *));
error = verify_area(VERIFY_WRITE, (void *) arg,
sizeof(unsigned int));
if (error)
return error;
return get_modem_info(info, (unsigned int *) arg);
......
......@@ -46,6 +46,7 @@
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/keyboard.h>
#include <linux/malloc.h>
#include <asm/segment.h>
#include <asm/system.h>
......@@ -620,6 +621,8 @@ void copy_to_cooked(struct tty_struct * tty)
if (c == STOP_CHAR(tty)) {
tty->ctrl_status &= ~(TIOCPKT_START);
tty->ctrl_status |= TIOCPKT_STOP;
if (tty->link)
wake_up_interruptible(&tty->link->except_q);
tty->stopped=1;
if (tty->stop)
(tty->stop)(tty);
......@@ -634,6 +637,8 @@ void copy_to_cooked(struct tty_struct * tty)
tty->ctrl_status &= ~(TIOCPKT_STOP);
tty->ctrl_status |= TIOCPKT_START;
tty->stopped=0;
if (tty->link)
wake_up_interruptible(&tty->link->except_q);
if (tty->start)
(tty->start)(tty);
if (IS_A_CONSOLE(tty->line)) {
......@@ -1318,6 +1323,9 @@ static int tty_open(struct inode * inode, struct file * filp)
* process opens up a tty in packet mode, all the packet
* variables get cleared. Come to think of it, is anything
* using the packet mode at all??? - Ted, 1/27/93
*
* Not to worry, a pty master can only be opened once.
* And rlogind and telnetd both use packet mode. -- jrs
*/
tty->ctrl_status = 0;
tty->packet = 0;
......@@ -1400,8 +1408,7 @@ static int tty_select(struct inode * inode, struct file * filp, int sel_type, se
}
/* see if the status byte can be read. */
if (tty->packet && tty->link &&
tty->link->status_changed)
if (tty->packet && tty->link && tty->link->ctrl_status)
return 1;
select_wait(&tty->secondary.proc_list, wait);
......@@ -1417,11 +1424,15 @@ static int tty_select(struct inode * inode, struct file * filp, int sel_type, se
if ((tty->flags & (1 << TTY_SLAVE_OPENED))
&& tty->link->count <= 1)
return 1;
if (tty->packet
&& tty->link->ctrl_status)
return 1;
} else {
if (!tty->link->count)
return 1;
}
}
select_wait(&tty->except_q, wait);
return 0;
}
return 0;
......@@ -1591,6 +1602,7 @@ static void initialize_tty_struct(int line, struct tty_struct *tty)
} else if IS_A_PTY(line) {
tty->open = pty_open;
}
tty->except_q = NULL;
}
static void initialize_termios(int line, struct termios * tp)
......
......@@ -52,6 +52,8 @@ static void flush(struct tty_queue * queue)
void flush_input(struct tty_struct * tty)
{
tty->ctrl_status |= TIOCPKT_FLUSHREAD;
if (tty->link)
wake_up_interruptible(&tty->link->except_q);
flush(&tty->read_q);
wake_up_interruptible(&tty->read_q.proc_list);
flush(&tty->secondary);
......@@ -66,6 +68,8 @@ void flush_input(struct tty_struct * tty)
void flush_output(struct tty_struct * tty)
{
tty->ctrl_status |= TIOCPKT_FLUSHWRITE;
if (tty->link)
wake_up_interruptible(&tty->link->except_q);
flush(&tty->write_q);
wake_up_interruptible(&tty->write_q.proc_list);
if ((tty = tty->link) != NULL) {
......@@ -202,17 +206,23 @@ static int set_termios(struct tty_struct * tty, struct termios * termios,
(tty->termios->c_cc[VSTART] == '\021');
if (old_flow != new_flow) {
tty->ctrl_status &= ~(TIOCPKT_DOSTOP|TIOCPKT_NOSTOP);
if (new_flow)
tty->ctrl_status |= TIOCPKT_DOSTOP;
else
tty->ctrl_status |= TIOCPKT_NOSTOP;
tty->ctrl_status &= ~(TIOCPKT_DOSTOP|TIOCPKT_NOSTOP);
if (new_flow)
tty->ctrl_status |= TIOCPKT_DOSTOP;
else
tty->ctrl_status |= TIOCPKT_NOSTOP;
if (tty->link)
wake_up_interruptible(&tty->link->except_q);
}
#if 0
/* puting mpty's into echo mode is very bad, and I think under
some situations can cause the kernel to do nothing but
copy characters back and forth. -RAB */
/* This can no longer happen because a set_termios is redirected
to the pty slave. -- jrs */
if (IS_A_PTY_MASTER(channel)) tty->termios->c_lflag &= ~ECHO;
#endif
unset_locked_termios(tty->termios, &old_termios,
termios_locked[tty->line]);
......@@ -283,14 +293,15 @@ static int set_termio(struct tty_struct * tty, struct termio * termio,
(tty->termios->c_cc[VSTART] == '\021');
if (old_flow != new_flow) {
tty->ctrl_status &= ~(TIOCPKT_DOSTOP|TIOCPKT_NOSTOP);
if (new_flow)
tty->ctrl_status |= TIOCPKT_DOSTOP;
else
tty->ctrl_status |= TIOCPKT_NOSTOP;
tty->ctrl_status &= ~(TIOCPKT_DOSTOP|TIOCPKT_NOSTOP);
if (new_flow)
tty->ctrl_status |= TIOCPKT_DOSTOP;
else
tty->ctrl_status |= TIOCPKT_NOSTOP;
if (tty->link)
wake_up_interruptible(&tty->link->except_q);
}
unset_locked_termios(tty->termios, &old_termios,
termios_locked[tty->line]);
......@@ -611,20 +622,14 @@ int tty_ioctl(struct inode * inode, struct file * file,
return set_lcktrmios(tty, (struct termios *) arg,
termios_dev);
case TIOCPKT:
{
int on;
if (!IS_A_PTY_MASTER(dev))
return -EINVAL;
retval = verify_area(VERIFY_READ, (unsigned long *)arg, sizeof (int));
if (retval)
return retval;
on=get_fs_long ((unsigned long *)arg);
if (on )
tty->packet = 1;
else
tty->packet = 0;
return (0);
}
if (!IS_A_PTY_MASTER(dev))
return -EINVAL;
retval = verify_area(VERIFY_READ,
(unsigned long *)arg, sizeof (unsigned long));
if (retval)
return retval;
tty->packet = (get_fs_long ((unsigned long *)arg) != 0);
return 0;
case TCSBRK: case TCSBRKP:
wait_until_sent(tty);
if (!tty->ioctl)
......
......@@ -37,6 +37,7 @@ struct vt_cons vt_cons[NR_CONSOLES];
asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on);
extern void compute_shiftstate(void);
extern void change_console(unsigned int new_console);
extern void complete_change_console(unsigned int new_console);
extern int vt_waitactive(void);
......@@ -208,10 +209,15 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
case KDSKBMODE:
if (arg == K_RAW) {
set_vc_kbd_flag(kbd, VC_RAW);
clr_vc_kbd_flag(kbd, VC_MEDIUMRAW);
} else if (arg == K_XLATE) {
clr_vc_kbd_flag(kbd, VC_RAW);
}
else
clr_vc_kbd_flag(kbd, VC_MEDIUMRAW);
compute_shiftstate();
} else if (arg == K_MEDIUMRAW) {
clr_vc_kbd_flag(kbd, VC_RAW);
set_vc_kbd_flag(kbd, VC_MEDIUMRAW);
} else
return -EINVAL;
flush_input(tty);
return 0;
......@@ -220,17 +226,22 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
i = verify_area(VERIFY_WRITE, (void *) arg, sizeof(unsigned long));
if (!i) {
ucval = vc_kbd_flag(kbd, VC_RAW);
put_fs_long(ucval ? K_RAW : K_XLATE, (unsigned long *) arg);
if (vc_kbd_flag(kbd, VC_MEDIUMRAW))
put_fs_long(K_MEDIUMRAW, (unsigned long *) arg);
else
put_fs_long(ucval ? K_RAW : K_XLATE,
(unsigned long *) arg);
}
return i;
case KDGKBENT:
{
struct kbentry * const a = (struct kbentry *)arg;
u_char i;
u_char s;
verify_area(VERIFY_WRITE, (void *)a, sizeof(struct kbentry));
i = verify_area(VERIFY_WRITE, (void *)a, sizeof(struct kbentry));
if (i)
return i;
if ((i = get_fs_byte((char *) &a->kb_index)) >= NR_KEYS)
return -EINVAL;
if ((s = get_fs_byte((char *) &a->kb_table)) >= NR_KEYMAPS)
......@@ -242,11 +253,12 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
case KDSKBENT:
{
const struct kbentry * a = (struct kbentry *)arg;
u_char i;
u_char s;
u_short v;
verify_area(VERIFY_WRITE, (void *)a, sizeof(struct kbentry));
i = verify_area(VERIFY_WRITE, (void *)a, sizeof(struct kbentry));
if (i)
return i;
if ((i = get_fs_byte((char *) &a->kb_index)) >= NR_KEYS)
return -EINVAL;
if ((s = get_fs_byte((char *) &a->kb_table)) >= NR_KEYMAPS)
......@@ -262,11 +274,12 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
case KDGKBSENT:
{
const struct kbsentry *a = (struct kbsentry *)arg;
u_char i;
char *p;
u_char *q;
verify_area(VERIFY_WRITE, (void *)a, sizeof(struct kbsentry));
i = verify_area(VERIFY_WRITE, (void *)a, sizeof(struct kbsentry));
if (i)
return i;
if ((i = get_fs_byte(&a->kb_func)) >= NR_FUNC)
return -EINVAL;
q = a->kb_string;
......@@ -281,12 +294,13 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
struct kbsentry * const a = (struct kbsentry *)arg;
int delta;
char *first_free;
u_char i;
int k;
u_char *p;
char *q;
verify_area(VERIFY_READ, (void *)a, sizeof(struct kbsentry));
i = verify_area(VERIFY_READ, (void *)a, sizeof(struct kbsentry));
if (i)
return i;
if ((i = get_fs_byte(&a->kb_func)) >= NR_FUNC)
return -EINVAL;
delta = -strlen(func_table[i]);
......
This diff is collapsed.
This diff is collapsed.
/* Definitions for the 3Com 3c503 Etherlink 2. */
/* This file is distributed under the GPL.
Some of these names and comments are from the Crynwr packet drivers. */
Many of these names and comments are directly from the Crynwr packet
drivers, which are released under the GPL. */
#define EL2H (dev->base_addr + 0x400)
#define EL2L (dev->base_addr)
......@@ -11,8 +12,8 @@
#define EL2SM_STOP_PG (0x40) /* Last page +1 of RX ring */
/* 3Com 3c503 ASIC registers */
#define E33G_STARTPG (EL2H+0) /* Start page, must match EN0_STARTPG */
#define E33G_STOPPG (EL2H+1) /* Stop page, must match EN0_STOPPG */
#define E33G_STARTPG (EL2H+0) /* Start page, matching EN0_STARTPG */
#define E33G_STOPPG (EL2H+1) /* Stop page, must match EN0_STOPPG */
#define E33G_DRQCNT (EL2H+2) /* DMA burst count */
#define E33G_IOBASE (EL2H+3) /* Read of I/O base jumpers. */
/* (non-useful, but it also appears at the end of EPROM space) */
......
......@@ -13,7 +13,7 @@
C/O Supercomputing Research Ctr., 17100 Science Dr., Bowie MD 20715
*/
static char *version = "3c509.c: v0.06 9/3/93 becker@super.org\n";
static char *version = "3c509.c:pl14 10/18/93 becker@super.org\n";
#include <linux/config.h>
#include <linux/kernel.h>
......@@ -23,30 +23,18 @@ static char *version = "3c509.c: v0.06 9/3/93 becker@super.org\n";
#include <linux/ptrace.h>
#include <linux/errno.h>
#include <linux/in.h>
#ifndef PRE_PL13
#include <linux/malloc.h>
#include <linux/ioport.h>
#else
#define snarf_region(base,extent) do {;}while(0)
#define check_region(base,extent) (0)
#endif
/*#include <asm/system.h>*/
#include <asm/bitops.h>
#include <asm/io.h>
#ifndef port_read
#include "iow.h"
#endif
#include "dev.h"
#include "eth.h"
#include "skbuff.h"
#include "arp.h"
#ifndef HAVE_AUTOIRQ
/* From auto_irq.c, should be in a *.h file. */
extern void autoirq_setup(int waittime);
extern int autoirq_report(int waittime);
extern struct device *irq2dev_map[16];
#ifndef port_read
#include "iow.h"
#endif
/* These should be in <asm/io.h>. */
......@@ -55,6 +43,11 @@ __asm__("cld;rep;insl": :"d" (port),"D" (buf),"c" (nr):"cx","di")
#define port_write_l(port,buf,nr) \
__asm__("cld;rep;outsl": :"d" (port),"S" (buf),"c" (nr):"cx","si")
#ifndef HAVE_ALLOC_SKB
#define alloc_skb(size, priority) (struct sk_buff *) kmalloc(size,priority)
#define kfree_skb(buff,size) kfree_s(buff,size)
#endif
#ifdef EL3_DEBUG
int el3_debug = EL3_DEBUG;
......@@ -96,6 +89,9 @@ static void update_stats(int addr, struct device *dev);
static struct enet_statistics *el3_get_stats(struct device *dev);
static int el3_rx(struct device *dev);
static int el3_close(struct device *dev);
#ifdef HAVE_MULTICAST
static void set_multicast_list(struct device *dev, int num_addrs, void *addrs);
#endif
......@@ -184,8 +180,11 @@ int el3_probe(struct device *dev)
dev->hard_start_xmit = &el3_start_xmit;
dev->stop = &el3_close;
dev->get_stats = &el3_get_stats;
#ifdef HAVE_MULTICAST
dev->set_multicast_list = &set_multicast_list;
#endif
/* Fill in the generic field of the device structure. */
/* Fill in the generic fields of the device structure. */
for (i = 0; i < DEV_NUMBUFFS; i++)
dev->buffs[i] = NULL;
......@@ -328,6 +327,7 @@ el3_start_xmit(struct sk_buff *skb, struct device *dev)
arp_queue (skb);
return 0;
}
skb->arp=1;
if (skb->len <= 0)
return 0;
......@@ -347,27 +347,26 @@ el3_start_xmit(struct sk_buff *skb, struct device *dev)
}
/* Avoid timer-based retransmission conflicts. */
dev->tbusy=1;
/* Put out the doubleword header... */
outw(skb->len, ioaddr + TX_FIFO);
outw(0x00, ioaddr + TX_FIFO);
/* ... and the packet rounded to a doubleword. */
port_write_l(ioaddr + TX_FIFO, (void *)(skb+1), (skb->len + 3) >> 2);
if (set_bit(0, (void*)&dev->tbusy) != 0)
printk("%s: Transmitter access conflict.\n", dev->name);
else {
/* Put out the doubleword header... */
outw(skb->len, ioaddr + TX_FIFO);
outw(0x00, ioaddr + TX_FIFO);
/* ... and the packet rounded to a doubleword. */
port_write_l(ioaddr + TX_FIFO, (void *)(skb+1), (skb->len + 3) >> 2);
dev->trans_start = jiffies;
dev->trans_start = jiffies;
if (inw(ioaddr + TX_FREE) > 1536) {
dev->tbusy=0;
} else
/* Interrupt us when the FIFO has room for max-sized packet. */
outw(0x9000 + 1536, ioaddr + EL3_CMD);
}
if (skb->free)
kfree_skb (skb, FREE_WRITE);
if (inw(ioaddr + TX_FREE) > 1536) {
dev->tbusy=0;
} else
/* Interrupt us when the FIFO has room for max-sized packet. */
outw(0x9000 + 1536, ioaddr + EL3_CMD);
if (el3_debug > 4)
printk(" Finished queueing packet, FIFO room remaining %d.\n",
inw(ioaddr + TX_FREE));
/* Clear the Tx status stack. */
{
short tx_status;
......@@ -515,8 +514,8 @@ el3_rx(struct device *dev)
short pkt_len = rx_status & 0x7ff;
int sksize = sizeof(struct sk_buff) + pkt_len + 3;
struct sk_buff *skb;
skb = (struct sk_buff *) kmalloc(sksize, GFP_ATOMIC);
skb = alloc_skb(sksize, GFP_ATOMIC);
if (el3_debug > 4)
printk(" Receiving packet size %d status %4.4x.\n",
pkt_len, rx_status);
......@@ -551,7 +550,7 @@ el3_rx(struct device *dev)
continue;
} else {
printk("%s: receive buffers full.\n", dev->name);
kfree_s(skb, sksize);
kfree_skbmem(skb, sksize);
}
#endif
} else if (el3_debug)
......@@ -572,6 +571,26 @@ el3_rx(struct device *dev)
return 0;
}
#ifdef HAVE_MULTICAST
/* Set or clear the multicast filter for this adaptor.
num_addrs == -1 Promiscuous mode, receive all packets
num_addrs == 0 Normal mode, clear multicast list
num_addrs > 0 Multicast mode, receive normal and MC packets, and do
best-effort filtering.
*/
static void
set_multicast_list(struct device *dev, int num_addrs, void *addrs)
{
short ioaddr = dev->base_addr;
if (num_addrs > 0) {
outw(0x8007, ioaddr + EL3_CMD);
} else if (num_addrs < 0) {
outw(0x8008, ioaddr + EL3_CMD);
} else
outw(0x8005, ioaddr + EL3_CMD);
}
#endif
static int
el3_close(struct device *dev)
{
......
This diff is collapsed.
......@@ -36,10 +36,6 @@
# D_LINK_DEBUG Enable or disable D-Link debugging
#
# This is at the top level with 'make config'
CARDS =
OPTS = #-DEI8390=0 -DEI8390_IRQ=0
WD_OPTS = #-DWD_SHMEM=0
EL2_OPTS = #-UEL2_AUI
......@@ -47,5 +43,5 @@ NE_OPTS =
HP_OPTS =
PLIP_OPTS =
SLIP_OPTS = -DSL_DUMP -DSL_COMPRESSED
DL_OPTS = -DD_LINK_IO=0x378 -DD_LINK_IRQ=7 -UD_LINK_DEBUG
DL_OPTS = # -DD_LINK_IO=0x378 -DD_LINK_IRQ=7 -UD_LINK_DEBUG
AT_OPTS = # -DLANCE_DMA=5
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment