diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-06-09 05:10:19 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-07-20 03:58:31 -0400 |
commit | 6ad819b06ddf13a5a1d995eb26555903f6c3b71a (patch) | |
tree | 0464ebec1ee3af86517afff5911fb91897b03b58 /drivers/scsi/arcmsr/arcmsr_hba.c | |
parent | 23f0bb47a4ec4c662b2bbf0221d6289e91b06ece (diff) |
[SCSI] arcmsr: fix misuse of | instead of &
ARCMSR_ARC1880_DiagWrite_ENABLE is 0x00000080 so (x | 0x00000080) is
never zero. The intent here was to test that loop until
ARCMSR_ARC1880_DiagWrite_ENABLE was turned on, but because the test was
wrong, we would do five loops regardless of whether it succeed or not.
Also I simplified the condition a little by removing the unused
assignement.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Nick Cheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/arcmsr/arcmsr_hba.c')
-rw-r--r-- | drivers/scsi/arcmsr/arcmsr_hba.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index cbde1dca45ad..def24a1079ad 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c | |||
@@ -2821,7 +2821,7 @@ static void arcmsr_hardware_reset(struct AdapterControlBlock *acb) | |||
2821 | int i, count = 0; | 2821 | int i, count = 0; |
2822 | struct MessageUnit_A __iomem *pmuA = acb->pmuA; | 2822 | struct MessageUnit_A __iomem *pmuA = acb->pmuA; |
2823 | struct MessageUnit_C __iomem *pmuC = acb->pmuC; | 2823 | struct MessageUnit_C __iomem *pmuC = acb->pmuC; |
2824 | u32 temp = 0; | 2824 | |
2825 | /* backup pci config data */ | 2825 | /* backup pci config data */ |
2826 | printk(KERN_NOTICE "arcmsr%d: executing hw bus reset .....\n", acb->host->host_no); | 2826 | printk(KERN_NOTICE "arcmsr%d: executing hw bus reset .....\n", acb->host->host_no); |
2827 | for (i = 0; i < 64; i++) { | 2827 | for (i = 0; i < 64; i++) { |
@@ -2839,7 +2839,7 @@ static void arcmsr_hardware_reset(struct AdapterControlBlock *acb) | |||
2839 | writel(0x2, &pmuC->write_sequence); | 2839 | writel(0x2, &pmuC->write_sequence); |
2840 | writel(0x7, &pmuC->write_sequence); | 2840 | writel(0x7, &pmuC->write_sequence); |
2841 | writel(0xD, &pmuC->write_sequence); | 2841 | writel(0xD, &pmuC->write_sequence); |
2842 | } while ((((temp = readl(&pmuC->host_diagnostic)) | ARCMSR_ARC1880_DiagWrite_ENABLE) == 0) && (count < 5)); | 2842 | } while (((readl(&pmuC->host_diagnostic) & ARCMSR_ARC1880_DiagWrite_ENABLE) == 0) && (count < 5)); |
2843 | writel(ARCMSR_ARC1880_RESET_ADAPTER, &pmuC->host_diagnostic); | 2843 | writel(ARCMSR_ARC1880_RESET_ADAPTER, &pmuC->host_diagnostic); |
2844 | } else { | 2844 | } else { |
2845 | pci_write_config_byte(acb->pdev, 0x84, 0x20); | 2845 | pci_write_config_byte(acb->pdev, 0x84, 0x20); |