Commit 09e6af9e authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.66

parent 7f98bfdb
...@@ -1609,11 +1609,12 @@ S: 1098 VA Amsterdam ...@@ -1609,11 +1609,12 @@ S: 1098 VA Amsterdam
S: The Netherlands S: The Netherlands
N: Tim Waugh N: Tim Waugh
E: tmw20@cyberelk.demon.co.uk E: tim@cyberelk.demon.co.uk
D: Co-architect of the parallel-port sharing system D: Co-architect of the parallel-port sharing system
S: 51 Frensham Road S: 12 Station Road
S: Southsea S: Park Gate
S: Hampshire, UK. PO4 8AE S: Southampton SO31 7GJ
S: United Kingdom
N: Juergen Weigert N: Juergen Weigert
E: jnweiger@immd4.informatik.uni-erlangen.de E: jnweiger@immd4.informatik.uni-erlangen.de
......
...@@ -36,6 +36,8 @@ ez.txt ...@@ -36,6 +36,8 @@ ez.txt
- documentation for the SyQuest parallel port EZ drive support. - documentation for the SyQuest parallel port EZ drive support.
filesystems/ filesystems/
- directory with info on the various filesystems that Linux supports. - directory with info on the various filesystems that Linux supports.
ftape.txt
- notes about the floppy tape device driver
ide.txt ide.txt
- important info for users of ATA devices (IDE/EIDE disks and CD-ROMS) - important info for users of ATA devices (IDE/EIDE disks and CD-ROMS)
initrd.txt initrd.txt
......
This diff is collapsed.
...@@ -797,14 +797,30 @@ major number 3). ...@@ -797,14 +797,30 @@ major number 3).
\begin{devicelist} \begin{devicelist}
\major{27}{}{char }{QIC-117 tape} \major{27}{}{char }{QIC-117 tape}
\minor{0}{/dev/rft0}{Unit 0, rewind-on-close} \minor{0}{/dev/qft0}{Unit 0, rewind-on-close}
\minor{1}{/dev/rft1}{Unit 1, rewind-on-close} \minor{1}{/dev/qft1}{Unit 1, rewind-on-close}
\minor{2}{/dev/rft2}{Unit 2, rewind-on-close} \minor{2}{/dev/qft2}{Unit 2, rewind-on-close}
\minor{3}{/dev/rft3}{Unit 3, rewind-on-close} \minor{3}{/dev/qft3}{Unit 3, rewind-on-close}
\minor{4}{/dev/nrft0}{Unit 0, no rewind-on-close} \minor{4}{/dev/nqft0}{Unit 0, no rewind-on-close}
\minor{5}{/dev/nrft1}{Unit 1, no rewind-on-close} \minor{5}{/dev/nqft1}{Unit 1, no rewind-on-close}
\minor{6}{/dev/nrft2}{Unit 2, no rewind-on-close} \minor{6}{/dev/nqft2}{Unit 2, no rewind-on-close}
\minor{7}{/dev/nrft3}{Unit 3, no rewind-on-close} \minor{7}{/dev/nqft3}{Unit 3, no rewind-on-close}
\minor{16}{/dev/zqft0}{Unit 0, rewind-on-close, compression}
\minor{17}{/dev/zqft1}{Unit 1, rewind-on-close, compression}
\minor{18}{/dev/zqft2}{Unit 2, rewind-on-close, compression}
\minor{19}{/dev/zqft3}{Unit 3, rewind-on-close, compression}
\minor{20}{/dev/nzqft0}{Unit 0, no-rewind-on-close, compression}
\minor{21}{/dev/nzqft1}{Unit 1, no-rewind-on-close, compression}
\minor{22}{/dev/nzqft2}{Unit 2, no-rewind-on-close, compression}
\minor{23}{/dev/nzqft3}{Unit 3, no-rewind-on-close, compression}
\minor{32}{/dev/rawft0}{Unit 0, rewind-on-close, no file marks}
\minor{33}{/dev/rawft1}{Unit 1, rewind-on-close, no file marks}
\minor{34}{/dev/rawft2}{Unit 2, rewind-on-close, no file marks}
\minor{35}{/dev/rawft3}{Unit 3, rewind-on-close, no file marks}
\minor{36}{/dev/zqft0}{Unit 0, no-rewind-on-close, no file marks}
\minor{37}{/dev/zqft1}{Unit 1, no-rewind-on-close, no file marks}
\minor{38}{/dev/zqft2}{Unit 2, no-rewind-on-close, no file marks}
\minor{39}{/dev/zqft3}{Unit 3, no-rewind-on-close, no file marks}
\\ \\
\major{ }{}{block}{Third Matsushita (Panasonic/SoundBlaster) CD-ROM} \major{ }{}{block}{Third Matsushita (Panasonic/SoundBlaster) CD-ROM}
\minor{0}{/dev/sbpcd8}{Panasonic CD-ROM controller 2 unit 0} \minor{0}{/dev/sbpcd8}{Panasonic CD-ROM controller 2 unit 0}
...@@ -1613,6 +1629,7 @@ It is recommended that these links exist on all systems: ...@@ -1613,6 +1629,7 @@ It is recommended that these links exist on all systems:
\begin{nodelist} \begin{nodelist}
\link{/dev/core}{/proc/kcore}{symbolic}{Backward compatibility} \link{/dev/core}{/proc/kcore}{symbolic}{Backward compatibility}
\link{/dev/ramdisk}{ram0}{symbolic}{Backward compatibility} \link{/dev/ramdisk}{ram0}{symbolic}{Backward compatibility}
\link{/dev/rft0}{qft0}{symbolic}{Backward compatibility}
\link{/dev/ftape}{rft0}{symbolic}{Backward compatibility} \link{/dev/ftape}{rft0}{symbolic}{Backward compatibility}
\link{/dev/scd?}{sr?}{hard}{Alternate name for CD-ROMs} \link{/dev/scd?}{sr?}{hard}{Alternate name for CD-ROMs}
\link{/dev/fd?D*}{fd?u*}{hard}{Backward compatibility} \link{/dev/fd?D*}{fd?u*}{hard}{Backward compatibility}
......
...@@ -507,14 +507,30 @@ Your cooperation is appreciated. ...@@ -507,14 +507,30 @@ Your cooperation is appreciated.
3 = /dev/sbpcd7 Panasonic CD-ROM controller 1 unit 3 3 = /dev/sbpcd7 Panasonic CD-ROM controller 1 unit 3
27 char QIC-117 tape 27 char QIC-117 tape
0 = /dev/rft0 Unit 0, rewind-on-close 0 = /dev/qft0 Unit 0, rewind-on-close
1 = /dev/rft1 Unit 1, rewind-on-close 1 = /dev/qft1 Unit 1, rewind-on-close
2 = /dev/rft2 Unit 2, rewind-on-close 2 = /dev/qft2 Unit 2, rewind-on-close
3 = /dev/rft3 Unit 3, rewind-on-close 3 = /dev/qft3 Unit 3, rewind-on-close
4 = /dev/nrft0 Unit 0, no rewind-on-close 4 = /dev/nqft0 Unit 0, no rewind-on-close
5 = /dev/nrft1 Unit 1, no rewind-on-close 5 = /dev/nqft1 Unit 1, no rewind-on-close
6 = /dev/nrft2 Unit 2, no rewind-on-close 6 = /dev/nqft2 Unit 2, no rewind-on-close
7 = /dev/nrft3 Unit 3, no rewind-on-close 7 = /dev/nqft3 Unit 3, no rewind-on-close
16 = /dev/zqft0 Unit 0, rewind-on-close, compression
17 = /dev/zqft1 Unit 1, rewind-on-close, compression
18 = /dev/zqft2 Unit 2, rewind-on-close, compression
19 = /dev/zqft3 Unit 3, rewind-on-close, compression
20 = /dev/nzqft0 Unit 0, no-rewind, compression
21 = /dev/nzqft1 Unit 1, no-rewind, compression
22 = /dev/nzqft2 Unit 2, no-rewind, compression
23 = /dev/nzqft3 Unit 3, no-rewind, compression
32 = /dev/rawft0 Unit 0, rewind-on-close, no file marks
33 = /dev/rawft1 Unit 1, rewind-on-close, no file marks
34 = /dev/rawft2 Unit 2, rewind-on-close, no file marks
35 = /dev/rawft3 Unit 3, rewind-on-close, no file marks
36 = /dev/zqft0 Unit 0, no-rewind, no file marks
37 = /dev/zqft1 Unit 1, no-rewind, no file marks
38 = /dev/zqft2 Unit 2, no-rewind, no file marks
39 = /dev/zqft3 Unit 3, no-rewind, no file marks
block Third Matsushita (Panasonic/SoundBlaster) CD-ROM block Third Matsushita (Panasonic/SoundBlaster) CD-ROM
0 = /dev/sbpcd8 Panasonic CD-ROM controller 2 unit 0 0 = /dev/sbpcd8 Panasonic CD-ROM controller 2 unit 0
1 = /dev/sbpcd9 Panasonic CD-ROM controller 2 unit 1 1 = /dev/sbpcd9 Panasonic CD-ROM controller 2 unit 1
...@@ -1137,7 +1153,8 @@ It is recommended that these links exist on all systems: ...@@ -1137,7 +1153,8 @@ It is recommended that these links exist on all systems:
/dev/core /proc/kcore symbolic Backward compatibility /dev/core /proc/kcore symbolic Backward compatibility
/dev/ramdisk ram0 symbolic Backward compatibility /dev/ramdisk ram0 symbolic Backward compatibility
/dev/ftape rft0 symbolic Backward compatibility /dev/rft0 qft0 symbolic Backward compatibility
/dev/ftape qft0 symbolic Backward compatibility
/dev/scd? sr? hard Alternate SCSI CD-ROM name /dev/scd? sr? hard Alternate SCSI CD-ROM name
......
smbfs is a filesystem which understands the SMB protocol. This is the Smbfs is a filesystem that implements the SMB protocol, which is the
protocol Windows for Workgroups, Windows NT or Lan Manager use to talk protocol used by Windows for Workgroups, Windows 95 and Windows NT.
to each other. smbfs was inspired by samba, the program written by Smbfs was inspired by samba, the program written by Andrew Tridgell
Andrew Tridgell that turns any unix host into a file server for DOS or that turns any unix host into a file server for DOS or Windows clients.
Windows clients. See ftp://nimbus.anu.edu.au/pub/tridge/samba/ for See ftp://nimbus.anu.edu.au/pub/tridge/samba/ for this interesting
this interesting program suite and lots of more information on SMB and program suite and much more information on SMB, NetBIOS over TCP/IP,
NetBIOS over TCP/IP. There you also find explanation for concepts like and explanations for concepts like netbios name or share.
netbios name or share.
To use smbfs, you need to install the Samba package (Samba-1.9.17p1 or
To use smbfs, you need a special mount program, which can be found in later), and you need the special mount program from the smbfs package
the smbfs package, found on (smbfs-2.1.0 or later), found on
ftp://ftp.gwdg.de/pub/linux/misc/smbfs/ ftp://ftp.gwdg.de/pub/linux/misc/smbfs/dontuse
After downloading the smbfs package, apply the patch to the smbclient
program and recompile. Smbfs can then be mounted from the smbclient
command line, as for example:
smb: \>mount /mnt/tmp -f 755
For convenience, you may wish to package the command in a script like this:
#!/bin/sh
echo "mount /mnt/tmp -f 755" | smbclient //server/c$ -U administrator%
Mount-Time Options
Windows 95 has several bugs that affect SMB operations, and smbfs includes
work-arounds for all of the bugs found (so far, at least.) These can be
enabled at compile-time with the CONFIG_SMB_WIN95 kernel option.
Unfortunately, some of the Win 95 work-arounds interact with Win NT bugs,
so if you're using several different types of servers on your network you
probably want to enable the work-arounds at mount time. To do this, answer
`N' to the CONFIG_SMB_WIN95 option, and add the needed options listed below
to the file mode argument of the mount command for the Win 95 servers.
Option Value Effect
Identify Win 95 Server 1 Enables bug fixes
Use Core Attributes 2 Speeds up directory scans, only mtime
To apply the options, sum the values and prepend it to the file mode. For
example, to use both options with file mode 755, you would prepend 3 to 755:
cnt>mount /mnt/tmp -f 3755
Smbfs will print a message at mount time confirming the selected options.
Note that _only_ Windows 95 servers require special treatment; using the
"core attributes" option with Win NT will give trash timestamp values.
To summarize, if your network includes both Win 95 and NT servers:
(1) Do _not_ enable the CONFIG_SMB_WIN95 kernel option
(2) Add the desired work-around options to the mount command for your
Win 95 server(s).
This diff is collapsed.
...@@ -239,6 +239,7 @@ FTAPE/QIC-117: ...@@ -239,6 +239,7 @@ FTAPE/QIC-117:
P: Claus-Justus Heine P: Claus-Justus Heine
M: claus@momo.math.rwth-aachen.de M: claus@momo.math.rwth-aachen.de
L: linux-tape@vger.rutgers.edu L: linux-tape@vger.rutgers.edu
W: http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape/
S: Maintained S: Maintained
IPX NETWORK LAYER IPX NETWORK LAYER
......
VERSION = 2 VERSION = 2
PATCHLEVEL = 1 PATCHLEVEL = 1
SUBLEVEL = 65 SUBLEVEL = 66
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/) ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
......
...@@ -21,7 +21,7 @@ strrchr: ...@@ -21,7 +21,7 @@ strrchr:
zapnot a1, 1, a1 # e0 : zero extend our test character zapnot a1, 1, a1 # e0 : zero extend our test character
mov zero, t6 # .. e1 : t6 is last match aligned addr mov zero, t6 # .. e1 : t6 is last match aligned addr
sll a1, 8, t5 # e0 : replicate our test character sll a1, 8, t5 # e0 : replicate our test character
mov zero, t7 # .. e1 : t7 is last match byte compare mask mov zero, t8 # .. e1 : t8 is last match byte compare mask
or t5, a1, a1 # e0 : or t5, a1, a1 # e0 :
ldq_u t0, 0(a0) # .. e1 : load first quadword ldq_u t0, 0(a0) # .. e1 : load first quadword
sll a1, 16, t5 # e0 : sll a1, 16, t5 # e0 :
...@@ -43,7 +43,7 @@ strrchr: ...@@ -43,7 +43,7 @@ strrchr:
$loop: $loop:
ldq t0, 8(v0) # e0 : load next quadword ldq t0, 8(v0) # e0 : load next quadword
cmovne t3, v0, t6 # .. e1 : save previous comparisons match cmovne t3, v0, t6 # .. e1 : save previous comparisons match
cmovne t3, t3, t7 # e0 : cmovne t3, t3, t8 # e0 :
addq v0, 8, v0 # .. e1 : addq v0, 8, v0 # .. e1 :
xor t0, a1, t2 # e0 : xor t0, a1, t2 # e0 :
cmpbge zero, t0, t1 # .. e1 : bits set iff byte == zero cmpbge zero, t0, t1 # .. e1 : bits set iff byte == zero
...@@ -58,22 +58,22 @@ $eos: ...@@ -58,22 +58,22 @@ $eos:
or t4, t5, t4 # e1 : ... and including the null or t4, t5, t4 # e1 : ... and including the null
and t3, t4, t3 # e0 : mask out char matches after null and t3, t4, t3 # e0 : mask out char matches after null
cmovne t3, t3, t7 # .. e1 : save it, if match found cmovne t3, t3, t8 # .. e1 : save it, if match found
cmovne t3, v0, t6 # e0 : cmovne t3, v0, t6 # e0 :
/* Locate the address of the last matched character */ /* Locate the address of the last matched character */
/* Retain the early exit for the ev4 -- the ev5 mispredict penalty /* Retain the early exit for the ev4 -- the ev5 mispredict penalty
is 5 cycles -- the same as just falling through. */ is 5 cycles -- the same as just falling through. */
beq t7, $retnull # .. e1 : beq t8, $retnull # .. e1 :
and t7, 0xf0, t2 # e0 : binary search for the high bit set and t8, 0xf0, t2 # e0 : binary search for the high bit set
cmovne t2, t2, t7 # .. e1 (zdb) cmovne t2, t2, t8 # .. e1 (zdb)
cmovne t2, 4, t2 # e0 : cmovne t2, 4, t2 # e0 :
and t7, 0xcc, t1 # .. e1 : and t8, 0xcc, t1 # .. e1 :
cmovne t1, t1, t7 # e0 : cmovne t1, t1, t8 # e0 :
cmovne t1, 2, t1 # .. e1 : cmovne t1, 2, t1 # .. e1 :
and t7, 0xaa, t0 # e0 : and t8, 0xaa, t0 # e0 :
cmovne t0, 1, t0 # .. e1 (zdb) cmovne t0, 1, t0 # .. e1 (zdb)
addq t2, t1, t1 # e0 : addq t2, t1, t1 # e0 :
addq t6, t0, v0 # .. e1 : add our aligned base ptr to the mix addq t6, t0, v0 # .. e1 : add our aligned base ptr to the mix
......
...@@ -211,7 +211,7 @@ CONFIG_ISO9660_FS=y ...@@ -211,7 +211,7 @@ CONFIG_ISO9660_FS=y
CONFIG_PROC_FS=y CONFIG_PROC_FS=y
CONFIG_NFS_FS=y CONFIG_NFS_FS=y
# CONFIG_ROOT_NFS is not set # CONFIG_ROOT_NFS is not set
# CONFIG_NFSD is not set CONFIG_NFSD=y
CONFIG_SUNRPC=y CONFIG_SUNRPC=y
CONFIG_LOCKD=y CONFIG_LOCKD=y
# CONFIG_SMB_FS is not set # CONFIG_SMB_FS is not set
...@@ -245,7 +245,6 @@ CONFIG_82C710_MOUSE=y ...@@ -245,7 +245,6 @@ CONFIG_82C710_MOUSE=y
# CONFIG_PC110_PAD is not set # CONFIG_PC110_PAD is not set
# CONFIG_UMISC is not set # CONFIG_UMISC is not set
# CONFIG_QIC02_TAPE is not set # CONFIG_QIC02_TAPE is not set
# CONFIG_FTAPE is not set
# CONFIG_APM is not set # CONFIG_APM is not set
# CONFIG_WATCHDOG is not set # CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set # CONFIG_RTC is not set
...@@ -253,6 +252,11 @@ CONFIG_82C710_MOUSE=y ...@@ -253,6 +252,11 @@ CONFIG_82C710_MOUSE=y
# CONFIG_JOYSTICK is not set # CONFIG_JOYSTICK is not set
# CONFIG_MISC_RADIO is not set # CONFIG_MISC_RADIO is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# #
# Sound # Sound
# #
......
...@@ -349,10 +349,6 @@ ENTRY(page_fault) ...@@ -349,10 +349,6 @@ ENTRY(page_fault)
pushl $ SYMBOL_NAME(do_page_fault) pushl $ SYMBOL_NAME(do_page_fault)
jmp error_code jmp error_code
ENTRY(page_fault_f00f)
pushl $ SYMBOL_NAME(do_page_fault_f00f)
jmp error_code
ENTRY(spurious_interrupt_bug) ENTRY(spurious_interrupt_bug)
pushl $0 pushl $0
pushl $ SYMBOL_NAME(do_spurious_interrupt_bug) pushl $ SYMBOL_NAME(do_spurious_interrupt_bug)
......
...@@ -103,7 +103,6 @@ asmlinkage void segment_not_present(void); ...@@ -103,7 +103,6 @@ asmlinkage void segment_not_present(void);
asmlinkage void stack_segment(void); asmlinkage void stack_segment(void);
asmlinkage void general_protection(void); asmlinkage void general_protection(void);
asmlinkage void page_fault(void); asmlinkage void page_fault(void);
asmlinkage void page_fault_f00f(void);
asmlinkage void coprocessor_error(void); asmlinkage void coprocessor_error(void);
asmlinkage void reserved(void); asmlinkage void reserved(void);
asmlinkage void alignment_check(void); asmlinkage void alignment_check(void);
...@@ -417,14 +416,9 @@ asmlinkage void math_emulate(long arg) ...@@ -417,14 +416,9 @@ asmlinkage void math_emulate(long arg)
__initfunc(void trap_init_f00f_bug(void)) __initfunc(void trap_init_f00f_bug(void))
{ {
unsigned long page; unsigned long page;
pgd_t * pgd;
/* pmd_t * pmd;
* We use a special page fault handler, to actually detect pte_t * pte;
* 'bounced' traps/exceptions #0-6. This new page fault
* handler is a few tens of cycles slower than the 'normal'
* one.
*/
set_trap_gate(14,&page_fault_f00f);
/* /*
* Allocate a new page in virtual address space, * Allocate a new page in virtual address space,
...@@ -433,16 +427,21 @@ __initfunc(void trap_init_f00f_bug(void)) ...@@ -433,16 +427,21 @@ __initfunc(void trap_init_f00f_bug(void))
* fault for IDT entries #0-#6.. * fault for IDT entries #0-#6..
*/ */
page = (unsigned long) vmalloc(PAGE_SIZE); page = (unsigned long) vmalloc(PAGE_SIZE);
memcpy((void *) page, idt_table + 7, (256-7)*8); memcpy((void *) page, idt_table, 256*8);
pgd = pgd_offset(&init_mm, page);
pmd = pmd_offset(pgd, page);
pte = pte_offset(pmd, page);
*pte = pte_wrprotect(*pte);
local_flush_tlb();
/* /*
* "idt" is magic - it overlaps the idt_descr * "idt" is magic - it overlaps the idt_descr
* variable so that updating idt will automatically * variable so that updating idt will automatically
* update the idt descriptor.. * update the idt descriptor..
*/ */
idt = (struct desc_struct *)(page - 7*8); idt = (struct desc_struct *)page;
__asm__ __volatile__("lidt %0": "=m" (idt_descr)); __asm__ __volatile__("lidt %0": "=m" (idt_descr));
} }
......
...@@ -74,6 +74,9 @@ int __verify_write(const void * addr, unsigned long size) ...@@ -74,6 +74,9 @@ int __verify_write(const void * addr, unsigned long size)
return 0; return 0;
} }
asmlinkage void do_invalid_op (struct pt_regs *, unsigned long);
extern int pentium_f00f_bug;
/* /*
* This routine handles page faults. It determines the address, * This routine handles page faults. It determines the address,
...@@ -85,16 +88,19 @@ int __verify_write(const void * addr, unsigned long size) ...@@ -85,16 +88,19 @@ int __verify_write(const void * addr, unsigned long size)
* bit 1 == 0 means read, 1 means write * bit 1 == 0 means read, 1 means write
* bit 2 == 0 means kernel, 1 means user-mode * bit 2 == 0 means kernel, 1 means user-mode
*/ */
static void __do_page_fault(struct pt_regs *regs, unsigned long error_code, asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
unsigned long address)
{ {
struct task_struct *tsk; struct task_struct *tsk;
struct mm_struct *mm; struct mm_struct *mm;
struct vm_area_struct * vma; struct vm_area_struct * vma;
unsigned long address;
unsigned long page; unsigned long page;
unsigned long fixup; unsigned long fixup;
int write; int write;
/* get the address */
__asm__("movl %%cr2,%0":"=r" (address));
lock_kernel(); lock_kernel();
tsk = current; tsk = current;
mm = tsk->mm; mm = tsk->mm;
...@@ -171,6 +177,21 @@ static void __do_page_fault(struct pt_regs *regs, unsigned long error_code, ...@@ -171,6 +177,21 @@ static void __do_page_fault(struct pt_regs *regs, unsigned long error_code,
goto out; goto out;
} }
/*
* Pentium F0 0F C7 C8 bug workaround.
*/
if (pentium_f00f_bug) {
unsigned long nr;
nr = (address - (unsigned long) idt) >> 3;
if (nr == 6) {
unlock_kernel();
do_invalid_op(regs, 0);
return;
}
}
/* Are we prepared to handle this kernel fault? */ /* Are we prepared to handle this kernel fault? */
if ((fixup = search_exception_table(regs->eip)) != 0) { if ((fixup = search_exception_table(regs->eip)) != 0) {
printk(KERN_DEBUG "%s: Exception at [<%lx>] cr2=%lx (fixup: %lx)\n", printk(KERN_DEBUG "%s: Exception at [<%lx>] cr2=%lx (fixup: %lx)\n",
...@@ -216,65 +237,3 @@ static void __do_page_fault(struct pt_regs *regs, unsigned long error_code, ...@@ -216,65 +237,3 @@ static void __do_page_fault(struct pt_regs *regs, unsigned long error_code,
out: out:
unlock_kernel(); unlock_kernel();
} }
/*
* One of these two functions is the real page fault handler, which one depends
* on wether the CPU has the F00F bug:
*/
asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
{
unsigned long address;
/* get the address */
__asm__("movl %%cr2,%0":"=r" (address));
__do_page_fault(regs, error_code, address);
}
asmlinkage void do_divide_error (struct pt_regs *, unsigned long);
asmlinkage void do_debug (struct pt_regs *, unsigned long);
asmlinkage void do_nmi (struct pt_regs *, unsigned long);
asmlinkage void do_int3 (struct pt_regs *, unsigned long);
asmlinkage void do_overflow (struct pt_regs *, unsigned long);
asmlinkage void do_bounds (struct pt_regs *, unsigned long);
asmlinkage void do_invalid_op (struct pt_regs *, unsigned long);
extern int pentium_f00f_bug;
asmlinkage void do_page_fault_f00f(struct pt_regs *regs, unsigned long error_code)
{
unsigned long address;
/* get the address */
__asm__("movl %%cr2,%0":"=r" (address));
/*
* Pentium F0 0F C7 C8 bug workaround. Do this first,
* to make sure we don't have locking problems with
* asynchronous traps (ie NMI).
*/
if ( !(error_code & 5) && pentium_f00f_bug ) {
unsigned long nr;
nr = (address - (unsigned long) idt) >> 3;
if (nr < 7) {
static void (*handler[])(struct pt_regs *, unsigned long) = {
do_divide_error, /* 0 - divide overflow */
do_debug, /* 1 - debug trap */
do_nmi, /* 2 - NMI */
do_int3, /* 3 - int 3 */
do_overflow, /* 4 - overflow */
do_bounds, /* 5 - bound range */
do_invalid_op }; /* 6 - invalid opcode */
if (nr == 3 || nr == 4) regs->eip++;
handler[nr](regs, 0);
return;
}
}
__do_page_fault(regs, error_code, address);
}
...@@ -4016,11 +4016,6 @@ __initfunc(int floppy_init(void)) ...@@ -4016,11 +4016,6 @@ __initfunc(int floppy_init(void))
continue; continue;
} }
request_region(FDCS->address, 6, "floppy");
request_region(FDCS->address+7, 1, "floppy DIR");
/* address + 6 is reserved, and may be taken by IDE.
* Unfortunately, Adaptec doesn't know this :-(, */
have_no_fdc = 0; have_no_fdc = 0;
/* Not all FDCs seem to be able to handle the version command /* Not all FDCs seem to be able to handle the version command
* properly, so force a reset for the standard FDC clones, * properly, so force a reset for the standard FDC clones,
...@@ -4042,7 +4037,6 @@ __initfunc(int floppy_init(void)) ...@@ -4042,7 +4037,6 @@ __initfunc(int floppy_init(void))
static int floppy_grab_irq_and_dma(void) static int floppy_grab_irq_and_dma(void)
{ {
int i;
unsigned long flags; unsigned long flags;
INT_OFF; INT_OFF;
...@@ -4052,16 +4046,6 @@ static int floppy_grab_irq_and_dma(void) ...@@ -4052,16 +4046,6 @@ static int floppy_grab_irq_and_dma(void)
} }
INT_ON; INT_ON;
MOD_INC_USE_COUNT; MOD_INC_USE_COUNT;
for (i=0; i< N_FDC; i++){
if (fdc_state[i].address != -1){
fdc = i;
reset_fdc_info(1);
fd_outb(FDCS->dor, FD_DOR);
}
}
fdc = 0;
set_dor(0, ~0, 8); /* avoid immediate interrupt */
if (fd_request_irq()) { if (fd_request_irq()) {
DPRINT("Unable to grab IRQ%d for the floppy driver\n", DPRINT("Unable to grab IRQ%d for the floppy driver\n",
FLOPPY_IRQ); FLOPPY_IRQ);
...@@ -4077,6 +4061,36 @@ static int floppy_grab_irq_and_dma(void) ...@@ -4077,6 +4061,36 @@ static int floppy_grab_irq_and_dma(void)
usage_count--; usage_count--;
return -1; return -1;
} }
for (fdc=0; fdc< N_FDC; fdc++){
if (FDCS->address != -1){
if (check_region(FDCS->address, 6) < 0 ||
check_region(FDCS->address+7, 1) < 0) {
DPRINT("Floppy io-port 0x%04x in use\n", FDCS->address);
fd_free_irq();
fd_free_dma();
while(--fdc >= 0) {
release_region(FDCS->address, 6);
release_region(FDCS->address+7, 1);
}
MOD_DEC_USE_COUNT;
usage_count--;
return -1;
}
request_region(FDCS->address, 6, "floppy");
request_region(FDCS->address+7, 1, "floppy DIR");
/* address + 6 is reserved, and may be taken by IDE.
* Unfortunately, Adaptec doesn't know this :-(, */
}
}
for (fdc=0; fdc< N_FDC; fdc++){
if (FDCS->address != -1){
reset_fdc_info(1);
fd_outb(FDCS->dor, FD_DOR);
}
}
fdc = 0;
set_dor(0, ~0, 8); /* avoid immediate interrupt */
for (fdc = 0; fdc < N_FDC; fdc++) for (fdc = 0; fdc < N_FDC; fdc++)
if (FDCS->address != -1) if (FDCS->address != -1)
fd_outb(FDCS->dor, FD_DOR); fd_outb(FDCS->dor, FD_DOR);
...@@ -4087,6 +4101,7 @@ static int floppy_grab_irq_and_dma(void) ...@@ -4087,6 +4101,7 @@ static int floppy_grab_irq_and_dma(void)
static void floppy_release_irq_and_dma(void) static void floppy_release_irq_and_dma(void)
{ {
int old_fdc;
#ifdef FLOPPY_SANITY_CHECK #ifdef FLOPPY_SANITY_CHECK
#ifndef __sparc__ #ifndef __sparc__
int drive; int drive;
...@@ -4136,6 +4151,13 @@ static void floppy_release_irq_and_dma(void) ...@@ -4136,6 +4151,13 @@ static void floppy_release_irq_and_dma(void)
if (floppy_tq.sync) if (floppy_tq.sync)
printk("task queue still active\n"); printk("task queue still active\n");
#endif #endif
old_fdc = fdc;
for (fdc = 0; fdc < N_FDC; fdc++)
if (FDCS->address != -1) {
release_region(FDCS->address, 6);
release_region(FDCS->address+7, 1);
}
fdc = old_fdc;
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
} }
...@@ -4224,12 +4246,6 @@ void cleanup_module(void) ...@@ -4224,12 +4246,6 @@ void cleanup_module(void)
{ {
int fdc, dummy; int fdc, dummy;
for (fdc=0; fdc<2; fdc++)
if (FDCS->address != -1){
release_region(FDCS->address, 6);
release_region(FDCS->address+7, 1);
}
unregister_blkdev(MAJOR_NR, "fd"); unregister_blkdev(MAJOR_NR, "fd");
blk_dev[MAJOR_NR].request_fn = 0; blk_dev[MAJOR_NR].request_fn = 0;
......
...@@ -541,6 +541,9 @@ static int do_md_add (int minor, kdev_t dev) ...@@ -541,6 +541,9 @@ static int do_md_add (int minor, kdev_t dev)
if (md_dev[minor].nb_dev==MAX_REAL) if (md_dev[minor].nb_dev==MAX_REAL)
return -EINVAL; return -EINVAL;
if (!fs_may_mount (dev))
return -EBUSY;
if (blk_size[MAJOR(dev)] == NULL || blk_size[MAJOR(dev)][MINOR(dev)] == 0) { if (blk_size[MAJOR(dev)] == NULL || blk_size[MAJOR(dev)][MINOR(dev)] == 0) {
printk("md_add(): zero device size, huh, bailing out.\n"); printk("md_add(): zero device size, huh, bailing out.\n");
return -EINVAL; return -EINVAL;
......
Mon Nov 24 10:37:49 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
* serial.c, esp.c, rocket.c: Change drivers to take advantage of
tty_get_baud_rate().
* tty_io.c (tty_get_baud_rate): New function which computes the
correct baud rate for the tty. More factoring out of
common code out of the serial driver to the high-level tty
functions....
Sat Nov 22 07:53:36 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
* serial.c, esp.c, rocket.c: Add tty->driver.break() routine, and
allow high-level tty code to handle the break and soft
carrier ioctls.
* tty_ioctl.c (n_tty_ioctl): Support TIOCGSOFTCAR and
TIOCSSOFTCAR, so that device drivers don't have to support
it.
* serial.c (autoconfig): Change 16750 test to hopefully eliminate
false results by people with strange 16550A's being
detected as 16750's. Hopefully 16750's will still be
detected as 16750, and other wierd UART's won't get poorly
autodetected. If this doesn't work, I'll have to disable
the auto identification for the 16750....
* tty_io.c (tty_hangup): Now do actually do the tty hangup
processing during the timer processing, and disable
interrupts while doing the hangup processing. This avoids
several nasty race conditions which happened when the
hangup processing was done asynchronously.
(tty_ioctl): Do break handling in the tty driver if
driver's break function is supported.
(tty_flip_buffer_push): New exported function which should
be used by drivers to push characters in the flip buffer
to the tty handler. This may either be done using a task
queue function for better CPU efficiency, or directly for
low latency operation.
* serial.c (rs_set_termios): Fix bug rs_set_termios when
transitioning away from B0, submitted by Stanislav
Voronyi.
Thu Jun 19 20:05:58 1997 Theodore Ts'o <tytso@rsts-11.mit.edu> Thu Jun 19 20:05:58 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
* serial.c (begin_break, end_break, rs_ioctl): Applied patch * serial.c (begin_break, end_break, rs_ioctl): Applied patch
......
...@@ -76,11 +76,6 @@ if [ "$CONFIG_QIC02_TAPE" != "n" ]; then ...@@ -76,11 +76,6 @@ if [ "$CONFIG_QIC02_TAPE" != "n" ]; then
fi fi
fi fi
tristate 'Ftape (QIC-80/Travan) support' CONFIG_FTAPE
if [ "$CONFIG_FTAPE" != "n" ]; then
comment 'Set IObase/IRQ/DMA for ftape in ./drivers/char/ftape/Makefile'
fi
bool 'Advanced Power Management BIOS support' CONFIG_APM bool 'Advanced Power Management BIOS support' CONFIG_APM
if [ "$CONFIG_APM" = "y" ]; then if [ "$CONFIG_APM" = "y" ]; then
bool ' Ignore USER SUSPEND' CONFIG_APM_IGNORE_USER_SUSPEND bool ' Ignore USER SUSPEND' CONFIG_APM_IGNORE_USER_SUSPEND
...@@ -116,4 +111,13 @@ if [ "$CONFIG_MISC_RADIO" != "n" ]; then ...@@ -116,4 +111,13 @@ if [ "$CONFIG_MISC_RADIO" != "n" ]; then
hex ' RadioTrack i/o port (0x20f or 0x30f)' CONFIG_RADIO_RTRACK_PORT 0x20f hex ' RadioTrack i/o port (0x20f or 0x30f)' CONFIG_RADIO_RTRACK_PORT 0x20f
fi fi
fi fi
mainmenu_option next_comment
comment 'Ftape, the floppy tape device driver'
tristate 'Ftape (QIC-80/Travan) support' CONFIG_FTAPE
if [ "$CONFIG_FTAPE" != "n" ]; then
source drivers/char/ftape/Config.in
fi
endmenu
endmenu endmenu
...@@ -297,8 +297,11 @@ else ...@@ -297,8 +297,11 @@ else
endif endif
ifeq ($(CONFIG_FTAPE),y) ifeq ($(CONFIG_FTAPE),y)
SUB_DIRS += ftape
L_OBJS += ftape/ftape.o L_OBJS += ftape/ftape.o
SUB_DIRS += ftape
ifneq ($(CONFIG_ZFTAPE),n)
MOD_SUB_DIRS += ftape
endif
else else
ifeq ($(CONFIG_FTAPE),m) ifeq ($(CONFIG_FTAPE),m)
MOD_SUB_DIRS += ftape MOD_SUB_DIRS += ftape
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/tty_flip.h> #include <linux/tty_flip.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/serialP.h>
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <linux/major.h> #include <linux/major.h>
#include <linux/string.h> #include <linux/string.h>
...@@ -140,11 +141,8 @@ static void change_speed(struct esp_struct *info); ...@@ -140,11 +141,8 @@ static void change_speed(struct esp_struct *info);
static void rs_wait_until_sent(struct tty_struct *, int); static void rs_wait_until_sent(struct tty_struct *, int);
/* /*
* This assumes you have a 1.8432 MHz clock for your UART. * The ESP card has a clock rate of 14.7456 MHz (that is, 2**ESPC_SCALE
* * times the normal 1.8432 Mhz clock of most serial boards).
* It'd be nice if someone built a serial card with a 24.576 MHz
* clock, since the 16550A is capable of handling a top speed of 1.5
* megabits/second; but this requires the faster clock.
*/ */
#define BASE_BAUD ((1843200 / 16) * (1 << ESPC_SCALE)) #define BASE_BAUD ((1843200 / 16) * (1 << ESPC_SCALE))
...@@ -192,15 +190,6 @@ static inline int serial_paranoia_check(struct esp_struct *info, ...@@ -192,15 +190,6 @@ static inline int serial_paranoia_check(struct esp_struct *info,
return 0; return 0;
} }
/*
* This is used to figure out the divisor speeds
*/
static int quot_table[] = {
/* 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, */
0, 18432, 12288, 8378, 6878, 6144, 4608, 3072, 1536, 768,
/* 1800,2400,4800,9600,19200,38400,57600,115200,230400,460800 */
512, 384, 192, 96, 48, 24, 16, 8, 4, 2, 0 };
static inline unsigned int serial_in(struct esp_struct *info, int offset) static inline unsigned int serial_in(struct esp_struct *info, int offset)
{ {
return inb(info->port + offset); return inb(info->port + offset);
...@@ -1096,7 +1085,7 @@ static void change_speed(struct esp_struct *info) ...@@ -1096,7 +1085,7 @@ static void change_speed(struct esp_struct *info)
unsigned short port; unsigned short port;
int quot = 0; int quot = 0;
unsigned cflag,cval; unsigned cflag,cval;
int i, bits; int baud, bits;
unsigned char flow1 = 0, flow2 = 0; unsigned char flow1 = 0, flow2 = 0;
unsigned long flags; unsigned long flags;
...@@ -1104,26 +1093,6 @@ static void change_speed(struct esp_struct *info) ...@@ -1104,26 +1093,6 @@ static void change_speed(struct esp_struct *info)
return; return;
cflag = info->tty->termios->c_cflag; cflag = info->tty->termios->c_cflag;
port = info->port; port = info->port;
i = cflag & CBAUD;
if (i & CBAUDEX) {
i &= ~CBAUDEX;
if (i < 1 || i > 2)
info->tty->termios->c_cflag &= ~CBAUDEX;
else
i += 15;
}
if (i == 15) {
if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
i += 1;
if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
i += 2;
if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)
i += 3;
if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
i += 4;
if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)
quot = info->custom_divisor;
}
/* byte size and parity */ /* byte size and parity */
switch (cflag & CSIZE) { switch (cflag & CSIZE) {
...@@ -1148,13 +1117,19 @@ static void change_speed(struct esp_struct *info) ...@@ -1148,13 +1117,19 @@ static void change_speed(struct esp_struct *info)
cval |= UART_LCR_SPAR; cval |= UART_LCR_SPAR;
#endif #endif
if (!quot) { baud = tty_get_baud_rate(info->tty);
quot = quot_table[i]; if (baud == 38400)
quot = info->custom_divisor;
/* default to 9600 bps */ else {
if (baud == 134)
/* Special case since 134 is really 134.5 */
quot = (2*BASE_BAUD / 269);
else if (baud)
quot = BASE_BAUD / baud;
}
/* If the quotient is ever zero, default to 9600 bps */
if (!quot) if (!quot)
quot = BASE_BAUD / 9600; quot = BASE_BAUD / 9600;
}
info->timeout = ((1024 * HZ * bits * quot) / BASE_BAUD) + (HZ / 50); info->timeout = ((1024 * HZ * bits * quot) / BASE_BAUD) + (HZ / 50);
...@@ -1632,8 +1607,17 @@ static int set_serial_info(struct esp_struct * info, ...@@ -1632,8 +1607,17 @@ static int set_serial_info(struct esp_struct * info,
if (((old_info.flags & ASYNC_SPD_MASK) != if (((old_info.flags & ASYNC_SPD_MASK) !=
(info->flags & ASYNC_SPD_MASK)) || (info->flags & ASYNC_SPD_MASK)) ||
(old_info.custom_divisor != info->custom_divisor) || (old_info.custom_divisor != info->custom_divisor) ||
change_flow) change_flow) {
if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
info->tty->alt_speed = 57600;
if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
info->tty->alt_speed = 115200;
if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)
info->tty->alt_speed = 230400;
if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
info->tty->alt_speed = 460800;
change_speed(info); change_speed(info);
}
} else } else
retval = startup(info); retval = startup(info);
return retval; return retval;
...@@ -1723,30 +1707,27 @@ static int set_modem_info(struct esp_struct * info, unsigned int cmd, ...@@ -1723,30 +1707,27 @@ static int set_modem_info(struct esp_struct * info, unsigned int cmd,
} }
/* /*
* This routine sends a break character out the serial port. * rs_break() --- routine which turns the break handling on or off
*/ */
static void send_break( struct esp_struct * info, int duration) static void esp_break(struct tty_struct *tty, int break_state)
{ {
cli(); struct esp_struct * info = (struct esp_struct *)tty->driver_data;
unsigned long flags;
if (serial_paranoia_check(info, tty->device, "esp_break"))
return;
save_flags(flags); cli();
if (break_state == -1) {
serial_out(info, UART_ESI_CMD1, ESI_ISSUE_BREAK); serial_out(info, UART_ESI_CMD1, ESI_ISSUE_BREAK);
serial_out(info, UART_ESI_CMD2, 0x01); serial_out(info, UART_ESI_CMD2, 0x01);
interruptible_sleep_on(&info->break_wait); interruptible_sleep_on(&info->break_wait);
} else {
if (signal_pending(current)) {
serial_out(info, UART_ESI_CMD1, ESI_ISSUE_BREAK); serial_out(info, UART_ESI_CMD1, ESI_ISSUE_BREAK);
serial_out(info, UART_ESI_CMD2, 0x00); serial_out(info, UART_ESI_CMD2, 0x00);
sti();
return;
} }
restore_flags(flags);
current->state = TASK_INTERRUPTIBLE;
current->timeout = jiffies + duration;
schedule();
serial_out(info, UART_ESI_CMD1, ESI_ISSUE_BREAK);
serial_out(info, UART_ESI_CMD2, 0x00);
sti();
} }
static int rs_ioctl(struct tty_struct *tty, struct file * file, static int rs_ioctl(struct tty_struct *tty, struct file * file,
...@@ -1754,7 +1735,6 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file, ...@@ -1754,7 +1735,6 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
{ {
int error; int error;
struct esp_struct * info = (struct esp_struct *)tty->driver_data; struct esp_struct * info = (struct esp_struct *)tty->driver_data;
int retval;
struct async_icount cprev, cnow; /* kernel counter temps */ struct async_icount cprev, cnow; /* kernel counter temps */
struct serial_icounter_struct *p_cuser; /* user space */ struct serial_icounter_struct *p_cuser; /* user space */
...@@ -1770,41 +1750,6 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file, ...@@ -1770,41 +1750,6 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
} }
switch (cmd) { switch (cmd) {
case TCSBRK: /* SVID version: non-zero arg --> no break */
retval = tty_check_change(tty);
if (retval)
return retval;
tty_wait_until_sent(tty, 0);
if (signal_pending(current))
return -EINTR;
if (!arg) {
send_break(info, HZ/4); /* 1/4 second */
if (signal_pending(current))
return -EINTR;
}
return 0;
case TCSBRKP: /* support for POSIX tcsendbreak() */
retval = tty_check_change(tty);
if (retval)
return retval;
tty_wait_until_sent(tty, 0);
if (signal_pending(current))
return -EINTR;
send_break(info, arg ? arg*(HZ/10) : HZ/4);
if (signal_pending(current))
return -EINTR;
return 0;
case TIOCGSOFTCAR:
return put_user(C_CLOCAL(tty) ? 1 : 0,
(int *) arg);
case TIOCSSOFTCAR:
error = get_user(arg, (unsigned int *)arg);
if (error)
return error;
tty->termios->c_cflag =
((tty->termios->c_cflag & ~CLOCAL) |
(arg ? CLOCAL : 0));
return 0;
case TIOCMGET: case TIOCMGET:
return get_modem_info(info, (unsigned int *) arg); return get_modem_info(info, (unsigned int *) arg);
case TIOCMBIS: case TIOCMBIS:
...@@ -2527,6 +2472,7 @@ __initfunc(int espserial_init(void)) ...@@ -2527,6 +2472,7 @@ __initfunc(int espserial_init(void))
esp_driver.stop = rs_stop; esp_driver.stop = rs_stop;
esp_driver.start = rs_start; esp_driver.start = rs_start;
esp_driver.hangup = esp_hangup; esp_driver.hangup = esp_hangup;
esp_driver.break_ctl = esp_break;
esp_driver.wait_until_sent = rs_wait_until_sent; esp_driver.wait_until_sent = rs_wait_until_sent;
/* /*
......
#
# Ftape configuration
#
dep_tristate 'Zftape, the VFS interface' CONFIG_ZFTAPE $CONFIG_FTAPE
if [ "$CONFIG_ZFTAPE" != "n" ]; then
int 'Default block size' CONFIG_ZFT_DFLT_BLK_SZ 10240
comment 'The compressor will be built as a module only!'
define_bool CONFIG_ZFT_COMPRESSOR m
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
int 'Number of ftape buffers (EXPERIMENTAL)' CONFIG_FT_NR_BUFFERS 3
fi
if [ "$CONFIG_PROC_FS" = "y" ]; then
bool 'Enable procfs status report (+2kb)' CONFIG_FT_PROC_FS y
fi
choice 'Debugging output' \
"Normal CONFIG_FT_NORMAL_DEBUG \
Excessive CONFIG_FT_FULL_DEBUG \
Reduced CONFIG_FT_NO_TRACE \
None CONIFG_FT_NO_TRACE_AT_ALL" Normal
comment 'Hardware configuration'
choice 'Floppy tape controllers' \
"Standard CONFIG_FT_STD_FDC \
MACH-2 CONFIG_FT_MACH2 \
FC-10/FC-20 CONFIG_FT_PROBE_FC10 \
Alt/82078 CONFIG_FT_ALT_FDC" Standard
if [ "$CONFIG_FT_STD_FDC" != "y" ]; then
comment ' Consult the manuals of your tape drive for the correct settings!'
hex ' IO base of the floppy disk controller' CONFIG_FT_FDC_BASE 0
int ' IRQ channel of the floppy disk controller' CONFIG_FT_FDC_IRQ 0
int ' DMA channel of the floppy disk controller' CONFIG_FT_FDC_DMA 0
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
int 'Default FIFO threshold (EXPERIMENTAL)' CONFIG_FT_FDC_THR 8
int 'Maximal data rate to use (EXPERIMENTAL)' CONFIG_FT_FDC_MAX_RATE 2000
fi
comment 'ONLY for DEC Alpha architectures'
int 'CPU clock frequency of your DEC Alpha' CONFIG_FT_ALPHA_CLOCK 0
# #
# Makefile for the ftape device driver. # Copyright (C) 1997 Claus Heine.
# #
# Note! Dependencies are done automagically by 'make dep', which also # This program is free software; you can redistribute it and/or modify
# removes any old dependencies. DON'T put your own dependencies here # it under the terms of the GNU General Public License as published by
# unless it's something special (ie not a .c file). # the Free Software Foundation; either version 2, or (at your option)
# any later version.
# #
# Note 2! The CFLAGS definitions are now inherited from the # This program is distributed in the hope that it will be useful,
# parent makes.. # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License
# Valid ftape options are: # along with this program; see the file COPYING. If not, write to
# NO_TRACE - if defined, only information and errors show up. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# NO_TRACE_AT_ALL - if defined, no trace output shows up.
# GCC_2_4_5_BUG - must be set if using gcc-2.4.5 to prevent
# bad assembler-code for the dma handling.
# NR_BUFFERS - Number of ftape DMA buffers (keep it at 3!)
# VERIFY_HEADERS - if set the headers segments are verified after
# being written.
# PROBE_FC10 - if defined will look for a FC-10 card at specified
# settings (FDC_BASE,FDC_IRQ,FDC_DMA) before using
# the standard fd controller.
# FDC_BASE - sets base address (only!) if using non-standard fdc
# FDC_IRQ - sets interrupt if FDC_BASE is defined
# FDC_DMA - sets dma channel if FDC_BASE is defined
# MACH2 - Support for Mountain MACH-2 controller at either 1E0
# or 3E0, don't forget the FDC_OPT's !
# CLK_48MHZ - Set to 1. If you have a i82078-1 FDC and it does not
# work, try setting it to 0. (only used for i82078-1's)
# FDC_82078SL - If you have a 82078SL, define this.
FTAPE_OPT = -DVERIFY_HEADERS -DNR_BUFFERS=3 -DCLK_48MHZ=1 \
-DNO_TRACE -DFDC_82078SL
# If you're using a non-standard floppy disk controller for the
# tape drive, enable one (only!) of the following lines and set
# the FDC_BASE, FDC_IRQ and FDC_DMA parameters to the actual values.
#
# Note1: A FC-10/FC-20 controller must use either of DMA 1, 2, or 3.
# DMA 5 and 7 does NOT work!.
# #
# Note2: IRQ 2 and IRQ 9 can be considered the same. When using IRQ 2 # $Source: /homes/cvs/ftape-stacked/ftape/Makefile,v $
# on a controller you must specify IRQ 9 here! # $Revision: 1.4 $
# $Date: 1997/10/05 19:17:56 $
# #
# For a Mountain MACH-2 controller, try # Makefile for the QIC-40/80/3010/3020 floppy-tape driver for
#FDC_OPT = -DMACH2 -DFDC_BASE=0x1E0 -DFDC_IRQ=6 -DFDC_DMA=2 # Linux.
# #
# For Colorado CMS FC-10 or FC-20 controllers:
#FDC_OPT = -DPROBE_FC10 -DFDC_BASE=0x180 -DFDC_IRQ=9 -DFDC_DMA=3
# #
# Secondary floppy disk controller: # This isn't used inside the kernel, only for my private development
#FDC_OPT = -DFDC_BASE=0x370 -DFDC_IRQ=9 -DFDC_DMA=3 # version
# #
# This enables some (most?) 2Mbps controllers: ifndef TOPDIR
#FDC_OPT = -DFDC_BASE=0x3E0 -DFDC_IRQ=6 -DFDC_DMA=2 TOPDIR= ..
include $(TOPDIR)/MCONFIG
endif
SUB_DIRS :=
MOD_SUB_DIRS := $(SUB_DIRS)
ALL_SUB_DIRS := $(SUB_DIRS) lowlevel zftape compressor
ifeq ($(CONFIG_FTAPE),y)
O_TARGET := ftape.o
SUB_DIRS += lowlevel
O_OBJS += lowlevel/ftape.o
else
ifeq ($(CONFIG_FTAPE),m)
MOD_SUB_DIRS += lowlevel
endif
endif
EXTRA_CFLAGS := $(FTAPE_OPT) $(FDC_OPT) ifeq ($(CONFIG_ZFTAPE),y)
SUB_DIRS += zftape
O_OBJS += zftape/zftape.o
else
ifeq ($(CONFIG_ZFTAPE),m)
MOD_SUB_DIRS += zftape
endif
endif
O_TARGET := ftape.o ifeq ($(CONFIG_ZFT_COMPRESSOR),y)
O_OBJS = kernel-interface.o tracing.o fdc-io.o fdc-isr.o \ SUB_DIRS += compressor
ftape-bsm.o ftape-ctl.o ftape-eof.o ftape-read.o ftape-rw.o \ O_OBJS += compressor/zft-compressor.o
ftape-write.o ftape-io.o calibr.o ecc.o fc-10.o else
M_OBJS = $(O_TARGET) ifeq ($(CONFIG_ZFT_COMPRESSOR),m)
MOD_SUB_DIRS += compressor
endif
endif
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -30,7 +30,7 @@ bus timing. ...@@ -30,7 +30,7 @@ bus timing.
I judge this a hardware problem and not a limitation of ftape ;-) I judge this a hardware problem and not a limitation of ftape ;-)
My DOS backup software seems to be suffering from the same problems My DOS backup software seems to be suffering from the same problems
and even refuses to run at 1 Mbps ! and even refuses to run at 1 Mbps !
Ftape will reduce the datarate from 1 Mbps to 500 Kbps if the number Ftape will reduce the data-rate from 1 Mbps to 500 Kbps if the number
of overrun errors on a track exceeds a threshold. of overrun errors on a track exceeds a threshold.
...@@ -77,3 +77,5 @@ under DOS. If it's very slow and often repositions you're ...@@ -77,3 +77,5 @@ under DOS. If it's very slow and often repositions you're
probably having this problem. probably having this problem.
--//-- --//--
LocalWords: ftape PCI bios GAT ISA DMA chipset Mbps Kbps FDC isa AF ok ASUS
LocalWords: SP linebuffer masterbuffer XPS http www com
This diff is collapsed.
#
# Copyright (C) 1997 Claus-Justus Heine.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Source: /homes/cvs/ftape-stacked/ftape/compressor/Makefile,v $
# $Revision: 1.1 $
# $Date: 1997/10/05 19:12:28 $
#
# Makefile for the optional compressor for th zftape VFS
# interface to the QIC-40/80/3010/3020 floppy-tape driver for
# Linux.
#
#
# This isn't used inside the kernel, only for my private development
# version
#
ifndef TOPDIR
TOPDIR=../..
include $(TOPDIR)/MCONFIG
endif
O_TARGET := zft-compressor.o
O_OBJS = zftape-compress.o lzrw3.o
M_OBJS = $(O_TARGET)
include $(TOPDIR)/Rules.make
#
# sorry, a special rule.
#
lzrw3.o: lzrw3.c
$(CC) $(CFLAGS) -O6 -funroll-all-loops -c $<
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef _ZFTAPE_COMPRESS_H
#define _ZFTAPE_COMPRESS_H
/*
* Copyright (c) 1994-1997 Claus-Justus Heine
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
USA.
*
* $Source: /homes/cvs/ftape-stacked/ftape/compressor/zftape-compress.h,v $
* $Revision: 1.1 $
* $Date: 1997/10/05 19:12:32 $
*
* This file contains macros and definitions for zftape's
* builtin compression code.
*
*/
#include "../zftape/zftape-buffers.h"
#include "../zftape/zftape-vtbl.h"
#include "../compressor/lzrw3.h"
/* CMPR_WRK_MEM_SIZE gives the size of the compression wrk_mem */
/* I got these out of lzrw3.c */
#define U(X) ((__u32) X)
#define SIZE_P_BYTE (U(sizeof(__u8 *)))
#define ALIGNMENT_FUDGE (U(16))
#define CMPR_WRK_MEM_SIZE (U(4096)*(SIZE_P_BYTE) + ALIGNMENT_FUDGE)
/* the maximum number of bytes the size of the "compressed" data can
* exceed the uncompressed data. As it is quite useless to compress
* data twice it is sometimes the case that it is more efficient to
* copy a block of data but to feed it to the "compression"
* algorithm. In this case there are some flag bytes or the like
* proceding the "compressed" data. THAT MUST NOT BE THE CASE for the
* algorithm we use for this driver. Instead, the high bit 15 of
* compressed_size:
*
* compressed_size = ftape_compress()
*
* must be set in such a case.
*
* Nevertheless, it might also be as for lzrw3 that there is an
* "intermediate" overrun that exceeds the amount of the compressed
* data that is actually produced. During the algorithm we need in the
* worst case MAX_CMP_GROUP bytes more than the input-size.
*/
#define MAX_CMP_GROUP (2+16*2) /* from lzrw3.c */
#define CMPR_OVERRUN MAX_CMP_GROUP /* during compression */
/****************************************************/
#define CMPR_BUFFER_SIZE (MAX_BLOCK_SIZE + CMPR_OVERRUN)
/* the compression map stores the byte offset compressed blocks within
* the current volume for catridges with format code 2,3 and 5
* (and old versions of zftape) and the offset measured in kilobytes for
* format code 4 and 6. This gives us a possible max. size of a
* compressed volume of 1024*4GIG which should be enough.
*/
typedef __u32 CmprMap;
/* globals
*/
/* exported functions
*/
#endif /* _ZFTAPE_COMPRESS_H */
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.
#
# Copyright (C) 1996, 1997 Clau-Justus Heine.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/Makefile,v $
# $Revision: 1.4 $
# $Date: 1997/10/07 09:26:02 $
#
# Makefile for the lowlevel part QIC-40/80/3010/3020 floppy-tape
# driver for Linux.
#
#
# This isn't used inside the kernel, only for my private development
# version
#
ifndef TOPDIR
TOPDIR=../..
include $(TOPDIR)/MCONFIG
endif
O_TARGET := ftape.o
O_OBJS = ftape-init.o fdc-io.o fdc-isr.o \
ftape-bsm.o ftape-ctl.o ftape-read.o ftape-rw.o \
ftape-write.o ftape-io.o ftape-calibr.o ftape-ecc.o fc-10.o \
ftape-buffer.o ftape-format.o
ifeq ($(CONFIG_FTAPE),y)
O_OBJS += ftape-setup.o
endif
ifndef CONFIG_FT_NO_TRACE_AT_ALL
O_OBJS += ftape-tracing.o
endif
ifeq ($(CONFIG_PROC_FS),y)
ifeq ($(CONFIG_FT_PROC_FS),y)
O_OBJS += ftape-proc.o
endif
endif
OX_OBJS = ftape_syms.o
M_OBJS = $(O_TARGET)
include $(TOPDIR)/Rules.make
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