From owner-freebsd-stable@FreeBSD.ORG Tue Apr 23 09:26:04 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A54D7A36 for ; Tue, 23 Apr 2013 09:26:04 +0000 (UTC) (envelope-from jdc@koitsu.org) Received: from qmta01.emeryville.ca.mail.comcast.net (qmta01.emeryville.ca.mail.comcast.net [IPv6:2001:558:fe2d:43:76:96:30:16]) by mx1.freebsd.org (Postfix) with ESMTP id 8B8DF1205 for ; Tue, 23 Apr 2013 09:26:04 +0000 (UTC) Received: from omta24.emeryville.ca.mail.comcast.net ([76.96.30.92]) by qmta01.emeryville.ca.mail.comcast.net with comcast id TMLQ1l00B1zF43QA1MS3SS; Tue, 23 Apr 2013 09:26:03 +0000 Received: from koitsu.strangled.net ([67.180.84.87]) by omta24.emeryville.ca.mail.comcast.net with comcast id TMS31l0081t3BNj8kMS3nX; Tue, 23 Apr 2013 09:26:03 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id DCA5173A33; Tue, 23 Apr 2013 02:26:02 -0700 (PDT) Date: Tue, 23 Apr 2013 02:26:02 -0700 From: Jeremy Chadwick To: Alexander Motin Subject: Re: ada(4) and ahci(4) quirk printing Message-ID: <20130423092602.GA58831@icarus.home.lan> References: <20130422051452.GA2148@icarus.home.lan> <51763BF9.2000506@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51763BF9.2000506@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1366709163; bh=FZD9/V9QgLKCj6Jv6apBEr2ca9iTTg2KAqNpREApgnM=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=mSv81m7iFdeE8EGO9koreZKJHhNvIlpJHPJJchoWk3Y4aV1kvMQ/39m1b9jmY5Cms N9SexB62gOsKFsOWdl9q/pg7fzik3uBH+6mg4L6iqFAUxOFJqg9Ou9vNYoA3bUUM5C Co/wDtjS29be+fVsnfe0J1CnHU7AatnPZ3mgNIbaiLMrmZrd/0qCANxFvoJ0eFBC+z IdXHG1K/1p2QXkN37nny89zsrwJE0F6LDg8prL6EEhdkK95zxWytSf6q4/D1H0f9ZB EhQpyVJnPrHRiVdrIksXThmCmVAIRjlaRRQmh2IdvEScTIXLM+WwHw9nn4SVzTEOIR kH8xPrE8Hyxeg== Cc: Kenneth Merry , freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2013 09:26:04 -0000 On Tue, Apr 23, 2013 at 10:44:57AM +0300, Alexander Motin wrote: > On 22.04.2013 08:14, Jeremy Chadwick wrote: > >I've written the following patches and done the following testing (see > >the results.*.txt files): > > > >http://jdc.koitsu.org/freebsd/quirk_printing/ > > > >Important: these are against stable/9 r249715. > > > >Folks are welcome to try these; I've tested about as best as I can. > > > >Questions/comments for Alexander and Kenneth: > > > >1. I'm not sure if the location of where I added the printf() code is > >correct or not, > > It seems fine for me. > > >2. Not sure if loader.conf(5) forced-quirks would show up here or not, > > As I see, they will. > > >3. It would be nice to have the same for SCSI da(4). I took a stab at > >this but the printing code I wrote never got called (or the quirks entry > >I added wasn't right, not sure which), > > > >4. I strongly believe quirk printing should be shown *without* verbose > >booting. I say this because I noticed some of the CAPAB printf()s only > >get shown if bootverbose is true. In fact, it's what prompted me to > >open PR 178040 ("My Intel 320 and 510-series SSDs don't show 4K quirks, > >yet advertise 512 logical and physical in IDENTIFY?! PR time!"). > > Let me disagree. bootverbose keeps dmesg readable for average user, > while quirks are specific driver workarounds and their names may > confuse more then really help. If every driver print its quirks, > dmesg would be two times bigger. There is bootverbose for it. I'm willing to bend on this assuming that userland has a way to display the quirks. I've already had one user contact me off-list stating that displaying of quirks is useful to them, but *without* bootverbose (because bootverbose shows too much information for them to have to sift through). And display of quirks (or in this case) was what prompted me to create PR 178040, since I had just *assumed* FreeBSD had 4K quirks in place for both models of SSDs. I think sysctl would be an ideal place for this. Is it possible to export active device quirks to sysctl (say kern.cam.ada.X.quirks), read-only, and preferably as a string (same printf() style used)? Or does that introduce complexities? If we can't reach an agreement, I'm happy to wrap the relevant bits with an "if (bootverbose)", but I really feel users should have some way to see this information outside of bootverbose. -- | Jeremy Chadwick jdc@koitsu.org | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |