|
@@ -559,7 +559,15 @@ static void ses_enclosure_data_process(struct enclosure_device *edev,
|
|
|
if (desc_ptr)
|
|
|
desc_ptr += len;
|
|
|
|
|
|
- if (addl_desc_ptr)
|
|
|
+ if (addl_desc_ptr &&
|
|
|
+ /* only find additional descriptions for specific devices */
|
|
|
+ (type_ptr[0] == ENCLOSURE_COMPONENT_DEVICE ||
|
|
|
+ type_ptr[0] == ENCLOSURE_COMPONENT_ARRAY_DEVICE ||
|
|
|
+ type_ptr[0] == ENCLOSURE_COMPONENT_SAS_EXPANDER ||
|
|
|
+ /* these elements are optional */
|
|
|
+ type_ptr[0] == ENCLOSURE_COMPONENT_SCSI_TARGET_PORT ||
|
|
|
+ type_ptr[0] == ENCLOSURE_COMPONENT_SCSI_INITIATOR_PORT ||
|
|
|
+ type_ptr[0] == ENCLOSURE_COMPONENT_CONTROLLER_ELECTRONICS))
|
|
|
addl_desc_ptr += addl_desc_ptr[1] + 2;
|
|
|
|
|
|
}
|