From: Christoph Hellwig <hch@infradead.org>
To: Hannes Reinecke <hare@suse.de>
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 15:01:40 +0100 [thread overview]
Message-ID: <20050518140140.GA22570@infradead.org> (raw)
In-Reply-To: <428B0E4D.50505@suse.de>
> 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.
next prev parent reply other threads:[~2005-05-18 14:01 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 [this message]
2005-05-18 14:05 ` Hannes Reinecke
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=20050518140140.GA22570@infradead.org \
--to=hch@infradead.org \
--cc=James.Bottomley@SteelEye.com \
--cc=hare@suse.de \
--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