Lines Matching refs:logbuf
38 static size_t sdev_format_header(char *logbuf, size_t logbuf_len, in sdev_format_header() argument
44 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_format_header()
51 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_format_header()
60 char *logbuf; in sdev_prefix_printk() local
66 logbuf = scsi_log_reserve_buffer(&logbuf_len); in sdev_prefix_printk()
67 if (!logbuf) in sdev_prefix_printk()
71 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_prefix_printk()
75 off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args); in sdev_prefix_printk()
78 dev_printk(level, &sdev->sdev_gendev, "%s", logbuf); in sdev_prefix_printk()
79 scsi_log_release_buffer(logbuf); in sdev_prefix_printk()
87 char *logbuf; in scmd_printk() local
93 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scmd_printk()
94 if (!logbuf) in scmd_printk()
96 off = sdev_format_header(logbuf, logbuf_len, scmd_name(scmd), in scmd_printk()
100 off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args); in scmd_printk()
103 dev_printk(level, &scmd->device->sdev_gendev, "%s", logbuf); in scmd_printk()
104 scsi_log_release_buffer(logbuf); in scmd_printk()
157 size_t __scsi_format_command(char *logbuf, size_t logbuf_len, in __scsi_format_command() argument
163 off = scsi_format_opcode_name(logbuf, logbuf_len, cdb); in __scsi_format_command()
173 off += scnprintf(logbuf + off, logbuf_len - off, in __scsi_format_command()
183 char *logbuf; in scsi_print_command() local
186 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_print_command()
187 if (!logbuf) in scsi_print_command()
190 off = sdev_format_header(logbuf, logbuf_len, in scsi_print_command()
194 off += scnprintf(logbuf + off, logbuf_len - off, "CDB: "); in scsi_print_command()
198 off += scsi_format_opcode_name(logbuf + off, logbuf_len - off, in scsi_print_command()
206 off += scnprintf(logbuf + off, logbuf_len - off, "\n"); in scsi_print_command()
207 dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf); in scsi_print_command()
211 off = sdev_format_header(logbuf, logbuf_len, in scsi_print_command()
215 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_command()
218 16, 1, logbuf + off, in scsi_print_command()
222 logbuf); in scsi_print_command()
227 off += scnprintf(logbuf + off, logbuf_len - off, " "); in scsi_print_command()
229 logbuf + off, logbuf_len - off, in scsi_print_command()
233 dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf); in scsi_print_command()
235 scsi_log_release_buffer(logbuf); in scsi_print_command()
295 char *logbuf; in scsi_log_dump_sense() local
299 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_log_dump_sense()
300 if (!logbuf) in scsi_log_dump_sense()
307 off = sdev_format_header(logbuf, logbuf_len, in scsi_log_dump_sense()
310 logbuf + off, logbuf_len - off, in scsi_log_dump_sense()
312 dev_printk(KERN_INFO, &sdev->sdev_gendev, "%s", logbuf); in scsi_log_dump_sense()
314 scsi_log_release_buffer(logbuf); in scsi_log_dump_sense()
321 char *logbuf; in scsi_log_print_sense_hdr() local
324 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_log_print_sense_hdr()
325 if (!logbuf) in scsi_log_print_sense_hdr()
327 off = sdev_format_header(logbuf, logbuf_len, name, tag); in scsi_log_print_sense_hdr()
328 off += scsi_format_sense_hdr(logbuf + off, logbuf_len - off, sshdr); in scsi_log_print_sense_hdr()
329 dev_printk(KERN_INFO, &sdev->sdev_gendev, "%s", logbuf); in scsi_log_print_sense_hdr()
330 scsi_log_release_buffer(logbuf); in scsi_log_print_sense_hdr()
332 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_log_print_sense_hdr()
333 if (!logbuf) in scsi_log_print_sense_hdr()
335 off = sdev_format_header(logbuf, logbuf_len, name, tag); in scsi_log_print_sense_hdr()
336 off += scsi_format_extd_sense(logbuf + off, logbuf_len - off, in scsi_log_print_sense_hdr()
338 dev_printk(KERN_INFO, &sdev->sdev_gendev, "%s", logbuf); in scsi_log_print_sense_hdr()
339 scsi_log_release_buffer(logbuf); in scsi_log_print_sense_hdr()
385 char *logbuf; in scsi_print_result() local
391 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_print_result()
392 if (!logbuf) in scsi_print_result()
395 off = sdev_format_header(logbuf, logbuf_len, scmd_name(cmd), in scsi_print_result()
402 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
408 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
411 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
416 off += scnprintf(logbuf + off, logbuf_len - off, "Result: "); in scsi_print_result()
421 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
424 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
429 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
432 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
436 dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf); in scsi_print_result()
437 scsi_log_release_buffer(logbuf); in scsi_print_result()