mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland Fehrenbacher <rfehrenb@transtec.de>
To: linux-kernel@vger.kernel.org
Subject: Re: qlogicfc driver
Date: Thu, 26 Jul 2001 15:37:24 +0200	[thread overview]
Message-ID: <15200.7444.971399.948422@gargle.gargle.HOWL> (raw)

    Roland> While the controller itself sees all the 3 drives when booting up,
    Roland> under Linux I am only able to see the LUN 0 drives.

    Roland> The command echo "scsi add-single-device 0 0 0 1" > /proc/scsi/scsi
    Roland> makes the LUN 1 device appear, so it seems the problem is with the
    Roland> SCSI scanning code.

In the meantime I found out that I need to identify the RAID controller as a
sparse LUN device. This works fine as long as there is a host drive mapped to
LUN 0. If there is no host drive mapped to LUN 0, we run into a bug of the SCSI
scanning code: The variable *sparse_lun=1 never gets set and any other host
drives at LUNs > 0 are not detected. This problem has already been discussed
in a different context previously
(http://groups.google.com/groups?q=scsi_scan.c&hl=en&safe=off&rnum=2&selm=F888C30C3021D411B9DA00B0D0209BE8FAB0EB%40cvo-exchange.roguewave.com).

The following patch fixes the problem, and I can't see any side effects. Please
review the patch, and if approved, include it in the kernel.

Cheers,

Roland

--- scsi_scan.c.orig    Mon Jul 23 09:24:53 2001
+++ scsi_scan.c Thu Jul 26 16:29:14 2001
@@ -153,6 +153,8 @@
        {"DELL", "PSEUDO DEVICE .",   "*", BLIST_SPARSELUN}, // Dell PV 530F
        {"DELL", "PV530F",    "*", BLIST_SPARSELUN}, // Dell PV 530F
        {"EMC", "SYMMETRIX", "*", BLIST_SPARSELUN},
+       {"CMD", "CRA-7280", "*", BLIST_SPARSELUN},   // CMD RAID Controller
+       {"Zzyzx", "RocketStor 500S", "*", BLIST_SPARSELUN}, // Zzyzx RocketStor Raid
        {"SONY", "TSL",       "*", BLIST_FORCELUN},  // DDS3 & DDS4 autoloaders
        {"DELL", "PERCRAID", "*", BLIST_FORCELUN},
        {"HP", "NetRAID-4M", "*", BLIST_FORCELUN},
@@ -565,20 +567,26 @@
        }
 
        /*
-        * Check the peripheral qualifier field - this tells us whether LUNS
-        * are supported here or not.
+        * Check for SPARSELUN before checking the peripheral qualifier,
+        * so sparse lun devices are completely scanned.
         */
-       if ((scsi_result[0] >> 5) == 3) {
-               scsi_release_request(SRpnt);
-               return 0;       /* assume no peripheral if any sort of error */
-       }
 
        /*
         * Get any flags for this device.  
         */
        bflags = get_device_flags (scsi_result);
 
-
+       if (bflags & BLIST_SPARSELUN) {
+         *sparse_lun = 1;
+       }
+       /*
+        * Check the peripheral qualifier field - this tells us whether LUNS
+        * are supported here or not.
+        */
+       if ((scsi_result[0] >> 5) == 3) {
+               scsi_release_request(SRpnt);
+               return 0;       /* assume no peripheral if any sort of error */
+       }
         /*   The Toshiba ROM was "gender-changed" here as an inline hack.
              This is now much more generic.
              This is a mess: What we really want is to leave the scsi_result

             reply	other threads:[~2001-07-26 14:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-26 13:37 Roland Fehrenbacher [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-07-26 13:32 Roland Fehrenbacher
2001-07-20 21:01 Roland Fehrenbacher
2001-07-20 22:15 ` jsack
2001-07-20 16:20 Roland Fehrenbacher
2001-07-20 15:40 Roland Fehrenbacher
2001-06-29 21:33 Dmitry Meshchaninov
2001-06-29 21:41 ` Jeff Garzik
2001-06-29 21:59 ` David S. Miller
2001-07-02  8:19   ` christophe barbé
2001-06-01  9:20 christophe barbé

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=15200.7444.971399.948422@gargle.gargle.HOWL \
    --to=rfehrenb@transtec.de \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®