Usenet comp.os.linux.announce (1993-2013)
 help / color / mirror / Atom feed
* Fix for CDU31A driver in 2.0.23 and 2.1.5
@ 1996-10-30  5:00 Corey Minyard
  0 siblings, 0 replies; only message in thread
From: Corey Minyard @ 1996-10-30  5:00 UTC (permalink / raw)



-----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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-10-30  5:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-10-30  5:00 Fix for CDU31A driver in 2.0.23 and 2.1.5 Corey Minyard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox