summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-10-28 00:31:22 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-10-28 00:31:22 +0000
commit8b9bc3f201869285335e59cc548ce9bc2de2ad9c (patch)
tree00c06a4303953021af06899f0352f8a123681dd9 /nuttx/include
parentb164f177fd439b1ad22f0cd02926114d92cd2349 (diff)
downloadpx4-nuttx-8b9bc3f201869285335e59cc548ce9bc2de2ad9c.tar.gz
px4-nuttx-8b9bc3f201869285335e59cc548ce9bc2de2ad9c.tar.bz2
px4-nuttx-8b9bc3f201869285335e59cc548ce9bc2de2ad9c.zip
Add SCSI read format capacities command -- WinXP needs it
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1088 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/scsi.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/nuttx/include/nuttx/scsi.h b/nuttx/include/nuttx/scsi.h
index e21b7a90d..e8a07a5cd 100644
--- a/nuttx/include/nuttx/scsi.h
+++ b/nuttx/include/nuttx/scsi.h
@@ -14,6 +14,9 @@
* "SCSI Block Commands -2 (SBC-2)," American National Standard
* for Information Technology, November 13, 2004
*
+ * "SCSI Multimedia Commands - 3 (MMC-3)," American National Standard
+ * for Information Technology, November 12, 2001
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -563,6 +566,12 @@
#define SCSICMD_PREVENTMEDIUMREMOVAL_TRANSPORT 0x01 /* Removal prohibited from data transport */
#define SCSICMD_PREVENTMEDIUMREMOVAL_MCHANGER 0x02 /* Removal prohibited from medium changer */
+/* Read format capacities */
+
+#define SCIRESP_RDFMTCAPACITIES_UNFORMATED 0x01 /* Unformatted media */
+#define SCIRESP_RDFMTCAPACITIES_FORMATED 0x02 /* Formatted media */
+#define SCIRESP_RDFMTCAPACITIES_NOMEDIA 0x03 /* No media */
+
/* Read 6 */
#define SCSICMD_READ6_MSLBAMASK 0x1f
@@ -811,6 +820,39 @@ struct scsicmd_preventmediumremoval_s
};
#define SCSICMD_PREVENTMEDIUMREMOVAL_SIZEOF 6
+struct scsicmd_readformatcapcacities_s
+{
+ ubyte opcode; /* 0: 0x23 */
+ ubyte reserved[6]; /* 1-6: Reserved */
+ ubyte alloclen[2]; /* 7-8: Allocation length */
+ ubyte control; /* 9: Control */
+};
+#define SCSICMD_READFORMATCAPACITIES_SIZEOF 10
+
+struct scsiresp_readformatcapacities_s
+{
+ /* Current capacity header */
+
+ ubyte reserved[3]; /* 0-2: Reserved */
+ ubyte listlen; /* 3: Capacity list length */
+
+ /* Current/Maximum Capacity Descriptor (actually a separate structure) */
+
+ ubyte nblocks[4]; /* 4-7: Number of blocks */
+ ubyte type; /* 8: Bits 2-7: Reserved, Bits 0-1: Descriptor type */
+ ubyte blocklen[3]; /* 9-11: Block length */
+};
+#define SCSIRESP_READFORMATCAPACITIES_SIZEOF 12
+#define SCSIRESP_CURRCAPACITYDESC_SIZEOF 8
+
+struct scsiresp_formattedcapacitydesc_s
+{
+ ubyte nblocks[4]; /* 0-3: Number of blocks */
+ ubyte type; /* 4: Bits 2-7: Type, bits 0-1, reserved */
+ ubyte param[3]; /* 5-7: Type dependent parameter */
+};
+#define SCSIRESP_FORMATTEDCAPACITYDESC_SIZEOF 8
+
struct scsicmd_readcapacity10_s
{
ubyte opcode; /* 0: 0x25 */