ses: Add power_status to SES device slot
Add power_status to SES device slot, so we can power on/off the HDDs behind the enclosure. Check firmware status in ses_set_* before sending control pages to firmware. Signed-off-by: Song Liu <songliubraving@fb.com> Acked-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Jens Axboe <axboe@fb.com> Cc: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:

committed by
Christoph Hellwig

parent
921ce7f578
commit
08024885a2
@@ -79,6 +79,11 @@ struct enclosure_component_callbacks {
|
||||
int (*set_locate)(struct enclosure_device *,
|
||||
struct enclosure_component *,
|
||||
enum enclosure_component_setting);
|
||||
void (*get_power_status)(struct enclosure_device *,
|
||||
struct enclosure_component *);
|
||||
int (*set_power_status)(struct enclosure_device *,
|
||||
struct enclosure_component *,
|
||||
int);
|
||||
int (*show_id)(struct enclosure_device *, char *buf);
|
||||
};
|
||||
|
||||
@@ -94,6 +99,7 @@ struct enclosure_component {
|
||||
int locate;
|
||||
int slot;
|
||||
enum enclosure_status status;
|
||||
int power_status;
|
||||
};
|
||||
|
||||
struct enclosure_device {
|
||||
|
Reference in New Issue
Block a user