/* cm206.c. A linux-driver for the cm206 cdrom player with cm260 adapter card.
Copyright (c) 1995--1997 David A. van Leeuwen.
$Id: cm206.c,v 1.5 1997/12/26 11:02:51 david Exp $
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 of the License, 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; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
History:
Started 25 jan 1994. Waiting for documentation...
22 feb 1995: 0.1a first reasonably safe polling driver.
Two major bugs, one in read_sector and one in
do_cm206_request, happened to cancel!
25 feb 1995: 0.2a first reasonable interrupt driven version of above.
uart writes are still done in polling mode.
25 feb 1995: 0.21a writes also in interrupt mode, still some
small bugs to be found... Larger buffer.
2 mrt 1995: 0.22 Bug found (cd-> nowhere, interrupt was called in
initialization), read_ahead of 16. Timeouts implemented.
unclear if they do something...
7 mrt 1995: 0.23 Start of background read-ahead.
18 mrt 1995: 0.24 Working background read-ahead. (still problems)
26 mrt 1995: 0.25 Multi-session ioctl added (kernel v1.2).
Statistics implemented, though separate stats206.h.
Accessible through ioctl 0x1000 (just a number).
Hard to choose between v1.2 development and 1.1.75.
Bottom-half doesn't work with 1.2...
0.25a: fixed... typo. Still problems...
1 apr 1995: 0.26 Module support added. Most bugs found. Use kernel 1.2.n.
5 apr 1995: 0.27 Auto-probe for the adapter card base address.
Auto-probe for the adaptor card irq line.
7 apr 1995: 0.28 Added lilo setup support for base address and irq.
Use major number 32 (not in this source), officially
assigned to this driver.
9 apr 1995: 0.29 Added very limited audio support. Toc_header, stop, pause,
resume, eject. Play_track ignores track info, because we can't
read a table-of-contents entry. Toc_entry is implemented
as a `placebo' function: always returns start of disc.
3 may 1995: 0.30 Audio support completed. The get_toc_entry function
is implemented as a binary search.
15 may 1995: 0.31 More work on audio stuff. Workman is not easy to
satisfy; changed binary search into linear search.
Auto-probe for base address somewhat relaxed.
1 jun 1995: 0.32 Removed probe_irq_on/off for module version.
10 jun 1995: 0.33 Workman still behaves funny, but you should be
able to eject and substitute another disc.
An adaptation of 0.33 is included in linux-1.3.7 by Eberhard Moenkeberg
18 jul 1995: 0.34 Patch by Heiko Eissfeldt included, mainly considering
verify_area's in the ioctls. Some bugs introduced by
EM considering the base port and irq fixed.
18 dec 1995: 0.35 Add some code for error checking... no luck...
We jump to reach our goal: version 1.0 in the next stable linux kernel.
19 mar 1996: 0.95 Different implementation of CDROM_GET_UPC, on
request of Thomas Quinot.
25 mar 1996: 0.96 Interpretation of opening with O_WRONLY or O_RDWR:
open only for ioctl operation, e.g., for operation of
tray etc.
4 apr 1996: 0.97 First implementation of layer between VFS and cdrom
driver, a generic interface. Much of the functionality
of cm206_open() and cm206_ioctl() is transferred to a
new file cdrom.c and its header ucdrom.h.
Upgrade to Linux kernel 1.3.78.
11 apr 1996 0.98 Upgrade to Linux kernel 1.3.85
More code moved to cdrom.c
0.99 Some more small changes to decrease number
of oopses at module load;
27 jul 1996 0.100 Many hours of debugging, kernel change from 1.2.13
to 2.0.7 seems to have introduced some weird behavior
in (interruptible_)sleep_on(&cd->data): the process
seems to be woken without any explicit wake_up in my own
code. Patch to try 100x in case such untriggered wake_up's
occur.
28 jul 1996 0.101 Rewriting of the code that receives the command echo,
using a fifo to store echoed bytes.
Branch from 0.99:
0.99.1.0 Update to kernel release 2.0.10 dev_t -> kdev_t
(emoenke) various typos found by others. extra
module-load oops protection.
0.99.1.1 Initialization constant cdrom_dops.speed
changed from float (2.0) to int (2); Cli()-sti() pair
|