From owner-freebsd-current@FreeBSD.ORG Sun Aug 9 19:11:47 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 B0F7B106564A; Sun, 9 Aug 2009 19:11:47 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id 6F8548FC26; Sun, 9 Aug 2009 19:11:47 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 8FD531E0030E; Sun, 9 Aug 2009 21:11:46 +0200 (CEST) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.3/8.14.3) with ESMTP id n79J4rtI004915; Sun, 9 Aug 2009 21:04:53 +0200 (CEST) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.3/8.14.3/Submit) id n79J4rOM004914; Sun, 9 Aug 2009 21:04:53 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Sun, 9 Aug 2009 21:04:52 +0200 To: Juergen Lock , freebsd-current@freebsd.org, mav@freebsd.org Message-ID: <20090809190452.GA4740@triton8.kn-bremen.de> References: <20090806184510.GA12039@triton.kn-bremen.de> <20090809172057.GD78940@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20090809172057.GD78940@acme.spoerlein.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: 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 19:11:47 -0000 On Sun, Aug 09, 2009 at 07:20:57PM +0200, Ulrich Spörlein wrote: > 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. Cool, I'm glad it helped. :) > I have mentioned > this in the past, but due to the esoteric nature of this problem failed > to attract enough attention. > Heh I know _that_ feeling... > 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 ...) > Yeah, good to know! > Hopefully this can get committed some time soon... > *nod* Juergen