Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Sep 1999 18:12:35 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Nick Hibma <nick.hibma@jrc.it>
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:  <1625.936288755@critter.freebsd.dk>
In-Reply-To: Your message of "Thu, 02 Sep 1999 18:05:42 %2B0200." <Pine.GS4.4.10.9909021800040.3090-100000@elect8> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.GS4.4.10.9909021800040.3090-100000@elect8>, Nick Hibma writes:
> > What you're saying is that it fails on the second open but
> > resets if you eject/reload the CD ?
>
>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 ?

> > If that message comes from where I think, something is trying
> > to do non BDEV_SIZE multiple requests on a char device, a clear
> > no-no.
>
>And where do you think the message comes from? Especially because the
>error does not occur always on the same CD.

I suspect that it is from this code in kern/subr_diskslice.c:dscheck()

        if (ssp->dss_secmult == 1) {
                if (bp->b_bcount % (u_long)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))
                        goto bad_bcount;
                if (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)
                        goto bad_bcount;
                if (blkno % ssp->dss_secmult)
                        goto bad_blkno;
                secno = blkno / ssp->dss_secmult;
                nsec = bp->b_bcount / ssp->dss_secsize;
        }

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

Is this by any chance a mixed-cd, ie both sound&data tracks ?

--
Poul-Henning Kamp             FreeBSD coreteam member
phk@FreeBSD.ORG               "Real hackers run -current on their laptop."
FreeBSD -- It will take a long time before progress goes too far!


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1625.936288755>