From owner-cvs-src@FreeBSD.ORG Fri Nov 16 16:15:47 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DBD016A418; Fri, 16 Nov 2007 16:15:47 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 051E013C458; Fri, 16 Nov 2007 16:15:46 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id lAGGFTWE033947; Fri, 16 Nov 2007 09:15:29 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <473DC220.6030809@samsco.org> Date: Fri, 16 Nov 2007 09:15:28 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: SXren Schmidt References: <200710260859.l9Q8xPdP099307@repoman.freebsd.org> In-Reply-To: <200710260859.l9Q8xPdP099307@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Fri, 16 Nov 2007 09:15:29 -0700 (MST) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/ata atapi-cd.c atapi-cd.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2007 16:15:47 -0000 SXren Schmidt wrote: > sos 2007-10-26 08:59:24 UTC > > FreeBSD src repository > > Modified files: > sys/dev/ata atapi-cd.c atapi-cd.h > Log: > Update the way we get the mode pages on probe. > > Revision Changes Path > 1.194 +22 -25 src/sys/dev/ata/atapi-cd.c > 1.47 +1 -0 src/sys/dev/ata/atapi-cd.h Just curious, what was the motivation for changing from doing a TUR to doing a MODE_SENSE in g_access? Your new code now relies on what I'd consider is a fairly obscure feature of the SFF-8020i spec, and one that contradicts the MMC and SPC specs that are now used as the normative references for packet commands. There's at least once case, the virtual CDROM emulator in Parallels, that appears not to support this feature, and I'd bet pretty heavily that there are a number of real devices that won't support it either. Without reverting to the old TUR code, an easy way forward is to not fail the g_access command for the MST_FMT_NONE case. This is generally incorrect anyways as it just means that the device can't specifically identify the media though it knows that the media is inserted and valid. Since this constant evaluates to 0x00, ignoring it will also allow devices that don't support it to still work. The only side effect is that devices that don't support it will also not be able to report MST_NO_DISC. These devices will get handled later as a side effect of reporting a bogus media size. Ultimately, I do think that the code needs to go back to using a TUR and interpreting sense, asc, and ascq codes correctly. The code prior to 10/26 looks like it does this, so again I'm curious as to what motivated the change. Scott