aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid/megaraid_sas_base.c
diff options
context:
space:
mode:
authoradam radford <aradford@gmail.com>2011-10-08 21:15:06 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-16 12:21:08 -0400
commit36807e6799dcd8f961137b74c7edce10c6fcb1d2 (patch)
treef3fe7ee5b1d8663aaf57fe98e4ecfca4d7842b8d /drivers/scsi/megaraid/megaraid_sas_base.c
parent3f0e58bc8ff80e173660bdfcc514d8a5c4419764 (diff)
[SCSI] megaraid_sas: Add support for MegaRAID 9360/9380 12GB/s controllers
Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_base.c')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c39
1 files changed, 29 insertions, 10 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 9d5a14a2c5b1..f2cf768c896d 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -114,6 +114,8 @@ static struct pci_device_id megasas_pci_table[] = {
114 /* xscale IOP */ 114 /* xscale IOP */
115 {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_FUSION)}, 115 {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_FUSION)},
116 /* Fusion */ 116 /* Fusion */
117 {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_INVADER)},
118 /* Invader */
117 {} 119 {}
118}; 120};
119 121
@@ -1583,7 +1585,8 @@ void megaraid_sas_kill_hba(struct megasas_instance *instance)
1583{ 1585{
1584 if ((instance->pdev->device == PCI_DEVICE_ID_LSI_SAS0073SKINNY) || 1586 if ((instance->pdev->device == PCI_DEVICE_ID_LSI_SAS0073SKINNY) ||
1585 (instance->pdev->device == PCI_DEVICE_ID_LSI_SAS0071SKINNY) || 1587 (instance->pdev->device == PCI_DEVICE_ID_LSI_SAS0071SKINNY) ||
1586 (instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION)) { 1588 (instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) ||
1589 (instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER)) {
1587 writel(MFI_STOP_ADP, &instance->reg_set->doorbell); 1590 writel(MFI_STOP_ADP, &instance->reg_set->doorbell);
1588 } else { 1591 } else {
1589 writel(MFI_STOP_ADP, &instance->reg_set->inbound_doorbell); 1592 writel(MFI_STOP_ADP, &instance->reg_set->inbound_doorbell);
@@ -1957,7 +1960,8 @@ static int megasas_reset_bus_host(struct scsi_cmnd *scmd)
1957 /* 1960 /*
1958 * First wait for all commands to complete 1961 * First wait for all commands to complete
1959 */ 1962 */
1960 if (instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) 1963 if ((instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) ||
1964 (instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER))
1961 ret = megasas_reset_fusion(scmd->device->host); 1965 ret = megasas_reset_fusion(scmd->device->host);
1962 else 1966 else
1963 ret = megasas_generic_reset(scmd); 1967 ret = megasas_generic_reset(scmd);
@@ -2656,7 +2660,9 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr)
2656 (instance->pdev->device == 2660 (instance->pdev->device ==
2657 PCI_DEVICE_ID_LSI_SAS0071SKINNY) || 2661 PCI_DEVICE_ID_LSI_SAS0071SKINNY) ||
2658 (instance->pdev->device == 2662 (instance->pdev->device ==
2659 PCI_DEVICE_ID_LSI_FUSION)) { 2663 PCI_DEVICE_ID_LSI_FUSION) ||
2664 (instance->pdev->device ==
2665 PCI_DEVICE_ID_LSI_INVADER)) {
2660 writel( 2666 writel(
2661 MFI_INIT_CLEAR_HANDSHAKE|MFI_INIT_HOTPLUG, 2667 MFI_INIT_CLEAR_HANDSHAKE|MFI_INIT_HOTPLUG,
2662 &instance->reg_set->doorbell); 2668 &instance->reg_set->doorbell);
@@ -2676,7 +2682,9 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr)
2676 (instance->pdev->device == 2682 (instance->pdev->device ==
2677 PCI_DEVICE_ID_LSI_SAS0071SKINNY) || 2683 PCI_DEVICE_ID_LSI_SAS0071SKINNY) ||
2678 (instance->pdev->device == 2684 (instance->pdev->device ==
2679 PCI_DEVICE_ID_LSI_FUSION)) { 2685 PCI_DEVICE_ID_LSI_FUSION) ||
2686 (instance->pdev->device ==
2687 PCI_DEVICE_ID_LSI_INVADER)) {
2680 writel(MFI_INIT_HOTPLUG, 2688 writel(MFI_INIT_HOTPLUG,
2681 &instance->reg_set->doorbell); 2689 &instance->reg_set->doorbell);
2682 } else 2690 } else
@@ -2697,11 +2705,15 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr)
2697 (instance->pdev->device == 2705 (instance->pdev->device ==
2698 PCI_DEVICE_ID_LSI_SAS0071SKINNY) || 2706 PCI_DEVICE_ID_LSI_SAS0071SKINNY) ||
2699 (instance->pdev->device 2707 (instance->pdev->device
2700 == PCI_DEVICE_ID_LSI_FUSION)) { 2708 == PCI_DEVICE_ID_LSI_FUSION) ||
2709 (instance->pdev->device
2710 == PCI_DEVICE_ID_LSI_INVADER)) {
2701 writel(MFI_RESET_FLAGS, 2711 writel(MFI_RESET_FLAGS,
2702 &instance->reg_set->doorbell); 2712 &instance->reg_set->doorbell);
2703 if (instance->pdev->device == 2713 if ((instance->pdev->device ==
2704 PCI_DEVICE_ID_LSI_FUSION) { 2714 PCI_DEVICE_ID_LSI_FUSION) ||
2715 (instance->pdev->device ==
2716 PCI_DEVICE_ID_LSI_INVADER)) {
2705 for (i = 0; i < (10 * 1000); i += 20) { 2717 for (i = 0; i < (10 * 1000); i += 20) {
2706 if (readl( 2718 if (readl(
2707 &instance-> 2719 &instance->
@@ -3498,6 +3510,7 @@ static int megasas_init_fw(struct megasas_instance *instance)
3498 3510
3499 switch (instance->pdev->device) { 3511 switch (instance->pdev->device) {
3500 case PCI_DEVICE_ID_LSI_FUSION: 3512 case PCI_DEVICE_ID_LSI_FUSION:
3513 case PCI_DEVICE_ID_LSI_INVADER:
3501 instance->instancet = &megasas_instance_template_fusion; 3514 instance->instancet = &megasas_instance_template_fusion;
3502 break; 3515 break;
3503 case PCI_DEVICE_ID_LSI_SAS1078R: 3516 case PCI_DEVICE_ID_LSI_SAS1078R:
@@ -3894,7 +3907,8 @@ static int megasas_io_attach(struct megasas_instance *instance)
3894 host->max_cmd_len = 16; 3907 host->max_cmd_len = 16;
3895 3908
3896 /* Fusion only supports host reset */ 3909 /* Fusion only supports host reset */
3897 if (instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) { 3910 if ((instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) ||
3911 (instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER)) {
3898 host->hostt->eh_device_reset_handler = NULL; 3912 host->hostt->eh_device_reset_handler = NULL;
3899 host->hostt->eh_bus_reset_handler = NULL; 3913 host->hostt->eh_bus_reset_handler = NULL;
3900 } 3914 }
@@ -4004,6 +4018,7 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4004 4018
4005 switch (instance->pdev->device) { 4019 switch (instance->pdev->device) {
4006 case PCI_DEVICE_ID_LSI_FUSION: 4020 case PCI_DEVICE_ID_LSI_FUSION:
4021 case PCI_DEVICE_ID_LSI_INVADER:
4007 { 4022 {
4008 struct fusion_context *fusion; 4023 struct fusion_context *fusion;
4009 4024
@@ -4096,7 +4111,8 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4096 instance->last_time = 0; 4111 instance->last_time = 0;
4097 instance->disableOnlineCtrlReset = 1; 4112 instance->disableOnlineCtrlReset = 1;
4098 4113
4099 if (instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) 4114 if ((instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) ||
4115 (instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER))
4100 INIT_WORK(&instance->work_init, megasas_fusion_ocr_wq); 4116 INIT_WORK(&instance->work_init, megasas_fusion_ocr_wq);
4101 else 4117 else
4102 INIT_WORK(&instance->work_init, process_fw_state_change_wq); 4118 INIT_WORK(&instance->work_init, process_fw_state_change_wq);
@@ -4161,7 +4177,8 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4161 free_irq(instance->msi_flag ? instance->msixentry.vector : 4177 free_irq(instance->msi_flag ? instance->msixentry.vector :
4162 instance->pdev->irq, instance); 4178 instance->pdev->irq, instance);
4163fail_irq: 4179fail_irq:
4164 if (instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) 4180 if ((instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) ||
4181 (instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER))
4165 megasas_release_fusion(instance); 4182 megasas_release_fusion(instance);
4166 else 4183 else
4167 megasas_release_mfi(instance); 4184 megasas_release_mfi(instance);
@@ -4368,6 +4385,7 @@ megasas_resume(struct pci_dev *pdev)
4368 4385
4369 switch (instance->pdev->device) { 4386 switch (instance->pdev->device) {
4370 case PCI_DEVICE_ID_LSI_FUSION: 4387 case PCI_DEVICE_ID_LSI_FUSION:
4388 case PCI_DEVICE_ID_LSI_INVADER:
4371 { 4389 {
4372 megasas_reset_reply_desc(instance); 4390 megasas_reset_reply_desc(instance);
4373 if (megasas_ioc_init_fusion(instance)) { 4391 if (megasas_ioc_init_fusion(instance)) {
@@ -4501,6 +4519,7 @@ static void __devexit megasas_detach_one(struct pci_dev *pdev)
4501 4519
4502 switch (instance->pdev->device) { 4520 switch (instance->pdev->device) {
4503 case PCI_DEVICE_ID_LSI_FUSION: 4521 case PCI_DEVICE_ID_LSI_FUSION:
4522 case PCI_DEVICE_ID_LSI_INVADER:
4504 megasas_release_fusion(instance); 4523 megasas_release_fusion(instance);
4505 for (i = 0; i < 2 ; i++) 4524 for (i = 0; i < 2 ; i++)
4506 if (fusion->ld_map[i]) 4525 if (fusion->ld_map[i])