diff options
-rw-r--r-- | drivers/ata/pata_ixp4xx_cf.c | 3 | ||||
-rw-r--r-- | drivers/ata/pata_marvell.c | 4 | ||||
-rw-r--r-- | drivers/ata/sata_mv.c | 26 |
3 files changed, 24 insertions, 9 deletions
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c index 4ca7fd6118d5..5dea3584c6c2 100644 --- a/drivers/ata/pata_ixp4xx_cf.c +++ b/drivers/ata/pata_ixp4xx_cf.c | |||
@@ -189,6 +189,9 @@ static __devinit int ixp4xx_pata_probe(struct platform_device *pdev) | |||
189 | data->cs0 = devm_ioremap(&pdev->dev, cs0->start, 0x1000); | 189 | data->cs0 = devm_ioremap(&pdev->dev, cs0->start, 0x1000); |
190 | data->cs1 = devm_ioremap(&pdev->dev, cs1->start, 0x1000); | 190 | data->cs1 = devm_ioremap(&pdev->dev, cs1->start, 0x1000); |
191 | 191 | ||
192 | if (!data->cs0 || !data->cs1) | ||
193 | return -ENOMEM; | ||
194 | |||
192 | irq = platform_get_irq(pdev, 0); | 195 | irq = platform_get_irq(pdev, 0); |
193 | if (irq) | 196 | if (irq) |
194 | set_irq_type(irq, IRQT_RISING); | 197 | set_irq_type(irq, IRQT_RISING); |
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c index ae206f35f747..b45506f1ef73 100644 --- a/drivers/ata/pata_marvell.c +++ b/drivers/ata/pata_marvell.c | |||
@@ -44,10 +44,10 @@ static int marvell_pre_reset(struct ata_port *ap, unsigned long deadline) | |||
44 | return -ENOMEM; | 44 | return -ENOMEM; |
45 | printk("BAR5:"); | 45 | printk("BAR5:"); |
46 | for(i = 0; i <= 0x0F; i++) | 46 | for(i = 0; i <= 0x0F; i++) |
47 | printk("%02X:%02X ", i, readb(barp + i)); | 47 | printk("%02X:%02X ", i, ioread8(barp + i)); |
48 | printk("\n"); | 48 | printk("\n"); |
49 | 49 | ||
50 | devices = readl(barp + 0x0C); | 50 | devices = ioread32(barp + 0x0C); |
51 | pci_iounmap(pdev, barp); | 51 | pci_iounmap(pdev, barp); |
52 | 52 | ||
53 | if ((pdev->device == 0x6145) && (ap->port_no == 0) && | 53 | if ((pdev->device == 0x6145) && (ap->port_no == 0) && |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 11bf6c7ac122..1a82e22b3efd 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -1139,15 +1139,27 @@ static unsigned int mv_fill_sg(struct ata_queued_cmd *qc) | |||
1139 | dma_addr_t addr = sg_dma_address(sg); | 1139 | dma_addr_t addr = sg_dma_address(sg); |
1140 | u32 sg_len = sg_dma_len(sg); | 1140 | u32 sg_len = sg_dma_len(sg); |
1141 | 1141 | ||
1142 | mv_sg->addr = cpu_to_le32(addr & 0xffffffff); | 1142 | while (sg_len) { |
1143 | mv_sg->addr_hi = cpu_to_le32((addr >> 16) >> 16); | 1143 | u32 offset = addr & 0xffff; |
1144 | mv_sg->flags_size = cpu_to_le32(sg_len & 0xffff); | 1144 | u32 len = sg_len; |
1145 | 1145 | ||
1146 | if (ata_sg_is_last(sg, qc)) | 1146 | if ((offset + sg_len > 0x10000)) |
1147 | mv_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL); | 1147 | len = 0x10000 - offset; |
1148 | |||
1149 | mv_sg->addr = cpu_to_le32(addr & 0xffffffff); | ||
1150 | mv_sg->addr_hi = cpu_to_le32((addr >> 16) >> 16); | ||
1151 | mv_sg->flags_size = cpu_to_le32(len); | ||
1152 | |||
1153 | sg_len -= len; | ||
1154 | addr += len; | ||
1155 | |||
1156 | if (!sg_len && ata_sg_is_last(sg, qc)) | ||
1157 | mv_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL); | ||
1158 | |||
1159 | mv_sg++; | ||
1160 | n_sg++; | ||
1161 | } | ||
1148 | 1162 | ||
1149 | mv_sg++; | ||
1150 | n_sg++; | ||
1151 | } | 1163 | } |
1152 | 1164 | ||
1153 | return n_sg; | 1165 | return n_sg; |