12 static const char unknown[] =
"UNKNOWN";
14 static const char * group_0_commands[] = {
15 "Test Unit Ready",
"Rezero Unit",
unknown,
"Request Sense",
16 "Format Unit",
"Read Block Limits",
unknown,
"Reassign Blocks",
18 unknown,
"Read Reverse",
"Write Filemarks",
"Space",
"Inquiry",
19 unknown,
"Recover Buffered Data",
"Mode Select",
"Reserve",
20 "Release",
"Copy",
"Erase",
"Mode Sense",
"Start/Stop Unit",
21 "Receive Diagnostic",
"Send Diagnostic",
22 "Prevent/Allow Medium Removal",
unknown,
26 static const char *group_1_commands[] = {
30 "Write Verify",
"Verify",
"Search High",
"Search Equal",
31 "Search Low",
"Set Limits",
"Prefetch or Read Position",
32 "Synchronize Cache",
"Lock/Unlock Cache",
"Read Defect Data",
33 "Medium Scan",
"Compare",
"Copy Verify",
"Write Buffer",
"Read Buffer",
34 "Update Block",
"Read Long",
"Write Long",
38 static const char *group_2_commands[] = {
39 "Change Definition",
"Write Same",
40 "Read Sub-Ch(cd)",
"Read TOC",
"Read Header(cd)",
"Play Audio(cd)",
unknown,
"Play Audio MSF(cd)",
"Play Audio Track/Index(cd)",
41 "Play Track Relative(10)(cd)",
unknown,
"Pause/Resume(cd)",
"Log Select",
"Log Sense",
unknown,
unknown,
47 #define group(opcode) (((opcode) >> 5) & 7)
49 #define RESERVED_GROUP 0
50 #define VENDOR_GROUP 1
51 #define NOTEXT_GROUP 2
54 group_0_commands, group_1_commands, group_2_commands,
57 (
const char **) VENDOR_GROUP
60 static const char reserved[] =
"RESERVED";
61 static const char vendor[] =
"VENDOR SPECIFIC";
63 static void print_opcodek(
unsigned char opcode)
67 switch ((
unsigned long) table) {
69 printk(
"%s[%02x] ", reserved, opcode);
75 printk(
"%s[%02x] ", vendor, opcode);
78 if (table[opcode & 0x1f] !=
unknown)
79 printk(
"%s[%02x] ", table[opcode & 0x1f], opcode);
86 static void print_commandk (
unsigned char *
command)
90 print_opcodek(command[0]);
92 if ((command[0] >> 5) == 6 ||
93 (command[0] >> 5) == 7 ) {
99 for ( i = 1; i <
s; ++
i) {
100 printk(
"%02x ", command[i]);
106 (((
unsigned int)command[1] & 0x0f) << 16) |
107 ( (
unsigned int)command[2] << 8) |
108 ( (
unsigned int)command[3] ),
109 (
unsigned int)command[4]
114 ((
unsigned int)command[2] << 24) |
115 ((
unsigned int)command[3] << 16) |
116 ((
unsigned int)command[4] << 8) |
117 ((
unsigned int)command[5] ),
118 ((
unsigned int)command[7] << 8) |
119 ((
unsigned int)command[8] )
124 ((
unsigned int)command[2] << 24) |
125 ((
unsigned int)command[3] << 16) |
126 ((
unsigned int)command[4] << 8) |
127 ((
unsigned int)command[5] ),
128 ((
unsigned int)command[6] << 24) |
129 ((
unsigned int)command[7] << 16) |
130 ((
unsigned int)command[8] << 8) |
131 ((
unsigned int)command[9] )
142 print_commandk(SCpnt->
cmnd);
149 printk(
"BUSPHASE_COMMAND\n");
152 printk(
"BUSPHASE_MESSAGE_IN\n");
155 printk(
"BUSPHASE_MESSAGE_OUT\n");
158 printk(
"BUSPHASE_DATA_IN\n");
161 printk(
"BUSPHASE_DATA_OUT\n");
164 printk(
"BUSPHASE_STATUS\n");
167 printk(
"BUSPHASE_SELECT\n");
170 printk(
"BUSPHASE_other: 0x%x\n", stat);
228 static void nsp32_print_register(
int base)