/* A generic sense dump / resolve mechanism should be implemented across all ATAPI + SCSI devices.  */
static void pkt_dump_sense(struct packet_command *cgc)
/* A generic sense dump / resolve mechanism should be implemented across all ATAPI + SCSI devices.  */
static void pkt_dump_sense(struct packet_command *cgc)
{
	static char *info[9] = { "No sense", "Recovered error", "Not ready",
				 "Medium error", "Hardware error", "Illegal request",
				 "Unit attention", "Data protect", "Blank check" };
	int i;
	struct request_sense *sense = cgc->sense;
	printk(DRIVER_NAME":");
	for (i = 0; i < CDROM_PACKET_SIZE; i++)
		printk(" %02x", cgc->cmd[i]);
	printk(" - ");
	if (sense == NULL) {
		printk("no sense\n");
		return;
	}
	printk("sense %02x.%02x.%02x", sense->sense_key, sense->asc, sense->ascq);
	if (sense->sense_key > 8) {
		printk(" (INVALID)\n");
		return;
	}
	printk(" (%s)\n", info[sense->sense_key]);
}