aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJohn Hughes <john@Calva.COM>2009-11-04 13:01:22 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-03-23 12:35:57 -0400
commit877a55979c189c590e819a61cbbe2b7947875f17 (patch)
tree8d16554228cd8b710c885fcaaa48b592bd8e24e5 /drivers/scsi
parent4bbba111d94781d34081c37856bbc5eb33f6c72a (diff)
[SCSI] ses: show devices for enclosures with no page 7
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. Cc: stable@kernel.org Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ses.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 7f5a6a86f820..3b00e907b917 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -390,9 +390,9 @@ static void ses_enclosure_data_process(struct enclosure_device *edev,
390 len = (desc_ptr[2] << 8) + desc_ptr[3]; 390 len = (desc_ptr[2] << 8) + desc_ptr[3];
391 /* skip past overall descriptor */ 391 /* skip past overall descriptor */
392 desc_ptr += len + 4; 392 desc_ptr += len + 4;
393 if (ses_dev->page10)
394 addl_desc_ptr = ses_dev->page10 + 8;
395 } 393 }
394 if (ses_dev->page10)
395 addl_desc_ptr = ses_dev->page10 + 8;
396 type_ptr = ses_dev->page1 + 12 + ses_dev->page1[11]; 396 type_ptr = ses_dev->page1 + 12 + ses_dev->page1[11];
397 components = 0; 397 components = 0;
398 for (i = 0; i < types; i++, type_ptr += 4) { 398 for (i = 0; i < types; i++, type_ptr += 4) {