Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Sep 2011 16:56:40 +0200
From:      Marius Strobl <marius@alchemy.franken.de>
To:        "Kenneth D. Merry" <ken@freebsd.org>
Cc:        current@freebsd.org, scsi@freebsd.org
Subject:   Re: SCSI descriptor sense changes, testing needed
Message-ID:  <20110923145640.GA6316@alchemy.franken.de>
In-Reply-To: <20110922193305.GA24939@nargothrond.kdm.org>
References:  <20110922193305.GA24939@nargothrond.kdm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110923145640.GA6316>