Fix for CDU31A driver in 2.0.23 and 2.1.5 (fwd)
Something went wrong with my posting which was supposed to include this
message from c.o.l.a., so here it is again!
P. *8^)
--
Paul Seelig pseelig@goofy.zdv.uni-mainz.de
African Music Archive - Institute for Ethnology and Africa Studies
Johannes Gutenberg-University - Forum 6 - 55099 Mainz/Germany
Our AMA Homepage in the WWW at http://www.uni-mainz.de/~bender/
---------- Forwarded message ----------
Date: 30 Oct 1996 11:21:23 GMT
From: Corey Minyard <minyard@metronet.com>
Newsgroups: comp.os.linux.announce
Subject: Fix for CDU31A driver in 2.0.23 and 2.1.5
Followup-To: comp.os.linux.development.system
-----BEGIN PGP SIGNED MESSAGE-----
Well, I managed to screw up the CDU31A driver. I couldn't test the
patch I sent Linus because my interface board is broken; it looked
right (my daughter has been waking me up at 5:00 every morning and
everything looks right when you are tired :-), so I applied it. Well,
it was wrong. The following fix has been tested and does seem to
work. Sorry for the problem.
- --
Corey Minyard Internet: minyard@metronet.com
Work: minyard@nortel.ca UUCP: minyard@wf-rch.cirr.com
- --- linux/drivers/cdrom/cdu31a.c.old Sun Oct 20 22:25:06 1996
+++ linux/drivers/cdrom/cdu31a.c Sun Oct 20 22:30:31 1996
@@ -1915,7 +1915,9 @@
int num_tracks;
- - num_tracks = sony_toc.last_track_num - sony_toc.first_track_num + 1;
+ num_tracks = ( bcd_to_int(sony_toc.last_track_num)
+ - bcd_to_int(sony_toc.first_track_num)
+ + 1);
for (i = 0; i < num_tracks; i++)
{
if (sony_toc.tracks[i].track == track)
@@ -2486,8 +2488,8 @@
i=verify_area(VERIFY_WRITE, hdr, sizeof(*hdr));
if(i<0)
return i;
- - loc_hdr.cdth_trk0 = sony_toc.first_track_num;
- - loc_hdr.cdth_trk1 = sony_toc.last_track_num;
+ loc_hdr.cdth_trk0 = bcd_to_int(sony_toc.first_track_num);
+ loc_hdr.cdth_trk1 = bcd_to_int(sony_toc.last_track_num);
memcpy_tofs(hdr, &loc_hdr, sizeof(*hdr));
}
return 0;
@@ -2567,8 +2569,8 @@
return i;
memcpy_fromfs(&ti, (char *) arg, sizeof(ti));
- - if ( (ti.cdti_trk0 < sony_toc.first_track_num)
- - || (ti.cdti_trk0 > sony_toc.last_track_num)
+ if ( (ti.cdti_trk0 < bcd_to_int(sony_toc.first_track_num))
+ || (ti.cdti_trk0 > bcd_to_int(sony_toc.last_track_num))
|| (ti.cdti_trk1 < ti.cdti_trk0))
{
return -EINVAL;
@@ -2587,7 +2589,7 @@
* If we want to stop after the last track, use the lead-out
* MSF to do that.
*/
- - if (ti.cdti_trk1 >= sony_toc.last_track_num)
+ if (ti.cdti_trk1 >= bcd_to_int(sony_toc.last_track_num))
{
log_to_msf(msf_to_log(sony_toc.lead_out_start_msf)-1,
&(params[4]));
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
iQCVAwUBMnc5vYQRll5MupLRAQFuWwQA0yV7RepUXhf+NibP/b1BrALkA+okYjkx
VLXA5IaldTC4yu0otZijXnNdVm7PuVyCrBrcNtHzDJPYzB6cJ62ded/bDaRY6fkg
DN1UGTrhm2raZAfJNU3aWT7ErFrplRLScdmV66sw8WR0uHCZiuioDgnu/yPhZi6I
VRz9zk9EtH0=
=T8EF
-----END PGP SIGNATURE-----
--
This article has been digitally signed by the moderator, using PGP.
http://www.iki.fi/liw/lars-public-key.asc has PGP key for validating signature.
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember a short description of the software and the LOCATION.
This group is archived at http://www.iki.fi/liw/linux/cola.html
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com
Reply to: