linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch for scsi_scan.c (was: qlogicfc driver)
@ 2001-08-01  8:02 Roland Fehrenbacher
  0 siblings, 0 replies; only message in thread
From: Roland Fehrenbacher @ 2001-08-01  8:02 UTC (permalink / raw)
  To: linux-kernel

Hi,

it seems nobody was interested in the thread qlogicfc. Here is a patch for
scsi_scan.c (against the 2.4.7 version) which solves the problem described in
the last few messages of the qlogicfc thread. It is absolutely necessary for
sparse_lun devices with LUN 0 not present.

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-01  9:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-01  8:02 Patch for scsi_scan.c (was: qlogicfc driver) Roland Fehrenbacher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).