From owner-freebsd-scsi@FreeBSD.ORG Fri Sep 23 15:08:43 2011 Return-Path: Delivered-To: scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF4041065810; Fri, 23 Sep 2011 15:08:43 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 62C3D8FC18; Fri, 23 Sep 2011 15:08:42 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id p8NEue3I006337; Fri, 23 Sep 2011 16:56:40 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id p8NEuehx006336; Fri, 23 Sep 2011 16:56:40 +0200 (CEST) (envelope-from marius) Date: Fri, 23 Sep 2011 16:56:40 +0200 From: Marius Strobl To: "Kenneth D. Merry" Message-ID: <20110923145640.GA6316@alchemy.franken.de> References: <20110922193305.GA24939@nargothrond.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110922193305.GA24939@nargothrond.kdm.org> User-Agent: Mutt/1.4.2.3i Cc: current@freebsd.org, scsi@freebsd.org Subject: Re: SCSI descriptor sense changes, testing needed X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2011 15:08:44 -0000 On Thu, Sep 22, 2011 at 01:33:05PM -0600, Kenneth D. Merry wrote: > > I have attached a set of patches against head that implement SCSI > descriptor sense support for CAM. > > Descriptor sense is a new sense (SCSI error) format introduced in the SPC-3 > spec in 2006. FreeBSD doesn't currently support it. > > Seagate's new 3TB SAS drives come with descriptor sense enabled by default, > and it's possible that other newer drives do as well. Because all the > sense key, additional sense code, and additional sense code qualifier > fields are in different places, the CAM error recovery code will not do the > right thing when it gets descriptor sense. > > These patches do bump up the size of struct scsi_sense_data, and so I have > incremented CAM_VERSION as well. I have discussed this with re@, and it > looks like we'll be putting the changes in before 9.0, so it ships with > support for newer SCSI devices. Hi Ken, as far as I understand this also requires consumers of scsi_sense_data and SSD_FULL_SIZE etc in userland to be recompiled. So while you are at breaking the API and ABI of CAM anyway, could you please take the opportunity to change CAM_XPT_PATH_ID and CAM_BUS_WILDCARD to not use the same value so incorrect uses will fail? Currently, there seems to be a lot of confusion when to use which one, including camcontrol(8) just encoding this as -1: /* * We don't want to rescan or reset the xpt bus. * See above. */ if ((int)bus_result->path_id == -1) continue; Moreover, AFAICT CAM_XPT_PATH_ID corresponds to what the ANSI CAM Draft refers to as "XPT Path ID" and specifies a value of 0xff for. Marius