From owner-freebsd-current@FreeBSD.ORG Fri Jun 24 13:08:31 2011 Return-Path: Delivered-To: current@FreeBSD.ORG Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCE011065673; Fri, 24 Jun 2011 13:08:31 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 385068FC12; Fri, 24 Jun 2011 13:08:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.4/8.14.4) with ESMTP id p5OD8TmE071276; Fri, 24 Jun 2011 17:08:29 +0400 (MSD) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id p5OD8SNj071275; Fri, 24 Jun 2011 17:08:29 +0400 (MSD) (envelope-from ache) Date: Fri, 24 Jun 2011 17:08:27 +0400 From: Andrey Chernov To: "Justin T. Gibbs" Message-ID: <20110624130826.GA71185@vniz.net> Mail-Followup-To: Andrey Chernov , "Justin T. Gibbs" , "Kenneth D. Merry" , Kostik Belousov , Eir Nym , current@FreeBSD.ORG, will@FreeBSD.ORG References: <4DFEAD4F.1040603@FreeBSD.org> <20110620070222.GA74009@vniz.net> <20110620080146.GF48734@deviant.kiev.zoral.com.ua> <20110620114656.GA83524@vniz.net> <20110621161719.GA16166@nargothrond.kdm.org> <20110621204934.GB9877@vniz.net> <20110622035404.GA38834@nargothrond.kdm.org> <20110622041325.GA13754@vniz.net> <20110622200919.GA72504@nargothrond.kdm.org> <4E03FDFD.70203@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E03FDFD.70203@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Kostik Belousov , Eir Nym , "Kenneth D. Merry" , current@FreeBSD.ORG, will@FreeBSD.ORG Subject: Re: Exactly that commit (was Re: Latest -current 100% hang at the late boot stage) 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: Fri, 24 Jun 2011 13:08:31 -0000 On Thu, Jun 23, 2011 at 11:01:17PM -0400, Justin T. Gibbs wrote: > To test this theory, apply the following patch. I do not know if this > is safe for changer devices, but I will review the changer code if this > patch fixes ache's problem. I don't have changers. One of the plain ATA DVDs is read-only (cd0, which is not detected now) and another one is read-write (cd1, detected). I try the patch but nothing is changed in the picture. cd0 still not detected, xpt_thrd sleep in ccb_scan and g_event sleep in caplck. Here is probe from the old kernel which works, just in case, nothing unusual with it: cd0 at ata2 bus 0 scbus2 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: 100.000MB/s transfers (UDMA5, ATAPI 12bytes, PIO 65534bytes) cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed Unplugging power from it allows to boot normally. Inserting media does not help too. > --- //depot/vendor/FreeBSD/head/sys/cam/scsi/scsi_cd.c 2011-05-07 10:06:43.000000000 -0600 > +++ /home/justing/perforce/vendor/FreeBSD/head/sys/cam/scsi/scsi_cd.c 2011-05-07 10:06:43.000000000 -0600 > @@ -687,6 +687,10 @@ > else > softc->minimum_command_size = 6; > > + /* > + * Refcount and block open attempts until we are setup > + * Can't block > + */ > (void)cam_periph_hold(periph, PRIBIO); > cam_periph_unlock(periph); > /* > @@ -747,7 +751,6 @@ > softc->disk->d_hba_subdevice = cpi.hba_subdevice; > disk_create(softc->disk, DISK_VERSION); > cam_periph_lock(periph); > - cam_periph_unhold(periph); > > /* > * Add an async callback so that we get > @@ -972,12 +975,6 @@ > > cdregisterexit: > > - /* > - * Refcount and block open attempts until we are setup > - * Can't block > - */ > - (void)cam_periph_hold(periph, PRIBIO); > - > if ((softc->flags & CD_FLAG_CHANGER) == 0) > xpt_schedule(periph, CAM_PRIORITY_DEV); > else > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" -- http://ache.vniz.net/