public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Doug Warzecha <Douglas_Warzecha@dell.com>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org, Michael_E_Brown@dell.com,
	Matt_Domsch@dell.com
Subject: Re: [RFC][PATCH 2.6.13-rc6] add Dell Systems Management Base Driver (dcdbas) with sysfs support
Date: Tue, 16 Aug 2005 19:02:13 -0500	[thread overview]
Message-ID: <20050817000213.GA3645@sysman-doug.us.dell.com> (raw)
In-Reply-To: <20050816055247.GA20697@kroah.com>

On Mon, Aug 15, 2005 at 10:52:48PM -0700, Greg KH wrote:
> On Mon, Aug 15, 2005 at 03:05:22PM -0500, Doug Warzecha wrote:
> > +
> > +1) Lock smi_data.
> > +2) Determine buffer size needed for system management command.
> > +3) Write buffer size needed to smi_data_buf_size.
> > +   (Driver will ensure that its SMI data buffer is at least that size.)
> 
> Why have this step?  Why is it needed?  Just go off of the size of the
> buffer that is written to smi_data.  Or am I missing something?

I'll change smi_data_write to do that.

> > +4) If physical address of SMI data buffer is needed to set up system
> > +   management command, read physical address from smi_data_buf_phys_addr
> > +   and add to command data.
> 
> How do you know this?

It depends on the SMI calling convention.  Dell OpenManage needs the physical address for the SMI to get the ESM log on the PowerEdge systems listed in this doc.

> > +#define DCDBAS_DEV_ATTR_RW(_name) \
> > +	DEVICE_ATTR(_name,0644,_name##_show,_name##_store);
> > +
> > +#define DCDBAS_DEV_ATTR_RO(_name) \
> > +	DEVICE_ATTR(_name,0444,_name##_show,NULL);
> 
> Why let all users read this data?

Will be changed so that only owner can read.

> > +#define DCDBAS_BIN_ATTR_RW(_name) \
> > +struct bin_attribute bin_attr_##_name = { \
> > +	.attr =  { .name = __stringify(_name), \
> > +		   .mode = 0644, \
> 
> Why let everyone read this data?

Will be changed so that only owner can read.

> > +struct callintf_cmd {
> > +	u32 magic;
> 
> Why even have this?  Does it really stop anything except random
> scribblings?

It's to stop random writing.

> > +	u16 command_address;
> > +	u8 command_code;
> > +	u8 reserved;
> > +	u32 command_signature;
> > +	u8 command_buffer[1];
> > +} __attribute__ ((packed));
> 
> As these cross the userspace/kernelspace boundry, please use the __u32,
> __u16, and __u8 variable types.

Will be changed.

> > +struct apm_cmd {
> > +	u8 command;
> > +	s8 status;
> > +	u16 reserved;
> > +	union {
> > +		struct {
> > +			u8 parm[MAX_SYSMGMT_SHORTCMD_PARMBUF_LEN];
> > +		} __attribute__ ((packed)) shortreq;
> > +
> > +		struct {
> > +			u16 num_sg_entries;
> > +			struct {
> > +				u32 size;
> > +				u64 addr;
> > +			} __attribute__ ((packed))
> > +			    sglist[MAX_SYSMGMT_LONGCMD_SGENTRY_NUM];
> > +		} __attribute__ ((packed)) longreq;
> > +	} __attribute__ ((packed)) parameters;
> > +} __attribute__ ((packed));
> 
> Same here (I think...)

Will be changed.

Doug


  reply	other threads:[~2005-08-16 23:47 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-15 20:05 [RFC][PATCH 2.6.13-rc6] add Dell Systems Management Base Driver (dcdbas) with sysfs support Doug Warzecha
2005-08-15 20:23 ` Kyle Moffett
2005-08-15 23:38   ` Doug Warzecha
2005-08-16  1:44     ` Kyle Moffett
2005-08-16  2:43     ` Valdis.Kletnieks
2005-08-16  4:34   ` Chris Wedgwood
2005-08-16  4:55     ` Kyle Moffett
2005-08-16  5:14       ` Chris Wedgwood
2005-08-16  5:52 ` Greg KH
2005-08-17  0:02   ` Doug Warzecha [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-08-15 22:58 Michael_E_Brown
2005-08-16  1:29 ` Kyle Moffett
2005-08-16  3:10   ` Michael E Brown
2005-08-16  5:59     ` Nathan Lutchansky
2005-08-16  8:16     ` Greg KH
2005-08-16 13:34       ` Michael E Brown
2005-08-16 20:31         ` Pavel Machek
2005-08-16 20:37         ` Greg KH
2005-08-16 23:11           ` Michael_E_Brown
2005-08-16 23:23             ` Greg KH
2005-08-16  4:09 Michael E Brown
2005-08-16  5:17 ` Valdis.Kletnieks
2005-08-16  5:30   ` Michael E Brown
2005-08-16  4:58 Michael E Brown
2005-08-16  5:36 ` Valdis.Kletnieks
2005-08-16  6:10   ` Michael E Brown
2005-08-16  6:45     ` Valdis.Kletnieks
2005-08-16 12:15   ` Andrey Panin
2005-08-16  5:19 Michael E Brown
2005-08-16  5:35 ` Chris Wedgwood
2005-08-16  5:50   ` Michael E Brown
2005-08-16 23:47 Michael_E_Brown
2005-08-17  5:33 ` Matt Domsch
2005-08-17  7:32   ` Kyle Moffett
     [not found] <4277B1B44843BA48B0173B5B0A0DED4352817E@ausx3mps301.aus.amer.dell.com.suse.lists.linux.kernel>
     [not found] ` <DEFA2736-585A-4F84-9262-C3EB53E8E2A0@mac.com.suse.lists.linux.kernel>
     [not found]   ` <1124161828.10755.87.camel@soltek.michaels-house.net.suse.lists.linux.kernel>
     [not found]     ` <20050816081622.GA22625@kroah.com.suse.lists.linux.kernel>
     [not found]       ` <1124199265.10755.310.camel@soltek.michaels-house.net.suse.lists.linux.kernel>
     [not found]         ` <20050816203706.GA27198@kroah.com.suse.lists.linux.kernel>
     [not found]           ` <4277B1B44843BA48B0173B5B0A0DED43528192@ausx3mps301.aus.amer.dell.com.suse.lists.linux.kernel>
2005-08-17  0:23             ` Andi Kleen
2005-08-17  0:41               ` Michael E Brown

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=20050817000213.GA3645@sysman-doug.us.dell.com \
    --to=douglas_warzecha@dell.com \
    --cc=Matt_Domsch@dell.com \
    --cc=Michael_E_Brown@dell.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.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