aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
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 92715130ac09..cd982c877da0 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>
@@ -720,6 +720,7 @@ megaraid_init_mbox(adapter_t *adapter)
720 struct pci_dev *pdev; 720 struct pci_dev *pdev;
721 mraid_device_t *raid_dev; 721 mraid_device_t *raid_dev;
722 int i; 722 int i;
723 uint32_t magic64;
723 724
724 725
725 adapter->ito = MBOX_TIMEOUT; 726 adapter->ito = MBOX_TIMEOUT;
@@ -863,12 +864,33 @@ megaraid_init_mbox(adapter_t *adapter)
863 864
864 // Set the DMA mask to 64-bit. All supported controllers as capable of 865 // Set the DMA mask to 64-bit. All supported controllers as capable of
865 // DMA in this range 866 // DMA in this range
866 if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK) != 0) { 867 pci_read_config_dword(adapter->pdev, PCI_CONF_AMISIG64, &magic64);
867 868
868 con_log(CL_ANN, (KERN_WARNING 869 if (((magic64 == HBA_SIGNATURE_64_BIT) &&
869 "megaraid: could not set DMA mask for 64-bit.\n")); 870 ((adapter->pdev->subsystem_device !=
871 PCI_SUBSYS_ID_MEGARAID_SATA_150_6) ||
872 (adapter->pdev->subsystem_device !=
873 PCI_SUBSYS_ID_MEGARAID_SATA_150_4))) ||
874 (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
875 adapter->pdev->device == PCI_DEVICE_ID_VERDE) ||
876 (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
877 adapter->pdev->device == PCI_DEVICE_ID_DOBSON) ||
878 (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
879 adapter->pdev->device == PCI_DEVICE_ID_LINDSAY) ||
880 (adapter->pdev->vendor == PCI_VENDOR_ID_DELL &&
881 adapter->pdev->device == PCI_DEVICE_ID_PERC4_DI_EVERGLADES) ||
882 (adapter->pdev->vendor == PCI_VENDOR_ID_DELL &&
883 adapter->pdev->device == PCI_DEVICE_ID_PERC4E_DI_KOBUK)) {
884 if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK)) {
885 con_log(CL_ANN, (KERN_WARNING
886 "megaraid: DMA mask for 64-bit failed\n"));
870 887
871 goto out_free_sysfs_res; 888 if (pci_set_dma_mask (adapter->pdev, DMA_32BIT_MASK)) {
889 con_log(CL_ANN, (KERN_WARNING
890 "megaraid: 32-bit DMA mask failed\n"));
891 goto out_free_sysfs_res;
892 }
893 }
872 } 894 }
873 895
874 // setup tasklet for DPC 896 // setup tasklet for DPC
@@ -1622,6 +1644,14 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy)
1622 rdev->last_disp |= (1L << SCP2CHANNEL(scp)); 1644 rdev->last_disp |= (1L << SCP2CHANNEL(scp));
1623 } 1645 }
1624 1646
1647 if (scp->cmnd[1] & MEGA_SCSI_INQ_EVPD) {
1648 scp->sense_buffer[0] = 0x70;
1649 scp->sense_buffer[2] = ILLEGAL_REQUEST;
1650 scp->sense_buffer[12] = MEGA_INVALID_FIELD_IN_CDB;
1651 scp->result = CHECK_CONDITION << 1;
1652 return NULL;
1653 }
1654
1625 /* Fall through */ 1655 /* Fall through */
1626 1656
1627 case READ_CAPACITY: 1657 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