Ejemplo n.º 1
0
void usb_stor_show_sense(
		unsigned char key,
		unsigned char asc,
		unsigned char ascq) {

	const char *what, *keystr;

	keystr = scsi_sense_key_string(key);
	what = scsi_extd_sense_format(asc, ascq);

	if (keystr == NULL)
		keystr = "(Unknown Key)";
	if (what == NULL)
		what = "(unknown ASC/ASCQ)";

	US_DEBUGP("%s: ", keystr);
	US_DEBUGPX(what, ascq);
	US_DEBUGPX("\n");
}
Ejemplo n.º 2
0
void usb_stor_show_sense(const struct us_data *us,
			 unsigned char key,
			 unsigned char asc,
			 unsigned char ascq)
{
	const char *what, *keystr, *fmt;

	keystr = scsi_sense_key_string(key);
	what = scsi_extd_sense_format(asc, ascq, &fmt);

	if (keystr == NULL)
		keystr = "(Unknown Key)";
	if (what == NULL)
		what = "(unknown ASC/ASCQ)";

	if (fmt)
		usb_stor_dbg(us, "%s: %s (%s%x)\n", keystr, what, fmt, ascq);
	else
		usb_stor_dbg(us, "%s: %s\n", keystr, what);
}
Ejemplo n.º 3
0
/* Print extended sense information; no leadin, no linefeed */
static void
scsi_show_extd_sense(unsigned char asc, unsigned char ascq)
{
	const char *extd_sense_fmt = scsi_extd_sense_format(asc, ascq);

	if (extd_sense_fmt) {
		if (strstr(extd_sense_fmt, "%x")) {
			printk("Additional sense: ");
			printk(extd_sense_fmt, ascq);
		} else
			printk("Additional sense: %s", extd_sense_fmt);
	} else {
		if (asc >= 0x80)
			printk("<<vendor>> ASC=0x%x ASCQ=0x%x", asc, ascq);
		if (ascq >= 0x80)
			printk("ASC=0x%x <<vendor>> ASCQ=0x%x", asc, ascq);
		else
			printk("ASC=0x%x ASCQ=0x%x", asc, ascq);
	}
}
Ejemplo n.º 4
0
void
scsi_show_extd_sense(unsigned char asc, unsigned char ascq)
{
        const char *extd_sense_fmt = scsi_extd_sense_format(asc, ascq);

	if (extd_sense_fmt) {
		if (strstr(extd_sense_fmt, "%x")) {
;
;
		} else
;
	} else {
		if (asc >= 0x80)
//			printk("<<vendor>> ASC=0x%x ASCQ=0x%x", asc,
;
		if (ascq >= 0x80)
//			printk("ASC=0x%x <<vendor>> ASCQ=0x%x", asc,
;
		else
;
	}

;
}