aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-07-03 10:41:12 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-07-03 10:41:12 -0400
commitc4e00fac42f268ed0a547cdd1d12bb8399864040 (patch)
tree1a54d87be2066c49b71a03764fcb4fc7f9c68c41 /drivers/scsi/megaraid
parent29454dde27d8e340bb1987bad9aa504af7081eba (diff)
parentd6b0c53723753fc0cfda63f56735b225c43e1e9a (diff)
Merge ../scsi-misc-2.6
Conflicts: drivers/scsi/nsp32.c drivers/scsi/pcmcia/nsp_cs.c Removal of randomness flag conflicts with SA_ -> IRQF_ global replacement. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c32
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.h21
2 files changed, 40 insertions, 13 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index e5c017ccda59..a8c9627a15c4 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.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_sas.c 12 * FILE : megaraid_sas.c
13 * Version : v00.00.02.04 13 * Version : v00.00.03.01
14 * 14 *
15 * Authors: 15 * Authors:
16 * Sreenivas Bagalkote <Sreenivas.Bagalkote@lsil.com> 16 * Sreenivas Bagalkote <Sreenivas.Bagalkote@lsil.com>
@@ -55,19 +55,25 @@ static struct pci_device_id megasas_pci_table[] = {
55 55
56 { 56 {
57 PCI_VENDOR_ID_LSI_LOGIC, 57 PCI_VENDOR_ID_LSI_LOGIC,
58 PCI_DEVICE_ID_LSI_SAS1064R, // xscale IOP 58 PCI_DEVICE_ID_LSI_SAS1064R, /* xscale IOP */
59 PCI_ANY_ID, 59 PCI_ANY_ID,
60 PCI_ANY_ID, 60 PCI_ANY_ID,
61 }, 61 },
62 { 62 {
63 PCI_VENDOR_ID_LSI_LOGIC, 63 PCI_VENDOR_ID_LSI_LOGIC,
64 PCI_DEVICE_ID_LSI_SAS1078R, // ppc IOP 64 PCI_DEVICE_ID_LSI_SAS1078R, /* ppc IOP */
65 PCI_ANY_ID, 65 PCI_ANY_ID,
66 PCI_ANY_ID, 66 PCI_ANY_ID,
67 }, 67 },
68 { 68 {
69 PCI_VENDOR_ID_LSI_LOGIC,
70 PCI_DEVICE_ID_LSI_VERDE_ZCR, /* xscale IOP, vega */
71 PCI_ANY_ID,
72 PCI_ANY_ID,
73 },
74 {
69 PCI_VENDOR_ID_DELL, 75 PCI_VENDOR_ID_DELL,
70 PCI_DEVICE_ID_DELL_PERC5, // xscale IOP 76 PCI_DEVICE_ID_DELL_PERC5, /* xscale IOP */
71 PCI_ANY_ID, 77 PCI_ANY_ID,
72 PCI_ANY_ID, 78 PCI_ANY_ID,
73 }, 79 },
@@ -289,9 +295,14 @@ static struct megasas_instance_template megasas_instance_template_ppc = {
289 * @regs: MFI register set 295 * @regs: MFI register set
290 */ 296 */
291static inline void 297static inline void
292megasas_disable_intr(struct megasas_register_set __iomem * regs) 298megasas_disable_intr(struct megasas_instance *instance)
293{ 299{
294 u32 mask = 0x1f; 300 u32 mask = 0x1f;
301 struct megasas_register_set __iomem *regs = instance->reg_set;
302
303 if(instance->pdev->device == PCI_DEVICE_ID_LSI_SAS1078R)
304 mask = 0xffffffff;
305
295 writel(mask, &regs->outbound_intr_mask); 306 writel(mask, &regs->outbound_intr_mask);
296 307
297 /* Dummy readl to force pci flush */ 308 /* Dummy readl to force pci flush */
@@ -1260,7 +1271,7 @@ megasas_transition_to_ready(struct megasas_instance* instance)
1260 /* 1271 /*
1261 * Bring it to READY state; assuming max wait 2 secs 1272 * Bring it to READY state; assuming max wait 2 secs
1262 */ 1273 */
1263 megasas_disable_intr(instance->reg_set); 1274 megasas_disable_intr(instance);
1264 writel(MFI_INIT_READY, &instance->reg_set->inbound_doorbell); 1275 writel(MFI_INIT_READY, &instance->reg_set->inbound_doorbell);
1265 1276
1266 max_wait = 10; 1277 max_wait = 10;
@@ -1757,6 +1768,11 @@ static int megasas_init_mfi(struct megasas_instance *instance)
1757 init_frame->data_xfer_len = sizeof(struct megasas_init_queue_info); 1768 init_frame->data_xfer_len = sizeof(struct megasas_init_queue_info);
1758 1769
1759 /* 1770 /*
1771 * disable the intr before firing the init frame to FW
1772 */
1773 megasas_disable_intr(instance);
1774
1775 /*
1760 * Issue the init frame in polled mode 1776 * Issue the init frame in polled mode
1761 */ 1777 */
1762 if (megasas_issue_polled(instance, cmd)) { 1778 if (megasas_issue_polled(instance, cmd)) {
@@ -2234,7 +2250,7 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
2234 megasas_mgmt_info.max_index--; 2250 megasas_mgmt_info.max_index--;
2235 2251
2236 pci_set_drvdata(pdev, NULL); 2252 pci_set_drvdata(pdev, NULL);
2237 megasas_disable_intr(instance->reg_set); 2253 megasas_disable_intr(instance);
2238 free_irq(instance->pdev->irq, instance); 2254 free_irq(instance->pdev->irq, instance);
2239 2255
2240 megasas_release_mfi(instance); 2256 megasas_release_mfi(instance);
@@ -2364,7 +2380,7 @@ static void megasas_detach_one(struct pci_dev *pdev)
2364 2380
2365 pci_set_drvdata(instance->pdev, NULL); 2381 pci_set_drvdata(instance->pdev, NULL);
2366 2382
2367 megasas_disable_intr(instance->reg_set); 2383 megasas_disable_intr(instance);
2368 2384
2369 free_irq(instance->pdev->irq, instance); 2385 free_irq(instance->pdev->irq, instance);
2370 2386
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 927d6ffef05f..3531a14222a7 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -18,9 +18,16 @@
18/** 18/**
19 * MegaRAID SAS Driver meta data 19 * MegaRAID SAS Driver meta data
20 */ 20 */
21#define MEGASAS_VERSION "00.00.02.04" 21#define MEGASAS_VERSION "00.00.03.01"
22#define MEGASAS_RELDATE "Feb 03, 2006" 22#define MEGASAS_RELDATE "May 14, 2006"
23#define MEGASAS_EXT_VERSION "Fri Feb 03 14:31:44 PST 2006" 23#define MEGASAS_EXT_VERSION "Sun May 14 22:49:52 PDT 2006"
24
25/*
26 * Device IDs
27 */
28#define PCI_DEVICE_ID_LSI_SAS1078R 0x0060
29#define PCI_DEVICE_ID_LSI_VERDE_ZCR 0x0413
30
24/* 31/*
25 * ===================================== 32 * =====================================
26 * MegaRAID SAS MFI firmware definitions 33 * MegaRAID SAS MFI firmware definitions
@@ -554,7 +561,11 @@ struct megasas_ctrl_info {
554#define MFI_POLL_TIMEOUT_SECS 10 561#define MFI_POLL_TIMEOUT_SECS 10
555 562
556#define MFI_REPLY_1078_MESSAGE_INTERRUPT 0x80000000 563#define MFI_REPLY_1078_MESSAGE_INTERRUPT 0x80000000
557#define PCI_DEVICE_ID_LSI_SAS1078R 0x00000060 564
565/*
566* register set for both 1068 and 1078 controllers
567* structure extended for 1078 registers
568*/
558 569
559struct megasas_register_set { 570struct megasas_register_set {
560 u32 reserved_0[4]; /*0000h*/ 571 u32 reserved_0[4]; /*0000h*/
@@ -1150,10 +1161,10 @@ struct compat_megasas_iocpacket {
1150 struct compat_iovec sgl[MAX_IOCTL_SGE]; 1161 struct compat_iovec sgl[MAX_IOCTL_SGE];
1151} __attribute__ ((packed)); 1162} __attribute__ ((packed));
1152 1163
1164#define MEGASAS_IOC_FIRMWARE32 _IOWR('M', 1, struct compat_megasas_iocpacket)
1153#endif 1165#endif
1154 1166
1155#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct megasas_iocpacket) 1167#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct megasas_iocpacket)
1156#define MEGASAS_IOC_FIRMWARE32 _IOWR('M', 1, struct compat_megasas_iocpacket)
1157#define MEGASAS_IOC_GET_AEN _IOW('M', 3, struct megasas_aen) 1168#define MEGASAS_IOC_GET_AEN _IOW('M', 3, struct megasas_aen)
1158 1169
1159struct megasas_mgmt_info { 1170struct megasas_mgmt_info {