ses: add reliable slot attribute

The name provided by firmware is in a vendor specific format, publish
the slot number to have a reliable mechanism for identifying slots
across firmware implementations.  If the enclosure does not provide a
slot number fallback to the component number which is guaranteed unique,
and usually mirrors the slot number.

Cleaned up the unused ses_component.desc in the process.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Reviewed-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Dan Williams 2014-12-30 14:46:17 -08:00 committed by Christoph Hellwig
parent 967f7bab0e
commit 921ce7f578
3 changed files with 32 additions and 6 deletions

View file

@ -92,6 +92,7 @@ struct enclosure_component {
int fault;
int active;
int locate;
int slot;
enum enclosure_status status;
};