From owner-freebsd-current@FreeBSD.ORG Sun Aug 9 17:21:00 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D09471065673; Sun, 9 Aug 2009 17:21:00 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (cl-43.dus-01.de.sixxs.net [IPv6:2a01:198:200:2a::2]) by mx1.freebsd.org (Postfix) with ESMTP id 475308FC15; Sun, 9 Aug 2009 17:21:00 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [127.0.0.1]) by acme.spoerlein.net (8.14.3/8.14.3) with ESMTP id n79HKvpK034406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 9 Aug 2009 19:20:58 +0200 (CEST) (envelope-from uqs@spoerlein.net) Received: (from uqs@localhost) by acme.spoerlein.net (8.14.3/8.14.3/Submit) id n79HKvVV034358; Sun, 9 Aug 2009 19:20:57 +0200 (CEST) (envelope-from uqs@spoerlein.net) Date: Sun, 9 Aug 2009 19:20:57 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Juergen Lock Message-ID: <20090809172057.GD78940@acme.spoerlein.net> Mail-Followup-To: Juergen Lock , freebsd-current@freebsd.org, mav@freebsd.org References: <20090806184510.GA12039@triton.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090806184510.GA12039@triton.kn-bremen.de> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: mav@freebsd.org, freebsd-current@freebsd.org Subject: Re: cd(4) vs bluray and cdda (dae) on ahci(4) and siis(4) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Aug 2009 17:21:01 -0000 On Thu, 06.08.2009 at 20:45:10 +0200, Juergen Lock wrote: > Hi! > > So I put the problematic optical drive on a siis pcie card now because > I wanted to play with esata too which seems to be kinda broken on the > jmicron that I used before at least with _this_ esata drive (hw issue > most likely, has been reported by users of other OSes too) - and I > noticed two things: > > 1. cd(4) (which the new ahci and siis drivers now also use) fails to do > any reads when a drive fails the read toc command as seems to happen > with bluray (data) discs at least; I was able to work around this > by moving the bailout: label up a few lines in scsi_cd.c:cdcheckmedia(): > > Index: sys/cam/scsi/scsi_cd.c > @@ -2868,12 +2868,18 @@ > } > > softc->flags |= CD_FLAG_VALID_TOC; > + > +bailout: > softc->disk->d_maxsize = DFLTPHYS; > softc->disk->d_sectorsize = softc->params.blksize; > softc->disk->d_mediasize = > (off_t)softc->params.blksize * softc->params.disksize; > > +/* if > bailout: > + * is here read requests will fail when the toc cant be read although > + * CD_FLAG_VALID_MEDIA is set. > + */ > > /* > * We unconditionally (re)set the blocksize each time the > > (I say work around because I don't know if there might be stuff > somewhere that depends on the old behaviour, although thats probably > unlikely; also acd(4) seems to behave similarly.) T H A N K Y O U ! Hi Juergen, this nice little patch lets my USB/Firewire attached Plextor drive read "pressed" DVD media, where it failed before. I have mentioned this in the past, but due to the esoteric nature of this problem failed to attract enough attention. http://lists.freebsd.org/pipermail/freebsd-usb/2007-July/003730.html http://docs.freebsd.org/cgi/getmsg.cgi?fetch=644449+0+archive/2007/freebsd-current/20070812.freebsd-current So this is not only related to Bluray, but plain DVD media is affected too (at least for some drives ...) Hopefully this can get committed some time soon... Regards, Uli