From owner-freebsd-hackers Thu May 30 5:36:31 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from gromit.it.su.se (gromit.it.su.se [130.237.95.77]) by hub.freebsd.org (Postfix) with ESMTP id 1899937B4AB for ; Thu, 30 May 2002 05:35:59 -0700 (PDT) Received: (from rnyberg@localhost) by gromit.it.su.se (8.11.6/8.11.6) id g4UCZto03823; Thu, 30 May 2002 14:35:55 +0200 (CEST) (envelope-from rnyberg) Date: Thu, 30 May 2002 14:35:55 +0200 From: Richard Nyberg To: Soeren Schmidt Cc: freebsd-hackers@freebsd.org Subject: Re: process hang in atprq state Message-ID: <20020530143555.D3400@gromit.it.su.se> Mail-Followup-To: Richard Nyberg , Soeren Schmidt , freebsd-hackers@freebsd.org References: <200205292020.g4TKKcHQ080631@freebsd.dk> <200205292024.g4TKO1N8081293@freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5.1i In-Reply-To: <200205292024.g4TKO1N8081293@freebsd.dk>; from sos@freebsd.dk on Wed, May 29, 2002 at 10:24:01pm +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thanks for the speedy reply Søren :) Soeren Schmidt may have written: > It seems Soeren Schmidt wrote: > > It seems Richard Nyberg wrote: > > > Hi there. > > > I seem to have some problems with my cd read program. > > > > > > I've attached a small prototype program that for some reason hangs > > > in atprq, even though I use a timeout of 5 seconds. The program reads > > > a cd in raw format using the MMC READ_CD command. It works fine :) > > > except that it never manages to finish because of the hang. The hang > > > doesn't seem to be linked to any specific place on the cd, but it might > > > be linked to my ignorance ;) > > > > Uhm, you just need to set the blocksize on the CD device with the > > CDRIOCGETBLOCKSIZE and then just read the CD with > > dd if=/dev/acdX of=fil bs=2352 > > That will read the CD in RAW mode... Ok, I see! However, I also want to read the raw subchannel data, which I don't see any way of doing. In addition I also want to be able to handle flawed cd:s in a semi intelligent manner (examine the error instead of just stopping like dd). > Oh, I forgot to tell you that it hangs because you have to stop > reading at the last block, the drive will try to read anything > you ask it to, but some drives newer return data for nonexistin blocks.. Unfortunately, this cannot be it :( The hangs occurs at different blocks on the same cd and often long before the last lba. I tried the dd approach and it worked much better, ie. no hang, so I must be doing something wrong. BTW, I noticed some stupid block count bugs in the source I posted, but they shouldn't matter since the hangs occured even when I just read one block at a time. -Richard To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message