summaryrefslogtreecommitdiffstats
path: root/share/misc/scsi_modes
diff options
context:
space:
mode:
authorkbyanc <kbyanc@FreeBSD.org>2000-08-08 06:24:17 +0000
committerkbyanc <kbyanc@FreeBSD.org>2000-08-08 06:24:17 +0000
commit8f0afc6b0aa752cb23dfcf91f2285bf6c825405d (patch)
tree034cb732a278c59e0304f2f93947626f19ea5385 /share/misc/scsi_modes
parent18a0d975369707cba8c9deeb3de4db05dafb9487 (diff)
downloadFreeBSD-src-8f0afc6b0aa752cb23dfcf91f2285bf6c825405d.zip
FreeBSD-src-8f0afc6b0aa752cb23dfcf91f2285bf6c825405d.tar.gz
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
Diffstat (limited to 'share/misc/scsi_modes')
-rw-r--r--share/misc/scsi_modes42
1 files changed, 18 insertions, 24 deletions
diff --git a/share/misc/scsi_modes b/share/misc/scsi_modes
index d1359c8..1801b50 100644
--- a/share/misc/scsi_modes
+++ b/share/misc/scsi_modes
@@ -27,13 +27,14 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-
+#
+# $FreeBSD$
+#
# The ordering is alphabetical by page name, as it appears in the SCSI spec.
# ALL DEVICE TYPES
-# Control mode page:
-0x0a {
+0x0a "Control Mode Page" {
{Reserved} *t7
{RLEC} t1
{Queue Algorithm Modifier} t4
@@ -49,8 +50,7 @@
{Ready AEN Holdoff Period} i2
}
-# Disconnect-Reconnect Page:
-0x02 {
+0x02 "Disconnect-Reconnect Page" {
{Buffer Full Ratio} i1
{Buffer Empty Ratio} i1
{Bus Inactivity Limit} i2
@@ -64,8 +64,7 @@
{Reserved} *i1
}
-# Peripheral Device Page:
-0x09 {
+0x09 "Peripheral Device Page" {
{Interface Identifier} i2
{Reserved} *i1
{Reserved} *i1
@@ -75,8 +74,7 @@
# DIRECT ACCESS DEVICES
-# Caching page:
-0x08 {
+0x08 "Caching Page" {
{IC} t1
{ABPF} t1
{CAP} t1
@@ -93,8 +91,7 @@
{Maximum Pre-fetch Ceiling} i2
}
-# Flexible disk page:
-0x05 {
+0x05 "Flexible Disk Page" {
{Transfer rate} i2
{Number of heads} i1
{Sectors per track} i1
@@ -125,8 +122,7 @@
{Reserved} *i1
}
-# Format device page:
-0x03 {
+0x03 "Format Device Page" {
{Tracks per Zone} i2
{Alternate Sectors per Zone} i2
{Alternate Tracks per Zone} i2
@@ -143,8 +139,7 @@
{Reserved} *t4
}
-# Medium types supported page:
-0x0b {
+0x0b "Medium Types Supported Page" {
{Reserved} *i1
{Reserved} *i1
{Medium type one supported} i1
@@ -154,9 +149,9 @@
}
# Notch page (0x0c)
+0x0c "Notch and Partition Page";
-# Read-Write Error Recovery Page
-0x01 {
+0x01 "Read-Write Error Recovery Page" {
{AWRE (Auto Write Reallocation Enbld)} t1
{ARRE (Auto Read Reallocation Enbld)} t1
{TB (Transfer Block)} t1
@@ -175,8 +170,7 @@
{Recovery Time Limit} i2
}
-# Rigid Disk Drive Geometry Page
-0x04 {
+0x04 "Rigid Disk Drive Geometry Page" {
{Number of Cylinders} i3
{Number of Heads} i1
{Starting Cylinder-Write Precompensation} i3
@@ -192,8 +186,7 @@
{Reserved} *i1
}
-# Verify Error Recovery Page
-0x07 {
+0x07 "Verify Error Recovery Page" {
{Reserved} *t4
{EER} t1
{PER} t1
@@ -209,8 +202,7 @@
{Verify Recovery Time Limit} i2
}
-# CD-ROM Audio Control Parameters Page
-0x0E {
+0x0E "CD-ROM Audio Control Parameters Page" {
{Reserved} *t5
{Immed} t1
{SOTC} t1
@@ -246,7 +238,7 @@
{Data Buffer Recovery} t1
{Block Identifiers Support} t1
{Report Setmarks} t1
- {AAutomatic Velocity Control} t1
+ {Automatic Velocity Control} t1
{Stop on Consecutive Filemarks} t2
{Recover Buffer Order} t1
{Report Early-Warning} t1
@@ -259,3 +251,5 @@
{Select Data Compression Algorithm} i1
{Reserved} *i1
}
+
+0x00 "Vendor-Specific";
OpenPOWER on IntegriCloud