From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] Sanitize PQ3 device handling
Date: Wed, 18 May 2005 16:05:36 +0200 [thread overview]
Message-ID: <428B4BB0.9040306@suse.de> (raw)
In-Reply-To: <20050518140140.GA22570@infradead.org>
Christoph Hellwig wrote:
>> res = scsi_probe_and_add_lun(starget, 0, &bflags, &sdev, rescan, NULL);
>>- if (res == SCSI_SCAN_LUN_PRESENT) {
>>- if (scsi_report_lun_scan(sdev, bflags, rescan) != 0)
>>+ if (res != SCSI_SCAN_NO_RESPONSE) {
>>+ if (scsi_report_lun_scan(sdev, bflags, rescan) != 0) {
>> /*
>> * The REPORT LUN did not scan the target,
>> * do a sequential scan.
>> */
>>+ if (res == SCSI_SCAN_TARGET_PRESENT)
>>+ /*
>>+ * 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.
>>+ *
>>+ * The old code also used a default scsi level
>>+ * of SCSI_2 which seems a bit spurious. Any
>>+ * misbehaving device should rather be added
>>+ * to the blacklist.
>>+ */
>>+ bflags |= BLIST_SPARSELUN;
>>+
>> scsi_sequential_lun_scan(starget, bflags,
>> res, sdev->scsi_level, rescan);
>
> If scsi_probe_and_add_lun returns SCSI_SCAN_TARGET_PRESENT sdev isn't valid at
> this point. You should probably default to SCSI_2 for that case.
>
How so? This is exactly the behaviour I've removed. sdev is valid even
for SCSI_SCAN_TARGET_PRESENT.
If not please show me.
Cheers,
Hannes
--
Dr. Hannes Reinecke hare@suse.de
SuSE Linux AG S390 & zSeries
Maxfeldstraße 5 +49 911 74053 688
90409 Nürnberg http://www.suse.de
-
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
next prev parent reply other threads:[~2005-05-18 14:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-18 9:43 [PATCH] Sanitize PQ3 device handling Hannes Reinecke
2005-05-18 14:01 ` Christoph Hellwig
2005-05-18 14:05 ` Hannes Reinecke [this message]
2005-05-18 14:14 ` Christoph Hellwig
2005-05-18 14:33 ` Hannes Reinecke
2005-05-18 17:06 ` Luben Tuikov
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=428B4BB0.9040306@suse.de \
--to=hare@suse.de \
--cc=James.Bottomley@SteelEye.com \
--cc=hch@infradead.org \
--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 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.