patch-2.3.27 linux/drivers/scsi/megaraid.c
Next file: linux/drivers/scsi/megaraid.h
Previous file: linux/drivers/scsi/mca_53c9x.h
Back to the patch index
Back to the overall index
- Lines: 136
- Date:
Thu Nov 11 16:57:30 1999
- Orig file:
v2.3.26/linux/drivers/scsi/megaraid.c
- Orig date:
Fri Sep 10 23:57:31 1999
diff -u --recursive --new-file v2.3.26/linux/drivers/scsi/megaraid.c linux/drivers/scsi/megaraid.c
@@ -133,13 +133,11 @@
#include <linux/modversions.h>
#include <linux/module.h>
-#if LINUX_VERSION_CODE >= 0x20100
char kernel_version[] = UTS_RELEASE;
MODULE_AUTHOR ("American Megatrends Inc.");
MODULE_DESCRIPTION ("AMI MegaRAID driver");
#endif
-#endif
#include <linux/types.h>
#include <linux/errno.h>
@@ -157,11 +155,7 @@
#include <linux/interrupt.h>
#include <linux/stat.h>
-#if LINUX_VERSION_CODE < 0x20100
-#include <linux/bios32.h>
-#else
#include <linux/spinlock.h>
-#endif
#include <asm/io.h>
#include <asm/irq.h>
@@ -180,27 +174,8 @@
*================================================================
*/
-#if LINUX_VERSION_CODE < 0x020100
-#define ioremap vremap
-#define iounmap vfree
-
-/* simulate spin locks */
-typedef struct {
- volatile char lock;
-} spinlock_t;
-
-#define spin_lock_init(x) { (x)->lock = 0;}
-#define spin_lock_irqsave(x,flags) { while ((x)->lock) barrier();\
- (x)->lock=1; save_flags(flags);\
- cli();}
-#define spin_unlock_irqrestore(x,flags) { (x)->lock=0; restore_flags(flags);}
-
-#endif
-
-#if LINUX_VERSION_CODE >= 0x020100
#define queue_task_irq(a,b) queue_task(a,b)
#define queue_task_irq_off(a,b) queue_task(a,b)
-#endif
#define MAX_SERBUF 160
#define COM_BASE 0x2f8
@@ -294,11 +269,9 @@
XX scsi id on each channel. Used for Madrona motherboard, where SAF_TE
processor id cannot be scanned */
static char *megaraid;
-#if LINUX_VERSION_CODE > 0x20100
#ifdef MODULE
MODULE_PARM(megaraid, "s");
#endif
-#endif
static int skip_id;
static int numCtlrs = 0;
@@ -318,12 +291,6 @@
#endif
volatile static spinlock_t mega_lock;
-struct proc_dir_entry proc_scsi_megaraid =
-{
- PROC_SCSI_MEGARAID, 8, "megaraid",
- S_IFDIR | S_IRUGO | S_IXUGO, 2
-};
-
#if SERDEBUG
static char strbuf[MAX_SERBUF + 1];
@@ -930,9 +897,7 @@
megaCfg = (mega_host_config *) devp;
mbox = (mega_mailbox *)tmpBox;
-#if LINUX_VERSION_CODE >= 0x20100
spin_lock_irqsave (&io_request_lock, flags);
-#endif
while (megaCfg->host->irq == irq) {
@@ -1028,9 +993,7 @@
}
-#if LINUX_VERSION_CODE >= 0x20100
spin_unlock_irqrestore (&io_request_lock, flags);
-#endif
}
/*==================================================*/
@@ -1450,20 +1413,11 @@
u16 pciIdx = 0;
u16 numFound = 0;
-#if LINUX_VERSION_CODE < 0x20100
- while (!pcibios_find_device (pciVendor, pciDev, pciIdx, &pciBus, &pciDevFun)) {
-
-#if 0
- } /* keep auto-indenters happy */
-#endif
-#else
-
struct pci_dev *pdev = pci_devices;
while ((pdev = pci_find_device (pciVendor, pciDev, pdev))) {
pciBus = pdev->bus->number;
pciDevFun = pdev->devfn;
-#endif
if ((flag & BOARD_QUARTZ) && (skip_id == -1)) {
u16 magic;
pcibios_read_config_word (pciBus, pciDevFun,
@@ -1555,14 +1509,8 @@
{
int count = 0;
- pHostTmpl->proc_dir = &proc_scsi_megaraid;
+ pHostTmpl->proc_name = "megaraid";
-#if LINUX_VERSION_CODE < 0x20100
- if (!pcibios_present ()) {
- printk (KERN_WARNING "megaraid: PCI bios not present." CRLFSTR);
- return 0;
- }
-#endif
skip_id = -1;
if (megaraid && !strncmp(megaraid,"skip",strlen("skip"))) {
if (megaraid[4] != '\0') {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)