aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumant Patro <sumantp@lsil.com>2006-06-20 18:32:37 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-26 10:29:07 -0400
commit0e98936c924e2329f876b0b7791b45249c2e2129 (patch)
tree83893e205f60aa728dc9d912981a92c856e50133
parentcefbda2d6cd9bf78a93768130729a6d142588d67 (diff)
[SCSI] megaraid_sas: zcr with fix
The patch adds support for a ZCR controller (Device ID : 0x413). It also has a critical bug fix : Disable controller interrupt before firing INIT cmd to FW. Interrupt is enabled after required initialization is over. This is done to ensure that driver is ready to handle interrupts when it is generated by the controller. Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--Documentation/scsi/ChangeLog.megaraid_sas16
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c32
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.h21
3 files changed, 56 insertions, 13 deletions
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas
index 0a85a7e8120e..d9e5960dafd5 100644
--- a/Documentation/scsi/ChangeLog.megaraid_sas
+++ b/Documentation/scsi/ChangeLog.megaraid_sas
@@ -1,4 +1,20 @@
1 1
21 Release Date : Sun May 14 22:49:52 PDT 2006 - Sumant Patro <Sumant.Patro@lsil.com>
32 Current Version : 00.00.03.01
43 Older Version : 00.00.02.04
5
6i. Added support for ZCR controller.
7
8 New device id 0x413 added.
9
10ii. Bug fix : Disable controller interrupt before firing INIT cmd to FW.
11
12 Interrupt is enabled after required initialization is over.
13 This is done to ensure that driver is ready to handle interrupts when
14 it is generated by the controller.
15
16 -Sumant Patro <Sumant.Patro@lsil.com>
17
21 Release Date : Wed Feb 03 14:31:44 PST 2006 - Sumant Patro <Sumant.Patro@lsil.com> 181 Release Date : Wed Feb 03 14:31:44 PST 2006 - Sumant Patro <Sumant.Patro@lsil.com>
32 Current Version : 00.00.02.04 192 Current Version : 00.00.02.04
43 Older Version : 00.00.02.04 203 Older Version : 00.00.02.04
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index 0c9516ff636f..3e6f9feaf69d 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 {