Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68941
b: refs/heads/master
c: 311b581
h: refs/heads/master
i:
  68939: 5d756d0
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Oct 12, 2007
1 parent 47a23b2 commit fe6c308
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12a441622b753684cc73d1c6f225e9ac53e0bf77
refs/heads/master: 311b581e1d87be87f78e6e17fc50f468f2dec561
14 changes: 14 additions & 0 deletions trunk/drivers/scsi/constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,20 @@ scsi_print_sense_hdr(const char *name, struct scsi_sense_hdr *sshdr)
}
EXPORT_SYMBOL(scsi_print_sense_hdr);

/*
* Print normalized SCSI sense header with device information and a prefix.
*/
void
scsi_cmd_print_sense_hdr(struct scsi_cmnd *scmd, const char *desc,
struct scsi_sense_hdr *sshdr)
{
scmd_printk(KERN_INFO, scmd, "%s: ", desc);
scsi_show_sense_hdr(sshdr);
scmd_printk(KERN_INFO, scmd, "%s: ", desc);
scsi_show_extd_sense(sshdr->asc, sshdr->ascq);
}
EXPORT_SYMBOL(scsi_cmd_print_sense_hdr);

static void
scsi_decode_sense_buffer(const unsigned char *sense_buffer, int sense_len,
struct scsi_sense_hdr *sshdr)
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,11 +944,11 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
break;
}
}
if (!(req->cmd_flags & REQ_QUIET)) {
scmd_printk(KERN_INFO, cmd,
"Device not ready: ");
scsi_print_sense_hdr("", &sshdr);
}
if (!(req->cmd_flags & REQ_QUIET))
scsi_cmd_print_sense_hdr(cmd,
"Device not ready",
&sshdr);

scsi_end_request(cmd, 0, this_count, 1);
return;
case VOLUME_OVERFLOW:
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/scsi/scsi_dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ extern void __scsi_print_command(unsigned char *);
extern void scsi_show_extd_sense(unsigned char, unsigned char);
extern void scsi_show_sense_hdr(struct scsi_sense_hdr *);
extern void scsi_print_sense_hdr(const char *, struct scsi_sense_hdr *);
extern void scsi_cmd_print_sense_hdr(struct scsi_cmnd *, const char *,
struct scsi_sense_hdr *);
extern void scsi_print_sense(char *, struct scsi_cmnd *);
extern void __scsi_print_sense(const char *name,
const unsigned char *sense_buffer,
Expand Down

0 comments on commit fe6c308

Please sign in to comment.