Bug 159739 - [Stratus RHEL4U2] csb5 functions are tagged with __init. This causes a crash in a hot-plug environment
Summary: [Stratus RHEL4U2] csb5 functions are tagged with __init. This causes a crash...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.0
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Kimball Murray
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 156322
TreeView+ depends on / blocked
 
Reported: 2005-06-07 17:37 UTC by Kimball Murray
Modified: 2007-11-30 22:07 UTC (History)
4 users (show)

Fixed In Version: RHSA-2005-514
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-05 13:23:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:514 0 qe-ready SHIPPED_LIVE Important: Updated kernel packages available for Red Hat Enterprise Linux 4 Update 2 2005-10-05 04:00:00 UTC

Description Kimball Murray 2005-06-07 17:37:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
We have a hardware platform with a csb5 chip below a PCI hot-plug slot.  The kernel has the csb5 quirk functions (drivers/pci/quirks.c) tagged with __init section marker, so these are discarded after system boot.  Unfortunately, in a hot-plog environment, we need these to be persistent functions, so __devinit is a better tag.  I have already submitted this request to the PCI Hotplug maintainer, Greg Kroah.  He has accepted my patch, and it is present in linux 2.6.12-rc5.  So in effect, this report is simply a request for a back-port of that patch.

Version-Release number of selected component (if applicable):
kernel-2.6.9-5.ELsmp

How reproducible:
Always

Steps to Reproduce:
1. Bring down Stratus platform hotplug slot 4.
2. Bring up Stratus platform hotplog slot 4 (kernel oops)

Any other machine with a csb5 below a hotplug slot will suffer the same fate as well.
  

Actual Results:  Kernel oops.

Expected Results:  Successful PCI enumeration and chipset init.

Additional info:

This is the acceptance letter from the PCI Hotplug maintainer, Greg Kroah:

ChangeSet 1.2181.16.6, 2005/03/17 10:23:26-08:00, kimball.murray

[PATCH] PCI: Patch for Serverworks chips in hotplug environment

From: Kimball Murray <kimball.murray>
Signed-off-by: Greg Kroah-Hartman <gregkh>


 drivers/ide/pci/serverworks.c |    8 ++++----
 drivers/pci/quirks.c          |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)


diff -Nru a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
--- a/drivers/ide/pci/serverworks.c     2005-04-01 15:38:06 -08:00
+++ b/drivers/ide/pci/serverworks.c     2005-04-01 15:38:06 -08:00
@@ -341,7 +341,7 @@
        return __ide_dma_end(drive);
 }
 
-static unsigned int __init init_chipset_svwks (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const char *name)
 {
        unsigned int reg;
        u8 btr;
@@ -508,7 +508,7 @@
 }
 
 #undef CAN_SW_DMA
-static void __init init_hwif_svwks (ide_hwif_t *hwif)
+static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
 {
        u8 dma_stat = 0;
 
@@ -556,7 +556,7 @@
 /*
  * We allow the BM-DMA driver to only work on enabled interfaces.
  */
-static void __init init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
+static void __devinit init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
 {
        struct pci_dev *dev = hwif->pci_dev;
 
@@ -568,7 +568,7 @@
        ide_setup_dma(hwif, dmabase, 8);
 }
 
-static int __init init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
 {
        return ide_setup_pci_device(dev, d);
 }
diff -Nru a/drivers/pci/quirks.c b/drivers/pci/quirks.c
--- a/drivers/pci/quirks.c      2005-04-01 15:38:06 -08:00
+++ b/drivers/pci/quirks.c      2005-04-01 15:38:06 -08:00
@@ -700,7 +700,7 @@
 /*
  *     Serverworks CSB5 IDE does not fully support native mode
  */
-static void __init quirk_svwks_csb5ide(struct pci_dev *pdev)
+static void __devinit quirk_svwks_csb5ide(struct pci_dev *pdev)
 {
        u8 prog;
        pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog);

Comment 8 Tim Burke 2005-06-13 19:14:08 UTC
Alan will work this one w/ the Stratus guys when the hardware is here and
online.  Then he can provide them a test kernel which includes this patch, or
variant thereof.

Comment 9 Alan Cox 2005-06-13 19:18:28 UTC
Comment #44 is the fix and its also now in 2.6.12rc -ac kernel tree. Have pushed
it to Bartlomiej upstream.

I do need to review the other ide pci drivers for the same bug.


Comment 11 Tim Burke 2005-06-17 00:37:25 UTC
This is contingent on successful, prompt testing results from Stratus.  Testing
based on a recent (ie at least U1 kernel) plus this fix.  Merely referencing
upstream is insuficient.

Comment 12 Alan Cox 2005-06-17 11:30:33 UTC
Review of the IDE PCI layer shows lots of other drivers have the same bug, but
nobody is hitting it yet. The right fix for this is an ABI change but the easy
fix for RHEL4 is to turn them all into __devinit.

Alan


Comment 13 Andrius Benokraitis 2005-06-17 14:25:06 UTC
Thanks Alan, so is it OK to address individual drivers that need it immediately
(as in this case) in RHEL4 and then make the "right" change for RHEL5? Is this
patch still "safe" for inclusion in RHEL4U2?

Comment 14 Rik van Riel 2005-06-17 15:54:52 UTC
Andrius, this patch is correct and safe for RHEL4 - it just needs to have a few
more instances of __init in the same file replaced by __devinit.   A patch
should hit rhkernel-list soon.

Comment 15 Rik van Riel 2005-06-22 19:53:37 UTC
Reassigning to on-site Stratus engineer.  Note that I will be helping Kimball
with the process side of submitting patches.

Comment 16 Alan Cox 2005-06-22 22:25:16 UTC
Upstream maintainer agrees and will fix all the IDE misusers of __init in the
base kernel


Comment 24 Red Hat Bugzilla 2005-10-05 13:23:01 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-514.html



Note You need to log in before you can comment on or make changes to this bug.