Commit c3aa3674 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.3.9

parent 6b141b34
...@@ -164,6 +164,13 @@ S: 14509 NE 39th Street #1096 ...@@ -164,6 +164,13 @@ S: 14509 NE 39th Street #1096
S: Bellevue, Washington 98007 S: Bellevue, Washington 98007
S: USA S: USA
N: Hamish Coleman
E: hamish@zot.apana.org.au
D: SEEQ8005 network driver
S: 98 Paxton Street
S: East Malvern, Victoria, 3145
S: Australia
N: Alan Cox N: Alan Cox
E: A.Cox@swansea.ac.uk E: A.Cox@swansea.ac.uk
E: iiitac@pyr.swan.ac.uk E: iiitac@pyr.swan.ac.uk
...@@ -235,7 +242,7 @@ S: Sweden ...@@ -235,7 +242,7 @@ S: Sweden
N: Paal-Kristian Engstad N: Paal-Kristian Engstad
E: engstad@funcom.com E: engstad@funcom.com
D: Wrote smbfs (to mount WfW, NT and OS/2 network drives.) D: Kernel smbfs (to mount WfW, NT and OS/2 network drives.)
S: Oscars gt. 35 S: Oscars gt. 35
S: N-0258 OSLO S: N-0258 OSLO
S: Norway S: Norway
...@@ -474,6 +481,13 @@ S: Mr. v. Boemellaan 39 ...@@ -474,6 +481,13 @@ S: Mr. v. Boemellaan 39
S: NL-5237 KA 's-Hertogenbosch S: NL-5237 KA 's-Hertogenbosch
S: The Netherlands S: The Netherlands
N: Volker Lendecke
E: lendecke@namu01.gwdg.de
D: Kernel smbfs (to mount WfW, NT and OS/2 network drives.)
S: Innersteweg 11
S: 37081 Goettingen
S: Germany
N: Kevin Lentin N: Kevin Lentin
E: kevinl@cs.monash.edu.au E: kevinl@cs.monash.edu.au
D: NCR53C400/T130B SCSI extension to NCR5380 driver. D: NCR53C400/T130B SCSI extension to NCR5380 driver.
......
VERSION = 1 VERSION = 1
PATCHLEVEL = 3 PATCHLEVEL = 3
SUBLEVEL = 8 SUBLEVEL = 9
ARCH = i386 ARCH = i386
...@@ -106,8 +106,6 @@ endif ...@@ -106,8 +106,6 @@ endif
include arch/$(ARCH)/Makefile include arch/$(ARCH)/Makefile
.c.s:
$(CC) $(CFLAGS) -S -o $*.s $<
.s.o: .s.o:
$(AS) -o $*.o $< $(AS) -o $*.o $<
.c.o: .c.o:
......
#
# This file contains rules which are shared between multiple Makefiles.
#
#
# Common rules
#
.c.s:
$(CC) $(CFLAGS) -S $<
#
# A rule to do nothing
#
dummy:
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
# Copyright (C) 1994 by Linus Torvalds # Copyright (C) 1994 by Linus Torvalds
# #
.c.s:
$(CC) $(CFLAGS) -S -o $*.s $<
.s.o: .s.o:
$(AS) -o $*.o $< $(AS) -o $*.o $<
.c.o: .c.o:
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o: .s.o:
$(AS) -o $*.o $< $(AS) -o $*.o $<
.c.o: .c.o:
...@@ -35,13 +33,4 @@ kernel.o: $(OBJS) ...@@ -35,13 +33,4 @@ kernel.o: $(OBJS)
dep: dep:
$(CPP) -M *.c > .depend $(CPP) -M *.c > .depend
dummy: include $(TOPDIR)/Rules.make
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -369,6 +369,8 @@ sys_fork: ...@@ -369,6 +369,8 @@ sys_fork:
jsr $26,($27),alpha_fork jsr $26,($27),alpha_fork
br $0,undo_switch_stack br $0,undo_switch_stack
ldq $0,0($30) ldq $0,0($30)
bis $31,2,$19 /* Make sure that the stored user register v0 has */
stq $19,0($30) /* the syscall # for fork */
ret $31,($26),1 ret $31,($26),1
.end sys_fork .end sys_fork
...@@ -406,8 +408,16 @@ entSys: ...@@ -406,8 +408,16 @@ entSys:
beq $1,1f beq $1,1f
ldq $27,0($2) ldq $27,0($2)
1: jsr $26,($27),do_entSys 1: jsr $26,($27),do_entSys
ldq $1,0($30) /* We have to handle ptrace specially */
subq $1,26,$1 /* since it returns a pointer value it will*/
bne $1,3f /* set up a3 and v0 in the return frame */
ldq $1,72($30)
stq $1,0($30)
stq $0,72($30)
bis $31,$31,$1 bis $31,$31,$1
bge $0,2f br $31,ret_from_sys_call
3: bis $31,$31,$1
bge $0,2f /* the call succeeded */
bis $31,$31,$26 /* tell "ret_from_sys_call" that we can restart */ bis $31,$31,$26 /* tell "ret_from_sys_call" that we can restart */
ldq $19,0($30) /* .. with this syscall nr */ ldq $19,0($30) /* .. with this syscall nr */
ldq $20,72($30) /* .. and this a3 */ ldq $20,72($30) /* .. and this a3 */
......
This diff is collapsed.
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# Makefile for alpha-specific library files.. # Makefile for alpha-specific library files..
# #
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o: .s.o:
$(AS) -c -o $*.o $< $(AS) -c -o $*.o $<
.c.o: .c.o:
...@@ -30,10 +28,4 @@ __remlu.o: divide.S ...@@ -30,10 +28,4 @@ __remlu.o: divide.S
dep: dep:
# include $(TOPDIR)/Rules.make
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -24,7 +24,7 @@ static inline unsigned short from64to16(unsigned long x) ...@@ -24,7 +24,7 @@ static inline unsigned short from64to16(unsigned long x)
/* /*
* computes the checksum of the TCP/UDP pseudo-header * computes the checksum of the TCP/UDP pseudo-header
* returns a 16-bit checksum, already complemented * returns a 16-bit checksum, already complemented.
*/ */
unsigned short int csum_tcpudp_magic(unsigned long saddr, unsigned short int csum_tcpudp_magic(unsigned long saddr,
unsigned long daddr, unsigned long daddr,
...@@ -32,7 +32,9 @@ unsigned short int csum_tcpudp_magic(unsigned long saddr, ...@@ -32,7 +32,9 @@ unsigned short int csum_tcpudp_magic(unsigned long saddr,
unsigned short proto, unsigned short proto,
unsigned int sum) unsigned int sum)
{ {
return ~from64to16(saddr + daddr + sum + (ntohs(len) << 16) + (proto << 8)); return ~from64to16(saddr + daddr + sum +
((unsigned long) ntohs(len) << 16) +
((unsigned long) proto << 8));
} }
/* /*
...@@ -83,6 +85,7 @@ static inline unsigned long do_csum(unsigned char * buff, int len) ...@@ -83,6 +85,7 @@ static inline unsigned long do_csum(unsigned char * buff, int len)
carry = (w > result); carry = (w > result);
} while (count); } while (count);
result += carry; result += carry;
result = (result & 0xffffffff) + (result >> 32);
} }
if (len & 4) { if (len & 4) {
result += *(unsigned int *) buff; result += *(unsigned int *) buff;
......
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
$(CC) $(CFLAGS) -c $< $(CC) $(CFLAGS) -c $<
.s.o: .s.o:
$(AS) -o $*.o $< $(AS) -o $*.o $<
.c.s:
$(CC) $(CFLAGS) -S $<
OBJS = init.o fault.o OBJS = init.o fault.o
...@@ -24,9 +22,4 @@ modules: ...@@ -24,9 +22,4 @@ modules:
dep: dep:
$(CPP) -M *.c > .depend $(CPP) -M *.c > .depend
# include $(TOPDIR)/Rules.make
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -17,8 +17,6 @@ INPUT_DATA=input_data ...@@ -17,8 +17,6 @@ INPUT_DATA=input_data
INPUT_LEN=input_len INPUT_LEN=input_len
endif endif
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o: .s.o:
$(AS) -o $*.o $< $(AS) -o $*.o $<
.c.o: .c.o:
......
...@@ -166,6 +166,7 @@ if [ "$CONFIG_NET_ISA" = "y" ]; then ...@@ -166,6 +166,7 @@ if [ "$CONFIG_NET_ISA" = "y" ]; then
bool 'DEPCA support' CONFIG_DEPCA n bool 'DEPCA support' CONFIG_DEPCA n
bool 'EtherWorks 3 support' CONFIG_EWRK3 n bool 'EtherWorks 3 support' CONFIG_EWRK3 n
if [ "$CONFIG_NET_ALPHA" = "y" ]; then if [ "$CONFIG_NET_ALPHA" = "y" ]; then
bool 'SEEQ8005 support' CONFIG_SEEQ8005 n
bool 'AT1700 support' CONFIG_AT1700 n bool 'AT1700 support' CONFIG_AT1700 n
bool 'EtherExpressPro support' CONFIG_EEXPRESS_PRO n bool 'EtherExpressPro support' CONFIG_EEXPRESS_PRO n
bool 'EtherExpress support' CONFIG_EEXPRESS n bool 'EtherExpress support' CONFIG_EEXPRESS n
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o: .s.o:
$(AS) -o $*.o $< $(AS) -o $*.o $<
.c.o: .c.o:
...@@ -38,13 +36,4 @@ dep: ...@@ -38,13 +36,4 @@ dep:
modules: modules:
dummy: include $(TOPDIR)/Rules.make
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# Makefile for i386-specific library files.. # Makefile for i386-specific library files..
# #
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o: .s.o:
$(AS) -c -o $*.o $< $(AS) -c -o $*.o $<
.c.o: .c.o:
...@@ -19,10 +17,4 @@ dep: ...@@ -19,10 +17,4 @@ dep:
modules: modules:
# include $(TOPDIR)/Rules.make
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -42,11 +42,4 @@ proto: ...@@ -42,11 +42,4 @@ proto:
modules: modules:
dummy: include $(TOPDIR)/Rules.make
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
$(CC) $(CFLAGS) -c $< $(CC) $(CFLAGS) -c $<
.s.o: .s.o:
$(AS) -o $*.o $< $(AS) -o $*.o $<
.c.s:
$(CC) $(CFLAGS) -S $<
OBJS = init.o fault.o OBJS = init.o fault.o
...@@ -24,9 +22,4 @@ modules: ...@@ -24,9 +22,4 @@ modules:
dep: dep:
$(CPP) -M *.c > .depend $(CPP) -M *.c > .depend
# include $(TOPDIR)/Rules.make
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o: .s.o:
$(AS) $(ASFLAGS) -o $*.o $< $(AS) $(ASFLAGS) -o $*.o $<
.c.o: .c.o:
...@@ -60,11 +58,4 @@ dep: ...@@ -60,11 +58,4 @@ dep:
modules: modules:
dummy: include $(TOPDIR)/Rules.make
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
$(CC) $(CFLAGS) -c $< $(CC) $(CFLAGS) -c $<
.s.o: .s.o:
$(AS) -o $*.o $< $(AS) -o $*.o $<
.c.s:
$(CC) $(CFLAGS) -S $<
OBJS = fault.o init.o OBJS = fault.o init.o
...@@ -24,9 +22,4 @@ modules: ...@@ -24,9 +22,4 @@ modules:
dep: dep:
$(CPP) -M *.c > .depend $(CPP) -M *.c > .depend
# include $(TOPDIR)/Rules.make
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
OBJS =bare.o init_me.o ../kernel/promops.o ../lib/lib.a OBJS =bare.o init_me.o ../kernel/promops.o ../lib/lib.a
BOOTLINKFLAGS = -N -Ttext 0x200000 -e _first_adr_in_text BOOTLINKFLAGS = -N -Ttext 0x200000 -e _first_adr_in_text
.c.s:
$(CC) $(CFLAGS) -S -o $*.s $<
.s.o: .s.o:
$(AS) -o $*.o $< $(AS) -o $*.o $<
.c.o: .c.o:
...@@ -25,11 +23,4 @@ dep: ...@@ -25,11 +23,4 @@ dep:
$(CPP) -M *.c > .depend $(CPP) -M *.c > .depend
$(CPP) -M -D__ASSEMBLY__ -ansi *.S >>.depend $(CPP) -M -D__ASSEMBLY__ -ansi *.S >>.depend
dummy: include $(TOPDIR)/Rules.make
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o: .s.o:
$(AS) -o $*.o $< $(AS) -o $*.o $<
.c.o: .c.o:
...@@ -36,13 +34,4 @@ dep: ...@@ -36,13 +34,4 @@ dep:
$(CPP) -M *.c > .depend $(CPP) -M *.c > .depend
$(CPP) -M -D__ASSEMBLY__ -ansi *.S >>.depend $(CPP) -M -D__ASSEMBLY__ -ansi *.S >>.depend
dummy: include $(TOPDIR)/Rules.make
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
CFLAGS := $(CFLAGS) -ansi CFLAGS := $(CFLAGS) -ansi
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o: .s.o:
$(AS) -c -o $*.o $< $(AS) -c -o $*.o $<
.c.o: .c.o:
...@@ -40,9 +38,4 @@ ashrdi3.o: ashrdi3.S ...@@ -40,9 +38,4 @@ ashrdi3.o: ashrdi3.S
dep: dep:
# include $(TOPDIR)/Rules.make
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
$(CC) $(CFLAGS) -c $< $(CC) $(CFLAGS) -c $<
.s.o: .s.o:
$(AS) -o $*.o $< $(AS) -o $*.o $<
.c.s:
$(CC) $(CFLAGS) -S $<
OBJS = fault.o vac-flush.o init.o sun4c.o srmmu.o loadmmu.o OBJS = fault.o vac-flush.o init.o sun4c.o srmmu.o loadmmu.o
...@@ -24,9 +22,4 @@ modules: ...@@ -24,9 +22,4 @@ modules:
dep: dep:
$(CPP) -M *.c > .depend $(CPP) -M *.c > .depend
# include $(TOPDIR)/Rules.make
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -23,11 +23,4 @@ promlib.a: $(OBJS) ...@@ -23,11 +23,4 @@ promlib.a: $(OBJS)
dep: dep:
$(CPP) -M *.c > .depend $(CPP) -M *.c > .depend
dummy: include $(TOPDIR)/Rules.make
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -9,14 +9,13 @@ ...@@ -9,14 +9,13 @@
.S.s: .S.s:
$(CPP) -traditional $< -o $*.s $(CPP) -traditional $< -o $*.s
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o: .s.o:
$(AS) -c -o $*.o $< $(AS) -c -o $*.o $<
.c.o: .c.o:
$(CC) $(CFLAGS) -c $< $(CC) $(CFLAGS) -c $<
SUBDIRS = block char net #streams SUBDIRS = block char net #streams
ALL_SUBDIRS = block char net scsi #streams
ifdef CONFIG_PCI ifdef CONFIG_PCI
SUBDIRS := $(SUBDIRS) pci SUBDIRS := $(SUBDIRS) pci
...@@ -36,17 +35,9 @@ driversubdirs: dummy ...@@ -36,17 +35,9 @@ driversubdirs: dummy
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i; done set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i; done
modules: dummy modules: dummy
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i modules; done set -e; for i in $(ALL_SUBDIRS); do $(MAKE) -C $$i modules; done
dep: dep:
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i dep; done set -e; for i in $(ALL_SUBDIRS); do $(MAKE) -C $$i dep; done
dummy:
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
include $(TOPDIR)/Rules.make
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
# parent makefile. # parent makefile.
# #
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o: .s.o:
$(AS) -c -o $*.o $< $(AS) -c -o $*.o $<
.c.o: .c.o:
...@@ -147,11 +145,4 @@ modules: $(BLOCK_MODULE_OBJS) ...@@ -147,11 +145,4 @@ modules: $(BLOCK_MODULE_OBJS)
echo $(BLOCK_MODULE_OBJS) > ../../modules/BLOCK_MODULES echo $(BLOCK_MODULE_OBJS) > ../../modules/BLOCK_MODULES
(cd ../../modules;for i in $(BLOCK_MODULE_OBJS); do ln -sf ../drivers/block/$$i .; done) (cd ../../modules;for i in $(BLOCK_MODULE_OBJS); do ln -sf ../drivers/block/$$i .; done)
dummy: include $(TOPDIR)/Rules.make
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
Readme-File README.aztcd Readme-File README.aztcd
for Aztech CD-ROM CDA268-01A, ORCHID CD-3110, OKANO/WEARNES CDD110 for Aztech CD-ROM CDA268-01A, ORCHID CD-3110, OKANO/WEARNES CDD110
CD-ROM Driver CD-ROM Driver
Version 1.0 and newer Version 1.2 and newer
(for other drives see 6.-8.) (for other drives see 6.-8.)
NOTE: THIS DRIVER WILL WORK WITH THE CD-ROM DRIVES LISTED, WHICH HAVE NOTE: THIS DRIVER WILL WORK WITH THE CD-ROM DRIVES LISTED, WHICH HAVE
...@@ -10,20 +10,27 @@ NOTE: THIS DRIVER WILL WORK WITH THE CD-ROM DRIVES LISTED, WHICH HAVE ...@@ -10,20 +10,27 @@ NOTE: THIS DRIVER WILL WORK WITH THE CD-ROM DRIVES LISTED, WHICH HAVE
IT WILL DEFINITELY NOT WORK WITH CD-ROM DRIVES WITH *IDE*-INTERFACE, IT WILL DEFINITELY NOT WORK WITH CD-ROM DRIVES WITH *IDE*-INTERFACE,
such as the Aztech CDA269-031SE !!! IF YOU'RE USING A CD-ROM DRIVE such as the Aztech CDA269-031SE !!! IF YOU'RE USING A CD-ROM DRIVE
WITH IDE-INTERFACE, SOMETIMES ALSO CALLED ATAPI-COMPATIBLE, PLEASE WITH IDE-INTERFACE, SOMETIMES ALSO CALLED ATAPI-COMPATIBLE, PLEASE
USE THE ide-cd.c DRIVER, WRITTEN BY MARK LORD AND SCOTT SNYDER !!! USE THE ide-cd.c DRIVER, WRITTEN BY MARK LORD AND SCOTT SNYDER !
THE STANDARD-KERNEL 1.2.x NOW ALSO SUPPORTS IDE-CDROM-DRIVES, SEE THE
HARDDISK (!) SECTION OF make config, WHEN COMPILING A NEW KERNEL!!!
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
Contents of this file: Contents of this file:
1. NOTE 1. NOTE
2. INSTALLATION 2. INSTALLATION
3. CONFIGURING YOUR KERNEL 3. CONFIGURING YOUR KERNEL
4. RECOMPILING YOUR KERNEL 4. RECOMPILING YOUR KERNEL
5. KNOWN PROBLEMS, FUTURE DEVELOPMENTS 4.1 AZTCD AS A RUN-TIME LOADABLE MODULE
6. BUG REPORTS 4.2 CDROM CONNECTED TO A SOUNDCARD
7. OTHER DRIVES 5. KNOWN PROBLEMS, FUTURE DEVELOPMENTS
8. IF YOU DON'T SUCCEED ... DEBUGGING 5.1 MULTISESSION SUPPORT
9. TECHNICAL HISTORY OF THE DRIVER 5.2 STATUS RECOGNITION
10. ACKNOWLEDGMENTS 5.3 DOSEMU's CDROM SUPPORT
11. PROGRAMMING ADD ONS: CDPLAY.C 6. BUG REPORTS
7. OTHER DRIVES
8. IF YOU DON'T SUCCEED ... DEBUGGING
9. TECHNICAL HISTORY OF THE DRIVER
10. ACKNOWLEDGMENTS
11. PROGRAMMING ADD ONS: CDPLAY.C
APPENDIX: Source code of cdplay.c APPENDIX: Source code of cdplay.c
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
...@@ -94,7 +101,7 @@ filesystem, you have to recompile your kernel: ...@@ -94,7 +101,7 @@ filesystem, you have to recompile your kernel:
- Edit aztcd.h to set the I/O-address to your I/O-Base address (AZT_BASE_ADDR), - Edit aztcd.h to set the I/O-address to your I/O-Base address (AZT_BASE_ADDR),
the driver does not use interrupts or DMA, so if you are using an AZTECH the driver does not use interrupts or DMA, so if you are using an AZTECH
CD268, an ORCHID CD-3110 or ORCHID/WEARNES CDD110 that's the only item you CD268, an ORCHID CD-3110 or ORCHID/WEARNES CDD110 that's the only item you
have to set up. have to set up. If you have a soundcard, read chapter 4.2.
Users of other drives should read chapter OTHER DRIVES of this file. Users of other drives should read chapter OTHER DRIVES of this file.
You also can configure that address by LILO boot parameter aztcd=... You also can configure that address by LILO boot parameter aztcd=...
- Build a new kernel, configure it for 'Aztech/Orchid/Okano/Wearnes support' - Build a new kernel, configure it for 'Aztech/Orchid/Okano/Wearnes support'
...@@ -126,8 +133,10 @@ filesystem, you have to recompile your kernel: ...@@ -126,8 +133,10 @@ filesystem, you have to recompile your kernel:
4.1 AZTCD AS A RUN-TIME LOADABLE MODULE 4.1 AZTCD AS A RUN-TIME LOADABLE MODULE
If you do not need aztcd permanently, you can also load and remove the driver If you do not need aztcd permanently, you can also load and remove the driver
during runtime via insmod and rmmod. To build aztcd as a loadable module you during runtime via insmod and rmmod. To build aztcd as a loadable module you
must *not* configure your kernel for AZTECH support. But you need to have must *not* configure your kernel for AZTECH support. Nevertheless, you may
the ISO9660-filesystem included! So rebuild your kernel, if necessary. run into problems, if the version of your boot kernel is not the same than
the source kernel version, from which you create the modules. So rebuild your
kernel, if necessary.
Now edit the base address of your AZTECH interface card in Now edit the base address of your AZTECH interface card in
/usr/src/linux/include/linux/aztcd.h to the appropriate value. Then change /usr/src/linux/include/linux/aztcd.h to the appropriate value. Then change
...@@ -137,20 +146,42 @@ to /usr/src/linux and do a ...@@ -137,20 +146,42 @@ to /usr/src/linux and do a
After that you can run-time load the driver via After that you can run-time load the driver via
insmod /lib/modules/X.X.X/misc/aztcd.o insmod /lib/modules/X.X.X/misc/aztcd.o
and remove it via rmmod aztcd. and remove it via rmmod aztcd.
If you have not configured the correct base address, you can also supply the If you did not set the correct base address in aztcd.h, you can also supply the
base address when loading the driver via base address when loading the driver via
insmod /lib/modules/X.X.X/misc/aztcd.o aztcd=<base address> insmod /lib/modules/X.X.X/misc/aztcd.o aztcd=<base address>
In all commands 'X.X.X' is the current linux kernel version number. For details If you do not have the iso9660-filesystem in your boot kernel, you also have
see file README.modules in /usr/src/linux. to load it before you can mount the CDROM:
insmod /lib/modules/X.X.X/fs/isofs.o
The mount procedure works as described in 4. above.
(In all commands 'X.X.X' is the current linux kernel version number. For details
see file README.modules in /usr/src/linux.)
4.2 CDROM CONNECTED TO A SOUNDCARD
Most soundcards do have a bus interface to the CDROM-drive. In many cases
this soundcard needs to be configured, before the CDROM can be used. This
configuration procedure consists of writing some kind of initialization
data to the soundcard registers. The AZTECH-CDROM driver in the moment does
only support one type of soundcard (SoundWave32). Users of other soundcards
should try to boot DOS first and let their DOS drivers initialize the
soundcard and CDROM, then warm boot (or use loadlin) their PC to start
Linux.
Support for the CDROM-interface of SoundWave32-soundcards is directly
implemented in the AZTECH driver. Please edit /usr/src/linux/include/aztdc.h,
uncomment line '#define AZT_SW32' and set the appropiate value for
AZT_BASE_ADDR and AZT_SW32_BASE_ADDR. This support was tested with an Orchid
CDS-3110 connected to a SoundWave32.
If you want your soundcard to be supported, find out, how it needs to be
configured and mail me (see 6.) the appropriate information.
5. KNOWN PROBLEMS, FUTURE DEVELOPMENTS 5. KNOWN PROBLEMS, FUTURE DEVELOPMENTS
5.1 MULTISESSION SUPPORT
The driver does not support applications such as photo CD, multi session CD The driver does not support applications such as photo CD, multi session CD
etc.. I do not plan to include the support for that in the driver, because I etc.. I do not plan to include the support for that in the driver, because I
do not use such applications. If you are interested in that stuff and would do not use such applications. If you are interested in that stuff and would
like to extend the drivers capability on your own, please contact me, I'll like to extend the drivers capability on your own, please contact me, I'll
support you as far as I can. support you as far as I can.
5.2 STATUS RECOGNITION
The drive status recognition does not work correctly in all cases. Changing The drive status recognition does not work correctly in all cases. Changing
a disk or having the door open, when a drive is already mounted, is detected a disk or having the door open, when a drive is already mounted, is detected
by the Aztech driver itself, but nevertheless causes multiple read attempts by the Aztech driver itself, but nevertheless causes multiple read attempts
...@@ -170,6 +201,16 @@ shown to be a little critical. If you get kernel panic messages, edit aztcd.c ...@@ -170,6 +201,16 @@ shown to be a little critical. If you get kernel panic messages, edit aztcd.c
and substitute STEN_LOW_WAIT by STEN_LOW. Busy waiting with STEN_LOW is more and substitute STEN_LOW_WAIT by STEN_LOW. Busy waiting with STEN_LOW is more
stable, but also causes CPU overhead. stable, but also causes CPU overhead.
5.3 DOSEMU's CD-ROM SUPPORT
With release 1.20 aztcd was modified to allow access to CD-ROMS when running
under dosemu-0.60. aztcd-versions before 1.20 are most likely to crash
Linux, when a CD-ROM is accessed under dosemu. This problem has partly been
fixed, but still when accessing a directory for the first time the system
might hang for some 30sec. So be patient, when using dosemu's CD-ROM support
in combination with aztcd :-) ! Unfortunately up to now, I could not locate
the root cause of that problem. It seems to be somewhere in the interaction
of the kernel with dosemu's and aztcd's buffers. I appreciate any help on
this subject !
6. BUG REPORTS 6. BUG REPORTS
Please send detailed bug reports and bug fixes via EMail to Please send detailed bug reports and bug fixes via EMail to
...@@ -380,7 +421,7 @@ questions in the newsgroups. He really is *the* Linux CD-ROM guru. Thanks ...@@ -380,7 +421,7 @@ questions in the newsgroups. He really is *the* Linux CD-ROM guru. Thanks
also to all the guys on the Internet, who collected valuable technical also to all the guys on the Internet, who collected valuable technical
information about CDROMs. information about CDROMs.
Joe Nardone (nardone@clark.net) was a patient tester even for my first Joe Nardone (joe@access.digex.net) was a patient tester even for my first
trial, which was more than slow, and made suggestions for code improvement. trial, which was more than slow, and made suggestions for code improvement.
Especially the 'finite state machine' azt_poll() was rewritten by Joe to get Especially the 'finite state machine' azt_poll() was rewritten by Joe to get
clean C code and avoid the ugly 'gotos', which I copied from mcd.c. clean C code and avoid the ugly 'gotos', which I copied from mcd.c.
...@@ -391,6 +432,9 @@ and suggested a lot of patches for them. ...@@ -391,6 +432,9 @@ and suggested a lot of patches for them.
Joseph Piskor and Peter Nugent were the first users with the ORCHID CD3110 Joseph Piskor and Peter Nugent were the first users with the ORCHID CD3110
and also were very patient with the problems which occurred. and also were very patient with the problems which occurred.
Reinhard Max delivered the information for the CDROM-interface of the
SoundWave32 soundcards.
Anybody, who is interested in these items should have a look at 'ftp.gwdg.de', Anybody, who is interested in these items should have a look at 'ftp.gwdg.de',
directory 'pub/linux/cdrom' and at 'ftp.cdrom.com', directory 'pub/cdrom'. directory 'pub/linux/cdrom' and at 'ftp.cdrom.com', directory 'pub/cdrom'.
......
README.ide -- Information regarding ide.c and ide-cd.c (IDE driver in 1.2.x) README.ide -- Information regarding ide.c and ide-cd.c (IDE driver in 1.3.x)
================================================================================ ================================================================================
Supported by: mlord@bnr.ca -- disks, interfaces, probing Supported by: mlord@bnr.ca -- disks, interfaces, probing
snyder@fnald0.fnal.gov -- cdroms, ATAPI, audio snyder@fnald0.fnal.gov -- cdroms, ATAPI, audio
...@@ -21,18 +21,16 @@ Major features of ide.c & ide-cd.c: ...@@ -21,18 +21,16 @@ Major features of ide.c & ide-cd.c:
- support for interrupt unmasking during I/O (better than hd.c) - support for interrupt unmasking during I/O (better than hd.c)
- improved handshaking and error detection/recovery - improved handshaking and error detection/recovery
- can co-exist with hd.c to control only the secondary interface - can co-exist with hd.c to control only the secondary interface
NEW! - support for reliable operation of buggy CMD-640 interfaces - support for reliable operation of buggy CMD-640 interfaces
- use kernel command line option: hda=serialize - use kernel command line option: hda=serialize
NEW! - experimental support for DTC-2278D interfaces - experimental support for DTC-2278D interfaces
- use kernel command line option: hda=dtc2278 - use kernel command line option: hda=dtc2278
NEW! - run-time selectable 32bit interface support (using hdparm-2.3) - run-time selectable 32bit interface support (using hdparm-2.3)
Under construction: NEW! - support for DiskManager 6.0x "Dynamic Disk Overlay" (experimental)
NEW! - support for drives with a stuck WRERR_STAT bit
NEW! - support for removeable devices
- improved CMD support: tech info is supposedly "in the mail"
- support for interface speed selection on jumperless interfaces
- improved detection of non-standard IDE ATAPI cdrom drives
- support for non-standard 3rd/4th drive interface on Promise cards
*** ***
...@@ -266,13 +264,10 @@ endings" and emit messages such as "This is larger than 1024, and may cause ...@@ -266,13 +264,10 @@ endings" and emit messages such as "This is larger than 1024, and may cause
problems with some software". Ignore them for linux partitions. The "some problems with some software". Ignore them for linux partitions. The "some
software" refers to DOS, the BIOS, and LILO, as described previously. software" refers to DOS, the BIOS, and LILO, as described previously.
Western Digital now ships a "DiskManager 6.03" diskette with all of their big Western Digital ships a "DiskManager 6.03" diskette with all of their big
hard drives. Burn it! That idiotic piece of garbage isn't even universally hard drives. Use BIOS translation instead of this if possible, as it is a
compatible with DOS, let alone other operating systems like Linux. Eventually more generally compatible method of achieving the same results (DOS access
some kind person will kludge Linux to work with it, but at present the two to the entire disk). However, if you must use DiskManager, it should now
are completely incompatible. If you have this version of DiskManager on your work with Linux 1.3.x in most cases. Let me know if you still have trouble.
hard disk already, it can be exterminated at the expense of all data on the
drive (back it up elsewhere), by using the "DM" command from the diskette
as follows: DM /Y-
mlord@bnr.ca mlord@bnr.ca
This diff is collapsed.
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
* errors to allow safe writing by specialized programs. * errors to allow safe writing by specialized programs.
*/ */
/* 1994/4/24 -- Dan Fandrich -- added support for Commodore 1581 3.5" disks /* 1995/4/24 -- Dan Fandrich -- added support for Commodore 1581 3.5" disks
* by defining bit 1 of the "stretch" parameter to mean put sectors on the * by defining bit 1 of the "stretch" parameter to mean put sectors on the
* opposite side of the disk, leaving the sector IDs alone (i.e. Commodore's * opposite side of the disk, leaving the sector IDs alone (i.e. Commodore's
* drives are "upside-down"). * drives are "upside-down").
......
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
* in the early extended-partition checks and added DM partitions * in the early extended-partition checks and added DM partitions
*/ */
/*
* Support for DiskManager v6.0x added by Mark Lord (mlord@bnr.ca)
* with hints from uwe@eas.iis.fhg.de (us3@irz.inf.tu-dresden.de).
*/
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/genhd.h> #include <linux/genhd.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -105,21 +110,62 @@ static void extended_partition(struct gendisk *hd, int dev) ...@@ -105,21 +110,62 @@ static void extended_partition(struct gendisk *hd, int dev)
static int msdos_partition(struct gendisk *hd, unsigned int dev, unsigned long first_sector) static int msdos_partition(struct gendisk *hd, unsigned int dev, unsigned long first_sector)
{ {
int i, minor = current_minor; int i, minor = current_minor, found_dm6 = 0;
struct buffer_head *bh; struct buffer_head *bh;
struct partition *p; struct partition *p;
int mask = (1 << hd->minor_shift) - 1; int mask = (1 << hd->minor_shift) - 1;
extern void ide_xlate_1024(dev_t);
read_mbr:
if (!(bh = bread(dev,0,1024))) { if (!(bh = bread(dev,0,1024))) {
printk("unable to read partition table\n"); printk("unable to read partition table\n");
return -1; return -1;
} }
if (*(unsigned short *) (bh->b_data+510) != 0xAA55) { if (*(unsigned short *) (0x1fe + bh->b_data) != 0xAA55) {
brelse(bh); brelse(bh);
return 0; return 0;
} }
p = (struct partition *) (0x1be + bh->b_data);
/*
* Check for Disk Manager v6.0x "Dynamic Disk Overlay" (DDO)
*/
if (p->sys_ind == DM6_PARTITION && !found_dm6++)
{
printk(" [DM6:DDO]");
/*
* Everything is offset by one track (p->end_sector sectors),
* and a translated geometry is used to reduce the number
* of apparent cylinders to 1024 or less.
*
* For complete compatibility with linux fdisk, we do:
* 1. tell the driver to offset *everything* by one track,
* 2. reduce the apparent disk capacity by one track,
* 3. adjust the geometry reported by HDIO_GETGEO (for fdisk),
* (does nothing if not an IDE drive, but that's okay).
* 4. invalidate our in-memory copy of block zero,
* 5. restart the partition table hunt from scratch.
*/
first_sector += p->end_sector;
hd->part[MINOR(dev)].start_sect += p->end_sector;
hd->part[MINOR(dev)].nr_sects -= p->end_sector;
ide_xlate_1024(dev); /* harmless if not an IDE drive */
bh->b_dirt = 0; /* prevent re-use of this block */
bh->b_uptodate = 0;
bh->b_req = 0;
brelse(bh);
goto read_mbr;
}
/*
* Check for Disk Manager v6.0x DDO on a secondary drive (?)
*/
if (p->sys_ind == DM6_AUXPARTITION) {
printk(" [DM6]");
ide_xlate_1024(dev); /* harmless if not an IDE drive */
}
current_minor += 4; /* first "extra" minor (for extended partitions) */ current_minor += 4; /* first "extra" minor (for extended partitions) */
p = (struct partition *) (0x1BE + bh->b_data);
for (i=1 ; i<=4 ; minor++,i++,p++) { for (i=1 ; i<=4 ; minor++,i++,p++) {
if (!p->nr_sects) if (!p->nr_sects)
continue; continue;
...@@ -133,10 +179,10 @@ static int msdos_partition(struct gendisk *hd, unsigned int dev, unsigned long f ...@@ -133,10 +179,10 @@ static int msdos_partition(struct gendisk *hd, unsigned int dev, unsigned long f
} }
} }
/* /*
* check for Disk Manager partition table * Check for old-style Disk Manager partition table
*/ */
if (*(unsigned short *) (bh->b_data+0xfc) == 0x55AA) { if (*(unsigned short *) (bh->b_data+0xfc) == 0x55AA) {
p = (struct partition *) (0x1BE + bh->b_data); p = (struct partition *) (0x1be + bh->b_data);
for (i = 4 ; i < 16 ; i++, current_minor++) { for (i = 4 ; i < 16 ; i++, current_minor++) {
p--; p--;
if ((current_minor & mask) >= mask-2) if ((current_minor & mask) >= mask-2)
......
This diff is collapsed.
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* Eberhard Moenkeberg (he gave me much support and the initial kick) * Eberhard Moenkeberg (he gave me much support and the initial kick)
* Bernd Huebner, Ruediger Helsch (Unifix-Software GmbH, they * Bernd Huebner, Ruediger Helsch (Unifix-Software GmbH, they
* improved the original driver) * improved the original driver)
* John Tombs, Bjorn Ekwall (module support) * Jon Tombs, Bjorn Ekwall (module support)
* Daniel v. Mosnenck (he sent me the Technical and Programming Reference) * Daniel v. Mosnenck (he sent me the Technical and Programming Reference)
* Gerd Knorr (he lent me his PhotoCD) * Gerd Knorr (he lent me his PhotoCD)
* Nils Faerber and Roger E. Wolff (extensivly tested the LU portion) * Nils Faerber and Roger E. Wolff (extensivly tested the LU portion)
......
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
# parent makes.. # parent makes..
# #
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o: .s.o:
$(AS) -c -o $*.o $< $(AS) -c -o $*.o $<
.c.o: .c.o:
...@@ -108,17 +106,10 @@ ifdef MODULES ...@@ -108,17 +106,10 @@ ifdef MODULES
$(CPP) -M -DMODULE $(MODULES:.o=.c) >> .depend $(CPP) -M -DMODULE $(MODULES:.o=.c) >> .depend
endif endif
dummy:
conmakehash: conmakehash.c conmakehash: conmakehash.c
$(HOSTCC) -o conmakehash conmakehash.c $(HOSTCC) -o conmakehash conmakehash.c
uni_hash_tbl.h: $(FONTMAPFILE) conmakehash uni_hash_tbl.h: $(FONTMAPFILE) conmakehash
./conmakehash $(FONTMAPFILE) 641 283 6 > uni_hash_tbl.h ./conmakehash $(FONTMAPFILE) 641 283 6 > uni_hash_tbl.h
# include $(TOPDIR)/Rules.make
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -24,6 +24,10 @@ Space.o: Space.c ../../include/linux/autoconf.h ...@@ -24,6 +24,10 @@ Space.o: Space.c ../../include/linux/autoconf.h
net_init.o: ../../include/linux/autoconf.h net_init.o: ../../include/linux/autoconf.h
ifdef CONFIG_SEEQ8005
NETDRV_OBJS := $(NETDRV_OBJS) seeq8005.o
endif
ifdef CONFIG_IBMTR ifdef CONFIG_IBMTR
NETDRV_OBJS := $(NETDRV_OBJS) ibmtr.o NETDRV_OBJS := $(NETDRV_OBJS) ibmtr.o
endif endif
...@@ -304,8 +308,4 @@ modules: ...@@ -304,8 +308,4 @@ modules:
endif endif
# include a dependency file if one exists include $(TOPDIR)/Rules.make
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -66,6 +66,7 @@ extern int e2100_probe(struct device *); ...@@ -66,6 +66,7 @@ extern int e2100_probe(struct device *);
extern int ni52_probe(struct device *); extern int ni52_probe(struct device *);
extern int ni65_probe(struct device *); extern int ni65_probe(struct device *);
extern int SK_init(struct device *); extern int SK_init(struct device *);
extern int seeq8005_probe(struct device *);
/* Detachable devices ("pocket adaptors") */ /* Detachable devices ("pocket adaptors") */
extern int atp_init(struct device *); extern int atp_init(struct device *);
...@@ -81,6 +82,9 @@ ethif_probe(struct device *dev) ...@@ -81,6 +82,9 @@ ethif_probe(struct device *dev)
return 1; /* ENXIO */ return 1; /* ENXIO */
if (1 if (1
#if defined(CONFIG_SEEQ8005)
&& seeq8005_probe(dev)
#endif
#if defined(CONFIG_HP100) #if defined(CONFIG_HP100)
&& hp100_probe(dev) && hp100_probe(dev)
#endif #endif
......
...@@ -41,14 +41,14 @@ static char *version= ...@@ -41,14 +41,14 @@ static char *version=
struct device *irq2dev_map[16] = {0, 0, /* ... zeroed */}; struct device *irq2dev_map[16] = {0, 0, /* ... zeroed */};
int irqs_busy = 0x2147; /* The set of fixed IRQs (keyboard, timer, etc) */ unsigned long irqs_busy = 0x2147; /* The set of fixed IRQs (keyboard, timer, etc) */
int irqs_used = 0x0001; /* The set of fixed IRQs sometimes enabled. */ unsigned long irqs_used = 0x0001; /* The set of fixed IRQs sometimes enabled. */
int irqs_reserved = 0x0000; /* An advisory "reserved" table. */ unsigned long irqs_reserved = 0x0000; /* An advisory "reserved" table. */
int irqs_shared = 0x0000; /* IRQ lines "shared" among conforming cards.*/ unsigned long irqs_shared = 0x0000; /* IRQ lines "shared" among conforming cards.*/
static volatile int irq_number; /* The latest irq number we actually found. */ static volatile unsigned long irq_bitmap; /* The irqs we actually found. */
static volatile int irq_bitmap; /* The irqs we actually found. */ static unsigned long irq_handled; /* The irq lines we have a handler on. */
static int irq_handled; /* The irq lines we have a handler on. */ static volatile int irq_number; /* The latest irq number we actually found. */
static void autoirq_probe(int irq, struct pt_regs * regs) static void autoirq_probe(int irq, struct pt_regs * regs)
{ {
......
...@@ -188,12 +188,13 @@ struct lance_init_block { ...@@ -188,12 +188,13 @@ struct lance_init_block {
}; };
struct lance_private { struct lance_private {
char *name; /* The Tx and Rx ring entries must be aligned on 8-byte boundaries.
void *pad; This is accomplished by allocating 7 extra bytes for the struct
/* The Tx and Rx ring entries must aligned on 8-byte boundaries. */ and adjusting the start of the struct to be 8-byte aligned. */
struct lance_rx_head rx_ring[RX_RING_SIZE]; struct lance_rx_head rx_ring[RX_RING_SIZE];
struct lance_tx_head tx_ring[TX_RING_SIZE]; struct lance_tx_head tx_ring[TX_RING_SIZE];
struct lance_init_block init_block; struct lance_init_block init_block;
char *name;
/* The saved address of a sent-in-place packet/buffer, for skfree(). */ /* The saved address of a sent-in-place packet/buffer, for skfree(). */
struct sk_buff* tx_skbuff[TX_RING_SIZE]; struct sk_buff* tx_skbuff[TX_RING_SIZE];
long rx_buffs; /* Address of Rx and Tx buffers. */ long rx_buffs; /* Address of Rx and Tx buffers. */
...@@ -206,7 +207,6 @@ struct lance_private { ...@@ -206,7 +207,6 @@ struct lance_private {
unsigned char chip_version; /* See lance_chip_type. */ unsigned char chip_version; /* See lance_chip_type. */
char tx_full; char tx_full;
char lock; char lock;
int pad0, pad1; /* Used for 8-byte alignment */
}; };
#define LANCE_MUST_PAD 0x00000001 #define LANCE_MUST_PAD 0x00000001
...@@ -249,6 +249,10 @@ enum {OLD_LANCE = 0, PCNET_ISA=1, PCNET_ISAP=2, PCNET_PCI=3, PCNET_VLB=4, LANCE_ ...@@ -249,6 +249,10 @@ enum {OLD_LANCE = 0, PCNET_ISA=1, PCNET_ISAP=2, PCNET_PCI=3, PCNET_VLB=4, LANCE_
/* Non-zero only if the current card is a PCI with BIOS-set IRQ. */ /* Non-zero only if the current card is a PCI with BIOS-set IRQ. */
static unsigned char pci_irq_line = 0; static unsigned char pci_irq_line = 0;
/* Non-zero if lance_probe1() needs to allocate low-memory bounce buffers.
Assume yes until we know the memory size. */
static unsigned char lance_need_isa_bounce_buffers = 1;
static int lance_open(struct device *dev); static int lance_open(struct device *dev);
static void lance_init_ring(struct device *dev); static void lance_init_ring(struct device *dev);
static int lance_start_xmit(struct sk_buff *skb, struct device *dev); static int lance_start_xmit(struct sk_buff *skb, struct device *dev);
...@@ -272,6 +276,9 @@ unsigned long lance_init(unsigned long mem_start, unsigned long mem_end) ...@@ -272,6 +276,9 @@ unsigned long lance_init(unsigned long mem_start, unsigned long mem_end)
{ {
int *port; int *port;
if (mem_end <= 16*1024*1024)
lance_need_isa_bounce_buffers = 0;
#if defined(CONFIG_PCI) #if defined(CONFIG_PCI)
if (pcibios_present()) { if (pcibios_present()) {
int pci_index; int pci_index;
...@@ -342,7 +349,7 @@ unsigned long lance_probe1(int ioaddr, unsigned long mem_start) ...@@ -342,7 +349,7 @@ unsigned long lance_probe1(int ioaddr, unsigned long mem_start)
This method provided by L. Julliard, Laurent_Julliard@grenoble.hp.com. This method provided by L. Julliard, Laurent_Julliard@grenoble.hp.com.
*/ */
if ( *((unsigned short *) 0x000f0102) == 0x5048) { if ( *((unsigned short *) 0x000f0102) == 0x5048) {
short ioaddr_table[] = { 0x300, 0x320, 0x340, 0x360}; static const short ioaddr_table[] = { 0x300, 0x320, 0x340, 0x360};
int hp_port = ( *((unsigned char *) 0x000f00f1) & 1) ? 0x499 : 0x99; int hp_port = ( *((unsigned char *) 0x000f00f1) & 1) ? 0x499 : 0x99;
/* We can have boards other than the built-in! Verify this is on-board. */ /* We can have boards other than the built-in! Verify this is on-board. */
if ((inb(hp_port) & 0xc0) == 0x80 if ((inb(hp_port) & 0xc0) == 0x80
...@@ -384,8 +391,12 @@ unsigned long lance_probe1(int ioaddr, unsigned long mem_start) ...@@ -384,8 +391,12 @@ unsigned long lance_probe1(int ioaddr, unsigned long mem_start)
} }
} }
dev = init_etherdev(0, sizeof(struct lance_private) dev = init_etherdev(0, 7
+ PKT_BUF_SZ*(RX_RING_SIZE + TX_RING_SIZE), + ((sizeof(struct lance_private) + 7) & ~7)
+ PKT_BUF_SZ*RX_RING_SIZE
+ (lance_need_isa_bounce_buffers
? PKT_BUF_SZ*TX_RING_SIZE
: 0),
&mem_start); &mem_start);
chipname = chip_table[lance_version].name; chipname = chip_table[lance_version].name;
...@@ -403,18 +414,10 @@ unsigned long lance_probe1(int ioaddr, unsigned long mem_start) ...@@ -403,18 +414,10 @@ unsigned long lance_probe1(int ioaddr, unsigned long mem_start)
dev->priv = (void *)(((int)dev->priv + 7) & ~7); dev->priv = (void *)(((int)dev->priv + 7) & ~7);
lp = (struct lance_private *)dev->priv; lp = (struct lance_private *)dev->priv;
lp->name = chipname; lp->name = chipname;
lp->rx_buffs = (long)dev->priv + sizeof(struct lance_private); lp->rx_buffs = (long)lp + ((sizeof(struct lance_private) + 7) & ~7);
lp->tx_bounce_buffs = (char (*)[PKT_BUF_SZ]) lp->tx_bounce_buffs = (char (*)[PKT_BUF_SZ])
(lp->rx_buffs + PKT_BUF_SZ*RX_RING_SIZE); (lp->rx_buffs + PKT_BUF_SZ*RX_RING_SIZE);
#ifndef final_version
/* This should never happen. */
if ((int)(lp->rx_ring) & 0x07) {
printk(" **ERROR** LANCE Rx and Tx rings not on even boundary.\n");
return mem_start;
}
#endif
lp->chip_version = lance_version; lp->chip_version = lance_version;
lp->init_block.mode = 0x0003; /* Disable Rx and Tx. */ lp->init_block.mode = 0x0003; /* Disable Rx and Tx. */
...@@ -438,15 +441,15 @@ unsigned long lance_probe1(int ioaddr, unsigned long mem_start) ...@@ -438,15 +441,15 @@ unsigned long lance_probe1(int ioaddr, unsigned long mem_start)
dev->dma = 4; /* Native bus-master, no DMA channel needed. */ dev->dma = 4; /* Native bus-master, no DMA channel needed. */
dev->irq = pci_irq_line; dev->irq = pci_irq_line;
} else if (hp_builtin) { } else if (hp_builtin) {
char dma_tbl[4] = {3, 5, 6, 0}; static const char dma_tbl[4] = {3, 5, 6, 0};
char irq_tbl[8] = {3, 4, 5, 9}; static const char irq_tbl[4] = {3, 4, 5, 9};
unsigned char port_val = inb(hp_builtin); unsigned char port_val = inb(hp_builtin);
dev->dma = dma_tbl[(port_val >> 4) & 3]; dev->dma = dma_tbl[(port_val >> 4) & 3];
dev->irq = irq_tbl[(port_val >> 2) & 3]; dev->irq = irq_tbl[(port_val >> 2) & 3];
printk(" HP Vectra IRQ %d DMA %d.\n", dev->irq, dev->dma); printk(" HP Vectra IRQ %d DMA %d.\n", dev->irq, dev->dma);
} else if (hpJ2405A) { } else if (hpJ2405A) {
char dma_tbl[4] = {3, 5, 6, 7}; static const char dma_tbl[4] = {3, 5, 6, 7};
char irq_tbl[8] = {3, 4, 5, 9, 10, 11, 12, 15}; static const char irq_tbl[8] = {3, 4, 5, 9, 10, 11, 12, 15};
short reset_val = inw(ioaddr+LANCE_RESET); short reset_val = inw(ioaddr+LANCE_RESET);
dev->dma = dma_tbl[(reset_val >> 2) & 3]; dev->dma = dma_tbl[(reset_val >> 2) & 3];
dev->irq = irq_tbl[(reset_val >> 4) & 7]; dev->irq = irq_tbl[(reset_val >> 4) & 7];
...@@ -503,10 +506,10 @@ unsigned long lance_probe1(int ioaddr, unsigned long mem_start) ...@@ -503,10 +506,10 @@ unsigned long lance_probe1(int ioaddr, unsigned long mem_start)
} else } else
printk(", assigned DMA %d.\n", dev->dma); printk(", assigned DMA %d.\n", dev->dma);
} else { /* OK, we have to auto-DMA. */ } else { /* OK, we have to auto-DMA. */
int dmas[] = { 5, 6, 7, 3 }, boguscnt;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
static const char dmas[] = { 5, 6, 7, 3 };
int dma = dmas[i]; int dma = dmas[i];
int boguscnt;
/* Don't enable a permanently busy DMA channel, or the machine /* Don't enable a permanently busy DMA channel, or the machine
will hang. */ will hang. */
...@@ -1000,7 +1003,8 @@ lance_rx(struct device *dev) ...@@ -1000,7 +1003,8 @@ lance_rx(struct device *dev)
} }
skb->dev = dev; skb->dev = dev;
skb_reserve(skb,2); /* 16 byte align */ skb_reserve(skb,2); /* 16 byte align */
eth_copy_and_sum(skb_put(skb,pkt_len), skb_put(skb,pkt_len); /* Make room */
eth_copy_and_sum(skb,
(unsigned char *)(lp->rx_ring[entry].base & 0x00ffffff), (unsigned char *)(lp->rx_ring[entry].base & 0x00ffffff),
pkt_len,0); pkt_len,0);
skb->protocol=eth_type_trans(skb,dev); skb->protocol=eth_type_trans(skb,dev);
......
This diff is collapsed.
/*
* defines, etc for the seeq8005
*/
/*
* This file is distributed under GPL.
*
* This style and layout of this file is also copied
* from many of the other linux network device drivers.
*/
/* The number of low I/O ports used by the ethercard. */
#define SEEQ8005_IO_EXTENT 16
#define SEEQ_B (ioaddr)
#define SEEQ_CMD (SEEQ_B) /* Write only */
#define SEEQ_STATUS (SEEQ_B) /* Read only */
#define SEEQ_CFG1 (SEEQ_B + 2)
#define SEEQ_CFG2 (SEEQ_B + 4)
#define SEEQ_REA (SEEQ_B + 6) /* Receive End Area Register */
#define SEEQ_RPR (SEEQ_B + 10) /* Receive Pointer Register */
#define SEEQ_TPR (SEEQ_B + 12) /* Transmit Pointer Register */
#define SEEQ_DMAAR (SEEQ_B + 14) /* DMA Address Register */
#define SEEQ_BUFFER (SEEQ_B + 8) /* Buffer Window Register */
#define DEFAULT_TEA (0x3f)
#define SEEQCMD_DMA_INT_EN (0x0001) /* DMA Interrupt Enable */
#define SEEQCMD_RX_INT_EN (0x0002) /* Receive Interrupt Enable */
#define SEEQCMD_TX_INT_EN (0x0004) /* Transmit Interrupt Enable */
#define SEEQCMD_WINDOW_INT_EN (0x0008) /* What the hell is this for?? */
#define SEEQCMD_INT_MASK (0x000f)
#define SEEQCMD_DMA_INT_ACK (0x0010) /* DMA ack */
#define SEEQCMD_RX_INT_ACK (0x0020)
#define SEEQCMD_TX_INT_ACK (0x0040)
#define SEEQCMD_WINDOW_INT_ACK (0x0080)
#define SEEQCMD_ACK_ALL (0x00f0)
#define SEEQCMD_SET_DMA_ON (0x0100) /* Enables DMA Request logic */
#define SEEQCMD_SET_RX_ON (0x0200) /* Enables Packet RX */
#define SEEQCMD_SET_TX_ON (0x0400) /* Starts TX run */
#define SEEQCMD_SET_DMA_OFF (0x0800)
#define SEEQCMD_SET_RX_OFF (0x1000)
#define SEEQCMD_SET_TX_OFF (0x2000)
#define SEEQCMD_SET_ALL_OFF (0x3800) /* set all logic off */
#define SEEQCMD_FIFO_READ (0x4000) /* Set FIFO to read mode (read from Buffer) */
#define SEEQCMD_FIFO_WRITE (0x8000) /* Set FIFO to write mode */
#define SEEQSTAT_DMA_INT_EN (0x0001) /* Status of interrupt enable */
#define SEEQSTAT_RX_INT_EN (0x0002)
#define SEEQSTAT_TX_INT_EN (0x0004)
#define SEEQSTAT_WINDOW_INT_EN (0x0008)
#define SEEQSTAT_DMA_INT (0x0010) /* Interrupt flagged */
#define SEEQSTAT_RX_INT (0x0020)
#define SEEQSTAT_TX_INT (0x0040)
#define SEEQSTAT_WINDOW_INT (0x0080)
#define SEEQSTAT_ANY_INT (0x00f0)
#define SEEQSTAT_DMA_ON (0x0100) /* DMA logic on */
#define SEEQSTAT_RX_ON (0x0200) /* Packet RX on */
#define SEEQSTAT_TX_ON (0x0400) /* TX running */
#define SEEQSTAT_FIFO_FULL (0x2000)
#define SEEQSTAT_FIFO_EMPTY (0x4000)
#define SEEQSTAT_FIFO_DIR (0x8000) /* 1=read, 0=write */
#define SEEQCFG1_BUFFER_MASK (0x000f) /* define what mapps into the BUFFER register */
#define SEEQCFG1_BUFFER_MAC0 (0x0000) /* MAC station addresses 0-5 */
#define SEEQCFG1_BUFFER_MAC1 (0x0001)
#define SEEQCFG1_BUFFER_MAC2 (0x0002)
#define SEEQCFG1_BUFFER_MAC3 (0x0003)
#define SEEQCFG1_BUFFER_MAC4 (0x0004)
#define SEEQCFG1_BUFFER_MAC5 (0x0005)
#define SEEQCFG1_BUFFER_PROM (0x0006) /* The Address/CFG PROM */
#define SEEQCFG1_BUFFER_TEA (0x0007) /* Transmit end area */
#define SEEQCFG1_BUFFER_BUFFER (0x0008) /* Packet buffer memory */
#define SEEQCFG1_BUFFER_INT_VEC (0x0009) /* Interrupt Vector */
#define SEEQCFG1_DMA_INTVL_MASK (0x0030)
#define SEEQCFG1_DMA_CONT (0x0000)
#define SEEQCFG1_DMA_800ns (0x0010)
#define SEEQCFG1_DMA_1600ns (0x0020)
#define SEEQCFG1_DMA_3200ns (0x0030)
#define SEEQCFG1_DMA_LEN_MASK (0x00c0)
#define SEEQCFG1_DMA_LEN1 (0x0000)
#define SEEQCFG1_DMA_LEN2 (0x0040)
#define SEEQCFG1_DMA_LEN4 (0x0080)
#define SEEQCFG1_DMA_LEN8 (0x00c0)
#define SEEQCFG1_MAC_MASK (0x3f00) /* Dis/enable bits for MAC addresses */
#define SEEQCFG1_MAC0_EN (0x0100)
#define SEEQCFG1_MAC1_EN (0x0200)
#define SEEQCFG1_MAC2_EN (0x0400)
#define SEEQCFG1_MAC3_EN (0x0800)
#define SEEQCFG1_MAC4_EN (0x1000)
#define SEEQCFG1_MAC5_EN (0x2000)
#define SEEQCFG1_MATCH_MASK (0xc000) /* Packet matching logic cfg bits */
#define SEEQCFG1_MATCH_SPECIFIC (0x0000) /* only matching MAC addresses */
#define SEEQCFG1_MATCH_BROAD (0x4000) /* matching and broadcast addresses */
#define SEEQCFG1_MATCH_MULTI (0x8000) /* matching, broadcast and multicast */
#define SEEQCFG1_MATCH_ALL (0xc000) /* Promiscuous mode */
#define SEEQCFG1_DEFAULT (SEEQCFG1_BUFFER_BUFFER | SEEQCFG1_MAC0_EN | SEEQCFG1_MATCH_BROAD)
#define SEEQCFG2_BYTE_SWAP (0x0001) /* 0=Intel byte-order */
#define SEEQCFG2_AUTO_REA (0x0002) /* if set, Receive End Area will be updated when reading from Buffer */
#define SEEQCFG2_CRC_ERR_EN (0x0008) /* enables receiving of packets with CRC errors */
#define SEEQCFG2_DRIBBLE_EN (0x0010) /* enables receiving of non-aligned packets */
#define SEEQCFG2_SHORT_EN (0x0020) /* enables receiving of short packets */
#define SEEQCFG2_SLOTSEL (0x0040) /* 0= standard IEEE802.3, 1= smaller,faster, non-standard */
#define SEEQCFG2_NO_PREAM (0x0080) /* 1= user supplies Xmit preamble bytes */
#define SEEQCFG2_ADDR_LEN (0x0100) /* 1= 2byte addresses */
#define SEEQCFG2_REC_CRC (0x0200) /* 0= recieved packets will have CRC stripped from them */
#define SEEQCFG2_XMIT_NO_CRC (0x0400) /* dont xmit CRC with each packet (user supplies it) */
#define SEEQCFG2_LOOPBACK (0x0800)
#define SEEQCFG2_CTRLO (0x1000)
#define SEEQCFG2_RESET (0x8000) /* software Hard-reset bit */
struct seeq_pkt_hdr {
unsigned short next; /* address of next packet header */
unsigned char babble_int:1, /* enable int on >1514 byte packet */
coll_int:1, /* enable int on collision */
coll_16_int:1, /* enable int on >15 collision */
xmit_int:1, /* enable int on success (or xmit with <15 collision) */
unused:1,
data_follows:1, /* if not set, process this as a header and pointer only */
chain_cont:1, /* if set, more headers in chain only cmd bit valid in recv header */
xmit_recv:1; /* if set, a xmit packet, else a recieve packet.*/
unsigned char status;
};
#define SEEQPKTH_BAB_INT_EN (0x01) /* xmit only */
#define SEEQPKTH_COL_INT_EN (0x02) /* xmit only */
#define SEEQPKTH_COL16_INT_EN (0x04) /* xmit only */
#define SEEQPKTH_XMIT_INT_EN (0x08) /* xmit only */
#define SEEQPKTH_DATA_FOLLOWS (0x20) /* supposedly in xmit only */
#define SEEQPKTH_CHAIN (0x40) /* more headers follow */
#define SEEQPKTH_XMIT (0x80)
#define SEEQPKTS_BABBLE (0x0100) /* xmit only */
#define SEEQPKTS_OVERSIZE (0x0100) /* recv only */
#define SEEQPKTS_COLLISION (0x0200) /* xmit only */
#define SEEQPKTS_CRC_ERR (0x0200) /* recv only */
#define SEEQPKTS_COLL16 (0x0400) /* xmit only */
#define SEEQPKTS_DRIB (0x0400) /* recv only */
#define SEEQPKTS_SHORT (0x0800) /* recv only */
#define SEEQPKTS_DONE (0x8000)
#define SEEQPKTS_ANY_ERROR (0x0f00)
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
# parent makefile. # parent makefile.
# #
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o: .s.o:
$(AS) -c -o $*.o $< $(AS) -c -o $*.o $<
.c.o: .c.o:
...@@ -30,11 +28,5 @@ dep: ...@@ -30,11 +28,5 @@ dep:
$(CPP) -M $(SRCS) > .depend $(CPP) -M $(SRCS) > .depend
modules: modules:
dummy:
# include $(TOPDIR)/Rules.make
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
...@@ -74,6 +74,8 @@ struct pci_dev_info dev_info[] = { ...@@ -74,6 +74,8 @@ struct pci_dev_info dev_info[] = {
DEVICE( INTEL, INTEL_82430, "82430ZX Aries"), DEVICE( INTEL, INTEL_82430, "82430ZX Aries"),
DEVICE( INTEL, INTEL_82437, "82437 Triton"), DEVICE( INTEL, INTEL_82437, "82437 Triton"),
DEVICE( INTEL, INTEL_82371, "82471 Triton"), DEVICE( INTEL, INTEL_82371, "82471 Triton"),
DEVICE( INTEL, INTEL_82438, "82438"),
DEVICE( INTEL, INTEL_7116, "SAA7116"),
DEVICE( SMC, SMC_37C665, "FDC 37C665"), DEVICE( SMC, SMC_37C665, "FDC 37C665"),
DEVICE( ATI, ATI_M32, "Mach 32"), DEVICE( ATI, ATI_M32, "Mach 32"),
DEVICE( ATI, ATI_M64, "Mach 64"), DEVICE( ATI, ATI_M64, "Mach 64"),
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
# unless it's something special (ie not a .c file). # unless it's something special (ie not a .c file).
# #
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o: .s.o:
$(AS) -c -o $*.o $< $(AS) -c -o $*.o $<
.c.o: .c.o:
...@@ -264,13 +262,10 @@ modules: $(SCSI_MODULE_VER) $(SCSI_MODULE_OBJS) ...@@ -264,13 +262,10 @@ modules: $(SCSI_MODULE_VER) $(SCSI_MODULE_OBJS)
(cd ../../modules;for i in $(SCSI_MODULE_OBJS); do ln -sf ../drivers/scsi/$$i .; done) (cd ../../modules;for i in $(SCSI_MODULE_OBJS); do ln -sf ../drivers/scsi/$$i .; done)
dep: $(SCSI_DEP) dep: $(SCSI_DEP)
$(CPP) -M $(AHA152X) $(SCSI_SRCS) > .depend $(CPP) -M $(AHA152X) constants.c $(SCSI_OBJS:.o=.c) > .depend
$(CPP) -M -DMODULE $(patsubst sd_mod.c,sd.c sd_ioctl.c, \ $(CPP) -M -DMODULE $(patsubst scsi_mod.c,scsi.c hosts.c scsi_ioctl.c \
$(patsubst sr_mod.c,sr.c sr_ioctl.c, $(SCSI_MODULE_OBJS:.o=.c))) >> .depend constants.c scsicam.c scsi_proc.c, \
$(patsubst sd_mod.c,sd.c sd_ioctl.c, \
$(patsubst sr_mod.c,sr.c sr_ioctl.c, $(SCSI_MODULE_OBJS:.o=.c)))) >> .depend
# include $(TOPDIR)/Rules.make
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
This diff is collapsed.
This diff is collapsed.
...@@ -302,6 +302,7 @@ typedef struct scsi_device { ...@@ -302,6 +302,7 @@ typedef struct scsi_device {
unsigned writeable:1; unsigned writeable:1;
unsigned removable:1; unsigned removable:1;
unsigned random:1; unsigned random:1;
unsigned has_cmdblocks:1;
unsigned changed:1; /* Data invalid due to media change */ unsigned changed:1; /* Data invalid due to media change */
unsigned busy:1; /* Used to prevent races */ unsigned busy:1; /* Used to prevent races */
unsigned lockable:1; /* Able to prevent media removal */ unsigned lockable:1; /* Able to prevent media removal */
...@@ -312,6 +313,8 @@ typedef struct scsi_device { ...@@ -312,6 +313,8 @@ typedef struct scsi_device {
unsigned disconnect:1; /* can disconnect */ unsigned disconnect:1; /* can disconnect */
unsigned soft_reset:1; /* Uses soft reset option */ unsigned soft_reset:1; /* Uses soft reset option */
unsigned sync:1; /* Negotiate for sync transfers */ unsigned sync:1; /* Negotiate for sync transfers */
unsigned single_lun:1; /* Indicates we should only allow I/O to
one of the luns for the device at a time. */
unsigned char current_tag; /* current tag */ unsigned char current_tag; /* current tag */
unsigned char sync_min_period; /* Not less than this period */ unsigned char sync_min_period; /* Not less than this period */
unsigned char sync_max_offset; /* Not greater than this offset */ unsigned char sync_max_offset; /* Not greater than this offset */
......
...@@ -122,6 +122,11 @@ static volatile unsigned int timeout[SCSI_DEBUG_MAILBOXES] ={0,}; ...@@ -122,6 +122,11 @@ static volatile unsigned int timeout[SCSI_DEBUG_MAILBOXES] ={0,};
static char sense_buffer[128] = {0,}; static char sense_buffer[128] = {0,};
/*
* Semaphore used to simulate bus lockups.
*/
static int scsi_debug_lockup = 0;
static void scsi_dump(Scsi_Cmnd * SCpnt, int flag){ static void scsi_dump(Scsi_Cmnd * SCpnt, int flag){
int i; int i;
#if 0 #if 0
...@@ -229,7 +234,7 @@ int scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) ...@@ -229,7 +234,7 @@ int scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
scsi_debug_errsts = 0; scsi_debug_errsts = 0;
break; break;
case TEST_UNIT_READY: case TEST_UNIT_READY:
printk("Test unit ready.\n"); printk("Test unit ready(%x %d)\n", buff, bufflen);
if (buff) if (buff)
memset(buff, 0, bufflen); memset(buff, 0, bufflen);
scsi_debug_errsts = 0; scsi_debug_errsts = 0;
...@@ -288,6 +293,7 @@ int scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) ...@@ -288,6 +293,7 @@ int scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
/* If this is block 0, then we want to read the partition table for this /* If this is block 0, then we want to read the partition table for this
* device. Let's make one up */ * device. Let's make one up */
if(block == 0 && target == 0) { if(block == 0 && target == 0) {
memset(buff, 0, bufflen);
*((unsigned short *) (buff+510)) = 0xAA55; *((unsigned short *) (buff+510)) = 0xAA55;
p = (struct partition* ) (buff + 0x1be); p = (struct partition* ) (buff + 0x1be);
npart = 0; npart = 0;
...@@ -412,8 +418,12 @@ int scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) ...@@ -412,8 +418,12 @@ int scsi_debug_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
printk("scsi_debug_queuecommand: done cant be NULL\n"); printk("scsi_debug_queuecommand: done cant be NULL\n");
#ifdef IMMEDIATE #ifdef IMMEDIATE
SCpnt->result = scsi_debug_errsts; if( !scsi_debug_lockup )
scsi_debug_intr_handle(); /* No timer - do this one right away */ {
SCpnt->result = scsi_debug_errsts;
scsi_debug_intr_handle(); /* No timer - do this one right away */
}
restore_flags(flags);
#else #else
timeout[i] = jiffies+DISK_SPEED; timeout[i] = jiffies+DISK_SPEED;
...@@ -580,19 +590,20 @@ int scsi_debug_reset(Scsi_Cmnd * SCpnt) ...@@ -580,19 +590,20 @@ int scsi_debug_reset(Scsi_Cmnd * SCpnt)
unsigned long flags; unsigned long flags;
void (*my_done)(Scsi_Cmnd *); void (*my_done)(Scsi_Cmnd *);
scsi_debug_lockup = 0;
DEB(printk("scsi_debug_reset called\n")); DEB(printk("scsi_debug_reset called\n"));
for(i=0;i<SCSI_DEBUG_MAILBOXES; i++) { for(i=0;i<SCSI_DEBUG_MAILBOXES; i++) {
if (SCint[i] == NULL) continue; if (SCint[i] == NULL) continue;
SCint[i]->result = DID_ABORT << 16; SCint[i]->result = DID_ABORT << 16;
my_done = do_done[i]; my_done = do_done[i];
my_done(SCint[i]); my_done(SCint[i]);
save_flags(flags); save_flags(flags);
cli(); cli();
SCint[i] = NULL; SCint[i] = NULL;
do_done[i] = NULL; do_done[i] = NULL;
timeout[i] = 0; timeout[i] = 0;
restore_flags(flags); restore_flags(flags);
}; }
return 0; return 0;
} }
...@@ -602,7 +613,7 @@ const char *scsi_debug_info(void) ...@@ -602,7 +613,7 @@ const char *scsi_debug_info(void)
return buffer; return buffer;
} }
/* generic_proc_info /* scsi_debug_proc_info
* Used if the driver currently has no own support for /proc/scsi * Used if the driver currently has no own support for /proc/scsi
*/ */
int scsi_debug_proc_info(char *buffer, char **start, off_t offset, int scsi_debug_proc_info(char *buffer, char **start, off_t offset,
...@@ -611,7 +622,35 @@ int scsi_debug_proc_info(char *buffer, char **start, off_t offset, ...@@ -611,7 +622,35 @@ int scsi_debug_proc_info(char *buffer, char **start, off_t offset,
int len, pos, begin; int len, pos, begin;
if(inout == 1) if(inout == 1)
return(-ENOSYS); /* This is a no-op */ {
/* First check for the Signature */
if (length >= 10 && strncmp(buffer, "scsi_debug", 10) == 0) {
buffer += 11;
length -= 11;
/*
* OK, we are getting some kind of command. Figure out
* what we are supposed to do here. Simulate bus lockups
* to test our reset capability.
*/
if( length == 6 && strncmp(buffer, "lockup", length) == 0 )
{
scsi_debug_lockup = 1;
return length;
}
if( length == 6 && strncmp(buffer, "unlock", length) == 0 )
{
scsi_debug_lockup = 0;
return length;
}
printk("Unknown command:%s\n", buffer);
} else
printk("Wrong Signature:%10s\n", (char *) ((ulong)buffer-11));
return -EINVAL;
}
begin = 0; begin = 0;
pos = len = sprintf(buffer, pos = len = sprintf(buffer,
......
...@@ -42,11 +42,14 @@ ...@@ -42,11 +42,14 @@
static int ioctl_probe(struct Scsi_Host * host, void *buffer) static int ioctl_probe(struct Scsi_Host * host, void *buffer)
{ {
int temp; int temp, result;
unsigned int len,slen; unsigned int len,slen;
const char * string; const char * string;
if ((temp = host->hostt->present) && buffer) { if ((temp = host->hostt->present) && buffer) {
result = verify_area(VERIFY_READ, buffer, sizeof(long));
if (result) return result;
len = get_user ((unsigned int *) buffer); len = get_user ((unsigned int *) buffer);
if(host->hostt->info) if(host->hostt->info)
string = host->hostt->info(host); string = host->hostt->info(host);
...@@ -56,7 +59,9 @@ static int ioctl_probe(struct Scsi_Host * host, void *buffer) ...@@ -56,7 +59,9 @@ static int ioctl_probe(struct Scsi_Host * host, void *buffer)
slen = strlen(string); slen = strlen(string);
if (len > slen) if (len > slen)
len = slen + 1; len = slen + 1;
verify_area(VERIFY_WRITE, buffer, len); result = verify_area(VERIFY_WRITE, buffer, len);
if (result) return result;
memcpy_tofs (buffer, string, len); memcpy_tofs (buffer, string, len);
} }
} }
...@@ -139,7 +144,7 @@ static int ioctl_internal_command(Scsi_Device *dev, char * cmd) ...@@ -139,7 +144,7 @@ static int ioctl_internal_command(Scsi_Device *dev, char * cmd)
break; break;
}; };
default: /* Fall through for non-removable media */ default: /* Fall through for non-removable media */
printk("SCSI CD error: host %d id %d lun %d return code = %x\n", printk("SCSI error: host %d id %d lun %d return code = %x\n",
dev->host->host_no, dev->host->host_no,
dev->id, dev->id,
dev->lun, dev->lun,
...@@ -157,6 +162,11 @@ static int ioctl_internal_command(Scsi_Device *dev, char * cmd) ...@@ -157,6 +162,11 @@ static int ioctl_internal_command(Scsi_Device *dev, char * cmd)
return result; return result;
} }
/*
* This interface is depreciated - users should use the scsi generics
* interface instead, as this is a more flexible approach to performing
* generic SCSI commands on a device.
*/
static int ioctl_command(Scsi_Device *dev, void *buffer) static int ioctl_command(Scsi_Device *dev, void *buffer)
{ {
char * buf; char * buf;
...@@ -171,11 +181,35 @@ static int ioctl_command(Scsi_Device *dev, void *buffer) ...@@ -171,11 +181,35 @@ static int ioctl_command(Scsi_Device *dev, void *buffer)
if (!buffer) if (!buffer)
return -EINVAL; return -EINVAL;
inlen = get_user((unsigned int *) buffer);
outlen = get_user( ((unsigned int *) buffer) + 1); /*
* Verify that we can read at least this much.
cmd_in = (char *) ( ((int *)buffer) + 2); */
opcode = get_user(cmd_in); result = verify_area(VERIFY_READ, buffer, 2*sizeof(long) + 1);
if (result) return result;
/*
* The structure that we are passed should look like:
*
* struct sdata{
* int inlen;
* int outlen;
* char cmd[]; # However many bytes are used for cmd.
* char data[];
*/
inlen = get_user((unsigned int *) buffer);
outlen = get_user( ((unsigned int *) buffer) + 1);
/*
* We do not transfer more than MAX_BUF with this interface.
* If the user needs to transfer more data than this, they
* should use scsi_generics instead.
*/
if( inlen > MAX_BUF ) inlen = MAX_BUF;
if( outlen > MAX_BUF ) outlen = MAX_BUF;
cmd_in = (char *) ( ((int *)buffer) + 2);
opcode = get_user(cmd_in);
needed = buf_needed = (inlen > outlen ? inlen : outlen); needed = buf_needed = (inlen > outlen ? inlen : outlen);
if(buf_needed){ if(buf_needed){
...@@ -187,9 +221,27 @@ static int ioctl_command(Scsi_Device *dev, void *buffer) ...@@ -187,9 +221,27 @@ static int ioctl_command(Scsi_Device *dev, void *buffer)
} else } else
buf = NULL; buf = NULL;
memcpy_fromfs ((void *) cmd, cmd_in, cmdlen = COMMAND_SIZE (opcode)); /*
memcpy_fromfs ((void *) buf, (void *) (cmd_in + cmdlen), inlen > MAX_BUF ? MAX_BUF : inlen); * Obtain the command from the user's address space.
*/
cmdlen = COMMAND_SIZE(opcode);
result = verify_area(VERIFY_READ, cmd_in,
cmdlen + inlen > MAX_BUF ? MAX_BUF : inlen);
if (result) return result;
memcpy_fromfs ((void *) cmd, cmd_in, cmdlen);
/*
* Obtain the data to be sent to the device (if any).
*/
memcpy_fromfs ((void *) buf,
(void *) (cmd_in + cmdlen),
inlen);
/*
* Set the lun field to the correct value.
*/
cmd[1] = ( cmd[1] & 0x1f ) | (dev->lun << 5); cmd[1] = ( cmd[1] & 0x1f ) | (dev->lun << 5);
#ifndef DEBUG_NO_CMD #ifndef DEBUG_NO_CMD
...@@ -205,22 +257,25 @@ static int ioctl_command(Scsi_Device *dev, void *buffer) ...@@ -205,22 +257,25 @@ static int ioctl_command(Scsi_Device *dev, void *buffer)
down(&sem); down(&sem);
/* Hmm.. Have to ask about this one */ /* Hmm.. Have to ask about this one */
while (SCpnt->request.dev != 0xfffe) schedule(); while (SCpnt->request.dev != 0xfffe) schedule();
}; }
/* If there was an error condition, pass the info back to the user. */ /*
* If there was an error condition, pass the info back to the user.
*/
if(SCpnt->result) { if(SCpnt->result) {
result = verify_area(VERIFY_WRITE, cmd_in, sizeof(SCpnt->sense_buffer)); result = verify_area(VERIFY_WRITE,
if (result) cmd_in,
return result; sizeof(SCpnt->sense_buffer));
memcpy_tofs((void *) cmd_in, SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer)); if (result) return result;
memcpy_tofs((void *) cmd_in,
SCpnt->sense_buffer,
sizeof(SCpnt->sense_buffer));
} else { } else {
result = verify_area(VERIFY_WRITE, cmd_in, outlen);
result = verify_area(VERIFY_WRITE, cmd_in, (outlen > MAX_BUF) ? MAX_BUF : outlen); if (result) return result;
if (result) memcpy_tofs ((void *) cmd_in, buf, outlen);
return result; }
memcpy_tofs ((void *) cmd_in, buf, (outlen > MAX_BUF) ? MAX_BUF : outlen);
};
result = SCpnt->result; result = SCpnt->result;
SCpnt->request.dev = -1; /* Mark as not busy */ SCpnt->request.dev = -1; /* Mark as not busy */
if (buf) scsi_free(buf, buf_needed); if (buf) scsi_free(buf, buf_needed);
...@@ -255,6 +310,7 @@ static int ioctl_command(Scsi_Device *dev, void *buffer) ...@@ -255,6 +310,7 @@ static int ioctl_command(Scsi_Device *dev, void *buffer)
*/ */
int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg) int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg)
{ {
int result;
char scsi_cmd[12]; char scsi_cmd[12];
/* No idea how this happens.... */ /* No idea how this happens.... */
...@@ -262,7 +318,9 @@ int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg) ...@@ -262,7 +318,9 @@ int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg)
switch (cmd) { switch (cmd) {
case SCSI_IOCTL_GET_IDLUN: case SCSI_IOCTL_GET_IDLUN:
verify_area(VERIFY_WRITE, (void *) arg, sizeof(int)); result = verify_area(VERIFY_WRITE, (void *) arg, sizeof(long));
if (result) return result;
put_user(dev->id + (dev->lun << 8) + (dev->host->host_no << 16) + put_user(dev->id + (dev->lun << 8) + (dev->host->host_no << 16) +
/* This has been added to support /* This has been added to support
* multichannel HBAs, it might cause * multichannel HBAs, it might cause
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* information directly to the lowlevel driver. * information directly to the lowlevel driver.
* *
* (c) 1995 Michael Neuffer neuffer@goofy.zdv.uni-mainz.de * (c) 1995 Michael Neuffer neuffer@goofy.zdv.uni-mainz.de
* Version: 0.99.5 last change: 95/06/28 * Version: 0.99.6 last change: 95/07/04
* *
* generic command parser provided by: * generic command parser provided by:
* Andreas Heilwagen <crashcar@informatik.uni-koblenz.de> * Andreas Heilwagen <crashcar@informatik.uni-koblenz.de>
...@@ -86,8 +86,7 @@ int generic_proc_info(char *buffer, char **start, off_t offset, ...@@ -86,8 +86,7 @@ int generic_proc_info(char *buffer, char **start, off_t offset,
begin = 0; begin = 0;
pos = len = sprintf(buffer, pos = len = sprintf(buffer,
"The driver does not yet support the proc-fs\n"); "The driver does not yet support the proc-fs\n");
if(pos < offset) if(pos < offset) {
{
len = 0; len = 0;
begin = pos; begin = pos;
} }
...@@ -110,27 +109,23 @@ extern int dispatch_scsi_info(int ino, char *buffer, char **start, ...@@ -110,27 +109,23 @@ extern int dispatch_scsi_info(int ino, char *buffer, char **start,
struct Scsi_Host *hpnt = scsi_hostlist; struct Scsi_Host *hpnt = scsi_hostlist;
if(func != 2) { if(func != 2) {
if(ino == PROC_SCSI_SCSI) { if(ino == PROC_SCSI_SCSI) {
/* /*
* If there are no hosts, tell the user to go away. * This is for the scsi core, rather than any specific
* lowlevel driver.
*/ */
if( hpnt == NULL ) { return(scsi_proc_info(buffer, start, offset, length, 0, func));
return (-ENOSYS);
}
retval = scsi_proc_info(buffer, start, offset, length,
hpnt->host_no, func);
return(retval);
} }
while(hpnt) { while(hpnt) {
if (ino == (hpnt->host_no + PROC_SCSI_FILE)) if (ino == (hpnt->host_no + PROC_SCSI_FILE)) {
if(hpnt->hostt->proc_info == NULL) if(hpnt->hostt->proc_info == NULL)
return generic_proc_info(buffer, start, offset, length, return generic_proc_info(buffer, start, offset, length,
hpnt->host_no, func); hpnt->host_no, func);
else else
return(hpnt->hostt->proc_info(buffer, start, offset, length, return(hpnt->hostt->proc_info(buffer, start, offset,
hpnt->host_no, func)); length, hpnt->host_no, func));
}
hpnt = hpnt->next; hpnt = hpnt->next;
} }
return(-EBADF); return(-EBADF);
...@@ -154,8 +149,13 @@ void build_proc_dir_hba_entries(void) ...@@ -154,8 +149,13 @@ void build_proc_dir_hba_entries(void)
{ {
Scsi_Host_Template *tpnt = scsi_hosts; Scsi_Host_Template *tpnt = scsi_hosts;
struct Scsi_Host *hpnt; struct Scsi_Host *hpnt;
static char names[PROC_SCSI_LAST - PROC_SCSI_FILE][3];
uint x, y; uint x, y;
/* namespace for 16 HBAs with host_no 0-999
* I don't think we'll need more. Having more than 2
* HBAs in one system is already highly unusual
*/
static char names[PROC_SCSI_LAST - PROC_SCSI_FILE][4];
x = y = 0; x = y = 0;
......
...@@ -58,8 +58,8 @@ ...@@ -58,8 +58,8 @@
* Time out in seconds for disks and Magneto-opticals (which are slower). * Time out in seconds for disks and Magneto-opticals (which are slower).
*/ */
#define SD_TIMEOUT 700 #define SD_TIMEOUT (7 * HZ)
#define SD_MOD_TIMEOUT 750 #define SD_MOD_TIMEOUT (8 * HZ)
#define CLUSTERABLE_DEVICE(SC) (SC->host->use_clustering && \ #define CLUSTERABLE_DEVICE(SC) (SC->host->use_clustering && \
SC->device->type != TYPE_MOD) SC->device->type != TYPE_MOD)
...@@ -904,7 +904,8 @@ static int sd_init_onedisk(int i) ...@@ -904,7 +904,8 @@ static int sd_init_onedisk(int i)
/* We need to retry the READ_CAPACITY because a UNIT_ATTENTION is /* We need to retry the READ_CAPACITY because a UNIT_ATTENTION is
* considered a fatal error, and many devices report such an error * considered a fatal error, and many devices report such an error
* just after a scsi bus reset. */ * just after a scsi bus reset.
*/
SCpnt = allocate_device(NULL, rscsi_disks[i].device, 1); SCpnt = allocate_device(NULL, rscsi_disks[i].device, 1);
buffer = (unsigned char *) scsi_malloc(512); buffer = (unsigned char *) scsi_malloc(512);
...@@ -1177,7 +1178,7 @@ static void sd_init() ...@@ -1177,7 +1178,7 @@ static void sd_init()
static void sd_finish() static void sd_finish()
{ {
int i; int i;
blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST; blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST;
sd_gendisk.next = gendisk_head; sd_gendisk.next = gendisk_head;
...@@ -1201,11 +1202,10 @@ static void sd_finish() ...@@ -1201,11 +1202,10 @@ static void sd_finish()
* a two block (4 sector) read ahead. * a two block (4 sector) read ahead.
*/ */
if(rscsi_disks[0].device && rscsi_disks[0].device->host->sg_tablesize) if(rscsi_disks[0].device && rscsi_disks[0].device->host->sg_tablesize)
read_ahead[MAJOR_NR] = 120; read_ahead[MAJOR_NR] = 120; /* 120 sector read-ahead */
/* 64 sector read-ahead */
else else
read_ahead[MAJOR_NR] = 4; /* 4 sector read-ahead */ read_ahead[MAJOR_NR] = 4; /* 4 sector read-ahead */
return; return;
} }
......
This diff is collapsed.
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
* *
* Modified by Eric Youngdale eric@aib.com to support loadable * Modified by Eric Youngdale eric@aib.com to support loadable
* low-level scsi drivers. * low-level scsi drivers.
*
* Modified by Thomas Quinot thomas@melchior.frmug.fr.net to
* provide auto-eject.
*
*/ */
#ifdef MODULE #ifdef MODULE
...@@ -39,7 +43,7 @@ ...@@ -39,7 +43,7 @@
#include "constants.h" #include "constants.h"
#define MAX_RETRIES 3 #define MAX_RETRIES 3
#define SR_TIMEOUT 15000 #define SR_TIMEOUT (150 * HZ)
static void sr_init(void); static void sr_init(void);
static void sr_finish(void); static void sr_finish(void);
...@@ -69,9 +73,13 @@ static void sr_release(struct inode * inode, struct file * file) ...@@ -69,9 +73,13 @@ static void sr_release(struct inode * inode, struct file * file)
{ {
sync_dev(inode->i_rdev); sync_dev(inode->i_rdev);
if(! --scsi_CDs[MINOR(inode->i_rdev)].device->access_count) if(! --scsi_CDs[MINOR(inode->i_rdev)].device->access_count)
sr_ioctl(inode, NULL, SCSI_IOCTL_DOORUNLOCK, 0); {
sr_ioctl(inode, NULL, SCSI_IOCTL_DOORUNLOCK, 0);
if (scsi_CDs[MINOR(inode->i_rdev)].auto_eject)
sr_ioctl(inode, NULL, CDROMEJECT, 0);
}
if (scsi_CDs[MINOR(inode->i_rdev)].device->host->hostt->usage_count) if (scsi_CDs[MINOR(inode->i_rdev)].device->host->hostt->usage_count)
(*scsi_CDs[MINOR(inode->i_rdev)].device->host->hostt->usage_count)--; (*scsi_CDs[MINOR(inode->i_rdev)].device->host->hostt->usage_count)--;
if(sr_template.usage_count) (*sr_template.usage_count)--; if(sr_template.usage_count) (*sr_template.usage_count)--;
} }
...@@ -302,6 +310,11 @@ static void rw_intr (Scsi_Cmnd * SCpnt) ...@@ -302,6 +310,11 @@ static void rw_intr (Scsi_Cmnd * SCpnt)
* *
* kraxel@cs.tu-berlin.de (Gerd Knorr) * kraxel@cs.tu-berlin.de (Gerd Knorr)
*/ */
/*
* 19950704 operator@melchior.frmug.fr.net (Thomas Quinot)
*
* - SONY: Same as Nec.
*/
static void sr_photocd(struct inode *inode) static void sr_photocd(struct inode *inode)
{ {
...@@ -481,7 +494,7 @@ static void sr_photocd(struct inode *inode) ...@@ -481,7 +494,7 @@ static void sr_photocd(struct inode *inode)
printk ("sr_photocd: multisession CD detected. start: %lu\n",sector); printk ("sr_photocd: multisession CD detected. start: %lu\n",sector);
#endif #endif
break; break;
case SCSI_MAN_NEC_OLDCDR: case SCSI_MAN_NEC_OLDCDR:
case SCSI_MAN_UNKNOWN: case SCSI_MAN_UNKNOWN:
default: default:
...@@ -1057,6 +1070,7 @@ void sr_finish() ...@@ -1057,6 +1070,7 @@ void sr_finish()
scsi_CDs[i].use = 1; scsi_CDs[i].use = 1;
scsi_CDs[i].ten = 1; scsi_CDs[i].ten = 1;
scsi_CDs[i].remap = 1; scsi_CDs[i].remap = 1;
scsi_CDs[i].auto_eject = 0; /* Default is not to eject upon unmount. */
sr_sizes[i] = scsi_CDs[i].capacity; sr_sizes[i] = scsi_CDs[i].capacity;
} }
......
...@@ -32,6 +32,7 @@ typedef struct ...@@ -32,6 +32,7 @@ typedef struct
unsigned ten:1; /* support ten byte commands */ unsigned ten:1; /* support ten byte commands */
unsigned remap:1; /* support remapping */ unsigned remap:1; /* support remapping */
unsigned use:1; /* is this device still supportable */ unsigned use:1; /* is this device still supportable */
unsigned auto_eject:1; /* auto-eject medium on last release. */
} Scsi_CD; } Scsi_CD;
extern Scsi_CD * scsi_CDs; extern Scsi_CD * scsi_CDs;
......
...@@ -139,6 +139,10 @@ int sr_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigne ...@@ -139,6 +139,10 @@ int sr_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigne
case CDROMPLAYMSF: case CDROMPLAYMSF:
{ {
struct cdrom_msf msf; struct cdrom_msf msf;
err = verify_area (VERIFY_READ, (void *) arg, sizeof (msf));
if (err) return err;
memcpy_fromfs(&msf, (void *) arg, sizeof(msf)); memcpy_fromfs(&msf, (void *) arg, sizeof(msf));
sr_cmd[0] = SCMD_PLAYAUDIO_MSF; sr_cmd[0] = SCMD_PLAYAUDIO_MSF;
...@@ -159,6 +163,10 @@ int sr_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigne ...@@ -159,6 +163,10 @@ int sr_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigne
case CDROMPLAYTRKIND: case CDROMPLAYTRKIND:
{ {
struct cdrom_ti ti; struct cdrom_ti ti;
err = verify_area (VERIFY_READ, (void *) arg, sizeof (ti));
if (err) return err;
memcpy_fromfs(&ti, (void *) arg, sizeof(ti)); memcpy_fromfs(&ti, (void *) arg, sizeof(ti));
sr_cmd[0] = SCMD_PLAYAUDIO_TI; sr_cmd[0] = SCMD_PLAYAUDIO_TI;
...@@ -213,7 +221,9 @@ int sr_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigne ...@@ -213,7 +221,9 @@ int sr_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigne
struct cdrom_tocentry tocentry; struct cdrom_tocentry tocentry;
char * buffer; char * buffer;
verify_area (VERIFY_READ, (void *) arg, sizeof (struct cdrom_tocentry)); err = verify_area (VERIFY_READ, (void *) arg, sizeof (struct cdrom_tocentry));
if (err) return err;
memcpy_fromfs (&tocentry, (void *) arg, sizeof (struct cdrom_tocentry)); memcpy_fromfs (&tocentry, (void *) arg, sizeof (struct cdrom_tocentry));
sr_cmd[0] = SCMD_READ_TOC; sr_cmd[0] = SCMD_READ_TOC;
...@@ -267,7 +277,10 @@ int sr_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigne ...@@ -267,7 +277,10 @@ int sr_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigne
return result; return result;
case CDROMEJECT: case CDROMEJECT:
if (scsi_CDs[target].device -> access_count != 1) /*
* Allow 0 for access count for auto-eject feature.
*/
if (scsi_CDs[target].device -> access_count > 1)
return -EBUSY; return -EBUSY;
sr_ioctl (inode, NULL, SCSI_IOCTL_DOORUNLOCK, 0); sr_ioctl (inode, NULL, SCSI_IOCTL_DOORUNLOCK, 0);
...@@ -281,12 +294,18 @@ int sr_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigne ...@@ -281,12 +294,18 @@ int sr_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigne
return result; return result;
case CDROMEJECT_SW:
scsi_CDs[target].auto_eject = !!arg;
return 0;
case CDROMVOLCTRL: case CDROMVOLCTRL:
{ {
char * buffer, * mask; char * buffer, * mask;
struct cdrom_volctrl volctrl; struct cdrom_volctrl volctrl;
verify_area (VERIFY_READ, (void *) arg, sizeof (struct cdrom_volctrl)); err = verify_area (VERIFY_READ, (void *) arg, sizeof (struct cdrom_volctrl));
if (err) return err;
memcpy_fromfs (&volctrl, (void *) arg, sizeof (struct cdrom_volctrl)); memcpy_fromfs (&volctrl, (void *) arg, sizeof (struct cdrom_volctrl));
/* First we get the current params so we can just twiddle the volume */ /* First we get the current params so we can just twiddle the volume */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Informations about Audio Excel DSP 16 can be found in the source
file aedsp16.c
Please, read the head of the source before using it. It contain useful
informations.
Riccardo
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