Bug 31017 - AMI Megaraid driver problem
Summary: AMI Megaraid driver problem
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
(Show other bugs)
Version: 7.1
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brock Organ
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-07 22:47 UTC by Alan Cox
Modified: 2007-04-18 16:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-03-21 09:56:58 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Alan Cox 2001-03-07 22:47:49 UTC
RC2 fails to find my AMI megaraid and configure it properly. Rebuilding
with my cleaned up driver works, as does adding #define DELL_HACKS (I think
thats the string) to it so that it does a pci_enable_device().

The enable device being needed is probably because I have the BIOS set PnP
so not going to bite many people

Please also default the skipid module option to -1 for all cases. If it is
set to non -1 values it misdetects other boards as megaraids if they have
i960's on them.

Comment 1 Arjan van de Ven 2001-03-08 09:20:34 UTC
I switched our megaraid driver to your cleaned up version.
Do you have time to boot the new kernel I'm building with it?

Comment 2 Alan Cox 2001-03-08 11:35:51 UTC
I can try such an RPM kernel, however I would suggest that is a non trivial
change while enable the DELL_whatever #ifdef / #defines which also solves it
changes about 5 lines of code you can hand inspect for correctness.

I can test either for you


Comment 3 Michael K. Johnson 2001-03-13 03:26:13 UTC
Cleaned up driver doing well in our testing so far.  Might as well
have a more maintainable driver if it passes our testing...  :-)

Comment 4 Matt Domsch 2001-03-21 03:39:06 UTC
I didn't actually write the #define/#ifdef DELL_MODIFICATIONS stuff.  For a 
while about a year ago people were sending megaraid patches to lkml, but PeterJ 
wasn't receiving them.  So, I packaged 3 or 4 of them up and sent them off to 
Peter, who passed them off to another developer, who, not understanding if they 
were any good, put them inside that #define.  So, if they appear to do "the 
right thing", I say go ahead and remove the #define/#ifdef and just use that 
code straight.


Comment 5 Matt Domsch 2001-03-21 04:50:35 UTC
Alan made some additional changes around -ac18 (I looked at -ac20) which aren't 
incorporated in the Red Hat 2.4.2-0.1.28 kernel.  Should they be?  Linus's 
2.4.3-pre6 doesn't have these either.

--- /usr/src/redhat/BUILD/kernel-2.4.2/linux/drivers/scsi/megaraid.c	Tue Mar 
20 22:30:53 2001
+++ linux-2.4.2-ac20/drivers/scsi/megaraid.c	Tue Mar 20 22:37:11 2001
@@ -75,7 +75,7 @@
  *     Changed megaraid_command to use wait_queue.
  *
  * Version 1.00:
- *     Checks to see if an irq ocurred while in isr, and runs through
+ *     Checks to see if an irq occurred while in isr, and runs through
  *       routine again.
  *     Copies mailbox to temp area before processing in isr
  *     Added barrier() in busy wait to fix volatility bug
@@ -391,6 +391,11 @@
 	writel (value, megaCfg->base + 0x2C);
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)	/* 0x020200 */
+#include <linux/smp.h>
+#define cpuid smp_processor_id()
+#endif
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)	/* 0x020100 */
 
 /*
@@ -401,9 +406,6 @@
  *	queue task is a simple api without irq forms
  */
 
-#include <linux/smp.h>
-#define cpuid smp_processor_id()
-
 static char kernel_version[] = UTS_RELEASE;
 MODULE_AUTHOR ("American Megatrends Inc.");
 MODULE_DESCRIPTION ("AMI MegaRAID driver");
@@ -430,10 +432,7 @@
  *	queue_task is now a single simple API
  */
  
-#include <linux/smp.h>
-#define cpuid smp_processor_id()
-
-char kernel_version[] = UTS_RELEASE;
+static char kernel_version[] = UTS_RELEASE;
 MODULE_AUTHOR ("American Megatrends Inc.");
 MODULE_DESCRIPTION ("AMI MegaRAID driver");
 
@@ -4301,12 +4300,10 @@
 }
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
-static Scsi_Host_Template driver_template = MEGARAID;
-#include "scsi_module.c"
-#else
-#ifdef MODULE
+static
+#endif				/* LINUX VERSION 2.4.XX */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) || defined(MODULE)
 Scsi_Host_Template driver_template = MEGARAID;
 
 #include "scsi_module.c"
-#endif				/* MODULE */
-#endif				/* LINUX VERSION 2.4.XX  test */
+#endif				/* LINUX VERSION 2.4.XX || MODULE */



Comment 6 Arjan van de Ven 2001-03-21 09:56:47 UTC
Our latest kernel should have Alan's megaraid as of ac18.
The ac20 changes seem purely cosmetic.

Comment 7 Arjan van de Ven 2001-03-23 19:59:05 UTC
Closing this bug as we already have latest. If megaraid is causing any
problems, please open a new bug, as that is unlikely to be related to this one.


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