Hello,
The normal kexec boot was not successful on power 5 system. Based on
my initial look, this driver has ohci_reboot notifier, but not registered.
--- linux-2.6.12/drivers/usb/host/ohci-mem.c.orig 2005-07-08
18:11:49.000000000 -0700
+++ linux-2.6.12/drivers/usb/host/ohci-mem.c 2005-07-08
18:02:49.000000000 -0700
@@ -30,6 +30,7 @@ static void ohci_hcd_init (struct ohci_h
INIT_LIST_HEAD (&ohci->pending);
INIT_WORK (&ohci->rh_resume, ohci_rh_resume, ohci_to_hcd(ohci));
ohci->reboot_notifier.notifier_call = ohci_reboot;
+ register_reboot_notifier(&ohci->reboot_notifier);
}
/*-------------------------------------------------------------------------*/
However, based on comments I noticed, device_shutdown will be the
preferred way of shutdown devices. Hence, I am also attaching the
following patch.
Thanks
Haren
diff -Naurp 2613-rc2.orig/drivers/usb/host/ohci-hcd.c 2613-rc2/drivers/usb/host/ohci-hcd.c
--- 2613-rc2.orig/drivers/usb/host/ohci-hcd.c 2005-07-08 20:20:53.000000000 -0700
+++ 2613-rc2/drivers/usb/host/ohci-hcd.c 2005-07-08 20:24:50.000000000 -0700
@@ -99,7 +99,6 @@
#include <linux/usb_otg.h>
#include <linux/dma-mapping.h>
#include <linux/dmapool.h>
-#include <linux/reboot.h>
#include <asm/io.h>
#include <asm/irq.h>
@@ -141,7 +140,7 @@ static const char hcd_name [] = "ohci_hc
static void ohci_dump (struct ohci_hcd *ohci, int verbose);
static int ohci_init (struct ohci_hcd *ohci);
static void ohci_stop (struct usb_hcd *hcd);
-static int ohci_reboot (struct notifier_block *, unsigned long , void *);
+static void ohci_shutdown(struct pci_dev *pdev);
#include "ohci-hub.c"
#include "ohci-dbg.c"
@@ -421,21 +420,20 @@ static void ohci_usb_reset (struct ohci_
ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
}
-/* reboot notifier forcibly disables IRQs and DMA, helping kexec and
+/* shutdown forcibly disables IRQs and DMA, helping kexec and
* other cases where the next software may expect clean state from the
- * "firmware". this is bus-neutral, unlike shutdown() methods.
+ * "firmware".
*/
-static int
-ohci_reboot (struct notifier_block *block, unsigned long code, void *null)
+static void
+ohci_shutdown (struct pci_dev *pdev)
{
- struct ohci_hcd *ohci;
+ struct ohci_hcd *ohci =
+ hcd_to_ohci((struct usb_hcd *) pci_get_drvdata(pdev));
- ohci = container_of (block, struct ohci_hcd, reboot_notifier);
ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
ohci_usb_reset (ohci);
/* flush the writes */
(void) ohci_readl (ohci, &ohci->regs->control);
- return 0;
}
/*-------------------------------------------------------------------------*
@@ -772,7 +770,6 @@ static void ohci_stop (struct usb_hcd *h
ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
remove_debug_files (ohci);
- unregister_reboot_notifier (&ohci->reboot_notifier);
ohci_mem_cleanup (ohci);
if (ohci->hcca) {
dma_free_coherent (hcd->self.controller,
diff -Naurp 2613-rc2.orig/drivers/usb/host/ohci-mem.c 2613-rc2/drivers/usb/host/ohci-mem.c
--- 2613-rc2.orig/drivers/usb/host/ohci-mem.c 2005-07-08 20:21:01.000000000 -0700
+++ 2613-rc2/drivers/usb/host/ohci-mem.c 2005-07-08 20:22:00.000000000 -0700
@@ -29,8 +29,6 @@ static void ohci_hcd_init (struct ohci_h
spin_lock_init (&ohci->lock);
INIT_LIST_HEAD (&ohci->pending);
INIT_WORK (&ohci->rh_resume, ohci_rh_resume, ohci_to_hcd(ohci));
- ohci->reboot_notifier.notifier_call = ohci_reboot;
- register_reboot_notifier(&ohci->reboot_notifier);
}
/*-------------------------------------------------------------------------*/
diff -Naurp 2613-rc2.orig/drivers/usb/host/ohci-pci.c 2613-rc2/drivers/usb/host/ohci-pci.c
--- 2613-rc2.orig/drivers/usb/host/ohci-pci.c 2005-07-08 20:21:09.000000000 -0700
+++ 2613-rc2/drivers/usb/host/ohci-pci.c 2005-07-08 20:22:08.000000000 -0700
@@ -243,6 +243,7 @@ static struct pci_driver ohci_pci_driver
.probe = usb_hcd_pci_probe,
.remove = usb_hcd_pci_remove,
+ .shutdown = ohci_shutdown,
#ifdef CONFIG_PM
.suspend = usb_hcd_pci_suspend,
diff -Naurp 2613-rc2.orig/drivers/usb/host/ohci.h 2613-rc2/drivers/usb/host/ohci.h
--- 2613-rc2.orig/drivers/usb/host/ohci.h 2005-07-08 20:21:16.000000000 -0700
+++ 2613-rc2/drivers/usb/host/ohci.h 2005-07-08 20:22:17.000000000 -0700
@@ -389,7 +389,6 @@ struct ohci_hcd {
u32 fminterval; /* saved register */
struct work_struct rh_resume;
- struct notifier_block reboot_notifier;
unsigned long flags; /* for HC bugs */
#define OHCI_QUIRK_AMD756 0x01 /* erratum #4 */