public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Adrian McMenamin <adrian@newgolddream.dyndns.info>
Cc: LKML <linux-kernel@vger.kernel.org>,
	linux-sh <linux-sh@vger.kernel.org>,
	Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH] SH/Dreamcast - add support for GD-Rom device
Date: Sat, 29 Dec 2007 18:07:05 +0000	[thread overview]
Message-ID: <1198951625.4861.25.camel@localhost> (raw)
In-Reply-To: <1198929826.6278.11.camel@localhost.localdomain>

On Sat, 2007-12-29 at 12:03 +0000, Adrian McMenamin wrote:
> This won't work see include/scsi/scsi.h
> /*
> *  SENSE KEYS
> */
> 
> #define NO_SENSE            0x00
> #define RECOVERED_ERROR     0x01
> #define NOT_READY           0x02
> #define MEDIUM_ERROR        0x03
> #define HARDWARE_ERROR      0x04
> #define ILLEGAL_REQUEST     0x05
> #define UNIT_ATTENTION      0x06
> #define DATA_PROTECT        0x07
> #define BLANK_CHECK         0x08
> #define COPY_ABORTED        0x0a
> #define ABORTED_COMMAND     0x0b
> #define VOLUME_OVERFLOW     0x0d
> #define MISCOMPARE          0x0e
> 
> (The GD device specs says it supports 0, 1, 2, 3,4, 5, 6, 7 and 0xB)
> 
> ie we could get a sense key of 0x0B which would be greater than the
> array size. I think you'd have to hard code the limit.

Then shouldn't this test be:

	for (i = 0; i < ARRAY_SIZE(sense_texts); i++) {
		if (sense_key = sense_texts[i].sense_key)
			printk(KERN_INFO "GDROM: %s\n", sense_texts[i].text);
	}
	if (i >= ARRAY_SIZE(sense_texts))
		printk(KERN_ERR "GDROM: Unknown sense key: %d\n", sense_key);

cheers, Joe


  parent reply	other threads:[~2007-12-29 18:07 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-27  1:26 [PATCH] SH/Dreamcast - add support for GD-Rom device Adrian McMenamin
2007-12-27  8:18 ` Paul Mundt
2007-12-27 12:49   ` Adrian McMenamin
2007-12-27 19:52     ` Jens Axboe
2007-12-27 19:11   ` Mike Frysinger
2007-12-27 16:52 ` Adrian McMenamin
2007-12-27 20:56   ` Adrian McMenamin
2007-12-27 22:20   ` Paul Mundt
2007-12-27 22:58   ` Joe Perches
2007-12-28  0:18     ` Simon Holm Thøgersen
2007-12-29  1:57       ` Joe Perches
2007-12-29 12:03         ` Adrian McMenamin
2007-12-29 12:10           ` Adrian McMenamin
2007-12-29 18:07           ` Joe Perches [this message]
2007-12-28  0:49     ` Mike Frysinger
2007-12-28  3:41       ` Paul Mundt
2007-12-28 19:17     ` Gino Badouri
2007-12-28 22:09       ` Joe Perches
2007-12-30 13:38     ` Adrian McMenamin
2007-12-31  5:23       ` Paul Mundt
2008-01-10 23:25 ` [PATCH] SH/Dreamcast - add support for GD-Rom CDROM drive on SEGA Adrian McMenamin
2008-01-11 21:56   ` [PATCH] SH/Dreamcast - add support for GD-Rom CDROM drive on Adrian McMenamin
2008-01-12 11:57     ` [PATCH] SH/Dreamcast - add support for GD-Rom CDROM drive on SEGA Dreamcast Jens Axboe
2008-01-12 13:36     ` [PATCH] SH/Dreamcast - add support for GD-Rom CDROM drive on Andrew Morton
2008-01-12 14:14       ` Adrian McMenamin
2008-01-12 19:15         ` Andrew Morton
2008-01-13 18:24           ` [PATCH] SH/Dreamcast - add support for GD-Rom CDROM drive on SEGA Dreamcast Adrian McMenamin
2008-01-14 23:00       ` [PATCH] SH/Dreamcast - add support for GD-Rom CDROM drive on Adrian McMenamin
2008-01-14 23:17         ` Adrian McMenamin
2008-01-15  0:29           ` [PATCH] SH/Dreamcast - add support for GD-Rom CDROM drive on SEGA Dreamcast Paul Mundt
2008-01-15 20:41             ` Adrian McMenamin
2008-01-16 23:57           ` [PATCH] SH/Dreamcast - add support for GD-Rom CDROM drive on Adrian McMenamin
2008-01-17  1:27             ` [PATCH] SH/Dreamcast - add support for GD-Rom CDROM drive on SEGA Dreamcast Paul Mundt
2008-01-17 22:30               ` [PATCH] SH/Dreamcast - add support for GD-Rom CDROM drive on Adrian McMenamin
2008-01-18  0:56                 ` [PATCH] SH/Dreamcast - add support for GD-Rom CDROM drive on SEGA Dreamcast Paul Mundt
2008-01-28  5:33                   ` [PATCH] SH/Dreamcast - add support for GD-Rom CDROM drive on Andrew Morton
2008-01-28  5:53                     ` [PATCH] SH/Dreamcast - add support for GD-Rom CDROM drive on SEGA Dreamcast Paul Mundt
2008-01-16  1:57       ` Paul Mundt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1198951625.4861.25.camel@localhost \
    --to=joe@perches.com \
    --cc=adrian@newgolddream.dyndns.info \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox