aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pretzel.yyz.us>2005-06-22 21:50:57 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-22 21:50:57 -0400
commita5324343955997d1439f26518ddac567cd5d134b (patch)
treef43558389c41e3a0f076c4ee55d77c4aa1561779 /drivers/scsi/megaraid
parent8199d3a79c224bbe5943fa08684e1f93a17881b0 (diff)
parenta4936044001694f033fe4ea94d6034d51a6b465c (diff)
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r--drivers/scsi/megaraid/mega_common.h1
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c160
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.h64
-rw-r--r--drivers/scsi/megaraid/megaraid_mm.c9
-rw-r--r--drivers/scsi/megaraid/megaraid_mm.h4
5 files changed, 58 insertions, 180 deletions
diff --git a/drivers/scsi/megaraid/mega_common.h b/drivers/scsi/megaraid/mega_common.h
index 18969a4946b..69df1a9b935 100644
--- a/drivers/scsi/megaraid/mega_common.h
+++ b/drivers/scsi/megaraid/mega_common.h
@@ -27,6 +27,7 @@
#include <linux/list.h>
#include <linux/version.h>
#include <linux/moduleparam.h>
+#include <linux/dma-mapping.h>
#include <asm/semaphore.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 138fa481583..cbe43024627 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -10,7 +10,7 @@
* 2 of the License, or (at your option) any later version.
*
* FILE : megaraid_mbox.c
- * Version : v2.20.4.5 (Feb 03 2005)
+ * Version : v2.20.4.6 (Mar 07 2005)
*
* Authors:
* Atul Mukker <Atul.Mukker@lsil.com>
@@ -124,7 +124,7 @@ static irqreturn_t megaraid_isr(int, void *, struct pt_regs *);
static void megaraid_mbox_dpc(unsigned long);
static ssize_t megaraid_sysfs_show_app_hndl(struct class_device *, char *);
-static ssize_t megaraid_sysfs_show_ldnum(struct device *, char *);
+static ssize_t megaraid_sysfs_show_ldnum(struct device *, struct device_attribute *attr, char *);
static int megaraid_cmm_register(adapter_t *);
static int megaraid_cmm_unregister(adapter_t *);
@@ -202,7 +202,7 @@ MODULE_PARM_DESC(debug_level, "Debug level for driver (default=0)");
* ### global data ###
*/
static uint8_t megaraid_mbox_version[8] =
- { 0x02, 0x20, 0x04, 0x05, 2, 3, 20, 5 };
+ { 0x02, 0x20, 0x04, 0x06, 3, 7, 20, 5 };
/*
@@ -229,9 +229,9 @@ static struct pci_device_id pci_id_table_g[] = {
},
{
PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_PERC4_QC,
- PCI_VENDOR_ID_DELL,
- PCI_SUBSYS_ID_PERC4_QC,
+ PCI_DEVICE_ID_VERDE,
+ PCI_ANY_ID,
+ PCI_ANY_ID,
},
{
PCI_VENDOR_ID_DELL,
@@ -271,15 +271,9 @@ static struct pci_device_id pci_id_table_g[] = {
},
{
PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_PERC4E_DC_320_2E,
- PCI_VENDOR_ID_DELL,
- PCI_SUBSYS_ID_PERC4E_DC_320_2E,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_PERC4E_SC_320_1E,
- PCI_VENDOR_ID_DELL,
- PCI_SUBSYS_ID_PERC4E_SC_320_1E,
+ PCI_DEVICE_ID_DOBSON,
+ PCI_ANY_ID,
+ PCI_ANY_ID,
},
{
PCI_VENDOR_ID_AMI,
@@ -331,36 +325,6 @@ static struct pci_device_id pci_id_table_g[] = {
},
{
PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_MEGARAID_SCSI_320_0x,
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_SUBSYS_ID_MEGARAID_SCSI_320_0x,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_MEGARAID_SCSI_320_2x,
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_SUBSYS_ID_MEGARAID_SCSI_320_2x,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_MEGARAID_SCSI_320_4x,
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_SUBSYS_ID_MEGARAID_SCSI_320_4x,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_MEGARAID_SCSI_320_1E,
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_SUBSYS_ID_MEGARAID_SCSI_320_1E,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_MEGARAID_SCSI_320_2E,
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_SUBSYS_ID_MEGARAID_SCSI_320_2E,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
PCI_DEVICE_ID_MEGARAID_I4_133_RAID,
PCI_VENDOR_ID_LSI_LOGIC,
PCI_SUBSYS_ID_MEGARAID_I4_133_RAID,
@@ -379,21 +343,9 @@ static struct pci_device_id pci_id_table_g[] = {
},
{
PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_MEGARAID_SATA_300_4x,
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_SUBSYS_ID_MEGARAID_SATA_300_4x,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_MEGARAID_SATA_300_8x,
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_SUBSYS_ID_MEGARAID_SATA_300_8x,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_INTEL_RAID_SRCU42X,
- PCI_VENDOR_ID_INTEL,
- PCI_SUBSYS_ID_INTEL_RAID_SRCU42X,
+ PCI_DEVICE_ID_LINDSAY,
+ PCI_ANY_ID,
+ PCI_ANY_ID,
},
{
PCI_VENDOR_ID_LSI_LOGIC,
@@ -403,58 +355,10 @@ static struct pci_device_id pci_id_table_g[] = {
},
{
PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_INTEL_RAID_SRCU42E,
- PCI_VENDOR_ID_INTEL,
- PCI_SUBSYS_ID_INTEL_RAID_SRCU42E,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_INTEL_RAID_SRCZCRX,
- PCI_VENDOR_ID_INTEL,
- PCI_SUBSYS_ID_INTEL_RAID_SRCZCRX,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_INTEL_RAID_SRCS28X,
- PCI_VENDOR_ID_INTEL,
- PCI_SUBSYS_ID_INTEL_RAID_SRCS28X,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_INTEL_RAID_SROMBU42E_ALIEF,
- PCI_VENDOR_ID_INTEL,
- PCI_SUBSYS_ID_INTEL_RAID_SROMBU42E_ALIEF,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_INTEL_RAID_SROMBU42E_HARWICH,
- PCI_VENDOR_ID_INTEL,
- PCI_SUBSYS_ID_INTEL_RAID_SROMBU42E_HARWICH,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
PCI_DEVICE_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK,
PCI_VENDOR_ID_INTEL,
PCI_SUBSYS_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK,
},
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_FSC_MEGARAID_PCI_EXPRESS_ROMB,
- PCI_SUBSYS_ID_FSC,
- PCI_SUBSYS_ID_FSC_MEGARAID_PCI_EXPRESS_ROMB,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_MEGARAID_ACER_ROMB_2E,
- PCI_VENDOR_ID_AI,
- PCI_SUBSYS_ID_MEGARAID_ACER_ROMB_2E,
- },
- {
- PCI_VENDOR_ID_LSI_LOGIC,
- PCI_DEVICE_ID_MEGARAID_NEC_ROMB_2E,
- PCI_VENDOR_ID_NEC,
- PCI_SUBSYS_ID_MEGARAID_NEC_ROMB_2E,
- },
{0} /* Terminating entry */
};
MODULE_DEVICE_TABLE(pci, pci_id_table_g);
@@ -539,7 +443,8 @@ megaraid_init(void)
// register as a PCI hot-plug driver module
- if ((rval = pci_module_init(&megaraid_pci_driver_g))) {
+ rval = pci_register_driver(&megaraid_pci_driver_g);
+ if (rval < 0) {
con_log(CL_ANN, (KERN_WARNING
"megaraid: could not register hotplug support.\n"));
}
@@ -619,7 +524,7 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
// Setup the default DMA mask. This would be changed later on
// depending on hardware capabilities
- if (pci_set_dma_mask(adapter->pdev, 0xFFFFFFFF) != 0) {
+ if (pci_set_dma_mask(adapter->pdev, DMA_32BIT_MASK) != 0) {
con_log(CL_ANN, (KERN_WARNING
"megaraid: pci_set_dma_mask failed:%d\n", __LINE__));
@@ -1031,7 +936,7 @@ megaraid_init_mbox(adapter_t *adapter)
// Set the DMA mask to 64-bit. All supported controllers as capable of
// DMA in this range
- if (pci_set_dma_mask(adapter->pdev, 0xFFFFFFFFFFFFFFFFULL) != 0) {
+ if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK) != 0) {
con_log(CL_ANN, (KERN_WARNING
"megaraid: could not set DMA mask for 64-bit.\n"));
@@ -2661,7 +2566,7 @@ megaraid_mbox_dpc(unsigned long devp)
* aborted. All the commands issued to the F/W must complete.
**/
static int
-megaraid_abort_handler(struct scsi_cmnd *scp)
+__megaraid_abort_handler(struct scsi_cmnd *scp)
{
adapter_t *adapter;
mraid_device_t *raid_dev;
@@ -2794,6 +2699,21 @@ megaraid_abort_handler(struct scsi_cmnd *scp)
return FAILED;
}
+static int
+megaraid_abort_handler(struct scsi_cmnd *scp)
+{
+ adapter_t *adapter;
+ int rc;
+
+ adapter = SCP2ADAPTER(scp);
+
+ spin_lock_irq(adapter->host_lock);
+ rc = __megaraid_abort_handler(scp);
+ spin_unlock_irq(adapter->host_lock);
+
+ return rc;
+}
+
/**
* megaraid_reset_handler - device reset hadler for mailbox based driver
@@ -2806,7 +2726,7 @@ megaraid_abort_handler(struct scsi_cmnd *scp)
* host
**/
static int
-megaraid_reset_handler(struct scsi_cmnd *scp)
+__megaraid_reset_handler(struct scsi_cmnd *scp)
{
adapter_t *adapter;
scb_t *scb;
@@ -2927,6 +2847,18 @@ megaraid_reset_handler(struct scsi_cmnd *scp)
return rval;
}
+static int
+megaraid_reset_handler(struct scsi_cmnd *cmd)
+{
+ int rc;
+
+ spin_lock_irq(cmd->device->host->host_lock);
+ rc = __megaraid_reset_handler(cmd);
+ spin_unlock_irq(cmd->device->host->host_lock);
+
+ return rc;
+}
+
/*
* START: internal commands library
@@ -4213,7 +4145,7 @@ megaraid_sysfs_show_app_hndl(struct class_device *cdev, char *buf)
* @param buf : buffer to send data to
*/
static ssize_t
-megaraid_sysfs_show_ldnum(struct device *dev, char *buf)
+megaraid_sysfs_show_ldnum(struct device *dev, struct device_attribute *attr, char *buf)
{
struct scsi_device *sdev = to_scsi_device(dev);
adapter_t *adapter = (adapter_t *)SCSIHOST2ADAP(sdev->host);
diff --git a/drivers/scsi/megaraid/megaraid_mbox.h b/drivers/scsi/megaraid/megaraid_mbox.h
index 07510009d11..644b91bdb02 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.h
+++ b/drivers/scsi/megaraid/megaraid_mbox.h
@@ -21,8 +21,8 @@
#include "megaraid_ioctl.h"
-#define MEGARAID_VERSION "2.20.4.5"
-#define MEGARAID_EXT_VERSION "(Release Date: Thu Feb 03 12:27:22 EST 2005)"
+#define MEGARAID_VERSION "2.20.4.6"
+#define MEGARAID_EXT_VERSION "(Release Date: Mon Mar 07 12:27:22 EST 2005)"
/*
@@ -37,8 +37,7 @@
#define PCI_DEVICE_ID_PERC4_DC 0x1960
#define PCI_SUBSYS_ID_PERC4_DC 0x0518
-#define PCI_DEVICE_ID_PERC4_QC 0x0407
-#define PCI_SUBSYS_ID_PERC4_QC 0x0531
+#define PCI_DEVICE_ID_VERDE 0x0407
#define PCI_DEVICE_ID_PERC4_DI_EVERGLADES 0x000F
#define PCI_SUBSYS_ID_PERC4_DI_EVERGLADES 0x014A
@@ -58,11 +57,7 @@
#define PCI_DEVICE_ID_PERC4E_DI_GUADALUPE 0x0013
#define PCI_SUBSYS_ID_PERC4E_DI_GUADALUPE 0x0170
-#define PCI_DEVICE_ID_PERC4E_DC_320_2E 0x0408
-#define PCI_SUBSYS_ID_PERC4E_DC_320_2E 0x0002
-
-#define PCI_DEVICE_ID_PERC4E_SC_320_1E 0x0408
-#define PCI_SUBSYS_ID_PERC4E_SC_320_1E 0x0001
+#define PCI_DEVICE_ID_DOBSON 0x0408
#define PCI_DEVICE_ID_MEGARAID_SCSI_320_0 0x1960
#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_0 0xA520
@@ -73,21 +68,6 @@
#define PCI_DEVICE_ID_MEGARAID_SCSI_320_2 0x1960
#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_2 0x0518
-#define PCI_DEVICE_ID_MEGARAID_SCSI_320_0x 0x0407
-#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_0x 0x0530
-
-#define PCI_DEVICE_ID_MEGARAID_SCSI_320_2x 0x0407
-#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_2x 0x0532
-
-#define PCI_DEVICE_ID_MEGARAID_SCSI_320_4x 0x0407
-#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_4x 0x0531
-
-#define PCI_DEVICE_ID_MEGARAID_SCSI_320_1E 0x0408
-#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_1E 0x0001
-
-#define PCI_DEVICE_ID_MEGARAID_SCSI_320_2E 0x0408
-#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_2E 0x0002
-
#define PCI_DEVICE_ID_MEGARAID_I4_133_RAID 0x1960
#define PCI_SUBSYS_ID_MEGARAID_I4_133_RAID 0x0522
@@ -97,52 +77,18 @@
#define PCI_DEVICE_ID_MEGARAID_SATA_150_6 0x1960
#define PCI_SUBSYS_ID_MEGARAID_SATA_150_6 0x0523
-#define PCI_DEVICE_ID_MEGARAID_SATA_300_4x 0x0409
-#define PCI_SUBSYS_ID_MEGARAID_SATA_300_4x 0x3004
-
-#define PCI_DEVICE_ID_MEGARAID_SATA_300_8x 0x0409
-#define PCI_SUBSYS_ID_MEGARAID_SATA_300_8x 0x3008
-
-#define PCI_DEVICE_ID_INTEL_RAID_SRCU42X 0x0407
-#define PCI_SUBSYS_ID_INTEL_RAID_SRCU42X 0x0532
+#define PCI_DEVICE_ID_LINDSAY 0x0409
#define PCI_DEVICE_ID_INTEL_RAID_SRCS16 0x1960
#define PCI_SUBSYS_ID_INTEL_RAID_SRCS16 0x0523
-#define PCI_DEVICE_ID_INTEL_RAID_SRCU42E 0x0408
-#define PCI_SUBSYS_ID_INTEL_RAID_SRCU42E 0x0002
-
-#define PCI_DEVICE_ID_INTEL_RAID_SRCZCRX 0x0407
-#define PCI_SUBSYS_ID_INTEL_RAID_SRCZCRX 0x0530
-
-#define PCI_DEVICE_ID_INTEL_RAID_SRCS28X 0x0409
-#define PCI_SUBSYS_ID_INTEL_RAID_SRCS28X 0x3008
-
-#define PCI_DEVICE_ID_INTEL_RAID_SROMBU42E_ALIEF 0x0408
-#define PCI_SUBSYS_ID_INTEL_RAID_SROMBU42E_ALIEF 0x3431
-
-#define PCI_DEVICE_ID_INTEL_RAID_SROMBU42E_HARWICH 0x0408
-#define PCI_SUBSYS_ID_INTEL_RAID_SROMBU42E_HARWICH 0x3499
-
#define PCI_DEVICE_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK 0x1960
#define PCI_SUBSYS_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK 0x0520
-#define PCI_DEVICE_ID_FSC_MEGARAID_PCI_EXPRESS_ROMB 0x0408
-#define PCI_SUBSYS_ID_FSC_MEGARAID_PCI_EXPRESS_ROMB 0x1065
-
-#define PCI_DEVICE_ID_MEGARAID_ACER_ROMB_2E 0x0408
-#define PCI_SUBSYS_ID_MEGARAID_ACER_ROMB_2E 0x004D
-
#define PCI_SUBSYS_ID_PERC3_QC 0x0471
#define PCI_SUBSYS_ID_PERC3_DC 0x0493
#define PCI_SUBSYS_ID_PERC3_SC 0x0475
-#define PCI_DEVICE_ID_MEGARAID_NEC_ROMB_2E 0x0408
-#define PCI_SUBSYS_ID_MEGARAID_NEC_ROMB_2E 0x8287
-
-#ifndef PCI_SUBSYS_ID_FSC
-#define PCI_SUBSYS_ID_FSC 0x1734
-#endif
#define MBOX_MAX_SCSI_CMDS 128 // number of cmds reserved for kernel
#define MBOX_MAX_USER_CMDS 32 // number of cmds for applications
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c
index 9f1b550713e..37d110e864c 100644
--- a/drivers/scsi/megaraid/megaraid_mm.c
+++ b/drivers/scsi/megaraid/megaraid_mm.c
@@ -10,13 +10,12 @@
* 2 of the License, or (at your option) any later version.
*
* FILE : megaraid_mm.c
- * Version : v2.20.2.5 (Jan 21 2005)
+ * Version : v2.20.2.6 (Mar 7 2005)
*
* Common management module
*/
#include "megaraid_mm.h"
-#include <linux/smp_lock.h>
// Entry points for char node driver
@@ -61,7 +60,7 @@ EXPORT_SYMBOL(mraid_mm_unregister_adp);
EXPORT_SYMBOL(mraid_mm_adapter_app_handle);
static int majorno;
-static uint32_t drvr_ver = 0x02200201;
+static uint32_t drvr_ver = 0x02200206;
static int adapters_count_g;
static struct list_head adapters_list_g;
@@ -1231,9 +1230,9 @@ mraid_mm_compat_ioctl(struct file *filep, unsigned int cmd,
unsigned long arg)
{
int err;
- lock_kernel();
+
err = mraid_mm_ioctl(NULL, filep, cmd, arg);
- unlock_kernel();
+
return err;
}
#endif
diff --git a/drivers/scsi/megaraid/megaraid_mm.h b/drivers/scsi/megaraid/megaraid_mm.h
index 948a0012ab8..7e36c46e7c4 100644
--- a/drivers/scsi/megaraid/megaraid_mm.h
+++ b/drivers/scsi/megaraid/megaraid_mm.h
@@ -29,9 +29,9 @@
#include "megaraid_ioctl.h"
-#define LSI_COMMON_MOD_VERSION "2.20.2.5"
+#define LSI_COMMON_MOD_VERSION "2.20.2.6"
#define LSI_COMMON_MOD_EXT_VERSION \
- "(Release Date: Fri Jan 21 00:01:03 EST 2005)"
+ "(Release Date: Mon Mar 7 00:01:03 EST 2005)"
#define LSI_DBGLVL dbglevel