Bug 154028
| Summary: | megaraid2 driver causes panic if loaded for a second time | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 3 | Reporter: | Need Real Name <levent.akyil> | ||||||||
| Component: | kernel | Assignee: | Tom Coughlan <coughlan> | ||||||||
| Status: | CLOSED ERRATA | QA Contact: | Brian Brock <bbrock> | ||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | medium | ||||||||||
| Version: | 3.0 | CC: | dale.l.busacker, dely.l.sy, jbaron, magdalena.glinkowski, petrides, riel | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | ia32e | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | RHSA-2006-0144 | Doc Type: | Bug Fix | ||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2006-03-15 15:55:12 UTC | Type: | --- | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | |||||||||||
| Bug Blocks: | 168424 | ||||||||||
| Attachments: |
|
||||||||||
Created attachment 112764 [details]
This patch is one way to fix the issue
1. -Why- does this fix the problem? Where is the panic output? 2. Normally the dma_mask is already 0xffffffff, which makes this fix unusual. It sounds like something else is going on. 3. Check pci_set_dma_mask() return value, per API. Created attachment 116554 [details]
modprode, rmmod messages
I was not able to reproduce this panic. I tried it a dozen times on an 8 way
i686 with 8 GB of memory with stock U5. IIRC there were no megaraid2 changes
from U4 to U5. See attached for some of the messages.
Please provide the panic output, and information about your platform, arch, and
megaraid config.
This bug is fixed in RHEL 3 U6 early release. There are no changes in the megaraid2 driver betwen U5 and U6 that are likely to have fixed this. Maybe it was somewhere else. I'll close this now. Re-open if it comes up again. Created attachment 119269 [details]
panic output
Reopening... Since RHEL3 U4 only x86_64 arch is affected. I have attached the kernel panic output. Additional notes from original submitter: ââ¦. On the 1st insmod, when mega_i_query is called, the DMA is set to 32 bit by default. And pci_map_single() returns expected addresses. After getting handles, the DMA mask is set to 64 bit. And normal operation continues. Ater rmmodâing and insmodâing the driver, the same code sequence is executed and when we get an address for pci device, we get the SAME address (the same as the 1st insmod) and the DMA mask (pdev->dma_mask) is 64 bit. It looks like the memory is not being initialized (or the previous values are staying resident) so when the driver tries to get DMA handles, it gets 64 bit address (which gets truncated etc) which is not valid. â¦â Changing "hardware" field to represent info in last comment. Please test the kernel located at: http://people.redhat.com/coughlan/.2.4.21-37.7.ELdrvrtest2/ to verify that it solves the problem. This contains version v2.10.10.1 of the megaraid2 driver. This is the latest from LSI Logic and is a candidate for U7. Panic still occurs with this test kernel rpm. We have made the pci_set_dma_mask(pdev, 0xffffffffULL) change mentioned above on this version (2.10.10.1) of the driver and it does correct the problem. The patch described in Comment #18 is described in the bug decription above. This patch is still needed for version 2.10.10.1. A fix for this problem has just been committed to the RHEL3 U7 patch pool this evening (in kernel version 2.4.21-37.11.EL). This issue was fixed in RHEL 3 U7 public beta. This bugzilla can be closed. 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-2006-0144.html |
Description of problem: In RHEL 3 U3/U4, loading the megaraid2 driver after a rmmod causes kernel panic. This was fixed in the older driver (megaraid) but somehow the fix got removed in megaraid2 driver. The simple fix is to set the dma_mask to 0xFFFFFF before the adapter_query. How reproducible: 1.insmod megaraid2 2.rmmod megaraid2 3.insmod megaraid2 - will cause a kernel panic The following fixes the issue. --- megaraid2.c 2004-08-18 17:33:28.000000000 -0700 +++ megaraid2_new.c 2005-03-31 15:37:53.000000000 -0800 @@ -530,6 +530,8 @@ did_setup_mbox_f = 1; + pci_set_dma_mask(pdev, 0xffffffffULL); + if( mega_query_adapter(adapter) != 0 ) goto fail_attach;