aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorSong Liu <songliubraving@fb.com>2014-12-30 17:46:18 -0500
committerChristoph Hellwig <hch@lst.de>2015-01-09 09:44:19 -0500
commit08024885a2a3ed432716e9d50046a620a5b2df05 (patch)
tree52e0042dac2c8651641987da49163908c3305e74 /include/linux
parent921ce7f5786052749a22a75780f5ce1a456bcdc6 (diff)
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/enclosure.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/enclosure.h b/include/linux/enclosure.h
index 0f826c14a337..7be22da321f3 100644
--- a/include/linux/enclosure.h
+++ b/include/linux/enclosure.h
@@ -79,6 +79,11 @@ struct enclosure_component_callbacks {
79 int (*set_locate)(struct enclosure_device *, 79 int (*set_locate)(struct enclosure_device *,
80 struct enclosure_component *, 80 struct enclosure_component *,
81 enum enclosure_component_setting); 81 enum enclosure_component_setting);
82 void (*get_power_status)(struct enclosure_device *,
83 struct enclosure_component *);
84 int (*set_power_status)(struct enclosure_device *,
85 struct enclosure_component *,
86 int);
82 int (*show_id)(struct enclosure_device *, char *buf); 87 int (*show_id)(struct enclosure_device *, char *buf);
83}; 88};
84 89
@@ -94,6 +99,7 @@ struct enclosure_component {
94 int locate; 99 int locate;
95 int slot; 100 int slot;
96 enum enclosure_status status; 101 enum enclosure_status status;
102 int power_status;
97}; 103};
98 104
99struct enclosure_device { 105struct enclosure_device {