aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_mv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r--drivers/ata/sata_mv.c49
1 files changed, 22 insertions, 27 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index b52c0519ad0b..bea717a22e32 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -2930,8 +2930,7 @@ static int mv_pci_error(struct ata_host *host, void __iomem *mmio)
2930 2930
2931 err_cause = readl(mmio + hpriv->irq_cause_offset); 2931 err_cause = readl(mmio + hpriv->irq_cause_offset);
2932 2932
2933 dev_printk(KERN_ERR, host->dev, "PCI ERROR; PCI IRQ cause=0x%08x\n", 2933 dev_err(host->dev, "PCI ERROR; PCI IRQ cause=0x%08x\n", err_cause);
2934 err_cause);
2935 2934
2936 DPRINTK("All regs @ PCI error\n"); 2935 DPRINTK("All regs @ PCI error\n");
2937 mv_dump_all_regs(mmio, -1, to_pci_dev(host->dev)); 2936 mv_dump_all_regs(mmio, -1, to_pci_dev(host->dev));
@@ -3760,8 +3759,8 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
3760 hp_flags |= MV_HP_ERRATA_50XXB2; 3759 hp_flags |= MV_HP_ERRATA_50XXB2;
3761 break; 3760 break;
3762 default: 3761 default:
3763 dev_printk(KERN_WARNING, &pdev->dev, 3762 dev_warn(&pdev->dev,
3764 "Applying 50XXB2 workarounds to unknown rev\n"); 3763 "Applying 50XXB2 workarounds to unknown rev\n");
3765 hp_flags |= MV_HP_ERRATA_50XXB2; 3764 hp_flags |= MV_HP_ERRATA_50XXB2;
3766 break; 3765 break;
3767 } 3766 }
@@ -3780,8 +3779,8 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
3780 hp_flags |= MV_HP_ERRATA_50XXB2; 3779 hp_flags |= MV_HP_ERRATA_50XXB2;
3781 break; 3780 break;
3782 default: 3781 default:
3783 dev_printk(KERN_WARNING, &pdev->dev, 3782 dev_warn(&pdev->dev,
3784 "Applying B2 workarounds to unknown rev\n"); 3783 "Applying B2 workarounds to unknown rev\n");
3785 hp_flags |= MV_HP_ERRATA_50XXB2; 3784 hp_flags |= MV_HP_ERRATA_50XXB2;
3786 break; 3785 break;
3787 } 3786 }
@@ -3801,8 +3800,8 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
3801 hp_flags |= MV_HP_ERRATA_60X1C0; 3800 hp_flags |= MV_HP_ERRATA_60X1C0;
3802 break; 3801 break;
3803 default: 3802 default:
3804 dev_printk(KERN_WARNING, &pdev->dev, 3803 dev_warn(&pdev->dev,
3805 "Applying B2 workarounds to unknown rev\n"); 3804 "Applying B2 workarounds to unknown rev\n");
3806 hp_flags |= MV_HP_ERRATA_60X1B2; 3805 hp_flags |= MV_HP_ERRATA_60X1B2;
3807 break; 3806 break;
3808 } 3807 }
@@ -3851,8 +3850,8 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
3851 hp_flags |= MV_HP_ERRATA_60X1C0; 3850 hp_flags |= MV_HP_ERRATA_60X1C0;
3852 break; 3851 break;
3853 default: 3852 default:
3854 dev_printk(KERN_WARNING, &pdev->dev, 3853 dev_warn(&pdev->dev,
3855 "Applying 60X1C0 workarounds to unknown rev\n"); 3854 "Applying 60X1C0 workarounds to unknown rev\n");
3856 hp_flags |= MV_HP_ERRATA_60X1C0; 3855 hp_flags |= MV_HP_ERRATA_60X1C0;
3857 break; 3856 break;
3858 } 3857 }
@@ -3867,8 +3866,7 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
3867 break; 3866 break;
3868 3867
3869 default: 3868 default:
3870 dev_printk(KERN_ERR, host->dev, 3869 dev_err(host->dev, "BUG: invalid board index %u\n", board_idx);
3871 "BUG: invalid board index %u\n", board_idx);
3872 return 1; 3870 return 1;
3873 } 3871 }
3874 3872
@@ -4033,7 +4031,7 @@ static int mv_platform_probe(struct platform_device *pdev)
4033 int n_ports, rc; 4031 int n_ports, rc;
4034 4032
4035 if (!printed_version++) 4033 if (!printed_version++)
4036 dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n"); 4034 dev_info(&pdev->dev, "version " DRV_VERSION "\n");
4037 4035
4038 /* 4036 /*
4039 * Simple resource validation .. 4037 * Simple resource validation ..
@@ -4091,9 +4089,8 @@ static int mv_platform_probe(struct platform_device *pdev)
4091 if (rc) 4089 if (rc)
4092 goto err; 4090 goto err;
4093 4091
4094 dev_printk(KERN_INFO, &pdev->dev, 4092 dev_info(&pdev->dev, "slots %u ports %d\n",
4095 "slots %u ports %d\n", (unsigned)MV_MAX_Q_DEPTH, 4093 (unsigned)MV_MAX_Q_DEPTH, host->n_ports);
4096 host->n_ports);
4097 4094
4098 return ata_host_activate(host, platform_get_irq(pdev, 0), mv_interrupt, 4095 return ata_host_activate(host, platform_get_irq(pdev, 0), mv_interrupt,
4099 IRQF_SHARED, &mv6_sht); 4096 IRQF_SHARED, &mv6_sht);
@@ -4217,22 +4214,21 @@ static int pci_go_64(struct pci_dev *pdev)
4217 if (rc) { 4214 if (rc) {
4218 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); 4215 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
4219 if (rc) { 4216 if (rc) {
4220 dev_printk(KERN_ERR, &pdev->dev, 4217 dev_err(&pdev->dev,
4221 "64-bit DMA enable failed\n"); 4218 "64-bit DMA enable failed\n");
4222 return rc; 4219 return rc;
4223 } 4220 }
4224 } 4221 }
4225 } else { 4222 } else {
4226 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); 4223 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
4227 if (rc) { 4224 if (rc) {
4228 dev_printk(KERN_ERR, &pdev->dev, 4225 dev_err(&pdev->dev, "32-bit DMA enable failed\n");
4229 "32-bit DMA enable failed\n");
4230 return rc; 4226 return rc;
4231 } 4227 }
4232 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); 4228 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
4233 if (rc) { 4229 if (rc) {
4234 dev_printk(KERN_ERR, &pdev->dev, 4230 dev_err(&pdev->dev,
4235 "32-bit consistent DMA enable failed\n"); 4231 "32-bit consistent DMA enable failed\n");
4236 return rc; 4232 return rc;
4237 } 4233 }
4238 } 4234 }
@@ -4276,10 +4272,9 @@ static void mv_print_info(struct ata_host *host)
4276 else 4272 else
4277 gen = "?"; 4273 gen = "?";
4278 4274
4279 dev_printk(KERN_INFO, &pdev->dev, 4275 dev_info(&pdev->dev, "Gen-%s %u slots %u ports %s mode IRQ via %s\n",
4280 "Gen-%s %u slots %u ports %s mode IRQ via %s\n", 4276 gen, (unsigned)MV_MAX_Q_DEPTH, host->n_ports,
4281 gen, (unsigned)MV_MAX_Q_DEPTH, host->n_ports, 4277 scc_s, (MV_HP_FLAG_MSI & hpriv->hp_flags) ? "MSI" : "INTx");
4282 scc_s, (MV_HP_FLAG_MSI & hpriv->hp_flags) ? "MSI" : "INTx");
4283} 4278}
4284 4279
4285/** 4280/**
@@ -4301,7 +4296,7 @@ static int mv_pci_init_one(struct pci_dev *pdev,
4301 int n_ports, port, rc; 4296 int n_ports, port, rc;
4302 4297
4303 if (!printed_version++) 4298 if (!printed_version++)
4304 dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n"); 4299 dev_info(&pdev->dev, "version " DRV_VERSION "\n");
4305 4300
4306 /* allocate host */ 4301 /* allocate host */
4307 n_ports = mv_get_hc_count(ppi[0]->flags) * MV_PORTS_PER_HC; 4302 n_ports = mv_get_hc_count(ppi[0]->flags) * MV_PORTS_PER_HC;