aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-08-27 22:59:59 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-08-27 22:59:59 -0400
commit8ce7a9c159c8c4eb480f0a65c6af753dbf9a1a70 (patch)
treebe59573c0af3617d0cd8a7d61f0ed119e58b1156 /drivers/scsi/megaraid
parentd2afb3ae04e36dbc6e9eb2d8bd54406ff7b6b3bd (diff)
parent01da5fd83d6b2c5e36b77539f6cbdd8f49849225 (diff)
Merge ../linux-2.6
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r--drivers/scsi/megaraid/mega_common.h6
-rw-r--r--drivers/scsi/megaraid/megaraid_ioctl.h4
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c42
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.h4
-rw-r--r--drivers/scsi/megaraid/megaraid_mm.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_mm.h4
6 files changed, 51 insertions, 11 deletions
diff --git a/drivers/scsi/megaraid/mega_common.h b/drivers/scsi/megaraid/mega_common.h
index 4675343228ad..8cd0bd1d0f7c 100644
--- a/drivers/scsi/megaraid/mega_common.h
+++ b/drivers/scsi/megaraid/mega_common.h
@@ -37,6 +37,12 @@
37#define LSI_MAX_CHANNELS 16 37#define LSI_MAX_CHANNELS 16
38#define LSI_MAX_LOGICAL_DRIVES_64LD (64+1) 38#define LSI_MAX_LOGICAL_DRIVES_64LD (64+1)
39 39
40#define HBA_SIGNATURE_64_BIT 0x299
41#define PCI_CONF_AMISIG64 0xa4
42
43#define MEGA_SCSI_INQ_EVPD 1
44#define MEGA_INVALID_FIELD_IN_CDB 0x24
45
40 46
41/** 47/**
42 * scb_t - scsi command control block 48 * scb_t - scsi command control block
diff --git a/drivers/scsi/megaraid/megaraid_ioctl.h b/drivers/scsi/megaraid/megaraid_ioctl.h
index bdaee144a1c3..b8aa34202ec3 100644
--- a/drivers/scsi/megaraid/megaraid_ioctl.h
+++ b/drivers/scsi/megaraid/megaraid_ioctl.h
@@ -132,6 +132,10 @@ typedef struct uioc {
132/* Driver Data: */ 132/* Driver Data: */
133 void __user * user_data; 133 void __user * user_data;
134 uint32_t user_data_len; 134 uint32_t user_data_len;
135
136 /* 64bit alignment */
137 uint32_t pad_for_64bit_align;
138
135 mraid_passthru_t __user *user_pthru; 139 mraid_passthru_t __user *user_pthru;
136 140
137 mraid_passthru_t *pthru32; 141 mraid_passthru_t *pthru32;
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 7ae580f17e64..266b3910846b 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -10,7 +10,7 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 * 11 *
12 * FILE : megaraid_mbox.c 12 * FILE : megaraid_mbox.c
13 * Version : v2.20.4.8 (Apr 11 2006) 13 * Version : v2.20.4.9 (Jul 16 2006)
14 * 14 *
15 * Authors: 15 * Authors:
16 * Atul Mukker <Atul.Mukker@lsil.com> 16 * Atul Mukker <Atul.Mukker@lsil.com>
@@ -736,6 +736,7 @@ megaraid_init_mbox(adapter_t *adapter)
736 struct pci_dev *pdev; 736 struct pci_dev *pdev;
737 mraid_device_t *raid_dev; 737 mraid_device_t *raid_dev;
738 int i; 738 int i;
739 uint32_t magic64;
739 740
740 741
741 adapter->ito = MBOX_TIMEOUT; 742 adapter->ito = MBOX_TIMEOUT;
@@ -879,12 +880,33 @@ megaraid_init_mbox(adapter_t *adapter)
879 880
880 // Set the DMA mask to 64-bit. All supported controllers as capable of 881 // Set the DMA mask to 64-bit. All supported controllers as capable of
881 // DMA in this range 882 // DMA in this range
882 if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK) != 0) { 883 pci_read_config_dword(adapter->pdev, PCI_CONF_AMISIG64, &magic64);
883 884
884 con_log(CL_ANN, (KERN_WARNING 885 if (((magic64 == HBA_SIGNATURE_64_BIT) &&
885 "megaraid: could not set DMA mask for 64-bit.\n")); 886 ((adapter->pdev->subsystem_device !=
887 PCI_SUBSYS_ID_MEGARAID_SATA_150_6) ||
888 (adapter->pdev->subsystem_device !=
889 PCI_SUBSYS_ID_MEGARAID_SATA_150_4))) ||
890 (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
891 adapter->pdev->device == PCI_DEVICE_ID_VERDE) ||
892 (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
893 adapter->pdev->device == PCI_DEVICE_ID_DOBSON) ||
894 (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
895 adapter->pdev->device == PCI_DEVICE_ID_LINDSAY) ||
896 (adapter->pdev->vendor == PCI_VENDOR_ID_DELL &&
897 adapter->pdev->device == PCI_DEVICE_ID_PERC4_DI_EVERGLADES) ||
898 (adapter->pdev->vendor == PCI_VENDOR_ID_DELL &&
899 adapter->pdev->device == PCI_DEVICE_ID_PERC4E_DI_KOBUK)) {
900 if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK)) {
901 con_log(CL_ANN, (KERN_WARNING
902 "megaraid: DMA mask for 64-bit failed\n"));
886 903
887 goto out_free_sysfs_res; 904 if (pci_set_dma_mask (adapter->pdev, DMA_32BIT_MASK)) {
905 con_log(CL_ANN, (KERN_WARNING
906 "megaraid: 32-bit DMA mask failed\n"));
907 goto out_free_sysfs_res;
908 }
909 }
888 } 910 }
889 911
890 // setup tasklet for DPC 912 // setup tasklet for DPC
@@ -1638,6 +1660,14 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy)
1638 rdev->last_disp |= (1L << SCP2CHANNEL(scp)); 1660 rdev->last_disp |= (1L << SCP2CHANNEL(scp));
1639 } 1661 }
1640 1662
1663 if (scp->cmnd[1] & MEGA_SCSI_INQ_EVPD) {
1664 scp->sense_buffer[0] = 0x70;
1665 scp->sense_buffer[2] = ILLEGAL_REQUEST;
1666 scp->sense_buffer[12] = MEGA_INVALID_FIELD_IN_CDB;
1667 scp->result = CHECK_CONDITION << 1;
1668 return NULL;
1669 }
1670
1641 /* Fall through */ 1671 /* Fall through */
1642 1672
1643 case READ_CAPACITY: 1673 case READ_CAPACITY:
diff --git a/drivers/scsi/megaraid/megaraid_mbox.h b/drivers/scsi/megaraid/megaraid_mbox.h
index 868fb0ec93e7..2b5a3285f799 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.h
+++ b/drivers/scsi/megaraid/megaraid_mbox.h
@@ -21,8 +21,8 @@
21#include "megaraid_ioctl.h" 21#include "megaraid_ioctl.h"
22 22
23 23
24#define MEGARAID_VERSION "2.20.4.8" 24#define MEGARAID_VERSION "2.20.4.9"
25#define MEGARAID_EXT_VERSION "(Release Date: Mon Apr 11 12:27:22 EST 2006)" 25#define MEGARAID_EXT_VERSION "(Release Date: Sun Jul 16 12:27:22 EST 2006)"
26 26
27 27
28/* 28/*
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c
index e8f534fb336b..d85b9a8f1b8d 100644
--- a/drivers/scsi/megaraid/megaraid_mm.c
+++ b/drivers/scsi/megaraid/megaraid_mm.c
@@ -10,7 +10,7 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 * 11 *
12 * FILE : megaraid_mm.c 12 * FILE : megaraid_mm.c
13 * Version : v2.20.2.6 (Mar 7 2005) 13 * Version : v2.20.2.7 (Jul 16 2006)
14 * 14 *
15 * Common management module 15 * Common management module
16 */ 16 */
diff --git a/drivers/scsi/megaraid/megaraid_mm.h b/drivers/scsi/megaraid/megaraid_mm.h
index 3d9e67d6849d..c8762b2b8ed1 100644
--- a/drivers/scsi/megaraid/megaraid_mm.h
+++ b/drivers/scsi/megaraid/megaraid_mm.h
@@ -27,9 +27,9 @@
27#include "megaraid_ioctl.h" 27#include "megaraid_ioctl.h"
28 28
29 29
30#define LSI_COMMON_MOD_VERSION "2.20.2.6" 30#define LSI_COMMON_MOD_VERSION "2.20.2.7"
31#define LSI_COMMON_MOD_EXT_VERSION \ 31#define LSI_COMMON_MOD_EXT_VERSION \
32 "(Release Date: Mon Mar 7 00:01:03 EST 2005)" 32 "(Release Date: Sun Jul 16 00:01:03 EST 2006)"
33 33
34 34
35#define LSI_DBGLVL dbglevel 35#define LSI_DBGLVL dbglevel