All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Brace <don.brace@microsemi.com>
To: Hannes Reinecke <hare@suse.de>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	Martin Wilck <martin.wilck@suse.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Hannes Reinecke <hare@suse.com>
Subject: RE: [PATCH 3/3] hpsa: add 'ctlr_num' sysfs attribute
Date: Tue, 29 Nov 2016 02:03:36 +0000	[thread overview]
Message-ID: <4993A297653ECB4581FA5C3C31323D193B0CCD11@avsrvexchmbx1.microsemi.net> (raw)
In-Reply-To: <1479454369-100281-4-git-send-email-hare@suse.de>

> -----Original Message-----
> From: Hannes Reinecke [mailto:hare@suse.de]
> Sent: Friday, November 18, 2016 1:33 AM
> To: Martin K. Petersen
> Cc: Christoph Hellwig; James Bottomley; Don Brace; Martin Wilck; linux-
> scsi@vger.kernel.org; Hannes Reinecke; Hannes Reinecke
> Subject: [PATCH 3/3] hpsa: add 'ctlr_num' sysfs attribute
> 
> EXTERNAL EMAIL
> 
> 
> Add a sysfs attribute 'ctlr_num' holding the current HPSA controller
> number. This is required to construct compability 'cciss' links.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.com>
> ---
>  drivers/scsi/hpsa.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
> index 3d89f74..5834117 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -867,6 +867,16 @@ static ssize_t path_info_show(struct device *dev,
>         return output_len;
>  }
> 
> +static ssize_t host_show_ctlr_num(struct device *dev,
> +       struct device_attribute *attr, char *buf)
> +{
> +       struct ctlr_info *h;
> +       struct Scsi_Host *shost = class_to_shost(dev);
> +
> +       h = shost_to_hba(shost);
> +       return snprintf(buf, 20, "%d\n", h->ctlr);
> +}
> +
>  static DEVICE_ATTR(raid_level, S_IRUGO, raid_level_show, NULL);
>  static DEVICE_ATTR(lunid, S_IRUGO, lunid_show, NULL);
>  static DEVICE_ATTR(unique_id, S_IRUGO, unique_id_show, NULL);
> @@ -890,6 +900,8 @@ static DEVICE_ATTR(resettable, S_IRUGO,
>         host_show_resettable, NULL);
>  static DEVICE_ATTR(lockup_detected, S_IRUGO,
>         host_show_lockup_detected, NULL);
> +static DEVICE_ATTR(ctlr_num, S_IRUGO,
> +       host_show_ctlr_num, NULL);
> 
>  static struct device_attribute *hpsa_sdev_attrs[] = {
>         &dev_attr_raid_level,
> @@ -910,6 +922,7 @@ static DEVICE_ATTR(lockup_detected, S_IRUGO,
>         &dev_attr_hp_ssd_smart_path_status,
>         &dev_attr_raid_offload_debug,
>         &dev_attr_lockup_detected,
> +       &dev_attr_ctlr_num,
>         NULL,
>  };
> 
> --
> 1.8.5.6

Acked-by: Don Brace <don.brace@microsemi.com>


  reply	other threads:[~2016-11-29  2:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18  7:32 [PATCH 0/3] hpsa compatility fixes Hannes Reinecke
2016-11-18  7:32 ` [PATCH 1/3] hpsa: use correct DID_NO_CONNECT hostbyte Hannes Reinecke
2016-11-29  2:02   ` Don Brace
2016-11-18  7:32 ` [PATCH 2/3] hpsa: fallback to use legacy REPORT PHYS command Hannes Reinecke
2016-11-22 13:21   ` Martin Wilck
2016-11-29 16:10   ` Martin K. Petersen
2016-12-01 21:50   ` Don Brace
2016-12-02 10:23     ` Hannes Reinecke
2016-11-18  7:32 ` [PATCH 3/3] hpsa: add 'ctlr_num' sysfs attribute Hannes Reinecke
2016-11-29  2:03   ` Don Brace [this message]
2016-11-29 16:11 ` [PATCH 0/3] hpsa compatility fixes Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4993A297653ECB4581FA5C3C31323D193B0CCD11@avsrvexchmbx1.microsemi.net \
    --to=don.brace@microsemi.com \
    --cc=hare@suse.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=martin.wilck@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.