diff options
Diffstat (limited to 'drivers/scsi/sata_mv.c')
| -rw-r--r-- | drivers/scsi/sata_mv.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index 181917ac0426..e6d141dd0385 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c | |||
| @@ -87,7 +87,7 @@ enum { | |||
| 87 | MV_FLAG_IRQ_COALESCE = (1 << 29), /* IRQ coalescing capability */ | 87 | MV_FLAG_IRQ_COALESCE = (1 << 29), /* IRQ coalescing capability */ |
| 88 | MV_COMMON_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | | 88 | MV_COMMON_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | |
| 89 | ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO | | 89 | ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO | |
| 90 | ATA_FLAG_NO_ATAPI), | 90 | ATA_FLAG_PIO_POLLING), |
| 91 | MV_6XXX_FLAGS = MV_FLAG_IRQ_COALESCE, | 91 | MV_6XXX_FLAGS = MV_FLAG_IRQ_COALESCE, |
| 92 | 92 | ||
| 93 | CRQB_FLAG_READ = (1 << 0), | 93 | CRQB_FLAG_READ = (1 << 0), |
| @@ -680,7 +680,7 @@ static void mv_stop_dma(struct ata_port *ap) | |||
| 680 | } | 680 | } |
| 681 | 681 | ||
| 682 | if (EDMA_EN & reg) { | 682 | if (EDMA_EN & reg) { |
| 683 | printk(KERN_ERR "ata%u: Unable to stop eDMA\n", ap->id); | 683 | ata_port_printk(ap, KERN_ERR, "Unable to stop eDMA\n"); |
| 684 | /* FIXME: Consider doing a reset here to recover */ | 684 | /* FIXME: Consider doing a reset here to recover */ |
| 685 | } | 685 | } |
| 686 | } | 686 | } |
| @@ -1309,8 +1309,8 @@ static void mv_err_intr(struct ata_port *ap) | |||
| 1309 | edma_err_cause = readl(port_mmio + EDMA_ERR_IRQ_CAUSE_OFS); | 1309 | edma_err_cause = readl(port_mmio + EDMA_ERR_IRQ_CAUSE_OFS); |
| 1310 | 1310 | ||
| 1311 | if (EDMA_ERR_SERR & edma_err_cause) { | 1311 | if (EDMA_ERR_SERR & edma_err_cause) { |
| 1312 | serr = scr_read(ap, SCR_ERROR); | 1312 | sata_scr_read(ap, SCR_ERROR, &serr); |
| 1313 | scr_write_flush(ap, SCR_ERROR, serr); | 1313 | sata_scr_write_flush(ap, SCR_ERROR, serr); |
| 1314 | } | 1314 | } |
| 1315 | if (EDMA_ERR_SELF_DIS & edma_err_cause) { | 1315 | if (EDMA_ERR_SELF_DIS & edma_err_cause) { |
| 1316 | struct mv_port_priv *pp = ap->private_data; | 1316 | struct mv_port_priv *pp = ap->private_data; |
| @@ -1396,7 +1396,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant, | |||
| 1396 | } | 1396 | } |
| 1397 | } | 1397 | } |
| 1398 | 1398 | ||
| 1399 | if (ap->flags & (ATA_FLAG_DISABLED | ATA_FLAG_NOINTR)) | 1399 | if (ap && (ap->flags & ATA_FLAG_DISABLED)) |
| 1400 | continue; | 1400 | continue; |
| 1401 | 1401 | ||
| 1402 | err_mask = ac_err_mask(ata_status); | 1402 | err_mask = ac_err_mask(ata_status); |
| @@ -1417,7 +1417,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant, | |||
| 1417 | VPRINTK("port %u IRQ found for qc, " | 1417 | VPRINTK("port %u IRQ found for qc, " |
| 1418 | "ata_status 0x%x\n", port,ata_status); | 1418 | "ata_status 0x%x\n", port,ata_status); |
| 1419 | /* mark qc status appropriately */ | 1419 | /* mark qc status appropriately */ |
| 1420 | if (!(qc->tf.ctl & ATA_NIEN)) { | 1420 | if (!(qc->tf.flags & ATA_TFLAG_POLLING)) { |
| 1421 | qc->err_mask |= err_mask; | 1421 | qc->err_mask |= err_mask; |
| 1422 | ata_qc_complete(qc); | 1422 | ata_qc_complete(qc); |
| 1423 | } | 1423 | } |
| @@ -1934,15 +1934,16 @@ static void __mv_phy_reset(struct ata_port *ap, int can_sleep) | |||
| 1934 | 1934 | ||
| 1935 | /* Issue COMRESET via SControl */ | 1935 | /* Issue COMRESET via SControl */ |
| 1936 | comreset_retry: | 1936 | comreset_retry: |
| 1937 | scr_write_flush(ap, SCR_CONTROL, 0x301); | 1937 | sata_scr_write_flush(ap, SCR_CONTROL, 0x301); |
| 1938 | __msleep(1, can_sleep); | 1938 | __msleep(1, can_sleep); |
| 1939 | 1939 | ||
| 1940 | scr_write_flush(ap, SCR_CONTROL, 0x300); | 1940 | sata_scr_write_flush(ap, SCR_CONTROL, 0x300); |
| 1941 | __msleep(20, can_sleep); | 1941 | __msleep(20, can_sleep); |
| 1942 | 1942 | ||
| 1943 | timeout = jiffies + msecs_to_jiffies(200); | 1943 | timeout = jiffies + msecs_to_jiffies(200); |
| 1944 | do { | 1944 | do { |
| 1945 | sstatus = scr_read(ap, SCR_STATUS) & 0x3; | 1945 | sata_scr_read(ap, SCR_STATUS, &sstatus); |
| 1946 | sstatus &= 0x3; | ||
| 1946 | if ((sstatus == 3) || (sstatus == 0)) | 1947 | if ((sstatus == 3) || (sstatus == 0)) |
| 1947 | break; | 1948 | break; |
| 1948 | 1949 | ||
| @@ -1959,11 +1960,12 @@ comreset_retry: | |||
| 1959 | "SCtrl 0x%08x\n", mv_scr_read(ap, SCR_STATUS), | 1960 | "SCtrl 0x%08x\n", mv_scr_read(ap, SCR_STATUS), |
| 1960 | mv_scr_read(ap, SCR_ERROR), mv_scr_read(ap, SCR_CONTROL)); | 1961 | mv_scr_read(ap, SCR_ERROR), mv_scr_read(ap, SCR_CONTROL)); |
| 1961 | 1962 | ||
| 1962 | if (sata_dev_present(ap)) { | 1963 | if (ata_port_online(ap)) { |
| 1963 | ata_port_probe(ap); | 1964 | ata_port_probe(ap); |
| 1964 | } else { | 1965 | } else { |
| 1965 | printk(KERN_INFO "ata%u: no device found (phy stat %08x)\n", | 1966 | sata_scr_read(ap, SCR_STATUS, &sstatus); |
| 1966 | ap->id, scr_read(ap, SCR_STATUS)); | 1967 | ata_port_printk(ap, KERN_INFO, |
| 1968 | "no device found (phy stat %08x)\n", sstatus); | ||
| 1967 | ata_port_disable(ap); | 1969 | ata_port_disable(ap); |
| 1968 | return; | 1970 | return; |
| 1969 | } | 1971 | } |
| @@ -2021,7 +2023,7 @@ static void mv_eng_timeout(struct ata_port *ap) | |||
| 2021 | { | 2023 | { |
| 2022 | struct ata_queued_cmd *qc; | 2024 | struct ata_queued_cmd *qc; |
| 2023 | 2025 | ||
| 2024 | printk(KERN_ERR "ata%u: Entering mv_eng_timeout\n",ap->id); | 2026 | ata_port_printk(ap, KERN_ERR, "Entering mv_eng_timeout\n"); |
| 2025 | DPRINTK("All regs @ start of eng_timeout\n"); | 2027 | DPRINTK("All regs @ start of eng_timeout\n"); |
| 2026 | mv_dump_all_regs(ap->host_set->mmio_base, ap->port_no, | 2028 | mv_dump_all_regs(ap->host_set->mmio_base, ap->port_no, |
| 2027 | to_pci_dev(ap->host_set->dev)); | 2029 | to_pci_dev(ap->host_set->dev)); |
