public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Krishna Murthy <krmurthy@cisco.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>, davmyers@cisco.com
Subject: Re: scsi_scan_target and SCSI_2
Date: 27 Nov 2003 09:37:38 -0600	[thread overview]
Message-ID: <1069947459.1837.28.camel@mulgrave> (raw)
In-Reply-To: <200311271849.15241.krmurthy@cisco.com>

On Thu, 2003-11-27 at 07:19, Krishna Murthy wrote:
> scsi_probe_and_add_lun() calls scsi_probe_lun(). In case there is no lun 0
> then the information about scsi_level is lost.

SAM-3 in section 4.9.2 begins "All SCSI devices shall accept LUN 0 as a
valid address...".

This requirement is in SCSI-2 as well.

If your implementation doesn't do this, I suggest you fix it.

If lun 0 responds (as it is required by the standards to do), but shows
only a perfunctory standards conforming response indicating it's not
really present, we scan, and the scsi_level will be recorded for each
correctly scanned lun.

> We now call scsi_sequential_lun_scan() with BLIST_SPARSELUN,SCSI_2 as 
> parameters, which instead should have been bflags,scsi_level as determined by 
> scsi_probe_lun.
> 
> Isn't this is  a bug? Please let me know if I am missing something.

No, it's deliberate.  Whether we should do this is open to debate, but
there's a comment in the code explaining the logic:

		/*
		 * There's a target here, but lun 0 is offline so we
		 * can't use the report_lun scan.  Fall back to a
		 * sequential lun scan with a bflags of SPARSELUN and
		 * a default scsi level of SCSI_2
		 */

James



  parent reply	other threads:[~2003-11-27 15:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-25 15:07 scsi_free_sdev and slave destroy Krishna Murthy
2003-11-25 15:23 ` James Bottomley
2003-11-27 13:19   ` scsi_scan_target and SCSI_2 Krishna Murthy
2003-11-27 14:56     ` Peripheral qualifier 1 not considered in scsi_probe_and_add_lun Krishna Murthy
2003-11-27 15:55       ` James Bottomley
2003-11-27 15:37     ` James Bottomley [this message]
2003-11-27 15:45       ` scsi_scan_target and SCSI_2 Krishna Murthy
2003-11-27 15:57         ` James Bottomley

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=1069947459.1837.28.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=davmyers@cisco.com \
    --cc=krmurthy@cisco.com \
    --cc=linux-scsi@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