From owner-freebsd-stable@FreeBSD.ORG Wed Apr 24 06:28:05 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 C960390D for ; Wed, 24 Apr 2013 06:28:05 +0000 (UTC) (envelope-from jdc@koitsu.org) Received: from qmta07.emeryville.ca.mail.comcast.net (qmta07.emeryville.ca.mail.comcast.net [IPv6:2001:558:fe2d:43:76:96:30:64]) by mx1.freebsd.org (Postfix) with ESMTP id AFBB11133 for ; Wed, 24 Apr 2013 06:28:05 +0000 (UTC) Received: from omta20.emeryville.ca.mail.comcast.net ([76.96.30.87]) by qmta07.emeryville.ca.mail.comcast.net with comcast id TiSR1l0021smiN4A7iU5pj; Wed, 24 Apr 2013 06:28:05 +0000 Received: from koitsu.strangled.net ([67.180.84.87]) by omta20.emeryville.ca.mail.comcast.net with comcast id TiU41l00S1t3BNj8giU4df; Wed, 24 Apr 2013 06:28:05 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 9292873A1B; Tue, 23 Apr 2013 23:28:04 -0700 (PDT) Date: Tue, 23 Apr 2013 23:28:04 -0700 From: Jeremy Chadwick To: freebsd-stable@freebsd.org Subject: Re: ada(4) and ahci(4) quirk printing Message-ID: <20130424062804.GA2618@icarus.home.lan> References: <20130422051452.GA2148@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130422051452.GA2148@icarus.home.lan> 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=1366784885; bh=LEm8t54wQfoU6gtpO2oF7gHm9fEd7EL+5diuO4I2cMo=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=gnk1HbSKdV1Smg9psxA8HNa28GUB8iXE6Z8ehj/Z4Lv12kr6ysPWLlioBCptRyLuU GT8uSLwJ8qx2ZZ73lAokulF01FT94X+tv6hOjQroNHV6Qt+dLP7QTJvfq6l7e73qZZ XXZw0pVxwQI5L5Tsc3HN+YfGl5kHgovA52cn+QMfSPGGQRtuvJWR58T+WoTEhHwhji iG4dxzevO9u9vf199yAFpflGMu+hecA4cohxcai0NGMmsgJ+iVSc7LuDErPM+/K/Pk BrXpMj23aHoiXm9li9r1wE6bLOeg5ErF76pW8ryCafESw9e6116OsTcZAhxAmy8t8e 9EyyQoCXCW08Q== Cc: Alexander Motin , Kenneth Merry 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: Wed, 24 Apr 2013 06:28:05 -0000 > 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, > > 2. Not sure if loader.conf(5) forced-quirks would show up here or not, > > 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!"). > > P.S. -- I know the printf() method with %b looks a weird, but it's > easier than allocating some memory for a variable-length buffer and a > case statement + strcat(), or risk calling printf() for each quirks > repeatedly (re: interspersed kernel output). Follow-up to this: I've updated the patches on my site (ada(4) and ahci(4) do the same thing as before but I moved the quirk printing code into a subroutine), in addition to adding quirk printing bits for the following drivers: * cd(4) (SCSI CD/DVD drives) * ch(4) (SCSI tape/media changer/arms) * da(4) (SCSI disks, also includes USB disks but quirks here are separate from umass(4) quirks) * sa(4) (SCSI tape drives) da(4) was a request from another developer. I was able to test da(4) and cd(4), but not ch(4) and sa(4) due to lack of devices. (I do have a 2940UW SCSI controller and an AIT tape drive laying around to test sa(4) but I can't be bothered to find the box/unpack it and deal with all the cabling) If anyone has ch(4) or sa(4) devices that have quirks and can test the patches + provide feedback, I'd appreciate it. Remember: quirks are only printed if their are defined quirks for the device. -- | 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 |