kern/103041: [ipmi] unloading ipmi panics Dell PE 2850,
ipmi doesn't work, 1850 works fine
John Baldwin
jhb at freebsd.org
Tue Dec 5 12:40:08 PST 2006
The following reply was made to PR kern/103041; it has been noted by GNATS.
From: John Baldwin <jhb at freebsd.org>
To: Alexander Logvinov <ports at logvinov.com>
Cc: bug-followup at freebsd.org
Subject: Re: kern/103041: [ipmi] unloading ipmi panics Dell PE 2850, ipmi doesn't work, 1850 works fine
Date: Tue, 5 Dec 2006 15:33:52 -0500
On Monday 04 December 2006 00:31, Alexander Logvinov wrote:
> Hello John!
>
> Saturday, December 2, 2006, 4:42:49 AM, you wrote:
>
> > irq 16 at device 0.4 on pci4
> >> ipmi0: using KSC interface
> >> ipmi0: KCS: Failed to read address
> >> ipmi0: KCS: Failed to read address
> >> ipmi0: KCS: Failed to read address
> >> ipmi0: Failed GET_DEVICE_ID: 5
> > I've yet to determine why these chips don't work. :( They seem to just be
> > broken.
> :(
>
> > Try this patch to fix the kldunload though:
> It works, but:
>
> # kldunload ipmi
> Warning: memory type ipmi leaked memory on destroy (1 allocations, 64 bytes
leaked).
Ok, try below:
Index: ipmi.c
===================================================================
RCS file: /usr/cvs/src/sys/dev/ipmi/ipmi.c,v
retrieving revision 1.6
diff -u -r1.6 ipmi.c
--- ipmi.c 12 Oct 2006 16:26:42 -0000 1.6
+++ ipmi.c 5 Dec 2006 20:32:50 -0000
@@ -756,18 +756,22 @@
error = ipmi_submit_driver_request(sc, req, MAX_TIMEOUT);
if (error == EWOULDBLOCK) {
device_printf(dev, "Timed out waiting for GET_DEVICE_ID\n");
+ ipmi_free_request(req);
return;
} else if (error) {
device_printf(dev, "Failed GET_DEVICE_ID: %d\n", error);
+ ipmi_free_request(req);
return;
} else if (req->ir_compcode != 0) {
device_printf(dev,
"Bad completion code for GET_DEVICE_ID: %d\n",
req->ir_compcode);
+ ipmi_free_request(req);
return;
} else if (req->ir_replylen < 5) {
device_printf(dev, "Short reply for GET_DEVICE_ID: %d\n",
req->ir_replylen);
+ ipmi_free_request(req);
return;
}
@@ -888,14 +892,16 @@
sc->ipmi_cloning = 0;
IPMI_UNLOCK(sc);
- EVENTHANDLER_DEREGISTER(dev_clone, sc->ipmi_clone_tag);
+ if (sc->ipmi_clone_tag)
+ EVENTHANDLER_DEREGISTER(dev_clone, sc->ipmi_clone_tag);
#else
if (sc->ipmi_idev.ipmi_open) {
IPMI_UNLOCK(sc);
return (EBUSY);
}
IPMI_UNLOCK(sc);
- destroy_dev(sc->ipmi_idev.ipmi_cdev);
+ if (sc->ipmi_idev.ipmi_cdev)
+ destroy_dev(sc->ipmi_idev.ipmi_cdev);
#endif
/* Detach from watchdog handling and turn off watchdog. */
--
John Baldwin
More information about the freebsd-bugs
mailing list