Print this page
cstyle sort of updates
7127  remove -Wno-missing-braces from Makefile.uts


 388 #define SSVC_ACTION_GET_TIMESTAMP               0x0f
 389 
 390 /*
 391  * Group 5 Service Actions for Maintenance Out (12)
 392  */
 393 #define SSVC_ACTION_SET_DEVICE_IDENTIFIER       0x06
 394 #define SSVC_ACTION_SET_PRIORITY                0x0e
 395 #define SSVC_ACTION_SET_TARGET_PORT_GROUPS      0x0a
 396 #define SSVC_ACTION_SET_TIMESTAMP               0x0f
 397 
 398 /*
 399  * Group 5 Service Actions for Service Action In (12)
 400  */
 401 #define SSVC_ACTION_READ_MEDIA_SERIAL           0x01
 402 /*
 403  * scsi_key_strings for SCMD_ definitions
 404  *      NOTE: see SCSI_CMDS_KEY_STRINGS_CDIO in cdio.h for additional
 405  *      command-to-string translations.
 406  */
 407 #define SCSI_CMDS_KEY_STRINGS                                           \
 408 /* 0x00 */ SCMD_TEST_UNIT_READY,        "test_unit_ready",              \
 409 /* 0x01 */ SCMD_REWIND |                                                \
 410                 SCMD_REZERO_UNIT,       "rezero/rewind",                \
 411 /* 0x03 */ SCMD_REQUEST_SENSE,          "request_sense",                \
 412 /* 0x04 */ SCMD_FORMAT,                 "format",                       \
 413 /* 0x05 */ SCMD_READ_BLKLIM,            "read_block_limits",            \
 414 /* 0x07 */ SCMD_REASSIGN_BLOCK,         "reassign",                     \
 415 /* 0x08 */ SCMD_READ |                                                  \
 416                 SCMD_RECEIVE,           "read",                         \
 417 /* 0x0a */ SCMD_PRINT |                                                 \
 418                 SCMD_SEND |                                             \
 419                 SCMD_WRITE,             "write",                        \
 420 /* 0x0b */ SCMD_SEEK |                                                  \
 421                 SCMD_SLEW_PRINT |                                       \
 422                 SCMD_TRK_SEL,           "seek",                         \
 423 /* 0x0f */ SCMD_READ_REVERSE,           "read_reverse",                 \
 424 /* 0x10 */ SCMD_WRITE_FILE_MARK |                                       \
 425                 SCMD_FLUSH_PRINT_BUF,   "write_file_mark",              \
 426 /* 0x11 */ SCMD_SPACE,                  "space",                        \
 427 /* 0x12 */ SCMD_INQUIRY,                "inquiry",                      \
 428 /* 0x13 */ SCMD_VERIFY_G0,              "verify",                       \
 429 /* 0x14 */ SCMD_RECOVER_BUF,            "recover_buffer_data",          \
 430 /* 0x15 */ SCMD_MODE_SELECT,            "mode_select",                  \
 431 /* 0x16 */ SCMD_RESERVE,                "reserve",                      \
 432 /* 0x17 */ SCMD_RELEASE,                "release",                      \
 433 /* 0x18 */ SCMD_COPY,                   "copy",                         \
 434 /* 0x19 */ SCMD_ERASE,                  "erase_tape",                   \
 435 /* 0x1a */ SCMD_MODE_SENSE,             "mode_sense",                   \
 436 /* 0x1b */ SCMD_LOAD |                                                  \
 437                 SCMD_START_STOP |                                       \
 438                 SCMD_STOP_PRINT,        "load/start/stop",              \
 439 /* 0x1c */ SCMD_GDIAG,                  "get_diagnostic_results",       \
 440 /* 0x1d */ SCMD_SDIAG,                  "send_diagnostic_command",      \
 441 /* 0x1e */ SCMD_DOORLOCK,               "door_lock",                    \
 442 /* 0x23 */ SCMD_READ_FORMAT_CAP,        "read_format_capacity",         \
 443 /* 0x25 */ SCMD_READ_CAPACITY,          "read_capacity",                \
 444 /* 0x28 */ SCMD_READ_G1,                "read(10)",                     \
 445 /* 0x2a */ SCMD_WRITE_G1,               "write(10)",                    \
 446 /* 0x2b */ SCMD_SEEK_G1 |                                               \
 447                 SCMD_LOCATE,            "seek(10)",                     \
 448 /* 0x2e */ SCMD_WRITE_VERIFY,           "write_verify",                 \
 449 /* 0x2f */ SCMD_VERIFY,                 "verify(10)",                   \
 450 /* 0x30 */ SCMD_SEARCH_HIGH,            "search_data_high",             \
 451 /* 0x31 */ SCMD_SEARCH_EQUAL,           "search_data_equal",            \
 452 /* 0x32 */ SCMD_SEARCH_LOW,             "search_data_low",              \
 453 /* 0x33 */ SCMD_SET_LIMITS,             "set_limits",                   \
 454 /* 0x34 */ SCMD_READ_POSITION,          "read_position",                \
 455 /* 0x35 */ SCMD_SYNCHRONIZE_CACHE,      "synchronize_cache",            \
 456 /* 0x37 */ SCMD_READ_DEFECT_LIST,       "read_defect_data",             \
 457 /* 0x39 */ SCMD_COMPARE,                "compare",                      \
 458 /* 0x3a */ SCMD_COPY_VERIFY,            "copy_verify",                  \
 459 /* 0x3b */ SCMD_WRITE_BUFFER,           "write_buffer",                 \
 460 /* 0x3c */ SCMD_READ_BUFFER,            "read_buffer",                  \
 461 /* 0x3e */ SCMD_READ_LONG,              "read_long",                    \
 462 /* 0x3f */ SCMD_WRITE_LONG,             "write_long",                   \
 463 /* 0x41 */ SCMD_WRITE_SAME_G1,          "write_same(10)",               \
 464 /* 0x42 */ SCMD_UNMAP,                  "unmap",                        \
 465 /* 0x44 */ SCMD_REPORT_DENSITIES |                                      \
 466                 /* SCMD_READ_HEADER (from cdio.h) | */                  \
 467                 0,                      "report_densities/read_header", \
 468 /* 0x46 */ SCMD_GET_CONFIGURATION,      "get_configuration",            \
 469 /* 0x4c */ SCMD_LOG_SELECT_G1,          "log_select",                   \
 470 /* 0x4d */ SCMD_LOG_SENSE_G1,           "log_sense",                    \
 471 /* 0x55 */ SCMD_MODE_SELECT_G1,         "mode_select(10)",              \
 472 /* 0x56 */ SCMD_RESERVE_G1,             "reserve(10)",                  \
 473 /* 0x57 */ SCMD_RELEASE_G1,             "release(10)",                  \
 474 /* 0x5a */ SCMD_MODE_SENSE_G1,          "mode_sense(10)",               \
 475 /* 0x5e */ SCMD_PERSISTENT_RESERVE_IN,  "persistent_reserve_in",        \
 476 /* 0x5f */ SCMD_PERSISTENT_RESERVE_OUT, "persistent_reserve_out",       \
 477 /* 0x80 */ SCMD_WRITE_FILE_MARK_G4,     "write_file_mark(16)",          \
 478 /* 0x81 */ SCMD_READ_REVERSE_G4,        "read_reverse(16)",             \
 479 /* 0x83 */ SCMD_EXTENDED_COPY,          "extended_copy",                \
 480 /* 0x88 */ SCMD_READ_G4,                "read(16)",                     \
 481 /* 0x8a */ SCMD_WRITE_G4,               "write(16)",                    \
 482 /* 0x8c */ SCMD_READ_ATTRIBUTE,         "read_attribute",               \
 483 /* 0x8d */ SCMD_WRITE_ATTRIBUTE,        "write_attribute",              \
 484 /* 0x8e */ SCMD_WRITE_VERIFY_G4,        "write_verify(16)",             \
 485 /* 0x8f */ SCMD_VERIFY_G4,              "verify(16)",                   \
 486 /* 0x91 */ SCMD_SPACE_G4,               "space(16)",                    \
 487 /* 0x92 */ SCMD_LOCATE_G4,              "locate(16)",                   \
 488 /* 0x92 */ SCMD_WRITE_SAME_G4,          "write_same(16)",               \
 489 /* 0x9e */ SCMD_SVC_ACTION_IN_G4,       "service_action_in(16)",        \
 490 /* 0x9f */ SCMD_SVC_ACTION_OUT_G4,      "service_action_out(16)",       \
 491 /* 0xa0 */ SCMD_REPORT_LUNS,            "report_luns",                  \
 492 /* 0xa2 */ SCMD_SECURITY_PROTO_IN,      "security_protocol_in",         \
 493 /* 0xa3 */ SCMD_MAINTENANCE_IN,         "maintenance_in",               \
 494 /* 0xa4 */ SCMD_MAINTENANCE_OUT,        "maintenance_out",              \
 495 /* 0xa8 */ SCMD_READ_G5,                "read(12)",                     \
 496 /* 0xa9 */ SCMD_SVC_ACTION_OUT_G5,      "service_action_out(12)",       \
 497 /* 0xaa */ SCMD_WRITE_G5,               "write(12)",                    \
 498 /* 0xab */ SCMD_SVC_ACTION_IN_G5,       "service_action_in(12)",        \
 499 /* 0xac */ SCMD_GET_PERFORMANCE,        "get_performance",              \
 500 /* 0xAE */ SCMD_WRITE_VERIFY_G5,        "write_verify(12)",             \
 501 /* 0xAF */ SCMD_VERIFY_G5,              "verify(12)",                   \
 502 /* 0xb5 */ SCMD_SECURITY_PROTO_OUT,     "security_protocol_out"         \
 503         /* see cdio.h for additional command-to-string translations */
 504 
 505 /* XXX not a command code, does not belong here */
 506 #define ATAPI_CAPABILITIES      0x2A
 507 
 508 #ifdef  __cplusplus
 509 }
 510 #endif
 511 
 512 /*
 513  * Below are inclusions of files describing various command structures
 514  * of interest.
 515  */
 516 #include <sys/scsi/generic/inquiry.h>
 517 #include <sys/scsi/generic/sense.h>
 518 
 519 /*
 520  * Private Vendor Unique Commands - Each implementation provides this.
 521  */
 522 #include <sys/scsi/impl/commands.h>


 388 #define SSVC_ACTION_GET_TIMESTAMP               0x0f
 389 
 390 /*
 391  * Group 5 Service Actions for Maintenance Out (12)
 392  */
 393 #define SSVC_ACTION_SET_DEVICE_IDENTIFIER       0x06
 394 #define SSVC_ACTION_SET_PRIORITY                0x0e
 395 #define SSVC_ACTION_SET_TARGET_PORT_GROUPS      0x0a
 396 #define SSVC_ACTION_SET_TIMESTAMP               0x0f
 397 
 398 /*
 399  * Group 5 Service Actions for Service Action In (12)
 400  */
 401 #define SSVC_ACTION_READ_MEDIA_SERIAL           0x01
 402 /*
 403  * scsi_key_strings for SCMD_ definitions
 404  *      NOTE: see SCSI_CMDS_KEY_STRINGS_CDIO in cdio.h for additional
 405  *      command-to-string translations.
 406  */
 407 #define SCSI_CMDS_KEY_STRINGS                                           \
 408 /* 0x00 */ { SCMD_TEST_UNIT_READY,      "test_unit_ready" },            \
 409 /* 0x01 */ { SCMD_REWIND |                                              \
 410                 SCMD_REZERO_UNIT,       "rezero/rewind" },              \
 411 /* 0x03 */ { SCMD_REQUEST_SENSE,        "request_sense" },              \
 412 /* 0x04 */ { SCMD_FORMAT,               "format" },                     \
 413 /* 0x05 */ { SCMD_READ_BLKLIM,          "read_block_limits" },          \
 414 /* 0x07 */ { SCMD_REASSIGN_BLOCK,       "reassign" },                   \
 415 /* 0x08 */ { SCMD_READ |                                                \
 416                 SCMD_RECEIVE,           "read" },                       \
 417 /* 0x0a */ { SCMD_PRINT |                                               \
 418                 SCMD_SEND |                                             \
 419                 SCMD_WRITE,             "write" },                      \
 420 /* 0x0b */ { SCMD_SEEK |                                                \
 421                 SCMD_SLEW_PRINT |                                       \
 422                 SCMD_TRK_SEL,           "seek" },                       \
 423 /* 0x0f */ { SCMD_READ_REVERSE,         "read_reverse" },               \
 424 /* 0x10 */ { SCMD_WRITE_FILE_MARK |                                     \
 425                 SCMD_FLUSH_PRINT_BUF,   "write_file_mark" },            \
 426 /* 0x11 */ { SCMD_SPACE,                "space" },                      \
 427 /* 0x12 */ { SCMD_INQUIRY,              "inquiry" },                    \
 428 /* 0x13 */ { SCMD_VERIFY_G0,            "verify" },                     \
 429 /* 0x14 */ { SCMD_RECOVER_BUF,          "recover_buffer_data" },        \
 430 /* 0x15 */ { SCMD_MODE_SELECT,          "mode_select" },                \
 431 /* 0x16 */ { SCMD_RESERVE,              "reserve" },                    \
 432 /* 0x17 */ { SCMD_RELEASE,              "release" },                    \
 433 /* 0x18 */ { SCMD_COPY,                 "copy" },                       \
 434 /* 0x19 */ { SCMD_ERASE,                "erase_tape" },                 \
 435 /* 0x1a */ { SCMD_MODE_SENSE,           "mode_sense" },                 \
 436 /* 0x1b */ { SCMD_LOAD |                                                \
 437                 SCMD_START_STOP |                                       \
 438                 SCMD_STOP_PRINT,        "load/start/stop" },            \
 439 /* 0x1c */ { SCMD_GDIAG,                "get_diagnostic_results" },     \
 440 /* 0x1d */ { SCMD_SDIAG,                "send_diagnostic_command" },    \
 441 /* 0x1e */ { SCMD_DOORLOCK,             "door_lock" },                  \
 442 /* 0x23 */ { SCMD_READ_FORMAT_CAP,      "read_format_capacity" },       \
 443 /* 0x25 */ { SCMD_READ_CAPACITY,        "read_capacity" },              \
 444 /* 0x28 */ { SCMD_READ_G1,              "read(10)" },                   \
 445 /* 0x2a */ { SCMD_WRITE_G1,             "write(10)" },                  \
 446 /* 0x2b */ { SCMD_SEEK_G1 |                                             \
 447                 SCMD_LOCATE,            "seek(10)" },                   \
 448 /* 0x2e */ { SCMD_WRITE_VERIFY,         "write_verify" },               \
 449 /* 0x2f */ { SCMD_VERIFY,               "verify(10)" },                 \
 450 /* 0x30 */ { SCMD_SEARCH_HIGH,          "search_data_high" },           \
 451 /* 0x31 */ { SCMD_SEARCH_EQUAL,         "search_data_equal" },          \
 452 /* 0x32 */ { SCMD_SEARCH_LOW,           "search_data_low" },            \
 453 /* 0x33 */ { SCMD_SET_LIMITS,           "set_limits" },                 \
 454 /* 0x34 */ { SCMD_READ_POSITION,        "read_position" },              \
 455 /* 0x35 */ { SCMD_SYNCHRONIZE_CACHE,    "synchronize_cache" },          \
 456 /* 0x37 */ { SCMD_READ_DEFECT_LIST,     "read_defect_data" },           \
 457 /* 0x39 */ { SCMD_COMPARE,              "compare" },                    \
 458 /* 0x3a */ { SCMD_COPY_VERIFY,          "copy_verify" },                \
 459 /* 0x3b */ { SCMD_WRITE_BUFFER,         "write_buffer" },               \
 460 /* 0x3c */ { SCMD_READ_BUFFER,          "read_buffer" },                \
 461 /* 0x3e */ { SCMD_READ_LONG,            "read_long" },                  \
 462 /* 0x3f */ { SCMD_WRITE_LONG,           "write_long" },                 \
 463 /* 0x41 */ { SCMD_WRITE_SAME_G1,        "write_same(10)" },             \
 464 /* 0x42 */ { SCMD_UNMAP,                "unmap" },                      \
 465 /* 0x44 */ { SCMD_REPORT_DENSITIES |                                    \
 466                 /* SCMD_READ_HEADER (from cdio.h) | */                  \
 467                 0,              "report_densities/read_header" },       \
 468 /* 0x46 */ { SCMD_GET_CONFIGURATION,    "get_configuration" },          \
 469 /* 0x4c */ { SCMD_LOG_SELECT_G1,        "log_select" },                 \
 470 /* 0x4d */ { SCMD_LOG_SENSE_G1,         "log_sense" },                  \
 471 /* 0x55 */ { SCMD_MODE_SELECT_G1,       "mode_select(10)" },            \
 472 /* 0x56 */ { SCMD_RESERVE_G1,           "reserve(10)" },                \
 473 /* 0x57 */ { SCMD_RELEASE_G1,           "release(10)" },                \
 474 /* 0x5a */ { SCMD_MODE_SENSE_G1,        "mode_sense(10)" },             \
 475 /* 0x5e */ { SCMD_PERSISTENT_RESERVE_IN, "persistent_reserve_in" },     \
 476 /* 0x5f */ { SCMD_PERSISTENT_RESERVE_OUT, "persistent_reserve_out" },   \
 477 /* 0x80 */ { SCMD_WRITE_FILE_MARK_G4,   "write_file_mark(16)" },        \
 478 /* 0x81 */ { SCMD_READ_REVERSE_G4,      "read_reverse(16)" },           \
 479 /* 0x83 */ { SCMD_EXTENDED_COPY,        "extended_copy" },              \
 480 /* 0x88 */ { SCMD_READ_G4,              "read(16)" },                   \
 481 /* 0x8a */ { SCMD_WRITE_G4,             "write(16)" },                  \
 482 /* 0x8c */ { SCMD_READ_ATTRIBUTE,       "read_attribute" },             \
 483 /* 0x8d */ { SCMD_WRITE_ATTRIBUTE,      "write_attribute" },            \
 484 /* 0x8e */ { SCMD_WRITE_VERIFY_G4,      "write_verify(16)" },           \
 485 /* 0x8f */ { SCMD_VERIFY_G4,            "verify(16)" },                 \
 486 /* 0x91 */ { SCMD_SPACE_G4,             "space(16)" },                  \
 487 /* 0x92 */ { SCMD_LOCATE_G4,            "locate(16)" },                 \
 488 /* 0x92 */ { SCMD_WRITE_SAME_G4,        "write_same(16)" },             \
 489 /* 0x9e */ { SCMD_SVC_ACTION_IN_G4,     "service_action_in(16)" },      \
 490 /* 0x9f */ { SCMD_SVC_ACTION_OUT_G4,    "service_action_out(16)" },     \
 491 /* 0xa0 */ { SCMD_REPORT_LUNS,          "report_luns" },                \
 492 /* 0xa2 */ { SCMD_SECURITY_PROTO_IN,    "security_protocol_in" },       \
 493 /* 0xa3 */ { SCMD_MAINTENANCE_IN,       "maintenance_in" },             \
 494 /* 0xa4 */ { SCMD_MAINTENANCE_OUT,      "maintenance_out" },            \
 495 /* 0xa8 */ { SCMD_READ_G5,              "read(12)" },                   \
 496 /* 0xa9 */ { SCMD_SVC_ACTION_OUT_G5,    "service_action_out(12)" },     \
 497 /* 0xaa */ { SCMD_WRITE_G5,             "write(12)" },                  \
 498 /* 0xab */ { SCMD_SVC_ACTION_IN_G5,     "service_action_in(12)" },      \
 499 /* 0xac */ { SCMD_GET_PERFORMANCE,      "get_performance" },            \
 500 /* 0xAE */ { SCMD_WRITE_VERIFY_G5,      "write_verify(12)" },           \
 501 /* 0xAF */ { SCMD_VERIFY_G5,            "verify(12)" },                 \
 502 /* 0xb5 */ { SCMD_SECURITY_PROTO_OUT,   "security_protocol_out" }       \
 503         /* see cdio.h for additional command-to-string translations */
 504 
 505 /* XXX not a command code, does not belong here */
 506 #define ATAPI_CAPABILITIES      0x2A
 507 
 508 #ifdef  __cplusplus
 509 }
 510 #endif
 511 
 512 /*
 513  * Below are inclusions of files describing various command structures
 514  * of interest.
 515  */
 516 #include <sys/scsi/generic/inquiry.h>
 517 #include <sys/scsi/generic/sense.h>
 518 
 519 /*
 520  * Private Vendor Unique Commands - Each implementation provides this.
 521  */
 522 #include <sys/scsi/impl/commands.h>