From: Andrey Panin <pazke@donpac.ru>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] 2.6.13-rc5-mm1, driver for IBM Automatic Server Restart watchdog
Date: Thu, 18 Aug 2005 08:49:14 +0400 [thread overview]
Message-ID: <20050818044914.GB27780@pazke> (raw)
In-Reply-To: <20050817131415.3bd1d5af.akpm@osdl.org>
[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]
On 229, 08 17, 2005 at 01:14:15PM -0700, Andrew Morton wrote:
> Andrey Panin <pazke@donpac.ru> wrote:
> >
> >
> > This patch adds driver for IBM Automatic Server Restart watchdog hardware
> > found in some IBM eServer xSeries machines. This driver is based on the ugly
> > driver provided by IBM. Driver was tested on IBM eServer 226.
> >
> > ...
> > +
> > + case ASMTYPE_JASPER:
> > + type = "Jaspers ";
> > +
> > + /* FIXME: need to use pci_config_lock here, but it's not exported */
>
> That's gregkh material.
>
> > +
> > +/* spin_lock_irqsave(&pci_config_lock, flags);*/
> > +
> > + /* Select the SuperIO chip in the PCI I/O port register */
> > + outl(0x8000f858, 0xcf8);
> > +
> > + /*
> > + * Read the base address for the SuperIO chip.
> > + * Only the lower 16 bits are valid, but the address is word
> > + * aligned so the last bit must be masked off.
> > + */
> > + asr_base = inl(0xcfc) & 0xfffe;
> > +
> > +/* spin_unlock_irqrestore(&pci_config_lock, flags);*/
> >
> > ...
> >
> > +static int asr_ioctl(struct inode *inode, struct file *file,
> > + unsigned int cmd, unsigned long arg)
> > +{
> > + static const struct watchdog_info ident = {
> > + .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT |
> > + WDIOF_MAGICCLOSE,
> > + .identity = "IBM ASR"
> > + };
> > + void __user *argp = (void __user *)arg;
> > + int __user *p = argp;
> > + int heartbeat;
> > +
> > + switch (cmd) {
> > + case WDIOC_GETSUPPORT:
> > + return copy_to_user(argp, &ident, sizeof(ident)) ?
> > + -EFAULT : 0;
> > +
> > + case WDIOC_GETSTATUS:
> > + case WDIOC_GETBOOTSTATUS:
> > + return put_user(0, p);
> > +
> > + case WDIOC_KEEPALIVE:
> > + asr_toggle();
> > + return 0;
> > +
> > +
> > + case WDIOC_SETTIMEOUT:
> > + if (get_user(heartbeat, p))
> > + return -EFAULT;
> > + /* Fall */
> > +
> > + case WDIOC_GETTIMEOUT:
> > + heartbeat = 256;
> > + return put_user(heartbeat, p);
>
> Something very wrong is happening with WDIOC_SETTIMEOUT and
> WDIOC_GETTIMEOUT. They're both no-ops and the effect of WDIOC_SETTIMEOUT
> is immidiately overwritten.
Hardware has fixed timeout value, so WDIOC_SETTIMEOUT is noop and WDIOC_GETTIMEOUT
always returns 256.
--
Andrey Panin | Linux and UNIX system administrator
pazke@donpac.ru | PGP key: wwwkeys.pgp.net
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-08-18 4:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-10 10:32 [PATCH 0/5] 2.6.13-rc5-mm1, remove uneeded function Andrey Panin
2005-08-10 10:32 ` [PATCH 1/5] 2.6.13-rc5-mm1, remove old debugging code Andrey Panin
2005-08-10 10:32 ` [PATCH 2/5] 2.6.13-rc5-mm1, make dmi_string() behave like strdup() Andrey Panin
2005-08-10 10:32 ` [PATCH 3/5] 2.6.13-rc5-mm1, add onboard devices discovery Andrey Panin
2005-08-10 10:32 ` [PATCH 4/5] 2.6.13-rc5-mm1, IPMI, use dmi_find_device() Andrey Panin
2005-08-10 10:32 ` [PATCH 5/5] 2.6.13-rc5-mm1, driver for IBM Automatic Server Restart watchdog Andrey Panin
2005-08-17 20:14 ` Andrew Morton
2005-08-18 4:49 ` Andrey Panin [this message]
2005-08-10 14:12 ` [PATCH 4/5] 2.6.13-rc5-mm1, IPMI, use dmi_find_device() 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=20050818044914.GB27780@pazke \
--to=pazke@donpac.ru \
--cc=akpm@osdl.org \
--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
all inboxes | Powered by JetHome®