Lines Matching refs:msg

1175 int spi_populate_width_msg(unsigned char *msg, int width)  in spi_populate_width_msg()  argument
1177 msg[0] = EXTENDED_MESSAGE; in spi_populate_width_msg()
1178 msg[1] = 2; in spi_populate_width_msg()
1179 msg[2] = EXTENDED_WDTR; in spi_populate_width_msg()
1180 msg[3] = width; in spi_populate_width_msg()
1185 int spi_populate_sync_msg(unsigned char *msg, int period, int offset) in spi_populate_sync_msg() argument
1187 msg[0] = EXTENDED_MESSAGE; in spi_populate_sync_msg()
1188 msg[1] = 3; in spi_populate_sync_msg()
1189 msg[2] = EXTENDED_SDTR; in spi_populate_sync_msg()
1190 msg[3] = period; in spi_populate_sync_msg()
1191 msg[4] = offset; in spi_populate_sync_msg()
1196 int spi_populate_ppr_msg(unsigned char *msg, int period, int offset, in spi_populate_ppr_msg() argument
1199 msg[0] = EXTENDED_MESSAGE; in spi_populate_ppr_msg()
1200 msg[1] = 6; in spi_populate_ppr_msg()
1201 msg[2] = EXTENDED_PPR; in spi_populate_ppr_msg()
1202 msg[3] = period; in spi_populate_ppr_msg()
1203 msg[4] = 0; in spi_populate_ppr_msg()
1204 msg[5] = offset; in spi_populate_ppr_msg()
1205 msg[6] = width; in spi_populate_ppr_msg()
1206 msg[7] = options; in spi_populate_ppr_msg()
1221 int spi_populate_tag_msg(unsigned char *msg, struct scsi_cmnd *cmd) in spi_populate_tag_msg() argument
1224 *msg++ = SIMPLE_QUEUE_TAG; in spi_populate_tag_msg()
1225 *msg++ = cmd->request->tag; in spi_populate_tag_msg()
1256 static void print_nego(const unsigned char *msg, int per, int off, int width) in print_nego() argument
1260 period_to_str(buf, msg[per]); in print_nego()
1265 printk("offset = %d ", msg[off]); in print_nego()
1267 printk("width = %d ", 8 << msg[width]); in print_nego()
1270 static void print_ptr(const unsigned char *msg, int msb, const char *desc) in print_ptr() argument
1272 int ptr = (msg[msb] << 24) | (msg[msb+1] << 16) | (msg[msb+2] << 8) | in print_ptr()
1273 msg[msb+3]; in print_ptr()
1277 int spi_print_msg(const unsigned char *msg) in spi_print_msg() argument
1280 if (msg[0] == EXTENDED_MESSAGE) { in spi_print_msg()
1281 len = 2 + msg[1]; in spi_print_msg()
1284 if (msg[2] < ARRAY_SIZE(extended_msgs)) in spi_print_msg()
1285 printk ("%s ", extended_msgs[msg[2]]); in spi_print_msg()
1288 (int) msg[2]); in spi_print_msg()
1289 switch (msg[2]) { in spi_print_msg()
1291 print_ptr(msg, 3, "pointer"); in spi_print_msg()
1294 print_nego(msg, 3, 4, 0); in spi_print_msg()
1297 print_nego(msg, 0, 0, 3); in spi_print_msg()
1300 print_nego(msg, 3, 5, 6); in spi_print_msg()
1303 print_ptr(msg, 3, "out"); in spi_print_msg()
1304 print_ptr(msg, 7, "in"); in spi_print_msg()
1308 printk("%02x ", msg[i]); in spi_print_msg()
1311 } else if (msg[0] & 0x80) { in spi_print_msg()
1313 (msg[0] & 0x40) ? "" : "not ", in spi_print_msg()
1314 (msg[0] & 0x20) ? "target routine" : "lun", in spi_print_msg()
1315 msg[0] & 0x7); in spi_print_msg()
1317 } else if (msg[0] < 0x1f) { in spi_print_msg()
1318 if (msg[0] < ARRAY_SIZE(one_byte_msgs) && one_byte_msgs[msg[0]]) in spi_print_msg()
1319 printk("%s ", one_byte_msgs[msg[0]]); in spi_print_msg()
1321 printk("reserved (%02x) ", msg[0]); in spi_print_msg()
1322 } else if (msg[0] == 0x55) { in spi_print_msg()
1325 } else if (msg[0] <= 0x2f) { in spi_print_msg()
1326 if ((msg[0] - 0x20) < ARRAY_SIZE(two_byte_msgs)) in spi_print_msg()
1327 printk("%s %02x ", two_byte_msgs[msg[0] - 0x20], in spi_print_msg()
1328 msg[1]); in spi_print_msg()
1331 msg[0], msg[1]); in spi_print_msg()
1341 int spi_print_msg(const unsigned char *msg) in spi_print_msg() argument
1345 if (msg[0] == EXTENDED_MESSAGE) { in spi_print_msg()
1346 len = 2 + msg[1]; in spi_print_msg()
1350 printk("%02x ", msg[i]); in spi_print_msg()
1352 } else if (msg[0] & 0x80) { in spi_print_msg()
1353 printk("%02x ", msg[0]); in spi_print_msg()
1355 } else if ((msg[0] < 0x1f) || (msg[0] == 0x55)) { in spi_print_msg()
1356 printk("%02x ", msg[0]); in spi_print_msg()
1358 } else if (msg[0] <= 0x2f) { in spi_print_msg()
1359 printk("%02x %02x", msg[0], msg[1]); in spi_print_msg()
1362 printk("%02x ", msg[0]); in spi_print_msg()