Lines Matching refs:logbuf
35 static size_t sdev_format_header(char *logbuf, size_t logbuf_len, in sdev_format_header() argument
41 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_format_header()
48 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_format_header()
57 char *logbuf; in sdev_prefix_printk() local
63 logbuf = scsi_log_reserve_buffer(&logbuf_len); in sdev_prefix_printk()
64 if (!logbuf) in sdev_prefix_printk()
68 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_prefix_printk()
72 off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args); in sdev_prefix_printk()
75 dev_printk(level, &sdev->sdev_gendev, "%s", logbuf); in sdev_prefix_printk()
76 scsi_log_release_buffer(logbuf); in sdev_prefix_printk()
84 char *logbuf; in scmd_printk() local
90 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scmd_printk()
91 if (!logbuf) in scmd_printk()
93 off = sdev_format_header(logbuf, logbuf_len, scmd_name(scmd), in scmd_printk()
97 off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args); in scmd_printk()
100 dev_printk(level, &scmd->device->sdev_gendev, "%s", logbuf); in scmd_printk()
101 scsi_log_release_buffer(logbuf); in scmd_printk()
154 size_t __scsi_format_command(char *logbuf, size_t logbuf_len, in __scsi_format_command() argument
160 off = scsi_format_opcode_name(logbuf, logbuf_len, cdb); in __scsi_format_command()
170 off += scnprintf(logbuf + off, logbuf_len - off, in __scsi_format_command()
180 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()
208 scsi_log_release_buffer(logbuf); in scsi_print_command()
212 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_print_command()
213 if (!logbuf) in scsi_print_command()
215 off = sdev_format_header(logbuf, logbuf_len, in scsi_print_command()
219 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_command()
222 16, 1, logbuf + off, in scsi_print_command()
226 logbuf); in scsi_print_command()
227 scsi_log_release_buffer(logbuf); in scsi_print_command()
232 off += scnprintf(logbuf + off, logbuf_len - off, " "); in scsi_print_command()
234 logbuf + off, logbuf_len - off, in scsi_print_command()
238 dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf); in scsi_print_command()
239 scsi_log_release_buffer(logbuf); in scsi_print_command()
299 char *logbuf; in scsi_log_dump_sense() local
303 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_log_dump_sense()
304 if (!logbuf) in scsi_log_dump_sense()
311 off = sdev_format_header(logbuf, logbuf_len, in scsi_log_dump_sense()
314 logbuf + off, logbuf_len - off, in scsi_log_dump_sense()
316 dev_printk(KERN_INFO, &sdev->sdev_gendev, "%s", logbuf); in scsi_log_dump_sense()
318 scsi_log_release_buffer(logbuf); in scsi_log_dump_sense()
325 char *logbuf; in scsi_log_print_sense_hdr() local
328 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_log_print_sense_hdr()
329 if (!logbuf) in scsi_log_print_sense_hdr()
331 off = sdev_format_header(logbuf, logbuf_len, name, tag); in scsi_log_print_sense_hdr()
332 off += scsi_format_sense_hdr(logbuf + off, logbuf_len - off, sshdr); in scsi_log_print_sense_hdr()
333 dev_printk(KERN_INFO, &sdev->sdev_gendev, "%s", logbuf); in scsi_log_print_sense_hdr()
334 scsi_log_release_buffer(logbuf); in scsi_log_print_sense_hdr()
336 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_log_print_sense_hdr()
337 if (!logbuf) in scsi_log_print_sense_hdr()
339 off = sdev_format_header(logbuf, logbuf_len, name, tag); in scsi_log_print_sense_hdr()
340 off += scsi_format_extd_sense(logbuf + off, logbuf_len - off, in scsi_log_print_sense_hdr()
342 dev_printk(KERN_INFO, &sdev->sdev_gendev, "%s", logbuf); in scsi_log_print_sense_hdr()
343 scsi_log_release_buffer(logbuf); in scsi_log_print_sense_hdr()
388 char *logbuf; in scsi_print_result() local
394 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_print_result()
395 if (!logbuf) in scsi_print_result()
398 off = sdev_format_header(logbuf, logbuf_len, in scsi_print_result()
405 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
411 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
414 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
419 off += scnprintf(logbuf + off, logbuf_len - off, "Result: "); in scsi_print_result()
424 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
427 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
433 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
436 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
439 dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf); in scsi_print_result()
440 scsi_log_release_buffer(logbuf); in scsi_print_result()