From owner-freebsd-current Thu Sep 2 9:13:20 1999 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id 1701015649 for ; Thu, 2 Sep 1999 09:13:11 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.2) with ESMTP id SAA01627; Thu, 2 Sep 1999 18:12:35 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Nick Hibma Cc: "Jordan K. Hubbard" , FreeBSD current mailing list Subject: Re: yes! or should I say Oh no! (CD ROM problems) In-reply-to: Your message of "Thu, 02 Sep 1999 18:05:42 +0200." Date: Thu, 02 Sep 1999 18:12:35 +0200 Message-ID: <1625.936288755@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , 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