diff options
author | adam radford <aradford@gmail.com> | 2011-05-11 21:34:52 -0400 |
---|---|---|
committer | James Bottomley <jbottomley@parallels.com> | 2011-05-24 12:35:56 -0400 |
commit | 3cc6851f9a3509e2ced0eb218599857b07c0ab46 (patch) | |
tree | c83af281b9e33e2197867c8ec0b217145ee6c1e5 /drivers/scsi/megaraid/megaraid_sas_base.c | |
parent | 495c5609700e21059fa0a4651b0f4f5847332319 (diff) |
[SCSI] megaraid_sas: Add 1078 OCR support
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.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index f43ab031edc8..09a0d9539ca6 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
@@ -437,15 +437,18 @@ megasas_read_fw_status_reg_ppc(struct megasas_register_set __iomem * regs) | |||
437 | static int | 437 | static int |
438 | megasas_clear_intr_ppc(struct megasas_register_set __iomem * regs) | 438 | megasas_clear_intr_ppc(struct megasas_register_set __iomem * regs) |
439 | { | 439 | { |
440 | u32 status; | 440 | u32 status, mfiStatus = 0; |
441 | |||
441 | /* | 442 | /* |
442 | * Check if it is our interrupt | 443 | * Check if it is our interrupt |
443 | */ | 444 | */ |
444 | status = readl(®s->outbound_intr_status); | 445 | status = readl(®s->outbound_intr_status); |
445 | 446 | ||
446 | if (!(status & MFI_REPLY_1078_MESSAGE_INTERRUPT)) { | 447 | if (status & MFI_REPLY_1078_MESSAGE_INTERRUPT) |
447 | return 0; | 448 | mfiStatus = MFI_INTR_FLAG_REPLY_MESSAGE; |
448 | } | 449 | |
450 | if (status & MFI_G2_OUTBOUND_DOORBELL_CHANGE_INTERRUPT) | ||
451 | mfiStatus |= MFI_INTR_FLAG_FIRMWARE_STATE_CHANGE; | ||
449 | 452 | ||
450 | /* | 453 | /* |
451 | * Clear the interrupt by writing back the same value | 454 | * Clear the interrupt by writing back the same value |
@@ -455,8 +458,9 @@ megasas_clear_intr_ppc(struct megasas_register_set __iomem * regs) | |||
455 | /* Dummy readl to force pci flush */ | 458 | /* Dummy readl to force pci flush */ |
456 | readl(®s->outbound_doorbell_clear); | 459 | readl(®s->outbound_doorbell_clear); |
457 | 460 | ||
458 | return 1; | 461 | return mfiStatus; |
459 | } | 462 | } |
463 | |||
460 | /** | 464 | /** |
461 | * megasas_fire_cmd_ppc - Sends command to the FW | 465 | * megasas_fire_cmd_ppc - Sends command to the FW |
462 | * @frame_phys_addr : Physical address of cmd | 466 | * @frame_phys_addr : Physical address of cmd |
@@ -477,17 +481,6 @@ megasas_fire_cmd_ppc(struct megasas_instance *instance, | |||
477 | } | 481 | } |
478 | 482 | ||
479 | /** | 483 | /** |
480 | * megasas_adp_reset_ppc - For controller reset | ||
481 | * @regs: MFI register set | ||
482 | */ | ||
483 | static int | ||
484 | megasas_adp_reset_ppc(struct megasas_instance *instance, | ||
485 | struct megasas_register_set __iomem *regs) | ||
486 | { | ||
487 | return 0; | ||
488 | } | ||
489 | |||
490 | /** | ||
491 | * megasas_check_reset_ppc - For controller reset check | 484 | * megasas_check_reset_ppc - For controller reset check |
492 | * @regs: MFI register set | 485 | * @regs: MFI register set |
493 | */ | 486 | */ |
@@ -495,8 +488,12 @@ static int | |||
495 | megasas_check_reset_ppc(struct megasas_instance *instance, | 488 | megasas_check_reset_ppc(struct megasas_instance *instance, |
496 | struct megasas_register_set __iomem *regs) | 489 | struct megasas_register_set __iomem *regs) |
497 | { | 490 | { |
491 | if (instance->adprecovery != MEGASAS_HBA_OPERATIONAL) | ||
492 | return 1; | ||
493 | |||
498 | return 0; | 494 | return 0; |
499 | } | 495 | } |
496 | |||
500 | static struct megasas_instance_template megasas_instance_template_ppc = { | 497 | static struct megasas_instance_template megasas_instance_template_ppc = { |
501 | 498 | ||
502 | .fire_cmd = megasas_fire_cmd_ppc, | 499 | .fire_cmd = megasas_fire_cmd_ppc, |
@@ -504,7 +501,7 @@ static struct megasas_instance_template megasas_instance_template_ppc = { | |||
504 | .disable_intr = megasas_disable_intr_ppc, | 501 | .disable_intr = megasas_disable_intr_ppc, |
505 | .clear_intr = megasas_clear_intr_ppc, | 502 | .clear_intr = megasas_clear_intr_ppc, |
506 | .read_fw_status_reg = megasas_read_fw_status_reg_ppc, | 503 | .read_fw_status_reg = megasas_read_fw_status_reg_ppc, |
507 | .adp_reset = megasas_adp_reset_ppc, | 504 | .adp_reset = megasas_adp_reset_xscale, |
508 | .check_reset = megasas_check_reset_ppc, | 505 | .check_reset = megasas_check_reset_ppc, |
509 | .service_isr = megasas_isr, | 506 | .service_isr = megasas_isr, |
510 | .tasklet = megasas_complete_cmd_dpc, | 507 | .tasklet = megasas_complete_cmd_dpc, |
@@ -620,6 +617,9 @@ static int | |||
620 | megasas_check_reset_skinny(struct megasas_instance *instance, | 617 | megasas_check_reset_skinny(struct megasas_instance *instance, |
621 | struct megasas_register_set __iomem *regs) | 618 | struct megasas_register_set __iomem *regs) |
622 | { | 619 | { |
620 | if (instance->adprecovery != MEGASAS_HBA_OPERATIONAL) | ||
621 | return 1; | ||
622 | |||
623 | return 0; | 623 | return 0; |
624 | } | 624 | } |
625 | 625 | ||