public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: "Mike Miller (OS Dev)" <mikem@beardog.cca.cpqcorp.net>
Cc: LKML-SCSI <linux-scsi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	mike.miller@hp.com
Subject: Re: READ CAPACITY (16) failing
Date: Wed, 8 Apr 2009 13:54:48 -0600	[thread overview]
Message-ID: <20090408195447.GP20983@parisc-linux.org> (raw)
In-Reply-To: <20090408194357.GA15043@beardog.cca.cpqcorp.net>

On Wed, Apr 08, 2009 at 02:43:57PM -0500, Mike Miller (OS Dev) wrote:
> I'm working on the HP Smart Array SCSI driver (hpsa) and I'm seeing the
> following failures:
> 
> hpsa1: <0x3230> at PCI 0000:02:00.0 IRQ 76 using DAC
> scsi4 : hpsa
> scsi 4:0:0:0: Direct-Access     HP       LOGICAL VOLUME   5.20 PQ: 0 ANSI: 5
> sd 4:0:0:0: Attached scsi generic sg4 type 0
> sd 4:0:0:0: [sdd] READ CAPACITY(16) failed
> sd 4:0:0:0: [sdd] Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK
> sd 4:0:0:0: [sdd] Sense not available.
> hpsa: cp ffff8800cf400000 has check condition: unknown type: Sense: 0x5,
> ASC: 0x20, ASCQ: 0x0, Returning result: 0x2, cmd=[a0 00 00 00 00 00 00 00 10
> 00]

> The READ CAPACITY failures are what I'm concerned about. I can't seem to track
> down why that's failing.
> I've tried printing out the_result from sd but it's not printing out. I'm
> assuming that anytime I load the driver it goes thru sd.
> 
> 	if (the_result) {
> 		sense_valid = scsi_sense_valid(&sshdr);
> 		if (sense_valid &&
> 			sshdr.sense_key == ILLEGAL_REQUEST &&
> 			(sshdr.asc == 0x20 || sshdr.asc == 0x24) &&
> 			sshdr.ascq == 0x00)
> 			/* Invalid Command Operation Code or
> 			 * Invalid Field in CDB, just retry
> 			 * silently with RC10 */
> 			return -EINVAL;
> 		}
> 	retries--;
> 	} while (the_result && retries);
> 	printk(KERN_WARNING "sd-mfm: the_result = %d\n", the_result);

Probably the device you're testing against doesn't support RC16, which
is fine.  But for some reason, we're not getting valid sense data back
from the device.  Now, there's two responses to this that seem rational
to me:

 - In sd.c, if the drive has returned no/invalid sense data, try RC10
   silently, just like the 0x20 / 0x24 ASC case.
 - Find out why this drive doesn't report valid sense data when attached
   to hpsa.  I assume it does report valid sense data when attached to
   some other scsi card?

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  reply	other threads:[~2009-04-08 19:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-08 19:43 READ CAPACITY (16) failing Mike Miller (OS Dev)
2009-04-08 19:54 ` Matthew Wilcox [this message]
2009-04-09 15:22   ` Mike Miller (OS Dev)
2009-04-10 19:31   ` Mike Miller (OS Dev)
2009-04-10 21:04     ` Douglas Gilbert
2009-04-10 22:28     ` James Bottomley
2009-04-14 18:23       ` Mike Miller (OS Dev)

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=20090408195447.GP20983@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mike.miller@hp.com \
    --cc=mikem@beardog.cca.cpqcorp.net \
    /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