Date: Thu, 2 Sep 1999 18:54:46 +0200 (MET DST) From: Nick Hibma <nick.hibma@jrc.it> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: "Jordan K. Hubbard" <jkh@zippy.cdrom.com>, FreeBSD current mailing list <freebsd-current@FreeBSD.ORG> Subject: Re: yes! or should I say Oh no! (CD ROM problems) Message-ID: <Pine.GS4.4.10.9909021819210.3090-200000@elect8> In-Reply-To: <1625.936288755@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
> >No. Insert CD, run cda /dev/rcd0c toc, error message in
> >/var/log/messages. Eject CD reinsert it, same command, it works.
>
> So it fails the first time after a reboot and never again
> until reboot ?
>
> Or is it just heads-or-tails everytime ?
The machine is normally up for several weeks at a time, so it's
head-or-tails, with it being ok most of the time. When it goes wrong it
goes wrong for several changes of CD"s, but all of a sudden it starts to
work again.
I'm sorry I can't be more precise, but the error occurs at random
places.
> As you can see it would pass through the third block, but not
> the two first, so if you could place a couple of strategic
> printfs and see which one of these it fails on (only print on
> the error, otherwise your printout will come en each and every
> transfer.)
See attached diff against CURRENT in case any one else wants to have a
go at it.
> Is this by any chance a mixed-cd, ie both sound&data tracks ?
Nope, off the shelf sound CD.
Nick
--
ISIS/STA, T.P.270, Joint Research Centre, 21020 Ispra, Italy
[-- Attachment #2 --]
--- subr_diskslice.c.orig Thu Sep 2 18:21:33 1999
+++ subr_diskslice.c Thu Sep 2 18:37:48 1999
@@ -173,22 +173,38 @@
sp = &ssp->dss_slices[dkslice(bp->b_dev)];
lp = sp->ds_label;
if (ssp->dss_secmult == 1) {
- if (bp->b_bcount % (u_long)DEV_BSIZE)
+ if (bp->b_bcount % (u_long)DEV_BSIZE) {
+ printf("PHK1 bp->b_bcount(=%ld) %% %d != 0\n",
+ bp->b_bcount, DEV_BSIZE);
goto bad_bcount;
+ }
secno = blkno;
nsec = bp->b_bcount >> DEV_BSHIFT;
} else if (ssp->dss_secshift != -1) {
- if (bp->b_bcount & (ssp->dss_secsize - 1))
+ if (bp->b_bcount & (ssp->dss_secsize - 1)) {
+ printf("PHK2 bp->b_bcount(=%ld) & (ssp->dss_secsize - 1)(=%d) != 0\n",
+ bp->b_bcount, ssp->dss_secsize - 1);
goto bad_bcount;
- if (blkno & (ssp->dss_secmult - 1))
+ }
+ if (blkno & (ssp->dss_secmult - 1)) {
+ printf("PHK3 blkno(=%d) & (ssp->dss_secmult - 1)(=
+%d) != 0\n",
+ blkno, ssp->dss_secmult - 1);
goto bad_blkno;
+ }
secno = blkno >> ssp->dss_secshift;
nsec = bp->b_bcount >> (DEV_BSHIFT + ssp->dss_secshift);
} else {
- if (bp->b_bcount % ssp->dss_secsize)
+ if (bp->b_bcount % ssp->dss_secsize) {
+ printf("PHK4 bp->b_bcount(=%ld) %% ssp->dss_secsize(=%d) != 0\n",
+ bp->b_bcount, ssp->dss_secsize - 1);
goto bad_bcount;
- if (blkno % ssp->dss_secmult)
+ }
+ if (blkno % ssp->dss_secmult) {
+ printf("PHK5 blkno(=%d) %% ssp->dss_secmult(=%d) != 0\n",
+ blkno, ssp->dss_secmult);
goto bad_blkno;
+ }
secno = blkno / ssp->dss_secmult;
nsec = bp->b_bcount / ssp->dss_secsize;
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GS4.4.10.9909021819210.3090-200000>
