History log of /freebsd-current/share/misc/scsi_modes
Revision Date Author Comments
# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 627c3a8d 25-Jan-2017 Alexander Motin <mav@FreeBSD.org>

Add Timeout and Protect mode page description from MMC-6.

MFC after: 2 weeks


# 54644e21 07-Jan-2017 Alexander Motin <mav@FreeBSD.org>

Make 'camcontrol modepage' support subpages.

MFC after: 2 weeks


# 1cfaa2aa 06-Jan-2017 Alexander Motin <mav@FreeBSD.org>

Add some more mode page fields.

MFC after: 2 weeks


# d53226d7 24-Oct-2015 Enji Cooper <ngie@FreeBSD.org>

Use 't' (bit-field) not 'b' (bit-sized integral type) for describing MRIE (aka
"Method of Reporting Informational Exceptions") in the SCSI mode database.
T10/04-371 revision 2 (revision 4; page 2, table 1) describes it as a
bit-field of 4 bits wide.

1. http://www.t10.org/ftp/t10/document.04/04-371r2.pdf

This a recommit of head@r289913 to fix the original commit message, in
particular:
- I incorrectly claimed that unit change was 'i' -> 't'.
- The spec I reference in this commit is 2 decades newer than the one noted in
r289913. The fields in the SCSI mode database are more complete in the newer
spec, so it'll be easier for someone to decipher this commit if need be
later.
- I screwed up the bug entry in the previous commit message

Pointyhat to: ngie (for botching up r289913)
PR: 200619
Reported by: Michael Baptist
Submitted by: Lars Skodje
Sponsored by: EMC / Isilon Storage Divisionf


# e54187eb 24-Oct-2015 Enji Cooper <ngie@FreeBSD.org>

Revert r289913 -- I botched up the commit message by accident

Will redo the commit shortly


# 93709850 24-Oct-2015 Enji Cooper <ngie@FreeBSD.org>

Use 't' (bits) not 'i' (bytes) for describing MRIE (aka
"Method of Reporting Informational Exceptions") in the SCSI mode database as
the field described in X3T10/94-190 (revision 4; page 2, table 1) [1.] is
4 bits wide, not 4 bytes wide

1. http://ftp.t10.org/ftp/t10/document.94/94-190r4.pdf

Bug 200619
MFC after: 1 week
Reported by: Michael Baptist <mbaptist@isilon.com>
Submitted by: Lars Skodje <lskodje@isilon.com>
Sponsored by: EMC / Isilon Storage Division


# ec05088b 14-Oct-2014 Alexander Motin <mav@FreeBSD.org>

Add LBPERE mode bit definition.


# d151862b 17-Apr-2012 Alexander Motin <mav@FreeBSD.org>

Add some more SCSI mode pages from SPC-4 spec.

MFC after: 1 week


# 1cc052e8 03-Oct-2011 Kenneth D. Merry <ken@FreeBSD.org>

Add descriptor sense support to CAM, and honor sense residuals properly in
CAM.

Desriptor sense is a new sense data format that originated in SPC-3. Among
other things, it allows for an 8-byte info field, which is necessary to
pass back block numbers larger than 4 bytes.

This change adds a number of new functions to scsi_all.c (and therefore
libcam) that abstract out most access to sense data.

This includes a bump of CAM_VERSION, because the CCB ABI has changed.
Userland programs that use the CAM pass(4) driver will need to be
recompiled.

camcontrol.c: Change uses of scsi_extract_sense() to use
scsi_extract_sense_len().

Use scsi_get_sks() instead of accessing sense key specific
data directly.

scsi_modes: Update the control mode page to the latest version (SPC-4).

scsi_cmds.c,
scsi_target.c: Change references to struct scsi_sense_data to struct
scsi_sense_data_fixed. This should be changed to allow the
user to specify fixed or descriptor sense, and then use
scsi_set_sense_data() to build the sense data.

ps3cdrom.c: Use scsi_set_sense_data() instead of setting sense data
manually.

cam_periph.c: Use scsi_extract_sense_len() instead of using
scsi_extract_sense() or accessing sense data directly.

cam_ccb.h: Bump the CAM_VERSION from 0x15 to 0x16. The change of
struct scsi_sense_data from 32 to 252 bytes changes the
size of struct ccb_scsiio, but not the size of union ccb.
So the version must be bumped to prevent structure
mis-matches.

scsi_all.h: Lots of updated SCSI sense data and other structures.

Add function prototypes for the new sense data functions.

Take out the inline implementation of scsi_extract_sense().
It is now too large to put in a header file.

Add macros to calculate whether fields are present and
filled in fixed and descriptor sense data

scsi_all.c: In scsi_op_desc(), allow the user to pass in NULL inquiry
data, and we'll assume a direct access device in that case.

Changed the SCSI RESERVED sense key name and description
to COMPLETED, as it is now defined in the spec.

Change the error recovery action for a number of read errors
to prevent lots of retries when the drive has said that the
block isn't accessible. This speeds up reconstruction of
the block by any RAID software running on top of the drive
(e.g. ZFS).

In scsi_sense_desc(), allow for invalid sense key numbers.
This allows calling this routine without checking the input
values first.

Change scsi_error_action() to use scsi_extract_sense_len(),
and handle things when invalid asc/ascq values are
encountered.

Add a new routine, scsi_desc_iterate(), that will call the
supplied function for every descriptor in descriptor format
sense data.

Add scsi_set_sense_data(), and scsi_set_sense_data_va(),
which build descriptor and fixed format sense data. They
currently default to fixed format sense data.

Add a number of scsi_get_*() functions, which get different
types of sense data fields from either fixed or descriptor
format sense data, if the data is present.

Add a number of scsi_*_sbuf() functions, which print
formatted versions of various sense data fields. These
functions work for either fixed or descriptor sense.

Add a number of scsi_sense_*_sbuf() functions, which have a
standard calling interface and print the indicated field.
These functions take descriptors only.

Add scsi_sense_desc_sbuf(), which will print a formatted
version of the given sense descriptor.

Pull out a majority of the scsi_sense_sbuf() function and
put it into scsi_sense_only_sbuf(). This allows callers
that don't use struct ccb_scsiio to easily utilize the
printing routines. Revamp that function to handle
descriptor sense and use the new sense fetching and
printing routines.

Move scsi_extract_sense() into scsi_all.c, and implement it
in terms of the new function, scsi_extract_sense_len().
The _len() version takes a length (which should be the
sense length - residual) and can indicate which fields are
present and valid in the sense data.

Add a couple of new scsi_get_*() routines to get the sense
key, asc, and ascq only.

mly.c: Rename struct scsi_sense_data to struct
scsi_sense_data_fixed.

sbp_targ.c: Use the new sense fetching routines to get sense data
instead of accessing it directly.

sbp.c: Change the firewire/SCSI sense data transformation code to
use struct scsi_sense_data_fixed instead of struct
scsi_sense_data. This should be changed later to use
scsi_set_sense_data().

ciss.c: Calculate the sense residual properly. Use
scsi_get_sense_key() to fetch the sense key.

mps_sas.c,
mpt_cam.c: Set the sense residual properly.

iir.c: Use scsi_set_sense_data() instead of building sense data by
hand.

iscsi_subr.c: Use scsi_extract_sense_len() instead of grabbing sense data
directly.

umass.c: Use scsi_set_sense_data() to build sense data.

Grab the sense key using scsi_get_sense_key().

Calculate the sense residual properly.

isp_freebsd.h: Use scsi_get_*() routines to grab asc, ascq, and sense key
values.

Calculate and set the sense residual.

MFC after: 3 days
Sponsored by: Spectra Logic Corporation


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# e023b6f9 12-Oct-2004 Bruce M Simpson <bms@FreeBSD.org>

Add mode page 0x1b, "Removable Block Access Capacities". This mode page is
implemented by USB floppy devices using the UFI command set.

Reviewed by: ken, scottl
Source: USB Mass Storage UFI Specification v1.0
MFC after: 2 weeks


# 55626753 24-Feb-2002 Joerg Wunsch <joerg@FreeBSD.org>

Add a definition for mode page 0x2a "CD capabilities and mechanical
status page".


# a1d80830 21-May-2001 Joerg Wunsch <joerg@FreeBSD.org>

Include the Power Control page (0x1a) that is standardized by SCSI-3.
At least some IBM drives support the Standby Condition Timer (i. e.
they allow for an automatic spindown).

Update copyright for 2001. I don't want to insert my name for just
one mode page definition, do people think that `The FreeBSD Project'
is OK?


# da731ada 28-Oct-2000 Matt Jacob <mjacob@FreeBSD.org>

fix minor oops in new data compression page definition


# 14a78063 28-Oct-2000 Matt Jacob <mjacob@FreeBSD.org>

Add 3 SCSI-3 bits for Sequential Access Device Congifuration Page.
Add Data Compression Page (SCSI-3). Add some clarifying comments
at the top of the file that say what the syntax is.


# 7e32b20d 08-Aug-2000 Kelly Yancey <kbyanc@FreeBSD.org>

This is an overhaul of the mode page handling in camcontrol as well as
related patches. These include:
* Mode page editting can be scripted. This involves two
things: first, if stdin is not a tty, changes are read from
stdin rather than invoking $EDITOR. Second, and more
importantly, not all modepage entries must be included in the
change set. This means that camcontrol can now gracefully handle
more intrusive editting from the $EDITOR, including removal or
rearrangement of lines. It also means that you can do stuff
like:
# echo "WCE: 1" | camcontrol modepage da3 -m 8 -e
# newfs /dev/da3
# echo "WCE: 0" | camcontrol modepage da3 -m 8 -e
* Range-checking on user-supplied input values. modeedit.c now
uses the field width specifiers to determine the maximum
allowable value for a field. If the user enters a value larger
than the maximum, it clips the value to the max and warns the
user. This also involved patching cam_cmdparse.c to be more
consistent with regards to the "count" parameter to arg_put
(previously is was the length of strings and 1 for all integral
types). The cam_cdbparse(3) man page was also updated to reflect
the revised semantics.
* In the process, I removed the 64 entry limit on mode pages (not
that we were even close to hitting that limit). This was a nice
side-effect of the other changes.
* Technically, the new mode editting functionality allows editting
of character array entries in mode pages (type 'c' or 'z'),
however since buff_encode doesn't grok them it is currently
useless.
* Camcontrol gained two new options related to mode pages: -l and
-b. The former lists all available mode pages for a given
device. The latter forces mode page display in binary format
(the default when no mode page definition was found in
scsi_modes).
* Added support for mode page names to scsi_modes. Allows names to
be displayed alongside mode numbers in the mode page
listing. Updated scsi_modes to use the new functionality. This
also adds the semicolon into the scsi_modes syntax as an
optional mode page definition terminator. This is needed to name
pages without providing a page format definition.
* Updated scsi_all.h to include a structure describing mode page
headers.
* Added $FreeBSD$ line to scsi_modes.

Inspired by: dwhite
Reviewed by: ken


# 0ee6e540 05-Dec-1997 Tor Egge <tegge@FreeBSD.org>

Add some extra flags in the caching page.

Some firmware versions becomes unreliable when these bits are not preserved,
e.g. ST15150N-0017 breaks if the DISC bit is cleared in the caching page.
This happened by default when editing the page.


# 459cd7dc1 17-Jan-1997 Joerg Wunsch <joerg@FreeBSD.org>

Add page 0x10 (Device Configuration Page for sequential-access devices).


# e2fbcabd 21-Aug-1996 Mike Pritchard <mpp@FreeBSD.org>

Fix a spelling error.


# 647d6579 28-Dec-1995 Joerg Wunsch <joerg@FreeBSD.org>

Add the ``CD-ROM Audio Control Parameter Page''.


# 314a2585 05-May-1995 Peter Dufault <dufault@FreeBSD.org>

New modes file needed for mode editor. "b" can not stand for bit fields.


# 72c59e2d 28-Apr-1995 Peter Dufault <dufault@FreeBSD.org>

Symoblic representation of mode pages