From owner-freebsd-stable@freebsd.org Mon Feb 13 19:39:31 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60E80CDDEEB for ; Mon, 13 Feb 2017 19:39:31 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32DD113CC for ; Mon, 13 Feb 2017 19:39:30 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.14.9/8.14.9) with ESMTP id v1DJds48010309 for ; Mon, 13 Feb 2017 11:40:00 -0800 (PST) (envelope-from bsd-lists@bsdforge.com) To: In-Reply-To: <4d398907-f6ed-e212-824e-f6f8e5aa6b88@zyxst.net> References: <4d398907-f6ed-e212-824e-f6f8e5aa6b88@zyxst.net> From: "Chris H" Subject: Re: how can I make freebsd wait for usb to become active? Or delay mountroot? Date: Mon, 13 Feb 2017 11:40:00 -0800 Content-Type: text/plain; charset=UTF-8; format=fixed MIME-Version: 1.0 Message-id: <858090ca400d6f91c461b1d62c94edab@ultimatedns.net> Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2017 19:39:31 -0000 On Mon, 13 Feb 2017 19:00:39 +0000 tech-lists wrote > Hello stable@, > > system: 11-stable r313553 > > In the kernel there is an option for scsi delay. It should be enough to bump the kern.cam.scsi_delay= a couple hundred at a time, until you find the "sweet spot". You might also try the autoboot_delay= option instead. It might give your USB port enough time to come ready. > Is there also one for > usb? Perhaps not in the kernel but elsewhere. I can't find it. > > The problem is seen especially where the bootable device is usb. The > boot process starts and dumps me at mountroot where I wait for a short > time until the usb stick is properly detected (bright white writing at > the console). The usb stick is plugged into a usb3 port. For example: > > [snip] > > usbus0: 5.0Gbps Super Speed USB v3.0 > usbus1: 12Mbps Full Speed USB v1.0 > usbus2: 480Mbps High Speed USB v2.0 > usbus3: 12Mbps Full Speed USB v1.0 > ugen0.1: <0x1022 XHCI root HUB> at usbus0 > uhub0: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0 > ugen1.1: at usbus1 > uhub1: on usbus1 > ugen2.1: at usbus2 > uhub2: on usbus2 > ugen3.1: at usbus3 > uhub3: on usbus3 > usbus4: 480Mbps High Speed USB v2.0 > ugen4.1: at usbus4 > uhub4: on usbus4 > acpi_tz0: _CRT value is absurd, ignored (255.1C) > ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 > ada0: ACS-2 ATA SATA 3.x device > cd0 at ahcich1 bus 0 scbus1 target 0 lun 0 > cd0: Removable CD-ROM SCSI device > cd0: Serial Number 1415TP277450E0H6H > cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes) > cd0: Attempt to query device size failed: NOT READY, Medium not present > - tray open > ada0: Serial Number JA1006103G0ALV > ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) > ada0: Command Queueing enabled > ada0: 953869MB (1953525168 512 byte sectors) > SMP: AP CPU #3 Launched! > SMP: AP CPU #1 Launched! > SMP: AP CPU #2 Launched! > Timecounter "TSC" frequency 1597045198 Hz quality 1000 > Trying to mount root from ufs:/dev/da0p2 [rw]... > uhub3: 5 ports with 5 removable, self powered > uhub1: 5 ports with 5 removable, self powered > uhub0: 4 ports with 4 removable, self powered > Root mount waiting for: usbus4 usbus2 usbus0 > ugen0.2: at usbus0 > umass0 on uhub0 > umass0: > on usbus0 > umass0: SCSI over Bulk-Only; quirks = 0x8100 > umass0:3:0: Attached to scbus3 > uhub2: 5 ports with 5 removable, self powered > uhub4: 5 ports with 5 removable, self powered > ugen0.3: at usbus0 > ukbd0 on uhub0 > ukbd0: on usbus0 > kbd2 at ukbd0 > Root mount waiting for: usbus4 > ugen4.2: at usbus4 > mountroot: waiting for device /dev/da0p2... > Mounting from ufs:/dev/da0p2 failed with error 19. > > Loader variables: > vfs.root.mountfrom=ufs:/dev/da0p2 > vfs.root.mountfrom.options=rw > > Manual root filesystem specification: > : [options] > Mount using filesystem > and with the specified (optional) option list. > > eg. ufs:/dev/da0s1a > zfs:tank > cd9660:/dev/cd0 ro > (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) > > ? List valid disk boot devices > . Yield 1 second (for background tasks) > Abort manual input > > mountroot> Trying to mount root from ufs:/dev/da0p2 []... > mountroot: waiting for device /dev/da0p2... > Mounting from ufs:/dev/da0p2 failed with error 19. > > mountroot> > > [snip] > > Then this happens: > > (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 > (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (probe0:umass-sim0:0:0:0): Retrying command > da0 at umass-sim0 bus 0 scbus3 target 0 lun 0 > da0: < USB DISK 3.0 PMAP> Removable Direct Access SPC-4 SCSI device > da0: Serial Number 070B4722335D3288 > da0: 400.000MB/s transfers > da0: 30176MB (61800448 512 byte sectors) > da0: quirks=0x3 > > so now at the mountroot prompt I enter ufs:/dev/da0p2 (which is a value > that mountroot already had) and carry on booting: > > mountroot> Trying to mount root from ufs:/dev/da0p2 []... > re0: link state changed to DOWN > re0: link state changed to UP > ums0 on uhub0 > ums0: on usbus0 > ums0: 16 buttons and [XYZT] coordinates ID=2 > uhid0 on uhub0 > uhid0: on usbus0 > > [...] > > The same sort of thing happens on an 11-stable r313043 desktop, only > this time I'm not booting from usb. The system comes up, I get a login > prompt, then five or ten seconds later usb wakes up having detected the > usb3 external HD. > > How can I fix this? > > thanks, > -- > J. > _______________________________________________ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"