]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ses: show devices for enclosures with no page 7
authorJohn Hughes <john@Calva.COM>
Wed, 4 Nov 2009 18:01:22 +0000 (19:01 +0100)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 14 Mar 2012 14:56:52 +0000 (10:56 -0400)
commit 877a55979c189c590e819a61cbbe2b7947875f17 upstream.

enclosure page 7 gives us the "pretty" names of the enclosure slots.
Without a page 7, we can still use the enclosure code as long as we
make up numeric names for the slots. Unfortunately, the current code
fails to add any devices because the check for page 10 is in the wrong
place if we have no page 7.  Fix it so that devices show up even if
the enclosure has no page 7.

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/scsi/ses.c

index 7f5a6a86f820fbae8baee63e7de722b480c96462..3b00e907b9174ca741bce04aefa8356856292095 100644 (file)
@@ -390,9 +390,9 @@ static void ses_enclosure_data_process(struct enclosure_device *edev,
                len = (desc_ptr[2] << 8) + desc_ptr[3];
                /* skip past overall descriptor */
                desc_ptr += len + 4;
-               if (ses_dev->page10)
-                       addl_desc_ptr = ses_dev->page10 + 8;
        }
+       if (ses_dev->page10)
+               addl_desc_ptr = ses_dev->page10 + 8;
        type_ptr = ses_dev->page1 + 12 + ses_dev->page1[11];
        components = 0;
        for (i = 0; i < types; i++, type_ptr += 4) {