From: Brian King <brking@us.ibm.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] Recognize missing LUNs for non-standard devices
Date: Mon, 06 Feb 2006 16:55:23 -0600 [thread overview]
Message-ID: <43E7D3DB.8060303@us.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0602061649070.17052-100000@iolanthe.rowland.org>
Alan Stern wrote:
> Some protocols (like USB UFI) or devices that don't adhere to the SCSI
> standard may indicate a nonexistent LUN by returning INQUIRY information
> with Peripheral Device Type set to 0x1f (unknown or none) and Peripheral
> Qualifier set to 0 instead of 3 as the spec requires. This patch (as650)
> causes PDT = 0x1f to be recognized as no LUN present regardless of the
> qualifier value, if the SCSI level is equal to 0.
This patch will break the ipr driver. The ipr adapter firmware reports a
logical scsi device which is used for RAID configuration. It reports
a Peripheral Device Type of 0x1f and a scsi level of 0, since it does
not claim compliance with any scsi level.
Brian
>
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
>
> ---
> James:
>
> Since nobody objected when I proposed this last week, I'm now submitting
> it as a real patch.
>
> Alan Stern
>
>
> Index: usb-2.6/drivers/scsi/scsi_scan.c
> ===================================================================
> --- usb-2.6.orig/drivers/scsi/scsi_scan.c
> +++ usb-2.6/drivers/scsi/scsi_scan.c
> @@ -873,6 +873,19 @@ static int scsi_probe_and_add_lun(struct
> goto out_free_result;
> }
>
> + /*
> + * Non-standard SCSI devices may set the PDT to 0x1f (unknown or
> + * no device type) instead of using the peripheral qualifier to
> + * indicate that no LUN is present. For example, USB UFI does this.
> + */
> + if (sdev->scsi_level == 0 && (result[0] & 0x1f) == 0x1f) {
> + SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO
> + "scsi scan: peripheral device type"
> + " of 31, no device added\n"));
> + res = SCSI_SCAN_TARGET_PRESENT;
> + goto out_free_result;
> + }
> +
> res = scsi_add_lun(sdev, result, &bflags);
> if (res == SCSI_SCAN_LUN_PRESENT) {
> if (bflags & BLIST_KEY) {
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
next prev parent reply other threads:[~2006-02-06 22:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-06 21:59 [PATCH] Recognize missing LUNs for non-standard devices Alan Stern
2006-02-06 22:55 ` Brian King [this message]
2006-02-07 14:53 ` Alan Stern
2006-02-07 15:16 ` Brian King
2006-02-07 15:29 ` Alan Stern
2006-02-07 15:40 ` Brian King
2006-02-09 20:26 ` Alan Stern
2006-02-07 20:44 ` David Wysochanski
2006-02-07 21:22 ` Alan Stern
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=43E7D3DB.8060303@us.ibm.com \
--to=brking@us.ibm.com \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.