Lines Matching refs:msg

1183 int spi_populate_width_msg(unsigned char *msg, int width)  in spi_populate_width_msg()  argument
1185 msg[0] = EXTENDED_MESSAGE; in spi_populate_width_msg()
1186 msg[1] = 2; in spi_populate_width_msg()
1187 msg[2] = EXTENDED_WDTR; in spi_populate_width_msg()
1188 msg[3] = width; in spi_populate_width_msg()
1193 int spi_populate_sync_msg(unsigned char *msg, int period, int offset) in spi_populate_sync_msg() argument
1195 msg[0] = EXTENDED_MESSAGE; in spi_populate_sync_msg()
1196 msg[1] = 3; in spi_populate_sync_msg()
1197 msg[2] = EXTENDED_SDTR; in spi_populate_sync_msg()
1198 msg[3] = period; in spi_populate_sync_msg()
1199 msg[4] = offset; in spi_populate_sync_msg()
1204 int spi_populate_ppr_msg(unsigned char *msg, int period, int offset, in spi_populate_ppr_msg() argument
1207 msg[0] = EXTENDED_MESSAGE; in spi_populate_ppr_msg()
1208 msg[1] = 6; in spi_populate_ppr_msg()
1209 msg[2] = EXTENDED_PPR; in spi_populate_ppr_msg()
1210 msg[3] = period; in spi_populate_ppr_msg()
1211 msg[4] = 0; in spi_populate_ppr_msg()
1212 msg[5] = offset; in spi_populate_ppr_msg()
1213 msg[6] = width; in spi_populate_ppr_msg()
1214 msg[7] = options; in spi_populate_ppr_msg()
1229 int spi_populate_tag_msg(unsigned char *msg, struct scsi_cmnd *cmd) in spi_populate_tag_msg() argument
1232 *msg++ = SIMPLE_QUEUE_TAG; in spi_populate_tag_msg()
1233 *msg++ = scsi_cmd_to_rq(cmd)->tag; in spi_populate_tag_msg()
1264 static void print_nego(const unsigned char *msg, int per, int off, int width) in print_nego() argument
1268 period_to_str(buf, msg[per]); in print_nego()
1273 printk("offset = %d ", msg[off]); in print_nego()
1275 printk("width = %d ", 8 << msg[width]); in print_nego()
1278 static void print_ptr(const unsigned char *msg, int msb, const char *desc) in print_ptr() argument
1280 int ptr = (msg[msb] << 24) | (msg[msb+1] << 16) | (msg[msb+2] << 8) | in print_ptr()
1281 msg[msb+3]; in print_ptr()
1285 int spi_print_msg(const unsigned char *msg) in spi_print_msg() argument
1288 if (msg[0] == EXTENDED_MESSAGE) { in spi_print_msg()
1289 len = 2 + msg[1]; in spi_print_msg()
1292 if (msg[2] < ARRAY_SIZE(extended_msgs)) in spi_print_msg()
1293 printk ("%s ", extended_msgs[msg[2]]); in spi_print_msg()
1296 (int) msg[2]); in spi_print_msg()
1297 switch (msg[2]) { in spi_print_msg()
1299 print_ptr(msg, 3, "pointer"); in spi_print_msg()
1302 print_nego(msg, 3, 4, 0); in spi_print_msg()
1305 print_nego(msg, 0, 0, 3); in spi_print_msg()
1308 print_nego(msg, 3, 5, 6); in spi_print_msg()
1311 print_ptr(msg, 3, "out"); in spi_print_msg()
1312 print_ptr(msg, 7, "in"); in spi_print_msg()
1316 printk("%02x ", msg[i]); in spi_print_msg()
1319 } else if (msg[0] & 0x80) { in spi_print_msg()
1321 (msg[0] & 0x40) ? "" : "not ", in spi_print_msg()
1322 (msg[0] & 0x20) ? "target routine" : "lun", in spi_print_msg()
1323 msg[0] & 0x7); in spi_print_msg()
1325 } else if (msg[0] < 0x1f) { in spi_print_msg()
1326 if (msg[0] < ARRAY_SIZE(one_byte_msgs) && one_byte_msgs[msg[0]]) in spi_print_msg()
1327 printk("%s ", one_byte_msgs[msg[0]]); in spi_print_msg()
1329 printk("reserved (%02x) ", msg[0]); in spi_print_msg()
1330 } else if (msg[0] == 0x55) { in spi_print_msg()
1333 } else if (msg[0] <= 0x2f) { in spi_print_msg()
1334 if ((msg[0] - 0x20) < ARRAY_SIZE(two_byte_msgs)) in spi_print_msg()
1335 printk("%s %02x ", two_byte_msgs[msg[0] - 0x20], in spi_print_msg()
1336 msg[1]); in spi_print_msg()
1339 msg[0], msg[1]); in spi_print_msg()
1349 int spi_print_msg(const unsigned char *msg) in spi_print_msg() argument
1353 if (msg[0] == EXTENDED_MESSAGE) { in spi_print_msg()
1354 len = 2 + msg[1]; in spi_print_msg()
1358 printk("%02x ", msg[i]); in spi_print_msg()
1360 } else if (msg[0] & 0x80) { in spi_print_msg()
1361 printk("%02x ", msg[0]); in spi_print_msg()
1363 } else if ((msg[0] < 0x1f) || (msg[0] == 0x55)) { in spi_print_msg()
1364 printk("%02x ", msg[0]); in spi_print_msg()
1366 } else if (msg[0] <= 0x2f) { in spi_print_msg()
1367 printk("%02x %02x", msg[0], msg[1]); in spi_print_msg()
1370 printk("%02x ", msg[0]); in spi_print_msg()