public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: mike.miller@hp.com
Cc: linux-kernel@vger.kernel.org, mochel@osdl.org, akpm@osdl.org,
	eric.moore@lsil.com, linux-scsi@vger.kernel.org, greg@kroah.com
Subject: Re: cciss CSMI via sysfs for 2.6
Date: Fri, 18 Feb 2005 19:46:28 +0000	[thread overview]
Message-ID: <20050218194628.GA24583@infradead.org> (raw)
In-Reply-To: <20050216164512.GA5734@beardog.cca.cpqcorp.net>

>  /*
> + * sysfs stuff
> + * this should be moved to it's own file, maybe cciss_sysfs.h
> + */
> +
> +static ssize_t cciss_firmver_show(struct device *dev, char *buf)
> +{
> +	ctlr_info_t *h = dev->driver_data;
> +        return sprintf(buf,"%c%c%c%c\n", h->firm_ver[0], h->firm_ver[1],
> +                                h->firm_ver[2], h->firm_ver[3]);
> +}

I really wish we had a common firmver release attribut in the driver
core, as mentioned in the fc transport class thread.  Greg?

> +static ssize_t cciss_bus_id_show(struct device *dev, char *buf)
> +{
> +        return sprintf(buf,"%s\n", dev->bus_id);
> +}

this one is already exposed in the name of the sysfs link,
see bus_add_device()

> +	return sprintf(buf, "%x %x %x %x%x%x%x%x%x%x%x %x%x%x%x%x%x%x%x "
> +				"%x %x %x%x%x%x%x%x\n",
> +		p.bDeviceType, p.bRestricted, p.bInitiatorPortProtocol,
> +		p.bRestricted2[0], 
> +		p.bRestricted2[1], 
> +		p.bRestricted2[2],
> +		p.bRestricted2[3], 
> +		p.bRestricted2[4], 
> +		p.bRestricted2[5],
> +		p.bRestricted2[6], 
> +		p.bRestricted2[7],
> +	 	p.bSASAddress[0],
> +	 	p.bSASAddress[1],
> +	 	p.bSASAddress[2],
> +	 	p.bSASAddress[3],
> +	 	p.bSASAddress[4],
> +	 	p.bSASAddress[5],
> +	 	p.bSASAddress[6],
> +	 	p.bSASAddress[7],
> +		p.bPhyIdentifier, p.bSignalClass,
> +		p.bReserved[0],
> +		p.bReserved[1],
> +		p.bReserved[2],
> +		p.bReserved[3],
> +		p.bReserved[4],
> +		p.bReserved[5]);
> +}

This belongs into a SAS/SATA phy transport class and should be split
into multiple attributes.


  reply	other threads:[~2005-02-18 19:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-16 16:45 cciss CSMI via sysfs for 2.6 mike.miller
2005-02-18 19:46 ` Christoph Hellwig [this message]
2005-02-18 20:05   ` Greg KH
2005-02-18 22:42     ` James Bottomley
2005-03-02  5:15     ` Christoph Hellwig
2005-02-19 19:12 ` Toon van der Pas
  -- strict thread matches above, loose matches on Subject: below --
2005-02-22 14:50 Miller, Mike (OS Dev)

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=20050218194628.GA24583@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@osdl.org \
    --cc=eric.moore@lsil.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mike.miller@hp.com \
    --cc=mochel@osdl.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox