public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb•de>
To: linuxppc-dev@ozlabs•org, minyard@acm•org
Cc: Christian Krafft <krafft@de•ibm.com>,
	openipmi-developer@lists•sourceforge.net
Subject: Re: [Openipmi-developer] [patch 1/1] ipmi: add autosensing of ipmi device on powerpc using device-tree
Date: Fri, 8 Dec 2006 20:49:01 +0100	[thread overview]
Message-ID: <200612082049.02545.arnd@arndb.de> (raw)
In-Reply-To: <20061208185902.GA14675@localdomain>

On Friday 08 December 2006 19:59, Corey Minyard wrote:

> 
> +       if (match->data) {
> +               dev_warn(&dev->dev, "unknown interface type\n");
> +               return -ENODEV;
> +       }
> +
> 
> What's this mean?  I don't understand the error.

The check is bogus and should be removed. The effect is that
only SI_KCS can work, all others will be rejected.

> +	info->io.regsize	= resource0.end - resource0.start + 1;
> +	info->io.regspacing	= resource1.start - resource0.start;
> 
> Are you sure this is a reliable way to check the register spacing and
> register size?  Register size means "how big is a register (8, 16, 32
> bits)".  Register spacing means (how many bytes are there between
> registers.  If you had two registers that were 8 bits and 4 bytes
> apart, for instance, I don't believe the above calculations would work.

Looks right to me. Assume these of properties

#address-cells: <1>
#size-cells: <1>
reg: <0x100> <1> <0x104> <1> /* start, length, start, length */

converting them to resources gives you

resource0 = { .start = 0x100, .end = 0x100, }
resource1 = { .start = 0x104, .end = 0x104, }

consequently, you end up with

info->io = {
	.regsize = 1,
	.regspacing = 4,
	.addr_data = 0x100,
};

which is exactly what you want.

> +static int ipmi_of_remove(struct of_device *dev)
> +{
> +	return 0;
> +}
> 
> With the newest IPMI patches (only in git right now), hot removal of
> interfaces is supported.  Is that what this is for?  If so, you can
> call cleanup_one_si() on the interface.

ok, great.

> Here's a new patch.  Can you test that unloading the module works
> correctly?

Christian has already gone home for the weekend, and I don't have
access to his machine, so testing will probably have to wait until
Monday.

> +static void __devinit of_find_bmc(void)
> +{
> +	of_register_platform_driver(&ipmi_of_platform_driver);
> +}
> +#endif /* CONFIG_PPC_OF */

I guess this function could also be removed entirely, it doesn't
add anything useful.

	Arnd <><

  reply	other threads:[~2006-12-08 19:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-07 16:22 [patch 0/1] ipmi: add autosensing of ipmi device on powerpc using device-tree Christian Krafft
2006-12-07 16:24 ` [patch 1/1] " Christian Krafft
2006-12-08 10:24   ` Heiko Joerg Schick
2006-12-08 17:19   ` [Openipmi-developer] " Corey Minyard
2006-12-11 12:13     ` Christian Krafft
2006-12-08 18:59   ` Corey Minyard
2006-12-08 19:49     ` Arnd Bergmann [this message]
2006-12-08 22:50     ` Benjamin Herrenschmidt
2006-12-09  0:00       ` Arnd Bergmann
2006-12-09  0:07         ` Corey Minyard
2006-12-09 11:44           ` Arnd Bergmann
2006-12-10 18:42             ` Heiko J Schick
2006-12-11 10:11               ` Arnd Bergmann
2006-12-11 13:01                 ` Heiko J Schick
2006-12-11 13:37                   ` Segher Boessenkool
2006-12-11 13:18               ` Segher Boessenkool
2006-12-11 14:25                 ` Arnd Bergmann
2006-12-11 16:28                   ` Heiko J Schick
2006-12-11 16:58                     ` Segher Boessenkool
2006-12-11 17:20                       ` Christian Krafft
2006-12-11 16:54                   ` Segher Boessenkool
2006-12-09  2:14         ` Benjamin Herrenschmidt
2006-12-09  9:46         ` Segher Boessenkool
2006-12-09 11:46           ` Arnd Bergmann
2006-12-08  0:41 ` [patch 0/1] " Paul Mackerras
2006-12-08 14:04   ` Arnd Bergmann
2006-12-08 17:17     ` [Openipmi-developer] " Corey Minyard

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=200612082049.02545.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=krafft@de$(echo .)ibm.com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=minyard@acm$(echo .)org \
    --cc=openipmi-developer@lists$(echo .)sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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