* Re: cciss CSMI via sysfs for 2.6
[not found] <20050216164512.GA5734@beardog.cca.cpqcorp.net>
@ 2005-02-18 19:46 ` Christoph Hellwig
2005-02-18 20:05 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2005-02-18 19:46 UTC (permalink / raw)
To: mike.miller; +Cc: linux-kernel, mochel, akpm, eric.moore, linux-scsi, greg
> /*
> + * 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cciss CSMI via sysfs for 2.6
2005-02-18 19:46 ` cciss CSMI via sysfs for 2.6 Christoph Hellwig
@ 2005-02-18 20:05 ` Greg KH
2005-02-18 22:42 ` James Bottomley
2005-03-02 5:15 ` Christoph Hellwig
0 siblings, 2 replies; 4+ messages in thread
From: Greg KH @ 2005-02-18 20:05 UTC (permalink / raw)
To: Christoph Hellwig, mike.miller, linux-kernel, mochel, akpm,
eric.moore, linux-scsi
On Fri, Feb 18, 2005 at 07:46:28PM +0000, Christoph Hellwig wrote:
> > /*
> > + * 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?
For a device? It seems a huge overkill to add this attribute for
_every_ device in the system, when only a small minority can actually
use it. Just put it as a default scsi or transport class attribute
instead.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cciss CSMI via sysfs for 2.6
2005-02-18 20:05 ` Greg KH
@ 2005-02-18 22:42 ` James Bottomley
2005-03-02 5:15 ` Christoph Hellwig
1 sibling, 0 replies; 4+ messages in thread
From: James Bottomley @ 2005-02-18 22:42 UTC (permalink / raw)
To: Greg KH
Cc: Christoph Hellwig, mike.miller, Linux Kernel, mochel,
Andrew Morton, eric.moore, SCSI Mailing List
On Fri, 2005-02-18 at 12:05 -0800, Greg KH wrote:
> For a device? It seems a huge overkill to add this attribute for
> _every_ device in the system, when only a small minority can actually
> use it. Just put it as a default scsi or transport class attribute
> instead.
Actually, we might be able to do this as a simple attribute container
rather than a transport class, but I agree, it's not a generic property
of every device.
James
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cciss CSMI via sysfs for 2.6
2005-02-18 20:05 ` Greg KH
2005-02-18 22:42 ` James Bottomley
@ 2005-03-02 5:15 ` Christoph Hellwig
1 sibling, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2005-03-02 5:15 UTC (permalink / raw)
To: Greg KH
Cc: Christoph Hellwig, mike.miller, linux-kernel, mochel, akpm,
eric.moore, linux-scsi
On Fri, Feb 18, 2005 at 12:05:52PM -0800, Greg KH wrote:
> On Fri, Feb 18, 2005 at 07:46:28PM +0000, Christoph Hellwig wrote:
> > > /*
> > > + * 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?
>
> For a device? It seems a huge overkill to add this attribute for
> _every_ device in the system, when only a small minority can actually
> use it. Just put it as a default scsi or transport class attribute
> instead.
it's not related to scsi or a transport at all. I'd rather have the
notation of optional generic attributes so that every driver that
wantsa to publish it does so in the same way.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-03-02 5:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20050216164512.GA5734@beardog.cca.cpqcorp.net>
2005-02-18 19:46 ` cciss CSMI via sysfs for 2.6 Christoph Hellwig
2005-02-18 20:05 ` Greg KH
2005-02-18 22:42 ` James Bottomley
2005-03-02 5:15 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox