Commit e985c58f authored by Stephen Cameron's avatar Stephen Cameron Committed by James Bottomley

hpsa: allow lockup detected to be viewed via sysfs

expose a detected lockup via sysfs
Reviewed-by: default avatarScott Teel <scott.teel@pmcs.com>
Reviewed-by: default avatarKevin Barnett <kevin.barnett@pmcs.com>
Reviewed-by: default avatarTomas Henzl <thenzl@redhat.com>
Reviewed-by: default avatarHannes Reinecke <hare@Suse.de>
Signed-off-by: default avatarDon Brace <don.brace@pmcs.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent 9437ac43
...@@ -351,6 +351,20 @@ static int check_for_busy(struct ctlr_info *h, struct CommandList *c) ...@@ -351,6 +351,20 @@ static int check_for_busy(struct ctlr_info *h, struct CommandList *c)
return 1; return 1;
} }
static u32 lockup_detected(struct ctlr_info *h);
static ssize_t host_show_lockup_detected(struct device *dev,
struct device_attribute *attr, char *buf)
{
int ld;
struct ctlr_info *h;
struct Scsi_Host *shost = class_to_shost(dev);
h = shost_to_hba(shost);
ld = lockup_detected(h);
return sprintf(buf, "ld=%d\n", ld);
}
static ssize_t host_store_hp_ssd_smart_path_status(struct device *dev, static ssize_t host_store_hp_ssd_smart_path_status(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
const char *buf, size_t count) const char *buf, size_t count)
...@@ -698,12 +712,15 @@ static DEVICE_ATTR(transport_mode, S_IRUGO, ...@@ -698,12 +712,15 @@ static DEVICE_ATTR(transport_mode, S_IRUGO,
host_show_transport_mode, NULL); host_show_transport_mode, NULL);
static DEVICE_ATTR(resettable, S_IRUGO, static DEVICE_ATTR(resettable, S_IRUGO,
host_show_resettable, NULL); host_show_resettable, NULL);
static DEVICE_ATTR(lockup_detected, S_IRUGO,
host_show_lockup_detected, NULL);
static struct device_attribute *hpsa_sdev_attrs[] = { static struct device_attribute *hpsa_sdev_attrs[] = {
&dev_attr_raid_level, &dev_attr_raid_level,
&dev_attr_lunid, &dev_attr_lunid,
&dev_attr_unique_id, &dev_attr_unique_id,
&dev_attr_hp_ssd_smart_path_enabled, &dev_attr_hp_ssd_smart_path_enabled,
&dev_attr_lockup_detected,
NULL, NULL,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment